VirtualBox

source: vbox/trunk/src/VBox/Main/include/GuestImpl.h@ 4571

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

Future proof

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 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_GUESTIMPL
19#define ____H_GUESTIMPL
20
21#include "VirtualBoxBase.h"
22
23class Console;
24
25class ATL_NO_VTABLE Guest :
26 public VirtualBoxSupportErrorInfoImpl <Guest, IGuest>,
27 public VirtualBoxSupportTranslation <Guest>,
28 public VirtualBoxBase,
29 public IGuest
30{
31public:
32
33 DECLARE_NOT_AGGREGATABLE(Guest)
34
35 DECLARE_PROTECT_FINAL_CONSTRUCT()
36
37 BEGIN_COM_MAP(Guest)
38 COM_INTERFACE_ENTRY(ISupportErrorInfo)
39 COM_INTERFACE_ENTRY(IGuest)
40 END_COM_MAP()
41
42 NS_DECL_ISUPPORTS
43
44 DECLARE_EMPTY_CTOR_DTOR (Guest)
45
46 HRESULT FinalConstruct();
47 void FinalRelease();
48
49 // public initializer/uninitializer for internal purposes only
50 HRESULT init (Console *aParent);
51 void uninit();
52
53 // IGuest properties
54 STDMETHOD(COMGETTER(OSTypeId)) (BSTR *aOSTypeId);
55 STDMETHOD(COMGETTER(AdditionsActive)) (BOOL *aAdditionsActive);
56 STDMETHOD(COMGETTER(AdditionsVersion)) (BSTR *aAdditionsVersion);
57 STDMETHOD(COMGETTER(SupportsSeamless)) (BOOL *aSupportsSeamless);
58 STDMETHOD(COMGETTER(MemoryBalloonSize)) (ULONG *aMemoryBalloonSize);
59 STDMETHOD(COMSETTER(MemoryBalloonSize)) (ULONG aMemoryBalloonSize);
60 STDMETHOD(COMGETTER(StatisticsUpdateInterval)) (ULONG *aUpdateInterval);
61 STDMETHOD(COMSETTER(StatisticsUpdateInterval)) (ULONG aUpdateInterval);
62
63 // IGuest methods
64 STDMETHOD(SetCredentials)(INPTR BSTR aUserName, INPTR BSTR aPassword,
65 INPTR BSTR aDomain, BOOL aAllowInteractiveLogon);
66 STDMETHOD(GetStatistic)(ULONG aCpuId, GuestStatisticType_T aStatistic, ULONG *aStatVal);
67
68 // public methods that are not in IDL
69 void setAdditionsVersion (Bstr aVersion);
70
71 void setSupportsSeamless (BOOL aSupportsSeamless);
72
73 STDMETHOD(SetStatistic)(ULONG aCpuId, GuestStatisticType_T aStatistic, ULONG aStatVal);
74
75 // for VirtualBoxSupportErrorInfoImpl
76 static const wchar_t *getComponentName() { return L"Guest"; }
77
78private:
79
80 struct Data
81 {
82 Data() : mAdditionsActive (FALSE), mSupportsSeamless (FALSE) {}
83
84 Bstr mOSTypeId;
85 BOOL mAdditionsActive;
86 Bstr mAdditionsVersion;
87 BOOL mSupportsSeamless;
88 };
89
90 ULONG mMemoryBalloonSize;
91 ULONG mStatUpdateInterval;
92
93 ComObjPtr <Console, ComWeakRef> mParent;
94 Data mData;
95};
96
97#endif // ____H_GUESTIMPL
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