hwrmpowerstatesdkpskeys.h File Reference

API published in: S60 3rd Ed

Capability Information

Required Capabilities

None



Detailed Description

The API provides the P&S power state keys that are updated by the HW Resource Manager Server.

These keys provide up-to-date information on the charging status, battery level and battery state of the device. Any application may subscribe to these P&S keys that are updated to receive notifications of any change in state.

This interface relies on the Publish and Subscribe (P&S) interface provided by Symbian. P&S is used by HW Resource Manager to globally publish the power state information.

The P&D UID is KPSUidHWRMPowerState and following keys are provided:

#include <e32std.h>

Go to the source code of this file.


Enumerations

enum   EPSHWRMBatteryLevel {
  EBatteryLevelUnknown = -1, EBatteryLevelLevel0 = 0, EBatteryLevelLevel1 = 1, EBatteryLevelLevel2 = 2,
  EBatteryLevelLevel3 = 3, EBatteryLevelLevel4 = 4, EBatteryLevelLevel5 = 5, EBatteryLevelLevel6 = 6,
  EBatteryLevelLevel7 = 7
}
  Battery level of device. More...
enum   EPSHWRMBatteryStatus { EBatteryStatusUnknown = -1, EBatteryStatusOk = 0, EBatteryStatusLow = 1, EBatteryStatusEmpty = 2 }
  Battery status of device. More...
enum   EPSHWRMChargingStatus {
  EChargingStatusError = -1, EChargingStatusNotConnected = 0, EChargingStatusCharging = 1, EChargingStatusNotCharging = 2,
  EChargingStatusAlmostComplete = 3, EChargingStatusChargingComplete = 4, EChargingStatusChargingContinued = 5
}
  Charging status of device. More...

Variables

const TUid  KPSUidHWRMPowerState = { 0x10205041 }
  P&S UID for all power state information keys provided by this API.
const TUint32  KHWRMBatteryLevel = 0x00000001
  P&S key to represent the battery level of the device.
const TUint32  KHWRMBatteryStatus = 0x00000002
  Battery status of device.
const TUint32  KHWRMChargingStatus = 0x00000003
  Charging status of device.

Enumeration Type Documentation

enum EPSHWRMBatteryLevel
 

Battery level of device.

Can be related to the number of battery bars displayed by the device.

Enumerator:
EBatteryLevelUnknown  Uninitialized or some other error.
EBatteryLevelLevel0  Lowest battery level.
EBatteryLevelLevel1 
EBatteryLevelLevel2 
EBatteryLevelLevel3 
EBatteryLevelLevel4 
EBatteryLevelLevel5 
EBatteryLevelLevel6 
EBatteryLevelLevel7  Highest battery level.
enum EPSHWRMBatteryStatus
 

Battery status of device.

Enumerator:
EBatteryStatusUnknown  Uninitialized or some other error.
EBatteryStatusOk  This can also be used during charging.
EBatteryStatusLow  Show note to user "Battery low".
EBatteryStatusEmpty  Show "recharge battery" note to user.
enum EPSHWRMChargingStatus
 

Charging status of device.

Enumerator:
EChargingStatusError  Some error has occurred when charger is connected or charging.
EChargingStatusNotConnected  Charger not connected/uninitialized.
EChargingStatusCharging  Device is charging.
EChargingStatusNotCharging  Charger is connected, device not charging.
EChargingStatusAlmostComplete  Charging almost completed.
EChargingStatusChargingComplete  Charging completed.
EChargingStatusChargingContinued  Charging continued after brief interruption.

Variable Documentation

const TUint32 KHWRMBatteryLevel = 0x00000001
 

P&S key to represent the battery level of the device.

It can also be related to the number of battery bars displayed. This property is updated only when battery level changes. Valid values are defined by the enum EPSHWRMBatteryLevel and range from -1 to 7.
If an error has occurred or the battery level has not yet been initialized, the enumeration value of EBatteryLevelUnknown is used. In all other cases the battery level is used with level 0 being the lowest (battery empty) and level 7 the highest (battery full).

See also:
EPSHWRMBatteryLevel
const TUint32 KHWRMBatteryStatus = 0x00000002
 

Battery status of device.

This property may be updated to same status as previously, to indicate the note in question needs to be shown again.

EBatteryStatusLow update comes approximately ten times before battery is completely empty and it comes at approximately 10 minute intervals. If phone is in-call mode, update comes at approximately 1 minute intervals.

EBatteryStatusEmpty comes slightly before phone must power down automatically because of insufficient battery power.

See also:
EPSHWRMBatteryStatus
const TUint32 KHWRMChargingStatus = 0x00000003
 

Charging status of device.

This property is updated only when charging status changes.

See also:
EPSHWRMChargingStatus
const TUid KPSUidHWRMPowerState = { 0x10205041 }
 

P&S UID for all power state information keys provided by this API.


Copyright © Nokia Corporation 2001-2008
Back to top