1 |
|
---|
2 |
|
---|
3 | #ifndef VBoxDDVKAT_h__
|
---|
4 | #define VBoxDDVKAT_h__
|
---|
5 |
|
---|
6 | #include <VBox/vmm/pdmifs.h>
|
---|
7 |
|
---|
8 | /**
|
---|
9 | * !!! HACK ALERT !!!
|
---|
10 | * This totally ignores *any* IIDs for now!
|
---|
11 | * !!! HACK ALERT !!!
|
---|
12 | */
|
---|
13 |
|
---|
14 | #ifdef PDMDRV_CHECK_VERSIONS_RETURN_VOID
|
---|
15 | # undef PDMDRV_CHECK_VERSIONS_RETURN_VOID
|
---|
16 | #endif
|
---|
17 | #define PDMDRV_CHECK_VERSIONS_RETURN_VOID(...) do { } while (0)
|
---|
18 |
|
---|
19 | #ifdef PDMINS_2_DATA
|
---|
20 | # undef PDMINS_2_DATA
|
---|
21 | #endif
|
---|
22 | #define PDMINS_2_DATA(pIns, type) ( (type)(pIns)->pvInstanceData )
|
---|
23 |
|
---|
24 | #define PDMIBASE_2_PDMDRV(pInterface) ( (PPDMDRVINS)((char *)(pInterface) - RT_UOFFSETOF(PDMDRVINS, IBase)) )
|
---|
25 |
|
---|
26 | #ifdef PDMDRV_CHECK_VERSIONS_RETURN
|
---|
27 | # undef PDMDRV_CHECK_VERSIONS_RETURN
|
---|
28 | #endif
|
---|
29 | #define PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns) do { } while (0)
|
---|
30 | #define PDMDRV_VALIDATE_CONFIG_RETURN(pDrvIns, pszValidValues, pszValidNodes) do { } while (0)
|
---|
31 |
|
---|
32 | typedef struct PDMDRVINS
|
---|
33 | {
|
---|
34 | /** Driver instance number. */
|
---|
35 | uint32_t iInstance;
|
---|
36 | /** Pointer to host audio interface. */
|
---|
37 | PDMIHOSTAUDIO IHostAudio;
|
---|
38 | void *pvInstanceData;
|
---|
39 | PDMIBASE IBase;
|
---|
40 | } PDMDRVINS;
|
---|
41 | /** Pointer to a PDM Driver Instance. */
|
---|
42 | typedef struct PDMDRVINS *PPDMDRVINS;
|
---|
43 |
|
---|
44 | typedef DECLCALLBACKTYPE(int, FNPDMDRVCONSTRUCT,(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags));
|
---|
45 | /** Pointer to a FNPDMDRVCONSTRUCT() function. */
|
---|
46 | typedef FNPDMDRVCONSTRUCT *PFNPDMDRVCONSTRUCT;
|
---|
47 |
|
---|
48 | typedef DECLCALLBACKTYPE(void, FNPDMDRVDESTRUCT,(PPDMDRVINS pDrvIns));
|
---|
49 | /** Pointer to a FNPDMDRVDESTRUCT() function. */
|
---|
50 | typedef FNPDMDRVDESTRUCT *PFNPDMDRVDESTRUCT;
|
---|
51 |
|
---|
52 | typedef struct PDMDRVREG
|
---|
53 | {
|
---|
54 | /** Size of the instance data. */
|
---|
55 | uint32_t cbInstance;
|
---|
56 | /** Construct instance - required. */
|
---|
57 | PFNPDMDRVCONSTRUCT pfnConstruct;
|
---|
58 | /** Destruct instance - optional. */
|
---|
59 | PFNPDMDRVDESTRUCT pfnDestruct;
|
---|
60 | } PDMDRVREG;
|
---|
61 | /** Pointer to a PDM Driver Structure. */
|
---|
62 | typedef PDMDRVREG *PPDMDRVREG;
|
---|
63 |
|
---|
64 | DECLINLINE(int) CFGMR3QueryString(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString)
|
---|
65 | {
|
---|
66 | RT_NOREF(pNode, pszName, pszString, cchString);
|
---|
67 | return 0;
|
---|
68 | }
|
---|
69 |
|
---|
70 | DECLINLINE(int) CFGMR3QueryStringDef(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString, const char *pszDef)
|
---|
71 | {
|
---|
72 | RT_NOREF(pNode, pszName, pszString, cchString, pszDef);
|
---|
73 | return 0;
|
---|
74 | }
|
---|
75 |
|
---|
76 | extern const PDMDRVREG g_DrvVKATPulseAudio;
|
---|
77 | extern const PDMDRVREG g_DrvVKATAlsa;
|
---|
78 |
|
---|
79 | #endif /* VBoxDDVKAT_h__ */
|
---|