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