Mac Developer Library

Developer

IOPMPowerSource Class Reference

Options
Deployment Target:

On This Page
Language:

IOPMPowerSource

More...

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable @import Kernel;

Availability


Available in OS X v10.0 and later.
  • Creates a new IOPMPowerSource nub. Must be attached to IORegistry, and registered by provider.

    Declaration

    C++

    static IOPMPowerSource *powerSource( void);

    Import Statement

  • Declaration

    C++

    void setPSProperty( const OSSymbol *, OSObject *);

    Discussion

    All of these methods funnel through the generic accessor method setPSProperty. Caller can pass in any arbitrary OSSymbol key, and that value will be stored in the PM settings dictionary, and relayed onto the IORegistry at update time.

    Import Statement

  • Must be called by physical battery controller when battery state has changed significantly.

    Declaration

    C++

    virtual void updateStatus( void);

    Discussion

    The system will not poll this object for battery updates. Rather \ the battery's controller must call updateStatus() every time state changes \ and the settings will be relayed to higher levels of power management. \ The subclassing driver should override this only if the driver needs to add \ new settings to the base class.

    Import Statement

Instance Variables

  • Used by subclasses to determine if any settings have been modified via the accessors below since last call to update(). true is settings have changed; false otherwise.

    Declaration

    C++

    bool settingsChangedSinceUpdate;

  • Used by subclasses to determine if any settings have been modified via the accessors below since last call to update(). true is settings have changed; false otherwise.

    Declaration

    C++

    bool settingsChangedSinceUpdate;

  • Stores power source state

    Declaration

    C++

    OSDictionary *properties;