VirtualBox

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

Last change on this file since 61644 was 56372, checked in by vboxsync, 10 years ago

ISystemProperties: Added rawModeSupported attribute for querying whether VBOX_WITH_RAW_MODE was defined in the build or not.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.1 KB
Line 
1/* $Id: SystemPropertiesImpl.h 56372 2015-06-11 18:13:21Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2006-2014 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
27namespace settings
28{
29 struct SystemProperties;
30}
31
32class ATL_NO_VTABLE SystemProperties :
33 public SystemPropertiesWrap
34{
35public:
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
58private:
59
60 // wrapped ISystemProperties properties
61 HRESULT getMinGuestRAM(ULONG *aMinGuestRAM);
62 HRESULT getMaxGuestRAM(ULONG *aMaxGuestRAM);
63 HRESULT getMinGuestVRAM(ULONG *aMinGuestVRAM);
64 HRESULT getMaxGuestVRAM(ULONG *aMaxGuestVRAM);
65 HRESULT getMinGuestCPUCount(ULONG *aMinGuestCPUCount);
66 HRESULT getMaxGuestCPUCount(ULONG *aMaxGuestCPUCount);
67 HRESULT getMaxGuestMonitors(ULONG *aMaxGuestMonitors);
68 HRESULT getInfoVDSize(LONG64 *aInfoVDSize);
69 HRESULT getSerialPortCount(ULONG *aSerialPortCount);
70 HRESULT getParallelPortCount(ULONG *aParallelPortCount);
71 HRESULT getMaxBootPosition(ULONG *aMaxBootPosition);
72 HRESULT getRawModeSupported(BOOL *aRawModeSupported);
73 HRESULT getExclusiveHwVirt(BOOL *aExclusiveHwVirt);
74 HRESULT setExclusiveHwVirt(BOOL aExclusiveHwVirt);
75 HRESULT getDefaultMachineFolder(com::Utf8Str &aDefaultMachineFolder);
76 HRESULT setDefaultMachineFolder(const com::Utf8Str &aDefaultMachineFolder);
77 HRESULT getLoggingLevel(com::Utf8Str &aLoggingLevel);
78 HRESULT setLoggingLevel(const com::Utf8Str &aLoggingLevel);
79 HRESULT getMediumFormats(std::vector<ComPtr<IMediumFormat> > &aMediumFormats);
80 HRESULT getDefaultHardDiskFormat(com::Utf8Str &aDefaultHardDiskFormat);
81 HRESULT setDefaultHardDiskFormat(const com::Utf8Str &aDefaultHardDiskFormat);
82 HRESULT getFreeDiskSpaceWarning(LONG64 *aFreeDiskSpaceWarning);
83 HRESULT setFreeDiskSpaceWarning(LONG64 aFreeDiskSpaceWarning);
84 HRESULT getFreeDiskSpacePercentWarning(ULONG *aFreeDiskSpacePercentWarning);
85 HRESULT setFreeDiskSpacePercentWarning(ULONG aFreeDiskSpacePercentWarning);
86 HRESULT getFreeDiskSpaceError(LONG64 *aFreeDiskSpaceError);
87 HRESULT setFreeDiskSpaceError(LONG64 aFreeDiskSpaceError);
88 HRESULT getFreeDiskSpacePercentError(ULONG *aFreeDiskSpacePercentError);
89 HRESULT setFreeDiskSpacePercentError(ULONG aFreeDiskSpacePercentError);
90 HRESULT getVRDEAuthLibrary(com::Utf8Str &aVRDEAuthLibrary);
91 HRESULT setVRDEAuthLibrary(const com::Utf8Str &aVRDEAuthLibrary);
92 HRESULT getWebServiceAuthLibrary(com::Utf8Str &aWebServiceAuthLibrary);
93 HRESULT setWebServiceAuthLibrary(const com::Utf8Str &aWebServiceAuthLibrary);
94 HRESULT getDefaultVRDEExtPack(com::Utf8Str &aDefaultVRDEExtPack);
95 HRESULT setDefaultVRDEExtPack(const com::Utf8Str &aDefaultVRDEExtPack);
96 HRESULT getLogHistoryCount(ULONG *aLogHistoryCount);
97 HRESULT setLogHistoryCount(ULONG aLogHistoryCount);
98 HRESULT getDefaultAudioDriver(AudioDriverType_T *aDefaultAudioDriver);
99 HRESULT getAutostartDatabasePath(com::Utf8Str &aAutostartDatabasePath);
100 HRESULT setAutostartDatabasePath(const com::Utf8Str &aAutostartDatabasePath);
101 HRESULT getDefaultAdditionsISO(com::Utf8Str &aDefaultAdditionsISO);
102 HRESULT setDefaultAdditionsISO(const com::Utf8Str &aDefaultAdditionsISO);
103 HRESULT getDefaultFrontend(com::Utf8Str &aDefaultFrontend);
104 HRESULT setDefaultFrontend(const com::Utf8Str &aDefaultFrontend);
105 HRESULT getScreenShotFormats(std::vector<BitmapFormat_T> &aScreenShotFormats);
106
107 // wrapped ISystemProperties methods
108 HRESULT getMaxNetworkAdapters(ChipsetType_T aChipset,
109 ULONG *aMaxNetworkAdapters);
110 HRESULT getMaxNetworkAdaptersOfType(ChipsetType_T aChipset,
111 NetworkAttachmentType_T aType,
112 ULONG *aMaxNetworkAdapters);
113 HRESULT getMaxDevicesPerPortForStorageBus(StorageBus_T aBus,
114 ULONG *aMaxDevicesPerPort);
115 HRESULT getMinPortCountForStorageBus(StorageBus_T aBus,
116 ULONG *aMinPortCount);
117 HRESULT getMaxPortCountForStorageBus(StorageBus_T aBus,
118 ULONG *aMaxPortCount);
119 HRESULT getMaxInstancesOfStorageBus(ChipsetType_T aChipset,
120 StorageBus_T aBus,
121 ULONG *aMaxInstances);
122 HRESULT getDeviceTypesForStorageBus(StorageBus_T aBus,
123 std::vector<DeviceType_T> &aDeviceTypes);
124 HRESULT getDefaultIoCacheSettingForStorageController(StorageControllerType_T aControllerType,
125 BOOL *aEnabled);
126 HRESULT getStorageControllerHotplugCapable(StorageControllerType_T aControllerType,
127 BOOL *aHotplugCapable);
128 HRESULT getMaxInstancesOfUSBControllerType(ChipsetType_T aChipset,
129 USBControllerType_T aType,
130 ULONG *aMaxInstances);
131
132 HRESULT i_getUserHomeDirectory(Utf8Str &strPath);
133 HRESULT i_setDefaultMachineFolder(const Utf8Str &strPath);
134 HRESULT i_setLoggingLevel(const com::Utf8Str &aLoggingLevel);
135 HRESULT i_setDefaultHardDiskFormat(const com::Utf8Str &aFormat);
136 HRESULT i_setVRDEAuthLibrary(const com::Utf8Str &aPath);
137
138 HRESULT i_setWebServiceAuthLibrary(const com::Utf8Str &aPath);
139 HRESULT i_setDefaultVRDEExtPack(const com::Utf8Str &aExtPack);
140 HRESULT i_setAutostartDatabasePath(const com::Utf8Str &aPath);
141 HRESULT i_setDefaultAdditionsISO(const com::Utf8Str &aPath);
142 HRESULT i_setDefaultFrontend(const com::Utf8Str &aDefaultFrontend);
143
144 VirtualBox * const mParent;
145
146 settings::SystemProperties *m;
147
148 MediumFormatList m_llMediumFormats;
149
150 friend class VirtualBox;
151};
152
153#endif // ____H_SYSTEMPROPERTIESIMPL
154/* 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