Symbian3/SDK/Source/GUID-FC7F8CFE-F9AD-4442-9289-CCEFEC62DF68.dita
changeset 7 51a74ef9ed63
parent 0 89d6a7a84779
equal deleted inserted replaced
6:43e37759235e 7:51a74ef9ed63
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE task
       
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
       
    12 <task id="GUID-FC7F8CFE-F9AD-4442-9289-CCEFEC62DF68" xml:lang="en"><title>Start
       
    13 receiving notification</title><prolog><metadata><keywords/></metadata></prolog><taskbody>
       
    14 <context>       <p>You must have implemented and set the appropriate observers
       
    15 to receive notification. </p> <p>Use <xref href="GUID-4A98138C-4C68-3399-80E8-25CB41E43D5C.dita"><apiname>CHWRMPower::StartAveragePowerReporting()</apiname></xref> to
       
    16 start battery voltage and battery consumption measurements. </p> <p>The following
       
    17 code snippet demonstrates how to start battery voltage measurements: </p> <codeblock id="GUID-36804159-E282-5E5C-9EE2-73959BC41F43" xml:space="preserve">
       
    18 TRequestStatus newstatus;
       
    19 TIntervalMultiple intmul;
       
    20 
       
    21 iPower-&gt;StartAveragePowerReporting( newstatus, intmul );
       
    22 ...
       
    23 </codeblock> <p>Use <xref href="GUID-4A98138C-4C68-3399-80E8-25CB41E43D5C.dita"><apiname>CHWRMPower::NotifyAverageChargingCurrent()</apiname></xref> to
       
    24 start receiving charging current information and <xref href="GUID-4A98138C-4C68-3399-80E8-25CB41E43D5C.dita"><apiname>CHWRMPower::NotifyBatteryFullChargingTime()</apiname></xref> to
       
    25 receive battery charging time information. </p> <p>The following code snippet
       
    26 demonstrates how to receive battery charging status notification: </p> <codeblock id="GUID-6DCA3FFC-04FE-53A1-BDA2-EF57B04D8A17" xml:space="preserve">// Start receiving charging notification 
       
    27 TRequestStaus status;
       
    28 iPower-&gt;NotifyAverageChargingCurrent( status, EFourTimesBaseTimeInterval );
       
    29 User::WaitForRequest( status );
       
    30 </codeblock> <p> <b>Notes:</b> Charging status notification is started automatically
       
    31 when <xref href="GUID-4A98138C-4C68-3399-80E8-25CB41E43D5C.dita"><apiname>SetBatteryChargingObserver</apiname></xref> is
       
    32 called with a <xref href="GUID-4A98138C-4C68-3399-80E8-25CB41E43D5C.dita"><apiname>MHWRMBatteryChargingStatusObserver</apiname></xref> specified. </p> <p>When
       
    33 the charging status changes to <xref href="GUID-4A98138C-4C68-3399-80E8-25CB41E43D5C.dita"><apiname>EChargingStatusChargingComplete</apiname></xref> charging
       
    34 status notification is automatically disabled. </p> <p>The following code
       
    35 snippet demonstrates how to get average charging current and remaining charging
       
    36 time notification: </p> <codeblock id="GUID-27456CE4-5C58-5608-BE47-C3050D7E32E5" xml:space="preserve">// Register only for charging current
       
    37 iPower-&gt;SetBatteryChargingObserver( NULL, notifier, NULL );
       
    38 
       
    39 // Start receiving notification now-on
       
    40 TRequestStaus status;
       
    41 iPower-&gt;NotifyAverageChargingCurrent( status, 4 );
       
    42 User::WaitForRequest( status );
       
    43 ...
       
    44 
       
    45 // Register only for remaining charging time notification
       
    46 iPower-&gt;SetBatteryChargingObserver( NULL, NULL, notifier );
       
    47 
       
    48 // Start receiving notification now-on
       
    49 TRequestStaus status;
       
    50 iPower-&gt;NotifyBatteryFullChargingTime( status, 4 );
       
    51 User::WaitForRequest( status );
       
    52 ...</codeblock>     </context>
       
    53 </taskbody></task>