Name
sources, power.sources, kPMRPCPowerSources, kPMObservePowerSources — Known sources of power.
Synopsis
array of s power.sources( |
); |
Description
Known sources of power.
A computer may have multiple sources of power. Not all need be connected at any one time. Only major changes to power source state will trigger an observable update. This is a deliberate decision in order to reduce network traffic and avoid battery drain.
Security
sources can be requested by any authenticated client.
Unauthenticated clients are authorized using the uk.co.dssw.powermanager.power.sources right. By default, any local process can request sources.
Examples
Example 97. C: power.sources
CFMutableDictionaryRef myRequest = PMRequestCreate(kCFAllocatorDefault,kPMRPCPowerSources);
Example 98. Objective-C: power.sources
DSSWPMRequest* myRequest = [DSSWPMRequest requestWithRequest:kPMRPCPowerSources];
Example 99. AppleScript: power.sources
tell application "Power Manager Scripting"
set myResult to sources of Power
end tell