Changeset 25969 in vbox
- Timestamp:
- Jan 22, 2010 12:22:38 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmifs.h
r25966 r25969 41 41 */ 42 42 43 43 44 /** @name Common Driver Interface Identficators. 44 45 * @todo Convert all these to _IID. 45 46 * @{ 46 47 */ 47 /** PDMIMOUSEPORT - The mouse port interface. (Down) Coupled with PDMINTERFACE_MOUSE_CONNECTOR. */48 #define PDMINTERFACE_MOUSE_PORT "dcf20e6b-6cd5-4517-8759-91064605b8a8"49 /** PDMIMOUSECONNECTOR - The mouse connector interface. (Up) Coupled with PDMINTERFACE_MOUSE_PORT. */50 #define PDMINTERFACE_MOUSE_CONNECTOR "847f965f-0eb8-4363-88ac-b0ee58a05bde"51 48 /** PDMIKEYBOARDPORT - The keyboard port interface. (Down) Coupled with PDMINTERFACE_KEYBOARD_CONNECTOR. */ 52 49 #define PDMINTERFACE_KEYBOARD_PORT "2a0844f0-410b-40ab-a6ed-6575f3aa3e29" … … 176 173 #define PDMIBASE_IID "a2299c0d-b709-4551-aa5a-73f59ffbed74" 177 174 175 /** 176 * Helper macro for quering an interface from PDMIBASE. 177 * 178 * @returns Correctly typed PDMIBASE::pfnQueryInterface return value. 179 * 180 * @param pIBase Pointer to the base interface. 181 * @param InterfaceType The interface type name. The interface ID is 182 * derived from this by appending _IID. 183 */ 184 #define PDMIBASE_QUERY_INTERFACE(pIBase, InterfaceType) \ 185 ( (InterfaceType *)(pIBase)->pfnQueryInterface(pIBase, InterfaceType##_IID ) ) 186 178 187 179 188 /** … … 190 199 191 200 201 /** PDMIMOUSEPORT interface ID. */ 202 #define PDMIMOUSEPORT_IID "dcf20e6b-6cd5-4517-8759-91064605b8a8" 192 203 /** Pointer to a mouse port interface. */ 193 204 typedef struct PDMIMOUSEPORT *PPDMIMOUSEPORT; 194 205 /** 195 * Mouse port interface .206 * Mouse port interface (down). 196 207 * Pair with PDMIMOUSECONNECTOR. 197 208 */ … … 226 237 227 238 /** 228 * Mouse connector interface .239 * Mouse connector interface (up). 229 240 * Pair with PDMIMOUSEPORT. 230 241 */ … … 232 243 /** Pointer to a mouse connector interface. */ 233 244 typedef PDMIMOUSECONNECTOR *PPDMIMOUSECONNECTOR; 245 /** PDMIMOUSECONNECTOR interface ID. */ 246 #define PDMIMOUSECONNECTOR_IID "847f965f-0eb8-4363-88ac-b0ee58a05bde" 234 247 235 248 -
trunk/src/VBox/Devices/Input/DevPS2.cpp
r25966 r25969 1401 1401 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 1402 1402 return &pThis->Mouse.Base; 1403 if (RTUuidCompare2Strs(pszIID, PDMI NTERFACE_MOUSE_PORT) == 0)1403 if (RTUuidCompare2Strs(pszIID, PDMIMOUSEPORT_IID) == 0) 1404 1404 return &pThis->Mouse.Port; 1405 1405 return NULL; … … 1488 1488 if (RT_SUCCESS(rc)) 1489 1489 { 1490 pThis->Mouse.pDrv = (PDMIMOUSECONNECTOR*)(pThis->Mouse.pDrvBase->pfnQueryInterface(pThis->Mouse.pDrvBase, PDMINTERFACE_MOUSE_CONNECTOR));1490 pThis->Mouse.pDrv = PDMIBASE_QUERY_INTERFACE(pThis->Mouse.pDrvBase, PDMIMOUSECONNECTOR); 1491 1491 if (!pThis->Mouse.pDrv) 1492 1492 { -
trunk/src/VBox/Devices/Input/DrvMouseQueue.cpp
r25966 r25969 89 89 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 90 90 return &pDrvIns->IBase; 91 if (RTUuidCompare2Strs(pszIID, PDMI NTERFACE_MOUSE_PORT) == 0)91 if (RTUuidCompare2Strs(pszIID, PDMIMOUSEPORT_IID) == 0) 92 92 return &pThis->Port; 93 if (RTUuidCompare2Strs(pszIID, PDMI NTERFACE_MOUSE_CONNECTOR) == 0)93 if (RTUuidCompare2Strs(pszIID, PDMIMOUSECONNECTOR_IID) == 0) 94 94 return &pThis->Connector; 95 95 return NULL; … … 249 249 * Get the IMousePort interface of the above driver/device. 250 250 */ 251 pDrv->pUpPort = (PPDMIMOUSEPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_MOUSE_PORT);251 pDrv->pUpPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIMOUSEPORT); 252 252 if (!pDrv->pUpPort) 253 253 { … … 266 266 return rc; 267 267 } 268 pDrv->pDownConnector = (PPDMIMOUSECONNECTOR)pDownBase->pfnQueryInterface(pDownBase, PDMINTERFACE_MOUSE_CONNECTOR);268 pDrv->pDownConnector = PDMIBASE_QUERY_INTERFACE(pDownBase, PDMIMOUSECONNECTOR); 269 269 if (!pDrv->pDownConnector) 270 270 { -
trunk/src/VBox/Frontends/VBoxBFE/MouseImpl.cpp
r25966 r25969 53 53 } DRVMAINMOUSE, *PDRVMAINMOUSE; 54 54 55 /** Converts PDMIMOUSECONNECTOR pointer to a DRVMAINMOUSE pointer. */56 #define PDMIMOUSECONNECTOR_2_MAINMOUSE(pInterface) ( (PDRVMAINMOUSE) ((uintptr_t)pInterface - RT_OFFSETOF(DRVMAINMOUSE, Connector)) )57 55 58 56 // IMouse methods … … 186 184 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 187 185 return &pDrvIns->IBase; 188 if (RTUuidCompare2Strs(pszIID, PDMI NTERFACE_MOUSE_CONNECTOR) == 0)186 if (RTUuidCompare2Strs(pszIID, PDMIMOUSECONNECTOR_IID) == 0) 189 187 return &pDrv->Connector; 190 188 return NULL; … … 232 230 * Get the IMousePort interface of the above driver/device. 233 231 */ 234 pData->pUpPort = (PPDMIMOUSEPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMINTERFACE_MOUSE_PORT);232 pData->pUpPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIMOUSEPORT); 235 233 if (!pData->pUpPort) 236 234 { -
trunk/src/VBox/Main/MouseImpl.cpp
r25966 r25969 46 46 } DRVMAINMOUSE, *PDRVMAINMOUSE; 47 47 48 /** Converts PDMIMOUSECONNECTOR pointer to a DRVMAINMOUSE pointer. */49 #define PDMIMOUSECONNECTOR_2_MAINMOUSE(pInterface) ( (PDRVMAINMOUSE) ((uintptr_t)pInterface - OFFSETOF(DRVMAINMOUSE, Connector)) )50 48 51 49 … … 364 362 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 365 363 return &pDrvIns->IBase; 366 if (RTUuidCompare2Strs(pszIID, PDMI NTERFACE_MOUSE_CONNECTOR) == 0)364 if (RTUuidCompare2Strs(pszIID, PDMIMOUSECONNECTOR_IID) == 0) 367 365 return &pDrv->Connector; 368 366 return NULL; … … 415 413 * Get the IMousePort interface of the above driver/device. 416 414 */ 417 pData->pUpPort = (PPDMIMOUSEPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMI NTERFACE_MOUSE_PORT);415 pData->pUpPort = (PPDMIMOUSEPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, PDMIMOUSEPORT_IID); 418 416 if (!pData->pUpPort) 419 417 {
Note:
See TracChangeset
for help on using the changeset viewer.