VirtualBox

Ignore:
Timestamp:
Jan 22, 2010 11:15:43 AM (15 years ago)
Author:
vboxsync
Message:

PDMIBASE refactoring; use UUID as interface IDs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/audio.c

    r25893 r25966  
    19261926
    19271927/**
    1928  * Queries an interface to the driver.
    1929  *
    1930  * @returns Pointer to interface.
    1931  * @returns NULL if the interface was not supported by the driver.
    1932  * @param   pInterface          Pointer to this interface structure.
    1933  * @param   enmInterface        The requested interface identification.
    1934  * @thread  Any thread.
     1928 * @interface_method_impl{PDMIBASE,pfnQueryInterface}
    19351929 */
    1936 static DECLCALLBACK(void *) drvAudioQueryInterface(PPDMIBASE pInterface,
    1937                                                    PDMINTERFACE enmInterface)
     1930static DECLCALLBACK(void *) drvAudioQueryInterface(PPDMIBASE pInterface, const char *pszIID)
    19381931{
    19391932    PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
    1940     PDRVAUDIO  pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIO);
    1941     switch (enmInterface)
    1942     {
    1943         case PDMINTERFACE_BASE:
    1944             return &pDrvIns->IBase;
    1945         case PDMINTERFACE_AUDIO_CONNECTOR:
    1946             return &pThis->IAudioConnector;
    1947         default:
    1948             return NULL;
    1949     }
     1933    PDRVAUDIO  pThis   = PDMINS_2_DATA(pDrvIns, PDRVAUDIO);
     1934    if (RTUuidCompare2Strs(pszIID, PDMIBASE_IID) == 0)
     1935        return &pDrvIns->IBase;
     1936    if (RTUuidCompare2Strs(pszIID, PDMINTERFACE_AUDIO_CONNECTOR) == 0)
     1937        return &pThis->IAudioConnector;
     1938    return NULL;
    19501939}
    19511940
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