1 | /* $Id: HGCM.h 106061 2024-09-16 14:03:52Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * HGCM - Host-Guest Communication Manager.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2024 Oracle and/or its affiliates.
|
---|
8 | *
|
---|
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
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef MAIN_INCLUDED_HGCM_h
|
---|
29 | #define MAIN_INCLUDED_HGCM_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | #include <VBox/vmm/pdmifs.h>
|
---|
35 |
|
---|
36 | #include <VBox/hgcmsvc.h>
|
---|
37 |
|
---|
38 | /* Handle of a HGCM service extension. */
|
---|
39 | struct _HGCMSVCEXTHANDLEDATA;
|
---|
40 | typedef struct _HGCMSVCEXTHANDLEDATA *HGCMSVCEXTHANDLE;
|
---|
41 |
|
---|
42 | RT_C_DECLS_BEGIN
|
---|
43 | int HGCMHostInit(void);
|
---|
44 | int HGCMHostShutdown(bool fUvmIsInvalid = false);
|
---|
45 |
|
---|
46 | int HGCMHostReset(bool fForShutdown);
|
---|
47 |
|
---|
48 | int HGCMHostLoad(const char *pszServiceLibrary, const char *pszServiceName,
|
---|
49 | PUVM pUVM, PCVMMR3VTABLE pVMM, PPDMIHGCMPORT pHgcmPort);
|
---|
50 |
|
---|
51 | int HGCMHostRegisterServiceExtension(HGCMSVCEXTHANDLE *pHandle, const char *pszServiceName, PFNHGCMSVCEXT pfnExtension, void *pvExtension);
|
---|
52 | void HGCMHostUnregisterServiceExtension(HGCMSVCEXTHANDLE handle);
|
---|
53 |
|
---|
54 | int HGCMGuestConnect(PPDMIHGCMPORT pHGCMPort, PVBOXHGCMCMD pCmdPtr, const char *pszServiceName, uint32_t *pClientID);
|
---|
55 | int HGCMGuestDisconnect(PPDMIHGCMPORT pHGCMPort, PVBOXHGCMCMD pCmdPtr, uint32_t clientID);
|
---|
56 | int HGCMGuestCall(PPDMIHGCMPORT pHGCMPort, PVBOXHGCMCMD pCmdPtr, uint32_t clientID, uint32_t function, uint32_t cParms,
|
---|
57 | VBOXHGCMSVCPARM *paParms, uint64_t tsArrival);
|
---|
58 | void HGCMGuestCancelled(PPDMIHGCMPORT pHGCMPort, PVBOXHGCMCMD pCmdPtr, uint32_t idClient);
|
---|
59 |
|
---|
60 | int HGCMHostCall(const char *pszServiceName, uint32_t function, uint32_t cParms, VBOXHGCMSVCPARM aParms[]);
|
---|
61 | int HGCMBroadcastEvent(HGCMNOTIFYEVENT enmEvent);
|
---|
62 |
|
---|
63 | int HGCMHostSaveState(PSSMHANDLE pSSM, PCVMMR3VTABLE pVMM);
|
---|
64 | int HGCMHostLoadState(PSSMHANDLE pSSM, PCVMMR3VTABLE pVMM, uint32_t uVersion);
|
---|
65 |
|
---|
66 | RT_C_DECLS_END
|
---|
67 |
|
---|
68 | #endif /* !MAIN_INCLUDED_HGCM_h */
|
---|
69 |
|
---|