VirtualBox

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

Last change on this file was 98103, checked in by vboxsync, 20 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.7 KB
RevLine 
[55401]1/* $Id: VMMDev.h 98103 2023-01-17 14:15:46Z vboxsync $ */
[1]2/** @file
3 * VirtualBox Driver interface to VMM device
4 */
5
6/*
[98103]7 * Copyright (C) 2006-2023 Oracle and/or its affiliates.
[1]8 *
[96407]9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
[1]26 */
27
[76562]28#ifndef MAIN_INCLUDED_VMMDev_h
29#define MAIN_INCLUDED_VMMDev_h
[76487]30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
[1]33
34#include "VirtualBoxBase.h"
[35346]35#include <VBox/vmm/pdmdrv.h>
[76382]36#include <VBox/hgcmsvc.h>
[29250]37#include <iprt/asm.h>
[1]38
39class Console;
40
[47190]41class VMMDevMouseInterface
[1]42{
43public:
[84342]44 virtual ~VMMDevMouseInterface() { /* Make VC++ 19.2 happy. */ }
[47190]45 virtual PPDMIVMMDEVPORT getVMMDevPort() = 0;
46};
47
48class VMMDev : public VMMDevMouseInterface
49{
50public:
[1]51 VMMDev(Console *console);
52 virtual ~VMMDev();
53 static const PDMDRVREG DrvReg;
54 /** Pointer to the associated VMMDev driver. */
55 struct DRVMAINVMMDEV *mpDrv;
56
[1681]57 bool fSharedFolderActive;
58 bool isShFlActive()
59 {
60 return fSharedFolderActive;
61 }
[1]62
63 Console *getParent()
64 {
65 return mParent;
66 }
67
68 int WaitCredentialsJudgement (uint32_t u32Timeout, uint32_t *pu32GuestFlags);
69 int SetCredentialsJudgementResult (uint32_t u32Flags);
70
71 PPDMIVMMDEVPORT getVMMDevPort();
72
[47190]73#ifdef VBOX_WITH_HGCM
[6792]74 int hgcmLoadService (const char *pszServiceLibrary, const char *pszServiceName);
[1]75 int hgcmHostCall (const char *pszServiceName, uint32_t u32Function, uint32_t cParms, PVBOXHGCMSVCPARM paParms);
[75574]76 void hgcmShutdown(bool fUvmIsInvalid = false);
[1]77
[11844]78 bool hgcmIsActive (void) { return ASMAtomicReadBool(&m_fHGCMActive); }
[47190]79#endif /* VBOX_WITH_HGCM */
[11844]80
[1]81private:
[75955]82#ifdef VBOX_WITH_HGCM
83# ifdef VBOX_WITH_GUEST_PROPS
84 void i_guestPropSetMultiple(void *names, void *values, void *timestamps, void *flags);
85 void i_guestPropSet(const char *pszName, const char *pszValue, const char *pszFlags);
86 int i_guestPropSetGlobalPropertyFlags(uint32_t fFlags);
87 int i_guestPropLoadAndConfigure();
88# endif
89#endif
[25966]90 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID);
[26173]91 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
[1]92 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns);
93 static DECLCALLBACK(void) drvReset(PPDMDRVINS pDrvIns);
[75969]94 static DECLCALLBACK(void) drvPowerOn(PPDMDRVINS pDrvIns);
95 static DECLCALLBACK(void) drvPowerOff(PPDMDRVINS pDrvIns);
96 static DECLCALLBACK(void) drvSuspend(PPDMDRVINS pDrvIns);
97 static DECLCALLBACK(void) drvResume(PPDMDRVINS pDrvIns);
[93444]98 static DECLCALLBACK(int) hgcmSave(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM);
99 static DECLCALLBACK(int) hgcmLoad(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass);
[1]100
[27607]101 Console * const mParent;
[1]102
103 RTSEMEVENT mCredentialsEvent;
104 uint32_t mu32CredentialsFlags;
[14948]105
[11820]106#ifdef VBOX_WITH_HGCM
[29250]107 bool volatile m_fHGCMActive;
[11820]108#endif /* VBOX_WITH_HGCM */
[1]109};
110
[89952]111/** VMMDev object ID used by Console::i_vmm2User_QueryGenericObject and VMMDev::drvConstruct. */
112#define VMMDEV_OID "e2ff0c7b-c02b-46d0-aa90-b9caf0f60561"
113
[76562]114#endif /* !MAIN_INCLUDED_VMMDev_h */
[14949]115/* 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