diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-C3B6E5F6-74DC-5C0E-94C8-B4822F4A2EB6.dita --- a/Symbian3/PDK/Source/GUID-C3B6E5F6-74DC-5C0E-94C8-B4822F4A2EB6.dita Tue Mar 30 11:42:04 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-C3B6E5F6-74DC-5C0E-94C8-B4822F4A2EB6.dita Tue Mar 30 11:56:28 2010 +0100 @@ -1,76 +1,76 @@ - - - - - -Power -API Tutorial This tutorial explains how to use the Power API of the HWRM. -
Introduction

Power API methods can be used by constructing -an instance of CHWRMPower and calling -its functions. However, to use its full functionality write a class which -implements one or more of the observer interfaces described in the following -table. Then, construct an instance of CHWRMPower and -provide it with pointers to observers.

- - - -Interface -Notification -Method to override - - - - -

MHWRMBatteryPowerObserver

-

Average battery voltage and current consumption

-

PowerMeasurement

-
- -

MHWRMBatteryChargingStatusObserver

-

Charging status

-

ChargingStatusChange

-
- -

MHWRMBatteryChargingCurrentObserver

-

Average charging current

-

AverageChargingCurrentChange

-
- -

MHWRMBatteryFullChargingTimeObserver

-

Remaining charging time

-

BatteryFullChargingTimeChange

-
- - -

For example, if the application requires periodic measurements -of average battery voltage and current consumption, it must implement MHWRMBatteryPowerObserver and instantiate a CHWRMPower object using the CHWRMPower::NewL(NULL, -MHWRMBatteryPowerObserver *) method.

Note: The battery -charging observers cannot be passed to CHWRMPower using -a NewL() function. Call the dedicated -function, CHRMPower::SetBatteryChargingObserver().

-
Procedure
    -
  1. Derive -a class from one or more of the above interfaces.

  2. -
  3. Implement -the appropriate observer functions.

  4. -
  5. Create -a power client using CHWRMPower::NewL() or NewLC().

    You -can retrieve the battery voltage or consumption information.

  6. -
  7. Call CHRMPower::SetBatteryChargingObserver(), if -necessary.

  8. -
  9. Start -receiving notification using the appropriate start function(s).

  10. -
  11. Stop -receiving notification using the appropriate stop function(s).

  12. -

Note: If the notification period exceeds the maximum reporting -period, set when the HWRM server starts, notification is cancelled.

-
-Power API - + + + + + +Power +API Tutorial This tutorial explains how to use the Power API of the HWRM. +
Introduction

Power API methods can be used by constructing +an instance of CHWRMPower and calling +its functions. However, to use its full functionality write a class which +implements one or more of the observer interfaces described in the following +table. Then, construct an instance of CHWRMPower and +provide it with pointers to observers.

+ + + +Interface +Notification +Method to override + + + + +

MHWRMBatteryPowerObserver

+

Average battery voltage and current consumption

+

PowerMeasurement

+
+ +

MHWRMBatteryChargingStatusObserver

+

Charging status

+

ChargingStatusChange

+
+ +

MHWRMBatteryChargingCurrentObserver

+

Average charging current

+

AverageChargingCurrentChange

+
+ +

MHWRMBatteryFullChargingTimeObserver

+

Remaining charging time

+

BatteryFullChargingTimeChange

+
+ + +

For example, if the application requires periodic measurements +of average battery voltage and current consumption, it must implement MHWRMBatteryPowerObserver and instantiate a CHWRMPower object using the CHWRMPower::NewL(NULL, +MHWRMBatteryPowerObserver *) method.

Note: The battery +charging observers cannot be passed to CHWRMPower using +a NewL() function. Call the dedicated +function, CHRMPower::SetBatteryChargingObserver().

+
Procedure
    +
  1. Derive +a class from one or more of the above interfaces.

  2. +
  3. Implement +the appropriate observer functions.

  4. +
  5. Create +a power client using CHWRMPower::NewL() or NewLC().

    You +can retrieve the battery voltage or consumption information.

  6. +
  7. Call CHRMPower::SetBatteryChargingObserver(), if +necessary.

  8. +
  9. Start +receiving notification using the appropriate start function(s).

  10. +
  11. Stop +receiving notification using the appropriate stop function(s).

  12. +

Note: If the notification period exceeds the maximum reporting +period, set when the HWRM server starts, notification is cancelled.

+
+Power API +
\ No newline at end of file