Contents

reportMediaState

Report the device's media state.

Declaration

virtual IOReturn reportMediaState(
 bool *mediaPresent,
 bool *changedState = 0) = 0;

Parameters

  • mediaPresent:

    Pointer to returned media state. True indicates media is present in the device; False indicates no media is present.

Overview

This method reports whether we have media in the drive or not, and whether the state has changed from the previously reported state.

A result of kIOReturnSuccess is always returned if the test for media is successful, regardless of media presence. The mediaPresent result should be used to determine whether media is present or not. A return other than kIOReturnSuccess indicates that the Transport Driver was unable to interrogate the device. In this error case, the outputs mediaState and changedState will *not* be stored.

See Also

Miscellaneous