2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * The API provides the P&S power state keys that are updated by the HW Resource
16 * Manager Server. These keys provide up-to-date information on the charging
17 * status, battery level and battery state of the device. Any application may
18 * subscribe to these P&S keys that are updated to receive notifications of
19 * any change in state.
20 * This interface relies on the Publish and Subscribe (P&S) interface provided
21 * by Symbian. P&S is used by HW Resource Manager to globally publish the power
23 * The P&D UID is #KPSUidHWRMPowerState and following keys are provided:
24 * - #KHWRMBatteryLevel
25 * - #KHWRMBatteryStatus
26 * - #KHWRMChargingStatus
34 @file hwrmpowerstatesdkpskeys.h
39 #ifndef HWRMPOWERSTATESDKPSKEYS_H
40 #define HWRMPOWERSTATESDKPSKEYS_H
45 * P&S UID for all power state information keys provided by this API.
50 const TUid KPSUidHWRMPowerState = { 0x10205041 };
54 * P&S key to represent the battery level of the device. It can also be related
55 * to the number of battery bars displayed. This property is updated only when
56 * battery level changes. Valid values are defined by the enum EPSHWRMBatteryLevel
57 * and range from -1 to 7. <br>
58 * If an error has occurred or the battery level has not yet been initialized,
59 * the enumeration value of #EBatteryLevelUnknown is used. In all other cases
60 * the battery level is used with level 0 being the lowest (battery empty) and
61 * level 7 the highest (battery full).
63 * @see EPSHWRMBatteryLevel
68 const TUint32 KHWRMBatteryLevel = 0x00000001;
71 * Battery level of device. Can be related to the number of battery bars
72 * displayed by the device.
77 enum EPSHWRMBatteryLevel
80 Uninitialized or some other error
82 EBatteryLevelUnknown = -1,
84 Battery level 0. The lowest battery level.
86 EBatteryLevelLevel0 = 0,
90 EBatteryLevelLevel1 = 1,
94 EBatteryLevelLevel2 = 2,
98 EBatteryLevelLevel3 = 3,
102 EBatteryLevelLevel4 = 4,
106 EBatteryLevelLevel5 = 5,
110 EBatteryLevelLevel6 = 6,
112 Battery level 7. The highest battery level.
114 EBatteryLevelLevel7 = 7
119 * Battery status of device.
120 * This property may be updated to same status as previously, to indicate
121 * the note in question needs to be shown again.
123 * #EBatteryStatusLow update comes approximately ten times before
124 * battery is completely empty and it comes at approximately
125 * 10 minute intervals. If phone is in-call mode, update comes at
126 * approximately 1 minute intervals.
128 * #EBatteryStatusEmpty comes slightly before phone must power down
129 * automatically because of insufficient battery power.
131 * @see EPSHWRMBatteryStatus
136 const TUint32 KHWRMBatteryStatus = 0x00000002;
139 * Battery status of device.
144 enum EPSHWRMBatteryStatus
147 Uninitialized or some other error
149 EBatteryStatusUnknown = -1,
151 This can also be used during charging
153 EBatteryStatusOk = 0,
155 Show note to user "Battery low"
157 EBatteryStatusLow = 1,
159 Show "recharge battery" note to user
161 EBatteryStatusEmpty = 2
165 * Charging status of device.
166 * This property is updated only when charging status changes.
168 * @see EPSHWRMChargingStatus
173 const TUint32 KHWRMChargingStatus = 0x00000003;
176 * Charging status of device.
181 enum EPSHWRMChargingStatus
184 Some error has occurred when charger is connected or charging.
186 EChargingStatusError = -1,
188 Charger not connected/uninitialized
190 EChargingStatusNotConnected = 0,
194 EChargingStatusCharging = 1,
196 Charger is connected, device not charging
198 EChargingStatusNotCharging = 2,
200 Charging almost completed
202 EChargingStatusAlmostComplete = 3,
206 EChargingStatusChargingComplete = 4,
208 Charging continued after brief interruption
210 EChargingStatusChargingContinued = 5
214 #endif // HWRMPOWERSTATESDKPSKEYS_H