summaryrefslogtreecommitdiff
path: root/src/VBox/Main/include/GuestImpl.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-03-26 19:21:20 +0000
committer <>2014-05-08 15:03:54 +0000
commitfb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch)
treec2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/Main/include/GuestImpl.h
parent58ed4748338f9466599adfc8a9171280ed99e23f (diff)
downloadVirtualBox-master.tar.gz
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/Main/include/GuestImpl.h')
-rw-r--r--src/VBox/Main/include/GuestImpl.h51
1 files changed, 32 insertions, 19 deletions
diff --git a/src/VBox/Main/include/GuestImpl.h b/src/VBox/Main/include/GuestImpl.h
index 5ae18886..1a856eec 100644
--- a/src/VBox/Main/include/GuestImpl.h
+++ b/src/VBox/Main/include/GuestImpl.h
@@ -3,7 +3,7 @@
*/
/*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -21,6 +21,7 @@
#include <iprt/list.h>
#include <iprt/time.h>
#include <VBox/ostypes.h>
+#include <VBox/vmm/stam.h>
#include "AdditionsFacilityImpl.h"
#include "GuestCtrlImplPrivate.h"
@@ -79,6 +80,7 @@ public:
STDMETHOD(COMGETTER(AdditionsRunLevel)) (AdditionsRunLevelType_T *aRunLevel);
STDMETHOD(COMGETTER(AdditionsVersion))(BSTR *a_pbstrAdditionsVersion);
STDMETHOD(COMGETTER(AdditionsRevision))(ULONG *a_puAdditionsRevision);
+ STDMETHOD(COMGETTER(EventSource))(IEventSource ** aEventSource);
STDMETHOD(COMGETTER(Facilities)) (ComSafeArrayOut(IAdditionsFacility *, aFacilities));
STDMETHOD(COMGETTER(Sessions)) (ComSafeArrayOut(IGuestSession *, aSessions));
STDMETHOD(COMGETTER(MemoryBalloonSize)) (ULONG *aMemoryBalloonSize);
@@ -99,21 +101,22 @@ public:
STDMETHOD(DragGHPending)(ULONG uScreenId, ComSafeArrayOut(BSTR, formats), ComSafeArrayOut(DragAndDropAction_T, allowedActions), DragAndDropAction_T *pDefaultAction);
STDMETHOD(DragGHDropped)(IN_BSTR strFormat, DragAndDropAction_T action, IProgress **ppProgress);
STDMETHOD(DragGHGetData)(ComSafeArrayOut(BYTE, data));
+ // Guest control.
+ STDMETHOD(CreateSession)(IN_BSTR aUser, IN_BSTR aPassword, IN_BSTR aDomain, IN_BSTR aSessionName, IGuestSession **aGuestSession);
+ STDMETHOD(FindSession)(IN_BSTR aSessionName, ComSafeArrayOut(IGuestSession *, aSessions));
// Misc stuff
STDMETHOD(InternalGetStatistics)(ULONG *aCpuUser, ULONG *aCpuKernel, ULONG *aCpuIdle,
ULONG *aMemTotal, ULONG *aMemFree, ULONG *aMemBalloon, ULONG *aMemShared, ULONG *aMemCache,
ULONG *aPageTotal, ULONG *aMemAllocTotal, ULONG *aMemFreeTotal, ULONG *aMemBalloonTotal, ULONG *aMemSharedTotal);
- STDMETHOD(UpdateGuestAdditions)(IN_BSTR aSource, ComSafeArrayIn(AdditionsUpdateFlag_T, aFlags), IProgress **aProgress);
- STDMETHOD(CreateSession)(IN_BSTR aUser, IN_BSTR aPassword, IN_BSTR aDomain, IN_BSTR aSessionName, IGuestSession **aGuestSession);
- STDMETHOD(FindSession)(IN_BSTR aSessionName, ComSafeArrayOut(IGuestSession *, aSessions));
+ STDMETHOD(UpdateGuestAdditions)(IN_BSTR aSource, ComSafeArrayIn(IN_BSTR, aArguments), ComSafeArrayIn(AdditionsUpdateFlag_T, aFlags), IProgress **aProgress);
public:
/** @name Static internal methods.
* @{ */
#ifdef VBOX_WITH_GUEST_CONTROL
/** Static callback for handling guest control notifications. */
- static DECLCALLBACK(int) notifyCtrlDispatcher(void *pvExtension, uint32_t u32Function, void *pvParms, uint32_t cbParms);
- static void staticUpdateStats(RTTIMERLR hTimerLR, void *pvUser, uint64_t iTick);
+ static DECLCALLBACK(int) notifyCtrlDispatcher(void *pvExtension, uint32_t u32Function, void *pvData, uint32_t cbData);
+ static DECLCALLBACK(void) staticUpdateStats(RTTIMERLR hTimerLR, void *pvUser, uint64_t iTick);
#endif
/** @} */
@@ -126,6 +129,7 @@ public:
bool facilityIsActive(VBoxGuestFacilityType enmFacility);
void facilityUpdate(VBoxGuestFacilityType a_enmFacility, VBoxGuestFacilityStatus a_enmStatus, uint32_t a_fFlags, PCRTTIMESPEC a_pTimeSpecTS);
void setAdditionsStatus(VBoxGuestFacilityType a_enmFacility, VBoxGuestFacilityStatus a_enmStatus, uint32_t a_fFlags, PCRTTIMESPEC a_pTimeSpecTS);
+ void onUserStateChange(Bstr aUser, Bstr aDomain, VBoxGuestUserState enmState, const uint8_t *puDetails, uint32_t cbDetails);
void setSupportedFeatures(uint32_t aCaps);
HRESULT setStatistic(ULONG aCpuId, GUESTSTATTYPE enmType, ULONG aVal);
BOOL isPageFusionEnabled();
@@ -135,12 +139,11 @@ public:
return setErrorInternal(aResultCode, getStaticClassIID(), getStaticComponentName(), aText, false, true);
}
#ifdef VBOX_WITH_GUEST_CONTROL
- int dispatchToSession(uint32_t uContextID, uint32_t uFunction, void *pvData, size_t cbData);
+ int dispatchToSession(PVBOXGUESTCTRLHOSTCBCTX pCtxCb, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb);
uint32_t getAdditionsVersion(void) { return mData.mAdditionsVersionFull; }
Console *getConsole(void) { return mParent; }
int sessionRemove(GuestSession *pSession);
- int sessionCreate(const Utf8Str &strUser, const Utf8Str &strPassword, const Utf8Str &strDomain,
- const Utf8Str &strSessionName, ComObjPtr<GuestSession> &pGuestSession);
+ int sessionCreate(const GuestSessionStartupInfo &ssInfo, const GuestCredentials &guestCreds, ComObjPtr<GuestSession> &pGuestSession);
inline bool sessionExists(uint32_t uSessionID);
#endif
/** @} */
@@ -149,6 +152,8 @@ private:
/** @name Private internal methods.
* @{ */
void updateStats(uint64_t iTick);
+ static int staticEnumStatsCallback(const char *pszName, STAMTYPE enmType, void *pvSample, STAMUNIT enmUnit,
+ STAMVISIBILITY enmVisiblity, const char *pszDesc, void *pvUser);
/** @} */
typedef std::map< AdditionsFacilityType_T, ComObjPtr<AdditionsFacility> > FacilityMap;
@@ -174,21 +179,29 @@ private:
Bstr mInterfaceVersion;
GuestSessions mGuestSessions;
uint32_t mNextSessionID;
- };
+ } mData;
- ULONG mMemoryBalloonSize;
- ULONG mStatUpdateInterval;
- ULONG mCurrentGuestStat[GUESTSTATTYPE_MAX];
- ULONG mGuestValidStats;
- BOOL mCollectVMMStats;
- BOOL mfPageFusionEnabled;
+ ULONG mMemoryBalloonSize;
+ ULONG mStatUpdateInterval;
+ uint64_t mNetStatRx;
+ uint64_t mNetStatTx;
+ uint64_t mNetStatLastTs;
+ ULONG mCurrentGuestStat[GUESTSTATTYPE_MAX];
+ ULONG mVmValidStats;
+ BOOL mCollectVMMStats;
+ BOOL mfPageFusionEnabled;
- Console *mParent;
- Data mData;
+ Console *mParent;
#ifdef VBOX_WITH_GUEST_CONTROL
+ /**
+ * This can safely be used without holding any locks.
+ * An AutoCaller suffices to prevent it being destroy while in use and
+ * internally there is a lock providing the necessary serialization.
+ */
+ const ComObjPtr<EventSource> mEventSource;
/** General extension callback for guest control. */
- HGCMSVCEXTHANDLE mhExtCtrl;
+ HGCMSVCEXTHANDLE mhExtCtrl;
#endif
#ifdef VBOX_WITH_DRAG_AND_DROP