VirtualBox

source: vbox/trunk/src/VBox/Main/include/PlatformPropertiesImpl.h

Last change on this file was 103977, checked in by vboxsync, 7 weeks ago

Apply RT_OVERRIDE/NS_OVERRIDE where required to shut up clang.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.6 KB
Line 
1/* $Id: PlatformPropertiesImpl.h 103977 2024-03-21 02:04:52Z vboxsync $ */
2/** @file
3 * VirtualBox COM class implementation - Platform properties.
4 */
5
6/*
7 * Copyright (C) 2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef MAIN_INCLUDED_PlatformPropertiesImpl_h
29#define MAIN_INCLUDED_PlatformPropertiesImpl_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#include "PlatformPropertiesWrap.h"
35
36namespace settings
37{
38 struct PlatformProperties;
39}
40
41class ATL_NO_VTABLE PlatformProperties :
42 public PlatformPropertiesWrap
43{
44public:
45
46 DECLARE_COMMON_CLASS_METHODS(PlatformProperties)
47
48 HRESULT FinalConstruct();
49 void FinalRelease();
50
51 // public initializer/uninitializer for internal purposes only
52 HRESULT init(VirtualBox *aParent, bool fIsHost = false);
53 void uninit() RT_OVERRIDE;
54
55 // public internal methods
56 //HRESULT i_loadSettings(const settings::PlatformProperties &data);
57 //HRESULT i_saveSettings(settings::PlatformProperties &data);
58 //void i_rollback();
59 //void i_commit();
60 //void i_copyFrom(PlatformProperties *aThat);
61 HRESULT i_setArchitecture(PlatformArchitecture_T aArchitecture);
62
63 // public static helper functions
64 static PlatformArchitecture_T s_getHostPlatformArchitecture(void);
65
66 // public static methods, for stuff which does not have a state
67 static ULONG s_getMaxNetworkAdapters(ChipsetType_T aChipset);
68 static ULONG s_getMaxNetworkAdaptersOfType(ChipsetType_T aChipset, NetworkAttachmentType_T aType);
69
70private:
71
72 // wrapped IPlatformProperties properties
73 HRESULT getSerialPortCount(ULONG *aSerialPortCount) RT_OVERRIDE;
74 HRESULT getParallelPortCount(ULONG *aParallelPortCount) RT_OVERRIDE;
75 HRESULT getMaxBootPosition(ULONG *aMaxBootPosition) RT_OVERRIDE;
76 HRESULT getRawModeSupported(BOOL *aRawModeSupported) RT_OVERRIDE;
77 HRESULT getExclusiveHwVirt(BOOL *aExclusiveHwVirt) RT_OVERRIDE;
78 HRESULT setExclusiveHwVirt(BOOL aExclusiveHwVirt) RT_OVERRIDE;
79 HRESULT getSupportedParavirtProviders(std::vector<ParavirtProvider_T> &aSupportedParavirtProviders) RT_OVERRIDE;
80 HRESULT getSupportedFirmwareTypes(std::vector<FirmwareType_T> &aSupportedFirmwareTypes) RT_OVERRIDE;
81 HRESULT getSupportedGraphicsControllerTypes(std::vector<GraphicsControllerType_T> &aSupportedGraphicsControllerTypes) RT_OVERRIDE;
82 HRESULT getSupportedGuestOSTypes(std::vector<ComPtr<IGuestOSType> > &aSupportedGuestOSTypes) RT_OVERRIDE;
83 HRESULT getSupportedNetAdpPromiscModePols(std::vector<NetworkAdapterPromiscModePolicy_T> &aSupportedNetworkAdapterPromiscModePolicies) RT_OVERRIDE;
84 HRESULT getSupportedNetworkAdapterTypes(std::vector<NetworkAdapterType_T> &aSupportedNetworkAdapterTypes) RT_OVERRIDE;
85 HRESULT getSupportedUartTypes(std::vector<UartType_T> &aSupportedUartTypes) RT_OVERRIDE;
86 HRESULT getSupportedUSBControllerTypes(std::vector<USBControllerType_T> &aSupportedUSBControllerTypes) RT_OVERRIDE;
87 HRESULT getSupportedAudioControllerTypes(std::vector<AudioControllerType_T> &aSupportedAudioControllerTypes) RT_OVERRIDE;
88 HRESULT getSupportedBootDevices(std::vector<DeviceType_T> &aSupportedBootDevices) RT_OVERRIDE;
89 HRESULT getSupportedStorageBuses(std::vector<StorageBus_T> &aSupportedStorageBuses) RT_OVERRIDE;
90 HRESULT getSupportedStorageControllerTypes(std::vector<StorageControllerType_T> &aSupportedStorageControllerTypes) RT_OVERRIDE;
91 HRESULT getSupportedChipsetTypes(std::vector<ChipsetType_T> &aSupportedChipsetTypes) RT_OVERRIDE;
92 HRESULT getSupportedIommuTypes(std::vector<IommuType_T> &aSupportedIommuTypes) RT_OVERRIDE;
93 HRESULT getSupportedTpmTypes(std::vector<TpmType_T> &aSupportedTpmTypes) RT_OVERRIDE;
94
95 // wrapped IPlatformProperties methods
96 HRESULT getMaxNetworkAdapters(ChipsetType_T aChipset,
97 ULONG *aMaxNetworkAdapters) RT_OVERRIDE;
98 HRESULT getMaxNetworkAdaptersOfType(ChipsetType_T aChipset,
99 NetworkAttachmentType_T aType,
100 ULONG *aMaxNetworkAdapters) RT_OVERRIDE;
101 HRESULT getMaxDevicesPerPortForStorageBus(StorageBus_T aBus,
102 ULONG *aMaxDevicesPerPort) RT_OVERRIDE;
103 HRESULT getMinPortCountForStorageBus(StorageBus_T aBus,
104 ULONG *aMinPortCount) RT_OVERRIDE;
105 HRESULT getMaxPortCountForStorageBus(StorageBus_T aBus,
106 ULONG *aMaxPortCount) RT_OVERRIDE;
107 HRESULT getMaxInstancesOfStorageBus(ChipsetType_T aChipset,
108 StorageBus_T aBus,
109 ULONG *aMaxInstances) RT_OVERRIDE;
110 HRESULT getDeviceTypesForStorageBus(StorageBus_T aBus,
111 std::vector<DeviceType_T> &aDeviceTypes) RT_OVERRIDE;
112 HRESULT getStorageBusForControllerType(StorageControllerType_T aStorageControllerType,
113 StorageBus_T *aStorageBus) RT_OVERRIDE;
114 HRESULT getStorageControllerTypesForBus(StorageBus_T aStorageBus,
115 std::vector<StorageControllerType_T> &aStorageControllerTypes) RT_OVERRIDE;
116 HRESULT getStorageControllerHotplugCapable(StorageControllerType_T aControllerType,
117 BOOL *aHotplugCapable) RT_OVERRIDE;
118 HRESULT getMaxInstancesOfUSBControllerType(ChipsetType_T aChipset,
119 USBControllerType_T aType,
120 ULONG *aMaxInstances) RT_OVERRIDE;
121
122 VirtualBox * const mParent;
123 /** Platform architecture the properties are for. */
124 PlatformArchitecture_T mPlatformArchitecture;
125 /** Flag set to \c true if this instance handles platform properties
126 * for the host, or set to \c false for guests. */
127 bool const mfIsHost;
128
129 // Data
130
131 settings::PlatformProperties *m;
132};
133
134#endif /* !MAIN_INCLUDED_PlatformPropertiesImpl_h */
135
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use