VirtualBox

source: vbox/trunk/include/VBox/VBoxGuestLib.h@ 68654

Last change on this file since 68654 was 68654, checked in by vboxsync, 7 years ago

VBoxGuestR0Lib: Function prefix and DECL macro cleanups.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 40.7 KB
Line 
1/** @file
2 * VBoxGuestLib - VirtualBox Guest Additions Library.
3 */
4
5/*
6 * Copyright (C) 2006-2016 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 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25
26#ifndef ___VBox_VBoxGuestLib_h
27#define ___VBox_VBoxGuestLib_h
28
29#include <VBox/types.h>
30#include <VBox/VMMDevCoreTypes.h>
31#include <VBox/VBoxGuestCoreTypes.h>
32
33
34/** @defgroup grp_vboxguest_lib VirtualBox Guest Additions Library
35 * @ingroup grp_vboxguest
36 * @{
37 */
38
39/** @page pg_guest_lib VirtualBox Guest Library
40 *
41 * This is a library for abstracting the additions driver interface. There are
42 * multiple versions of the library depending on the context. The main
43 * distinction is between kernel and user mode where the interfaces are very
44 * different.
45 *
46 *
47 * @section sec_guest_lib_ring0 Ring-0
48 *
49 * In ring-0 there are two version:
50 * - VBOX_LIB_VBGL_R0_BASE / VBoxGuestR0LibBase for the VBoxGuest main driver,
51 * who is responsible for managing the VMMDev virtual hardware.
52 * - VBOX_LIB_VBGL_R0 / VBoxGuestR0Lib for other (client) guest drivers.
53 *
54 *
55 * The library source code and the header have a define VBGL_VBOXGUEST, which is
56 * defined for VBoxGuest and undefined for other drivers. Drivers must choose
57 * right library in their makefiles and set VBGL_VBOXGUEST accordingly.
58 *
59 * The libraries consists of:
60 * - common code to be used by both VBoxGuest and other drivers;
61 * - VBoxGuest specific code;
62 * - code for other drivers which communicate with VBoxGuest via an IOCTL.
63 *
64 *
65 * @section sec_guest_lib_ring3 Ring-3
66 *
67 * There are more variants of the library here:
68 * - VBOX_LIB_VBGL_R3 / VBoxGuestR3Lib for programs.
69 * - VBOX_LIB_VBGL_R3_XFREE86 / VBoxGuestR3LibXFree86 for old style XFree
70 * drivers which uses special loader and or symbol resolving strategy.
71 * - VBOX_LIB_VBGL_R3_SHARED / VBoxGuestR3LibShared for shared objects / DLLs /
72 * Dylibs.
73 *
74 */
75
76RT_C_DECLS_BEGIN
77
78/** HGCM client ID.
79 * @todo Promote to VBox/types.h */
80typedef uint32_t HGCMCLIENTID;
81
82
83/** @defgroup grp_vboxguest_lib_r0 Ring-0 interface.
84 * @{
85 */
86#if defined(IN_RING0) && !defined(IN_RING0_AGNOSTIC)
87/** @def DECLR0VBGL
88 * Declare a VBGL ring-0 API with the right calling convention and visibilitiy.
89 * @param type Return type. */
90# ifdef RT_OS_DARWIN /** @todo probably apply to all, but don't want a forest fire on our hands right now. */
91# define DECLR0VBGL(type) DECLHIDDEN(type) VBOXCALL
92# else
93# define DECLR0VBGL(type) type VBOXCALL
94# endif
95# define DECLVBGL(type) DECLR0VBGL(type)
96
97
98/**
99 * The library initialization function to be used by the main VBoxGuest driver.
100 *
101 * @return VBox status code.
102 */
103DECLR0VBGL(int) VbglR0InitPrimary(RTIOPORT portVMMDev, struct VMMDevMemory *pVMMDevMemory);
104
105/**
106 * The library termination function to be used by the main VBoxGuest driver.
107 *
108 * @author bird (2017-08-23)
109 */
110DECLR0VBGL(void) VbglR0TerminatePrimary(void);
111
112/**
113 * The library initialization function to be used by all drivers
114 * other than the main VBoxGuest system driver.
115 *
116 * @return VBox status code.
117 */
118DECLR0VBGL(int) VbglR0InitClient(void);
119
120/**
121 * The library termination function.
122 */
123DECLR0VBGL(void) VbglR0TerminateClient(void);
124
125
126/** @name The IDC Client Interface
127 * @{
128 */
129
130/**
131 * Inter-Driver Communication Handle.
132 */
133typedef union VBGLIDCHANDLE
134{
135 /** Padding for opaque usage.
136 * Must be greater or equal in size than the private struct. */
137 void *apvPadding[4];
138#ifdef VBGLIDCHANDLEPRIVATE_DECLARED
139 /** The private view. */
140 struct VBGLIDCHANDLEPRIVATE s;
141#endif
142} VBGLIDCHANDLE;
143/** Pointer to a handle. */
144typedef VBGLIDCHANDLE *PVBGLIDCHANDLE;
145
146DECLR0VBGL(int) VbglR0IdcOpen(PVBGLIDCHANDLE pHandle, uint32_t uReqVersion, uint32_t uMinVersion,
147 uint32_t *puSessionVersion, uint32_t *puDriverVersion, uint32_t *puDriverRevision);
148struct VBGLREQHDR;
149DECLR0VBGL(int) VbglR0IdcCallRaw(PVBGLIDCHANDLE pHandle, uintptr_t uReq, struct VBGLREQHDR *pReqHdr, uint32_t cbReq);
150DECLR0VBGL(int) VbglR0IdcCall(PVBGLIDCHANDLE pHandle, uintptr_t uReq, struct VBGLREQHDR *pReqHdr, uint32_t cbReq);
151DECLR0VBGL(int) VbglR0IdcClose(PVBGLIDCHANDLE pHandle);
152
153/** @} */
154
155
156/** @name Generic request functions.
157 * @{
158 */
159
160/**
161 * Allocate memory for generic request and initialize the request header.
162 *
163 * @returns VBox status code.
164 * @param ppReq Where to return the pointer to the allocated memory.
165 * @param cbReq Size of memory block required for the request.
166 * @param enmReqType the generic request type.
167 */
168# if defined(___VBox_VMMDev_h) || defined(DOXYGEN_RUNNING)
169DECLR0VBGL(int) VbglR0GRAlloc(struct VMMDevRequestHeader **ppReq, size_t cbReq, VMMDevRequestType enmReqType);
170# else
171DECLR0VBGL(int) VbglR0GRAlloc(struct VMMDevRequestHeader **ppReq, size_t cbReq, int32_t enmReqType);
172# endif
173
174/**
175 * Perform the generic request.
176 *
177 * @param pReq pointer the request structure.
178 *
179 * @return VBox status code.
180 */
181DECLR0VBGL(int) VbglR0GRPerform(struct VMMDevRequestHeader *pReq);
182
183/**
184 * Free the generic request memory.
185 *
186 * @param pReq pointer the request structure.
187 *
188 * @return VBox status code.
189 */
190DECLR0VBGL(void) VbglR0GRFree(struct VMMDevRequestHeader *pReq);
191
192/**
193 * Verify the generic request header.
194 *
195 * @param pReq pointer the request header structure.
196 * @param cbReq size of the request memory block. It should be equal to the request size
197 * for fixed size requests. It can be greater than the request size for
198 * variable size requests.
199 *
200 * @return VBox status code.
201 */
202DECLR0VBGL(int) VbglGR0Verify(const struct VMMDevRequestHeader *pReq, size_t cbReq);
203
204/** @} */
205
206# ifdef VBOX_WITH_HGCM
207struct VBGLIOCHGCMCALL;
208
209# ifdef VBGL_VBOXGUEST
210
211/**
212 * Callback function called from HGCM helpers when a wait for request
213 * completion IRQ is required.
214 *
215 * @returns VINF_SUCCESS, VERR_INTERRUPT or VERR_TIMEOUT.
216 * @param pvData VBoxGuest pointer to be passed to callback.
217 * @param u32Data VBoxGuest 32 bit value to be passed to callback.
218 */
219typedef DECLCALLBACK(int) FNVBGLHGCMCALLBACK(VMMDevHGCMRequestHeader *pHeader, void *pvData, uint32_t u32Data);
220/** Pointer to a FNVBGLHGCMCALLBACK. */
221typedef FNVBGLHGCMCALLBACK *PFNVBGLHGCMCALLBACK;
222
223/**
224 * Perform a connect request.
225 *
226 * That is locate required service and obtain a client identifier for future
227 * access.
228 *
229 * @note This function can NOT handle cancelled requests!
230 *
231 * @param pLoc The service to connect to.
232 * @param pidClient Where to return the client ID on success.
233 * @param pfnAsyncCallback Required pointer to function that is calledwhen
234 * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
235 * implements waiting for an IRQ in this function.
236 * @param pvAsyncData An arbitrary VBoxGuest pointer to be passed to callback.
237 * @param u32AsyncData An arbitrary VBoxGuest 32 bit value to be passed to callback.
238 *
239 * @return VBox status code.
240 */
241DECLR0VBGL(int) VbglR0HGCMInternalConnect(HGCMServiceLocation const *pLoc, HGCMCLIENTID *pidClient,
242 PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
243
244
245/**
246 * Perform a disconnect request.
247 *
248 * That is tell the host that the client will not call the service anymore.
249 *
250 * @note This function can NOT handle cancelled requests!
251 *
252 * @param idClient The client ID to disconnect.
253 * @param pfnAsyncCallback Required pointer to function that is called when
254 * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
255 * implements waiting for an IRQ in this function.
256 * @param pvAsyncData An arbitrary VBoxGuest pointer to be passed to callback.
257 * @param u32AsyncData An arbitrary VBoxGuest 32 bit value to be passed to
258 * callback.
259 *
260 * @return VBox status code.
261 */
262
263DECLR0VBGL(int) VbglR0HGCMInternalDisconnect(HGCMCLIENTID idClient,
264 PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
265
266/** Call a HGCM service.
267 *
268 * @note This function can deal with cancelled requests.
269 *
270 * @param pCallInfo The request data.
271 * @param fFlags Flags, see VBGLR0_HGCMCALL_F_XXX.
272 * @param pfnAsyncCallback Required pointer to function that is called when
273 * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
274 * implements waiting for an IRQ in this function.
275 * @param pvAsyncData An arbitrary VBoxGuest pointer to be passed to callback.
276 * @param u32AsyncData An arbitrary VBoxGuest 32 bit value to be passed to callback.
277 *
278 * @return VBox status code.
279 */
280DECLR0VBGL(int) VbglR0HGCMInternalCall(struct VBGLIOCHGCMCALL *pCallInfo, uint32_t cbCallInfo, uint32_t fFlags,
281 PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
282
283/** Call a HGCM service. (32 bits packet structure in a 64 bits guest)
284 *
285 * @note This function can deal with cancelled requests.
286 *
287 * @param pCallInfo The request data.
288 * @param fFlags Flags, see VBGLR0_HGCMCALL_F_XXX.
289 * @param pfnAsyncCallback Required pointer to function that is called when
290 * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
291 * implements waiting for an IRQ in this function.
292 * @param pvAsyncData An arbitrary VBoxGuest pointer to be passed to callback.
293 * @param u32AsyncData An arbitrary VBoxGuest 32 bit value to be passed to callback.
294 *
295 * @return VBox status code.
296 */
297DECLR0VBGL(int) VbglR0HGCMInternalCall32(struct VBGLIOCHGCMCALL *pCallInfo, uint32_t cbCallInfo, uint32_t fFlags,
298 PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
299
300/** @name VbglR0HGCMInternalCall flags
301 * @{ */
302/** User mode request.
303 * Indicates that only user mode addresses are permitted as parameters. */
304#define VBGLR0_HGCMCALL_F_USER UINT32_C(0)
305/** Kernel mode request.
306 * Indicates that kernel mode addresses are permitted as parameters. Whether or
307 * not user mode addresses are permitted is, unfortunately, OS specific. The
308 * following OSes allows user mode addresses: Windows, TODO.
309 */
310#define VBGLR0_HGCMCALL_F_KERNEL UINT32_C(1)
311/** Mode mask. */
312#define VBGLR0_HGCMCALL_F_MODE_MASK UINT32_C(1)
313/** @} */
314
315# else /* !VBGL_VBOXGUEST */
316
317struct VBGLHGCMHANDLEDATA;
318typedef struct VBGLHGCMHANDLEDATA *VBGLHGCMHANDLE;
319
320/** @name HGCM functions
321 * @{
322 */
323
324/**
325 * Initializes HGCM in the R0 guest library. Must be called before any HGCM
326 * connections are made. Is called by VbglInitClient().
327 *
328 * @return VBox status code.
329 */
330DECLR0VBGL(int) VbglR0HGCMInit(void);
331
332/**
333 * Terminates HGCM in the R0 guest library. Is called by VbglTerminate().
334 *
335 * @return VBox status code.
336 */
337DECLR0VBGL(int) VbglR0HGCMTerminate(void);
338
339/**
340 * Connect to a service.
341 *
342 * @param pHandle Pointer to variable that will hold a handle to be used
343 * further in VbglHGCMCall and VbglHGCMClose.
344 * @param pszServiceName The service to connect to.
345 * @param pidClient Where to return the client ID for the connection.
346 *
347 * @return VBox status code.
348 *
349 * @todo consider baking the client Id into the handle.
350 */
351DECLR0VBGL(int) VbglR0HGCMConnect(VBGLHGCMHANDLE *pHandle, const char *pszServiceName, HGCMCLIENTID *pidClient);
352
353/**
354 * Connect to a service.
355 *
356 * @param handle Handle of the connection.
357 * @param idClient The ID of the client connection.
358 *
359 * @return VBox status code.
360 *
361 * @todo consider baking the client Id into the handle.
362 */
363DECLR0VBGL(int) VbglR0HGCMDisconnect(VBGLHGCMHANDLE handle, HGCMCLIENTID idClient);
364
365/**
366 * Call to a service, returning only the I/O control status code.
367 *
368 * @param handle Handle of the connection.
369 * @param pData Call request information structure, including function parameters.
370 * @param cbData Length in bytes of data.
371 *
372 * @return VBox status code.
373 */
374DECLR0VBGL(int) VbglR0HGCMCallRaw(VBGLHGCMHANDLE handle, struct VBGLIOCHGCMCALL*pData, uint32_t cbData);
375
376/**
377 * Call to a service, returning the HGCM status code.
378 *
379 * @param handle Handle of the connection.
380 * @param pData Call request information structure, including function parameters.
381 * @param cbData Length in bytes of data.
382 *
383 * @return VBox status code. Either the I/O control status code if that failed,
384 * or the HGCM status code (pData->Hdr.rc).
385 */
386DECLR0VBGL(int) VbglR0HGCMCall(VBGLHGCMHANDLE handle, struct VBGLIOCHGCMCALL*pData, uint32_t cbData);
387
388/**
389 * Call to a service with user-mode data received by the calling driver from the User-Mode process.
390 * The call must be done in the context of a calling process.
391 *
392 * @param handle Handle of the connection.
393 * @param pData Call request information structure, including function parameters.
394 * @param cbData Length in bytes of data.
395 *
396 * @return VBox status code.
397 */
398DECLR0VBGL(int) VbglR0HGCMCallUserDataRaw(VBGLHGCMHANDLE handle, struct VBGLIOCHGCMCALL*pData, uint32_t cbData);
399
400/** @} */
401
402/** @name Undocumented helpers for talking to the Chromium OpenGL Host Service
403 * @{ */
404typedef VBGLHGCMHANDLE VBGLCRCTLHANDLE;
405DECLR0VBGL(int) VbglR0CrCtlCreate(VBGLCRCTLHANDLE *phCtl);
406DECLR0VBGL(int) VbglR0CrCtlDestroy(VBGLCRCTLHANDLE hCtl);
407DECLR0VBGL(int) VbglR0CrCtlConConnect(VBGLCRCTLHANDLE hCtl, HGCMCLIENTID *pidClient);
408DECLR0VBGL(int) VbglR0CrCtlConDisconnect(VBGLCRCTLHANDLE hCtl, HGCMCLIENTID idClient);
409struct VBGLIOCHGCMCALL;
410DECLR0VBGL(int) VbglR0CrCtlConCallRaw(VBGLCRCTLHANDLE hCtl, struct VBGLIOCHGCMCALL *pCallInfo, int cbCallInfo);
411DECLR0VBGL(int) VbglR0CrCtlConCall(VBGLCRCTLHANDLE hCtl, struct VBGLIOCHGCMCALL *pCallInfo, int cbCallInfo);
412DECLR0VBGL(int) VbglR0CrCtlConCallUserDataRaw(VBGLCRCTLHANDLE hCtl, struct VBGLIOCHGCMCALL *pCallInfo, int cbCallInfo);
413/** @} */
414
415# endif /* !VBGL_VBOXGUEST */
416
417# endif /* VBOX_WITH_HGCM */
418
419
420/**
421 * Initialize the heap.
422 *
423 * @returns VBox status code.
424 */
425DECLR0VBGL(int) VbglR0PhysHeapInit(void);
426
427/**
428 * Shutdown the heap.
429 */
430DECLR0VBGL(void) VbglR0PhysHeapTerminate(void);
431
432/**
433 * Allocate a memory block.
434 *
435 * @returns Virtual address of the allocated memory block.
436 * @param cbSize Size of block to be allocated.
437 */
438DECLR0VBGL(void *) VbglR0PhysHeapAlloc(uint32_t cbSize);
439
440/**
441 * Get physical address of memory block pointed by the virtual address.
442 *
443 * @note WARNING!
444 * The function does not acquire the Heap mutex!
445 * When calling the function make sure that the pointer is a valid one and
446 * is not being deallocated. This function can NOT be used for verifying
447 * if the given pointer is a valid one allocated from the heap.
448 *
449 * @param pv Virtual address of memory block.
450 * @returns Physical address of the memory block.
451 */
452DECLR0VBGL(uint32_t) VbglR0PhysHeapGetPhysAddr(void *pv);
453
454/**
455 * Free a memory block.
456 *
457 * @param pv Virtual address of memory block.
458 */
459DECLR0VBGL(void) VbglR0PhysHeapFree(void *pv);
460
461DECLR0VBGL(int) VbglR0QueryVMMDevMemory(struct VMMDevMemory **ppVMMDevMemory);
462DECLR0VBGL(bool) VbglR0CanUsePhysPageList(void);
463
464# ifndef VBOX_GUEST
465/** @name Mouse
466 * @{ */
467DECLR0VBGL(int) VbglR0SetMouseNotifyCallback(PFNVBOXGUESTMOUSENOTIFY pfnNotify, void *pvUser);
468DECLR0VBGL(int) VbglR0GetMouseStatus(uint32_t *pfFeatures, uint32_t *px, uint32_t *py);
469DECLR0VBGL(int) VbglR0SetMouseStatus(uint32_t fFeatures);
470/** @} */
471# endif /* VBOX_GUEST */
472
473#endif /* IN_RING0 && !IN_RING0_AGNOSTIC */
474
475/** @} */
476
477
478/** @defgroup grp_vboxguest_lib_r3 Ring-3 interface.
479 * @{
480 */
481#ifdef IN_RING3
482
483/** @def VBGLR3DECL
484 * Ring 3 VBGL declaration.
485 * @param type The return type of the function declaration.
486 */
487# define VBGLR3DECL(type) DECLHIDDEN(type) VBOXCALL
488
489/** @name General-purpose functions
490 * @{ */
491VBGLR3DECL(int) VbglR3Init(void);
492VBGLR3DECL(int) VbglR3InitUser(void);
493VBGLR3DECL(void) VbglR3Term(void);
494# ifdef ___iprt_time_h
495VBGLR3DECL(int) VbglR3GetHostTime(PRTTIMESPEC pTime);
496# endif
497VBGLR3DECL(int) VbglR3InterruptEventWaits(void);
498VBGLR3DECL(int) VbglR3WriteLog(const char *pch, size_t cch);
499VBGLR3DECL(int) VbglR3CtlFilterMask(uint32_t fOr, uint32_t fNot);
500VBGLR3DECL(int) VbglR3Daemonize(bool fNoChDir, bool fNoClose, bool fRespawn, unsigned *pcRespawn);
501VBGLR3DECL(int) VbglR3PidFile(const char *pszPath, PRTFILE phFile);
502VBGLR3DECL(void) VbglR3ClosePidFile(const char *pszPath, RTFILE hFile);
503VBGLR3DECL(int) VbglR3SetGuestCaps(uint32_t fOr, uint32_t fNot);
504VBGLR3DECL(int) VbglR3AcquireGuestCaps(uint32_t fOr, uint32_t fNot, bool fConfig);
505VBGLR3DECL(int) VbglR3WaitEvent(uint32_t fMask, uint32_t cMillies, uint32_t *pfEvents);
506
507VBGLR3DECL(int) VbglR3ReportAdditionsStatus(VBoxGuestFacilityType Facility, VBoxGuestFacilityStatus StatusCurrent,
508 uint32_t fFlags);
509VBGLR3DECL(int) VbglR3GetAdditionsVersion(char **ppszVer, char **ppszVerEx, char **ppszRev);
510VBGLR3DECL(int) VbglR3GetAdditionsInstallationPath(char **ppszPath);
511VBGLR3DECL(int) VbglR3GetSessionId(uint64_t *pu64IdSession);
512
513/** @} */
514
515/** @name Shared clipboard
516 * @{ */
517VBGLR3DECL(int) VbglR3ClipboardConnect(HGCMCLIENTID *pidClient);
518VBGLR3DECL(int) VbglR3ClipboardDisconnect(HGCMCLIENTID idClient);
519VBGLR3DECL(int) VbglR3ClipboardGetHostMsg(HGCMCLIENTID idClient, uint32_t *pMsg, uint32_t *pfFormats);
520VBGLR3DECL(int) VbglR3ClipboardReadData(HGCMCLIENTID idClient, uint32_t fFormat, void *pv, uint32_t cb, uint32_t *pcb);
521VBGLR3DECL(int) VbglR3ClipboardReportFormats(HGCMCLIENTID idClient, uint32_t fFormats);
522VBGLR3DECL(int) VbglR3ClipboardWriteData(HGCMCLIENTID idClient, uint32_t fFormat, void *pv, uint32_t cb);
523/** @} */
524
525/** @name Seamless mode
526 * @{ */
527VBGLR3DECL(int) VbglR3SeamlessSetCap(bool fState);
528VBGLR3DECL(int) VbglR3SeamlessWaitEvent(VMMDevSeamlessMode *pMode);
529VBGLR3DECL(int) VbglR3SeamlessSendRects(uint32_t cRects, PRTRECT pRects);
530VBGLR3DECL(int) VbglR3SeamlessGetLastEvent(VMMDevSeamlessMode *pMode);
531
532/** @} */
533
534/** @name Mouse
535 * @{ */
536VBGLR3DECL(int) VbglR3GetMouseStatus(uint32_t *pfFeatures, uint32_t *px, uint32_t *py);
537VBGLR3DECL(int) VbglR3SetMouseStatus(uint32_t fFeatures);
538/** @} */
539
540/** @name Video
541 * @{ */
542VBGLR3DECL(int) VbglR3VideoAccelEnable(bool fEnable);
543VBGLR3DECL(int) VbglR3VideoAccelFlush(void);
544VBGLR3DECL(int) VbglR3SetPointerShape(uint32_t fFlags, uint32_t xHot, uint32_t yHot, uint32_t cx, uint32_t cy,
545 const void *pvImg, size_t cbImg);
546VBGLR3DECL(int) VbglR3SetPointerShapeReq(struct VMMDevReqMousePointer *pReq);
547/** @} */
548
549/** @name Display
550 * @{ */
551/** The folder for the video mode hint unix domain socket on Unix-like guests.
552 * @note This can be safely changed as all users are rebuilt in lock-step. */
553#define VBGLR3HOSTDISPSOCKETPATH "/tmp/.VBoxService"
554/** The path to the video mode hint unix domain socket on Unix-like guests. */
555#define VBGLR3HOSTDISPSOCKET VBGLR3VIDEOMODEHINTSOCKETPATH "/VideoModeHint"
556
557/** The folder for saving video mode hints to between sessions. */
558#define VBGLR3HOSTDISPSAVEDMODEPATH "/var/lib/VBoxGuestAdditions"
559/** The path to the file for saving video mode hints to between sessions. */
560#define VBGLR3HOSTDISPSAVEDMODE VBGLR3HOSTDISPSAVEDMODEPATH "/SavedVideoModes"
561
562VBGLR3DECL(int) VbglR3GetDisplayChangeRequest(uint32_t *pcx, uint32_t *pcy, uint32_t *pcBits, uint32_t *piDisplay,
563 uint32_t *pdx, uint32_t *pdy, bool *pfEnabled, bool *pfChangeOrigin, bool fAck);
564VBGLR3DECL(bool) VbglR3HostLikesVideoMode(uint32_t cx, uint32_t cy, uint32_t cBits);
565VBGLR3DECL(int) VbglR3VideoModeGetHighestSavedScreen(unsigned *pcScreen);
566VBGLR3DECL(int) VbglR3SaveVideoMode(unsigned cScreen, unsigned cx, unsigned cy, unsigned cBits,
567 unsigned x, unsigned y, bool fEnabled);
568VBGLR3DECL(int) VbglR3RetrieveVideoMode(unsigned cScreen, unsigned *pcx, unsigned *pcy, unsigned *pcBits,
569 unsigned *px, unsigned *py, bool *pfEnabled);
570/** @} */
571
572/** @name VRDP
573 * @{ */
574VBGLR3DECL(int) VbglR3VrdpGetChangeRequest(bool *pfActive, uint32_t *puExperienceLevel);
575/** @} */
576
577/** @name VM Statistics
578 * @{ */
579VBGLR3DECL(int) VbglR3StatQueryInterval(uint32_t *pu32Interval);
580# if defined(___VBox_VMMDev_h) || defined(DOXYGEN_RUNNING)
581VBGLR3DECL(int) VbglR3StatReport(VMMDevReportGuestStats *pReq);
582# endif
583/** @} */
584
585/** @name Memory ballooning
586 * @{ */
587VBGLR3DECL(int) VbglR3MemBalloonRefresh(uint32_t *pcChunks, bool *pfHandleInR3);
588VBGLR3DECL(int) VbglR3MemBalloonChange(void *pv, bool fInflate);
589/** @} */
590
591/** @name Core Dump
592 * @{ */
593VBGLR3DECL(int) VbglR3WriteCoreDump(void);
594
595/** @} */
596
597# ifdef VBOX_WITH_GUEST_PROPS
598/** @name Guest properties
599 * @{ */
600/** @todo Docs. */
601typedef struct VBGLR3GUESTPROPENUM VBGLR3GUESTPROPENUM;
602/** @todo Docs. */
603typedef VBGLR3GUESTPROPENUM *PVBGLR3GUESTPROPENUM;
604VBGLR3DECL(int) VbglR3GuestPropConnect(uint32_t *pidClient);
605VBGLR3DECL(int) VbglR3GuestPropDisconnect(HGCMCLIENTID idClient);
606VBGLR3DECL(int) VbglR3GuestPropWrite(HGCMCLIENTID idClient, const char *pszName, const char *pszValue, const char *pszFlags);
607VBGLR3DECL(int) VbglR3GuestPropWriteValue(HGCMCLIENTID idClient, const char *pszName, const char *pszValue);
608VBGLR3DECL(int) VbglR3GuestPropWriteValueV(HGCMCLIENTID idClient, const char *pszName,
609 const char *pszValueFormat, va_list va) RT_IPRT_FORMAT_ATTR(3, 0);
610VBGLR3DECL(int) VbglR3GuestPropWriteValueF(HGCMCLIENTID idClient, const char *pszName,
611 const char *pszValueFormat, ...) RT_IPRT_FORMAT_ATTR(3, 4);
612VBGLR3DECL(int) VbglR3GuestPropRead(HGCMCLIENTID idClient, const char *pszName, void *pvBuf, uint32_t cbBuf, char **ppszValue,
613 uint64_t *pu64Timestamp, char **ppszFlags, uint32_t *pcbBufActual);
614VBGLR3DECL(int) VbglR3GuestPropReadValue(uint32_t ClientId, const char *pszName, char *pszValue, uint32_t cchValue,
615 uint32_t *pcchValueActual);
616VBGLR3DECL(int) VbglR3GuestPropReadValueAlloc(HGCMCLIENTID idClient, const char *pszName, char **ppszValue);
617VBGLR3DECL(void) VbglR3GuestPropReadValueFree(char *pszValue);
618VBGLR3DECL(int) VbglR3GuestPropEnumRaw(HGCMCLIENTID idClient, const char *paszPatterns, char *pcBuf, uint32_t cbBuf,
619 uint32_t *pcbBufActual);
620VBGLR3DECL(int) VbglR3GuestPropEnum(HGCMCLIENTID idClient, char const * const *ppaszPatterns, uint32_t cPatterns,
621 PVBGLR3GUESTPROPENUM *ppHandle, char const **ppszName, char const **ppszValue,
622 uint64_t *pu64Timestamp, char const **ppszFlags);
623VBGLR3DECL(int) VbglR3GuestPropEnumNext(PVBGLR3GUESTPROPENUM pHandle, char const **ppszName, char const **ppszValue,
624 uint64_t *pu64Timestamp, char const **ppszFlags);
625VBGLR3DECL(void) VbglR3GuestPropEnumFree(PVBGLR3GUESTPROPENUM pHandle);
626VBGLR3DECL(int) VbglR3GuestPropDelete(HGCMCLIENTID idClient, const char *pszName);
627VBGLR3DECL(int) VbglR3GuestPropDelSet(HGCMCLIENTID idClient, char const * const *papszPatterns, uint32_t cPatterns);
628VBGLR3DECL(int) VbglR3GuestPropWait(HGCMCLIENTID idClient, const char *pszPatterns, void *pvBuf, uint32_t cbBuf,
629 uint64_t u64Timestamp, uint32_t cMillies, char ** ppszName, char **ppszValue,
630 uint64_t *pu64Timestamp, char **ppszFlags, uint32_t *pcbBufActual);
631/** @} */
632
633/** @name Guest user handling / reporting.
634 * @{ */
635VBGLR3DECL(int) VbglR3GuestUserReportState(const char *pszUser, const char *pszDomain, VBoxGuestUserState enmState,
636 uint8_t *pbDetails, uint32_t cbDetails);
637/** @} */
638
639/** @name Host version handling
640 * @{ */
641VBGLR3DECL(int) VbglR3HostVersionCheckForUpdate(HGCMCLIENTID idClient, bool *pfUpdate, char **ppszHostVersion,
642 char **ppszGuestVersion);
643VBGLR3DECL(int) VbglR3HostVersionLastCheckedLoad(HGCMCLIENTID idClient, char **ppszVer);
644VBGLR3DECL(int) VbglR3HostVersionLastCheckedStore(HGCMCLIENTID idClient, const char *pszVer);
645/** @} */
646# endif /* VBOX_WITH_GUEST_PROPS defined */
647
648# ifdef VBOX_WITH_SHARED_FOLDERS
649/** @name Shared folders
650 * @{ */
651/**
652 * Structure containing mapping information for a shared folder.
653 */
654typedef struct VBGLR3SHAREDFOLDERMAPPING
655{
656 /** Mapping status. */
657 uint32_t u32Status;
658 /** Root handle. */
659 uint32_t u32Root;
660} VBGLR3SHAREDFOLDERMAPPING;
661/** Pointer to a shared folder mapping information structure. */
662typedef VBGLR3SHAREDFOLDERMAPPING *PVBGLR3SHAREDFOLDERMAPPING;
663/** Pointer to a const shared folder mapping information structure. */
664typedef VBGLR3SHAREDFOLDERMAPPING const *PCVBGLR3SHAREDFOLDERMAPPING;
665
666VBGLR3DECL(int) VbglR3SharedFolderConnect(uint32_t *pidClient);
667VBGLR3DECL(int) VbglR3SharedFolderDisconnect(HGCMCLIENTID idClient);
668VBGLR3DECL(bool) VbglR3SharedFolderExists(HGCMCLIENTID idClient, const char *pszShareName);
669VBGLR3DECL(int) VbglR3SharedFolderGetMappings(HGCMCLIENTID idClient, bool fAutoMountOnly,
670 PVBGLR3SHAREDFOLDERMAPPING *ppaMappings, uint32_t *pcMappings);
671VBGLR3DECL(void) VbglR3SharedFolderFreeMappings(PVBGLR3SHAREDFOLDERMAPPING paMappings);
672VBGLR3DECL(int) VbglR3SharedFolderGetName(HGCMCLIENTID idClient,uint32_t u32Root, char **ppszName);
673VBGLR3DECL(int) VbglR3SharedFolderGetMountPrefix(char **ppszPrefix);
674VBGLR3DECL(int) VbglR3SharedFolderGetMountDir(char **ppszDir);
675/** @} */
676# endif /* VBOX_WITH_SHARED_FOLDERS defined */
677
678# ifdef VBOX_WITH_GUEST_CONTROL
679/** @name Guest control
680 * @{ */
681
682/**
683 * Structure containing the context required for
684 * either retrieving or sending a HGCM guest control
685 * commands from or to the host.
686 *
687 * Note: Do not change parameter order without also
688 * adapting all structure initializers.
689 */
690typedef struct VBGLR3GUESTCTRLCMDCTX
691{
692 /** @todo This struct could be handy if we want to implement
693 * a second communication channel, e.g. via TCP/IP.
694 * Use a union for the HGCM stuff then. */
695
696 /** IN: HGCM client ID to use for
697 * communication. */
698 uint32_t uClientID;
699 /** IN/OUT: Context ID to retrieve
700 * or to use. */
701 uint32_t uContextID;
702 /** IN: Protocol version to use. */
703 uint32_t uProtocol;
704 /** OUT: Number of parameters retrieved. */
705 uint32_t uNumParms;
706} VBGLR3GUESTCTRLCMDCTX, *PVBGLR3GUESTCTRLCMDCTX;
707
708/* General message handling on the guest. */
709VBGLR3DECL(int) VbglR3GuestCtrlConnect(uint32_t *pidClient);
710VBGLR3DECL(int) VbglR3GuestCtrlDisconnect(uint32_t idClient);
711VBGLR3DECL(int) VbglR3GuestCtrlMsgFilterSet(uint32_t uClientId, uint32_t uValue, uint32_t uMaskAdd, uint32_t uMaskRemove);
712VBGLR3DECL(int) VbglR3GuestCtrlMsgFilterUnset(uint32_t uClientId);
713VBGLR3DECL(int) VbglR3GuestCtrlMsgReply(PVBGLR3GUESTCTRLCMDCTX pCtx, int rc);
714VBGLR3DECL(int) VbglR3GuestCtrlMsgReplyEx(PVBGLR3GUESTCTRLCMDCTX pCtx, int rc, uint32_t uType,
715 void *pvPayload, uint32_t cbPayload);
716VBGLR3DECL(int) VbglR3GuestCtrlMsgSkip(uint32_t uClientId);
717VBGLR3DECL(int) VbglR3GuestCtrlMsgWaitFor(uint32_t uClientId, uint32_t *puMsg, uint32_t *puNumParms);
718VBGLR3DECL(int) VbglR3GuestCtrlCancelPendingWaits(HGCMCLIENTID idClient);
719/* Guest session handling. */
720VBGLR3DECL(int) VbglR3GuestCtrlSessionClose(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t fFlags);
721VBGLR3DECL(int) VbglR3GuestCtrlSessionNotify(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uType, uint32_t uResult);
722VBGLR3DECL(int) VbglR3GuestCtrlSessionGetOpen(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puProtocol, char *pszUser, uint32_t cbUser,
723 char *pszPassword, uint32_t cbPassword, char *pszDomain, uint32_t cbDomain,
724 uint32_t *pfFlags, uint32_t *pidSession);
725VBGLR3DECL(int) VbglR3GuestCtrlSessionGetClose(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *pfFlags, uint32_t *pidSession);
726/* Guest path handling. */
727VBGLR3DECL(int) VbglR3GuestCtrlPathGetRename(PVBGLR3GUESTCTRLCMDCTX pCtx, char *pszSource, uint32_t cbSource, char *pszDest,
728 uint32_t cbDest, uint32_t *pfFlags);
729/* Guest process execution. */
730VBGLR3DECL(int) VbglR3GuestCtrlProcGetStart(PVBGLR3GUESTCTRLCMDCTX pCtx, char *pszCmd, uint32_t cbCmd, uint32_t *pfFlags,
731 char *pszArgs, uint32_t cbArgs, uint32_t *puNumArgs, char *pszEnv, uint32_t *pcbEnv,
732 uint32_t *puNumEnvVars, char *pszUser, uint32_t cbUser, char *pszPassword,
733 uint32_t cbPassword, uint32_t *puTimeoutMS, uint32_t *puPriority,
734 uint64_t *puAffinity, uint32_t cbAffinity, uint32_t *pcAffinity);
735VBGLR3DECL(int) VbglR3GuestCtrlProcGetTerminate(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puPID);
736VBGLR3DECL(int) VbglR3GuestCtrlProcGetInput(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puPID, uint32_t *pfFlags, void *pvData,
737 uint32_t cbData, uint32_t *pcbSize);
738VBGLR3DECL(int) VbglR3GuestCtrlProcGetOutput(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puPID, uint32_t *puHandle, uint32_t *pfFlags);
739VBGLR3DECL(int) VbglR3GuestCtrlProcGetWaitFor(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puPID, uint32_t *puWaitFlags,
740 uint32_t *puTimeoutMS);
741/* Guest native directory handling. */
742VBGLR3DECL(int) VbglR3GuestCtrlDirGetRemove(PVBGLR3GUESTCTRLCMDCTX pCtx, char *pszPath, uint32_t cbPath, uint32_t *pfFlags);
743/* Guest native file handling. */
744VBGLR3DECL(int) VbglR3GuestCtrlFileGetOpen(PVBGLR3GUESTCTRLCMDCTX pCtx, char *pszFileName, uint32_t cbFileName, char *pszOpenMode,
745 uint32_t cbOpenMode, char *pszDisposition, uint32_t cbDisposition, char *pszSharing,
746 uint32_t cbSharing, uint32_t *puCreationMode, uint64_t *puOffset);
747VBGLR3DECL(int) VbglR3GuestCtrlFileGetClose(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle);
748VBGLR3DECL(int) VbglR3GuestCtrlFileGetRead(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle, uint32_t *puToRead);
749VBGLR3DECL(int) VbglR3GuestCtrlFileGetReadAt(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle,
750 uint32_t *puToRead, uint64_t *poffRead);
751VBGLR3DECL(int) VbglR3GuestCtrlFileGetWrite(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle,
752 void *pvData, uint32_t cbData, uint32_t *pcbActual);
753VBGLR3DECL(int) VbglR3GuestCtrlFileGetWriteAt(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle, void *pvData, uint32_t cbData,
754 uint32_t *pcbActual, uint64_t *poffWrite);
755VBGLR3DECL(int) VbglR3GuestCtrlFileGetSeek(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle,
756 uint32_t *puSeekMethod, uint64_t *poffSeek);
757VBGLR3DECL(int) VbglR3GuestCtrlFileGetTell(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle);
758/* Guest -> Host. */
759VBGLR3DECL(int) VbglR3GuestCtrlFileCbOpen(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint32_t uFileHandle);
760VBGLR3DECL(int) VbglR3GuestCtrlFileCbClose(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc);
761VBGLR3DECL(int) VbglR3GuestCtrlFileCbError(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc);
762VBGLR3DECL(int) VbglR3GuestCtrlFileCbRead(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, void *pvData, uint32_t cbData);
763VBGLR3DECL(int) VbglR3GuestCtrlFileCbWrite(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint32_t uWritten);
764VBGLR3DECL(int) VbglR3GuestCtrlFileCbSeek(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint64_t uOffActual);
765VBGLR3DECL(int) VbglR3GuestCtrlFileCbTell(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint64_t uOffActual);
766VBGLR3DECL(int) VbglR3GuestCtrlProcCbStatus(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uPID, uint32_t uStatus, uint32_t fFlags,
767 void *pvData, uint32_t cbData);
768VBGLR3DECL(int) VbglR3GuestCtrlProcCbOutput(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uPID, uint32_t uHandle, uint32_t fFlags,
769 void *pvData, uint32_t cbData);
770VBGLR3DECL(int) VbglR3GuestCtrlProcCbStatusInput(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t u32PID, uint32_t uStatus,
771 uint32_t fFlags, uint32_t cbWritten);
772
773/** @} */
774# endif /* VBOX_WITH_GUEST_CONTROL defined */
775
776/** @name Auto-logon handling
777 * @{ */
778VBGLR3DECL(int) VbglR3AutoLogonReportStatus(VBoxGuestFacilityStatus enmStatus);
779VBGLR3DECL(bool) VbglR3AutoLogonIsRemoteSession(void);
780/** @} */
781
782/** @name User credentials handling
783 * @{ */
784VBGLR3DECL(int) VbglR3CredentialsQueryAvailability(void);
785VBGLR3DECL(int) VbglR3CredentialsRetrieve(char **ppszUser, char **ppszPassword, char **ppszDomain);
786VBGLR3DECL(int) VbglR3CredentialsRetrieveUtf16(PRTUTF16 *ppwszUser, PRTUTF16 *ppwszPassword, PRTUTF16 *ppwszDomain);
787VBGLR3DECL(void) VbglR3CredentialsDestroy(char *pszUser, char *pszPassword, char *pszDomain, uint32_t cPasses);
788VBGLR3DECL(void) VbglR3CredentialsDestroyUtf16(PRTUTF16 pwszUser, PRTUTF16 pwszPassword, PRTUTF16 pwszDomain,
789 uint32_t cPasses);
790/** @} */
791
792/** @name CPU hotplug monitor
793 * @{ */
794VBGLR3DECL(int) VbglR3CpuHotPlugInit(void);
795VBGLR3DECL(int) VbglR3CpuHotPlugTerm(void);
796VBGLR3DECL(int) VbglR3CpuHotPlugWaitForEvent(VMMDevCpuEventType *penmEventType, uint32_t *pidCpuCore, uint32_t *pidCpuPackage);
797/** @} */
798
799/** @name Page sharing
800 * @{ */
801struct VMMDEVSHAREDREGIONDESC;
802VBGLR3DECL(int) VbglR3RegisterSharedModule(char *pszModuleName, char *pszVersion, RTGCPTR64 GCBaseAddr, uint32_t cbModule,
803 unsigned cRegions, struct VMMDEVSHAREDREGIONDESC *pRegions);
804VBGLR3DECL(int) VbglR3UnregisterSharedModule(char *pszModuleName, char *pszVersion, RTGCPTR64 GCBaseAddr, uint32_t cbModule);
805VBGLR3DECL(int) VbglR3CheckSharedModules(void);
806VBGLR3DECL(bool) VbglR3PageSharingIsEnabled(void);
807VBGLR3DECL(int) VbglR3PageIsShared(RTGCPTR pPage, bool *pfShared, uint64_t *puPageFlags);
808/** @} */
809
810# ifdef VBOX_WITH_DRAG_AND_DROP
811/** @name Drag and Drop
812 * @{ */
813/**
814 * Structure containing the context required for
815 * either retrieving or sending a HGCM guest drag'n drop
816 * commands from or to the host.
817 *
818 * Note: Do not change parameter order without also
819 * adapting all structure initializers.
820 */
821typedef struct VBGLR3GUESTDNDCMDCTX
822{
823 /** @todo This struct could be handy if we want to implement
824 * a second communication channel, e.g. via TCP/IP.
825 * Use a union for the HGCM stuff then. */
826
827 /** HGCM client ID to use for communication. */
828 uint32_t uClientID;
829 /** The VM's current session ID. */
830 uint64_t uSessionID;
831 /** Protocol version to use. */
832 uint32_t uProtocol;
833 /** Number of parameters retrieved for the current command. */
834 uint32_t uNumParms;
835 /** Max chunk size (in bytes) for data transfers. */
836 uint32_t cbMaxChunkSize;
837} VBGLR3GUESTDNDCMDCTX, *PVBGLR3GUESTDNDCMDCTX;
838
839typedef struct VBGLR3DNDHGCMEVENT
840{
841 uint32_t uType; /** The event type this struct contains. */
842 uint32_t uScreenId; /** Screen ID this request belongs to. */
843 char *pszFormats; /** Format list (\r\n separated). */
844 uint32_t cbFormats; /** Size (in bytes) of pszFormats (\0 included). */
845 union
846 {
847 struct
848 {
849 uint32_t uXpos; /** X position of guest screen. */
850 uint32_t uYpos; /** Y position of guest screen. */
851 uint32_t uDefAction; /** Proposed DnD action. */
852 uint32_t uAllActions; /** Allowed DnD actions. */
853 } a; /** Values used in init, move and drop event type. */
854 struct
855 {
856 void *pvData; /** Data request. */
857 uint32_t cbData; /** Size (in bytes) of pvData. */
858 } b; /** Values used in drop data event type. */
859 } u;
860} VBGLR3DNDHGCMEVENT;
861typedef VBGLR3DNDHGCMEVENT *PVBGLR3DNDHGCMEVENT;
862typedef const PVBGLR3DNDHGCMEVENT CPVBGLR3DNDHGCMEVENT;
863VBGLR3DECL(int) VbglR3DnDConnect(PVBGLR3GUESTDNDCMDCTX pCtx);
864VBGLR3DECL(int) VbglR3DnDDisconnect(PVBGLR3GUESTDNDCMDCTX pCtx);
865
866VBGLR3DECL(int) VbglR3DnDRecvNextMsg(PVBGLR3GUESTDNDCMDCTX pCtx, CPVBGLR3DNDHGCMEVENT pEvent);
867
868VBGLR3DECL(int) VbglR3DnDHGSendAckOp(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uAction);
869VBGLR3DECL(int) VbglR3DnDHGSendReqData(PVBGLR3GUESTDNDCMDCTX pCtx, const char *pcszFormat);
870VBGLR3DECL(int) VbglR3DnDHGSendProgress(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uStatus, uint8_t uPercent, int rcErr);
871# ifdef VBOX_WITH_DRAG_AND_DROP_GH
872VBGLR3DECL(int) VbglR3DnDGHSendAckPending(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uDefAction, uint32_t uAllActions, const char* pcszFormats, uint32_t cbFormats);
873VBGLR3DECL(int) VbglR3DnDGHSendData(PVBGLR3GUESTDNDCMDCTX pCtx, const char *pszFormat, void *pvData, uint32_t cbData);
874VBGLR3DECL(int) VbglR3DnDGHSendError(PVBGLR3GUESTDNDCMDCTX pCtx, int rcOp);
875# endif /* VBOX_WITH_DRAG_AND_DROP_GH */
876/** @} */
877# endif /* VBOX_WITH_DRAG_AND_DROP */
878
879/* Generic Host Channel Service. */
880VBGLR3DECL(int) VbglR3HostChannelInit(uint32_t *pidClient);
881VBGLR3DECL(void) VbglR3HostChannelTerm(uint32_t idClient);
882VBGLR3DECL(int) VbglR3HostChannelAttach(uint32_t *pu32ChannelHandle, uint32_t u32HGCMClientId,
883 const char *pszName, uint32_t u32Flags);
884VBGLR3DECL(void) VbglR3HostChannelDetach(uint32_t u32ChannelHandle, uint32_t u32HGCMClientId);
885VBGLR3DECL(int) VbglR3HostChannelSend(uint32_t u32ChannelHandle, uint32_t u32HGCMClientId,
886 void *pvData, uint32_t cbData);
887VBGLR3DECL(int) VbglR3HostChannelRecv(uint32_t u32ChannelHandle, uint32_t u32HGCMClientId,
888 void *pvData, uint32_t cbData,
889 uint32_t *pu32SizeReceived, uint32_t *pu32SizeRemaining);
890VBGLR3DECL(int) VbglR3HostChannelControl(uint32_t u32ChannelHandle, uint32_t u32HGCMClientId,
891 uint32_t u32Code, void *pvParm, uint32_t cbParm,
892 void *pvData, uint32_t cbData, uint32_t *pu32SizeDataReturned);
893VBGLR3DECL(int) VbglR3HostChannelEventWait(uint32_t *pu32ChannelHandle, uint32_t u32HGCMClientId,
894 uint32_t *pu32EventId, void *pvParm, uint32_t cbParm,
895 uint32_t *pu32SizeReturned);
896VBGLR3DECL(int) VbglR3HostChannelEventCancel(uint32_t u32ChannelHandle, uint32_t u32HGCMClientId);
897VBGLR3DECL(int) VbglR3HostChannelQuery(const char *pszName, uint32_t u32HGCMClientId, uint32_t u32Code,
898 void *pvParm, uint32_t cbParm, void *pvData, uint32_t cbData,
899 uint32_t *pu32SizeDataReturned);
900
901/** @name Mode hint storage
902 * @{ */
903VBGLR3DECL(int) VbglR3ReadVideoMode(unsigned cDisplay, unsigned *cx,
904 unsigned *cy, unsigned *cBPP, unsigned *x,
905 unsigned *y, unsigned *fEnabled);
906VBGLR3DECL(int) VbglR3WriteVideoMode(unsigned cDisplay, unsigned cx,
907 unsigned cy, unsigned cBPP, unsigned x,
908 unsigned y, unsigned fEnabled);
909/** @} */
910
911/** @name Generic HGCM
912 * @{ */
913VBGLR3DECL(int) VbglR3HGCMConnect(const char *pszServiceName, HGCMCLIENTID *pidClient);
914VBGLR3DECL(int) VbglR3HGCMDisconnect(HGCMCLIENTID idClient);
915struct VBGLIOCHGCMCALL;
916VBGLR3DECL(int) VbglR3HGCMCall(struct VBGLIOCHGCMCALL *pInfo, size_t cbInfo);
917/** @} */
918
919#endif /* IN_RING3 */
920/** @} */
921
922RT_C_DECLS_END
923
924/** @} */
925
926#endif
927
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