IOPSGetProvidingPowerSourceType(CFTypeRef)

Indicates the power source the computer is currently drawing from.

Declaration

CFStringRef IOPSGetProvidingPowerSourceType(
   CFTypeRef snapshot);

Parameters

snapshot

The CFTypeRef returned by IOPSCopyPowerSourcesInfo()

Return Value

One of: CFSTR(kIOPMACPowerKey), CFSTR(kIOPMBatteryPowerKey), CFSTR(kIOPMUPSPowerKey)

Overview

Determines which power source is providing power.

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.

IOPSCopyPowerSourcesList

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

IOPSGetPowerSourceDescription

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

IOPSNotificationCreateRunLoopSource

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