diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-FC7F8CFE-F9AD-4442-9289-CCEFEC62DF68.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-FC7F8CFE-F9AD-4442-9289-CCEFEC62DF68.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,53 @@ + + + + + +Start +receiving notification +

You must have implemented and set the appropriate observers +to receive notification.

Use CHWRMPower::StartAveragePowerReporting() to +start battery voltage and battery consumption measurements.

The following +code snippet demonstrates how to start battery voltage measurements:

+TRequestStatus newstatus; +TIntervalMultiple intmul; + +iPower->StartAveragePowerReporting( newstatus, intmul ); +... +

Use CHWRMPower::NotifyAverageChargingCurrent() to +start receiving charging current information and CHWRMPower::NotifyBatteryFullChargingTime() to +receive battery charging time information.

The following code snippet +demonstrates how to receive battery charging status notification:

// Start receiving charging notification +TRequestStaus status; +iPower->NotifyAverageChargingCurrent( status, EFourTimesBaseTimeInterval ); +User::WaitForRequest( status ); +

Notes: Charging status notification is started automatically +when SetBatteryChargingObserver is +called with a MHWRMBatteryChargingStatusObserver specified.

When +the charging status changes to EChargingStatusChargingComplete charging +status notification is automatically disabled.

The following code +snippet demonstrates how to get average charging current and remaining charging +time notification:

// Register only for charging current +iPower->SetBatteryChargingObserver( NULL, notifier, NULL ); + +// Start receiving notification now-on +TRequestStaus status; +iPower->NotifyAverageChargingCurrent( status, 4 ); +User::WaitForRequest( status ); +... + +// Register only for remaining charging time notification +iPower->SetBatteryChargingObserver( NULL, NULL, notifier ); + +// Start receiving notification now-on +TRequestStaus status; +iPower->NotifyBatteryFullChargingTime( status, 4 ); +User::WaitForRequest( status ); +...
+
\ No newline at end of file