Changeset 34086 in vbox for trunk/include/VBox/ExtPack/ExtPack.h
- Timestamp:
- Nov 15, 2010 5:45:50 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/ExtPack/ExtPack.h
r34073 r34086 29 29 #include <VBox/types.h> 30 30 31 #if defined(__cplusplus) 32 class IConsole; 33 class IMachine; 31 /** @def VBOXEXTPACK_IF_CS 32 * Selects 'class' on 'struct' for interface references. 33 * @param I The interface name 34 */ 35 #if defined(__cplusplus) && !defined(RT_OS_WINDOWS) 36 # define VBOXEXTPACK_IF_CS(I) class I 34 37 #else 35 typedef struct IConsole IConsole; 36 typedef struct IMachine IMachine; 38 # define VBOXEXTPACK_IF_CS(I) struct I 37 39 #endif 40 41 VBOXEXTPACK_IF_CS(IConsole); 42 VBOXEXTPACK_IF_CS(IMachine); 43 VBOXEXTPACK_IF_CS(IVirtualBox); 38 44 39 45 … … 92 98 DECLR3CALLBACKMEMBER(int, pfnGetFilePath,(PCVBOXEXTPACKHLP pHlp, const char *pszFilename, char *pszPath, size_t cbPath)); 93 99 100 /** 101 * Registers a VRDE library (IVirtualBox::VRDERegisterLibrary wrapper). 102 * 103 * @returns VBox status code. 104 * @param pHlp Pointer to this helper structure. 105 * @param pszName The module base name. This will be found using 106 * the pfnFindModule algorithm. 107 * @param fSetDefault Whether to make it default if no other default 108 * is set. 109 * 110 * @remarks This helper should be called from pfnVirtualBoxReady as it may 111 * cause trouble when called from pfnInstalled. 112 */ 113 DECLR3CALLBACKMEMBER(int, pfnRegisterVrde,(PCVBOXEXTPACKHLP pHlp, const char *pszName, bool fSetDefault)); 94 114 95 115 /** End of structure marker (VBOXEXTPACKHLP_VERSION). */ … … 119 139 * 120 140 * @param pThis Pointer to this structure. 121 */ 122 DECLCALLBACKMEMBER(void, pfnInstalled)(PCVBOXEXTPACKREG pThis); 141 * @param pVirtualBox The VirtualBox interface. 142 */ 143 DECLCALLBACKMEMBER(void, pfnInstalled)(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox); 123 144 124 145 /** … … 129 150 * @returns VBox status code. 130 151 * @param pThis Pointer to this structure. 131 */ 132 DECLCALLBACKMEMBER(int, pfnUninstall)(PCVBOXEXTPACKREG pThis); 152 * @param pVirtualBox The VirtualBox interface. 153 */ 154 DECLCALLBACKMEMBER(int, pfnUninstall)(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox); 155 156 /** 157 * Hook for doing work after the VirtualBox object is ready. 158 * 159 * This is called in the context of the per-user service (VBoxSVC). There 160 * will not be any similar call from the VM process. 161 * 162 * @param pThis Pointer to this structure. 163 * @param pVirtualBox The VirtualBox interface. 164 */ 165 DECLCALLBACKMEMBER(void, pfnVirtualBoxReady)(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox); 133 166 134 167 /** … … 153 186 * @returns VBox status code. 154 187 * @param pThis Pointer to this structure. 188 * @param pVirtualBox The VirtualBox interface. 155 189 * @param pMachine The machine interface. 156 190 */ 157 DECLCALLBACKMEMBER(int, pfnVMCreated)(PCVBOXEXTPACKREG pThis, IMachine *pMachine); 191 DECLCALLBACKMEMBER(int, pfnVMCreated)(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IVirtualBox) *pVirtualBox, 192 VBOXEXTPACK_IF_CS(IMachine) *pMachine); 158 193 159 194 /** … … 167 202 * @param pVM The VM handle. 168 203 */ 169 DECLCALLBACKMEMBER(int, pfnVMConfigureVMM)(PCVBOXEXTPACKREG pThis, IConsole*pConsole, PVM pVM);204 DECLCALLBACKMEMBER(int, pfnVMConfigureVMM)(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM); 170 205 171 206 /** … … 179 214 * @param pVM The VM handle. 180 215 */ 181 DECLCALLBACKMEMBER(int, pfnVMPowerOn)(PCVBOXEXTPACKREG pThis, IConsole*pConsole, PVM pVM);216 DECLCALLBACKMEMBER(int, pfnVMPowerOn)(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM); 182 217 183 218 /** … … 190 225 * @param pVM The VM handle. Can be NULL. 191 226 */ 192 DECLCALLBACKMEMBER(void, pfnVMPowerOff)(PCVBOXEXTPACKREG pThis, IConsole*pConsole, PVM pVM);227 DECLCALLBACKMEMBER(void, pfnVMPowerOff)(PCVBOXEXTPACKREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM); 193 228 194 229 /**
Note:
See TracChangeset
for help on using the changeset viewer.