Changeset 25985 in vbox
- Timestamp:
- Jan 23, 2010 12:51:04 AM (15 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 50 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r25966 r25985 1546 1546 Assert(&pThis->ac97.IBase == pInterface); 1547 1547 1548 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 1549 return &pThis->ac97.IBase; 1548 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->ac97.IBase); 1550 1549 return NULL; 1551 1550 } -
trunk/src/VBox/Devices/Audio/DevSB16.cpp
r25966 r25985 1781 1781 Assert(&pThis->IBase == pInterface); 1782 1782 1783 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 1784 return &pThis->IBase; 1783 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase); 1785 1784 return NULL; 1786 1785 } -
trunk/src/VBox/Devices/Audio/audio.c
r25984 r25985 1935 1935 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 1936 1936 PDRVAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIO); 1937 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 1938 return &pDrvIns->IBase; 1937 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 1939 1938 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIAUDIOCONNECTOR, &pThis->IAudioConnector); 1940 1939 return NULL; -
trunk/src/VBox/Devices/Audio/audiosniffer.c
r25984 r25985 49 49 50 50 /** Audio Sniffer port base interface. */ 51 PDMIBASE Base;51 PDMIBASE IBase; 52 52 /** Audio Sniffer port interface. */ 53 PDMIAUDIOSNIFFERPORT Port;53 PDMIAUDIOSNIFFERPORT IPort; 54 54 55 55 /** Pointer to base interface of the driver. */ … … 109 109 static DECLCALLBACK(int) iface_Setup (PPDMIAUDIOSNIFFERPORT pInterface, bool fEnable, bool fKeepHostAudio) 110 110 { 111 AUDIOSNIFFERSTATE *pThis = RT_FROM_MEMBER(pInterface, AUDIOSNIFFERSTATE, Port);111 AUDIOSNIFFERSTATE *pThis = RT_FROM_MEMBER(pInterface, AUDIOSNIFFERSTATE, IPort); 112 112 113 113 Assert(g_pData == pThis); … … 124 124 static DECLCALLBACK(void *) iface_QueryInterface(PPDMIBASE pInterface, const char *pszIID) 125 125 { 126 AUDIOSNIFFERSTATE *pThis = RT_FROM_MEMBER(pInterface, AUDIOSNIFFERSTATE, Base); 127 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 128 return &pThis->Base; 129 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIAUDIOSNIFFERPORT, &pThis->Port); 126 AUDIOSNIFFERSTATE *pThis = RT_FROM_MEMBER(pInterface, AUDIOSNIFFERSTATE, IBase); 127 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase); 128 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIAUDIOSNIFFERPORT, &pThis->IPort); 130 129 return NULL; 131 130 } … … 171 170 */ 172 171 /* Base */ 173 pThis-> Base.pfnQueryInterface = iface_QueryInterface;172 pThis->IBase.pfnQueryInterface = iface_QueryInterface; 174 173 175 174 /* Audio Sniffer port */ 176 pThis-> Port.pfnSetup = iface_Setup;175 pThis->IPort.pfnSetup = iface_Setup; 177 176 178 177 /* 179 178 * Get the corresponding connector interface 180 179 */ 181 rc = PDMDevHlpDriverAttach(pDevIns, 0, &pThis-> Base, &pThis->pDrvBase, "Audio Sniffer Port");180 rc = PDMDevHlpDriverAttach(pDevIns, 0, &pThis->IBase, &pThis->pDrvBase, "Audio Sniffer Port"); 182 181 183 182 if (RT_SUCCESS(rc)) -
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r25971 r25985 4738 4738 static DECLCALLBACK(void *) vgaPortQueryInterface(PPDMIBASE pInterface, const char *pszIID) 4739 4739 { 4740 PVGASTATE pThis = RT_FROM_MEMBER(pInterface, VGASTATE, Base); 4741 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 4742 return &pThis->Base; 4743 if (RTUuidCompare2Strs(pszIID, PDMIDISPLAYPORT_IID) == 0) 4744 return &pThis->Port; 4740 PVGASTATE pThis = RT_FROM_MEMBER(pInterface, VGASTATE, IBase); 4741 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase); 4742 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIDISPLAYPORT, &pThis->IPort); 4745 4743 #if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL) 4746 if (RTUuidCompare2Strs(pszIID, PDMIDISPLAYVBVACALLBACKS_IID) == 0) 4747 return &pThis->VBVACallbacks; 4744 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIDISPLAYVBVACALLBACKS, &pThis->IVBVACallbacks); 4748 4745 #endif 4749 4746 return NULL; … … 4805 4802 4806 4803 /** Converts a display port interface pointer to a vga state pointer. */ 4807 #define IDISPLAYPORT_2_VGASTATE(pInterface) ( (PVGASTATE)((uintptr_t)pInterface - RT_OFFSETOF(VGASTATE, Port)) )4804 #define IDISPLAYPORT_2_VGASTATE(pInterface) ( (PVGASTATE)((uintptr_t)pInterface - RT_OFFSETOF(VGASTATE, IPort)) ) 4808 4805 4809 4806 … … 5725 5722 case 0: 5726 5723 { 5727 int rc = PDMDevHlpDriverAttach(pDevIns, iLUN, &pThis-> Base, &pThis->pDrvBase, "Display Port");5724 int rc = PDMDevHlpDriverAttach(pDevIns, iLUN, &pThis->IBase, &pThis->pDrvBase, "Display Port"); 5728 5725 if (RT_SUCCESS(rc)) 5729 5726 { … … 5932 5929 5933 5930 /* the interfaces. */ 5934 pThis-> Base.pfnQueryInterface= vgaPortQueryInterface;5935 5936 pThis-> Port.pfnUpdateDisplay= vgaPortUpdateDisplay;5937 pThis-> Port.pfnUpdateDisplayAll= vgaPortUpdateDisplayAll;5938 pThis-> Port.pfnQueryColorDepth= vgaPortQueryColorDepth;5939 pThis-> Port.pfnSetRefreshRate= vgaPortSetRefreshRate;5940 pThis-> Port.pfnTakeScreenshot= vgaPortTakeScreenshot;5941 pThis-> Port.pfnFreeScreenshot= vgaPortFreeScreenshot;5942 pThis-> Port.pfnDisplayBlt= vgaPortDisplayBlt;5943 pThis-> Port.pfnUpdateDisplayRect= vgaPortUpdateDisplayRect;5944 pThis-> Port.pfnSetRenderVRAM= vgaPortSetRenderVRAM;5931 pThis->IBase.pfnQueryInterface = vgaPortQueryInterface; 5932 5933 pThis->IPort.pfnUpdateDisplay = vgaPortUpdateDisplay; 5934 pThis->IPort.pfnUpdateDisplayAll = vgaPortUpdateDisplayAll; 5935 pThis->IPort.pfnQueryColorDepth = vgaPortQueryColorDepth; 5936 pThis->IPort.pfnSetRefreshRate = vgaPortSetRefreshRate; 5937 pThis->IPort.pfnTakeScreenshot = vgaPortTakeScreenshot; 5938 pThis->IPort.pfnFreeScreenshot = vgaPortFreeScreenshot; 5939 pThis->IPort.pfnDisplayBlt = vgaPortDisplayBlt; 5940 pThis->IPort.pfnUpdateDisplayRect = vgaPortUpdateDisplayRect; 5941 pThis->IPort.pfnSetRenderVRAM = vgaPortSetRenderVRAM; 5945 5942 5946 5943 #if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL) 5947 pThis-> VBVACallbacks.pfnVHWACommandCompleteAsynch = vbvaVHWACommandCompleteAsynch;5944 pThis->IVBVACallbacks.pfnVHWACommandCompleteAsynch = vbvaVHWACommandCompleteAsynch; 5948 5945 #endif 5949 5946 -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r25971 r25985 304 304 305 305 /** LUN\#0: The display port base interface. */ 306 PDMIBASE Base;306 PDMIBASE IBase; 307 307 /** LUN\#0: The display port interface. */ 308 PDMIDISPLAYPORT Port;308 PDMIDISPLAYPORT IPort; 309 309 # if HC_ARCH_BITS == 32 310 310 uint32_t Padding8; … … 312 312 #if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL) 313 313 /** LUN\#0: VBVA callbacks interface */ 314 PDMIDISPLAYVBVACALLBACKS VBVACallbacks;314 PDMIDISPLAYVBVACALLBACKS IVBVACallbacks; 315 315 #else 316 316 # if HC_ARCH_BITS == 32 -
trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
r25971 r25985 1177 1177 } 1178 1178 1179 #define PPDMIDISPLAYVBVACALLBACKS_2_PVGASTATE(_pcb) ( (PVGASTATE)((uint8_t *)(_pcb) - RT_OFFSETOF(VGASTATE, VBVACallbacks)) )1179 #define PPDMIDISPLAYVBVACALLBACKS_2_PVGASTATE(_pcb) ( (PVGASTATE)((uint8_t *)(_pcb) - RT_OFFSETOF(VGASTATE, IVBVACallbacks)) ) 1180 1180 1181 1181 int vbvaVHWACommandCompleteAsynch(PPDMIDISPLAYVBVACALLBACKS pInterface, PVBOXVHWACMD pCmd) -
trunk/src/VBox/Devices/Input/DevPS2.cpp
r25971 r25985 229 229 { 230 230 /** The base interface for the keyboard port. */ 231 PDMIBASE Base;231 PDMIBASE IBase; 232 232 /** The keyboard port base interface. */ 233 PDMIKEYBOARDPORT Port;233 PDMIKEYBOARDPORT IPort; 234 234 235 235 /** The base interface of the attached keyboard driver. */ … … 248 248 { 249 249 /** The base interface for the mouse port. */ 250 PDMIBASE Base;250 PDMIBASE IBase; 251 251 /** The mouse port base interface. */ 252 PDMIMOUSEPORT Port;252 PDMIMOUSEPORT IPort; 253 253 254 254 /** The base interface of the attached mouse driver. */ … … 1360 1360 static DECLCALLBACK(void *) kbdKeyboardQueryInterface(PPDMIBASE pInterface, const char *pszIID) 1361 1361 { 1362 KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Keyboard.Base); 1363 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 1364 return &pThis->Keyboard.Base; 1365 if (RTUuidCompare2Strs(pszIID, PDMIKEYBOARDPORT_IID) == 0) 1366 return &pThis->Keyboard.Port; 1362 KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Keyboard.IBase); 1363 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->Keyboard.IBase); 1364 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIKEYBOARDPORT, &pThis->Keyboard.IPort); 1367 1365 return NULL; 1368 1366 } … … 1375 1373 * 1376 1374 * @returns VBox status code. 1377 * @param pInterface Pointer to the keyboard port interface (KBDState::Keyboard. Port).1375 * @param pInterface Pointer to the keyboard port interface (KBDState::Keyboard.IPort). 1378 1376 * @param u8KeyCode The keycode. 1379 1377 */ 1380 1378 static DECLCALLBACK(int) kbdKeyboardPutEvent(PPDMIKEYBOARDPORT pInterface, uint8_t u8KeyCode) 1381 1379 { 1382 KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Keyboard. Port);1380 KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Keyboard.IPort); 1383 1381 int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY); 1384 1382 AssertReleaseRC(rc); … … 1398 1396 static DECLCALLBACK(void *) kbdMouseQueryInterface(PPDMIBASE pInterface, const char *pszIID) 1399 1397 { 1400 KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Mouse.Base); 1401 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 1402 return &pThis->Mouse.Base; 1403 if (RTUuidCompare2Strs(pszIID, PDMIMOUSEPORT_IID) == 0) 1404 return &pThis->Mouse.Port; 1398 KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Mouse.IBase); 1399 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->Mouse.IBase); 1400 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMOUSEPORT, &pThis->Mouse.IPort); 1405 1401 return NULL; 1406 1402 } … … 1413 1409 * 1414 1410 * @returns VBox status code. 1415 * @param pInterface Pointer to the mouse port interface (KBDState::Mouse. Port).1411 * @param pInterface Pointer to the mouse port interface (KBDState::Mouse.IPort). 1416 1412 * @param i32DeltaX The X delta. 1417 1413 * @param i32DeltaY The Y delta. … … 1421 1417 static DECLCALLBACK(int) kbdMousePutEvent(PPDMIMOUSEPORT pInterface, int32_t i32DeltaX, int32_t i32DeltaY, int32_t i32DeltaZ, int32_t i32DeltaW, uint32_t fButtonStates) 1422 1418 { 1423 KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Mouse. Port);1419 KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Mouse.IPort); 1424 1420 int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY); 1425 1421 AssertReleaseRC(rc); … … 1464 1460 /* LUN #0: keyboard */ 1465 1461 case 0: 1466 rc = PDMDevHlpDriverAttach(pDevIns, iLUN, &pThis->Keyboard. Base, &pThis->Keyboard.pDrvBase, "Keyboard Port");1462 rc = PDMDevHlpDriverAttach(pDevIns, iLUN, &pThis->Keyboard.IBase, &pThis->Keyboard.pDrvBase, "Keyboard Port"); 1467 1463 if (RT_SUCCESS(rc)) 1468 1464 { … … 1485 1481 /* LUN #1: aux/mouse */ 1486 1482 case 1: 1487 rc = PDMDevHlpDriverAttach(pDevIns, iLUN, &pThis->Mouse. Base, &pThis->Mouse.pDrvBase, "Aux (Mouse) Port");1483 rc = PDMDevHlpDriverAttach(pDevIns, iLUN, &pThis->Mouse.IBase, &pThis->Mouse.pDrvBase, "Aux (Mouse) Port"); 1488 1484 if (RT_SUCCESS(rc)) 1489 1485 { … … 1623 1619 pThis->pDevInsR0 = PDMDEVINS_2_R0PTR(pDevIns); 1624 1620 pThis->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns); 1625 pThis->Keyboard. Base.pfnQueryInterface= kbdKeyboardQueryInterface;1626 pThis->Keyboard. Port.pfnPutEvent= kbdKeyboardPutEvent;1627 1628 pThis->Mouse. Base.pfnQueryInterface= kbdMouseQueryInterface;1629 pThis->Mouse. Port.pfnPutEvent= kbdMousePutEvent;1621 pThis->Keyboard.IBase.pfnQueryInterface = kbdKeyboardQueryInterface; 1622 pThis->Keyboard.IPort.pfnPutEvent = kbdKeyboardPutEvent; 1623 1624 pThis->Mouse.IBase.pfnQueryInterface = kbdMouseQueryInterface; 1625 pThis->Mouse.IPort.pfnPutEvent = kbdMousePutEvent; 1630 1626 1631 1627 /* -
trunk/src/VBox/Devices/Input/DrvKeyboardQueue.cpp
r25971 r25985 51 51 PPDMIKEYBOARDCONNECTOR pDownConnector; 52 52 /** Our keyboard connector interface. */ 53 PDMIKEYBOARDCONNECTOR Connector;53 PDMIKEYBOARDCONNECTOR IConnector; 54 54 /** Our keyboard port interface. */ 55 PDMIKEYBOARDPORT Port;55 PDMIKEYBOARDPORT IPort; 56 56 /** The queue handle. */ 57 57 PPDMQUEUE pQueue; … … 85 85 PDRVKBDQUEUE pThis = PDMINS_2_DATA(pDrvIns, PDRVKBDQUEUE); 86 86 87 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 88 return &pDrvIns->IBase; 89 if (RTUuidCompare2Strs(pszIID, PDMIKEYBOARDCONNECTOR_IID) == 0) 90 return &pThis->Connector; 91 if (RTUuidCompare2Strs(pszIID, PDMIKEYBOARDPORT_IID) == 0) 92 return &pThis->Port; 87 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 88 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIKEYBOARDCONNECTOR, &pThis->IConnector); 89 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIKEYBOARDPORT, &pThis->IPort); 93 90 return NULL; 94 91 } … … 97 94 /* -=-=-=-=- IKeyboardPort -=-=-=-=- */ 98 95 99 /** Converts a pointer to DRVKBDQUEUE:: Port to a DRVKBDQUEUE pointer. */100 #define IKEYBOARDPORT_2_DRVKBDQUEUE(pInterface) ( (PDRVKBDQUEUE)((char *)(pInterface) - RT_OFFSETOF(DRVKBDQUEUE, Port)) )96 /** Converts a pointer to DRVKBDQUEUE::IPort to a DRVKBDQUEUE pointer. */ 97 #define IKEYBOARDPORT_2_DRVKBDQUEUE(pInterface) ( (PDRVKBDQUEUE)((char *)(pInterface) - RT_OFFSETOF(DRVKBDQUEUE, IPort)) ) 101 98 102 99 … … 128 125 129 126 130 /* -=-=-=-=- Connector -=-=-=-=- */131 132 #define PPDMIKEYBOARDCONNECTOR_2_DRVKBDQUEUE(pInterface) ( (PDRVKBDQUEUE)((char *)(pInterface) - RT_OFFSETOF(DRVKBDQUEUE, Connector)) )127 /* -=-=-=-=- IConnector -=-=-=-=- */ 128 129 #define PPDMIKEYBOARDCONNECTOR_2_DRVKBDQUEUE(pInterface) ( (PDRVKBDQUEUE)((char *)(pInterface) - RT_OFFSETOF(DRVKBDQUEUE, IConnector)) ) 133 130 134 131 … … 255 252 pDrvIns->IBase.pfnQueryInterface = drvKbdQueueQueryInterface; 256 253 /* IKeyboardConnector. */ 257 pDrv-> Connector.pfnLedStatusChange= drvKbdPassThruLedsChange;254 pDrv->IConnector.pfnLedStatusChange = drvKbdPassThruLedsChange; 258 255 /* IKeyboardPort. */ 259 pDrv-> Port.pfnPutEvent= drvKbdQueuePutEvent;256 pDrv->IPort.pfnPutEvent = drvKbdQueuePutEvent; 260 257 261 258 /* -
trunk/src/VBox/Devices/Input/DrvMouseQueue.cpp
r25969 r25985 51 51 PPDMIMOUSECONNECTOR pDownConnector; 52 52 /** Our mouse connector interface. */ 53 PDMIMOUSECONNECTOR Connector;53 PDMIMOUSECONNECTOR IConnector; 54 54 /** Our mouse port interface. */ 55 PDMIMOUSEPORT Port;55 PDMIMOUSEPORT IPort; 56 56 /** The queue handle. */ 57 57 PPDMQUEUE pQueue; … … 87 87 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 88 88 PDRVMOUSEQUEUE pThis = PDMINS_2_DATA(pDrvIns, PDRVMOUSEQUEUE); 89 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 90 return &pDrvIns->IBase; 91 if (RTUuidCompare2Strs(pszIID, PDMIMOUSEPORT_IID) == 0) 92 return &pThis->Port; 93 if (RTUuidCompare2Strs(pszIID, PDMIMOUSECONNECTOR_IID) == 0) 94 return &pThis->Connector; 89 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 90 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMOUSEPORT, &pThis->IPort); 91 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMOUSECONNECTOR, &pThis->IConnector); 95 92 return NULL; 96 93 } … … 100 97 101 98 /** Converts a pointer to DRVMOUSEQUEUE::Port to a DRVMOUSEQUEUE pointer. */ 102 #define IMOUSEPORT_2_DRVMOUSEQUEUE(pInterface) ( (PDRVMOUSEQUEUE)((char *)(pInterface) - RT_OFFSETOF(DRVMOUSEQUEUE, Port)) )99 #define IMOUSEPORT_2_DRVMOUSEQUEUE(pInterface) ( (PDRVMOUSEQUEUE)((char *)(pInterface) - RT_OFFSETOF(DRVMOUSEQUEUE, IPort)) ) 103 100 104 101 … … 244 241 pDrvIns->IBase.pfnQueryInterface = drvMouseQueueQueryInterface; 245 242 /* IMousePort. */ 246 pDrv-> Port.pfnPutEvent= drvMouseQueuePutEvent;243 pDrv->IPort.pfnPutEvent = drvMouseQueuePutEvent; 247 244 248 245 /* -
trunk/src/VBox/Devices/Network/DevE1000.cpp
r25984 r25985 4467 4467 Assert(&pThis->IBase == pInterface); 4468 4468 4469 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 4470 return &pThis->IBase; 4469 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase); 4471 4470 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKPORT, &pThis->INetworkPort); 4472 4471 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONFIG, &pThis->INetworkConfig); -
trunk/src/VBox/Devices/Network/DevINIP.cpp
r25981 r25985 397 397 { 398 398 PDEVINTNETIP pThis = RT_FROM_MEMBER(pInterface, DEVINTNETIP, IBase); 399 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 400 return &pThis->IBase; 399 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase); 401 400 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKPORT, &pThis->INetworkPort); 402 401 return NULL; -
trunk/src/VBox/Devices/Network/DevPCNet.cpp
r25984 r25985 4487 4487 PCNetState *pThis = RT_FROM_MEMBER(pInterface, PCNetState, IBase); 4488 4488 Assert(&pThis->IBase == pInterface); 4489 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 4490 return &pThis->IBase; 4489 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase); 4491 4490 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKPORT, &pThis->INetworkPort); 4492 4491 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONFIG, &pThis->INetworkConfig); -
trunk/src/VBox/Devices/Network/DrvIntNet.cpp
r25981 r25985 586 586 PDRVINTNET pThis = PDMINS_2_DATA(pDrvIns, PDRVINTNET); 587 587 588 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 589 return &pDrvIns->IBase; 588 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 590 589 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONNECTOR, &pThis->INetworkConnector); 591 590 return NULL; -
trunk/src/VBox/Devices/Network/DrvNAT.cpp
r25981 r25985 813 813 PDRVNAT pThis = PDMINS_2_DATA(pDrvIns, PDRVNAT); 814 814 815 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 816 return &pDrvIns->IBase; 815 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 817 816 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONNECTOR, &pThis->INetworkConnector); 818 817 return NULL; -
trunk/src/VBox/Devices/Network/DrvNetSniffer.cpp
r25981 r25985 258 258 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 259 259 PDRVNETSNIFFER pThis = PDMINS_2_DATA(pDrvIns, PDRVNETSNIFFER); 260 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 261 return &pDrvIns->IBase; 260 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 262 261 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONNECTOR, &pThis->INetworkConnector); 263 262 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKPORT, &pThis->INetworkPort); -
trunk/src/VBox/Devices/Network/DrvTAP.cpp
r25981 r25985 784 784 PDRVTAP pThis = PDMINS_2_DATA(pDrvIns, PDRVTAP); 785 785 786 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 787 return &pDrvIns->IBase; 786 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 788 787 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONNECTOR, &pThis->INetworkConnector); 789 788 return NULL; -
trunk/src/VBox/Devices/PC/DevACPI.cpp
r25984 r25985 1941 1941 { 1942 1942 ACPIState *pThis = RT_FROM_MEMBER(pInterface, ACPIState, IBase); 1943 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 1944 return &pThis->IBase; 1943 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase); 1945 1944 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIACPIPORT, &pThis->IACPIPort); 1946 1945 return NULL; -
trunk/src/VBox/Devices/PC/DrvACPI.cpp
r25984 r25985 87 87 { 88 88 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 89 PDRVACPI pThis = PDMINS_2_DATA(pDrvIns, PDRVACPI); 90 91 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 92 return &pDrvIns->IBase; 89 PDRVACPI pThis = PDMINS_2_DATA(pDrvIns, PDRVACPI); 90 91 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 93 92 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIACPICONNECTOR, &pThis->IACPIConnector); 94 93 return NULL; -
trunk/src/VBox/Devices/PC/DrvAcpiCpu.cpp
r25966 r25985 40 40 { 41 41 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 42 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 43 return &pDrvIns->IBase; 42 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 44 43 return NULL; 45 44 } -
trunk/src/VBox/Devices/Parallel/DevParallel.cpp
r25984 r25985 656 656 { 657 657 ParallelState *pThis = PDMIBASE_2_PARALLELSTATE(pInterface); 658 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 659 return &pThis->IBase; 658 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase); 660 659 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTPARALLELPORT, &pThis->IHostParallelPort); 661 660 return NULL; -
trunk/src/VBox/Devices/Parallel/DrvHostParallel.cpp
r25984 r25985 91 91 PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL); 92 92 93 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 94 return &pDrvIns->IBase; 93 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 95 94 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTPARALLELCONNECTOR, &pThis->IHostParallelConnector); 96 95 return NULL; -
trunk/src/VBox/Devices/Serial/DevSerial.cpp
r25971 r25985 738 738 { 739 739 SerialState *pThis = PDMIBASE_2_SERIALSTATE(pInterface); 740 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 741 return &pThis->IBase; 742 if (RTUuidCompare2Strs(pszIID, PDMICHARPORT_IID) == 0) 743 return &pThis->ICharPort; 740 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase); 741 PDMIBASE_RETURN_INTERFACE(pszIID, PDMICHARPORT, &pThis->ICharPort); 744 742 return NULL; 745 743 } -
trunk/src/VBox/Devices/Serial/DrvChar.cpp
r25974 r25985 99 99 PDRVCHAR pThis = PDMINS_2_DATA(pDrvIns, PDRVCHAR); 100 100 101 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 102 return &pDrvIns->IBase; 103 if (RTUuidCompare2Strs(pszIID, PDMICHARCONNECTOR_IID) == 0) 104 return &pThis->ICharConnector; 101 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 102 PDMIBASE_RETURN_INTERFACE(pszIID, PDMICHARCONNECTOR, &pThis->ICharConnector); 105 103 return NULL; 106 104 } -
trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp
r25971 r25985 179 179 PDRVHOSTSERIAL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTSERIAL); 180 180 181 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 182 return &pDrvIns->IBase; 183 if (RTUuidCompare2Strs(pszIID, PDMICHARCONNECTOR_IID) == 0) 184 return &pThis->ICharConnector; 181 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 182 PDMIBASE_RETURN_INTERFACE(pszIID, PDMICHARCONNECTOR, &pThis->ICharConnector); 185 183 return NULL; 186 184 } -
trunk/src/VBox/Devices/Serial/DrvNamedPipe.cpp
r25974 r25985 287 287 PPDMDRVINS pDrvIns = PDMIBASE_2_DRVINS(pInterface); 288 288 PDRVNAMEDPIPE pThis = PDMINS_2_DATA(pDrvIns, PDRVNAMEDPIPE); 289 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 290 return &pDrvIns->IBase; 289 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 291 290 PDMIBASE_RETURN_INTERFACE(pszIID, PDMISTREAM, &pThis->IStream); 292 291 return NULL; -
trunk/src/VBox/Devices/Serial/DrvRawFile.cpp
r25974 r25985 103 103 PDRVRAWFILE pThis = PDMINS_2_DATA(pDrvIns, PDRVRAWFILE); 104 104 105 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 106 return &pDrvIns->IBase; 105 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 107 106 PDMIBASE_RETURN_INTERFACE(pszIID, PDMISTREAM, &pThis->IStream); 108 107 return NULL; -
trunk/src/VBox/Devices/Storage/DevAHCI.cpp
r25984 r25985 2391 2391 { 2392 2392 PAHCI pThis = PDMIBASE_2_PAHCI(pInterface); 2393 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 2394 return &pThis->IBase; 2393 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase); 2395 2394 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds); 2396 2395 return NULL; … … 2403 2402 { 2404 2403 PAHCIPort pAhciPort = PDMIBASE_2_PAHCIPORT(pInterface); 2405 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 2406 return &pAhciPort->IBase; 2404 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pAhciPort->IBase); 2407 2405 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCKPORT, &pAhciPort->IPort); 2408 2406 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCKASYNCPORT, &pAhciPort->IPortAsync); -
trunk/src/VBox/Devices/Storage/DevATA.cpp
r25984 r25985 5234 5234 { 5235 5235 PCIATAState *pThis = PDMIBASE_2_PCIATASTATE(pInterface); 5236 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 5237 return &pThis->IBase; 5236 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase); 5238 5237 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds); 5239 5238 return NULL; … … 5278 5277 { 5279 5278 ATADevState *pIf = PDMIBASE_2_ATASTATE(pInterface); 5280 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 5281 return &pIf->IBase; 5279 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pIf->IBase); 5282 5280 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCKPORT, &pIf->IPort); 5283 5281 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMOUNTNOTIFY, &pIf->IMountNotify); -
trunk/src/VBox/Devices/Storage/DevBusLogic.cpp
r25984 r25985 2355 2355 { 2356 2356 PBUSLOGICDEVICE pDevice = PDMIBASE_2_PBUSLOGICDEVICE(pInterface); 2357 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 2358 return &pDevice->IBase; 2357 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDevice->IBase); 2359 2358 PDMIBASE_RETURN_INTERFACE(pszIID, PDMISCSIPORT, &pDevice->ISCSIPort); 2360 2359 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pDevice->ILed); … … 2388 2387 { 2389 2388 PBUSLOGIC pThis = PDMIBASE_2_PBUSLOGIC(pInterface); 2390 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 2391 return &pThis->IBase; 2389 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase); 2392 2390 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds); 2393 2391 return NULL; -
trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
r25984 r25985 4201 4201 PLSILOGICDEVICE pDevice = PDMIBASE_2_PLSILOGICDEVICE(pInterface); 4202 4202 4203 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 4204 return &pDevice->IBase; 4203 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDevice->IBase); 4205 4204 PDMIBASE_RETURN_INTERFACE(pszIID, PDMISCSIPORT, &pDevice->ISCSIPort); 4206 4205 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pDevice->ILed); … … 4234 4233 { 4235 4234 PLSILOGICSCSI pThis = PDMIBASE_2_PLSILOGICSCSI(pInterface); 4236 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 4237 return &pThis->IBase; 4235 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase); 4238 4236 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds); 4239 4237 return NULL; -
trunk/src/VBox/Devices/Storage/DrvBlock.cpp
r25974 r25985 658 658 PDRVBLOCK pThis = PDMINS_2_DATA(pDrvIns, PDRVBLOCK); 659 659 660 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 661 return &pDrvIns->IBase; 660 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 662 661 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCK, &pThis->IBlock); 663 662 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCKBIOS, pThis->fBiosVisible ? &pThis->IBlockBios : NULL); -
trunk/src/VBox/Devices/Storage/DrvHostBase.cpp
r25974 r25985 571 571 PDRVHOSTBASE pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTBASE); 572 572 573 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 574 return &pDrvIns->IBase; 573 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 575 574 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCK, &pThis->IBlock); 576 575 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCKBIOS, pThis->fBiosVisible ? &pThis->IBlockBios : NULL); … … 721 720 rcDA = -2; 722 721 DADiskUnmount(pThis->pDADisk, kDADiskUnmountOptionWhole, drvHostBaseDADoneCallback, &rcDA); 723 SInt32rc32 = CFRunLoopRunInMode(MY_RUN_LOOP_MODE, 120.0, FALSE);722 rc32 = CFRunLoopRunInMode(MY_RUN_LOOP_MODE, 120.0, FALSE); 724 723 AssertMsg(rc32 == kCFRunLoopRunStopped, ("rc32=%RI32 (%RX32)\n", rc32, rc32)); 725 724 if ( rc32 == kCFRunLoopRunStopped -
trunk/src/VBox/Devices/Storage/DrvMediaISO.cpp
r25974 r25985 293 293 PPDMDRVINS pDrvIns = PDMIBASE_2_DRVINS(pInterface); 294 294 PDRVMEDIAISO pThis = PDMINS_2_DATA(pDrvIns, PDRVMEDIAISO); 295 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 296 return &pDrvIns->IBase; 295 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 297 296 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMEDIA, &pThis->IMedia); 298 297 return NULL; -
trunk/src/VBox/Devices/Storage/DrvRawImage.cpp
r25974 r25985 344 344 PDRVRAWIMAGE pThis = PDMINS_2_DATA(pDrvIns, PDRVRAWIMAGE); 345 345 346 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 347 return &pDrvIns->IBase; 346 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 348 347 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMEDIA, &pThis->IMedia); 349 348 return NULL; -
trunk/src/VBox/Devices/Storage/DrvSCSI.cpp
r25984 r25985 805 805 PDRVSCSI pThis = PDMINS_2_DATA(pDrvIns, PDRVSCSI); 806 806 807 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 808 return &pDrvIns->IBase; 807 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 809 808 PDMIBASE_RETURN_INTERFACE(pszIID, PDMISCSICONNECTOR, &pThis->ISCSIConnector); 810 809 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCKPORT, &pThis->IPort); -
trunk/src/VBox/Devices/Storage/DrvSCSIHost.cpp
r25984 r25985 404 404 PDRVSCSIHOST pThis = PDMINS_2_DATA(pDrvIns, PDRVSCSIHOST); 405 405 406 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 407 return &pDrvIns->IBase; 406 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 408 407 PDMIBASE_RETURN_INTERFACE(pszIID, PDMISCSICONNECTOR, &pThis->ISCSIConnector); 409 408 return NULL; -
trunk/src/VBox/Devices/Storage/DrvVD.cpp
r25974 r25985 819 819 PVBOXDISK pThis = PDMINS_2_DATA(pDrvIns, PVBOXDISK); 820 820 821 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 822 return &pDrvIns->IBase; 821 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 823 822 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMEDIA, &pThis->IMedia); 824 823 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMEDIAASYNC, pThis->fAsyncIOSupported ? &pThis->IMediaAsync : NULL); -
trunk/src/VBox/Devices/Storage/fdc.c
r25984 r25985 2503 2503 { 2504 2504 fdrive_t *pDrive = PDMIBASE_2_FDRIVE(pInterface); 2505 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 2506 return &pDrive->IBase;2505 2506 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrive->IBase); 2507 2507 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCKPORT, &pDrive->IPort); 2508 2508 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMOUNTNOTIFY, &pDrive->IMountNotify); … … 2540 2540 fdctrl_t *pThis = RT_FROM_MEMBER (pInterface, fdctrl_t, IBaseStatus); 2541 2541 2542 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 2543 return &pThis->IBaseStatus; 2542 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBaseStatus); 2544 2543 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds); 2545 2544 return NULL; -
trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
r25984 r25985 1832 1832 static DECLCALLBACK(void *) vmmdevPortQueryInterface(PPDMIBASE pInterface, const char *pszIID) 1833 1833 { 1834 VMMDevState *pThis = RT_FROM_MEMBER(pInterface, VMMDevState, Base); 1835 1836 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 1837 return &pThis->Base; 1838 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIVMMDEVPORT, &pThis->Port); 1834 VMMDevState *pThis = RT_FROM_MEMBER(pInterface, VMMDevState, IBase); 1835 1836 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase); 1837 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIVMMDEVPORT, &pThis->IPort); 1839 1838 #ifdef VBOX_WITH_HGCM 1840 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHGCMPORT, &pThis-> HGCMPort);1839 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHGCMPORT, &pThis->IHGCMPort); 1841 1840 #endif 1842 1841 /* Currently only for shared folders. */ … … 1867 1866 1868 1867 /** Converts a VMMDev port interface pointer to a VMMDev state pointer. */ 1869 #define IVMMDEVPORT_2_VMMDEVSTATE(pInterface) ( (VMMDevState*)((uintptr_t)pInterface - RT_OFFSETOF(VMMDevState, Port)) )1868 #define IVMMDEVPORT_2_VMMDEVSTATE(pInterface) ( (VMMDevState*)((uintptr_t)pInterface - RT_OFFSETOF(VMMDevState, IPort)) ) 1870 1869 1871 1870 … … 2492 2491 * Interfaces 2493 2492 */ 2494 /* Base */2495 pThis-> Base.pfnQueryInterface = vmmdevPortQueryInterface;2493 /* IBase */ 2494 pThis->IBase.pfnQueryInterface = vmmdevPortQueryInterface; 2496 2495 2497 2496 /* VMMDev port */ 2498 pThis-> Port.pfnQueryAbsoluteMouse = vmmdevQueryAbsoluteMouse;2499 pThis-> Port.pfnSetAbsoluteMouse = vmmdevSetAbsoluteMouse;2500 pThis-> Port.pfnQueryMouseCapabilities = vmmdevQueryMouseCapabilities;2501 pThis-> Port.pfnSetMouseCapabilities = vmmdevSetMouseCapabilities;2502 pThis-> Port.pfnRequestDisplayChange = vmmdevRequestDisplayChange;2503 pThis-> Port.pfnSetCredentials = vmmdevSetCredentials;2504 pThis-> Port.pfnVBVAChange = vmmdevVBVAChange;2505 pThis-> Port.pfnRequestSeamlessChange = vmmdevRequestSeamlessChange;2506 pThis-> Port.pfnSetMemoryBalloon = vmmdevSetMemoryBalloon;2507 pThis-> Port.pfnSetStatisticsInterval = vmmdevSetStatisticsInterval;2508 pThis-> Port.pfnVRDPChange = vmmdevVRDPChange;2509 pThis-> Port.pfnCpuHotUnplug = vmmdevCpuHotUnplug;2510 pThis-> Port.pfnCpuHotPlug = vmmdevCpuHotPlug;2497 pThis->IPort.pfnQueryAbsoluteMouse = vmmdevQueryAbsoluteMouse; 2498 pThis->IPort.pfnSetAbsoluteMouse = vmmdevSetAbsoluteMouse; 2499 pThis->IPort.pfnQueryMouseCapabilities = vmmdevQueryMouseCapabilities; 2500 pThis->IPort.pfnSetMouseCapabilities = vmmdevSetMouseCapabilities; 2501 pThis->IPort.pfnRequestDisplayChange = vmmdevRequestDisplayChange; 2502 pThis->IPort.pfnSetCredentials = vmmdevSetCredentials; 2503 pThis->IPort.pfnVBVAChange = vmmdevVBVAChange; 2504 pThis->IPort.pfnRequestSeamlessChange = vmmdevRequestSeamlessChange; 2505 pThis->IPort.pfnSetMemoryBalloon = vmmdevSetMemoryBalloon; 2506 pThis->IPort.pfnSetStatisticsInterval = vmmdevSetStatisticsInterval; 2507 pThis->IPort.pfnVRDPChange = vmmdevVRDPChange; 2508 pThis->IPort.pfnCpuHotUnplug = vmmdevCpuHotUnplug; 2509 pThis->IPort.pfnCpuHotPlug = vmmdevCpuHotPlug; 2511 2510 2512 2511 /* Shared folder LED */ 2513 pThis->SharedFolders.Led.u32Magic = PDMLED_MAGIC;2512 pThis->SharedFolders.Led.u32Magic = PDMLED_MAGIC; 2514 2513 pThis->SharedFolders.ILeds.pfnQueryStatusLed = vmmdevQueryStatusLed; 2515 2514 2516 2515 #ifdef VBOX_WITH_HGCM 2517 2516 /* HGCM port */ 2518 pThis-> HGCMPort.pfnCompleted = hgcmCompleted;2517 pThis->IHGCMPort.pfnCompleted = hgcmCompleted; 2519 2518 #endif 2520 2519 … … 2584 2583 * Get the corresponding connector interface 2585 2584 */ 2586 rc = PDMDevHlpDriverAttach(pDevIns, 0, &pThis-> Base, &pThis->pDrvBase, "VMM Driver Port");2585 rc = PDMDevHlpDriverAttach(pDevIns, 0, &pThis->IBase, &pThis->pDrvBase, "VMM Driver Port"); 2587 2586 if (RT_SUCCESS(rc)) 2588 2587 { … … 2610 2609 */ 2611 2610 PPDMIBASE pBase; 2612 rc = PDMDevHlpDriverAttach(pDevIns, PDM_STATUS_LUN, &pThis-> Base, &pBase, "Status Port");2611 rc = PDMDevHlpDriverAttach(pDevIns, PDM_STATUS_LUN, &pThis->IBase, &pBase, "Status Port"); 2613 2612 if (RT_SUCCESS(rc)) 2614 2613 pThis->SharedFolders.pLedsConnector = PDMIBASE_QUERY_INTERFACE(pBase, PDMILEDCONNECTORS); -
trunk/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp
r25778 r25985 1737 1737 } 1738 1738 1739 #define PDMIHGCMPORT_2_VMMDEVSTATE(pInterface) ( (VMMDevState *) ((uintptr_t)pInterface - RT_OFFSETOF(VMMDevState, HGCMPort)) )1739 #define PDMIHGCMPORT_2_VMMDEVSTATE(pInterface) ( (VMMDevState *) ((uintptr_t)pInterface - RT_OFFSETOF(VMMDevState, IHGCMPort)) ) 1740 1740 1741 1741 DECLCALLBACK(void) hgcmCompletedWorker (PPDMIHGCMPORT pInterface, int32_t result, PVBOXHGCMCMD pCmd) -
trunk/src/VBox/Devices/VMMDev/VMMDevState.h
r25966 r25985 52 52 PPDMDEVINSR3 pDevIns; 53 53 /** LUN\#0 + Status: VMMDev port base interface. */ 54 PDMIBASE Base;54 PDMIBASE IBase; 55 55 /** LUN\#0: VMMDev port interface. */ 56 PDMIVMMDEVPORT Port;56 PDMIVMMDEVPORT IPort; 57 57 #ifdef VBOX_WITH_HGCM 58 58 /** LUN\#0: HGCM port interface. */ 59 PDMIHGCMPORT HGCMPort;59 PDMIHGCMPORT IHGCMPort; 60 60 #endif 61 61 /** Pointer to base interface of the driver. */ -
trunk/src/VBox/Devices/VirtIO/Virtio.cpp
r25984 r25985 531 531 Assert(&pThis->IBase == pInterface); 532 532 533 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 534 return &pThis->IBase; 533 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase); 535 534 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds); 536 535 return NULL; -
trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp
r25946 r25985 275 275 GEN_CHECK_OFF(VGASTATE, pDevInsR0); 276 276 GEN_CHECK_OFF(VGASTATE, lock); 277 GEN_CHECK_OFF(VGASTATE, Base);278 GEN_CHECK_OFF(VGASTATE, Port);277 GEN_CHECK_OFF(VGASTATE, IBase); 278 GEN_CHECK_OFF(VGASTATE, IPort); 279 279 #if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL) 280 GEN_CHECK_OFF(VGASTATE, VBVACallbacks);280 GEN_CHECK_OFF(VGASTATE, IVBVACallbacks); 281 281 #endif 282 282 GEN_CHECK_OFF(VGASTATE, pDrvBase); … … 347 347 GEN_CHECK_OFF(KBDState, pDevInsR0); 348 348 GEN_CHECK_OFF(KBDState, pDevInsRC); 349 GEN_CHECK_OFF(KBDState, Keyboard. Base);350 GEN_CHECK_OFF(KBDState, Keyboard. Port);349 GEN_CHECK_OFF(KBDState, Keyboard.IBase); 350 GEN_CHECK_OFF(KBDState, Keyboard.IPort); 351 351 GEN_CHECK_OFF(KBDState, Keyboard.pDrvBase); 352 352 GEN_CHECK_OFF(KBDState, Keyboard.pDrv); 353 GEN_CHECK_OFF(KBDState, Mouse. Base);354 GEN_CHECK_OFF(KBDState, Mouse. Port);353 GEN_CHECK_OFF(KBDState, Mouse.IBase); 354 GEN_CHECK_OFF(KBDState, Mouse.IPort); 355 355 GEN_CHECK_OFF(KBDState, Mouse.pDrvBase); 356 356 GEN_CHECK_OFF(KBDState, Mouse.pDrv); -
trunk/src/VBox/Main/AudioSnifferInterface.cpp
r25984 r25985 124 124 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 125 125 PDRVAUDIOSNIFFER pDrv = PDMINS_2_DATA(pDrvIns, PDRVAUDIOSNIFFER); 126 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 127 return &pDrvIns->IBase; 126 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 128 127 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIAUDIOSNIFFERCONNECTOR, &pDrv->Connector); 129 128 return NULL; -
trunk/src/VBox/Main/ConsoleImpl.cpp
r25984 r25985 8130 8130 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 8131 8131 PDRVMAINSTATUS pThis = PDMINS_2_DATA(pDrvIns, PDRVMAINSTATUS); 8132 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 8133 return &pDrvIns->IBase; 8132 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 8134 8133 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDCONNECTORS, &pThis->ILedConnectors); 8135 8134 return NULL; -
trunk/src/VBox/Main/DisplayImpl.cpp
r25971 r25985 58 58 PPDMIDISPLAYPORT pUpPort; 59 59 /** Our display connector interface. */ 60 PDMIDISPLAYCONNECTOR Connector;60 PDMIDISPLAYCONNECTOR IConnector; 61 61 #if defined(VBOX_WITH_VIDEOHWACCEL) 62 62 /** VBVA callbacks */ … … 66 66 67 67 /** Converts PDMIDISPLAYCONNECTOR pointer to a DRVMAINDISPLAY pointer. */ 68 #define PDMIDISPLAYCONNECTOR_2_MAINDISPLAY(pInterface) RT_FROM_MEMBER(pInterface, DRVMAINDISPLAY, Connector)68 #define PDMIDISPLAYCONNECTOR_2_MAINDISPLAY(pInterface) RT_FROM_MEMBER(pInterface, DRVMAINDISPLAY, IConnector) 69 69 70 70 #ifdef DEBUG_sunlover … … 1001 1001 #ifdef DEBUG_sunlover 1002 1002 LogFlowFunc (("%d,%d %dx%d (%d,%d)\n", 1003 x, y, w, h, mpDrv-> Connector.cx, mpDrv->Connector.cy));1003 x, y, w, h, mpDrv->IConnector.cx, mpDrv->IConnector.cy)); 1004 1004 #endif /* DEBUG_sunlover */ 1005 1005 … … 1019 1019 1020 1020 if (uScreenId == VBOX_VIDEO_PRIMARY_SCREEN) 1021 checkCoordBounds (&x, &y, &w, &h, mpDrv-> Connector.cx, mpDrv->Connector.cy);1021 checkCoordBounds (&x, &y, &w, &h, mpDrv->IConnector.cx, mpDrv->IConnector.cy); 1022 1022 else 1023 1023 checkCoordBounds (&x, &y, &w, &h, maFramebuffers[uScreenId].w, … … 1947 1947 CHECK_CONSOLE_DRV (mpDrv); 1948 1948 1949 *width = mpDrv-> Connector.cx;1949 *width = mpDrv->IConnector.cx; 1950 1950 1951 1951 return S_OK; … … 1969 1969 CHECK_CONSOLE_DRV (mpDrv); 1970 1970 1971 *height = mpDrv-> Connector.cy;1971 *height = mpDrv->IConnector.cy; 1972 1972 1973 1973 return S_OK; … … 2083 2083 ULONG width = aWidth; 2084 2084 if (!width) 2085 width = mpDrv-> Connector.cx;2085 width = mpDrv->IConnector.cx; 2086 2086 ULONG height = aHeight; 2087 2087 if (!height) 2088 height = mpDrv-> Connector.cy;2088 height = mpDrv->IConnector.cy; 2089 2089 ULONG bpp = aBitsPerPixel; 2090 2090 if (!bpp) … … 2613 2613 } 2614 2614 2615 mpDrv-> Connector.pu8Data = (uint8_t *) address;2616 mpDrv-> Connector.cbScanline = bytesPerLine;2617 mpDrv-> Connector.cBits = bitsPerPixel;2618 mpDrv-> Connector.cx = width;2619 mpDrv-> Connector.cy = height;2615 mpDrv->IConnector.pu8Data = (uint8_t *) address; 2616 mpDrv->IConnector.cbScanline = bytesPerLine; 2617 mpDrv->IConnector.cBits = bitsPerPixel; 2618 mpDrv->IConnector.cx = width; 2619 mpDrv->IConnector.cy = height; 2620 2620 } 2621 2621 else 2622 2622 { 2623 2623 /* black hole */ 2624 mpDrv-> Connector.pu8Data = NULL;2625 mpDrv-> Connector.cbScanline = 0;2626 mpDrv-> Connector.cBits = 0;2627 mpDrv-> Connector.cx = 0;2628 mpDrv-> Connector.cy = 0;2624 mpDrv->IConnector.pu8Data = NULL; 2625 mpDrv->IConnector.cbScanline = 0; 2626 mpDrv->IConnector.cBits = 0; 2627 mpDrv->IConnector.cx = 0; 2628 mpDrv->IConnector.cy = 0; 2629 2629 } 2630 2630 } … … 2780 2780 if (!pFBInfo->pFramebuffer.isNull() && pFBInfo->u32ResizeStatus == ResizeStatus_Void) 2781 2781 { 2782 Assert(pDrv-> Connector.pu8Data);2782 Assert(pDrv->IConnector.pu8Data); 2783 2783 pDisplay->vbvaLock(); 2784 2784 pDrv->pUpPort->pfnUpdateDisplay(pDrv->pUpPort); … … 2841 2841 if (!pFBInfo->pFramebuffer.isNull()) 2842 2842 { 2843 Assert(pDrv-> Connector.pu8Data);2843 Assert(pDrv->IConnector.pu8Data); 2844 2844 Assert(pFBInfo->u32ResizeStatus == ResizeStatus_Void); 2845 2845 pDrv->pUpPort->pfnUpdateDisplay(pDrv->pUpPort); … … 3369 3369 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 3370 3370 PDRVMAINDISPLAY pDrv = PDMINS_2_DATA(pDrvIns, PDRVMAINDISPLAY); 3371 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 3372 return &pDrvIns->IBase; 3373 if (RTUuidCompare2Strs(pszIID, PDMIDISPLAYCONNECTOR_IID) == 0) 3374 return &pDrv->Connector; 3371 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 3372 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIDISPLAYCONNECTOR, &pDrv->IConnector); 3375 3373 return NULL; 3376 3374 } … … 3423 3421 * Init Interfaces. 3424 3422 */ 3425 pDrvIns->IBase.pfnQueryInterface = Display::drvQueryInterface;3426 3427 pData-> Connector.pfnResize = Display::displayResizeCallback;3428 pData-> Connector.pfnUpdateRect = Display::displayUpdateCallback;3429 pData-> Connector.pfnRefresh = Display::displayRefreshCallback;3430 pData-> Connector.pfnReset = Display::displayResetCallback;3431 pData-> Connector.pfnLFBModeChange = Display::displayLFBModeChangeCallback;3432 pData-> Connector.pfnProcessAdapterData = Display::displayProcessAdapterDataCallback;3433 pData-> Connector.pfnProcessDisplayData = Display::displayProcessDisplayDataCallback;3423 pDrvIns->IBase.pfnQueryInterface = Display::drvQueryInterface; 3424 3425 pData->IConnector.pfnResize = Display::displayResizeCallback; 3426 pData->IConnector.pfnUpdateRect = Display::displayUpdateCallback; 3427 pData->IConnector.pfnRefresh = Display::displayRefreshCallback; 3428 pData->IConnector.pfnReset = Display::displayResetCallback; 3429 pData->IConnector.pfnLFBModeChange = Display::displayLFBModeChangeCallback; 3430 pData->IConnector.pfnProcessAdapterData = Display::displayProcessAdapterDataCallback; 3431 pData->IConnector.pfnProcessDisplayData = Display::displayProcessDisplayDataCallback; 3434 3432 #ifdef VBOX_WITH_VIDEOHWACCEL 3435 pData-> Connector.pfnVHWACommandProcess = Display::displayVHWACommandProcess;3433 pData->IConnector.pfnVHWACommandProcess = Display::displayVHWACommandProcess; 3436 3434 #endif 3437 3435 #ifdef VBOX_WITH_HGSMI 3438 pData-> Connector.pfnVBVAEnable = Display::displayVBVAEnable;3439 pData-> Connector.pfnVBVADisable = Display::displayVBVADisable;3440 pData-> Connector.pfnVBVAUpdateBegin = Display::displayVBVAUpdateBegin;3441 pData-> Connector.pfnVBVAUpdateProcess = Display::displayVBVAUpdateProcess;3442 pData-> Connector.pfnVBVAUpdateEnd = Display::displayVBVAUpdateEnd;3443 pData-> Connector.pfnVBVAResize = Display::displayVBVAResize;3444 pData-> Connector.pfnVBVAMousePointerShape = Display::displayVBVAMousePointerShape;3436 pData->IConnector.pfnVBVAEnable = Display::displayVBVAEnable; 3437 pData->IConnector.pfnVBVADisable = Display::displayVBVADisable; 3438 pData->IConnector.pfnVBVAUpdateBegin = Display::displayVBVAUpdateBegin; 3439 pData->IConnector.pfnVBVAUpdateProcess = Display::displayVBVAUpdateProcess; 3440 pData->IConnector.pfnVBVAUpdateEnd = Display::displayVBVAUpdateEnd; 3441 pData->IConnector.pfnVBVAResize = Display::displayVBVAResize; 3442 pData->IConnector.pfnVBVAMousePointerShape = Display::displayVBVAMousePointerShape; 3445 3443 #endif 3446 3444 -
trunk/src/VBox/Main/KeyboardImpl.cpp
r25971 r25985 48 48 PPDMIKEYBOARDPORT pUpPort; 49 49 /** Our mouse connector interface. */ 50 PDMIKEYBOARDCONNECTOR Connector;50 PDMIKEYBOARDCONNECTOR IConnector; 51 51 } DRVMAINKEYBOARD, *PDRVMAINKEYBOARD; 52 52 53 53 /** Converts PDMIVMMDEVCONNECTOR pointer to a DRVMAINVMMDEV pointer. */ 54 #define PPDMIKEYBOARDCONNECTOR_2_MAINKEYBOARD(pInterface) ( (PDRVMAINKEYBOARD) ((uintptr_t)pInterface - RT_OFFSETOF(DRVMAINKEYBOARD, Connector)) )54 #define PPDMIKEYBOARDCONNECTOR_2_MAINKEYBOARD(pInterface) ( (PDRVMAINKEYBOARD) ((uintptr_t)pInterface - RT_OFFSETOF(DRVMAINKEYBOARD, IConnector)) ) 55 55 56 56 … … 225 225 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 226 226 PDRVMAINKEYBOARD pDrv = PDMINS_2_DATA(pDrvIns, PDRVMAINKEYBOARD); 227 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 228 return &pDrvIns->IBase; 229 if (RTUuidCompare2Strs(pszIID, PDMIKEYBOARDCONNECTOR_IID) == 0) 230 return &pDrv->Connector; 227 228 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 229 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIKEYBOARDCONNECTOR, &pDrv->IConnector); 231 230 return NULL; 232 231 } … … 283 282 pDrvIns->IBase.pfnQueryInterface = Keyboard::drvQueryInterface; 284 283 285 pData-> Connector.pfnLedStatusChange= keyboardLedStatusChange;284 pData->IConnector.pfnLedStatusChange = keyboardLedStatusChange; 286 285 287 286 /* -
trunk/src/VBox/Main/MouseImpl.cpp
r25969 r25985 43 43 PPDMIMOUSEPORT pUpPort; 44 44 /** Our mouse connector interface. */ 45 PDMIMOUSECONNECTOR Connector;45 PDMIMOUSECONNECTOR IConnector; 46 46 } DRVMAINMOUSE, *PDRVMAINMOUSE; 47 47 … … 360 360 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 361 361 PDRVMAINMOUSE pDrv = PDMINS_2_DATA(pDrvIns, PDRVMAINMOUSE); 362 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 363 return &pDrvIns->IBase; 364 if (RTUuidCompare2Strs(pszIID, PDMIMOUSECONNECTOR_IID) == 0) 365 return &pDrv->Connector; 362 363 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 364 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMOUSECONNECTOR, &pDrv->IConnector); 366 365 return NULL; 367 366 } -
trunk/src/VBox/Main/VMMDevInterface.cpp
r25984 r25985 659 659 PDRVMAINVMMDEV pDrv = PDMINS_2_DATA(pDrvIns, PDRVMAINVMMDEV); 660 660 661 if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0) 662 return &pDrvIns->IBase; 661 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase); 663 662 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIVMMDEVCONNECTOR, &pDrv->Connector); 664 663 #ifdef VBOX_WITH_HGCM
Note:
See TracChangeset
for help on using the changeset viewer.