VirtualBox

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

Last change on this file since 55883 was 52596, checked in by vboxsync, 10 years ago

Storage/VD + Main/ExtPackManager+VirtualBox+SystemProperties: restructure previous change to fit better into the extpack design (using existing hooks) by using two new extpack helper functions

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.0 KB
Line 
1/* $Id: SystemPropertiesImpl.h 52596 2014-09-04 16:45:50Z 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 getExclusiveHwVirt(BOOL *aExclusiveHwVirt);
73 HRESULT setExclusiveHwVirt(BOOL aExclusiveHwVirt);
74 HRESULT getDefaultMachineFolder(com::Utf8Str &aDefaultMachineFolder);
75 HRESULT setDefaultMachineFolder(const com::Utf8Str &aDefaultMachineFolder);
76 HRESULT getLoggingLevel(com::Utf8Str &aLoggingLevel);
77 HRESULT setLoggingLevel(const com::Utf8Str &aLoggingLevel);
78 HRESULT getMediumFormats(std::vector<ComPtr<IMediumFormat> > &aMediumFormats);
79 HRESULT getDefaultHardDiskFormat(com::Utf8Str &aDefaultHardDiskFormat);
80 HRESULT setDefaultHardDiskFormat(const com::Utf8Str &aDefaultHardDiskFormat);
81 HRESULT getFreeDiskSpaceWarning(LONG64 *aFreeDiskSpaceWarning);
82 HRESULT setFreeDiskSpaceWarning(LONG64 aFreeDiskSpaceWarning);
83 HRESULT getFreeDiskSpacePercentWarning(ULONG *aFreeDiskSpacePercentWarning);
84 HRESULT setFreeDiskSpacePercentWarning(ULONG aFreeDiskSpacePercentWarning);
85 HRESULT getFreeDiskSpaceError(LONG64 *aFreeDiskSpaceError);
86 HRESULT setFreeDiskSpaceError(LONG64 aFreeDiskSpaceError);
87 HRESULT getFreeDiskSpacePercentError(ULONG *aFreeDiskSpacePercentError);
88 HRESULT setFreeDiskSpacePercentError(ULONG aFreeDiskSpacePercentError);
89 HRESULT getVRDEAuthLibrary(com::Utf8Str &aVRDEAuthLibrary);
90 HRESULT setVRDEAuthLibrary(const com::Utf8Str &aVRDEAuthLibrary);
91 HRESULT getWebServiceAuthLibrary(com::Utf8Str &aWebServiceAuthLibrary);
92 HRESULT setWebServiceAuthLibrary(const com::Utf8Str &aWebServiceAuthLibrary);
93 HRESULT getDefaultVRDEExtPack(com::Utf8Str &aDefaultVRDEExtPack);
94 HRESULT setDefaultVRDEExtPack(const com::Utf8Str &aDefaultVRDEExtPack);
95 HRESULT getLogHistoryCount(ULONG *aLogHistoryCount);
96 HRESULT setLogHistoryCount(ULONG aLogHistoryCount);
97 HRESULT getDefaultAudioDriver(AudioDriverType_T *aDefaultAudioDriver);
98 HRESULT getAutostartDatabasePath(com::Utf8Str &aAutostartDatabasePath);
99 HRESULT setAutostartDatabasePath(const com::Utf8Str &aAutostartDatabasePath);
100 HRESULT getDefaultAdditionsISO(com::Utf8Str &aDefaultAdditionsISO);
101 HRESULT setDefaultAdditionsISO(const com::Utf8Str &aDefaultAdditionsISO);
102 HRESULT getDefaultFrontend(com::Utf8Str &aDefaultFrontend);
103 HRESULT setDefaultFrontend(const com::Utf8Str &aDefaultFrontend);
104 HRESULT getScreenShotFormats(std::vector<BitmapFormat_T> &aScreenShotFormats);
105
106 // wrapped ISystemProperties methods
107 HRESULT getMaxNetworkAdapters(ChipsetType_T aChipset,
108 ULONG *aMaxNetworkAdapters);
109 HRESULT getMaxNetworkAdaptersOfType(ChipsetType_T aChipset,
110 NetworkAttachmentType_T aType,
111 ULONG *aMaxNetworkAdapters);
112 HRESULT getMaxDevicesPerPortForStorageBus(StorageBus_T aBus,
113 ULONG *aMaxDevicesPerPort);
114 HRESULT getMinPortCountForStorageBus(StorageBus_T aBus,
115 ULONG *aMinPortCount);
116 HRESULT getMaxPortCountForStorageBus(StorageBus_T aBus,
117 ULONG *aMaxPortCount);
118 HRESULT getMaxInstancesOfStorageBus(ChipsetType_T aChipset,
119 StorageBus_T aBus,
120 ULONG *aMaxInstances);
121 HRESULT getDeviceTypesForStorageBus(StorageBus_T aBus,
122 std::vector<DeviceType_T> &aDeviceTypes);
123 HRESULT getDefaultIoCacheSettingForStorageController(StorageControllerType_T aControllerType,
124 BOOL *aEnabled);
125 HRESULT getStorageControllerHotplugCapable(StorageControllerType_T aControllerType,
126 BOOL *aHotplugCapable);
127 HRESULT getMaxInstancesOfUSBControllerType(ChipsetType_T aChipset,
128 USBControllerType_T aType,
129 ULONG *aMaxInstances);
130
131 HRESULT i_getUserHomeDirectory(Utf8Str &strPath);
132 HRESULT i_setDefaultMachineFolder(const Utf8Str &strPath);
133 HRESULT i_setLoggingLevel(const com::Utf8Str &aLoggingLevel);
134 HRESULT i_setDefaultHardDiskFormat(const com::Utf8Str &aFormat);
135 HRESULT i_setVRDEAuthLibrary(const com::Utf8Str &aPath);
136
137 HRESULT i_setWebServiceAuthLibrary(const com::Utf8Str &aPath);
138 HRESULT i_setDefaultVRDEExtPack(const com::Utf8Str &aExtPack);
139 HRESULT i_setAutostartDatabasePath(const com::Utf8Str &aPath);
140 HRESULT i_setDefaultAdditionsISO(const com::Utf8Str &aPath);
141 HRESULT i_setDefaultFrontend(const com::Utf8Str &aDefaultFrontend);
142
143 VirtualBox * const mParent;
144
145 settings::SystemProperties *m;
146
147 MediumFormatList m_llMediumFormats;
148
149 friend class VirtualBox;
150};
151
152#endif // ____H_SYSTEMPROPERTIESIMPL
153/* 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