VirtualBox

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

Last change on this file since 5190 was 5171, checked in by vboxsync, 17 years ago

Added PXEDebug option scaffolding.

  • Property svn:eol-style set to native
File size: 4.5 KB
Line 
1/** @file
2 *
3 * VirtualBox COM class implementation
4 */
5
6/*
7 * Copyright (C) 2006-2007 innotek 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
18#ifndef ____H_BIOSSETTINGS
19#define ____H_BIOSSETTINGS
20
21#include "VirtualBoxBase.h"
22
23class Machine;
24
25class ATL_NO_VTABLE BIOSSettings :
26 public VirtualBoxSupportErrorInfoImpl <BIOSSettings, IBIOSSettings>,
27 public VirtualBoxSupportTranslation <BIOSSettings>,
28 public VirtualBoxBaseNEXT,
29 public IBIOSSettings
30{
31public:
32
33 struct Data
34 {
35 Data()
36 {
37 mLogoFadeIn = true;
38 mLogoFadeOut = true;
39 mLogoDisplayTime = 0;
40 mBootMenuMode = BIOSBootMenuMode_MessageAndMenu;
41 mACPIEnabled = true;
42 mIOAPICEnabled = false;
43 mPXEDebugEnabled = false;
44 mTimeOffset = 0;
45 }
46
47 bool operator== (const Data &that) const
48 {
49 return this == &that ||
50 (mLogoFadeIn == that.mLogoFadeIn &&
51 mLogoFadeOut == that.mLogoFadeOut &&
52 mLogoDisplayTime == that.mLogoDisplayTime &&
53 mLogoImagePath == that.mLogoImagePath &&
54 mBootMenuMode == that.mBootMenuMode &&
55 mACPIEnabled == that.mACPIEnabled &&
56 mIOAPICEnabled == that.mIOAPICEnabled &&
57 mPXEDebugEnabled == that.mPXEDebugEnabled &&
58 mTimeOffset == that.mTimeOffset);
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 BOOL mPXEDebugEnabled;
69 LONG64 mTimeOffset;
70 };
71
72 DECLARE_NOT_AGGREGATABLE(BIOSSettings)
73
74 DECLARE_PROTECT_FINAL_CONSTRUCT()
75
76 BEGIN_COM_MAP(BIOSSettings)
77 COM_INTERFACE_ENTRY(ISupportErrorInfo)
78 COM_INTERFACE_ENTRY(IBIOSSettings)
79 END_COM_MAP()
80
81 NS_DECL_ISUPPORTS
82
83 HRESULT FinalConstruct();
84 void FinalRelease();
85
86 // public initializer/uninitializer for internal purposes only
87 HRESULT init (Machine *parent);
88 HRESULT init (Machine *parent, BIOSSettings *that);
89 HRESULT initCopy (Machine *parent, BIOSSettings *that);
90 void uninit();
91
92 STDMETHOD(COMGETTER(LogoFadeIn))(BOOL *enabled);
93 STDMETHOD(COMSETTER(LogoFadeIn))(BOOL enable);
94 STDMETHOD(COMGETTER(LogoFadeOut))(BOOL *enabled);
95 STDMETHOD(COMSETTER(LogoFadeOut))(BOOL enable);
96 STDMETHOD(COMGETTER(LogoDisplayTime))(ULONG *displayTime);
97 STDMETHOD(COMSETTER(LogoDisplayTime))(ULONG displayTime);
98 STDMETHOD(COMGETTER(LogoImagePath))(BSTR *imagePath);
99 STDMETHOD(COMSETTER(LogoImagePath))(INPTR BSTR imagePath);
100 STDMETHOD(COMGETTER(BootMenuMode))(BIOSBootMenuMode_T *bootMenuMode);
101 STDMETHOD(COMSETTER(BootMenuMode))(BIOSBootMenuMode_T bootMenuMode);
102 STDMETHOD(COMGETTER(ACPIEnabled))(BOOL *enabled);
103 STDMETHOD(COMSETTER(ACPIEnabled))(BOOL enable);
104 STDMETHOD(COMGETTER(IOAPICEnabled))(BOOL *enabled);
105 STDMETHOD(COMSETTER(IOAPICEnabled))(BOOL enable);
106 STDMETHOD(COMGETTER(PXEDebugEnabled))(BOOL *enabled);
107 STDMETHOD(COMSETTER(PXEDebugEnabled))(BOOL enable);
108 STDMETHOD(COMGETTER)(TimeOffset)(LONG64 *offset);
109 STDMETHOD(COMSETTER)(TimeOffset)(LONG64 offset);
110
111 // public methods only for internal purposes
112
113 const Backupable <Data> &data() const { return mData; }
114
115 bool isModified() { AutoLock alock (this); return mData.isBackedUp(); }
116 bool isReallyModified() { AutoLock alock (this); return mData.hasActualChanges(); }
117 void rollback() { AutoLock alock (this); mData.rollback(); }
118 void commit();
119 void copyFrom (BIOSSettings *aThat);
120
121 // for VirtualBoxSupportErrorInfoImpl
122 static const wchar_t *getComponentName() { return L"BIOSSettings"; }
123
124private:
125
126 ComObjPtr <Machine, ComWeakRef> mParent;
127 ComObjPtr <BIOSSettings> mPeer;
128 Backupable <Data> mData;
129};
130
131#endif // ____H_BIOSSETTINGS
132
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