pdmifs.h revision 99680849e695066df41531d860909e2e64e790f1
332d68e9666b04a5aa788a586d9f4c6b1f19c700vboxsync * PDM - Pluggable Device Manager, Interfaces.
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync * Copyright (C) 2006-2012 Oracle Corporation
9496b6f77d66eb89f088668752b8838d578d6e10vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
9496b6f77d66eb89f088668752b8838d578d6e10vboxsync * available from http://www.virtualbox.org. This file is free software;
9496b6f77d66eb89f088668752b8838d578d6e10vboxsync * you can redistribute it and/or modify it under the terms of the GNU
9496b6f77d66eb89f088668752b8838d578d6e10vboxsync * General Public License (GPL) as published by the Free Software
9496b6f77d66eb89f088668752b8838d578d6e10vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
9496b6f77d66eb89f088668752b8838d578d6e10vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * The contents of this file may alternatively be used under the terms
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * of the Common Development and Distribution License Version 1.0
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync * VirtualBox OSE distribution, in which case the provisions of the
0c8b774aca1168c2007424a49f6fa159fc23e42bvboxsync * CDDL are applicable instead of those of the GPL.
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * You may elect to license modified versions of this file under the
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * terms and conditions of either the GPL or the CDDL or both.
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync/** @defgroup grp_pdm_interfaces The PDM Interface Definitions
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * @ingroup grp_pdm
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * For historical reasons (the PDMINTERFACE enum) a lot of interface was stuffed
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * together in this group instead, dragging stuff into global space that didn't
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * need to be there and making this file huge (>2500 lines). Since we're using
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * UUIDs as interface identifiers (IIDs) now, no only generic PDM interface will
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * be added to this file. Component specific interface should be defined in the
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * header file of that component.
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * Interfaces consists of a method table (typedef'ed struct) and an interface
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * ID. The typename of the method table should have an 'I' in it, be all
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * capitals and according to the rules, no underscores. The interface ID is a
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * \#define constructed by appending '_IID' to the typename. The IID value is a
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * UUID string on the form "a2299c0d-b709-4551-aa5a-73f59ffbed74". If you stick
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * to these rules, you can make use of the PDMIBASE_QUERY_INTERFACE and
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * PDMIBASE_RETURN_INTERFACE when querying interface and implementing
0c8b774aca1168c2007424a49f6fa159fc23e42bvboxsync * PDMIBASE::pfnQueryInterface respectively.
0c8b774aca1168c2007424a49f6fa159fc23e42bvboxsync * In most interface descriptions the orientation of the interface is given as
0c8b774aca1168c2007424a49f6fa159fc23e42bvboxsync * 'down' or 'up'. This refers to a model with the device on the top and the
0c8b774aca1168c2007424a49f6fa159fc23e42bvboxsync * drivers stacked below it. Sometimes there is mention of 'main' or 'external'
9a08dd6ed47cffa9cacbb9d53db1ce71d04db61fvboxsync * which normally means the same, i.e. the Main or VBoxBFE API. Picture the
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * orientation of 'main' as horizontal.
0c8b774aca1168c2007424a49f6fa159fc23e42bvboxsync/** @name PDMIBASE
53e1c27c7564c45ad0b92676ddea561591a3e869vboxsync * PDM Base Interface.
b459362b1c9b5ce5e6bf4ceb32ffe1294c08be07vboxsync * Everyone implements this.
b459362b1c9b5ce5e6bf4ceb32ffe1294c08be07vboxsynctypedef struct PDMIBASE
b459362b1c9b5ce5e6bf4ceb32ffe1294c08be07vboxsync * Queries an interface to the driver.
53e1c27c7564c45ad0b92676ddea561591a3e869vboxsync * @returns Pointer to interface.
53e1c27c7564c45ad0b92676ddea561591a3e869vboxsync * @returns NULL if the interface was not supported by the driver.
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync * @param pInterface Pointer to this interface structure.
0c8b774aca1168c2007424a49f6fa159fc23e42bvboxsync * @param pszIID The interface ID, a UUID string.
0c8b774aca1168c2007424a49f6fa159fc23e42bvboxsync * @thread Any thread.
0c8b774aca1168c2007424a49f6fa159fc23e42bvboxsync DECLR3CALLBACKMEMBER(void *, pfnQueryInterface,(struct PDMIBASE *pInterface, const char *pszIID));
0c8b774aca1168c2007424a49f6fa159fc23e42bvboxsync/** PDMIBASE interface ID. */
0c8b774aca1168c2007424a49f6fa159fc23e42bvboxsync#define PDMIBASE_IID "a2299c0d-b709-4551-aa5a-73f59ffbed74"
0c8b774aca1168c2007424a49f6fa159fc23e42bvboxsync * Helper macro for querying an interface from PDMIBASE.
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync * @returns Correctly typed PDMIBASE::pfnQueryInterface return value.
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * @param pIBase Pointer to the base interface.
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync * @param InterfaceType The interface type name. The interface ID is
cfd41a3683178a30bac4417128b4673806653797vboxsync * derived from this by appending _IID.
cfd41a3683178a30bac4417128b4673806653797vboxsync#define PDMIBASE_QUERY_INTERFACE(pIBase, InterfaceType) \
cfd41a3683178a30bac4417128b4673806653797vboxsync ( (InterfaceType *)(pIBase)->pfnQueryInterface(pIBase, InterfaceType##_IID ) )
cfd41a3683178a30bac4417128b4673806653797vboxsync * Helper macro for implementing PDMIBASE::pfnQueryInterface.
cfd41a3683178a30bac4417128b4673806653797vboxsync * Return @a pInterface if @a pszIID matches the @a InterfaceType. This will
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync * perform basic type checking.
9a1578b66f9e563cf99c75ffa881db476f477e3avboxsync * @param pszIID The ID of the interface that is being queried.
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync * @param InterfaceType The interface type name. The interface ID is
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync * derived from this by appending _IID.
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync * @param pInterface The interface address expression.
1db14577e83fccab20d0cfa8bf79556b0e40e43fvboxsync#define PDMIBASE_RETURN_INTERFACE(pszIID, InterfaceType, pInterface) \
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync if (RTUuidCompare2Strs((pszIID), InterfaceType##_IID) == 0) \
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync P##InterfaceType pReturnInterfaceTypeCheck = (pInterface); \
b8b61ff747c97d77b48c572a474969b1892d591dvboxsync } while (0)
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync/** @name PDMIBASERC
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync * PDM Base Interface for querying ring-mode context interfaces in
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync * This is mandatory for drivers present in raw-mode context.
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsynctypedef struct PDMIBASERC
b459362b1c9b5ce5e6bf4ceb32ffe1294c08be07vboxsync * Queries an ring-mode context interface to the driver.
9a08dd6ed47cffa9cacbb9d53db1ce71d04db61fvboxsync * @returns Pointer to interface.
9a08dd6ed47cffa9cacbb9d53db1ce71d04db61fvboxsync * @returns NULL if the interface was not supported by the driver.
b459362b1c9b5ce5e6bf4ceb32ffe1294c08be07vboxsync * @param pInterface Pointer to this interface structure.
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync * @param pszIID The interface ID, a UUID string.
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync * @thread Any thread.
b459362b1c9b5ce5e6bf4ceb32ffe1294c08be07vboxsync DECLR3CALLBACKMEMBER(RTRCPTR, pfnQueryInterface,(struct PDMIBASERC *pInterface, const char *pszIID));
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync/** Pointer to a PDM Base Interface for query ring-mode context interfaces. */
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync/** PDMIBASERC interface ID. */
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync#define PDMIBASERC_IID "f6a6c649-6cb3-493f-9737-4653f221aeca"
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync * Helper macro for querying an interface from PDMIBASERC.
9ced981a0263f6280ccbf5dc64c0e81fbe4a2fdavboxsync * @returns PDMIBASERC::pfnQueryInterface return value.
97674677e4f2aeae576c39f966568dd664ba7979vboxsync * @param pIBaseRC Pointer to the base raw-mode context interface. Can
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync * @param InterfaceType The interface type base name, no trailing RC. The
eecfcc5748685e35d0d4d835fb30d5494ad62734vboxsync * interface ID is derived from this by appending _IID.
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync * @remarks Unlike PDMIBASE_QUERY_INTERFACE, this macro is not able to do any
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync * implicit type checking for you.
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync#define PDMIBASERC_QUERY_INTERFACE(pIBaseRC, InterfaceType) \
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync ( (P##InterfaceType##RC)((pIBaseRC) ? (pIBaseRC)->pfnQueryInterface(pIBaseRC, InterfaceType##_IID) : NIL_RTRCPTR) )
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync * Helper macro for implementing PDMIBASERC::pfnQueryInterface.
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * Return @a pInterface if @a pszIID matches the @a InterfaceType. This will
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync * perform basic type checking.
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync * @param pIns Pointer to the instance data.
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync * @param pszIID The ID of the interface that is being queried.
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync * @param InterfaceType The interface type base name, no trailing RC. The
907ba2c9b3d1821f95be17115ecad9fe8a2cae02vboxsync * interface ID is derived from this by appending _IID.
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync * @param pInterface The interface address expression. This must resolve
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync * to some address within the instance data.
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync * @remarks Don't use with PDMIBASE.
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync#define PDMIBASERC_RETURN_INTERFACE(pIns, pszIID, InterfaceType, pInterface) \
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync Assert((uintptr_t)pInterface - PDMINS_2_DATA(pIns, uintptr_t) < _4M); \
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync if (RTUuidCompare2Strs((pszIID), InterfaceType##_IID) == 0) \
f4ccb18a71e0e531719734918583f84fbc72ebfevboxsync InterfaceType##RC *pReturnInterfaceTypeCheck = (pInterface); \
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync } while (0)
efbdd9fc22305720d20be7cc37b4f45f43146b09vboxsync/** @name PDMIBASER0
efbdd9fc22305720d20be7cc37b4f45f43146b09vboxsync * PDM Base Interface for querying ring-0 interfaces in ring-3.
efbdd9fc22305720d20be7cc37b4f45f43146b09vboxsync * This is mandatory for drivers present in ring-0 context.
efbdd9fc22305720d20be7cc37b4f45f43146b09vboxsynctypedef struct PDMIBASER0
efbdd9fc22305720d20be7cc37b4f45f43146b09vboxsync * Queries an ring-0 interface to the driver.
efbdd9fc22305720d20be7cc37b4f45f43146b09vboxsync * @returns Pointer to interface.
efbdd9fc22305720d20be7cc37b4f45f43146b09vboxsync * @returns NULL if the interface was not supported by the driver.
97674677e4f2aeae576c39f966568dd664ba7979vboxsync * @param pInterface Pointer to this interface structure.
9c59bcefe2993070fafaf0d6cee9673f48479128vboxsync * @param pszIID The interface ID, a UUID string.
9c59bcefe2993070fafaf0d6cee9673f48479128vboxsync * @thread Any thread.
9c59bcefe2993070fafaf0d6cee9673f48479128vboxsync DECLR3CALLBACKMEMBER(RTR0PTR, pfnQueryInterface,(struct PDMIBASER0 *pInterface, const char *pszIID));
9c59bcefe2993070fafaf0d6cee9673f48479128vboxsync/** Pointer to a PDM Base Interface for query ring-0 context interfaces. */
9c59bcefe2993070fafaf0d6cee9673f48479128vboxsync/** PDMIBASER0 interface ID. */
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync#define PDMIBASER0_IID "9c9b99b8-7f53-4f59-a3c2-5bc9659c7944"
9ced981a0263f6280ccbf5dc64c0e81fbe4a2fdavboxsync * Helper macro for querying an interface from PDMIBASER0.
9ced981a0263f6280ccbf5dc64c0e81fbe4a2fdavboxsync * @returns PDMIBASER0::pfnQueryInterface return value.
9ced981a0263f6280ccbf5dc64c0e81fbe4a2fdavboxsync * @param pIBaseR0 Pointer to the base ring-0 interface. Can be NULL.
9ced981a0263f6280ccbf5dc64c0e81fbe4a2fdavboxsync * @param InterfaceType The interface type base name, no trailing R0. The
9ced981a0263f6280ccbf5dc64c0e81fbe4a2fdavboxsync * interface ID is derived from this by appending _IID.
9ced981a0263f6280ccbf5dc64c0e81fbe4a2fdavboxsync * @remarks Unlike PDMIBASE_QUERY_INTERFACE, this macro is not able to do any
9ced981a0263f6280ccbf5dc64c0e81fbe4a2fdavboxsync * implicit type checking for you.
9ced981a0263f6280ccbf5dc64c0e81fbe4a2fdavboxsync#define PDMIBASER0_QUERY_INTERFACE(pIBaseR0, InterfaceType) \
9ced981a0263f6280ccbf5dc64c0e81fbe4a2fdavboxsync ( (P##InterfaceType##R0)((pIBaseR0) ? (pIBaseR0)->pfnQueryInterface(pIBaseR0, InterfaceType##_IID) : NIL_RTR0PTR) )
9ced981a0263f6280ccbf5dc64c0e81fbe4a2fdavboxsync * Helper macro for implementing PDMIBASER0::pfnQueryInterface.
53e1c27c7564c45ad0b92676ddea561591a3e869vboxsync * Return @a pInterface if @a pszIID matches the @a InterfaceType. This will
53e1c27c7564c45ad0b92676ddea561591a3e869vboxsync * perform basic type checking.
1d258b8772ee104b5fab3d1743eabc2f5cfe2fa4vboxsync * @param pIns Pointer to the instance data.
53e1c27c7564c45ad0b92676ddea561591a3e869vboxsync * @param pszIID The ID of the interface that is being queried.
1d258b8772ee104b5fab3d1743eabc2f5cfe2fa4vboxsync * @param InterfaceType The interface type base name, no trailing R0. The
1d258b8772ee104b5fab3d1743eabc2f5cfe2fa4vboxsync * interface ID is derived from this by appending _IID.
53e1c27c7564c45ad0b92676ddea561591a3e869vboxsync * @param pInterface The interface address expression. This must resolve
53e1c27c7564c45ad0b92676ddea561591a3e869vboxsync * to some address within the instance data.
53e1c27c7564c45ad0b92676ddea561591a3e869vboxsync * @remarks Don't use with PDMIBASE.
1d258b8772ee104b5fab3d1743eabc2f5cfe2fa4vboxsync#define PDMIBASER0_RETURN_INTERFACE(pIns, pszIID, InterfaceType, pInterface) \
1d258b8772ee104b5fab3d1743eabc2f5cfe2fa4vboxsync Assert((uintptr_t)pInterface - PDMINS_2_DATA(pIns, uintptr_t) < _4M); \
1d258b8772ee104b5fab3d1743eabc2f5cfe2fa4vboxsync if (RTUuidCompare2Strs((pszIID), InterfaceType##_IID) == 0) \
1d258b8772ee104b5fab3d1743eabc2f5cfe2fa4vboxsync InterfaceType##R0 *pReturnInterfaceTypeCheck = (pInterface); \
1d258b8772ee104b5fab3d1743eabc2f5cfe2fa4vboxsync } while (0)
53e1c27c7564c45ad0b92676ddea561591a3e869vboxsync * Dummy interface.
6e3cc82d5d5effda92c9fec18b870d54386f99favboxsync * This is used to typedef other dummy interfaces. The purpose of a dummy
6e3cc82d5d5effda92c9fec18b870d54386f99favboxsync * interface is to validate the logical function of a driver/device and
725ace23cdb8749e16adc3330c357e626b29ac63vboxsync * full a natural interface pair.
6e3cc82d5d5effda92c9fec18b870d54386f99favboxsynctypedef struct PDMIDUMMY
6e3cc82d5d5effda92c9fec18b870d54386f99favboxsync/** Pointer to a mouse port interface. */
771761cda2c81e899526a0dce22c8cd2510fff82vboxsync * Mouse port interface (down).
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync * Pair with PDMIMOUSECONNECTOR.
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync * Puts a mouse event.
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync * This is called by the source of mouse events. The event will be passed up
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync * until the topmost driver, which then calls the registered event handler.
9a1578b66f9e563cf99c75ffa881db476f477e3avboxsync * @returns VBox status code. Return VERR_TRY_AGAIN if you cannot process the
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync * event now and want it to be repeated at a later point.
02487e3b759646add535e475e35311265235a629vboxsync * @param pInterface Pointer to this interface structure.
72f66530e1bf87aa6894a5f55f1b4d36caa5761fvboxsync * @param iDeltaX The X delta.
97674677e4f2aeae576c39f966568dd664ba7979vboxsync * @param iDeltaY The Y delta.
97674677e4f2aeae576c39f966568dd664ba7979vboxsync * @param iDeltaZ The Z delta.
7bff28e0cedd8656acd24b420759649184d8cf00vboxsync * @param iDeltaW The W (horizontal scroll button) delta.
DECLR3CALLBACKMEMBER(int, pfnPutEvent,(PPDMIMOUSEPORT pInterface, int32_t iDeltaX, int32_t iDeltaY, int32_t iDeltaZ, int32_t iDeltaW, uint32_t fButtonStates));
DECLR3CALLBACKMEMBER(int, pfnPutEventAbs,(PPDMIMOUSEPORT pInterface, uint32_t uX, uint32_t uY, int32_t iDeltaZ, int32_t iDeltaW, uint32_t fButtonStates));
typedef struct PDMIMOUSECONNECTOR
DECLR3CALLBACKMEMBER(void, pfnReportModes,(PPDMIMOUSECONNECTOR pInterface, bool fRelative, bool fAbsolute, bool fMultiTouch));
typedef struct PDMIKEYBOARDPORT
typedef enum PDMKEYBLEDS
} PDMKEYBLEDS;
typedef struct PDMIKEYBOARDCONNECTOR
DECLR3CALLBACKMEMBER(void, pfnLedStatusChange,(PPDMIKEYBOARDCONNECTOR pInterface, PDMKEYBLEDS enmLeds));
typedef struct PDMIDISPLAYPORT
DECLR3CALLBACKMEMBER(int, pfnSetRefreshRate,(PPDMIDISPLAYPORT pInterface, uint32_t cMilliesInterval));
DECLR3CALLBACKMEMBER(int, pfnTakeScreenshot,(PPDMIDISPLAYPORT pInterface, uint8_t **ppu8Data, size_t *pcbData, uint32_t *pcx, uint32_t *pcy));
DECLR3CALLBACKMEMBER(int, pfnDisplayBlt,(PPDMIDISPLAYPORT pInterface, const void *pvData, uint32_t x, uint32_t y, uint32_t cx, uint32_t cy));
DECLR3CALLBACKMEMBER(void, pfnUpdateDisplayRect,(PPDMIDISPLAYPORT pInterface, int32_t x, int32_t y, uint32_t cx, uint32_t cy));
const uint8_t *pbSrc, int32_t xSrc, int32_t ySrc, uint32_t cxSrc, uint32_t cySrc, uint32_t cbSrcLine, uint32_t cSrcBitsPerPixel,
uint8_t *pbDst, int32_t xDst, int32_t yDst, uint32_t cxDst, uint32_t cyDst, uint32_t cbDstLine, uint32_t cDstBitsPerPixel));
typedef struct VBOXVHWACMD *PVBOXVHWACMD; /**< @todo r=bird: A line what it is to make doxygen happy. */
typedef struct VBOXVDMACMD_CHROMIUM_CMD *PVBOXVDMACMD_CHROMIUM_CMD; /* <- chromium [hgsmi] command */
typedef struct VBOXVDMACMD_CHROMIUM_CTL *PVBOXVDMACMD_CHROMIUM_CTL; /* <- chromium [hgsmi] command */
typedef struct PDMIDISPLAYCONNECTOR
DECLR3CALLBACKMEMBER(int, pfnResize,(PPDMIDISPLAYCONNECTOR pInterface, uint32_t cBits, void *pvVRAM, uint32_t cbLine, uint32_t cx, uint32_t cy));
DECLR3CALLBACKMEMBER(void, pfnUpdateRect,(PPDMIDISPLAYCONNECTOR pInterface, uint32_t x, uint32_t y, uint32_t cx, uint32_t cy));
DECLR3CALLBACKMEMBER(void, pfnProcessAdapterData, (PPDMIDISPLAYCONNECTOR pInterface, void *pvVRAM, uint32_t u32VRAMSize));
DECLR3CALLBACKMEMBER(void, pfnProcessDisplayData, (PPDMIDISPLAYCONNECTOR pInterface, void *pvVRAM, unsigned uScreenId));
DECLR3CALLBACKMEMBER(void, pfnVHWACommandProcess, (PPDMIDISPLAYCONNECTOR pInterface, PVBOXVHWACMD pCmd));
DECLR3CALLBACKMEMBER(void, pfnCrHgsmiCommandProcess, (PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd));
DECLR3CALLBACKMEMBER(void, pfnCrHgsmiControlProcess, (PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CTL pCtl, uint32_t cbCtl));
DECLR3CALLBACKMEMBER(int, pfnVBVAEnable,(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId, PVBVAHOSTFLAGS pHostFlags));
DECLR3CALLBACKMEMBER(void, pfnVBVAUpdateBegin,(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId));
DECLR3CALLBACKMEMBER(void, pfnVBVAUpdateProcess,(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId, const PVBVACMDHDR pCmd, size_t cbCmd));
DECLR3CALLBACKMEMBER(void, pfnVBVAUpdateEnd,(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId, int32_t x, int32_t y, uint32_t cx, uint32_t cy));
DECLR3CALLBACKMEMBER(int, pfnVBVAResize,(PPDMIDISPLAYCONNECTOR pInterface, const PVBVAINFOVIEW pView, const PVBVAINFOSCREEN pScreen, void *pvVRAM));
DECLR3CALLBACKMEMBER(int, pfnVBVAMousePointerShape,(PPDMIDISPLAYCONNECTOR pInterface, bool fVisible, bool fAlpha,
const void *pvShape));
typedef struct PDMIBLOCKPORT
DECLR3CALLBACKMEMBER(int, pfnQueryDeviceLocation, (PPDMIBLOCKPORT pInterface, const char **ppcszController,
typedef enum PDMBLOCKTYPE
} PDMBLOCKTYPE;
#define PDMBLOCKTYPE_IS_FLOPPY(a_enmType) ( (a_enmType) >= PDMBLOCKTYPE_FLOPPY_360 && (a_enmType) <= PDMBLOCKTYPE_FLOPPY_2_88 )
typedef enum PDMBLOCKTXDIR
PDMBLOCKTXDIR_NONE = 0,
typedef struct PDMIBLOCK
DECLR3CALLBACKMEMBER(int, pfnRead,(PPDMIBLOCK pInterface, uint64_t off, void *pvBuf, size_t cbRead));
DECLR3CALLBACKMEMBER(int, pfnWrite,(PPDMIBLOCK pInterface, uint64_t off, const void *pvBuf, size_t cbWrite));
DECLR3CALLBACKMEMBER(int, pfnSendCmd,(PPDMIBLOCK pInterface, const uint8_t *pbCmd, PDMBLOCKTXDIR enmTxDir, void *pvBuf, uint32_t *pcbBuf, uint8_t *pabSense, size_t cbSense, uint32_t cTimeoutMillies));
DECLR3CALLBACKMEMBER(int, pfnMerge,(PPDMIBLOCK pInterface, PFNSIMPLEPROGRESS pfnProgress, void *pvUser));
DECLR3CALLBACKMEMBER(int, pfnDiscard,(PPDMIBLOCK pInterface, PCRTRANGE paRanges, unsigned cRanges));
} PDMIBLOCK;
typedef struct PDMIMOUNTNOTIFY
typedef struct PDMIMOUNT
* @param pszCoreDriver Core driver name. NULL will cause autodetection. Ignored if pszFilanem is NULL.
DECLR3CALLBACKMEMBER(int, pfnMount,(PPDMIMOUNT pInterface, const char *pszFilename, const char *pszCoreDriver));
* The driver will validate and pass it on. On the rebounce it will decide whether or not to detach it self.
} PDMIMOUNT;
typedef struct PDMMEDIAGEOMETRY
typedef struct PDMIMEDIAPORT
DECLR3CALLBACKMEMBER(int, pfnQueryDeviceLocation, (PPDMIMEDIAPORT pInterface, const char **ppcszController,
typedef struct PDMIMEDIA
DECLR3CALLBACKMEMBER(int, pfnRead,(PPDMIMEDIA pInterface, uint64_t off, void *pvBuf, size_t cbRead));
DECLR3CALLBACKMEMBER(int, pfnWrite,(PPDMIMEDIA pInterface, uint64_t off, const void *pvBuf, size_t cbWrite));
DECLR3CALLBACKMEMBER(int, pfnMerge,(PPDMIMEDIA pInterface, PFNSIMPLEPROGRESS pfnProgress, void *pvUser));
* @returns VERR_PDM_GEOMETRY_NOT_SET if the geometry hasn't been set using pfnBiosSetPCHSGeometry() yet.
DECLR3CALLBACKMEMBER(int, pfnBiosGetPCHSGeometry,(PPDMIMEDIA pInterface, PPDMMEDIAGEOMETRY pPCHSGeometry));
DECLR3CALLBACKMEMBER(int, pfnBiosSetPCHSGeometry,(PPDMIMEDIA pInterface, PCPDMMEDIAGEOMETRY pPCHSGeometry));
* @returns VERR_PDM_GEOMETRY_NOT_SET if the geometry hasn't been set using pfnBiosSetLCHSGeometry() yet.
DECLR3CALLBACKMEMBER(int, pfnBiosGetLCHSGeometry,(PPDMIMEDIA pInterface, PPDMMEDIAGEOMETRY pLCHSGeometry));
DECLR3CALLBACKMEMBER(int, pfnBiosSetLCHSGeometry,(PPDMIMEDIA pInterface, PCPDMMEDIAGEOMETRY pLCHSGeometry));
DECLR3CALLBACKMEMBER(int, pfnDiscard,(PPDMIMEDIA pInterface, PCRTRANGE paRanges, unsigned cRanges));
} PDMIMEDIA;
typedef struct PDMIBLOCKBIOS
* @returns VERR_PDM_GEOMETRY_NOT_SET if the geometry hasn't been set using pfnSetPCHSGeometry() yet.
DECLR3CALLBACKMEMBER(int, pfnGetPCHSGeometry,(PPDMIBLOCKBIOS pInterface, PPDMMEDIAGEOMETRY pPCHSGeometry));
DECLR3CALLBACKMEMBER(int, pfnSetPCHSGeometry,(PPDMIBLOCKBIOS pInterface, PCPDMMEDIAGEOMETRY pPCHSGeometry));
* @returns VERR_PDM_GEOMETRY_NOT_SET if the geometry hasn't been set using pfnSetLCHSGeometry() yet.
DECLR3CALLBACKMEMBER(int, pfnGetLCHSGeometry,(PPDMIBLOCKBIOS pInterface, PPDMMEDIAGEOMETRY pLCHSGeometry));
DECLR3CALLBACKMEMBER(int, pfnSetLCHSGeometry,(PPDMIBLOCKBIOS pInterface, PCPDMMEDIAGEOMETRY pLCHSGeometry));
typedef struct PDMIMEDIASTATIC
typedef struct PDMIBLOCKASYNCPORT
* @param pvUser The user argument given in pfnStartWrite/Read.
DECLR3CALLBACKMEMBER(int, pfnTransferCompleteNotify, (PPDMIBLOCKASYNCPORT pInterface, void *pvUser, int rcReq));
typedef struct PDMIBLOCKASYNC
* @param off Offset to start reading from.c
DECLR3CALLBACKMEMBER(int, pfnStartRead,(PPDMIBLOCKASYNC pInterface, uint64_t off, PCRTSGSEG paSegs, unsigned cSegs, size_t cbRead, void *pvUser));
DECLR3CALLBACKMEMBER(int, pfnStartWrite,(PPDMIBLOCKASYNC pInterface, uint64_t off, PCRTSGSEG paSegs, unsigned cSegs, size_t cbWrite, void *pvUser));
DECLR3CALLBACKMEMBER(int, pfnStartDiscard,(PPDMIBLOCKASYNC pInterface, PCRTRANGE paRanges, unsigned cRanges, void *pvUser));
typedef struct PDMIMEDIAASYNCPORT
DECLR3CALLBACKMEMBER(int, pfnTransferCompleteNotify, (PPDMIMEDIAASYNCPORT pInterface, void *pvUser, int rcReq));
typedef struct PDMIMEDIAASYNC
DECLR3CALLBACKMEMBER(int, pfnStartRead,(PPDMIMEDIAASYNC pInterface, uint64_t off, PCRTSGSEG paSegs, unsigned cSegs, size_t cbRead, void *pvUser));
DECLR3CALLBACKMEMBER(int, pfnStartWrite,(PPDMIMEDIAASYNC pInterface, uint64_t off, PCRTSGSEG paSegs, unsigned cSegs, size_t cbWrite, void *pvUser));
DECLR3CALLBACKMEMBER(int, pfnStartDiscard,(PPDMIMEDIAASYNC pInterface, PCRTRANGE paRanges, unsigned cRanges, void *pvUser));
typedef struct PDMICHARPORT
DECLR3CALLBACKMEMBER(int, pfnNotifyRead,(PPDMICHARPORT pInterface, const void *pvBuf, size_t *pcbRead));
DECLR3CALLBACKMEMBER(int, pfnNotifyStatusLinesChanged,(PPDMICHARPORT pInterface, uint32_t fNewStatusLines));
} PDMICHARPORT;
typedef struct PDMICHARCONNECTOR
DECLR3CALLBACKMEMBER(int, pfnWrite,(PPDMICHARCONNECTOR pInterface, const void *pvBuf, size_t cbWrite));
DECLR3CALLBACKMEMBER(int, pfnSetParameters,(PPDMICHARCONNECTOR pInterface, unsigned Bps, char chParity, unsigned cDataBits, unsigned cStopBits));
DECLR3CALLBACKMEMBER(int, pfnSetModemLines,(PPDMICHARCONNECTOR pInterface, bool fRequestToSend, bool fDataTerminalReady));
typedef struct PDMISTREAM
} PDMISTREAM;
typedef enum PDMPARALLELPORTMODE
typedef struct PDMIHOSTPARALLELPORT
typedef struct PDMIHOSTPARALLELCONNECTOR
* @todo r=klaus cbWrite only defines buffer length, method needs a way top return actually written amount of data.
* @todo r=klaus cbRead only defines buffer length, method needs a way top return actually read amount of data.
DECLR3CALLBACKMEMBER(int, pfnSetPortDirection,(PPDMIHOSTPARALLELCONNECTOR pInterface, bool fForward));
typedef enum PDMACPIPOWERSOURCE
typedef enum PDMACPIBATCAPACITY
typedef enum PDMACPIBATSTATE
typedef struct PDMIACPIPORT
DECLR3CALLBACKMEMBER(int, pfnGetCpuStatus,(PPDMIACPIPORT pInterface, unsigned uCpu, bool *pfLocked));
} PDMIACPIPORT;
typedef struct PDMIACPICONNECTOR
DECLR3CALLBACKMEMBER(int, pfnQueryPowerSource,(PPDMIACPICONNECTOR, PPDMACPIPOWERSOURCE penmPowerSource));
* @param penmRemainingCapacity Pointer to the battery remaining capacity (0 - 100 or 255 for unknown).
DECLR3CALLBACKMEMBER(int, pfnQueryBatteryStatus,(PPDMIACPICONNECTOR, bool *pfPresent, PPDMACPIBATCAPACITY penmRemainingCapacity,
typedef struct PDMIVMMDEVPORT
DECLR3CALLBACKMEMBER(int, pfnQueryAbsoluteMouse,(PPDMIVMMDEVPORT pInterface, int32_t *pxAbs, int32_t *pyAbs));
DECLR3CALLBACKMEMBER(int, pfnSetAbsoluteMouse,(PPDMIVMMDEVPORT pInterface, int32_t xAbs, int32_t yAbs));
DECLR3CALLBACKMEMBER(int, pfnQueryMouseCapabilities,(PPDMIVMMDEVPORT pInterface, uint32_t *pfCapabilities));
DECLR3CALLBACKMEMBER(int, pfnUpdateMouseCapabilities,(PPDMIVMMDEVPORT pInterface, uint32_t fCapsAdded, uint32_t fCapsRemoved));
DECLR3CALLBACKMEMBER(int, pfnSetStatisticsInterval,(PPDMIVMMDEVPORT pInterface, uint32_t cSecsStatInterval));
DECLR3CALLBACKMEMBER(int, pfnVRDPChange, (PPDMIVMMDEVPORT pInterface, bool fVRDPEnabled, uint32_t uVRDPExperienceLevel));
DECLR3CALLBACKMEMBER(int, pfnCpuHotUnplug, (PPDMIVMMDEVPORT pInterface, uint32_t idCpuCore, uint32_t idCpuPackage));
DECLR3CALLBACKMEMBER(int, pfnCpuHotPlug, (PPDMIVMMDEVPORT pInterface, uint32_t idCpuCore, uint32_t idCpuPackage));
typedef struct PDMIHPETLEGACYNOTIFY
struct VBoxGuestInfo;
struct VBoxGuestInfo2;
struct VBoxGuestStatistics;
struct VBoxGuestStatus;
struct VBVAMEMORY;
typedef struct PDMIVMMDEVCONNECTOR
DECLR3CALLBACKMEMBER(void, pfnUpdateGuestStatus,(PPDMIVMMDEVCONNECTOR pInterface, uint32_t uFacility, uint16_t uStatus,
DECLR3CALLBACKMEMBER(void, pfnUpdateGuestInfo,(PPDMIVMMDEVCONNECTOR pInterface, const struct VBoxGuestInfo *pGuestInfo));
DECLR3CALLBACKMEMBER(void, pfnUpdateGuestInfo2,(PPDMIVMMDEVCONNECTOR pInterface, uint32_t uFullVersion,
DECLR3CALLBACKMEMBER(void, pfnUpdateGuestCapabilities,(PPDMIVMMDEVCONNECTOR pInterface, uint32_t newCapabilities));
DECLR3CALLBACKMEMBER(void, pfnUpdateMouseCapabilities,(PPDMIVMMDEVCONNECTOR pInterface, uint32_t newCapabilities));
DECLR3CALLBACKMEMBER(void, pfnUpdatePointerShape,(PPDMIVMMDEVCONNECTOR pInterface, bool fVisible, bool fAlpha,
void *pvShape));
DECLR3CALLBACKMEMBER(int, pfnVideoAccelEnable,(PPDMIVMMDEVCONNECTOR pInterface, bool fEnable, PVBVAMEMORY pVbvaMemory));
DECLR3CALLBACKMEMBER(int, pfnVideoModeSupported,(PPDMIVMMDEVCONNECTOR pInterface, uint32_t display, uint32_t cx, uint32_t cy, uint32_t cBits, bool *pfSupported));
DECLR3CALLBACKMEMBER(int, pfnGetHeightReduction,(PPDMIVMMDEVCONNECTOR pInterface, uint32_t *pcyReduction));
DECLR3CALLBACKMEMBER(int, pfnSetCredentialsJudgementResult,(PPDMIVMMDEVCONNECTOR pInterface, uint32_t fFlags));
DECLR3CALLBACKMEMBER(int, pfnSetVisibleRegion,(PPDMIVMMDEVCONNECTOR pInterface, uint32_t cRect, PRTRECT pRect));
DECLR3CALLBACKMEMBER(int, pfnQueryVisibleRegion,(PPDMIVMMDEVCONNECTOR pInterface, uint32_t *pcRect, PRTRECT pRect));
DECLR3CALLBACKMEMBER(int, pfnQueryStatisticsInterval,(PPDMIVMMDEVCONNECTOR pInterface, uint32_t *pulInterval));
DECLR3CALLBACKMEMBER(int, pfnReportStatistics,(PPDMIVMMDEVCONNECTOR pInterface, struct VBoxGuestStatistics *pGuestStats));
DECLR3CALLBACKMEMBER(int, pfnQueryBalloonSize,(PPDMIVMMDEVCONNECTOR pInterface, uint32_t *pcbBalloon));
DECLR3CALLBACKMEMBER(int, pfnIsPageFusionEnabled,(PPDMIVMMDEVCONNECTOR pInterface, bool *pfPageFusionEnabled));
typedef struct PDMIAUDIOCONNECTOR
/* DECLR3CALLBACKMEMBER(int, pfnSetRecordSource,(PPDMIAUDIOINCONNECTOR pInterface, AUDIORECSOURCE)); */
typedef struct PDMIAUDIOSNIFFERPORT
DECLR3CALLBACKMEMBER(int, pfnSetup,(PPDMIAUDIOSNIFFERPORT pInterface, bool fEnable, bool fKeepHostAudio));
DECLR3CALLBACKMEMBER(int, pfnAudioInputIntercept,(PPDMIAUDIOSNIFFERPORT pInterface, bool fIntercept));
void *pvContext,
int iSampleHz,
int cChannels,
int cBits,
bool fUnsigned));
void *pvContext,
const void *pvData,
void *pvContext));
typedef struct PDMIAUDIOSNIFFERCONNECTOR
DECLR3CALLBACKMEMBER(void, pfnAudioSamplesOut,(PPDMIAUDIOSNIFFERCONNECTOR pInterface, void *pvSamples, uint32_t cSamples,
DECLR3CALLBACKMEMBER(void, pfnAudioVolumeOut,(PPDMIAUDIOSNIFFERCONNECTOR pInterface, uint16_t u16LeftVolume, uint16_t u16RightVolume));
void **ppvUserCtx,
void *pvContext,
void *pvUserCtx));
typedef union PDMLEDCORE
} PDMLEDCORE;
typedef struct PDMLED
} PDMLED;
typedef struct PDMILEDPORTS
DECLR3CALLBACKMEMBER(int, pfnQueryStatusLed,(PPDMILEDPORTS pInterface, unsigned iLUN, PPDMLED *ppLed));
} PDMILEDPORTS;
typedef struct PDMILEDCONNECTORS
typedef struct PDMIMEDIANOTIFY
#ifdef VBOX_WITH_HGCM
struct VBOXHGCMCMD;
typedef struct PDMIHGCMPORT
} PDMIHGCMPORT;
typedef struct PDMIHGCMCONNECTOR
DECLR3CALLBACKMEMBER(int, pfnConnect,(PPDMIHGCMCONNECTOR pInterface, PVBOXHGCMCMD pCmd, PHGCMSERVICELOCATION pServiceLocation, uint32_t *pu32ClientID));
DECLR3CALLBACKMEMBER(int, pfnDisconnect,(PPDMIHGCMCONNECTOR pInterface, PVBOXHGCMCMD pCmd, uint32_t u32ClientID));
DECLR3CALLBACKMEMBER(int, pfnCall,(PPDMIHGCMCONNECTOR pInterface, PVBOXHGCMCMD pCmd, uint32_t u32ClientID, uint32_t u32Function,
typedef enum PDMSCSIREQUESTTXDIR
typedef struct PDMSCSIREQUEST
void *pvUser;
typedef struct PDMISCSIPORT
DECLR3CALLBACKMEMBER(int, pfnSCSIRequestCompleted, (PPDMISCSIPORT pInterface, PPDMSCSIREQUEST pSCSIRequest,
DECLR3CALLBACKMEMBER(int, pfnQueryDeviceLocation, (PPDMISCSIPORT pInterface, const char **ppcszController,
} PDMISCSIPORT;
typedef struct PDMISCSICONNECTOR
DECLR3CALLBACKMEMBER(int, pfnSCSIRequestSend, (PPDMISCSICONNECTOR pInterface, PPDMSCSIREQUEST pSCSIRequest));
typedef struct PDMIDISPLAYVBVACALLBACKS
typedef struct PDMIPCIRAWCONNECTOR
DECLR3CALLBACKMEMBER(int, pfnDeviceConstructComplete, (PPDMIPCIRAWCONNECTOR pInterface, const char *pcszName,
int rc));