Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

DECLINLINE ( PVDINTERFACEPROGRESS   ) 

Get progress interface from opaque callback table.

Returns:
Pointer to the callback table.
Parameters:
pInterface Pointer to the interface descriptor.

Definition at line 585 of file VBoxHDD-new.h.

References AssertMsgReturn, VDINTERFACEPROGRESS::cbSize, VDINTERFACEPROGRESS::enmInterface, NULL, and VDINTERFACETYPE_PROGRESS.

{
    /* Check that the interface descriptor is a progress interface. */
    AssertMsgReturn(   (pInterface->enmInterface == VDINTERFACETYPE_PROGRESS)
                    && (pInterface->cbSize == sizeof(VDINTERFACE)),
                    ("Not a progress interface"), NULL);


    PVDINTERFACEPROGRESS pInterfaceProgress = (PVDINTERFACEPROGRESS)pInterface->pCallbacks;

    /* Do basic checks. */
    AssertMsgReturn(   (pInterfaceProgress->cbSize == sizeof(VDINTERFACEPROGRESS))
                    && (pInterfaceProgress->enmInterface == VDINTERFACETYPE_PROGRESS),
                    ("A non progress callback table attached to a progress interface descriptor\n"), NULL);

    return pInterfaceProgress;
}


Generated by  Doxygen 1.6.0   Back to index