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

DECLINLINE ( PVDINTERFACEPARENTSTATE   ) 

Get parent state interface from opaque callback table.

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

Definition at line 1181 of file VBoxHDD.h.

References AssertMsgReturn, VDINTERFACEPARENTSTATE::cbSize, VDINTERFACEPARENTSTATE::enmInterface, NULL, and VDINTERFACETYPE_PARENTSTATE.

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

    PVDINTERFACEPARENTSTATE pInterfaceParentState = (PVDINTERFACEPARENTSTATE)pInterface->pCallbacks;

    /* Do basic checks. */
    AssertMsgReturn(   (pInterfaceParentState->cbSize == sizeof(VDINTERFACEPARENTSTATE))
                    && (pInterfaceParentState->enmInterface == VDINTERFACETYPE_PARENTSTATE),
                    ("A non parent state callback table attached to a parent state interface descriptor\n"), NULL);

    return pInterfaceParentState;
}


Generated by  Doxygen 1.6.0   Back to index