VirtualBox

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

Last change on this file since 2333 was 1217, checked in by vboxsync, 18 years ago

Cleaned up EOL style.

  • Property svn:eol-style set to native
File size: 4.2 KB
Line 
1/** @file
2 *
3 * VirtualBox COM class implementation
4 */
5
6/*
7 * Copyright (C) 2006 InnoTek Systemberatung GmbH
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License as published by the Free Software Foundation,
13 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14 * distribution. VirtualBox OSE is distributed in the hope that it will
15 * be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * If you received this file as part of a commercial VirtualBox
18 * distribution, then only the terms of your commercial VirtualBox
19 * license agreement apply instead of the previous paragraph.
20 */
21
22#ifndef ____H_BIOSSETTINGS
23#define ____H_BIOSSETTINGS
24
25#include "VirtualBoxBase.h"
26
27class Machine;
28
29class ATL_NO_VTABLE BIOSSettings :
30 public VirtualBoxSupportErrorInfoImpl <BIOSSettings, IBIOSSettings>,
31 public VirtualBoxSupportTranslation <BIOSSettings>,
32 public VirtualBoxBaseNEXT,
33 public IBIOSSettings
34{
35public:
36
37 struct Data
38 {
39 Data()
40 {
41 mLogoFadeIn = true;
42 mLogoFadeOut = true;
43 mLogoDisplayTime = 0;
44 mBootMenuMode = BIOSBootMenuMode_MessageAndMenu;
45 mACPIEnabled = true;
46 mIOAPICEnabled = false;
47 }
48
49 bool operator== (const Data &that) const
50 {
51 return this == &that ||
52 (mLogoFadeIn == that.mLogoFadeIn &&
53 mLogoFadeOut == that.mLogoFadeOut &&
54 mLogoDisplayTime == that.mLogoDisplayTime &&
55 mLogoImagePath == that.mLogoImagePath &&
56 mBootMenuMode == that.mBootMenuMode &&
57 mACPIEnabled == that.mACPIEnabled &&
58 mIOAPICEnabled == that.mIOAPICEnabled);
59 }
60
61 BOOL mLogoFadeIn;
62 BOOL mLogoFadeOut;
63 ULONG mLogoDisplayTime;
64 Bstr mLogoImagePath;
65 BIOSBootMenuMode_T mBootMenuMode;
66 BOOL mACPIEnabled;
67 BOOL mIOAPICEnabled;
68 };
69
70 DECLARE_NOT_AGGREGATABLE(BIOSSettings)
71
72 DECLARE_PROTECT_FINAL_CONSTRUCT()
73
74 BEGIN_COM_MAP(BIOSSettings)
75 COM_INTERFACE_ENTRY(ISupportErrorInfo)
76 COM_INTERFACE_ENTRY(IBIOSSettings)
77 END_COM_MAP()
78
79 NS_DECL_ISUPPORTS
80
81 HRESULT FinalConstruct();
82 void FinalRelease();
83
84 // public initializer/uninitializer for internal purposes only
85 HRESULT init (Machine *parent);
86 HRESULT init (Machine *parent, BIOSSettings *that);
87 HRESULT initCopy (Machine *parent, BIOSSettings *that);
88 void uninit();
89
90 STDMETHOD(COMGETTER(LogoFadeIn))(BOOL *enabled);
91 STDMETHOD(COMSETTER(LogoFadeIn))(BOOL enable);
92 STDMETHOD(COMGETTER(LogoFadeOut))(BOOL *enabled);
93 STDMETHOD(COMSETTER(LogoFadeOut))(BOOL enable);
94 STDMETHOD(COMGETTER(LogoDisplayTime))(ULONG *displayTime);
95 STDMETHOD(COMSETTER(LogoDisplayTime))(ULONG displayTime);
96 STDMETHOD(COMGETTER(LogoImagePath))(BSTR *imagePath);
97 STDMETHOD(COMSETTER(LogoImagePath))(INPTR BSTR imagePath);
98 STDMETHOD(COMGETTER(BootMenuMode))(BIOSBootMenuMode_T *bootMenuMode);
99 STDMETHOD(COMSETTER(BootMenuMode))(BIOSBootMenuMode_T bootMenuMode);
100 STDMETHOD(COMGETTER(ACPIEnabled))(BOOL *enabled);
101 STDMETHOD(COMSETTER(ACPIEnabled))(BOOL enable);
102 STDMETHOD(COMGETTER(IOAPICEnabled))(BOOL *enabled);
103 STDMETHOD(COMSETTER(IOAPICEnabled))(BOOL enable);
104
105 // public methods only for internal purposes
106
107 const Backupable <Data> &data() const { return mData; }
108
109 bool isModified() { AutoLock alock (this); return mData.isBackedUp(); }
110 bool isReallyModified() { AutoLock alock (this); return mData.hasActualChanges(); }
111 void rollback() { AutoLock alock (this); mData.rollback(); }
112 void commit();
113 void copyFrom (BIOSSettings *aThat);
114
115 // for VirtualBoxSupportErrorInfoImpl
116 static const wchar_t *getComponentName() { return L"BIOSSettings"; }
117
118private:
119
120 ComObjPtr <Machine, ComWeakRef> mParent;
121 ComObjPtr <BIOSSettings> mPeer;
122 Backupable <Data> mData;
123};
124
125#endif // ____H_BIOSSETTINGS
126
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