VBoxGuestLib.h revision 1cca6326f8d4b7e11408cd2037ffd69820a70858
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync/** @file
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * VBoxGuestLib - VirtualBox Guest Additions Library.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync */
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync/*
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * Copyright (C) 2006-2009 Oracle Corporation
e64031e20c39650a7bc902a3e1aba613b9415deevboxsync *
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * available from http://www.virtualbox.org. This file is free software;
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * you can redistribute it and/or modify it under the terms of the GNU
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * General Public License (GPL) as published by the Free Software
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync *
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * The contents of this file may alternatively be used under the terms
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * of the Common Development and Distribution License Version 1.0
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * VirtualBox OSE distribution, in which case the provisions of the
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * CDDL are applicable instead of those of the GPL.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync *
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * You may elect to license modified versions of this file under the
43747b1f0bc8302a238fb35e55857a5e9aa1933dvboxsync * terms and conditions of either the GPL or the CDDL or both.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync */
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync#ifndef ___VBox_VBoxGuestLib_h
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync#define ___VBox_VBoxGuestLib_h
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync#include <VBox/types.h>
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync#include <VBox/VMMDev2.h>
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync#include <VBox/VMMDev.h> /* grumble */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync#ifdef IN_RING0
3eef103be36a8f4828d69cfec3cea9bcefc9fd92vboxsync# include <VBox/VBoxGuest2.h>
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync#endif
f5e53763b0a581b0299e98028c6c52192eb06785vboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync/** @defgroup grp_guest_lib VirtualBox Guest Additions Library
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @{
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync */
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync/** @page pg_guest_lib VirtualBox Guest Library
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync *
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync * This is a library for abstracting the additions driver interface. There are
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync * multiple versions of the library depending on the context. The main
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync * distinction is between kernel and user mode where the interfaces are very
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync * different.
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync *
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync *
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync * @section sec_guest_lib_ring0 Ring-0
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync *
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync * In ring-0 there are two version:
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync * - VBOX_LIB_VBGL_R0_BASE / VBoxGuestR0LibBase for the VBoxGuest main driver,
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync * who is responsible for managing the VMMDev virtual hardware.
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync * - VBOX_LIB_VBGL_R0 / VBoxGuestR0Lib for other (client) guest drivers.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync *
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync *
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * The library source code and the header have a define VBGL_VBOXGUEST, which is
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * defined for VBoxGuest and undefined for other drivers. Drivers must choose
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * right library in their makefiles and set VBGL_VBOXGUEST accordingly.
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync *
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync * The libraries consists of:
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * - common code to be used by both VBoxGuest and other drivers;
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * - VBoxGuest specific code;
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * - code for other drivers which communicate with VBoxGuest via an IOCTL.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync *
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync *
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @section sec_guest_lib_ring3 Ring-3
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync *
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * There are more variants of the library here:
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * - VBOX_LIB_VBGL_R3 / VBoxGuestR3Lib for programs.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * - VBOX_LIB_VBGL_R3_XFREE86 / VBoxGuestR3LibXFree86 for old style XFree
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync * drivers which uses special loader and or symbol resolving strategy.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * - VBOX_LIB_VBGL_R3_SHARED / VBoxGuestR3LibShared for shared objects / DLLs /
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * Dylibs.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync *
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync */
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncRT_C_DECLS_BEGIN
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync/** @defgroup grp_guest_lib_r0 Ring-0 interface.
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * @{
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync */
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync#if defined(IN_RING0) && !defined(IN_RING0_AGNOSTIC)
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync/** @def DECLR0VBGL
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * Declare a VBGL ring-0 API with the right calling convention and visibilitiy.
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * @param type Return type. */
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync# define DECLR0VBGL(type) type VBOXCALL
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync# define DECLVBGL(type) DECLR0VBGL(type)
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsynctypedef uint32_t VBGLIOPORT; /**< @todo r=bird: We have RTIOPORT (uint16_t) for this. */
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync# ifdef VBGL_VBOXGUEST
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync/**
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * The library initialization function to be used by the main
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * VBoxGuest system driver.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync *
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @return VBox status code.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync */
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsyncDECLVBGL(int) VbglInit (VBGLIOPORT portVMMDev, struct VMMDevMemory *pVMMDevMemory);
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
ad27e1d5e48ca41245120c331cc88b50464813cevboxsync# else
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync/**
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * The library initialization function to be used by all drivers
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * other than the main VBoxGuest system driver.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync *
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync * @return VBox status code.
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncDECLVBGL(int) VbglInit (void);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync# endif
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync/**
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync * The library termination function.
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncDECLVBGL(void) VbglTerminate (void);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync/** @name Generic request functions.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @{
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync */
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync/**
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * Allocate memory for generic request and initialize the request header.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync *
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @param ppReq pointer to resulting memory address.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @param cbSize size of memory block required for the request.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @param reqType the generic request type.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync *
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @return VBox status code.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync */
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsyncDECLVBGL(int) VbglGRAlloc (VMMDevRequestHeader **ppReq, uint32_t cbSize, VMMDevRequestType reqType);
cab115cfa31c584def7069312a1e23c3fc88533bvboxsync
cab115cfa31c584def7069312a1e23c3fc88533bvboxsync/**
cab115cfa31c584def7069312a1e23c3fc88533bvboxsync * Perform the generic request.
cab115cfa31c584def7069312a1e23c3fc88533bvboxsync *
cab115cfa31c584def7069312a1e23c3fc88533bvboxsync * @param pReq pointer the request structure.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync *
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @return VBox status code.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncDECLVBGL(int) VbglGRPerform (VMMDevRequestHeader *pReq);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/**
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * Free the generic request memory.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync *
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @param pReq pointer the request structure.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync *
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @return VBox status code.
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncDECLVBGL(void) VbglGRFree (VMMDevRequestHeader *pReq);
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync/**
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync * Verify the generic request header.
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync *
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync * @param pReq pointer the request header structure.
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync * @param cbReq size of the request memory block. It should be equal to the request size
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync * for fixed size requests. It can be greater than the request size for
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync * variable size requests.
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync *
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync * @return VBox status code.
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncDECLVBGL(int) VbglGRVerify (const VMMDevRequestHeader *pReq, size_t cbReq);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync/** @} */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync# ifdef VBOX_WITH_HGCM
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync# ifdef VBGL_VBOXGUEST
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync/**
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * Callback function called from HGCM helpers when a wait for request
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * completion IRQ is required.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync *
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @returns VINF_SUCCESS, VERR_INTERRUPT or VERR_TIMEOUT.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @param pvData VBoxGuest pointer to be passed to callback.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @param u32Data VBoxGuest 32 bit value to be passed to callback.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync */
a98c2afd05b2949737f73ec954d227712f3b0146vboxsynctypedef DECLVBGL(int) FNVBGLHGCMCALLBACK(VMMDevHGCMRequestHeader *pHeader, void *pvData, uint32_t u32Data);
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync/** Pointer to a FNVBGLHGCMCALLBACK. */
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsynctypedef FNVBGLHGCMCALLBACK *PFNVBGLHGCMCALLBACK;
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync/**
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * Perform a connect request. That is locate required service and
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * obtain a client identifier for future access.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync *
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @note This function can NOT handle cancelled requests!
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync *
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @param pConnectInfo The request data.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @param pfnAsyncCallback Required pointer to function that is calledwhen
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * implements waiting for an IRQ in this function.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @param pvAsyncData An arbitrary VBoxGuest pointer to be passed to callback.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @param u32AsyncData An arbitrary VBoxGuest 32 bit value to be passed to callback.
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync *
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @return VBox status code.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsyncDECLR0VBGL(int) VbglR0HGCMInternalConnect (VBoxGuestHGCMConnectInfo *pConnectInfo,
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
34b5a73592441cbfacb85c2f2261648c1d25ad31vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/**
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * Perform a disconnect request. That is tell the host that
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * the client will not call the service anymore.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync *
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @note This function can NOT handle cancelled requests!
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync *
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @param pDisconnectInfo The request data.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @param pfnAsyncCallback Required pointer to function that is called when
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * implements waiting for an IRQ in this function.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @param pvAsyncData An arbitrary VBoxGuest pointer to be passed to callback.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @param u32AsyncData An arbitrary VBoxGuest 32 bit value to be passed to
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * callback.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync *
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @return VBox status code.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync */
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync
a98c2afd05b2949737f73ec954d227712f3b0146vboxsyncDECLR0VBGL(int) VbglR0HGCMInternalDisconnect (VBoxGuestHGCMDisconnectInfo *pDisconnectInfo,
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync/** Call a HGCM service.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync *
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @note This function can deal with cancelled requests.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync *
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @param pCallInfo The request data.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @param fFlags Flags, see VBGLR0_HGCMCALL_F_XXX.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @param pfnAsyncCallback Required pointer to function that is called when
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * implements waiting for an IRQ in this function.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @param pvAsyncData An arbitrary VBoxGuest pointer to be passed to callback.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @param u32AsyncData An arbitrary VBoxGuest 32 bit value to be passed to callback.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync *
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @return VBox status code.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync */
a98c2afd05b2949737f73ec954d227712f3b0146vboxsyncDECLR0VBGL(int) VbglR0HGCMInternalCall (VBoxGuestHGCMCallInfo *pCallInfo, uint32_t cbCallInfo, uint32_t fFlags,
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync/** Call a HGCM service. (32 bits packet structure in a 64 bits guest)
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync *
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @note This function can deal with cancelled requests.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync *
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @param pCallInfo The request data.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @param fFlags Flags, see VBGLR0_HGCMCALL_F_XXX.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @param pfnAsyncCallback Required pointer to function that is called when
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * implements waiting for an IRQ in this function.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @param pvAsyncData An arbitrary VBoxGuest pointer to be passed to callback.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @param u32AsyncData An arbitrary VBoxGuest 32 bit value to be passed to callback.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync *
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync * @return VBox status code.
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncDECLR0VBGL(int) VbglR0HGCMInternalCall32 (VBoxGuestHGCMCallInfo *pCallInfo, uint32_t cbCallInfo, uint32_t fFlags,
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** @name VbglR0HGCMInternalCall flags
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @{ */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** User mode request.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * Indicates that only user mode addresses are permitted as parameters. */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync#define VBGLR0_HGCMCALL_F_USER UINT32_C(0)
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** Kernel mode request.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * Indicates that kernel mode addresses are permitted as parameters. Whether or
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * not user mode addresses are permitted is, unfortunately, OS specific. The
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * following OSes allows user mode addresses: Windows, TODO.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync#define VBGLR0_HGCMCALL_F_KERNEL UINT32_C(1)
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync/** Mode mask. */
6114ff5789db75ff28460a056ed422ee03d8f0ebvboxsync#define VBGLR0_HGCMCALL_F_MODE_MASK UINT32_C(1)
6114ff5789db75ff28460a056ed422ee03d8f0ebvboxsync/** @} */
6114ff5789db75ff28460a056ed422ee03d8f0ebvboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync# else /* !VBGL_VBOXGUEST */
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsyncstruct VBGLHGCMHANDLEDATA;
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsynctypedef struct VBGLHGCMHANDLEDATA *VBGLHGCMHANDLE;
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync/** @name HGCM functions
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * @{
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync */
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync/**
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * Connect to a service.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync *
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @param pHandle Pointer to variable that will hold a handle to be used
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * further in VbglHGCMCall and VbglHGCMClose.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @param pData Connection information structure.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync *
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @return VBox status code.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync */
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsyncDECLVBGL(int) VbglHGCMConnect (VBGLHGCMHANDLE *pHandle, VBoxGuestHGCMConnectInfo *pData);
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync/**
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * Connect to a service.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync *
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @param handle Handle of the connection.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @param pData Disconnect request information structure.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync *
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @return VBox status code.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync */
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsyncDECLVBGL(int) VbglHGCMDisconnect (VBGLHGCMHANDLE handle, VBoxGuestHGCMDisconnectInfo *pData);
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync/**
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * Call to a service.
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync *
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @param handle Handle of the connection.
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * @param pData Call request information structure, including function parameters.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @param cbData Length in bytes of data.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync *
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * @return VBox status code.
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync */
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsyncDECLVBGL(int) VbglHGCMCall (VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData);
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync/**
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * Call to a service with timeout.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync *
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @param handle Handle of the connection.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @param pData Call request information structure, including function parameters.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @param cbData Length in bytes of data.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @param cMillies Timeout in milliseconds. Use RT_INDEFINITE_WAIT to wait forever.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync *
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @return VBox status code.
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync */
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsyncDECLVBGL(int) VbglHGCMCallTimed (VBGLHGCMHANDLE handle,
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync VBoxGuestHGCMCallInfoTimed *pData, uint32_t cbData);
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync/** @} */
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync# endif /* !VBGL_VBOXGUEST */
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync# endif /* VBOX_WITH_HGCM */
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync/**
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * Initialize the heap.
e93dfb5368911523b10cd2f506c44f5fbd47abf3vboxsync *
e93dfb5368911523b10cd2f506c44f5fbd47abf3vboxsync * @return VBox error code.
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync */
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsyncDECLVBGL(int) VbglPhysHeapInit (void);
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync/**
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * Shutdown the heap.
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync */
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsyncDECLVBGL(void) VbglPhysHeapTerminate (void);
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync/**
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * Allocate a memory block.
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync *
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * @param cbSize Size of block to be allocated.
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * @return Virtual address of allocated memory block.
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync */
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsyncDECLVBGL(void *) VbglPhysHeapAlloc (uint32_t cbSize);
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync/**
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * Get physical address of memory block pointed by
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * the virtual address.
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync *
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * @note WARNING!
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * The function does not acquire the Heap mutex!
bf27591c0d413dd4d7ba41cf89f117171968d462vboxsync * When calling the function make sure that
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * the pointer is a valid one and is not being
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * deallocated.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * This function can NOT be used for verifying
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * if the given pointer is a valid one allocated
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * from the heap.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync *
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync *
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @param p Virtual address of memory block.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @return Physical memory block.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncDECLVBGL(RTCCPHYS) VbglPhysHeapGetPhysAddr (void *p);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/**
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * Free a memory block.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync *
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @param p Virtual address of memory block.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncDECLVBGL(void) VbglPhysHeapFree (void *p);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncDECLVBGL(int) VbglQueryVMMDevMemory (VMMDevMemory **ppVMMDevMemory);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncDECLR0VBGL(bool) VbglR0CanUsePhysPageList(void);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync#endif /* IN_RING0 && !IN_RING0_AGNOSTIC */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** @} */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
6114ff5789db75ff28460a056ed422ee03d8f0ebvboxsync/** @defgroup grp_guest_lib_r3 Ring-3 interface.
6114ff5789db75ff28460a056ed422ee03d8f0ebvboxsync * @{
6114ff5789db75ff28460a056ed422ee03d8f0ebvboxsync */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync#ifdef IN_RING3
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** @def VBGLR3DECL
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * Ring 3 VBGL declaration.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @param type The return type of the function declaration.
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync# define VBGLR3DECL(type) type VBOXCALL
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** @name General-purpose functions
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @{ */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3Init(void);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3InitUser(void);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(void) VbglR3Term(void);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync# ifdef ___iprt_time_h
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3GetHostTime(PRTTIMESPEC pTime);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync# endif
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3InterruptEventWaits(void);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3WriteLog(const char *pch, size_t cch);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3CtlFilterMask(uint32_t fOr, uint32_t fNot);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3Daemonize(bool fNoChDir, bool fNoClose);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3PidFile(const char *pszPath, PRTFILE phFile);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(void) VbglR3ClosePidFile(const char *pszPath, RTFILE hFile);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3SetGuestCaps(uint32_t fOr, uint32_t fNot);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3WaitEvent(uint32_t fMask, uint32_t cMillies, uint32_t *pfEvents);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3ReportAdditionsStatus(uint32_t u32Facility, uint32_t u32Status, uint32_t u32Flags);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3GetAdditionsVersion(char **ppszVer, char **ppszRev);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3GetAdditionsInstallationPath(char **ppszPath);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3GetSessionId(uint64_t *pu64IdSession);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** @} */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** @name Shared clipboard
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @{ */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3ClipboardConnect(uint32_t *pu32ClientId);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3ClipboardDisconnect(uint32_t u32ClientId);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3ClipboardGetHostMsg(uint32_t u32ClientId, uint32_t *pMsg, uint32_t *pfFormats);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3ClipboardReadData(uint32_t u32ClientId, uint32_t fFormat, void *pv, uint32_t cb, uint32_t *pcb);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3ClipboardReportFormats(uint32_t u32ClientId, uint32_t fFormats);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3ClipboardWriteData(uint32_t u32ClientId, uint32_t fFormat, void *pv, uint32_t cb);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** @} */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
1426407ebd84624dd10808b452b19d1fc4f6835avboxsync/** @name Seamless mode
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @{ */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3SeamlessSetCap(bool fState);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3SeamlessWaitEvent(VMMDevSeamlessMode *pMode);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3SeamlessSendRects(uint32_t cRects, PRTRECT pRects);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3SeamlessGetLastEvent(VMMDevSeamlessMode *pMode);
1426407ebd84624dd10808b452b19d1fc4f6835avboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** @} */
1426407ebd84624dd10808b452b19d1fc4f6835avboxsync
1426407ebd84624dd10808b452b19d1fc4f6835avboxsync/** @name Mouse
1426407ebd84624dd10808b452b19d1fc4f6835avboxsync * @{ */
1426407ebd84624dd10808b452b19d1fc4f6835avboxsyncVBGLR3DECL(int) VbglR3GetMouseStatus(uint32_t *pfFeatures, uint32_t *px, uint32_t *py);
1426407ebd84624dd10808b452b19d1fc4f6835avboxsyncVBGLR3DECL(int) VbglR3SetMouseStatus(uint32_t fFeatures);
1426407ebd84624dd10808b452b19d1fc4f6835avboxsync/** @} */
1426407ebd84624dd10808b452b19d1fc4f6835avboxsync
1426407ebd84624dd10808b452b19d1fc4f6835avboxsync/** @name Video
1426407ebd84624dd10808b452b19d1fc4f6835avboxsync * @{ */
1426407ebd84624dd10808b452b19d1fc4f6835avboxsyncVBGLR3DECL(int) VbglR3VideoAccelEnable(bool fEnable);
1426407ebd84624dd10808b452b19d1fc4f6835avboxsyncVBGLR3DECL(int) VbglR3VideoAccelFlush(void);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3SetPointerShape(uint32_t fFlags, uint32_t xHot, uint32_t yHot, uint32_t cx, uint32_t cy, const void *pvImg, size_t cbImg);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3SetPointerShapeReq(struct VMMDevReqMousePointer *pReq);
e93dfb5368911523b10cd2f506c44f5fbd47abf3vboxsync/** @} */
e93dfb5368911523b10cd2f506c44f5fbd47abf3vboxsync
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync/** @name Display
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsync * @{ */
fb7b8c126ea3bc0adf9dd2b2b6a43870ee41853avboxsyncVBGLR3DECL(int) VbglR3GetDisplayChangeRequest(uint32_t *pcx, uint32_t *pcy, uint32_t *pcBits, uint32_t *piDisplay, bool fAck);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(bool) VbglR3HostLikesVideoMode(uint32_t cx, uint32_t cy, uint32_t cBits);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3SaveVideoMode(const char *pszName, uint32_t cx, uint32_t cy, uint32_t cBits);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3RetrieveVideoMode(const char *pszName, uint32_t *pcx, uint32_t *pcy, uint32_t *pcBits);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** @} */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync/** @name VM Statistics
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync * @{ */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3StatQueryInterval(uint32_t *pu32Interval);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3StatReport(VMMDevReportGuestStats *pReq);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync/** @} */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync/** @name Memory ballooning
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync * @{ */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3MemBalloonRefresh(uint32_t *pcChunks, bool *pfHandleInR3);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3MemBalloonChange(void *pv, bool fInflate);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync/** @} */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync
a98c2afd05b2949737f73ec954d227712f3b0146vboxsync# ifdef VBOX_WITH_GUEST_PROPS
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync/** @name Guest properties
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync * @{ */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync/** @todo Docs. */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsynctypedef struct VBGLR3GUESTPROPENUM VBGLR3GUESTPROPENUM;
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync/** @todo Docs. */
7de81a482cdfc1bbf53600a4f6cdd4c892ee460cvboxsynctypedef VBGLR3GUESTPROPENUM *PVBGLR3GUESTPROPENUM;
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestPropConnect(uint32_t *pu32ClientId);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestPropDisconnect(uint32_t u32ClientId);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestPropWrite(uint32_t u32ClientId, const char *pszName, const char *pszValue, const char *pszFlags);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestPropWriteValue(uint32_t u32ClientId, const char *pszName, const char *pszValue);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestPropWriteValueV(uint32_t u32ClientId, const char *pszName, const char *pszValueFormat, va_list va);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestPropWriteValueF(uint32_t u32ClientId, const char *pszName, const char *pszValueFormat, ...);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestPropRead(uint32_t u32ClientId, const char *pszName, void *pvBuf, uint32_t cbBuf, char **ppszValue, uint64_t *pu64Timestamp, char **ppszFlags, uint32_t *pcbBufActual);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestPropReadValue(uint32_t ClientId, const char *pszName, char *pszValue, uint32_t cchValue, uint32_t *pcchValueActual);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestPropReadValueAlloc(uint32_t u32ClientId, const char *pszName, char **ppszValue);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(void) VbglR3GuestPropReadValueFree(char *pszValue);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestPropEnumRaw(uint32_t u32ClientId, const char *paszPatterns, char *pcBuf, uint32_t cbBuf, uint32_t *pcbBufActual);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestPropEnum(uint32_t u32ClientId, char const * const *ppaszPatterns, uint32_t cPatterns, PVBGLR3GUESTPROPENUM *ppHandle,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync char const **ppszName, char const **ppszValue, uint64_t *pu64Timestamp, char const **ppszFlags);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestPropEnumNext(PVBGLR3GUESTPROPENUM pHandle, char const **ppszName, char const **ppszValue, uint64_t *pu64Timestamp,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync char const **ppszFlags);
060db742c6ecb43560beec8754fb5b9c13bd7856vboxsyncVBGLR3DECL(void) VbglR3GuestPropEnumFree(PVBGLR3GUESTPROPENUM pHandle);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestPropDelSet(uint32_t u32ClientId, char const * const *papszPatterns, uint32_t cPatterns);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(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);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync/** @} */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync/** @name Host version handling
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync * @{ */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3HostVersionCheckForUpdate(uint32_t u32ClientId, bool *pfUpdate, char **ppszHostVersion, char **ppszGuestVersion);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3HostVersionLastCheckedLoad(uint32_t u32ClientId, char **ppszVer);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3HostVersionLastCheckedStore(uint32_t u32ClientId, const char *pszVer);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync/** @} */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync# endif /* VBOX_WITH_GUEST_PROPS defined */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync# ifdef VBOX_WITH_GUEST_CONTROL
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync/** @name Guest control
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync * @{ */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestCtrlConnect(uint32_t *pu32ClientId);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestCtrlDisconnect(uint32_t u32ClientId);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestCtrlGetHostMsg(uint32_t u32ClientId, uint32_t *puMsg, uint32_t *puNumParms);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestCtrlCancelPendingWaits(uint32_t u32ClientId);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestCtrlExecGetHostCmd(uint32_t u32ClientId, uint32_t uNumParms,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync uint32_t *puContext,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync char *pszCmd, uint32_t cbCmd,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync uint32_t *puFlags,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync char *pszArgs, uint32_t cbArgs, uint32_t *puNumArgs,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync char *pszEnv, uint32_t *pcbEnv, uint32_t *puNumEnvVars,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync char *pszUser, uint32_t cbUser,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync char *pszPassword, uint32_t cbPassword,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync uint32_t *puTimeLimit);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestCtrlExecGetHostCmdOutput(uint32_t u32ClientId, uint32_t uNumParms,
c7ff622115966b69b482bd2896662e40d823b22fvboxsync uint32_t *puContext, uint32_t *puPID,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync uint32_t *puHandle, uint32_t *puFlags);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestCtrlExecReportStatus(uint32_t u32ClientId,
c5f009d280c87ab513356eb5585eff8b4cd26db7vboxsync uint32_t u32Context,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync uint32_t u32PID,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync uint32_t u32Status,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync uint32_t u32Flags,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync void *pvData,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync uint32_t cbData);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3GuestCtrlExecSendOut(uint32_t u32ClientId,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync uint32_t u32Context,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync uint32_t u32PID,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync uint32_t u32Handle,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync uint32_t u32Flags,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync void *pvData,
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync uint32_t cbData);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** @} */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync# endif /* VBOX_WITH_GUEST_CONTROL defined */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** @name User credentials handling
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @{ */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3CredentialsQueryAvailability(void);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3CredentialsRetrieve(char **ppszUser, char **ppszPassword, char **ppszDomain);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(void) VbglR3CredentialsDestroy(char *pszUser, char *pszPassword, char *pszDomain, uint32_t cPasses);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** @} */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** @name CPU hotplug monitor
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @{ */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3CpuHotPlugInit(void);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3CpuHotPlugTerm(void);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3CpuHotPlugWaitForEvent(VMMDevCpuEventType *penmEventType, uint32_t *pidCpuCore, uint32_t *pidCpuPackage);
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** @} */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** @name Page sharing
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync * @{ */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsyncVBGLR3DECL(int) VbglR3RegisterSharedModule(char *pszModuleName, char *pszVersion, RTGCPTR64 GCBaseAddr, uint32_t cbModule, unsigned cRegions, VMMDEVSHAREDREGIONDESC *pRegions);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3UnregisterSharedModule(char *pszModuleName, char *pszVersion, RTGCPTR64 GCBaseAddr, uint32_t cbModule);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3CheckSharedModules(void);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(bool) VbglR3PageSharingIsEnabled(void);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncVBGLR3DECL(int) VbglR3PageIsShared(RTGCPTR pPage, bool *pfShared, uint64_t *puPageFlags);
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync/** @} */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync#endif /* IN_RING3 */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync/** @} */
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsync
3e88c818fff5c64b5eff43d5daf4596bd87230c5vboxsyncRT_C_DECLS_END
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync/** @} */
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync#endif
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync
b26de2ddb274b0e52de6652ad8b45259be2b9913vboxsync