VirtualBox

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

Last change on this file since 50874 was 47190, checked in by vboxsync, 11 years ago

Main/MouseImpl: restored Mouse test case, not yet building though.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 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 VMMDevMouseInterface
27{
28public:
29 virtual PPDMIVMMDEVPORT getVMMDevPort() = 0;
30};
31
32class VMMDev : public VMMDevMouseInterface
33{
34public:
35 VMMDev(Console *console);
36 virtual ~VMMDev();
37 static const PDMDRVREG DrvReg;
38 /** Pointer to the associated VMMDev driver. */
39 struct DRVMAINVMMDEV *mpDrv;
40
41 bool fSharedFolderActive;
42 bool isShFlActive()
43 {
44 return fSharedFolderActive;
45 }
46
47 Console *getParent()
48 {
49 return mParent;
50 }
51
52 int WaitCredentialsJudgement (uint32_t u32Timeout, uint32_t *pu32GuestFlags);
53 int SetCredentialsJudgementResult (uint32_t u32Flags);
54
55 PPDMIVMMDEVPORT getVMMDevPort();
56
57#ifdef VBOX_WITH_HGCM
58 int hgcmLoadService (const char *pszServiceLibrary, const char *pszServiceName);
59 int hgcmHostCall (const char *pszServiceName, uint32_t u32Function, uint32_t cParms, PVBOXHGCMSVCPARM paParms);
60#ifdef VBOX_WITH_CRHGSMI
61 int hgcmHostSvcHandleCreate (const char *pszServiceName, HGCMCVSHANDLE * phSvc);
62 int hgcmHostSvcHandleDestroy (HGCMCVSHANDLE hSvc);
63 int hgcmHostFastCallAsync (HGCMCVSHANDLE hSvc, uint32_t function, PVBOXHGCMSVCPARM pParm, PHGCMHOSTFASTCALLCB pfnCompletion, void *pvCompletion);
64#endif
65 void hgcmShutdown (void);
66
67 bool hgcmIsActive (void) { return ASMAtomicReadBool(&m_fHGCMActive); }
68#endif /* VBOX_WITH_HGCM */
69
70private:
71 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID);
72 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
73 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns);
74 static DECLCALLBACK(void) drvReset(PPDMDRVINS pDrvIns);
75
76 Console * const mParent;
77
78 RTSEMEVENT mCredentialsEvent;
79 uint32_t mu32CredentialsFlags;
80
81#ifdef VBOX_WITH_HGCM
82 bool volatile m_fHGCMActive;
83#endif /* VBOX_WITH_HGCM */
84};
85
86#endif // !____H_VMMDEV
87/* 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