VirtualBox

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

Last change on this file since 4615 was 4071, checked in by vboxsync, 17 years ago

Biggest check-in ever. New source code headers for all (C) innotek files.

  • 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-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 mTimeOffset = 0;
44 }
45
46 bool operator== (const Data &that) const
47 {
48 return this == &that ||
49 (mLogoFadeIn == that.mLogoFadeIn &&
50 mLogoFadeOut == that.mLogoFadeOut &&
51 mLogoDisplayTime == that.mLogoDisplayTime &&
52 mLogoImagePath == that.mLogoImagePath &&
53 mBootMenuMode == that.mBootMenuMode &&
54 mACPIEnabled == that.mACPIEnabled &&
55 mIOAPICEnabled == that.mIOAPICEnabled &&
56 mTimeOffset == that.mTimeOffset);
57 }
58
59 BOOL mLogoFadeIn;
60 BOOL mLogoFadeOut;
61 ULONG mLogoDisplayTime;
62 Bstr mLogoImagePath;
63 BIOSBootMenuMode_T mBootMenuMode;
64 BOOL mACPIEnabled;
65 BOOL mIOAPICEnabled;
66 LONG64 mTimeOffset;
67 };
68
69 DECLARE_NOT_AGGREGATABLE(BIOSSettings)
70
71 DECLARE_PROTECT_FINAL_CONSTRUCT()
72
73 BEGIN_COM_MAP(BIOSSettings)
74 COM_INTERFACE_ENTRY(ISupportErrorInfo)
75 COM_INTERFACE_ENTRY(IBIOSSettings)
76 END_COM_MAP()
77
78 NS_DECL_ISUPPORTS
79
80 HRESULT FinalConstruct();
81 void FinalRelease();
82
83 // public initializer/uninitializer for internal purposes only
84 HRESULT init (Machine *parent);
85 HRESULT init (Machine *parent, BIOSSettings *that);
86 HRESULT initCopy (Machine *parent, BIOSSettings *that);
87 void uninit();
88
89 STDMETHOD(COMGETTER(LogoFadeIn))(BOOL *enabled);
90 STDMETHOD(COMSETTER(LogoFadeIn))(BOOL enable);
91 STDMETHOD(COMGETTER(LogoFadeOut))(BOOL *enabled);
92 STDMETHOD(COMSETTER(LogoFadeOut))(BOOL enable);
93 STDMETHOD(COMGETTER(LogoDisplayTime))(ULONG *displayTime);
94 STDMETHOD(COMSETTER(LogoDisplayTime))(ULONG displayTime);
95 STDMETHOD(COMGETTER(LogoImagePath))(BSTR *imagePath);
96 STDMETHOD(COMSETTER(LogoImagePath))(INPTR BSTR imagePath);
97 STDMETHOD(COMGETTER(BootMenuMode))(BIOSBootMenuMode_T *bootMenuMode);
98 STDMETHOD(COMSETTER(BootMenuMode))(BIOSBootMenuMode_T bootMenuMode);
99 STDMETHOD(COMGETTER(ACPIEnabled))(BOOL *enabled);
100 STDMETHOD(COMSETTER(ACPIEnabled))(BOOL enable);
101 STDMETHOD(COMGETTER(IOAPICEnabled))(BOOL *enabled);
102 STDMETHOD(COMSETTER(IOAPICEnabled))(BOOL enable);
103 STDMETHOD(COMGETTER)(TimeOffset)(LONG64 *offset);
104 STDMETHOD(COMSETTER)(TimeOffset)(LONG64 offset);
105
106 // public methods only for internal purposes
107
108 const Backupable <Data> &data() const { return mData; }
109
110 bool isModified() { AutoLock alock (this); return mData.isBackedUp(); }
111 bool isReallyModified() { AutoLock alock (this); return mData.hasActualChanges(); }
112 void rollback() { AutoLock alock (this); mData.rollback(); }
113 void commit();
114 void copyFrom (BIOSSettings *aThat);
115
116 // for VirtualBoxSupportErrorInfoImpl
117 static const wchar_t *getComponentName() { return L"BIOSSettings"; }
118
119private:
120
121 ComObjPtr <Machine, ComWeakRef> mParent;
122 ComObjPtr <BIOSSettings> mPeer;
123 Backupable <Data> mData;
124};
125
126#endif // ____H_BIOSSETTINGS
127
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