VirtualBox

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

Last change on this file since 34575 was 34244, checked in by vboxsync, 14 years ago

Main,Config.kmk,VBoxManage,ExtPacks: Moved the VRDE bits from IVirtualBox to the extension packs; changed ISystemProperties and IVRDEServer to talk about VRDE extension packs instead of VRDE libraries.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.5 KB
Line 
1/* $Id: SystemPropertiesImpl.h 34244 2010-11-22 14:31:02Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2006-2010 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 "VirtualBoxBase.h"
24#include "MediumFormatImpl.h"
25
26#include <VBox/com/array.h>
27
28#include <list>
29
30namespace settings
31{
32 struct SystemProperties;
33}
34
35class ATL_NO_VTABLE SystemProperties :
36 public VirtualBoxBase,
37 VBOX_SCRIPTABLE_IMPL(ISystemProperties)
38{
39public:
40
41 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(SystemProperties, ISystemProperties)
42
43 DECLARE_NOT_AGGREGATABLE(SystemProperties)
44
45 DECLARE_PROTECT_FINAL_CONSTRUCT()
46
47 BEGIN_COM_MAP(SystemProperties)
48 COM_INTERFACE_ENTRY(ISupportErrorInfo)
49 COM_INTERFACE_ENTRY(ISystemProperties)
50 COM_INTERFACE_ENTRY2(IDispatch, ISystemProperties)
51 END_COM_MAP()
52
53 DECLARE_EMPTY_CTOR_DTOR(SystemProperties)
54
55 HRESULT FinalConstruct();
56 void FinalRelease();
57
58 // public initializer/uninitializer for internal purposes only
59 HRESULT init(VirtualBox *aParent);
60 void uninit();
61
62 // ISystemProperties properties
63 STDMETHOD(COMGETTER(MinGuestRAM))(ULONG *minRAM);
64 STDMETHOD(COMGETTER(MaxGuestRAM))(ULONG *maxRAM);
65 STDMETHOD(COMGETTER(MinGuestVRAM))(ULONG *minVRAM);
66 STDMETHOD(COMGETTER(MaxGuestVRAM))(ULONG *maxVRAM);
67 STDMETHOD(COMGETTER(MinGuestCPUCount))(ULONG *minCPUCount);
68 STDMETHOD(COMGETTER(MaxGuestCPUCount))(ULONG *maxCPUCount);
69 STDMETHOD(COMGETTER(MaxGuestMonitors))(ULONG *maxMonitors);
70 STDMETHOD(COMGETTER(InfoVDSize))(LONG64 *infoVDSize);
71 STDMETHOD(COMGETTER(NetworkAdapterCount))(ULONG *count);
72 STDMETHOD(COMGETTER(SerialPortCount))(ULONG *count);
73 STDMETHOD(COMGETTER(ParallelPortCount))(ULONG *count);
74 STDMETHOD(COMGETTER(MaxBootPosition))(ULONG *aMaxBootPosition);
75 STDMETHOD(COMGETTER(DefaultMachineFolder))(BSTR *aDefaultMachineFolder);
76 STDMETHOD(COMSETTER(DefaultMachineFolder))(IN_BSTR aDefaultMachineFolder);
77 STDMETHOD(COMGETTER(MediumFormats))(ComSafeArrayOut(IMediumFormat *, aMediumFormats));
78 STDMETHOD(COMGETTER(DefaultHardDiskFormat))(BSTR *aDefaultHardDiskFormat);
79 STDMETHOD(COMSETTER(DefaultHardDiskFormat))(IN_BSTR aDefaultHardDiskFormat);
80 STDMETHOD(COMGETTER(FreeDiskSpaceWarning))(LONG64 *aFreeDiskSpace);
81 STDMETHOD(COMSETTER(FreeDiskSpaceWarning))(LONG64 aFreeDiskSpace);
82 STDMETHOD(COMGETTER(FreeDiskSpacePercentWarning))(ULONG *aFreeDiskSpacePercent);
83 STDMETHOD(COMSETTER(FreeDiskSpacePercentWarning))(ULONG aFreeDiskSpacePercent);
84 STDMETHOD(COMGETTER(FreeDiskSpaceError))(LONG64 *aFreeDiskSpace);
85 STDMETHOD(COMSETTER(FreeDiskSpaceError))(LONG64 aFreeDiskSpace);
86 STDMETHOD(COMGETTER(FreeDiskSpacePercentError))(ULONG *aFreeDiskSpacePercent);
87 STDMETHOD(COMSETTER(FreeDiskSpacePercentError))(ULONG aFreeDiskSpacePercent);
88 STDMETHOD(COMGETTER(VRDEAuthLibrary))(BSTR *aVRDEAuthLibrary);
89 STDMETHOD(COMSETTER(VRDEAuthLibrary))(IN_BSTR aVRDEAuthLibrary);
90 STDMETHOD(COMGETTER(WebServiceAuthLibrary))(BSTR *aWebServiceAuthLibrary);
91 STDMETHOD(COMSETTER(WebServiceAuthLibrary))(IN_BSTR aWebServiceAuthLibrary);
92 STDMETHOD(COMGETTER(DefaultVRDEExtPack))(BSTR *aExtPack);
93 STDMETHOD(COMSETTER(DefaultVRDEExtPack))(IN_BSTR aExtPack);
94 STDMETHOD(COMGETTER(LogHistoryCount))(ULONG *count);
95 STDMETHOD(COMSETTER(LogHistoryCount))(ULONG count);
96 STDMETHOD(COMGETTER(DefaultAudioDriver))(AudioDriverType_T *aAudioDriver);
97
98 STDMETHOD(GetMaxDevicesPerPortForStorageBus)(StorageBus_T aBus, ULONG *aMaxDevicesPerPort);
99 STDMETHOD(GetMinPortCountForStorageBus)(StorageBus_T aBus, ULONG *aMinPortCount);
100 STDMETHOD(GetMaxPortCountForStorageBus)(StorageBus_T aBus, ULONG *aMaxPortCount);
101 STDMETHOD(GetMaxInstancesOfStorageBus)(ChipsetType_T aChipset, StorageBus_T aBus, ULONG *aMaxInstances);
102 STDMETHOD(GetDeviceTypesForStorageBus)(StorageBus_T aBus, ComSafeArrayOut(DeviceType_T, aDeviceTypes));
103 STDMETHOD(GetDefaultIoCacheSettingForStorageController)(StorageControllerType_T aControllerType, BOOL *aEnabled);
104
105 // public methods only for internal purposes
106
107 HRESULT loadSettings(const settings::SystemProperties &data);
108 HRESULT saveSettings(settings::SystemProperties &data);
109
110 ComObjPtr<MediumFormat> mediumFormat(const Utf8Str &aFormat);
111 ComObjPtr<MediumFormat> mediumFormatFromExtension(const Utf8Str &aExt);
112
113 // public methods for internal purposes only
114 // (ensure there is a caller and a read lock before calling them!)
115
116private:
117
118 typedef std::list<ComObjPtr<MediumFormat> > MediumFormatList;
119
120 HRESULT getUserHomeDirectory(Utf8Str &strPath);
121 HRESULT setDefaultMachineFolder(const Utf8Str &aPath);
122 HRESULT setDefaultHardDiskFormat(const Utf8Str &aFormat);
123
124 HRESULT setVRDEAuthLibrary(const Utf8Str &aPath);
125 HRESULT setWebServiceAuthLibrary(const Utf8Str &aPath);
126 HRESULT setDefaultVRDEExtPack(const Utf8Str &aPath);
127
128 VirtualBox * const mParent;
129
130 settings::SystemProperties *m;
131
132 MediumFormatList m_llMediumFormats;
133
134 friend class VirtualBox;
135};
136
137#endif // ____H_SYSTEMPROPERTIESIMPL
138/* 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