VirtualBox

Changeset 25985 in vbox


Ignore:
Timestamp:
Jan 23, 2010 12:51:04 AM (15 years ago)
Author:
vboxsync
Message:

pdmifs.h: the final batch of refactored interface ID code.

Location:
trunk/src/VBox
Files:
50 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevIchAc97.cpp

    r25966 r25985  
    15461546    Assert(&pThis->ac97.IBase == pInterface);
    15471547
    1548     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    1549         return &pThis->ac97.IBase;
     1548    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->ac97.IBase);
    15501549    return NULL;
    15511550}
  • trunk/src/VBox/Devices/Audio/DevSB16.cpp

    r25966 r25985  
    17811781    Assert(&pThis->IBase == pInterface);
    17821782
    1783     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    1784         return &pThis->IBase;
     1783    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase);
    17851784    return NULL;
    17861785}
  • trunk/src/VBox/Devices/Audio/audio.c

    r25984 r25985  
    19351935    PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
    19361936    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);
    19391938    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIAUDIOCONNECTOR, &pThis->IAudioConnector);
    19401939    return NULL;
  • trunk/src/VBox/Devices/Audio/audiosniffer.c

    r25984 r25985  
    4949
    5050    /** Audio Sniffer port base interface. */
    51     PDMIBASE                     Base;
     51    PDMIBASE                     IBase;
    5252    /** Audio Sniffer port interface. */
    53     PDMIAUDIOSNIFFERPORT         Port;
     53    PDMIAUDIOSNIFFERPORT         IPort;
    5454
    5555    /** Pointer to base interface of the driver. */
     
    109109static DECLCALLBACK(int) iface_Setup (PPDMIAUDIOSNIFFERPORT pInterface, bool fEnable, bool fKeepHostAudio)
    110110{
    111     AUDIOSNIFFERSTATE *pThis = RT_FROM_MEMBER(pInterface, AUDIOSNIFFERSTATE, Port);
     111    AUDIOSNIFFERSTATE *pThis = RT_FROM_MEMBER(pInterface, AUDIOSNIFFERSTATE, IPort);
    112112
    113113    Assert(g_pData == pThis);
     
    124124static DECLCALLBACK(void *) iface_QueryInterface(PPDMIBASE pInterface, const char *pszIID)
    125125{
    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);
    130129    return NULL;
    131130}
     
    171170     */
    172171    /* Base */
    173     pThis->Base.pfnQueryInterface = iface_QueryInterface;
     172    pThis->IBase.pfnQueryInterface = iface_QueryInterface;
    174173
    175174    /* Audio Sniffer port */
    176     pThis->Port.pfnSetup = iface_Setup;
     175    pThis->IPort.pfnSetup = iface_Setup;
    177176
    178177    /*
    179178     * Get the corresponding connector interface
    180179     */
    181     rc = PDMDevHlpDriverAttach(pDevIns, 0, &pThis->Base, &pThis->pDrvBase, "Audio Sniffer Port");
     180    rc = PDMDevHlpDriverAttach(pDevIns, 0, &pThis->IBase, &pThis->pDrvBase, "Audio Sniffer Port");
    182181
    183182    if (RT_SUCCESS(rc))
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r25971 r25985  
    47384738static DECLCALLBACK(void *) vgaPortQueryInterface(PPDMIBASE pInterface, const char *pszIID)
    47394739{
    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);
    47454743#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);
    47484745#endif
    47494746    return NULL;
     
    48054802
    48064803/** 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)) )
    48084805
    48094806
     
    57255722        case 0:
    57265723        {
    5727             int rc = PDMDevHlpDriverAttach(pDevIns, iLUN, &pThis->Base, &pThis->pDrvBase, "Display Port");
     5724            int rc = PDMDevHlpDriverAttach(pDevIns, iLUN, &pThis->IBase, &pThis->pDrvBase, "Display Port");
    57285725            if (RT_SUCCESS(rc))
    57295726            {
     
    59325929
    59335930    /* 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;
    59455942
    59465943#if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL)
    5947     pThis->VBVACallbacks.pfnVHWACommandCompleteAsynch = vbvaVHWACommandCompleteAsynch;
     5944    pThis->IVBVACallbacks.pfnVHWACommandCompleteAsynch = vbvaVHWACommandCompleteAsynch;
    59485945#endif
    59495946
  • trunk/src/VBox/Devices/Graphics/DevVGA.h

    r25971 r25985  
    304304
    305305    /** LUN\#0: The display port base interface. */
    306     PDMIBASE                    Base;
     306    PDMIBASE                    IBase;
    307307    /** LUN\#0: The display port interface. */
    308     PDMIDISPLAYPORT             Port;
     308    PDMIDISPLAYPORT             IPort;
    309309# if HC_ARCH_BITS == 32
    310310    uint32_t                    Padding8;
     
    312312#if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL)
    313313    /** LUN\#0: VBVA callbacks interface */
    314     PDMIDISPLAYVBVACALLBACKS    VBVACallbacks;
     314    PDMIDISPLAYVBVACALLBACKS    IVBVACallbacks;
    315315#else
    316316# if HC_ARCH_BITS == 32
  • trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp

    r25971 r25985  
    11771177}
    11781178
    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)) )
    11801180
    11811181int vbvaVHWACommandCompleteAsynch(PPDMIDISPLAYVBVACALLBACKS pInterface, PVBOXVHWACMD pCmd)
  • trunk/src/VBox/Devices/Input/DevPS2.cpp

    r25971 r25985  
    229229    {
    230230        /** The base interface for the keyboard port. */
    231         PDMIBASE                            Base;
     231        PDMIBASE                            IBase;
    232232        /** The keyboard port base interface. */
    233         PDMIKEYBOARDPORT                    Port;
     233        PDMIKEYBOARDPORT                    IPort;
    234234
    235235        /** The base interface of the attached keyboard driver. */
     
    248248    {
    249249        /** The base interface for the mouse port. */
    250         PDMIBASE                            Base;
     250        PDMIBASE                            IBase;
    251251        /** The mouse port base interface. */
    252         PDMIMOUSEPORT                       Port;
     252        PDMIMOUSEPORT                       IPort;
    253253
    254254        /** The base interface of the attached mouse driver. */
     
    13601360static DECLCALLBACK(void *)  kbdKeyboardQueryInterface(PPDMIBASE pInterface, const char *pszIID)
    13611361{
    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);
    13671365    return NULL;
    13681366}
     
    13751373 *
    13761374 * @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).
    13781376 * @param   u8KeyCode       The keycode.
    13791377 */
    13801378static DECLCALLBACK(int) kbdKeyboardPutEvent(PPDMIKEYBOARDPORT pInterface, uint8_t u8KeyCode)
    13811379{
    1382     KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Keyboard.Port);
     1380    KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Keyboard.IPort);
    13831381    int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
    13841382    AssertReleaseRC(rc);
     
    13981396static DECLCALLBACK(void *)  kbdMouseQueryInterface(PPDMIBASE pInterface, const char *pszIID)
    13991397{
    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);
    14051401    return NULL;
    14061402}
     
    14131409 *
    14141410 * @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).
    14161412 * @param   i32DeltaX       The X delta.
    14171413 * @param   i32DeltaY       The Y delta.
     
    14211417static DECLCALLBACK(int) kbdMousePutEvent(PPDMIMOUSEPORT pInterface, int32_t i32DeltaX, int32_t i32DeltaY, int32_t i32DeltaZ, int32_t i32DeltaW, uint32_t fButtonStates)
    14221418{
    1423     KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Mouse.Port);
     1419    KBDState *pThis = RT_FROM_MEMBER(pInterface, KBDState, Mouse.IPort);
    14241420    int rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY);
    14251421    AssertReleaseRC(rc);
     
    14641460        /* LUN #0: keyboard */
    14651461        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");
    14671463            if (RT_SUCCESS(rc))
    14681464            {
     
    14851481        /* LUN #1: aux/mouse */
    14861482        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");
    14881484            if (RT_SUCCESS(rc))
    14891485            {
     
    16231619    pThis->pDevInsR0 = PDMDEVINS_2_R0PTR(pDevIns);
    16241620    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;
    16301626
    16311627    /*
  • trunk/src/VBox/Devices/Input/DrvKeyboardQueue.cpp

    r25971 r25985  
    5151    PPDMIKEYBOARDCONNECTOR      pDownConnector;
    5252    /** Our keyboard connector interface. */
    53     PDMIKEYBOARDCONNECTOR       Connector;
     53    PDMIKEYBOARDCONNECTOR       IConnector;
    5454    /** Our keyboard port interface. */
    55     PDMIKEYBOARDPORT            Port;
     55    PDMIKEYBOARDPORT            IPort;
    5656    /** The queue handle. */
    5757    PPDMQUEUE                   pQueue;
     
    8585    PDRVKBDQUEUE    pThis   = PDMINS_2_DATA(pDrvIns, PDRVKBDQUEUE);
    8686
    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);
    9390    return NULL;
    9491}
     
    9794/* -=-=-=-=- IKeyboardPort -=-=-=-=- */
    9895
    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)) )
    10198
    10299
     
    128125
    129126
    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)) )
    133130
    134131
     
    255252    pDrvIns->IBase.pfnQueryInterface        = drvKbdQueueQueryInterface;
    256253    /* IKeyboardConnector. */
    257     pDrv->Connector.pfnLedStatusChange      = drvKbdPassThruLedsChange;
     254    pDrv->IConnector.pfnLedStatusChange     = drvKbdPassThruLedsChange;
    258255    /* IKeyboardPort. */
    259     pDrv->Port.pfnPutEvent                  = drvKbdQueuePutEvent;
     256    pDrv->IPort.pfnPutEvent                 = drvKbdQueuePutEvent;
    260257
    261258    /*
  • trunk/src/VBox/Devices/Input/DrvMouseQueue.cpp

    r25969 r25985  
    5151    PPDMIMOUSECONNECTOR         pDownConnector;
    5252    /** Our mouse connector interface. */
    53     PDMIMOUSECONNECTOR          Connector;
     53    PDMIMOUSECONNECTOR          IConnector;
    5454    /** Our mouse port interface. */
    55     PDMIMOUSEPORT               Port;
     55    PDMIMOUSEPORT               IPort;
    5656    /** The queue handle. */
    5757    PPDMQUEUE                   pQueue;
     
    8787    PPDMDRVINS      pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
    8888    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);
    9592    return NULL;
    9693}
     
    10097
    10198/** 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)) )
    103100
    104101
     
    244241    pDrvIns->IBase.pfnQueryInterface        = drvMouseQueueQueryInterface;
    245242    /* IMousePort. */
    246     pDrv->Port.pfnPutEvent                  = drvMouseQueuePutEvent;
     243    pDrv->IPort.pfnPutEvent                 = drvMouseQueuePutEvent;
    247244
    248245    /*
  • trunk/src/VBox/Devices/Network/DevE1000.cpp

    r25984 r25985  
    44674467    Assert(&pThis->IBase == pInterface);
    44684468
    4469     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    4470         return &pThis->IBase;
     4469    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase);
    44714470    PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKPORT, &pThis->INetworkPort);
    44724471    PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONFIG, &pThis->INetworkConfig);
  • trunk/src/VBox/Devices/Network/DevINIP.cpp

    r25981 r25985  
    397397{
    398398    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);
    401400    PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKPORT, &pThis->INetworkPort);
    402401    return NULL;
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r25984 r25985  
    44874487    PCNetState *pThis = RT_FROM_MEMBER(pInterface, PCNetState, IBase);
    44884488    Assert(&pThis->IBase == pInterface);
    4489     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    4490         return &pThis->IBase;
     4489    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase);
    44914490    PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKPORT, &pThis->INetworkPort);
    44924491    PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONFIG, &pThis->INetworkConfig);
  • trunk/src/VBox/Devices/Network/DrvIntNet.cpp

    r25981 r25985  
    586586    PDRVINTNET pThis   = PDMINS_2_DATA(pDrvIns, PDRVINTNET);
    587587
    588     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    589         return &pDrvIns->IBase;
     588    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
    590589    PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONNECTOR, &pThis->INetworkConnector);
    591590    return NULL;
  • trunk/src/VBox/Devices/Network/DrvNAT.cpp

    r25981 r25985  
    813813    PDRVNAT     pThis = PDMINS_2_DATA(pDrvIns, PDRVNAT);
    814814
    815     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    816         return &pDrvIns->IBase;
     815    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
    817816    PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONNECTOR, &pThis->INetworkConnector);
    818817    return NULL;
  • trunk/src/VBox/Devices/Network/DrvNetSniffer.cpp

    r25981 r25985  
    258258    PPDMDRVINS      pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
    259259    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);
    262261    PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONNECTOR, &pThis->INetworkConnector);
    263262    PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKPORT, &pThis->INetworkPort);
  • trunk/src/VBox/Devices/Network/DrvTAP.cpp

    r25981 r25985  
    784784    PDRVTAP     pThis   = PDMINS_2_DATA(pDrvIns, PDRVTAP);
    785785
    786     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    787         return &pDrvIns->IBase;
     786    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
    788787    PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONNECTOR, &pThis->INetworkConnector);
    789788    return NULL;
  • trunk/src/VBox/Devices/PC/DevACPI.cpp

    r25984 r25985  
    19411941{
    19421942    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);
    19451944    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIACPIPORT, &pThis->IACPIPort);
    19461945    return NULL;
  • trunk/src/VBox/Devices/PC/DrvACPI.cpp

    r25984 r25985  
    8787{
    8888    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);
    9392    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIACPICONNECTOR, &pThis->IACPIConnector);
    9493    return NULL;
  • trunk/src/VBox/Devices/PC/DrvAcpiCpu.cpp

    r25966 r25985  
    4040{
    4141    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);
    4443    return NULL;
    4544}
  • trunk/src/VBox/Devices/Parallel/DevParallel.cpp

    r25984 r25985  
    656656{
    657657    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);
    660659    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTPARALLELPORT, &pThis->IHostParallelPort);
    661660    return NULL;
  • trunk/src/VBox/Devices/Parallel/DrvHostParallel.cpp

    r25984 r25985  
    9191    PDRVHOSTPARALLEL    pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL);
    9292
    93     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    94         return &pDrvIns->IBase;
     93    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
    9594    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHOSTPARALLELCONNECTOR, &pThis->IHostParallelConnector);
    9695    return NULL;
  • trunk/src/VBox/Devices/Serial/DevSerial.cpp

    r25971 r25985  
    738738{
    739739    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);
    744742    return NULL;
    745743}
  • trunk/src/VBox/Devices/Serial/DrvChar.cpp

    r25974 r25985  
    9999    PDRVCHAR    pThis = PDMINS_2_DATA(pDrvIns, PDRVCHAR);
    100100
    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);
    105103    return NULL;
    106104}
  • trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp

    r25971 r25985  
    179179    PDRVHOSTSERIAL  pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTSERIAL);
    180180
    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);
    185183    return NULL;
    186184}
  • trunk/src/VBox/Devices/Serial/DrvNamedPipe.cpp

    r25974 r25985  
    287287    PPDMDRVINS      pDrvIns = PDMIBASE_2_DRVINS(pInterface);
    288288    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);
    291290    PDMIBASE_RETURN_INTERFACE(pszIID, PDMISTREAM, &pThis->IStream);
    292291    return NULL;
  • trunk/src/VBox/Devices/Serial/DrvRawFile.cpp

    r25974 r25985  
    103103    PDRVRAWFILE pThis   = PDMINS_2_DATA(pDrvIns, PDRVRAWFILE);
    104104
    105     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    106         return &pDrvIns->IBase;
     105    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
    107106    PDMIBASE_RETURN_INTERFACE(pszIID, PDMISTREAM, &pThis->IStream);
    108107    return NULL;
  • trunk/src/VBox/Devices/Storage/DevAHCI.cpp

    r25984 r25985  
    23912391{
    23922392    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);
    23952394    PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds);
    23962395    return NULL;
     
    24032402{
    24042403    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);
    24072405    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCKPORT, &pAhciPort->IPort);
    24082406    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCKASYNCPORT, &pAhciPort->IPortAsync);
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r25984 r25985  
    52345234{
    52355235    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);
    52385237    PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds);
    52395238    return NULL;
     
    52785277{
    52795278    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);
    52825280    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCKPORT, &pIf->IPort);
    52835281    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMOUNTNOTIFY, &pIf->IMountNotify);
  • trunk/src/VBox/Devices/Storage/DevBusLogic.cpp

    r25984 r25985  
    23552355{
    23562356    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);
    23592358    PDMIBASE_RETURN_INTERFACE(pszIID, PDMISCSIPORT, &pDevice->ISCSIPort);
    23602359    PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pDevice->ILed);
     
    23882387{
    23892388    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);
    23922390    PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds);
    23932391    return NULL;
  • trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp

    r25984 r25985  
    42014201    PLSILOGICDEVICE pDevice = PDMIBASE_2_PLSILOGICDEVICE(pInterface);
    42024202
    4203     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    4204         return &pDevice->IBase;
     4203    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDevice->IBase);
    42054204    PDMIBASE_RETURN_INTERFACE(pszIID, PDMISCSIPORT, &pDevice->ISCSIPort);
    42064205    PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pDevice->ILed);
     
    42344233{
    42354234    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);
    42384236    PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds);
    42394237    return NULL;
  • trunk/src/VBox/Devices/Storage/DrvBlock.cpp

    r25974 r25985  
    658658    PDRVBLOCK   pThis = PDMINS_2_DATA(pDrvIns, PDRVBLOCK);
    659659
    660     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    661         return &pDrvIns->IBase;
     660    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
    662661    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCK, &pThis->IBlock);
    663662    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCKBIOS, pThis->fBiosVisible ? &pThis->IBlockBios : NULL);
  • trunk/src/VBox/Devices/Storage/DrvHostBase.cpp

    r25974 r25985  
    571571    PDRVHOSTBASE pThis   = PDMINS_2_DATA(pDrvIns, PDRVHOSTBASE);
    572572
    573     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    574         return &pDrvIns->IBase;
     573    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
    575574    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCK, &pThis->IBlock);
    576575    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCKBIOS, pThis->fBiosVisible ? &pThis->IBlockBios : NULL);
     
    721720                        rcDA = -2;
    722721                        DADiskUnmount(pThis->pDADisk, kDADiskUnmountOptionWhole, drvHostBaseDADoneCallback, &rcDA);
    723                         SInt32 rc32 = CFRunLoopRunInMode(MY_RUN_LOOP_MODE, 120.0, FALSE);
     722                        rc32 = CFRunLoopRunInMode(MY_RUN_LOOP_MODE, 120.0, FALSE);
    724723                        AssertMsg(rc32 == kCFRunLoopRunStopped, ("rc32=%RI32 (%RX32)\n", rc32, rc32));
    725724                        if (    rc32 == kCFRunLoopRunStopped
  • trunk/src/VBox/Devices/Storage/DrvMediaISO.cpp

    r25974 r25985  
    293293    PPDMDRVINS pDrvIns = PDMIBASE_2_DRVINS(pInterface);
    294294    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);
    297296    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMEDIA, &pThis->IMedia);
    298297    return NULL;
  • trunk/src/VBox/Devices/Storage/DrvRawImage.cpp

    r25974 r25985  
    344344    PDRVRAWIMAGE    pThis   = PDMINS_2_DATA(pDrvIns, PDRVRAWIMAGE);
    345345
    346     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    347         return &pDrvIns->IBase;
     346    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
    348347    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMEDIA, &pThis->IMedia);
    349348    return NULL;
  • trunk/src/VBox/Devices/Storage/DrvSCSI.cpp

    r25984 r25985  
    805805    PDRVSCSI    pThis   = PDMINS_2_DATA(pDrvIns, PDRVSCSI);
    806806
    807     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    808         return &pDrvIns->IBase;
     807    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
    809808    PDMIBASE_RETURN_INTERFACE(pszIID, PDMISCSICONNECTOR, &pThis->ISCSIConnector);
    810809    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCKPORT, &pThis->IPort);
  • trunk/src/VBox/Devices/Storage/DrvSCSIHost.cpp

    r25984 r25985  
    404404    PDRVSCSIHOST pThis   = PDMINS_2_DATA(pDrvIns, PDRVSCSIHOST);
    405405
    406     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    407         return &pDrvIns->IBase;
     406    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
    408407    PDMIBASE_RETURN_INTERFACE(pszIID, PDMISCSICONNECTOR, &pThis->ISCSIConnector);
    409408    return NULL;
  • trunk/src/VBox/Devices/Storage/DrvVD.cpp

    r25974 r25985  
    819819    PVBOXDISK   pThis   = PDMINS_2_DATA(pDrvIns, PVBOXDISK);
    820820
    821     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    822         return &pDrvIns->IBase;
     821    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
    823822    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMEDIA, &pThis->IMedia);
    824823    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMEDIAASYNC, pThis->fAsyncIOSupported ? &pThis->IMediaAsync : NULL);
  • trunk/src/VBox/Devices/Storage/fdc.c

    r25984 r25985  
    25032503{
    25042504    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);
    25072507    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBLOCKPORT, &pDrive->IPort);
    25082508    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMOUNTNOTIFY, &pDrive->IMountNotify);
     
    25402540    fdctrl_t *pThis = RT_FROM_MEMBER (pInterface, fdctrl_t, IBaseStatus);
    25412541
    2542     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    2543         return &pThis->IBaseStatus;
     2542    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBaseStatus);
    25442543    PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds);
    25452544    return NULL;
  • trunk/src/VBox/Devices/VMMDev/VMMDev.cpp

    r25984 r25985  
    18321832static DECLCALLBACK(void *) vmmdevPortQueryInterface(PPDMIBASE pInterface, const char *pszIID)
    18331833{
    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);
    18391838#ifdef VBOX_WITH_HGCM
    1840     PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHGCMPORT, &pThis->HGCMPort);
     1839    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIHGCMPORT, &pThis->IHGCMPort);
    18411840#endif
    18421841    /* Currently only for shared folders. */
     
    18671866
    18681867/** 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)) )
    18701869
    18711870
     
    24922491     * Interfaces
    24932492     */
    2494     /* Base */
    2495     pThis->Base.pfnQueryInterface         = vmmdevPortQueryInterface;
     2493    /* IBase */
     2494    pThis->IBase.pfnQueryInterface         = vmmdevPortQueryInterface;
    24962495
    24972496    /* 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;
    25112510
    25122511    /* Shared folder LED */
    2513     pThis->SharedFolders.Led.u32Magic     = PDMLED_MAGIC;
     2512    pThis->SharedFolders.Led.u32Magic      = PDMLED_MAGIC;
    25142513    pThis->SharedFolders.ILeds.pfnQueryStatusLed = vmmdevQueryStatusLed;
    25152514
    25162515#ifdef VBOX_WITH_HGCM
    25172516    /* HGCM port */
    2518     pThis->HGCMPort.pfnCompleted          = hgcmCompleted;
     2517    pThis->IHGCMPort.pfnCompleted          = hgcmCompleted;
    25192518#endif
    25202519
     
    25842583     * Get the corresponding connector interface
    25852584     */
    2586     rc = PDMDevHlpDriverAttach(pDevIns, 0, &pThis->Base, &pThis->pDrvBase, "VMM Driver Port");
     2585    rc = PDMDevHlpDriverAttach(pDevIns, 0, &pThis->IBase, &pThis->pDrvBase, "VMM Driver Port");
    25872586    if (RT_SUCCESS(rc))
    25882587    {
     
    26102609     */
    26112610    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");
    26132612    if (RT_SUCCESS(rc))
    26142613        pThis->SharedFolders.pLedsConnector = PDMIBASE_QUERY_INTERFACE(pBase, PDMILEDCONNECTORS);
  • trunk/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp

    r25778 r25985  
    17371737}
    17381738
    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)) )
    17401740
    17411741DECLCALLBACK(void) hgcmCompletedWorker (PPDMIHGCMPORT pInterface, int32_t result, PVBOXHGCMCMD pCmd)
  • trunk/src/VBox/Devices/VMMDev/VMMDevState.h

    r25966 r25985  
    5252    PPDMDEVINSR3 pDevIns;
    5353    /** LUN\#0 + Status: VMMDev port base interface. */
    54     PDMIBASE Base;
     54    PDMIBASE IBase;
    5555    /** LUN\#0: VMMDev port interface. */
    56     PDMIVMMDEVPORT Port;
     56    PDMIVMMDEVPORT IPort;
    5757#ifdef VBOX_WITH_HGCM
    5858    /** LUN\#0: HGCM port interface. */
    59     PDMIHGCMPORT HGCMPort;
     59    PDMIHGCMPORT IHGCMPort;
    6060#endif
    6161    /** Pointer to base interface of the driver. */
  • trunk/src/VBox/Devices/VirtIO/Virtio.cpp

    r25984 r25985  
    531531    Assert(&pThis->IBase == pInterface);
    532532
    533     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    534         return &pThis->IBase;
     533    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase);
    535534    PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds);
    536535    return NULL;
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp

    r25946 r25985  
    275275    GEN_CHECK_OFF(VGASTATE, pDevInsR0);
    276276    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);
    279279#if defined(VBOX_WITH_HGSMI) && defined(VBOX_WITH_VIDEOHWACCEL)
    280     GEN_CHECK_OFF(VGASTATE, VBVACallbacks);
     280    GEN_CHECK_OFF(VGASTATE, IVBVACallbacks);
    281281#endif
    282282    GEN_CHECK_OFF(VGASTATE, pDrvBase);
     
    347347    GEN_CHECK_OFF(KBDState, pDevInsR0);
    348348    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);
    351351    GEN_CHECK_OFF(KBDState, Keyboard.pDrvBase);
    352352    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);
    355355    GEN_CHECK_OFF(KBDState, Mouse.pDrvBase);
    356356    GEN_CHECK_OFF(KBDState, Mouse.pDrv);
  • trunk/src/VBox/Main/AudioSnifferInterface.cpp

    r25984 r25985  
    124124    PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
    125125    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);
    128127    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIAUDIOSNIFFERCONNECTOR, &pDrv->Connector);
    129128    return NULL;
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r25984 r25985  
    81308130    PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
    81318131    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);
    81348133    PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDCONNECTORS, &pThis->ILedConnectors);
    81358134    return NULL;
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r25971 r25985  
    5858    PPDMIDISPLAYPORT            pUpPort;
    5959    /** Our display connector interface. */
    60     PDMIDISPLAYCONNECTOR        Connector;
     60    PDMIDISPLAYCONNECTOR        IConnector;
    6161#if defined(VBOX_WITH_VIDEOHWACCEL)
    6262    /** VBVA callbacks */
     
    6666
    6767/** 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)
    6969
    7070#ifdef DEBUG_sunlover
     
    10011001#ifdef DEBUG_sunlover
    10021002    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));
    10041004#endif /* DEBUG_sunlover */
    10051005
     
    10191019
    10201020    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);
    10221022    else
    10231023        checkCoordBounds (&x, &y, &w, &h, maFramebuffers[uScreenId].w,
     
    19471947    CHECK_CONSOLE_DRV (mpDrv);
    19481948
    1949     *width = mpDrv->Connector.cx;
     1949    *width = mpDrv->IConnector.cx;
    19501950
    19511951    return S_OK;
     
    19691969    CHECK_CONSOLE_DRV (mpDrv);
    19701970
    1971     *height = mpDrv->Connector.cy;
     1971    *height = mpDrv->IConnector.cy;
    19721972
    19731973    return S_OK;
     
    20832083    ULONG width  = aWidth;
    20842084    if (!width)
    2085         width    = mpDrv->Connector.cx;
     2085        width    = mpDrv->IConnector.cx;
    20862086    ULONG height = aHeight;
    20872087    if (!height)
    2088         height   = mpDrv->Connector.cy;
     2088        height   = mpDrv->IConnector.cy;
    20892089    ULONG bpp    = aBitsPerPixel;
    20902090    if (!bpp)
     
    26132613        }
    26142614
    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;
    26202620    }
    26212621    else
    26222622    {
    26232623        /* 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;
    26292629    }
    26302630}
     
    27802780                if (!pFBInfo->pFramebuffer.isNull() && pFBInfo->u32ResizeStatus == ResizeStatus_Void)
    27812781                {
    2782                     Assert(pDrv->Connector.pu8Data);
     2782                    Assert(pDrv->IConnector.pu8Data);
    27832783                    pDisplay->vbvaLock();
    27842784                    pDrv->pUpPort->pfnUpdateDisplay(pDrv->pUpPort);
     
    28412841                if (!pFBInfo->pFramebuffer.isNull())
    28422842                {
    2843                     Assert(pDrv->Connector.pu8Data);
     2843                    Assert(pDrv->IConnector.pu8Data);
    28442844                    Assert(pFBInfo->u32ResizeStatus == ResizeStatus_Void);
    28452845                    pDrv->pUpPort->pfnUpdateDisplay(pDrv->pUpPort);
     
    33693369    PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
    33703370    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);
    33753373    return NULL;
    33763374}
     
    34233421     * Init Interfaces.
    34243422     */
    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;
    34343432#ifdef VBOX_WITH_VIDEOHWACCEL
    3435     pData->Connector.pfnVHWACommandProcess = Display::displayVHWACommandProcess;
     3433    pData->IConnector.pfnVHWACommandProcess = Display::displayVHWACommandProcess;
    34363434#endif
    34373435#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;
    34453443#endif
    34463444
  • trunk/src/VBox/Main/KeyboardImpl.cpp

    r25971 r25985  
    4848    PPDMIKEYBOARDPORT           pUpPort;
    4949    /** Our mouse connector interface. */
    50     PDMIKEYBOARDCONNECTOR       Connector;
     50    PDMIKEYBOARDCONNECTOR       IConnector;
    5151} DRVMAINKEYBOARD, *PDRVMAINKEYBOARD;
    5252
    5353/** 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)) )
    5555
    5656
     
    225225    PPDMDRVINS          pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
    226226    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);
    231230    return NULL;
    232231}
     
    283282    pDrvIns->IBase.pfnQueryInterface        = Keyboard::drvQueryInterface;
    284283
    285     pData->Connector.pfnLedStatusChange     = keyboardLedStatusChange;
     284    pData->IConnector.pfnLedStatusChange    = keyboardLedStatusChange;
    286285
    287286    /*
  • trunk/src/VBox/Main/MouseImpl.cpp

    r25969 r25985  
    4343    PPDMIMOUSEPORT              pUpPort;
    4444    /** Our mouse connector interface. */
    45     PDMIMOUSECONNECTOR          Connector;
     45    PDMIMOUSECONNECTOR          IConnector;
    4646} DRVMAINMOUSE, *PDRVMAINMOUSE;
    4747
     
    360360    PPDMDRVINS      pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
    361361    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);
    366365    return NULL;
    367366}
  • trunk/src/VBox/Main/VMMDevInterface.cpp

    r25984 r25985  
    659659    PDRVMAINVMMDEV  pDrv    = PDMINS_2_DATA(pDrvIns, PDRVMAINVMMDEV);
    660660
    661     if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
    662         return &pDrvIns->IBase;
     661    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pDrvIns->IBase);
    663662    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIVMMDEVCONNECTOR, &pDrv->Connector);
    664663#ifdef VBOX_WITH_HGCM
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette