Function

IOPMCopyAssertionsStatus

Returns a list of available assertions and their system-wide levels.

Declaration

IOReturn IOPMCopyAssertionsStatus(CFDictionaryRef *AssertionsStatus);

Parameters

AssertionsStatus

On success, this returns a CFDictionary of all assertions currently available. The keys in the dictionary are the assertion types, and the value of each is a CFNumber that represents the aggregate level for that assertion. Caller must CFRelease() this dictionary when done.

Return Value

Returns kIOReturnSuccess on success.

Discussion

The system-wide level is the maximum of all individual assertions' levels.

See Also

Assertions

IOPMAssertionCopyProperties

Copies details about an IOPMAssertion

IOPMAssertionCreate

Dynamically requests a system behavior from the power management system.

Deprecated
IOPMAssertionCreateWithName

Dynamically requests a system behavior from the power management system.

IOPMAssertionCreateWithProperties

Creates an IOPMAssertion with more flexibility than IOPMAssertionCreateWithDescription.

IOPMAssertionDeclareUserActivity

Declares that the user is active on the system. This causes the display to power on and postpone display sleep up to the user's display sleep Energy Saver settings. If you prefer to hold the display awake for a longer period and you know how long you'd like to hold it, consider taking assertion kIOPMAssertionTypePreventUserIdleDisplaySleep using IOPMAssertionCreateWithDescription API instead.

IOPMAssertionRelease

Decrements the assertion's retain count.

IOPMAssertionRetain

Increments the assertion's retain count.

IOPMAssertionSetProperty

Sets a property in the assertion.

IOPMCopyAssertionsByProcess

Returns a dictionary listing all assertions, grouped by their owning process.