VirtualBox

source: vbox/trunk/src/VBox/Main/include/VMMDev.h@ 47167

Last change on this file since 47167 was 44528, checked in by vboxsync, 12 years ago

header (C) fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1/** @file
2 * VirtualBox Driver interface to VMM device
3 */
4
5/*
6 * Copyright (C) 2006-2010 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 */
16
17#ifndef ____H_VMMDEV
18#define ____H_VMMDEV
19
20#include "VirtualBoxBase.h"
21#include <VBox/vmm/pdmdrv.h>
22#include <iprt/asm.h>
23
24class Console;
25
26class VMMDev
27{
28public:
29 VMMDev(Console *console);
30 virtual ~VMMDev();
31 static const PDMDRVREG DrvReg;
32 /** Pointer to the associated VMMDev driver. */
33 struct DRVMAINVMMDEV *mpDrv;
34
35 bool fSharedFolderActive;
36 bool isShFlActive()
37 {
38 return fSharedFolderActive;
39 }
40
41 Console *getParent()
42 {
43 return mParent;
44 }
45
46 int WaitCredentialsJudgement (uint32_t u32Timeout, uint32_t *pu32GuestFlags);
47 int SetCredentialsJudgementResult (uint32_t u32Flags);
48
49 PPDMIVMMDEVPORT getVMMDevPort();
50
51 int hgcmLoadService (const char *pszServiceLibrary, const char *pszServiceName);
52 int hgcmHostCall (const char *pszServiceName, uint32_t u32Function, uint32_t cParms, PVBOXHGCMSVCPARM paParms);
53#ifdef VBOX_WITH_CRHGSMI
54 int hgcmHostSvcHandleCreate (const char *pszServiceName, HGCMCVSHANDLE * phSvc);
55 int hgcmHostSvcHandleDestroy (HGCMCVSHANDLE hSvc);
56 int hgcmHostFastCallAsync (HGCMCVSHANDLE hSvc, uint32_t function, PVBOXHGCMSVCPARM pParm, PHGCMHOSTFASTCALLCB pfnCompletion, void *pvCompletion);
57#endif
58 void hgcmShutdown (void);
59
60 bool hgcmIsActive (void) { return ASMAtomicReadBool(&m_fHGCMActive); }
61
62private:
63 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID);
64 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
65 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns);
66 static DECLCALLBACK(void) drvReset(PPDMDRVINS pDrvIns);
67
68 Console * const mParent;
69
70 RTSEMEVENT mCredentialsEvent;
71 uint32_t mu32CredentialsFlags;
72
73#ifdef VBOX_WITH_HGCM
74 bool volatile m_fHGCMActive;
75#endif /* VBOX_WITH_HGCM */
76};
77
78#endif // !____H_VMMDEV
79/* 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