1 | /** @file
|
---|
2 | * VBoxGuestLib - VirtualBox Guest Additions Library.
|
---|
3 | */
|
---|
4 |
|
---|
5 | /*
|
---|
6 | * Copyright (C) 2006-2013 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/VMMDev2.h>
|
---|
31 | #include <VBox/VMMDev.h> /* grumble */
|
---|
32 | #ifdef IN_RING0
|
---|
33 | # include <VBox/VBoxGuest.h>
|
---|
34 | # include <VBox/VBoxGuest2.h>
|
---|
35 | #endif
|
---|
36 |
|
---|
37 |
|
---|
38 | /** @defgroup grp_guest_lib VirtualBox Guest Additions Library
|
---|
39 | * @{
|
---|
40 | */
|
---|
41 |
|
---|
42 | /** @page pg_guest_lib VirtualBox Guest Library
|
---|
43 | *
|
---|
44 | * This is a library for abstracting the additions driver interface. There are
|
---|
45 | * multiple versions of the library depending on the context. The main
|
---|
46 | * distinction is between kernel and user mode where the interfaces are very
|
---|
47 | * different.
|
---|
48 | *
|
---|
49 | *
|
---|
50 | * @section sec_guest_lib_ring0 Ring-0
|
---|
51 | *
|
---|
52 | * In ring-0 there are two version:
|
---|
53 | * - VBOX_LIB_VBGL_R0_BASE / VBoxGuestR0LibBase for the VBoxGuest main driver,
|
---|
54 | * who is responsible for managing the VMMDev virtual hardware.
|
---|
55 | * - VBOX_LIB_VBGL_R0 / VBoxGuestR0Lib for other (client) guest drivers.
|
---|
56 | *
|
---|
57 | *
|
---|
58 | * The library source code and the header have a define VBGL_VBOXGUEST, which is
|
---|
59 | * defined for VBoxGuest and undefined for other drivers. Drivers must choose
|
---|
60 | * right library in their makefiles and set VBGL_VBOXGUEST accordingly.
|
---|
61 | *
|
---|
62 | * The libraries consists of:
|
---|
63 | * - common code to be used by both VBoxGuest and other drivers;
|
---|
64 | * - VBoxGuest specific code;
|
---|
65 | * - code for other drivers which communicate with VBoxGuest via an IOCTL.
|
---|
66 | *
|
---|
67 | *
|
---|
68 | * @section sec_guest_lib_ring3 Ring-3
|
---|
69 | *
|
---|
70 | * There are more variants of the library here:
|
---|
71 | * - VBOX_LIB_VBGL_R3 / VBoxGuestR3Lib for programs.
|
---|
72 | * - VBOX_LIB_VBGL_R3_XFREE86 / VBoxGuestR3LibXFree86 for old style XFree
|
---|
73 | * drivers which uses special loader and or symbol resolving strategy.
|
---|
74 | * - VBOX_LIB_VBGL_R3_SHARED / VBoxGuestR3LibShared for shared objects / DLLs /
|
---|
75 | * Dylibs.
|
---|
76 | *
|
---|
77 | */
|
---|
78 |
|
---|
79 | RT_C_DECLS_BEGIN
|
---|
80 |
|
---|
81 |
|
---|
82 | /** @defgroup grp_guest_lib_r0 Ring-0 interface.
|
---|
83 | * @{
|
---|
84 | */
|
---|
85 | #if defined(IN_RING0) && !defined(IN_RING0_AGNOSTIC)
|
---|
86 | /** @def DECLR0VBGL
|
---|
87 | * Declare a VBGL ring-0 API with the right calling convention and visibilitiy.
|
---|
88 | * @param type Return type. */
|
---|
89 | # ifdef RT_OS_DARWIN /** @todo probably apply to all, but don't want a forest fire on our hands right now. */
|
---|
90 | # define DECLR0VBGL(type) DECLHIDDEN(type) VBOXCALL
|
---|
91 | # else
|
---|
92 | # define DECLR0VBGL(type) type VBOXCALL
|
---|
93 | # endif
|
---|
94 | # define DECLVBGL(type) DECLR0VBGL(type)
|
---|
95 |
|
---|
96 | typedef uint32_t VBGLIOPORT; /**< @todo r=bird: We have RTIOPORT (uint16_t) for this. */
|
---|
97 |
|
---|
98 |
|
---|
99 | # ifdef VBGL_VBOXGUEST
|
---|
100 |
|
---|
101 | /**
|
---|
102 | * The library initialization function to be used by the main
|
---|
103 | * VBoxGuest system driver.
|
---|
104 | *
|
---|
105 | * @return VBox status code.
|
---|
106 | */
|
---|
107 | DECLVBGL(int) VbglInit (VBGLIOPORT portVMMDev, struct VMMDevMemory *pVMMDevMemory);
|
---|
108 |
|
---|
109 | # else
|
---|
110 |
|
---|
111 | /**
|
---|
112 | * The library initialization function to be used by all drivers
|
---|
113 | * other than the main VBoxGuest system driver.
|
---|
114 | *
|
---|
115 | * @return VBox status code.
|
---|
116 | */
|
---|
117 | DECLVBGL(int) VbglInit (void);
|
---|
118 |
|
---|
119 | # endif
|
---|
120 |
|
---|
121 | /**
|
---|
122 | * The library termination function.
|
---|
123 | */
|
---|
124 | DECLVBGL(void) VbglTerminate (void);
|
---|
125 |
|
---|
126 |
|
---|
127 | /** @name Generic request functions.
|
---|
128 | * @{
|
---|
129 | */
|
---|
130 |
|
---|
131 | /**
|
---|
132 | * Allocate memory for generic request and initialize the request header.
|
---|
133 | *
|
---|
134 | * @param ppReq pointer to resulting memory address.
|
---|
135 | * @param cbSize size of memory block required for the request.
|
---|
136 | * @param reqType the generic request type.
|
---|
137 | *
|
---|
138 | * @return VBox status code.
|
---|
139 | */
|
---|
140 | DECLVBGL(int) VbglGRAlloc (VMMDevRequestHeader **ppReq, uint32_t cbSize, VMMDevRequestType reqType);
|
---|
141 |
|
---|
142 | /**
|
---|
143 | * Perform the generic request.
|
---|
144 | *
|
---|
145 | * @param pReq pointer the request structure.
|
---|
146 | *
|
---|
147 | * @return VBox status code.
|
---|
148 | */
|
---|
149 | DECLVBGL(int) VbglGRPerform (VMMDevRequestHeader *pReq);
|
---|
150 |
|
---|
151 | /**
|
---|
152 | * Free the generic request memory.
|
---|
153 | *
|
---|
154 | * @param pReq pointer the request structure.
|
---|
155 | *
|
---|
156 | * @return VBox status code.
|
---|
157 | */
|
---|
158 | DECLVBGL(void) VbglGRFree (VMMDevRequestHeader *pReq);
|
---|
159 |
|
---|
160 | /**
|
---|
161 | * Verify the generic request header.
|
---|
162 | *
|
---|
163 | * @param pReq pointer the request header structure.
|
---|
164 | * @param cbReq size of the request memory block. It should be equal to the request size
|
---|
165 | * for fixed size requests. It can be greater than the request size for
|
---|
166 | * variable size requests.
|
---|
167 | *
|
---|
168 | * @return VBox status code.
|
---|
169 | */
|
---|
170 | DECLVBGL(int) VbglGRVerify (const VMMDevRequestHeader *pReq, size_t cbReq);
|
---|
171 | /** @} */
|
---|
172 |
|
---|
173 | # ifdef VBOX_WITH_HGCM
|
---|
174 |
|
---|
175 | # ifdef VBGL_VBOXGUEST
|
---|
176 |
|
---|
177 | /**
|
---|
178 | * Callback function called from HGCM helpers when a wait for request
|
---|
179 | * completion IRQ is required.
|
---|
180 | *
|
---|
181 | * @returns VINF_SUCCESS, VERR_INTERRUPT or VERR_TIMEOUT.
|
---|
182 | * @param pvData VBoxGuest pointer to be passed to callback.
|
---|
183 | * @param u32Data VBoxGuest 32 bit value to be passed to callback.
|
---|
184 | */
|
---|
185 | typedef DECLCALLBACK(int) FNVBGLHGCMCALLBACK(VMMDevHGCMRequestHeader *pHeader, void *pvData, uint32_t u32Data);
|
---|
186 | /** Pointer to a FNVBGLHGCMCALLBACK. */
|
---|
187 | typedef FNVBGLHGCMCALLBACK *PFNVBGLHGCMCALLBACK;
|
---|
188 |
|
---|
189 | /**
|
---|
190 | * Perform a connect request. That is locate required service and
|
---|
191 | * obtain a client identifier for future access.
|
---|
192 | *
|
---|
193 | * @note This function can NOT handle cancelled requests!
|
---|
194 | *
|
---|
195 | * @param pConnectInfo The request data.
|
---|
196 | * @param pfnAsyncCallback Required pointer to function that is calledwhen
|
---|
197 | * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
|
---|
198 | * implements waiting for an IRQ in this function.
|
---|
199 | * @param pvAsyncData An arbitrary VBoxGuest pointer to be passed to callback.
|
---|
200 | * @param u32AsyncData An arbitrary VBoxGuest 32 bit value to be passed to callback.
|
---|
201 | *
|
---|
202 | * @return VBox status code.
|
---|
203 | */
|
---|
204 |
|
---|
205 | DECLR0VBGL(int) VbglR0HGCMInternalConnect (VBoxGuestHGCMConnectInfo *pConnectInfo,
|
---|
206 | PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
|
---|
207 |
|
---|
208 |
|
---|
209 | /**
|
---|
210 | * Perform a disconnect request. That is tell the host that
|
---|
211 | * the client will not call the service anymore.
|
---|
212 | *
|
---|
213 | * @note This function can NOT handle cancelled requests!
|
---|
214 | *
|
---|
215 | * @param pDisconnectInfo The request data.
|
---|
216 | * @param pfnAsyncCallback Required pointer to function that is called when
|
---|
217 | * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
|
---|
218 | * implements waiting for an IRQ in this function.
|
---|
219 | * @param pvAsyncData An arbitrary VBoxGuest pointer to be passed to callback.
|
---|
220 | * @param u32AsyncData An arbitrary VBoxGuest 32 bit value to be passed to
|
---|
221 | * callback.
|
---|
222 | *
|
---|
223 | * @return VBox status code.
|
---|
224 | */
|
---|
225 |
|
---|
226 | DECLR0VBGL(int) VbglR0HGCMInternalDisconnect (VBoxGuestHGCMDisconnectInfo *pDisconnectInfo,
|
---|
227 | PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
|
---|
228 |
|
---|
229 | /** Call a HGCM service.
|
---|
230 | *
|
---|
231 | * @note This function can deal with cancelled requests.
|
---|
232 | *
|
---|
233 | * @param pCallInfo The request data.
|
---|
234 | * @param fFlags Flags, see VBGLR0_HGCMCALL_F_XXX.
|
---|
235 | * @param pfnAsyncCallback Required pointer to function that is called when
|
---|
236 | * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
|
---|
237 | * implements waiting for an IRQ in this function.
|
---|
238 | * @param pvAsyncData An arbitrary VBoxGuest pointer to be passed to callback.
|
---|
239 | * @param u32AsyncData An arbitrary VBoxGuest 32 bit value to be passed to callback.
|
---|
240 | *
|
---|
241 | * @return VBox status code.
|
---|
242 | */
|
---|
243 | DECLR0VBGL(int) VbglR0HGCMInternalCall (VBoxGuestHGCMCallInfo *pCallInfo, uint32_t cbCallInfo, uint32_t fFlags,
|
---|
244 | PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
|
---|
245 |
|
---|
246 | /** Call a HGCM service. (32 bits packet structure in a 64 bits guest)
|
---|
247 | *
|
---|
248 | * @note This function can deal with cancelled requests.
|
---|
249 | *
|
---|
250 | * @param pCallInfo The request data.
|
---|
251 | * @param fFlags Flags, see VBGLR0_HGCMCALL_F_XXX.
|
---|
252 | * @param pfnAsyncCallback Required pointer to function that is called when
|
---|
253 | * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
|
---|
254 | * implements waiting for an IRQ in this function.
|
---|
255 | * @param pvAsyncData An arbitrary VBoxGuest pointer to be passed to callback.
|
---|
256 | * @param u32AsyncData An arbitrary VBoxGuest 32 bit value to be passed to callback.
|
---|
257 | *
|
---|
258 | * @return VBox status code.
|
---|
259 | */
|
---|
260 | DECLR0VBGL(int) VbglR0HGCMInternalCall32 (VBoxGuestHGCMCallInfo *pCallInfo, uint32_t cbCallInfo, uint32_t fFlags,
|
---|
261 | PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
|
---|
262 |
|
---|
263 | /** @name VbglR0HGCMInternalCall flags
|
---|
264 | * @{ */
|
---|
265 | /** User mode request.
|
---|
266 | * Indicates that only user mode addresses are permitted as parameters. */
|
---|
267 | #define VBGLR0_HGCMCALL_F_USER UINT32_C(0)
|
---|
268 | /** Kernel mode request.
|
---|
269 | * Indicates that kernel mode addresses are permitted as parameters. Whether or
|
---|
270 | * not user mode addresses are permitted is, unfortunately, OS specific. The
|
---|
271 | * following OSes allows user mode addresses: Windows, TODO.
|
---|
272 | */
|
---|
273 | #define VBGLR0_HGCMCALL_F_KERNEL UINT32_C(1)
|
---|
274 | /** Mode mask. */
|
---|
275 | #define VBGLR0_HGCMCALL_F_MODE_MASK UINT32_C(1)
|
---|
276 | /** @} */
|
---|
277 |
|
---|
278 | # else /* !VBGL_VBOXGUEST */
|
---|
279 |
|
---|
280 | struct VBGLHGCMHANDLEDATA;
|
---|
281 | typedef struct VBGLHGCMHANDLEDATA *VBGLHGCMHANDLE;
|
---|
282 |
|
---|
283 | /** @name HGCM functions
|
---|
284 | * @{
|
---|
285 | */
|
---|
286 |
|
---|
287 | /**
|
---|
288 | * Connect to a service.
|
---|
289 | *
|
---|
290 | * @param pHandle Pointer to variable that will hold a handle to be used
|
---|
291 | * further in VbglHGCMCall and VbglHGCMClose.
|
---|
292 | * @param pData Connection information structure.
|
---|
293 | *
|
---|
294 | * @return VBox status code.
|
---|
295 | */
|
---|
296 | DECLVBGL(int) VbglHGCMConnect (VBGLHGCMHANDLE *pHandle, VBoxGuestHGCMConnectInfo *pData);
|
---|
297 |
|
---|
298 | /**
|
---|
299 | * Connect to a service.
|
---|
300 | *
|
---|
301 | * @param handle Handle of the connection.
|
---|
302 | * @param pData Disconnect request information structure.
|
---|
303 | *
|
---|
304 | * @return VBox status code.
|
---|
305 | */
|
---|
306 | DECLVBGL(int) VbglHGCMDisconnect (VBGLHGCMHANDLE handle, VBoxGuestHGCMDisconnectInfo *pData);
|
---|
307 |
|
---|
308 | /**
|
---|
309 | * Call to a service.
|
---|
310 | *
|
---|
311 | * @param handle Handle of the connection.
|
---|
312 | * @param pData Call request information structure, including function parameters.
|
---|
313 | * @param cbData Length in bytes of data.
|
---|
314 | *
|
---|
315 | * @return VBox status code.
|
---|
316 | */
|
---|
317 | DECLVBGL(int) VbglHGCMCall (VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData);
|
---|
318 |
|
---|
319 | /**
|
---|
320 | * Call to a service with user-mode data received by the calling driver from the User-Mode process.
|
---|
321 | * The call must be done in the context of a calling process.
|
---|
322 | *
|
---|
323 | * @param handle Handle of the connection.
|
---|
324 | * @param pData Call request information structure, including function parameters.
|
---|
325 | * @param cbData Length in bytes of data.
|
---|
326 | *
|
---|
327 | * @return VBox status code.
|
---|
328 | */
|
---|
329 | DECLVBGL(int) VbglHGCMCallUserData (VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData);
|
---|
330 |
|
---|
331 | /**
|
---|
332 | * Call to a service with timeout.
|
---|
333 | *
|
---|
334 | * @param handle Handle of the connection.
|
---|
335 | * @param pData Call request information structure, including function parameters.
|
---|
336 | * @param cbData Length in bytes of data.
|
---|
337 | * @param cMillies Timeout in milliseconds. Use RT_INDEFINITE_WAIT to wait forever.
|
---|
338 | *
|
---|
339 | * @return VBox status code.
|
---|
340 | */
|
---|
341 | DECLVBGL(int) VbglHGCMCallTimed (VBGLHGCMHANDLE handle,
|
---|
342 | VBoxGuestHGCMCallInfoTimed *pData, uint32_t cbData);
|
---|
343 | /** @} */
|
---|
344 |
|
---|
345 | # endif /* !VBGL_VBOXGUEST */
|
---|
346 |
|
---|
347 | # endif /* VBOX_WITH_HGCM */
|
---|
348 |
|
---|
349 |
|
---|
350 | /**
|
---|
351 | * Initialize the heap.
|
---|
352 | *
|
---|
353 | * @return VBox error code.
|
---|
354 | */
|
---|
355 | DECLVBGL(int) VbglPhysHeapInit (void);
|
---|
356 |
|
---|
357 | /**
|
---|
358 | * Shutdown the heap.
|
---|
359 | */
|
---|
360 | DECLVBGL(void) VbglPhysHeapTerminate (void);
|
---|
361 |
|
---|
362 |
|
---|
363 | /**
|
---|
364 | * Allocate a memory block.
|
---|
365 | *
|
---|
366 | * @param cbSize Size of block to be allocated.
|
---|
367 | * @return Virtual address of allocated memory block.
|
---|
368 | */
|
---|
369 | DECLVBGL(void *) VbglPhysHeapAlloc (uint32_t cbSize);
|
---|
370 |
|
---|
371 | /**
|
---|
372 | * Get physical address of memory block pointed by
|
---|
373 | * the virtual address.
|
---|
374 | *
|
---|
375 | * @note WARNING!
|
---|
376 | * The function does not acquire the Heap mutex!
|
---|
377 | * When calling the function make sure that
|
---|
378 | * the pointer is a valid one and is not being
|
---|
379 | * deallocated.
|
---|
380 | * This function can NOT be used for verifying
|
---|
381 | * if the given pointer is a valid one allocated
|
---|
382 | * from the heap.
|
---|
383 | *
|
---|
384 | *
|
---|
385 | * @param p Virtual address of memory block.
|
---|
386 | * @return Physical memory block.
|
---|
387 | */
|
---|
388 | DECLVBGL(RTCCPHYS) VbglPhysHeapGetPhysAddr (void *p);
|
---|
389 |
|
---|
390 | /**
|
---|
391 | * Free a memory block.
|
---|
392 | *
|
---|
393 | * @param p Virtual address of memory block.
|
---|
394 | */
|
---|
395 | DECLVBGL(void) VbglPhysHeapFree (void *p);
|
---|
396 |
|
---|
397 | DECLVBGL(int) VbglQueryVMMDevMemory (VMMDevMemory **ppVMMDevMemory);
|
---|
398 | DECLR0VBGL(bool) VbglR0CanUsePhysPageList(void);
|
---|
399 |
|
---|
400 | # ifndef VBOX_GUEST
|
---|
401 | /** @name Mouse
|
---|
402 | * @{ */
|
---|
403 | DECLVBGL(int) VbglSetMouseNotifyCallback(PFNVBOXGUESTMOUSENOTIFY pfnNotify, void *pvUser);
|
---|
404 | DECLVBGL(int) VbglGetMouseStatus(uint32_t *pfFeatures, uint32_t *px, uint32_t *py);
|
---|
405 | DECLVBGL(int) VbglSetMouseStatus(uint32_t fFeatures);
|
---|
406 | /** @} */
|
---|
407 | # endif /* VBOX_GUEST */
|
---|
408 |
|
---|
409 | #endif /* IN_RING0 && !IN_RING0_AGNOSTIC */
|
---|
410 | /** @} */
|
---|
411 |
|
---|
412 |
|
---|
413 | /** @defgroup grp_guest_lib_r3 Ring-3 interface.
|
---|
414 | * @{
|
---|
415 | */
|
---|
416 | #ifdef IN_RING3
|
---|
417 |
|
---|
418 | /** @def VBGLR3DECL
|
---|
419 | * Ring 3 VBGL declaration.
|
---|
420 | * @param type The return type of the function declaration.
|
---|
421 | */
|
---|
422 | # define VBGLR3DECL(type) type VBOXCALL
|
---|
423 |
|
---|
424 | /** @name General-purpose functions
|
---|
425 | * @{ */
|
---|
426 | VBGLR3DECL(int) VbglR3Init(void);
|
---|
427 | VBGLR3DECL(int) VbglR3InitUser(void);
|
---|
428 | VBGLR3DECL(void) VbglR3Term(void);
|
---|
429 | # ifdef ___iprt_time_h
|
---|
430 | VBGLR3DECL(int) VbglR3GetHostTime(PRTTIMESPEC pTime);
|
---|
431 | # endif
|
---|
432 | VBGLR3DECL(int) VbglR3InterruptEventWaits(void);
|
---|
433 | VBGLR3DECL(int) VbglR3WriteLog(const char *pch, size_t cch);
|
---|
434 | VBGLR3DECL(int) VbglR3CtlFilterMask(uint32_t fOr, uint32_t fNot);
|
---|
435 | VBGLR3DECL(int) VbglR3Daemonize(bool fNoChDir, bool fNoClose);
|
---|
436 | VBGLR3DECL(int) VbglR3PidFile(const char *pszPath, PRTFILE phFile);
|
---|
437 | VBGLR3DECL(void) VbglR3ClosePidFile(const char *pszPath, RTFILE hFile);
|
---|
438 | VBGLR3DECL(int) VbglR3SetGuestCaps(uint32_t fOr, uint32_t fNot);
|
---|
439 | VBGLR3DECL(int) VbglR3WaitEvent(uint32_t fMask, uint32_t cMillies, uint32_t *pfEvents);
|
---|
440 |
|
---|
441 | VBGLR3DECL(int) VbglR3ReportAdditionsStatus(VBoxGuestFacilityType Facility, VBoxGuestFacilityStatus StatusCurrent, uint32_t uFlags);
|
---|
442 | VBGLR3DECL(int) VbglR3GetAdditionsVersion(char **ppszVer, char **ppszVerEx, char **ppszRev);
|
---|
443 | VBGLR3DECL(int) VbglR3GetAdditionsInstallationPath(char **ppszPath);
|
---|
444 | VBGLR3DECL(int) VbglR3GetSessionId(uint64_t *pu64IdSession);
|
---|
445 |
|
---|
446 | /** @} */
|
---|
447 |
|
---|
448 | /** @name Shared clipboard
|
---|
449 | * @{ */
|
---|
450 | VBGLR3DECL(int) VbglR3ClipboardConnect(uint32_t *pu32ClientId);
|
---|
451 | VBGLR3DECL(int) VbglR3ClipboardDisconnect(uint32_t u32ClientId);
|
---|
452 | VBGLR3DECL(int) VbglR3ClipboardGetHostMsg(uint32_t u32ClientId, uint32_t *pMsg, uint32_t *pfFormats);
|
---|
453 | VBGLR3DECL(int) VbglR3ClipboardReadData(uint32_t u32ClientId, uint32_t fFormat, void *pv, uint32_t cb, uint32_t *pcb);
|
---|
454 | VBGLR3DECL(int) VbglR3ClipboardReportFormats(uint32_t u32ClientId, uint32_t fFormats);
|
---|
455 | VBGLR3DECL(int) VbglR3ClipboardWriteData(uint32_t u32ClientId, uint32_t fFormat, void *pv, uint32_t cb);
|
---|
456 | /** @} */
|
---|
457 |
|
---|
458 | /** @name Seamless mode
|
---|
459 | * @{ */
|
---|
460 | VBGLR3DECL(int) VbglR3SeamlessSetCap(bool fState);
|
---|
461 | VBGLR3DECL(int) VbglR3SeamlessWaitEvent(VMMDevSeamlessMode *pMode);
|
---|
462 | VBGLR3DECL(int) VbglR3SeamlessSendRects(uint32_t cRects, PRTRECT pRects);
|
---|
463 | VBGLR3DECL(int) VbglR3SeamlessGetLastEvent(VMMDevSeamlessMode *pMode);
|
---|
464 |
|
---|
465 | /** @} */
|
---|
466 |
|
---|
467 | /** @name Mouse
|
---|
468 | * @{ */
|
---|
469 | VBGLR3DECL(int) VbglR3GetMouseStatus(uint32_t *pfFeatures, uint32_t *px, uint32_t *py);
|
---|
470 | VBGLR3DECL(int) VbglR3SetMouseStatus(uint32_t fFeatures);
|
---|
471 | /** @} */
|
---|
472 |
|
---|
473 | /** @name Video
|
---|
474 | * @{ */
|
---|
475 | VBGLR3DECL(int) VbglR3VideoAccelEnable(bool fEnable);
|
---|
476 | VBGLR3DECL(int) VbglR3VideoAccelFlush(void);
|
---|
477 | VBGLR3DECL(int) VbglR3SetPointerShape(uint32_t fFlags, uint32_t xHot, uint32_t yHot, uint32_t cx, uint32_t cy, const void *pvImg, size_t cbImg);
|
---|
478 | VBGLR3DECL(int) VbglR3SetPointerShapeReq(struct VMMDevReqMousePointer *pReq);
|
---|
479 | /** @} */
|
---|
480 |
|
---|
481 | /** @name Display
|
---|
482 | * @{ */
|
---|
483 | VBGLR3DECL(int) VbglR3GetDisplayChangeRequest(uint32_t *pcx, uint32_t *pcy, uint32_t *pcBits, uint32_t *piDisplay, bool fAck);
|
---|
484 | VBGLR3DECL(int) VbglR3GetDisplayChangeRequestEx(uint32_t *pcx, uint32_t *pcy, uint32_t *pcBits,
|
---|
485 | uint32_t *piDisplay, uint32_t *pcOriginX, uint32_t *pcOriginY,
|
---|
486 | bool *pfEnabled, bool fAck);
|
---|
487 | VBGLR3DECL(bool) VbglR3HostLikesVideoMode(uint32_t cx, uint32_t cy, uint32_t cBits);
|
---|
488 | VBGLR3DECL(int) VbglR3SaveVideoMode(const char *pszName, uint32_t cx, uint32_t cy, uint32_t cBits);
|
---|
489 | VBGLR3DECL(int) VbglR3RetrieveVideoMode(const char *pszName, uint32_t *pcx, uint32_t *pcy, uint32_t *pcBits);
|
---|
490 | /** @} */
|
---|
491 |
|
---|
492 | /** @name VM Statistics
|
---|
493 | * @{ */
|
---|
494 | VBGLR3DECL(int) VbglR3StatQueryInterval(uint32_t *pu32Interval);
|
---|
495 | VBGLR3DECL(int) VbglR3StatReport(VMMDevReportGuestStats *pReq);
|
---|
496 | /** @} */
|
---|
497 |
|
---|
498 | /** @name Memory ballooning
|
---|
499 | * @{ */
|
---|
500 | VBGLR3DECL(int) VbglR3MemBalloonRefresh(uint32_t *pcChunks, bool *pfHandleInR3);
|
---|
501 | VBGLR3DECL(int) VbglR3MemBalloonChange(void *pv, bool fInflate);
|
---|
502 | /** @} */
|
---|
503 |
|
---|
504 | /** @name Core Dump
|
---|
505 | * @{ */
|
---|
506 | VBGLR3DECL(int) VbglR3WriteCoreDump(void);
|
---|
507 |
|
---|
508 | /** @} */
|
---|
509 |
|
---|
510 | # ifdef VBOX_WITH_GUEST_PROPS
|
---|
511 | /** @name Guest properties
|
---|
512 | * @{ */
|
---|
513 | /** @todo Docs. */
|
---|
514 | typedef struct VBGLR3GUESTPROPENUM VBGLR3GUESTPROPENUM;
|
---|
515 | /** @todo Docs. */
|
---|
516 | typedef VBGLR3GUESTPROPENUM *PVBGLR3GUESTPROPENUM;
|
---|
517 | VBGLR3DECL(int) VbglR3GuestPropConnect(uint32_t *pu32ClientId);
|
---|
518 | VBGLR3DECL(int) VbglR3GuestPropDisconnect(uint32_t u32ClientId);
|
---|
519 | VBGLR3DECL(int) VbglR3GuestPropWrite(uint32_t u32ClientId, const char *pszName, const char *pszValue, const char *pszFlags);
|
---|
520 | VBGLR3DECL(int) VbglR3GuestPropWriteValue(uint32_t u32ClientId, const char *pszName, const char *pszValue);
|
---|
521 | VBGLR3DECL(int) VbglR3GuestPropWriteValueV(uint32_t u32ClientId, const char *pszName, const char *pszValueFormat, va_list va);
|
---|
522 | VBGLR3DECL(int) VbglR3GuestPropWriteValueF(uint32_t u32ClientId, const char *pszName, const char *pszValueFormat, ...);
|
---|
523 | VBGLR3DECL(int) VbglR3GuestPropRead(uint32_t u32ClientId, const char *pszName, void *pvBuf, uint32_t cbBuf, char **ppszValue, uint64_t *pu64Timestamp, char **ppszFlags, uint32_t *pcbBufActual);
|
---|
524 | VBGLR3DECL(int) VbglR3GuestPropReadValue(uint32_t ClientId, const char *pszName, char *pszValue, uint32_t cchValue, uint32_t *pcchValueActual);
|
---|
525 | VBGLR3DECL(int) VbglR3GuestPropReadValueAlloc(uint32_t u32ClientId, const char *pszName, char **ppszValue);
|
---|
526 | VBGLR3DECL(void) VbglR3GuestPropReadValueFree(char *pszValue);
|
---|
527 | VBGLR3DECL(int) VbglR3GuestPropEnumRaw(uint32_t u32ClientId, const char *paszPatterns, char *pcBuf, uint32_t cbBuf, uint32_t *pcbBufActual);
|
---|
528 | VBGLR3DECL(int) VbglR3GuestPropEnum(uint32_t u32ClientId, char const * const *ppaszPatterns, uint32_t cPatterns, PVBGLR3GUESTPROPENUM *ppHandle,
|
---|
529 | char const **ppszName, char const **ppszValue, uint64_t *pu64Timestamp, char const **ppszFlags);
|
---|
530 | VBGLR3DECL(int) VbglR3GuestPropEnumNext(PVBGLR3GUESTPROPENUM pHandle, char const **ppszName, char const **ppszValue, uint64_t *pu64Timestamp,
|
---|
531 | char const **ppszFlags);
|
---|
532 | VBGLR3DECL(void) VbglR3GuestPropEnumFree(PVBGLR3GUESTPROPENUM pHandle);
|
---|
533 | VBGLR3DECL(int) VbglR3GuestPropDelete(uint32_t u32ClientId, const char *pszName);
|
---|
534 | VBGLR3DECL(int) VbglR3GuestPropDelSet(uint32_t u32ClientId, char const * const *papszPatterns, uint32_t cPatterns);
|
---|
535 | VBGLR3DECL(int) VbglR3GuestPropWait(uint32_t u32ClientId, const char *pszPatterns, void *pvBuf, uint32_t cbBuf, uint64_t u64Timestamp, uint32_t cMillies, char ** ppszName, char **ppszValue, uint64_t *pu64Timestamp, char **ppszFlags, uint32_t *pcbBufActual);
|
---|
536 | /** @} */
|
---|
537 |
|
---|
538 | /** @name Host version handling
|
---|
539 | * @{ */
|
---|
540 | VBGLR3DECL(int) VbglR3HostVersionCheckForUpdate(uint32_t u32ClientId, bool *pfUpdate, char **ppszHostVersion, char **ppszGuestVersion);
|
---|
541 | VBGLR3DECL(int) VbglR3HostVersionLastCheckedLoad(uint32_t u32ClientId, char **ppszVer);
|
---|
542 | VBGLR3DECL(int) VbglR3HostVersionLastCheckedStore(uint32_t u32ClientId, const char *pszVer);
|
---|
543 | /** @} */
|
---|
544 | # endif /* VBOX_WITH_GUEST_PROPS defined */
|
---|
545 |
|
---|
546 | # ifdef VBOX_WITH_SHARED_FOLDERS
|
---|
547 | /** @name Shared folders
|
---|
548 | * @{ */
|
---|
549 | /**
|
---|
550 | * Structure containing mapping information for a shared folder.
|
---|
551 | */
|
---|
552 | typedef struct VBGLR3SHAREDFOLDERMAPPING
|
---|
553 | {
|
---|
554 | /** Mapping status. */
|
---|
555 | uint32_t u32Status;
|
---|
556 | /** Root handle. */
|
---|
557 | uint32_t u32Root;
|
---|
558 | } VBGLR3SHAREDFOLDERMAPPING;
|
---|
559 | /** Pointer to a shared folder mapping information struct. */
|
---|
560 | typedef VBGLR3SHAREDFOLDERMAPPING *PVBGLR3SHAREDFOLDERMAPPING;
|
---|
561 |
|
---|
562 | VBGLR3DECL(int) VbglR3SharedFolderConnect(uint32_t *pu32ClientId);
|
---|
563 | VBGLR3DECL(int) VbglR3SharedFolderDisconnect(uint32_t u32ClientId);
|
---|
564 | VBGLR3DECL(bool) VbglR3SharedFolderExists(uint32_t u32ClientId, const char *pszShareName);
|
---|
565 | VBGLR3DECL(int) VbglR3SharedFolderGetMappings(uint32_t u32ClientId, bool fAutoMountOnly,
|
---|
566 | PVBGLR3SHAREDFOLDERMAPPING *ppaMappings, uint32_t *pcMappings);
|
---|
567 | VBGLR3DECL(void) VbglR3SharedFolderFreeMappings(PVBGLR3SHAREDFOLDERMAPPING paMappings);
|
---|
568 | VBGLR3DECL(int) VbglR3SharedFolderGetName(uint32_t u32ClientId,uint32_t u32Root, char **ppszName);
|
---|
569 | VBGLR3DECL(int) VbglR3SharedFolderGetMountPrefix(char **ppszPrefix);
|
---|
570 | VBGLR3DECL(int) VbglR3SharedFolderGetMountDir(char **ppszDir);
|
---|
571 | /** @} */
|
---|
572 | # endif /* VBOX_WITH_SHARED_FOLDERS defined */
|
---|
573 |
|
---|
574 | # ifdef VBOX_WITH_GUEST_CONTROL
|
---|
575 | /** @name Guest control
|
---|
576 | * @{ */
|
---|
577 |
|
---|
578 | /**
|
---|
579 | * Structure containing the context required for
|
---|
580 | * either retrieving or sending a HGCM guest control
|
---|
581 | * command from or to the host.
|
---|
582 | *
|
---|
583 | * Note: Do not change parameter order without also
|
---|
584 | * adapting all structure initializers.
|
---|
585 | */
|
---|
586 | typedef struct VBGLR3GUESTCTRLCMDCTX
|
---|
587 | {
|
---|
588 | /** IN: HGCM client ID to use for
|
---|
589 | * communication. */
|
---|
590 | uint32_t uClientID;
|
---|
591 | /** IN/OUT: Context ID to retrieve
|
---|
592 | * or to use. */
|
---|
593 | uint32_t uContextID;
|
---|
594 | /** IN: Protocol version to use. */
|
---|
595 | uint32_t uProtocol;
|
---|
596 | /** OUT: Number of parameters retrieved. */
|
---|
597 | uint32_t uNumParms;
|
---|
598 | } VBGLR3GUESTCTRLCMDCTX, *PVBGLR3GUESTCTRLCMDCTX;
|
---|
599 |
|
---|
600 | /* General message handling on the guest. */
|
---|
601 | VBGLR3DECL(int) VbglR3GuestCtrlConnect(uint32_t *puClientId);
|
---|
602 | VBGLR3DECL(int) VbglR3GuestCtrlDisconnect(uint32_t uClientId);
|
---|
603 | VBGLR3DECL(int) VbglR3GuestCtrlMsgWaitFor(uint32_t uClientId, uint32_t *puMsg, uint32_t *puNumParms);
|
---|
604 | VBGLR3DECL(int) VbglR3GuestCtrlMsgSetFilter(uint32_t uClientId, uint32_t uFilterAdd, uint32_t uFilterRemove);
|
---|
605 | VBGLR3DECL(int) VbglR3GuestCtrlMsgSkip(uint32_t uClientId);
|
---|
606 | VBGLR3DECL(int) VbglR3GuestCtrlCancelPendingWaits(uint32_t u32ClientId);
|
---|
607 | /* Guest session handling. */
|
---|
608 | VBGLR3DECL(int) VbglR3GuestCtrlSessionNotify(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uType, uint32_t uResult);
|
---|
609 | VBGLR3DECL(int) VbglR3GuestCtrlSessionGetOpen(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puProtocol, char *pszUser, uint32_t cbUser, char *pszPassword, uint32_t cbPassword, char *pszDomain, uint32_t cbDomain, uint32_t *puFlags, uint32_t *puSessionID);
|
---|
610 | VBGLR3DECL(int) VbglR3GuestCtrlSessionGetClose(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puFlags, uint32_t *puSessionID);
|
---|
611 | /* Guest process execution. */
|
---|
612 | VBGLR3DECL(int) VbglR3GuestCtrlProcGetStart(PVBGLR3GUESTCTRLCMDCTX pCtx, char *pszCmd, uint32_t cbCmd, uint32_t *puFlags, char *pszArgs, uint32_t cbArgs, uint32_t *puNumArgs, char *pszEnv, uint32_t *pcbEnv, uint32_t *puNumEnvVars, char *pszUser, uint32_t cbUser, char *pszPassword, uint32_t cbPassword, uint32_t *puTimeoutMS, uint32_t *puPriority, uint64_t *puAffinity, uint32_t cbAffinity, uint32_t *pcAffinity);
|
---|
613 | VBGLR3DECL(int) VbglR3GuestCtrlProcGetTerminate(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puPID);
|
---|
614 | VBGLR3DECL(int) VbglR3GuestCtrlProcGetInput(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puPID, uint32_t *puFlags, void *pvData, uint32_t cbData, uint32_t *pcbSize);
|
---|
615 | VBGLR3DECL(int) VbglR3GuestCtrlProcGetOutput(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puPID, uint32_t *puHandle, uint32_t *puFlags);
|
---|
616 | VBGLR3DECL(int) VbglR3GuestCtrlProcGetWaitFor(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puPID, uint32_t *puWaitFlags, uint32_t *puTimeoutMS);
|
---|
617 | /* Guest native file handling. */
|
---|
618 | VBGLR3DECL(int) VbglR3GuestCtrlFileGetOpen(PVBGLR3GUESTCTRLCMDCTX pCtx, char *pszFileName, uint32_t cbFileName, char *pszOpenMode, uint32_t cbOpenMode, char *pszDisposition, uint32_t cbDisposition, uint32_t *puCreationMode, uint64_t *puOffset);
|
---|
619 | VBGLR3DECL(int) VbglR3GuestCtrlFileGetClose(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle);
|
---|
620 | VBGLR3DECL(int) VbglR3GuestCtrlFileGetRead(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle, uint32_t *puToRead);
|
---|
621 | VBGLR3DECL(int) VbglR3GuestCtrlFileGetReadAt(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle, uint32_t *puToRead, uint64_t *puOffset);
|
---|
622 | VBGLR3DECL(int) VbglR3GuestCtrlFileGetWrite(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle, void *pvData, uint32_t cbData, uint32_t *pcbSize);
|
---|
623 | VBGLR3DECL(int) VbglR3GuestCtrlFileGetWriteAt(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle, void *pvData, uint32_t cbData, uint32_t *pcbSize, uint64_t *puOffset);
|
---|
624 | VBGLR3DECL(int) VbglR3GuestCtrlFileGetSeek(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle, uint32_t *puSeekMethod, uint64_t *puOffset);
|
---|
625 | VBGLR3DECL(int) VbglR3GuestCtrlFileGetTell(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle);
|
---|
626 | /* Guest -> Host. */
|
---|
627 | VBGLR3DECL(int) VbglR3GuestCtrlFileCbOpen(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint32_t uFileHandle);
|
---|
628 | VBGLR3DECL(int) VbglR3GuestCtrlFileCbClose(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc);
|
---|
629 | VBGLR3DECL(int) VbglR3GuestCtrlFileCbRead(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, void *pvData, uint32_t cbData);
|
---|
630 | VBGLR3DECL(int) VbglR3GuestCtrlFileCbWrite(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint32_t uWritten);
|
---|
631 | VBGLR3DECL(int) VbglR3GuestCtrlFileCbSeek(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint64_t uOffActual);
|
---|
632 | VBGLR3DECL(int) VbglR3GuestCtrlFileCbTell(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint64_t uOffActual);
|
---|
633 | VBGLR3DECL(int) VbglR3GuestCtrlProcCbStatus(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uPID, uint32_t uStatus, uint32_t uFlags, void *pvData, uint32_t cbData);
|
---|
634 | VBGLR3DECL(int) VbglR3GuestCtrlProcCbOutput(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uPID, uint32_t uHandle, uint32_t uFlags, void *pvData, uint32_t cbData);
|
---|
635 | VBGLR3DECL(int) VbglR3GuestCtrlProcCbStatusInput(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t u32PID, uint32_t uStatus, uint32_t uFlags, uint32_t cbWritten);
|
---|
636 |
|
---|
637 | /** @} */
|
---|
638 | # endif /* VBOX_WITH_GUEST_CONTROL defined */
|
---|
639 |
|
---|
640 | /** @name Auto-logon handling
|
---|
641 | * @{ */
|
---|
642 | VBGLR3DECL(int) VbglR3AutoLogonReportStatus(VBoxGuestFacilityStatus enmStatus);
|
---|
643 | VBGLR3DECL(bool) VbglR3AutoLogonIsRemoteSession(void);
|
---|
644 | /** @} */
|
---|
645 |
|
---|
646 | /** @name User credentials handling
|
---|
647 | * @{ */
|
---|
648 | VBGLR3DECL(int) VbglR3CredentialsQueryAvailability(void);
|
---|
649 | VBGLR3DECL(int) VbglR3CredentialsRetrieve(char **ppszUser, char **ppszPassword, char **ppszDomain);
|
---|
650 | VBGLR3DECL(int) VbglR3CredentialsRetrieveUtf16(PRTUTF16 *ppwszUser, PRTUTF16 *ppwszPassword, PRTUTF16 *ppwszDomain);
|
---|
651 | VBGLR3DECL(void) VbglR3CredentialsDestroy(char *pszUser, char *pszPassword, char *pszDomain, uint32_t cPasses);
|
---|
652 | VBGLR3DECL(void) VbglR3CredentialsDestroyUtf16(PRTUTF16 pwszUser, PRTUTF16 pwszPassword, PRTUTF16 pwszDomain,
|
---|
653 | uint32_t cPasses);
|
---|
654 | /** @} */
|
---|
655 |
|
---|
656 | /** @name CPU hotplug monitor
|
---|
657 | * @{ */
|
---|
658 | VBGLR3DECL(int) VbglR3CpuHotPlugInit(void);
|
---|
659 | VBGLR3DECL(int) VbglR3CpuHotPlugTerm(void);
|
---|
660 | VBGLR3DECL(int) VbglR3CpuHotPlugWaitForEvent(VMMDevCpuEventType *penmEventType, uint32_t *pidCpuCore, uint32_t *pidCpuPackage);
|
---|
661 | /** @} */
|
---|
662 |
|
---|
663 | /** @name Page sharing
|
---|
664 | * @{ */
|
---|
665 | VBGLR3DECL(int) VbglR3RegisterSharedModule(char *pszModuleName, char *pszVersion, RTGCPTR64 GCBaseAddr, uint32_t cbModule, unsigned cRegions, VMMDEVSHAREDREGIONDESC *pRegions);
|
---|
666 | VBGLR3DECL(int) VbglR3UnregisterSharedModule(char *pszModuleName, char *pszVersion, RTGCPTR64 GCBaseAddr, uint32_t cbModule);
|
---|
667 | VBGLR3DECL(int) VbglR3CheckSharedModules(void);
|
---|
668 | VBGLR3DECL(bool) VbglR3PageSharingIsEnabled(void);
|
---|
669 | VBGLR3DECL(int) VbglR3PageIsShared(RTGCPTR pPage, bool *pfShared, uint64_t *puPageFlags);
|
---|
670 | /** @} */
|
---|
671 |
|
---|
672 | # ifdef VBOX_WITH_DRAG_AND_DROP
|
---|
673 | /** @name Drag and Drop
|
---|
674 | * @{ */
|
---|
675 | typedef struct VBGLR3DNDHGCMEVENT
|
---|
676 | {
|
---|
677 | uint32_t uType; /** The event type this struct contains */
|
---|
678 | uint32_t uScreenId; /** Screen id this request belongs to */
|
---|
679 | char *pszFormats; /** Format list (\r\n separated) */
|
---|
680 | uint32_t cbFormats; /** Size of pszFormats (\0 included) */
|
---|
681 | union
|
---|
682 | {
|
---|
683 | struct
|
---|
684 | {
|
---|
685 | uint32_t uXpos; /** X position of guest screen */
|
---|
686 | uint32_t uYpos; /** Y position of guest screen */
|
---|
687 | uint32_t uDefAction; /** Proposed DnD action */
|
---|
688 | uint32_t uAllActions; /** Allowed DnD actions */
|
---|
689 | }a; /** Values used in init, move and drop event type */
|
---|
690 | struct
|
---|
691 | {
|
---|
692 | void *pvData; /** Data request */
|
---|
693 | size_t cbData; /** Size of pvData */
|
---|
694 | }b; /** Values used in drop data event type */
|
---|
695 | }u;
|
---|
696 | } VBGLR3DNDHGCMEVENT;
|
---|
697 | typedef VBGLR3DNDHGCMEVENT *PVBGLR3DNDHGCMEVENT;
|
---|
698 | typedef const PVBGLR3DNDHGCMEVENT CPVBGLR3DNDHGCMEVENT;
|
---|
699 | VBGLR3DECL(int) VbglR3DnDInit(void);
|
---|
700 | VBGLR3DECL(int) VbglR3DnDTerm(void);
|
---|
701 |
|
---|
702 | VBGLR3DECL(int) VbglR3DnDConnect(uint32_t *pu32ClientId);
|
---|
703 | VBGLR3DECL(int) VbglR3DnDDisconnect(uint32_t u32ClientId);
|
---|
704 |
|
---|
705 | VBGLR3DECL(int) VbglR3DnDProcessNextMessage(CPVBGLR3DNDHGCMEVENT pEvent);
|
---|
706 |
|
---|
707 | VBGLR3DECL(int) VbglR3DnDHGAcknowledgeOperation(uint32_t uAction);
|
---|
708 | VBGLR3DECL(int) VbglR3DnDHGRequestData(const char* pcszFormat);
|
---|
709 | # ifdef VBOX_WITH_DRAG_AND_DROP_GH
|
---|
710 | VBGLR3DECL(int) VbglR3DnDGHAcknowledgePending(uint32_t uDefAction, uint32_t uAllActions, const char* pcszFormat);
|
---|
711 | VBGLR3DECL(int) VbglR3DnDGHSendData(void *pvData, uint32_t cbData);
|
---|
712 | VBGLR3DECL(int) VbglR3DnDGHErrorEvent(int rcOp);
|
---|
713 | # endif /* VBOX_WITH_DRAG_AND_DROP_GH */
|
---|
714 | /** @} */
|
---|
715 | # endif /* VBOX_WITH_DRAG_AND_DROP */
|
---|
716 |
|
---|
717 | /* Generic Host Channel Service. */
|
---|
718 | VBGLR3DECL(int) VbglR3HostChannelInit(uint32_t *pu32HGCMClientId);
|
---|
719 | VBGLR3DECL(void) VbglR3HostChannelTerm(uint32_t u32HGCMClientId);
|
---|
720 | VBGLR3DECL(int) VbglR3HostChannelAttach(uint32_t *pu32ChannelHandle, uint32_t u32HGCMClientId,
|
---|
721 | const char *pszName, uint32_t u32Flags);
|
---|
722 | VBGLR3DECL(void) VbglR3HostChannelDetach(uint32_t u32ChannelHandle, uint32_t u32HGCMClientId);
|
---|
723 | VBGLR3DECL(int) VbglR3HostChannelSend(uint32_t u32ChannelHandle, uint32_t u32HGCMClientId,
|
---|
724 | void *pvData, uint32_t cbData);
|
---|
725 | VBGLR3DECL(int) VbglR3HostChannelRecv(uint32_t u32ChannelHandle, uint32_t u32HGCMClientId,
|
---|
726 | void *pvData, uint32_t cbData,
|
---|
727 | uint32_t *pu32SizeReceived, uint32_t *pu32SizeRemaining);
|
---|
728 | VBGLR3DECL(int) VbglR3HostChannelControl(uint32_t u32ChannelHandle, uint32_t u32HGCMClientId,
|
---|
729 | uint32_t u32Code, void *pvParm, uint32_t cbParm,
|
---|
730 | void *pvData, uint32_t cbData, uint32_t *pu32SizeDataReturned);
|
---|
731 | VBGLR3DECL(int) VbglR3HostChannelEventWait(uint32_t *pu32ChannelHandle, uint32_t u32HGCMClientId,
|
---|
732 | uint32_t *pu32EventId, void *pvParm, uint32_t cbParm,
|
---|
733 | uint32_t *pu32SizeReturned);
|
---|
734 | VBGLR3DECL(int) VbglR3HostChannelEventCancel(uint32_t u32ChannelHandle, uint32_t u32HGCMClientId);
|
---|
735 | VBGLR3DECL(int) VbglR3HostChannelQuery(const char *pszName, uint32_t u32HGCMClientId, uint32_t u32Code,
|
---|
736 | void *pvParm, uint32_t cbParm, void *pvData, uint32_t cbData,
|
---|
737 | uint32_t *pu32SizeDataReturned);
|
---|
738 |
|
---|
739 | #endif /* IN_RING3 */
|
---|
740 | /** @} */
|
---|
741 |
|
---|
742 | RT_C_DECLS_END
|
---|
743 |
|
---|
744 | /** @} */
|
---|
745 |
|
---|
746 | #endif
|
---|
747 |
|
---|