VirtualBox

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

Last change on this file since 27703 was 27703, checked in by vboxsync, 15 years ago

Guest Control: Update (VBoxManage, Main, Host Service, VbglR3), not enabled by default.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.8 KB
Line 
1/** @file
2 *
3 * VirtualBox COM class implementation
4 */
5
6/*
7 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
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 (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18 * Clara, CA 95054 USA or visit http://www.sun.com if you need
19 * additional information or have any questions.
20 */
21
22#ifndef ____H_GUESTIMPL
23#define ____H_GUESTIMPL
24
25#include "VirtualBoxBase.h"
26#include <VBox/ostypes.h>
27
28class Console;
29
30#define GUEST_STAT_INVALID (ULONG)-1
31
32class ATL_NO_VTABLE Guest :
33 public VirtualBoxSupportErrorInfoImpl<Guest, IGuest>,
34 public VirtualBoxSupportTranslation<Guest>,
35 public VirtualBoxBase,
36 VBOX_SCRIPTABLE_IMPL(IGuest)
37{
38public:
39
40 DECLARE_NOT_AGGREGATABLE(Guest)
41
42 DECLARE_PROTECT_FINAL_CONSTRUCT()
43
44 BEGIN_COM_MAP(Guest)
45 COM_INTERFACE_ENTRY(ISupportErrorInfo)
46 COM_INTERFACE_ENTRY(IGuest)
47 COM_INTERFACE_ENTRY(IDispatch)
48 END_COM_MAP()
49
50 DECLARE_EMPTY_CTOR_DTOR (Guest)
51
52 HRESULT FinalConstruct();
53 void FinalRelease();
54
55 // public initializer/uninitializer for internal purposes only
56 HRESULT init (Console *aParent);
57 void uninit();
58
59 // IGuest properties
60 STDMETHOD(COMGETTER(OSTypeId)) (BSTR *aOSTypeId);
61 STDMETHOD(COMGETTER(AdditionsActive)) (BOOL *aAdditionsActive);
62 STDMETHOD(COMGETTER(AdditionsVersion)) (BSTR *aAdditionsVersion);
63 STDMETHOD(COMGETTER(SupportsSeamless)) (BOOL *aSupportsSeamless);
64 STDMETHOD(COMGETTER(SupportsGraphics)) (BOOL *aSupportsGraphics);
65 STDMETHOD(COMGETTER(MemoryBalloonSize)) (ULONG *aMemoryBalloonSize);
66 STDMETHOD(COMSETTER(MemoryBalloonSize)) (ULONG aMemoryBalloonSize);
67 STDMETHOD(COMGETTER(StatisticsUpdateInterval)) (ULONG *aUpdateInterval);
68 STDMETHOD(COMSETTER(StatisticsUpdateInterval)) (ULONG aUpdateInterval);
69
70 // IGuest methods
71 STDMETHOD(SetCredentials)(IN_BSTR aUserName, IN_BSTR aPassword,
72 IN_BSTR aDomain, BOOL aAllowInteractiveLogon);
73 STDMETHOD(GetStatistic)(ULONG aCpuId, GuestStatisticType_T aStatistic, ULONG *aStatVal);
74 STDMETHOD(ExecuteProgram)(IN_BSTR aExecName, ULONG aFlags,
75 ComSafeArrayIn(BSTR, aArguments), ComSafeArrayIn(BSTR, aEnvironment),
76 IN_BSTR aStdIn, IN_BSTR aStdOut, IN_BSTR aStdErr,
77 IN_BSTR aUserName, IN_BSTR aPassword,
78 ULONG aTimeoutMS, ULONG* aPID);
79
80 // public methods that are not in IDL
81 void setAdditionsVersion (Bstr aVersion, VBOXOSTYPE aOsType);
82
83 void setSupportsSeamless (BOOL aSupportsSeamless);
84
85 void setSupportsGraphics (BOOL aSupportsGraphics);
86
87 STDMETHOD(SetStatistic)(ULONG aCpuId, GuestStatisticType_T aStatistic, ULONG aStatVal);
88
89 // for VirtualBoxSupportErrorInfoImpl
90 static const wchar_t *getComponentName() { return L"Guest"; }
91
92private:
93
94 struct Data
95 {
96 Data() : mAdditionsActive (FALSE), mSupportsSeamless (FALSE),
97 mSupportsGraphics (FALSE) {}
98
99 Bstr mOSTypeId;
100 BOOL mAdditionsActive;
101 Bstr mAdditionsVersion;
102 BOOL mSupportsSeamless;
103 BOOL mSupportsGraphics;
104 };
105
106 ULONG mMemoryBalloonSize;
107 ULONG mStatUpdateInterval;
108
109 ULONG mCurrentGuestStat[GuestStatisticType_MaxVal];
110
111 Console *mParent;
112 Data mData;
113};
114
115#endif // ____H_GUESTIMPL
116/* vi: set tabstop=4 shiftwidth=4 expandtab: */
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