1.1 --- a/epoc32/include/hwrmpowerstatesdkpskeys.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/hwrmpowerstatesdkpskeys.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,49 +1,51 @@
1.4 /*
1.5 -* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
1.7 * All rights reserved.
1.8 * This component and the accompanying materials are made available
1.9 -* 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
1.10 +* under the terms of "Eclipse Public License v1.0"
1.11 * which accompanies this distribution, and is available
1.12 -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.13 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.14 *
1.15 * Initial Contributors:
1.16 * Nokia Corporation - initial contribution.
1.17 *
1.18 * Contributors:
1.19 *
1.20 -* Description: SDK Publish&Subscribe definitions of the
1.21 -* HW Resource Manager for the Power State API.
1.22 -*
1.23 -*/
1.24 -
1.25 -
1.26 -#ifndef HWRMPOWERSTATESDKPSKEYS_H
1.27 -#define HWRMPOWERSTATESDKPSKEYS_H
1.28 -
1.29 -// INCLUDES
1.30 -#include <e32std.h>
1.31 -
1.32 -/**
1.33 -* @file hwrmpowerstatesdkpskeys.h
1.34 -*
1.35 +* Description:
1.36 * The API provides the P&S power state keys that are updated by the HW Resource
1.37 * Manager Server. These keys provide up-to-date information on the charging
1.38 * status, battery level and battery state of the device. Any application may
1.39 * subscribe to these P&S keys that are updated to receive notifications of
1.40 * any change in state.
1.41 -*
1.42 * This interface relies on the Publish and Subscribe (P&S) interface provided
1.43 * by Symbian. P&S is used by HW Resource Manager to globally publish the power
1.44 * state information.
1.45 -*
1.46 * The P&D UID is #KPSUidHWRMPowerState and following keys are provided:
1.47 * - #KHWRMBatteryLevel
1.48 * - #KHWRMBatteryStatus
1.49 * - #KHWRMChargingStatus
1.50 +*
1.51 */
1.52
1.53 +
1.54 +
1.55 +
1.56 +/**
1.57 + @file hwrmpowerstatesdkpskeys.h
1.58 + @publishedAll
1.59 + @released
1.60 +*/
1.61 +
1.62 +#ifndef HWRMPOWERSTATESDKPSKEYS_H
1.63 +#define HWRMPOWERSTATESDKPSKEYS_H
1.64 +
1.65 +#include <e32std.h>
1.66 +
1.67 /**
1.68 * P&S UID for all power state information keys provided by this API.
1.69 +*
1.70 +* @publishedAll
1.71 +* @released
1.72 */
1.73 const TUid KPSUidHWRMPowerState = { 0x10205041 };
1.74
1.75 @@ -51,7 +53,7 @@
1.76 /**
1.77 * P&S key to represent the battery level of the device. It can also be related
1.78 * to the number of battery bars displayed. This property is updated only when
1.79 -* battery level changes. Valid values are defined by the enum #EPSHWRMBatteryLevel
1.80 +* battery level changes. Valid values are defined by the enum EPSHWRMBatteryLevel
1.81 * and range from -1 to 7. <br>
1.82 * If an error has occurred or the battery level has not yet been initialized,
1.83 * the enumeration value of #EBatteryLevelUnknown is used. In all other cases
1.84 @@ -59,24 +61,57 @@
1.85 * level 7 the highest (battery full).
1.86 *
1.87 * @see EPSHWRMBatteryLevel
1.88 +*
1.89 +* @publishedAll
1.90 +* @released
1.91 */
1.92 const TUint32 KHWRMBatteryLevel = 0x00000001;
1.93
1.94 /**
1.95 * Battery level of device. Can be related to the number of battery bars
1.96 * displayed by the device.
1.97 +*
1.98 +* @publishedAll
1.99 +* @released
1.100 */
1.101 enum EPSHWRMBatteryLevel
1.102 {
1.103 - EBatteryLevelUnknown = -1, ///< Uninitialized or some other error
1.104 - EBatteryLevelLevel0 = 0, ///< Lowest battery level
1.105 + /**
1.106 + Uninitialized or some other error
1.107 + */
1.108 + EBatteryLevelUnknown = -1,
1.109 + /**
1.110 + Battery level 0. The lowest battery level.
1.111 + */
1.112 + EBatteryLevelLevel0 = 0,
1.113 + /**
1.114 + Battery level 1.
1.115 + */
1.116 EBatteryLevelLevel1 = 1,
1.117 + /**
1.118 + Battery level 2.
1.119 + */
1.120 EBatteryLevelLevel2 = 2,
1.121 + /**
1.122 + Battery level 3.
1.123 + */
1.124 EBatteryLevelLevel3 = 3,
1.125 + /**
1.126 + Battery level 4.
1.127 + */
1.128 EBatteryLevelLevel4 = 4,
1.129 + /**
1.130 + Battery level 5.
1.131 + */
1.132 EBatteryLevelLevel5 = 5,
1.133 + /**
1.134 + Battery level 6.
1.135 + */
1.136 EBatteryLevelLevel6 = 6,
1.137 - EBatteryLevelLevel7 = 7 ///< Highest battery level
1.138 + /**
1.139 + Battery level 7. The highest battery level.
1.140 + */
1.141 + EBatteryLevelLevel7 = 7
1.142 };
1.143
1.144
1.145 @@ -94,18 +129,36 @@
1.146 * automatically because of insufficient battery power.
1.147 *
1.148 * @see EPSHWRMBatteryStatus
1.149 +*
1.150 +* @publishedAll
1.151 +* @released
1.152 */
1.153 const TUint32 KHWRMBatteryStatus = 0x00000002;
1.154
1.155 /**
1.156 * Battery status of device.
1.157 +*
1.158 +* @publishedAll
1.159 +* @released
1.160 */
1.161 enum EPSHWRMBatteryStatus
1.162 {
1.163 - EBatteryStatusUnknown = -1, ///< Uninitialized or some other error
1.164 - EBatteryStatusOk = 0, ///< This can also be used during charging
1.165 - EBatteryStatusLow = 1, ///< Show note to user "Battery low"
1.166 - EBatteryStatusEmpty = 2 ///< Show "recharge battery" note to user
1.167 + /**
1.168 + Uninitialized or some other error
1.169 + */
1.170 + EBatteryStatusUnknown = -1,
1.171 + /**
1.172 + This can also be used during charging
1.173 + */
1.174 + EBatteryStatusOk = 0,
1.175 + /**
1.176 + Show note to user "Battery low"
1.177 + */
1.178 + EBatteryStatusLow = 1,
1.179 + /**
1.180 + Show "recharge battery" note to user
1.181 + */
1.182 + EBatteryStatusEmpty = 2
1.183 };
1.184
1.185 /**
1.186 @@ -113,22 +166,51 @@
1.187 * This property is updated only when charging status changes.
1.188 *
1.189 * @see EPSHWRMChargingStatus
1.190 +*
1.191 +* @publishedAll
1.192 +* @released
1.193 */
1.194 const TUint32 KHWRMChargingStatus = 0x00000003;
1.195
1.196 /**
1.197 * Charging status of device.
1.198 +*
1.199 +* @publishedAll
1.200 +* @released
1.201 */
1.202 enum EPSHWRMChargingStatus
1.203 {
1.204 - EChargingStatusError = -1, ///< Some error has occurred when charger is connected or charging.
1.205 - EChargingStatusNotConnected = 0, ///< Charger not connected/uninitialized
1.206 - EChargingStatusCharging = 1, ///< Device is charging
1.207 - EChargingStatusNotCharging = 2, ///< Charger is connected, device not charging
1.208 - EChargingStatusAlmostComplete = 3, ///< Charging almost completed
1.209 - EChargingStatusChargingComplete = 4, ///< Charging completed
1.210 - EChargingStatusChargingContinued = 5 ///< Charging continued after brief interruption
1.211 + /**
1.212 + Some error has occurred when charger is connected or charging.
1.213 + */
1.214 + EChargingStatusError = -1,
1.215 + /**
1.216 + Charger not connected/uninitialized
1.217 + */
1.218 + EChargingStatusNotConnected = 0,
1.219 + /**
1.220 + Device is charging
1.221 + */
1.222 + EChargingStatusCharging = 1,
1.223 + /**
1.224 + Charger is connected, device not charging
1.225 + */
1.226 + EChargingStatusNotCharging = 2,
1.227 + /**
1.228 + Charging almost completed
1.229 + */
1.230 + EChargingStatusAlmostComplete = 3,
1.231 + /**
1.232 + Charging completed
1.233 + */
1.234 + EChargingStatusChargingComplete = 4,
1.235 + /**
1.236 + Charging continued after brief interruption
1.237 + */
1.238 + EChargingStatusChargingContinued = 5
1.239 };
1.240
1.241
1.242 #endif // HWRMPOWERSTATESDKPSKEYS_H
1.243 +
1.244 +// End of File