IOPMAssertionCreate

Function IOPMAssertionCreate 

Source
pub unsafe extern "C-unwind" fn IOPMAssertionCreate(
    assertion_type: Option<&CFString>,
    assertion_level: IOPMAssertionLevel,
    assertion_id: *mut IOPMAssertionID,
) -> IOReturn
๐Ÿ‘ŽDeprecated
Available on crate feature pwr_mgt only.
Expand description

This is a deprecated call to create a power assertion.

 IOPMAssertionCreateWithProperties
. Please use that version of this API instead.

No special privileges necessary to make this call - any process may activate a power assertion.

Parameter AssertionType: The CFString assertion type to request from the PM system.

Parameter AssertionLevel: Pass kIOPMAssertionLevelOn or kIOPMAssertionLevelOff.

Parameter AssertionID: On success, a unique id will be returned in this parameter.

Returns: Returns kIOReturnSuccess on success, any other return indicates PM could not successfully activate the specified assertion.

ยงSafety

  • assertion_type might not allow None.
  • assertion_id must be a valid pointer.