connectionutilities/ConnectionDialogs/inc/ExpiryTimer.h
changeset 0 5a93021fdf25
child 1 40cb640ef159
equal deleted inserted replaced
-1:000000000000 0:5a93021fdf25
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Declaration of class CExpiryTimer 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CEXPIRYTIMER_H
       
    20 #define CEXPIRYTIMER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>  
       
    24 #include <e32std.h>		
       
    25 
       
    26 #include "ExpiryTimerCallback.h"
       
    27 
       
    28 // CLASS DECLARATION
       
    29 /**
       
    30  * Class that implements simple n second timer and callback
       
    31  */
       
    32 NONSHARABLE_CLASS( CExpiryTimer ): public CTimer
       
    33     {
       
    34 public:
       
    35 
       
    36     /**
       
    37     * Two-phased constructor.
       
    38     * @param aCallback Pointer to the class where callback goes    
       
    39     */
       
    40     static CExpiryTimer* NewL( MExpiryTimerCallback& aCallback );  
       
    41     
       
    42     /**
       
    43     * Starts up the timer       
       
    44     */
       
    45     void Start();
       
    46 
       
    47 private:
       
    48     /**
       
    49     * C++ constructor.
       
    50     * @param aCallback Pointer to the class where callback goes    
       
    51     */
       
    52     CExpiryTimer( MExpiryTimerCallback& aCallback );
       
    53 
       
    54     /**
       
    55     * ConstructL.       
       
    56     */
       
    57     void ConstructL();
       
    58 
       
    59     /**
       
    60     * RunL. From CTimer.       
       
    61     */
       
    62     void RunL();
       
    63 
       
    64 private:
       
    65     /**
       
    66    * Callback reference
       
    67    */
       
    68     MExpiryTimerCallback& iCallback;
       
    69     };
       
    70 
       
    71 #endif // CEXPIRYTIMER_H