VirtualBox

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

Last change on this file since 82427 was 80396, checked in by vboxsync, 5 years ago

Devices/DevVGA, Main: Get rid of obsolete code enclosed by VBOX_WITH_CRHGSMI, bugref:9529

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1/* $Id: VMMDev.h 80396 2019-08-23 13:27:22Z vboxsync $ */
2/** @file
3 * VirtualBox Driver interface to VMM device
4 */
5
6/*
7 * Copyright (C) 2006-2019 Oracle Corporation
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
18#ifndef MAIN_INCLUDED_VMMDev_h
19#define MAIN_INCLUDED_VMMDev_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include "VirtualBoxBase.h"
25#include <VBox/vmm/pdmdrv.h>
26#include <VBox/hgcmsvc.h>
27#include <iprt/asm.h>
28
29class Console;
30
31class VMMDevMouseInterface
32{
33public:
34 virtual PPDMIVMMDEVPORT getVMMDevPort() = 0;
35};
36
37class VMMDev : public VMMDevMouseInterface
38{
39public:
40 VMMDev(Console *console);
41 virtual ~VMMDev();
42 static const PDMDRVREG DrvReg;
43 /** Pointer to the associated VMMDev driver. */
44 struct DRVMAINVMMDEV *mpDrv;
45
46 bool fSharedFolderActive;
47 bool isShFlActive()
48 {
49 return fSharedFolderActive;
50 }
51
52 Console *getParent()
53 {
54 return mParent;
55 }
56
57 int WaitCredentialsJudgement (uint32_t u32Timeout, uint32_t *pu32GuestFlags);
58 int SetCredentialsJudgementResult (uint32_t u32Flags);
59
60 PPDMIVMMDEVPORT getVMMDevPort();
61
62#ifdef VBOX_WITH_HGCM
63 int hgcmLoadService (const char *pszServiceLibrary, const char *pszServiceName);
64 int hgcmHostCall (const char *pszServiceName, uint32_t u32Function, uint32_t cParms, PVBOXHGCMSVCPARM paParms);
65 void hgcmShutdown(bool fUvmIsInvalid = false);
66
67 bool hgcmIsActive (void) { return ASMAtomicReadBool(&m_fHGCMActive); }
68#endif /* VBOX_WITH_HGCM */
69
70private:
71#ifdef VBOX_WITH_HGCM
72# ifdef VBOX_WITH_GUEST_PROPS
73 void i_guestPropSetMultiple(void *names, void *values, void *timestamps, void *flags);
74 void i_guestPropSet(const char *pszName, const char *pszValue, const char *pszFlags);
75 int i_guestPropSetGlobalPropertyFlags(uint32_t fFlags);
76 int i_guestPropLoadAndConfigure();
77# endif
78#endif
79 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID);
80 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
81 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns);
82 static DECLCALLBACK(void) drvReset(PPDMDRVINS pDrvIns);
83 static DECLCALLBACK(void) drvPowerOn(PPDMDRVINS pDrvIns);
84 static DECLCALLBACK(void) drvPowerOff(PPDMDRVINS pDrvIns);
85 static DECLCALLBACK(void) drvSuspend(PPDMDRVINS pDrvIns);
86 static DECLCALLBACK(void) drvResume(PPDMDRVINS pDrvIns);
87
88 Console * const mParent;
89
90 RTSEMEVENT mCredentialsEvent;
91 uint32_t mu32CredentialsFlags;
92
93#ifdef VBOX_WITH_HGCM
94 bool volatile m_fHGCMActive;
95#endif /* VBOX_WITH_HGCM */
96};
97
98#endif /* !MAIN_INCLUDED_VMMDev_h */
99/* 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