1 | /* $Id: SystemPropertiesImpl.h 74431 2018-09-24 09:16:17Z vboxsync $ */
|
---|
2 |
|
---|
3 | /** @file
|
---|
4 | *
|
---|
5 | * VirtualBox COM class implementation
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * Copyright (C) 2006-2017 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 ____H_SYSTEMPROPERTIESIMPL
|
---|
21 | #define ____H_SYSTEMPROPERTIESIMPL
|
---|
22 |
|
---|
23 | #include "MediumFormatImpl.h"
|
---|
24 | #include "SystemPropertiesWrap.h"
|
---|
25 |
|
---|
26 |
|
---|
27 | namespace settings
|
---|
28 | {
|
---|
29 | struct SystemProperties;
|
---|
30 | }
|
---|
31 |
|
---|
32 | class ATL_NO_VTABLE SystemProperties :
|
---|
33 | public SystemPropertiesWrap
|
---|
34 | {
|
---|
35 | public:
|
---|
36 | typedef std::list<ComObjPtr<MediumFormat> > MediumFormatList;
|
---|
37 |
|
---|
38 | DECLARE_EMPTY_CTOR_DTOR(SystemProperties)
|
---|
39 |
|
---|
40 | HRESULT FinalConstruct();
|
---|
41 | void FinalRelease();
|
---|
42 |
|
---|
43 | // public initializer/uninitializer for internal purposes only
|
---|
44 | HRESULT init(VirtualBox *aParent);
|
---|
45 | void uninit();
|
---|
46 |
|
---|
47 | // public methods for internal purposes only
|
---|
48 | // (ensure there is a caller and a read lock before calling them!)
|
---|
49 | HRESULT i_loadSettings(const settings::SystemProperties &data);
|
---|
50 | HRESULT i_saveSettings(settings::SystemProperties &data);
|
---|
51 |
|
---|
52 | ComObjPtr<MediumFormat> i_mediumFormat(const Utf8Str &aFormat);
|
---|
53 | ComObjPtr<MediumFormat> i_mediumFormatFromExtension(const Utf8Str &aExt);
|
---|
54 |
|
---|
55 | int i_loadVDPlugin(const char *pszPluginLibrary);
|
---|
56 | int i_unloadVDPlugin(const char *pszPluginLibrary);
|
---|
57 |
|
---|
58 | HRESULT i_getDefaultAdditionsISO(com::Utf8Str &aDefaultAdditionsISO);
|
---|
59 |
|
---|
60 | private:
|
---|
61 |
|
---|
62 | // wrapped ISystemProperties properties
|
---|
63 | HRESULT getMinGuestRAM(ULONG *aMinGuestRAM);
|
---|
64 | HRESULT getMaxGuestRAM(ULONG *aMaxGuestRAM);
|
---|
65 | HRESULT getMinGuestVRAM(ULONG *aMinGuestVRAM);
|
---|
66 | HRESULT getMaxGuestVRAM(ULONG *aMaxGuestVRAM);
|
---|
67 | HRESULT getMinGuestCPUCount(ULONG *aMinGuestCPUCount);
|
---|
68 | HRESULT getMaxGuestCPUCount(ULONG *aMaxGuestCPUCount);
|
---|
69 | HRESULT getMaxGuestMonitors(ULONG *aMaxGuestMonitors);
|
---|
70 | HRESULT getInfoVDSize(LONG64 *aInfoVDSize);
|
---|
71 | HRESULT getSerialPortCount(ULONG *aSerialPortCount);
|
---|
72 | HRESULT getParallelPortCount(ULONG *aParallelPortCount);
|
---|
73 | HRESULT getMaxBootPosition(ULONG *aMaxBootPosition);
|
---|
74 | HRESULT getRawModeSupported(BOOL *aRawModeSupported);
|
---|
75 | HRESULT getExclusiveHwVirt(BOOL *aExclusiveHwVirt);
|
---|
76 | HRESULT setExclusiveHwVirt(BOOL aExclusiveHwVirt);
|
---|
77 | HRESULT getDefaultMachineFolder(com::Utf8Str &aDefaultMachineFolder);
|
---|
78 | HRESULT setDefaultMachineFolder(const com::Utf8Str &aDefaultMachineFolder);
|
---|
79 | HRESULT getLoggingLevel(com::Utf8Str &aLoggingLevel);
|
---|
80 | HRESULT setLoggingLevel(const com::Utf8Str &aLoggingLevel);
|
---|
81 | HRESULT getMediumFormats(std::vector<ComPtr<IMediumFormat> > &aMediumFormats);
|
---|
82 | HRESULT getDefaultHardDiskFormat(com::Utf8Str &aDefaultHardDiskFormat);
|
---|
83 | HRESULT setDefaultHardDiskFormat(const com::Utf8Str &aDefaultHardDiskFormat);
|
---|
84 | HRESULT getFreeDiskSpaceWarning(LONG64 *aFreeDiskSpaceWarning);
|
---|
85 | HRESULT setFreeDiskSpaceWarning(LONG64 aFreeDiskSpaceWarning);
|
---|
86 | HRESULT getFreeDiskSpacePercentWarning(ULONG *aFreeDiskSpacePercentWarning);
|
---|
87 | HRESULT setFreeDiskSpacePercentWarning(ULONG aFreeDiskSpacePercentWarning);
|
---|
88 | HRESULT getFreeDiskSpaceError(LONG64 *aFreeDiskSpaceError);
|
---|
89 | HRESULT setFreeDiskSpaceError(LONG64 aFreeDiskSpaceError);
|
---|
90 | HRESULT getFreeDiskSpacePercentError(ULONG *aFreeDiskSpacePercentError);
|
---|
91 | HRESULT setFreeDiskSpacePercentError(ULONG aFreeDiskSpacePercentError);
|
---|
92 | HRESULT getVRDEAuthLibrary(com::Utf8Str &aVRDEAuthLibrary);
|
---|
93 | HRESULT setVRDEAuthLibrary(const com::Utf8Str &aVRDEAuthLibrary);
|
---|
94 | HRESULT getWebServiceAuthLibrary(com::Utf8Str &aWebServiceAuthLibrary);
|
---|
95 | HRESULT setWebServiceAuthLibrary(const com::Utf8Str &aWebServiceAuthLibrary);
|
---|
96 | HRESULT getDefaultVRDEExtPack(com::Utf8Str &aDefaultVRDEExtPack);
|
---|
97 | HRESULT setDefaultVRDEExtPack(const com::Utf8Str &aDefaultVRDEExtPack);
|
---|
98 | HRESULT getLogHistoryCount(ULONG *aLogHistoryCount);
|
---|
99 | HRESULT setLogHistoryCount(ULONG aLogHistoryCount);
|
---|
100 | HRESULT getDefaultAudioDriver(AudioDriverType_T *aDefaultAudioDriver);
|
---|
101 | HRESULT getAutostartDatabasePath(com::Utf8Str &aAutostartDatabasePath);
|
---|
102 | HRESULT setAutostartDatabasePath(const com::Utf8Str &aAutostartDatabasePath);
|
---|
103 | HRESULT getDefaultAdditionsISO(com::Utf8Str &aDefaultAdditionsISO);
|
---|
104 | HRESULT setDefaultAdditionsISO(const com::Utf8Str &aDefaultAdditionsISO);
|
---|
105 | HRESULT getDefaultFrontend(com::Utf8Str &aDefaultFrontend);
|
---|
106 | HRESULT setDefaultFrontend(const com::Utf8Str &aDefaultFrontend);
|
---|
107 | HRESULT getScreenShotFormats(std::vector<BitmapFormat_T> &aScreenShotFormats);
|
---|
108 | HRESULT getProxyMode(ProxyMode_T *pProxyMode);
|
---|
109 | HRESULT setProxyMode(ProxyMode_T aProxyMode);
|
---|
110 | HRESULT getProxyURL(com::Utf8Str &aProxyURL);
|
---|
111 | HRESULT setProxyURL(const com::Utf8Str &aProxyURL);
|
---|
112 |
|
---|
113 | // wrapped ISystemProperties methods
|
---|
114 | HRESULT getMaxNetworkAdapters(ChipsetType_T aChipset,
|
---|
115 | ULONG *aMaxNetworkAdapters);
|
---|
116 | HRESULT getMaxNetworkAdaptersOfType(ChipsetType_T aChipset,
|
---|
117 | NetworkAttachmentType_T aType,
|
---|
118 | ULONG *aMaxNetworkAdapters);
|
---|
119 | HRESULT getMaxDevicesPerPortForStorageBus(StorageBus_T aBus,
|
---|
120 | ULONG *aMaxDevicesPerPort);
|
---|
121 | HRESULT getMinPortCountForStorageBus(StorageBus_T aBus,
|
---|
122 | ULONG *aMinPortCount);
|
---|
123 | HRESULT getMaxPortCountForStorageBus(StorageBus_T aBus,
|
---|
124 | ULONG *aMaxPortCount);
|
---|
125 | HRESULT getMaxInstancesOfStorageBus(ChipsetType_T aChipset,
|
---|
126 | StorageBus_T aBus,
|
---|
127 | ULONG *aMaxInstances);
|
---|
128 | HRESULT getDeviceTypesForStorageBus(StorageBus_T aBus,
|
---|
129 | std::vector<DeviceType_T> &aDeviceTypes);
|
---|
130 | HRESULT getDefaultIoCacheSettingForStorageController(StorageControllerType_T aControllerType,
|
---|
131 | BOOL *aEnabled);
|
---|
132 | HRESULT getStorageControllerHotplugCapable(StorageControllerType_T aControllerType,
|
---|
133 | BOOL *aHotplugCapable);
|
---|
134 | HRESULT getMaxInstancesOfUSBControllerType(ChipsetType_T aChipset,
|
---|
135 | USBControllerType_T aType,
|
---|
136 | ULONG *aMaxInstances);
|
---|
137 |
|
---|
138 | HRESULT i_getUserHomeDirectory(Utf8Str &strPath);
|
---|
139 | HRESULT i_setDefaultMachineFolder(const Utf8Str &strPath);
|
---|
140 | HRESULT i_setLoggingLevel(const com::Utf8Str &aLoggingLevel);
|
---|
141 | HRESULT i_setDefaultHardDiskFormat(const com::Utf8Str &aFormat);
|
---|
142 | HRESULT i_setVRDEAuthLibrary(const com::Utf8Str &aPath);
|
---|
143 |
|
---|
144 | HRESULT i_setWebServiceAuthLibrary(const com::Utf8Str &aPath);
|
---|
145 | HRESULT i_setDefaultVRDEExtPack(const com::Utf8Str &aExtPack);
|
---|
146 | HRESULT i_setAutostartDatabasePath(const com::Utf8Str &aPath);
|
---|
147 | HRESULT i_setDefaultAdditionsISO(const com::Utf8Str &aPath);
|
---|
148 | HRESULT i_setDefaultFrontend(const com::Utf8Str &aDefaultFrontend);
|
---|
149 |
|
---|
150 | VirtualBox * const mParent;
|
---|
151 |
|
---|
152 | settings::SystemProperties *m;
|
---|
153 |
|
---|
154 | MediumFormatList m_llMediumFormats;
|
---|
155 |
|
---|
156 | friend class VirtualBox;
|
---|
157 | };
|
---|
158 |
|
---|
159 | #endif // ____H_SYSTEMPROPERTIESIMPL
|
---|
160 | /* vi: set tabstop=4 shiftwidth=4 expandtab: */
|
---|