VirtualBox

source: vbox/trunk/src/VBox/Main/include/SystemPropertiesImpl.h@ 81740

Last change on this file since 81740 was 81740, checked in by vboxsync, 5 years ago

Main/SystemProperties: shorten a few attribute names to get around dtrace probe name length limit

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 10.1 KB
Line 
1/* $Id: SystemPropertiesImpl.h 81740 2019-11-07 17:24:31Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2006-2019 Oracle Corporation
10 *
11 * This file is part of VirtualBox Open Source Edition (OSE), as
12 * available from http://www.virtualbox.org. This file is free software;
13 * you can redistribute it and/or modify it under the terms of the GNU
14 * General Public License (GPL) as published by the Free Software
15 * Foundation, in version 2 as it comes in the "COPYING" file of the
16 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
17 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
18 */
19
20#ifndef MAIN_INCLUDED_SystemPropertiesImpl_h
21#define MAIN_INCLUDED_SystemPropertiesImpl_h
22#ifndef RT_WITHOUT_PRAGMA_ONCE
23# pragma once
24#endif
25
26#include "MediumFormatImpl.h"
27#include "SystemPropertiesWrap.h"
28
29
30namespace settings
31{
32 struct SystemProperties;
33}
34
35class ATL_NO_VTABLE SystemProperties :
36 public SystemPropertiesWrap
37{
38public:
39 typedef std::list<ComObjPtr<MediumFormat> > MediumFormatList;
40
41 DECLARE_EMPTY_CTOR_DTOR(SystemProperties)
42
43 HRESULT FinalConstruct();
44 void FinalRelease();
45
46 // public initializer/uninitializer for internal purposes only
47 HRESULT init(VirtualBox *aParent);
48 void uninit();
49
50 // public methods for internal purposes only
51 // (ensure there is a caller and a read lock before calling them!)
52 HRESULT i_loadSettings(const settings::SystemProperties &data);
53 HRESULT i_saveSettings(settings::SystemProperties &data);
54
55 ComObjPtr<MediumFormat> i_mediumFormat(const Utf8Str &aFormat);
56 ComObjPtr<MediumFormat> i_mediumFormatFromExtension(const Utf8Str &aExt);
57
58 int i_loadVDPlugin(const char *pszPluginLibrary);
59 int i_unloadVDPlugin(const char *pszPluginLibrary);
60
61 HRESULT i_getDefaultAdditionsISO(com::Utf8Str &aDefaultAdditionsISO);
62
63private:
64
65 // wrapped ISystemProperties properties
66 HRESULT getMinGuestRAM(ULONG *aMinGuestRAM);
67 HRESULT getMaxGuestRAM(ULONG *aMaxGuestRAM);
68 HRESULT getMinGuestVRAM(ULONG *aMinGuestVRAM);
69 HRESULT getMaxGuestVRAM(ULONG *aMaxGuestVRAM);
70 HRESULT getMinGuestCPUCount(ULONG *aMinGuestCPUCount);
71 HRESULT getMaxGuestCPUCount(ULONG *aMaxGuestCPUCount);
72 HRESULT getMaxGuestMonitors(ULONG *aMaxGuestMonitors);
73 HRESULT getInfoVDSize(LONG64 *aInfoVDSize);
74 HRESULT getSerialPortCount(ULONG *aSerialPortCount);
75 HRESULT getParallelPortCount(ULONG *aParallelPortCount);
76 HRESULT getMaxBootPosition(ULONG *aMaxBootPosition);
77 HRESULT getRawModeSupported(BOOL *aRawModeSupported);
78 HRESULT getExclusiveHwVirt(BOOL *aExclusiveHwVirt);
79 HRESULT setExclusiveHwVirt(BOOL aExclusiveHwVirt);
80 HRESULT getDefaultMachineFolder(com::Utf8Str &aDefaultMachineFolder);
81 HRESULT setDefaultMachineFolder(const com::Utf8Str &aDefaultMachineFolder);
82 HRESULT getLoggingLevel(com::Utf8Str &aLoggingLevel);
83 HRESULT setLoggingLevel(const com::Utf8Str &aLoggingLevel);
84 HRESULT getMediumFormats(std::vector<ComPtr<IMediumFormat> > &aMediumFormats);
85 HRESULT getDefaultHardDiskFormat(com::Utf8Str &aDefaultHardDiskFormat);
86 HRESULT setDefaultHardDiskFormat(const com::Utf8Str &aDefaultHardDiskFormat);
87 HRESULT getFreeDiskSpaceWarning(LONG64 *aFreeDiskSpaceWarning);
88 HRESULT setFreeDiskSpaceWarning(LONG64 aFreeDiskSpaceWarning);
89 HRESULT getFreeDiskSpacePercentWarning(ULONG *aFreeDiskSpacePercentWarning);
90 HRESULT setFreeDiskSpacePercentWarning(ULONG aFreeDiskSpacePercentWarning);
91 HRESULT getFreeDiskSpaceError(LONG64 *aFreeDiskSpaceError);
92 HRESULT setFreeDiskSpaceError(LONG64 aFreeDiskSpaceError);
93 HRESULT getFreeDiskSpacePercentError(ULONG *aFreeDiskSpacePercentError);
94 HRESULT setFreeDiskSpacePercentError(ULONG aFreeDiskSpacePercentError);
95 HRESULT getVRDEAuthLibrary(com::Utf8Str &aVRDEAuthLibrary);
96 HRESULT setVRDEAuthLibrary(const com::Utf8Str &aVRDEAuthLibrary);
97 HRESULT getWebServiceAuthLibrary(com::Utf8Str &aWebServiceAuthLibrary);
98 HRESULT setWebServiceAuthLibrary(const com::Utf8Str &aWebServiceAuthLibrary);
99 HRESULT getDefaultVRDEExtPack(com::Utf8Str &aDefaultVRDEExtPack);
100 HRESULT setDefaultVRDEExtPack(const com::Utf8Str &aDefaultVRDEExtPack);
101 HRESULT getLogHistoryCount(ULONG *aLogHistoryCount);
102 HRESULT setLogHistoryCount(ULONG aLogHistoryCount);
103 HRESULT getDefaultAudioDriver(AudioDriverType_T *aDefaultAudioDriver);
104 HRESULT getAutostartDatabasePath(com::Utf8Str &aAutostartDatabasePath);
105 HRESULT setAutostartDatabasePath(const com::Utf8Str &aAutostartDatabasePath);
106 HRESULT getDefaultAdditionsISO(com::Utf8Str &aDefaultAdditionsISO);
107 HRESULT setDefaultAdditionsISO(const com::Utf8Str &aDefaultAdditionsISO);
108 HRESULT getDefaultFrontend(com::Utf8Str &aDefaultFrontend);
109 HRESULT setDefaultFrontend(const com::Utf8Str &aDefaultFrontend);
110 HRESULT getScreenShotFormats(std::vector<BitmapFormat_T> &aScreenShotFormats);
111 HRESULT getProxyMode(ProxyMode_T *pProxyMode);
112 HRESULT setProxyMode(ProxyMode_T aProxyMode);
113 HRESULT getProxyURL(com::Utf8Str &aProxyURL);
114 HRESULT setProxyURL(const com::Utf8Str &aProxyURL);
115 HRESULT getSupportedParavirtProviders(std::vector<ParavirtProvider_T> &aSupportedParavirtProviders);
116 HRESULT getSupportedClipboardModes(std::vector<ClipboardMode_T> &aSupportedClipboardModes);
117 HRESULT getSupportedDnDModes(std::vector<DnDMode_T> &aSupportedDnDModes);
118 HRESULT getSupportedFirmwareTypes(std::vector<FirmwareType_T> &aSupportedFirmwareTypes);
119 HRESULT getSupportedPointingHIDTypes(std::vector<PointingHIDType_T> &aSupportedPointingHIDTypes);
120 HRESULT getSupportedKeyboardHIDTypes(std::vector<KeyboardHIDType_T> &aSupportedKeyboardHIDTypes);
121 HRESULT getSupportedVFSTypes(std::vector<VFSType_T> &aSupportedVFSTypes);
122 HRESULT getSupportedImportOptions(std::vector<ImportOptions_T> &aSupportedImportOptions);
123 HRESULT getSupportedExportOptions(std::vector<ExportOptions_T> &aSupportedExportOptions);
124 HRESULT getSupportedRecordingAudioCodecs(std::vector<RecordingAudioCodec_T> &aSupportedRecordingAudioCodecs);
125 HRESULT getSupportedRecordingVideoCodecs(std::vector<RecordingVideoCodec_T> &aSupportedRecordingVideoCodecs);
126 HRESULT getSupportedRecordingVSMethods(std::vector<RecordingVideoScalingMethod_T> &aSupportedRecordingVideoScalingMethods);
127 HRESULT getSupportedRecordingVRCModes(std::vector<RecordingVideoRateControlMode_T> &aSupportedRecordingVideoRateControlModes);
128 HRESULT getSupportedGraphicsControllerTypes(std::vector<GraphicsControllerType_T> &aSupportedGraphicsControllerTypes);
129 HRESULT getSupportedCloneOptions(std::vector<CloneOptions_T> &aSupportedCloneOptions);
130 HRESULT getSupportedAutostopTypes(std::vector<AutostopType_T> &aSupportedAutostopTypes);
131 HRESULT getSupportedVMProcPriorities(std::vector<VMProcPriority_T> &aSupportedVMProcPriorities);
132 HRESULT getSupportedNetworkAttachmentTypes(std::vector<NetworkAttachmentType_T> &aSupportedNetworkAttachmentTypes);
133 HRESULT getSupportedNetworkAdapterTypes(std::vector<NetworkAdapterType_T> &aSupportedNetworkAdapterTypes);
134 HRESULT getSupportedPortModes(std::vector<PortMode_T> &aSupportedPortModes);
135 HRESULT getSupportedUartTypes(std::vector<UartType_T> &aSupportedUartTypes);
136 HRESULT getSupportedUSBControllerTypes(std::vector<USBControllerType_T> &aSupportedUSBControllerTypes);
137 HRESULT getSupportedAudioDriverTypes(std::vector<AudioDriverType_T> &aSupportedAudioDriverTypes);
138 HRESULT getSupportedAudioControllerTypes(std::vector<AudioControllerType_T> &aSupportedAudioControllerTypes);
139 HRESULT getSupportedStorageBuses(std::vector<StorageBus_T> &aSupportedStorageBuses);
140 HRESULT getSupportedStorageControllerTypes(std::vector<StorageControllerType_T> &aSupportedStorageControllerTypes);
141 HRESULT getSupportedChipsetTypes(std::vector<ChipsetType_T> &aSupportedChipsetTypes);
142
143 // wrapped ISystemProperties methods
144 HRESULT getMaxNetworkAdapters(ChipsetType_T aChipset,
145 ULONG *aMaxNetworkAdapters);
146 HRESULT getMaxNetworkAdaptersOfType(ChipsetType_T aChipset,
147 NetworkAttachmentType_T aType,
148 ULONG *aMaxNetworkAdapters);
149 HRESULT getMaxDevicesPerPortForStorageBus(StorageBus_T aBus,
150 ULONG *aMaxDevicesPerPort);
151 HRESULT getMinPortCountForStorageBus(StorageBus_T aBus,
152 ULONG *aMinPortCount);
153 HRESULT getMaxPortCountForStorageBus(StorageBus_T aBus,
154 ULONG *aMaxPortCount);
155 HRESULT getMaxInstancesOfStorageBus(ChipsetType_T aChipset,
156 StorageBus_T aBus,
157 ULONG *aMaxInstances);
158 HRESULT getDeviceTypesForStorageBus(StorageBus_T aBus,
159 std::vector<DeviceType_T> &aDeviceTypes);
160 HRESULT getDefaultIoCacheSettingForStorageController(StorageControllerType_T aControllerType,
161 BOOL *aEnabled);
162 HRESULT getStorageControllerHotplugCapable(StorageControllerType_T aControllerType,
163 BOOL *aHotplugCapable);
164 HRESULT getMaxInstancesOfUSBControllerType(ChipsetType_T aChipset,
165 USBControllerType_T aType,
166 ULONG *aMaxInstances);
167
168 HRESULT i_getUserHomeDirectory(Utf8Str &strPath);
169 HRESULT i_setDefaultMachineFolder(const Utf8Str &strPath);
170 HRESULT i_setLoggingLevel(const com::Utf8Str &aLoggingLevel);
171 HRESULT i_setDefaultHardDiskFormat(const com::Utf8Str &aFormat);
172 HRESULT i_setVRDEAuthLibrary(const com::Utf8Str &aPath);
173
174 HRESULT i_setWebServiceAuthLibrary(const com::Utf8Str &aPath);
175 HRESULT i_setDefaultVRDEExtPack(const com::Utf8Str &aExtPack);
176 HRESULT i_setAutostartDatabasePath(const com::Utf8Str &aPath);
177 HRESULT i_setDefaultAdditionsISO(const com::Utf8Str &aPath);
178 HRESULT i_setDefaultFrontend(const com::Utf8Str &aDefaultFrontend);
179
180 VirtualBox * const mParent;
181
182 settings::SystemProperties *m;
183
184 MediumFormatList m_llMediumFormats;
185
186 friend class VirtualBox;
187};
188
189#endif /* !MAIN_INCLUDED_SystemPropertiesImpl_h */
190/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette