resourcemgmt/hwresourcesmgr/power/inc/HWRMBatteryChargeTimeMeasurementsAO.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalTechnology 
       
    19 */
       
    20 
       
    21 #ifndef HWRMBATTERYCHARGETIMEMEASUREMENTSAO_H_
       
    22 #define HWRMBATTERYCHARGETIMEMEASUREMENTSAO_H_
       
    23 
       
    24 #include "HWRMBatteryMeasurementsAO.h"
       
    25 #include "HWRMPower.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 // None
       
    29 
       
    30 /**
       
    31 * Active object wrapper
       
    32 *
       
    33 */
       
    34 NONSHARABLE_CLASS(CHWRMBatteryChargeTimeMeasurementsAO) : public CHWRMBatteryMeasurementsAttributeAO<TInt>
       
    35     {
       
    36     public:        
       
    37         	    
       
    38         /**
       
    39         * This is a two-phase constructor method that is used to
       
    40         * create a new instance of CHWRMBatteryChargeTimeMeasurementsAO.
       
    41         *
       
    42         * @param aCallback Pointer to a callback instance.
       
    43         * @return A pointer to a new instance of the 
       
    44         *  CHWRMBatteryChargeTimeMeasurementsAO class.
       
    45         */
       
    46         static CHWRMBatteryChargeTimeMeasurementsAO* NewL(MHWRMBatteryFullChargingTimeObserver* aCallback, RHWRMClient& aClient);
       
    47 
       
    48         /**
       
    49         * Destructor.
       
    50         */
       
    51         virtual ~CHWRMBatteryChargeTimeMeasurementsAO();  
       
    52 
       
    53 
       
    54         //If measurements are stopped by HWRM (because of charger disconnected,...)
       
    55         //complete the callback with KErrCancel.
       
    56         virtual void CancelClientNotification();
       
    57 
       
    58         /**
       
    59         * Set the callback.
       
    60         * This can be used to change the callback.
       
    61         */
       
    62 
       
    63         virtual void SetCallBack(TAny* aCallBack);
       
    64         
       
    65     protected:
       
    66 
       
    67         // From CActive
       
    68         void RunL();
       
    69         void DoCancel();
       
    70 
       
    71     private:
       
    72 
       
    73         /**
       
    74         * Constructor
       
    75         *
       
    76         * @param aCallback Pointer to a callback instance.
       
    77         */
       
    78     	CHWRMBatteryChargeTimeMeasurementsAO(MHWRMBatteryFullChargingTimeObserver* aCallback, RHWRMClient& aClient);
       
    79                                                    
       
    80         /**
       
    81         * By default Symbian 2nd phase constructor is private.
       
    82         */
       
    83         void ConstructL();           	
       
    84     	
       
    85     private:        
       
    86         
       
    87         MHWRMBatteryFullChargingTimeObserver*     iCallback;// not owned by this class.         
       
    88     };
       
    89 
       
    90 #endif /*HWRMBATTERYCHARGETIMEMEASUREMENTSAO_H_*/
       
    91 //End of File