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