resourcemgmt/hwresourcesmgr/test/utils/endstatetimer.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2007-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 ENDSTATETIMER_H
       
    17 #define ENDSTATETIMER_H
       
    18 
       
    19 #include <e32base.h>
       
    20 
       
    21 class MTimerExpired
       
    22 	{
       
    23 public:
       
    24 	virtual void EndStateTimerExpired(TInt aError) = 0;
       
    25 	};
       
    26 
       
    27 class CEndStateTimer : public CTimer
       
    28     {
       
    29 public:
       
    30     CEndStateTimer(MTimerExpired& aObserver);
       
    31     ~CEndStateTimer();
       
    32     static CEndStateTimer* NewL(MTimerExpired& aObserver);
       
    33     void Start(TReal aTimeOutSecs);
       
    34      
       
    35 public: //from CActive
       
    36     void RunL();
       
    37     void DoCancel();
       
    38         
       
    39 protected:                    
       
    40     void ConstructL();   
       
    41 private:
       
    42     MTimerExpired& iTimerObserver;    
       
    43     };
       
    44 
       
    45 #endif