VirtualBox

source: vbox/trunk/src/VBox/Main/include/BIOSSettingsImpl.h@ 25414

Last change on this file since 25414 was 25201, checked in by vboxsync, 15 years ago

Main: make BIOSSettings instance data private and make it use the XML settings struct for simplicity

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

© 2023 Oracle
ContactPrivacy policyTerms of Use