VirtualBox

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

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

Completed statistic query

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