1 | /* $Id: BIOSSettingsImpl.h 28398 2010-04-16 08:38:37Z 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_BIOSSETTINGS
|
---|
25 | #define ____H_BIOSSETTINGS
|
---|
26 |
|
---|
27 | #include "VirtualBoxBase.h"
|
---|
28 |
|
---|
29 | class GuestOSType;
|
---|
30 |
|
---|
31 | namespace settings
|
---|
32 | {
|
---|
33 | struct BIOSSettings;
|
---|
34 | }
|
---|
35 |
|
---|
36 | class ATL_NO_VTABLE BIOSSettings :
|
---|
37 | public VirtualBoxSupportErrorInfoImpl<BIOSSettings, IBIOSSettings>,
|
---|
38 | public VirtualBoxSupportTranslation<BIOSSettings>,
|
---|
39 | public VirtualBoxBase,
|
---|
40 | VBOX_SCRIPTABLE_IMPL(IBIOSSettings)
|
---|
41 | {
|
---|
42 | public:
|
---|
43 | DECLARE_NOT_AGGREGATABLE(BIOSSettings)
|
---|
44 |
|
---|
45 | DECLARE_PROTECT_FINAL_CONSTRUCT()
|
---|
46 |
|
---|
47 | BEGIN_COM_MAP(BIOSSettings)
|
---|
48 | COM_INTERFACE_ENTRY(ISupportErrorInfo)
|
---|
49 | COM_INTERFACE_ENTRY(IBIOSSettings)
|
---|
50 | COM_INTERFACE_ENTRY(IDispatch)
|
---|
51 | END_COM_MAP()
|
---|
52 |
|
---|
53 | HRESULT FinalConstruct();
|
---|
54 | void FinalRelease();
|
---|
55 |
|
---|
56 | // public initializer/uninitializer for internal purposes only
|
---|
57 | HRESULT init (Machine *parent);
|
---|
58 | HRESULT init (Machine *parent, BIOSSettings *that);
|
---|
59 | HRESULT initCopy (Machine *parent, BIOSSettings *that);
|
---|
60 | void uninit();
|
---|
61 |
|
---|
62 | STDMETHOD(COMGETTER(LogoFadeIn))(BOOL *enabled);
|
---|
63 | STDMETHOD(COMSETTER(LogoFadeIn))(BOOL enable);
|
---|
64 | STDMETHOD(COMGETTER(LogoFadeOut))(BOOL *enabled);
|
---|
65 | STDMETHOD(COMSETTER(LogoFadeOut))(BOOL enable);
|
---|
66 | STDMETHOD(COMGETTER(LogoDisplayTime))(ULONG *displayTime);
|
---|
67 | STDMETHOD(COMSETTER(LogoDisplayTime))(ULONG displayTime);
|
---|
68 | STDMETHOD(COMGETTER(LogoImagePath))(BSTR *imagePath);
|
---|
69 | STDMETHOD(COMSETTER(LogoImagePath))(IN_BSTR imagePath);
|
---|
70 | STDMETHOD(COMGETTER(BootMenuMode))(BIOSBootMenuMode_T *bootMenuMode);
|
---|
71 | STDMETHOD(COMSETTER(BootMenuMode))(BIOSBootMenuMode_T bootMenuMode);
|
---|
72 | STDMETHOD(COMGETTER(ACPIEnabled))(BOOL *enabled);
|
---|
73 | STDMETHOD(COMSETTER(ACPIEnabled))(BOOL enable);
|
---|
74 | STDMETHOD(COMGETTER(IOAPICEnabled))(BOOL *enabled);
|
---|
75 | STDMETHOD(COMSETTER(IOAPICEnabled))(BOOL enable);
|
---|
76 | STDMETHOD(COMGETTER(PXEDebugEnabled))(BOOL *enabled);
|
---|
77 | STDMETHOD(COMSETTER(PXEDebugEnabled))(BOOL enable);
|
---|
78 | STDMETHOD(COMGETTER)(TimeOffset)(LONG64 *offset);
|
---|
79 | STDMETHOD(COMSETTER)(TimeOffset)(LONG64 offset);
|
---|
80 |
|
---|
81 | // public methods only for internal purposes
|
---|
82 |
|
---|
83 | HRESULT loadSettings(const settings::BIOSSettings &data);
|
---|
84 | HRESULT saveSettings(settings::BIOSSettings &data);
|
---|
85 |
|
---|
86 | void rollback();
|
---|
87 | void commit();
|
---|
88 | void copyFrom (BIOSSettings *aThat);
|
---|
89 | void applyDefaults (GuestOSType *aOsType);
|
---|
90 |
|
---|
91 | // for VirtualBoxSupportErrorInfoImpl
|
---|
92 | static const wchar_t *getComponentName() { return L"BIOSSettings"; }
|
---|
93 |
|
---|
94 | private:
|
---|
95 | struct Data;
|
---|
96 | Data *m;
|
---|
97 | };
|
---|
98 |
|
---|
99 | #endif // ____H_BIOSSETTINGS
|
---|
100 |
|
---|
101 | /* vi: set tabstop=4 shiftwidth=4 expandtab: */
|
---|