sources, power.sources, kPMRPCPowerSources, kPMObservePowerSources — Known sources of power.
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.
sources is an array of power source structures.
sources can be observed, without polling, using power.sources,
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
Example 103. C: power.sources
CFMutableDictionaryRef myRequest = PMRequestCreate(kCFAllocatorDefault,kPMRPCPowerSources);
Example 104. Objective-C: power.sources
DSSWPMRequest* myRequest = [DSSWPMRequest requestWithRequest:kPMRPCPowerSources];
Example 105. AppleScript: power.sources
tell application "Power Manager Scripting" set myResult to sources of Power end tell
Example 106. Shell: power.sources