Function

IOPSCopyPowerSourcesList

Returns a CFArray of Power Source handles, each of type CFTypeRef.

Declaration

CFArrayRef IOPSCopyPowerSourcesList(CFTypeRef blob);

Parameters

blob

Takes the CFTypeRef returned by IOPSCopyPowerSourcesInfo()

Return Value

Returns NULL if errors were encountered, otherwise a CFArray of CFTypeRefs. Caller must CFRelease() the returned CFArrayRef.

Discussion

The caller shouldn't directly access the CFTypeRefs, but should use IOPSGetPowerSourceDescription on each member of the CFArrayRef.

See Also

Power Source Descriptions

IOPSCopyExternalPowerAdapterDetails

Returns a CFDictionary that describes the attached (AC) external power adapter (if any external power adapter is attached.

IOPSCopyPowerSourcesInfo

Returns a blob of Power Source information in an opaque CFTypeRef.

IOPSGetPowerSourceDescription

Returns a CFDictionary with readable information about the specific power source.

IOPSGetProvidingPowerSourceType(CFTypeRef)

Indicates the power source the computer is currently drawing from.

IOPSNotificationCreateRunLoopSource

Returns a CFRunLoopSourceRef that notifies the caller when power source information changes.