1 | /** @file
|
---|
2 | * HGCM - Host-Guest Communication Manager.
|
---|
3 | */
|
---|
4 |
|
---|
5 | /*
|
---|
6 | * Copyright (C) 2006-2007 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 __HGCM_h__
|
---|
18 | #define __HGCM_h__
|
---|
19 |
|
---|
20 | #include <VBox/cdefs.h>
|
---|
21 | #include <VBox/types.h>
|
---|
22 | #include <VBox/vmm/pdmifs.h>
|
---|
23 |
|
---|
24 | #include <VBox/VMMDev.h>
|
---|
25 | #include <VBox/hgcmsvc.h>
|
---|
26 |
|
---|
27 | /* HGCM saved state version */
|
---|
28 | #define HGCM_SSM_VERSION 2
|
---|
29 |
|
---|
30 | /* Handle of a HGCM service extension. */
|
---|
31 | struct _HGCMSVCEXTHANDLEDATA;
|
---|
32 | typedef struct _HGCMSVCEXTHANDLEDATA *HGCMSVCEXTHANDLE;
|
---|
33 |
|
---|
34 | RT_C_DECLS_BEGIN
|
---|
35 | int HGCMHostInit (void);
|
---|
36 | int HGCMHostShutdown (void);
|
---|
37 |
|
---|
38 | int HGCMHostReset (void);
|
---|
39 |
|
---|
40 | int HGCMHostLoad (const char *pszServiceLibrary, const char *pszServiceName);
|
---|
41 |
|
---|
42 | int HGCMHostRegisterServiceExtension (HGCMSVCEXTHANDLE *pHandle, const char *pszServiceName, PFNHGCMSVCEXT pfnExtension, void *pvExtension);
|
---|
43 | void HGCMHostUnregisterServiceExtension (HGCMSVCEXTHANDLE handle);
|
---|
44 |
|
---|
45 | int HGCMGuestConnect (PPDMIHGCMPORT pHGCMPort, PVBOXHGCMCMD pCmdPtr, const char *pszServiceName, uint32_t *pClientID);
|
---|
46 | int HGCMGuestDisconnect (PPDMIHGCMPORT pHGCMPort, PVBOXHGCMCMD pCmdPtr, uint32_t clientID);
|
---|
47 | int HGCMGuestCall (PPDMIHGCMPORT pHGCMPort, PVBOXHGCMCMD pCmdPtr, uint32_t clientID, uint32_t function, uint32_t cParms, VBOXHGCMSVCPARM *paParms);
|
---|
48 |
|
---|
49 | int HGCMHostCall (const char *pszServiceName, uint32_t function, uint32_t cParms, VBOXHGCMSVCPARM aParms[]);
|
---|
50 |
|
---|
51 | #ifdef VBOX_WITH_CRHGSMI
|
---|
52 | int HGCMHostSvcHandleCreate (const char *pszServiceName, HGCMCVSHANDLE * phSvc);
|
---|
53 | int HGCMHostSvcHandleDestroy (HGCMCVSHANDLE hSvc);
|
---|
54 | int HGCMHostFastCallAsync (HGCMCVSHANDLE hSvc, uint32_t function, PVBOXHGCMSVCPARM pParm, PHGCMHOSTFASTCALLCB pfnCompletion, void *pvCompletion);
|
---|
55 | #endif
|
---|
56 |
|
---|
57 | int HGCMHostSaveState (PSSMHANDLE pSSM);
|
---|
58 | int HGCMHostLoadState (PSSMHANDLE pSSM);
|
---|
59 |
|
---|
60 | RT_C_DECLS_END
|
---|
61 |
|
---|
62 | #endif /* __HGCM_h__ */
|
---|