resourcemgmt/hwresourcesmgr/power/inc/HWRMChargingStatusObserver.h
changeset 0 4e1aa6a622a0
child 41 c87e5f80c17d
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 #ifndef HWRMCHARGINGSTATUSOBSERVER_H_
       
    17 #define HWRMCHARGINGSTATUSOBSERVER_H_
       
    18 
       
    19 #include "pspropertyobserver.h"
       
    20 
       
    21 class MHWRMBatteryChargingStatusObserver;
       
    22 
       
    23 
       
    24 /* Observer class for charging status change */
       
    25 
       
    26 class CHWRMChargingStatusObs: public MPsPropertyObserver
       
    27     {
       
    28     public:
       
    29         static CHWRMChargingStatusObs* NewL(MHWRMBatteryChargingStatusObserver* aChargingStatusCallback);
       
    30         
       
    31         ~CHWRMChargingStatusObs();
       
    32 
       
    33         virtual void PsPropertyChanged(TInt aKey, TInt aValue, TInt aError);
       
    34 
       
    35         TInt Get(TInt& val);
       
    36         
       
    37     private:
       
    38         CHWRMChargingStatusObs(MHWRMBatteryChargingStatusObserver* aChargingStatusCallback);
       
    39 
       
    40         void ConstructL();
       
    41         
       
    42         CPsPropertyObserver*                iChargingPsObserver;       // Owned. Pub-Sub Observer.
       
    43         MHWRMBatteryChargingStatusObserver* iChargingStatusObserver;   // Not owned. Client listening for charging status change. Not owned
       
    44         TInt                                iChargingStatus;
       
    45     };
       
    46 
       
    47 #endif //HWRMCHARGINGSTATUSOBSERVER_H_