VirtualBox

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

Last change on this file since 12474 was 8155, checked in by vboxsync, 17 years ago

The Big Sun Rebranding Header Change

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.5 KB
Line 
1/* $Id: SystemPropertiesImpl.h 8155 2008-04-18 15:16:47Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
20 * Clara, CA 95054 USA or visit http://www.sun.com if you need
21 * additional information or have any questions.
22 */
23
24#ifndef ____H_SYSTEMPROPERTIESIMPL
25#define ____H_SYSTEMPROPERTIESIMPL
26
27#include "VirtualBoxBase.h"
28
29class VirtualBox;
30
31class ATL_NO_VTABLE SystemProperties :
32 public VirtualBoxSupportErrorInfoImpl <SystemProperties, ISystemProperties>,
33 public VirtualBoxSupportTranslation <SystemProperties>,
34 public VirtualBoxBase,
35 public ISystemProperties
36{
37public:
38
39 DECLARE_NOT_AGGREGATABLE(SystemProperties)
40
41 DECLARE_PROTECT_FINAL_CONSTRUCT()
42
43 BEGIN_COM_MAP(SystemProperties)
44 COM_INTERFACE_ENTRY(ISupportErrorInfo)
45 COM_INTERFACE_ENTRY(ISystemProperties)
46 END_COM_MAP()
47
48 NS_DECL_ISUPPORTS
49
50 HRESULT FinalConstruct();
51 void FinalRelease();
52
53 // public initializer/uninitializer for internal purposes only
54 HRESULT init (VirtualBox *aParent);
55 void uninit();
56
57 // ISystemProperties properties
58 STDMETHOD(COMGETTER(MinGuestRAM) (ULONG *minRAM));
59 STDMETHOD(COMGETTER(MaxGuestRAM) (ULONG *maxRAM));
60 STDMETHOD(COMGETTER(MinGuestVRAM) (ULONG *minVRAM));
61 STDMETHOD(COMGETTER(MaxGuestVRAM) (ULONG *maxVRAM));
62 STDMETHOD(COMGETTER(MaxGuestMonitors) (ULONG *maxMonitors));
63 STDMETHOD(COMGETTER(MaxVDISize) (ULONG64 *maxVDISize));
64 STDMETHOD(COMGETTER(NetworkAdapterCount) (ULONG *count));
65 STDMETHOD(COMGETTER(SerialPortCount) (ULONG *count));
66 STDMETHOD(COMGETTER(ParallelPortCount) (ULONG *count));
67 STDMETHOD(COMGETTER(MaxBootPosition) (ULONG *aMaxBootPosition));
68 STDMETHOD(COMGETTER(DefaultVDIFolder)) (BSTR *aDefaultVDIFolder);
69 STDMETHOD(COMSETTER(DefaultVDIFolder)) (INPTR BSTR aDefaultVDIFolder);
70 STDMETHOD(COMGETTER(DefaultMachineFolder)) (BSTR *aDefaultMachineFolder);
71 STDMETHOD(COMSETTER(DefaultMachineFolder)) (INPTR BSTR aDefaultMachineFolder);
72 STDMETHOD(COMGETTER(RemoteDisplayAuthLibrary)) (BSTR *aRemoteDisplayAuthLibrary);
73 STDMETHOD(COMSETTER(RemoteDisplayAuthLibrary)) (INPTR BSTR aRemoteDisplayAuthLibrary);
74 STDMETHOD(COMGETTER(WebServiceAuthLibrary)) (BSTR *aWebServiceAuthLibrary);
75 STDMETHOD(COMSETTER(WebServiceAuthLibrary)) (INPTR BSTR aWebServiceAuthLibrary);
76 STDMETHOD(COMGETTER(HWVirtExEnabled)) (BOOL *enabled);
77 STDMETHOD(COMSETTER(HWVirtExEnabled)) (BOOL enabled);
78 STDMETHOD(COMGETTER(LogHistoryCount)) (ULONG *count);
79 STDMETHOD(COMSETTER(LogHistoryCount)) (ULONG count);
80
81 // public methods only for internal purposes
82
83 HRESULT loadSettings (const settings::Key &aGlobal);
84 HRESULT saveSettings (settings::Key &aGlobal);
85
86 /** Default VDI path (as is, not full). Not thread safe (use object lock). */
87 const Bstr &defaultVDIFolder() { return mDefaultVDIFolder; }
88 /** Default Machine path (full). Not thread safe (use object lock). */
89 const Bstr &defaultVDIFolderFull() { return mDefaultVDIFolderFull; }
90 /** Default Machine path (as is, not full). Not thread safe (use object lock). */
91 const Bstr &defaultMachineFolder() { return mDefaultMachineFolder; }
92 /** Default Machine path (full). Not thread safe (use object lock). */
93 const Bstr &defaultMachineFolderFull() { return mDefaultMachineFolderFull; }
94
95 // for VirtualBoxSupportErrorInfoImpl
96 static const wchar_t *getComponentName() { return L"SystemProperties"; }
97
98private:
99
100 HRESULT setDefaultVDIFolder (const BSTR aPath);
101 HRESULT setDefaultMachineFolder (const BSTR aPath);
102 HRESULT setRemoteDisplayAuthLibrary (const BSTR aPath);
103 HRESULT setWebServiceAuthLibrary (const BSTR aPath);
104
105 ComObjPtr <VirtualBox, ComWeakRef> mParent;
106
107 Bstr mDefaultVDIFolder;
108 Bstr mDefaultVDIFolderFull;
109 Bstr mDefaultMachineFolder;
110 Bstr mDefaultMachineFolderFull;
111 Bstr mRemoteDisplayAuthLibrary;
112 Bstr mWebServiceAuthLibrary;
113 BOOL mHWVirtExEnabled;
114 ULONG mLogHistoryCount;
115};
116
117#endif // ____H_SYSTEMPROPERTIESIMPL
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