featuremgmt/featuremgr/engineering/reference_plugins/inc/plugintimer.h
changeset 0 08ec8eefde2f
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 /*
       
     2 * Copyright (c) 2002-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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __PLUGINTIMER_H_
       
    22 #define __PLUGINTIMER_H_
       
    23 
       
    24 #include <featmgr/featureinfoplugin.h>
       
    25 
       
    26 /**
       
    27 *  An interface for handling timer expiration events.
       
    28 */
       
    29 class MPluginTimerCallback
       
    30     {
       
    31     public:
       
    32         /** 
       
    33         * Called when the timer fires
       
    34         */
       
    35         virtual void GenericTimerFiredL() = 0;
       
    36     };
       
    37 
       
    38 
       
    39 class CPluginTimer : public CTimer
       
    40     {
       
    41     public:
       
    42         CPluginTimer( TInt aPriority, 
       
    43                       MPluginTimerCallback* aCallback );
       
    44         
       
    45         ~CPluginTimer();        
       
    46 
       
    47         static CPluginTimer* NewL( const TTimeIntervalMicroSeconds32& anInterval, 
       
    48                                    MPluginTimerCallback* aCallback );
       
    49                          
       
    50         void ConstructL();
       
    51         
       
    52         void RunL();
       
    53     
       
    54     private:
       
    55     
       
    56        MPluginTimerCallback* iCallback;  // Not owned    
       
    57     };
       
    58 
       
    59 
       
    60 #endif // __PLUGINTIMER_H_