voipplugins/accountcreationplugin/inc/acptimer.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     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:  Class for timer handling
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_ACPTIMER_H
       
    20 #define C_ACPTIMER_H
       
    21 
       
    22 #include <e32base.h> 
       
    23 
       
    24 class MAcpTimerObserver;
       
    25 
       
    26 /**
       
    27  * An instance of CAcpTimer
       
    28  * For timer handling.
       
    29  *
       
    30  * @lib accountcreationplugin.lib
       
    31  * @since Series 60 5.0
       
    32  */
       
    33 NONSHARABLE_CLASS( CAcpTimer ) : public CTimer
       
    34     {    
       
    35     public:
       
    36 
       
    37         /**
       
    38          * Enumeration which indicates timer type
       
    39          */
       
    40         enum TTimerType
       
    41             {
       
    42             EPhonebookStartupDelayTimer = 0
       
    43             };
       
    44     
       
    45         /**
       
    46          * Two-phased constructor.
       
    47          */ 
       
    48         static CAcpTimer* NewL( 
       
    49             MAcpTimerObserver& aObserver );
       
    50 
       
    51 
       
    52         /**
       
    53          * Destructor.
       
    54          */
       
    55         virtual ~CAcpTimer();
       
    56 
       
    57         
       
    58         /**
       
    59          * Start timer.
       
    60          *
       
    61          * @since S60 v5.0
       
    62          * @return KErrNone when timer started successfully
       
    63          */
       
    64         TInt StartTimer( TTimerType aType );
       
    65         
       
    66         
       
    67         /**
       
    68          * Stop timer.
       
    69          *
       
    70          * @since S60 v5.0
       
    71          */
       
    72         void StopTimer();
       
    73         
       
    74         /**
       
    75          * Is timer active
       
    76          *
       
    77          * @since S60 v5.0
       
    78          * @return ETrue if timer is active.
       
    79          */
       
    80         TBool IsActive();
       
    81         
       
    82 
       
    83     protected: 
       
    84     
       
    85         // from base class CTimer
       
    86         
       
    87         /**
       
    88          * From CTimer. Called when timer expires.
       
    89          */
       
    90         void RunL();
       
    91         
       
    92                
       
    93     private:
       
    94 
       
    95         CAcpTimer( MAcpTimerObserver& aObserver );
       
    96 
       
    97         void ConstructL();
       
    98         
       
    99         
       
   100     private:  // data
       
   101         
       
   102         /**
       
   103          * Reference for observer.
       
   104          */
       
   105         MAcpTimerObserver& iObserver;
       
   106     };
       
   107 
       
   108 #endif // C_ACPTIMER_H