2 * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: SDK Publish&Subscribe definitions of the
15 * HW Resource Manager for the Power State API.
20 #ifndef HWRMPOWERSTATESDKPSKEYS_H
21 #define HWRMPOWERSTATESDKPSKEYS_H
27 * @file hwrmpowerstatesdkpskeys.h
29 * The API provides the P&S power state keys that are updated by the HW Resource
30 * Manager Server. These keys provide up-to-date information on the charging
31 * status, battery level and battery state of the device. Any application may
32 * subscribe to these P&S keys that are updated to receive notifications of
33 * any change in state.
35 * This interface relies on the Publish and Subscribe (P&S) interface provided
36 * by Symbian. P&S is used by HW Resource Manager to globally publish the power
39 * The P&D UID is #KPSUidHWRMPowerState and following keys are provided:
40 * - #KHWRMBatteryLevel
41 * - #KHWRMBatteryStatus
42 * - #KHWRMChargingStatus
46 * P&S UID for all power state information keys provided by this API.
48 const TUid KPSUidHWRMPowerState = { 0x10205041 };
52 * P&S key to represent the battery level of the device. It can also be related
53 * to the number of battery bars displayed. This property is updated only when
54 * battery level changes. Valid values are defined by the enum #EPSHWRMBatteryLevel
55 * and range from -1 to 7. <br>
56 * If an error has occurred or the battery level has not yet been initialized,
57 * the enumeration value of #EBatteryLevelUnknown is used. In all other cases
58 * the battery level is used with level 0 being the lowest (battery empty) and
59 * level 7 the highest (battery full).
61 * @see EPSHWRMBatteryLevel
63 const TUint32 KHWRMBatteryLevel = 0x00000001;
66 * Battery level of device. Can be related to the number of battery bars
67 * displayed by the device.
69 enum EPSHWRMBatteryLevel
71 EBatteryLevelUnknown = -1, ///< Uninitialized or some other error
72 EBatteryLevelLevel0 = 0, ///< Lowest battery level
73 EBatteryLevelLevel1 = 1,
74 EBatteryLevelLevel2 = 2,
75 EBatteryLevelLevel3 = 3,
76 EBatteryLevelLevel4 = 4,
77 EBatteryLevelLevel5 = 5,
78 EBatteryLevelLevel6 = 6,
79 EBatteryLevelLevel7 = 7 ///< Highest battery level
84 * Battery status of device.
85 * This property may be updated to same status as previously, to indicate
86 * the note in question needs to be shown again.
88 * #EBatteryStatusLow update comes approximately ten times before
89 * battery is completely empty and it comes at approximately
90 * 10 minute intervals. If phone is in-call mode, update comes at
91 * approximately 1 minute intervals.
93 * #EBatteryStatusEmpty comes slightly before phone must power down
94 * automatically because of insufficient battery power.
96 * @see EPSHWRMBatteryStatus
98 const TUint32 KHWRMBatteryStatus = 0x00000002;
101 * Battery status of device.
103 enum EPSHWRMBatteryStatus
105 EBatteryStatusUnknown = -1, ///< Uninitialized or some other error
106 EBatteryStatusOk = 0, ///< This can also be used during charging
107 EBatteryStatusLow = 1, ///< Show note to user "Battery low"
108 EBatteryStatusEmpty = 2 ///< Show "recharge battery" note to user
112 * Charging status of device.
113 * This property is updated only when charging status changes.
115 * @see EPSHWRMChargingStatus
117 const TUint32 KHWRMChargingStatus = 0x00000003;
120 * Charging status of device.
122 enum EPSHWRMChargingStatus
124 EChargingStatusError = -1, ///< Some error has occurred when charger is connected or charging.
125 EChargingStatusNotConnected = 0, ///< Charger not connected/uninitialized
126 EChargingStatusCharging = 1, ///< Device is charging
127 EChargingStatusNotCharging = 2, ///< Charger is connected, device not charging
128 EChargingStatusAlmostComplete = 3, ///< Charging almost completed
129 EChargingStatusChargingComplete = 4, ///< Charging completed
130 EChargingStatusChargingContinued = 5 ///< Charging continued after brief interruption
134 #endif // HWRMPOWERSTATESDKPSKEYS_H