idlefw/plugins/wsplugin/inc/keyhandlertimer.h
branchRCL_3
changeset 9 d0529222e3f0
parent 4 1a2a00e78665
child 10 5ef93ea513cb
child 18 bd874ee5e5e2
equal deleted inserted replaced
4:1a2a00e78665 9:d0529222e3f0
     1 /*
       
     2 * Copyright (c) 2005-2007 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:  Key handler timer for Active Idle WS Plug-in.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_AIWSPLUGIN_KEYHANDLERTIMER_H
       
    19 #define C_AIWSPLUGIN_KEYHANDLERTIMER_H
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 namespace AiWsPlugin {
       
    24 
       
    25 /**
       
    26  * Handler timer interface.
       
    27  */
       
    28 class MHandlerTimer
       
    29     {
       
    30 public:
       
    31     virtual void TimerDone() = 0;
       
    32     };  
       
    33 
       
    34 /**
       
    35  *  @ingroup group_wsplugin
       
    36  *
       
    37  *  Logs app launch handler for Active Idle WS Plug-in. 
       
    38  */
       
    39 class CKeyHandlerTimer : 
       
    40         public CTimer
       
    41     {
       
    42 public:
       
    43 
       
    44 // Construction
       
    45 
       
    46     static CKeyHandlerTimer* NewL( MHandlerTimer* aHandler );
       
    47     
       
    48     static CKeyHandlerTimer* NewLC( MHandlerTimer* aHandler );
       
    49     
       
    50     ~CKeyHandlerTimer();
       
    51 
       
    52 // new methods
       
    53 
       
    54     void StopTimer();
       
    55 
       
    56     TBool IsActive();
       
    57 
       
    58 protected: // From CActive
       
    59 
       
    60     void RunL();
       
    61 
       
    62     TInt RunError( TInt aError );
       
    63 
       
    64 private:
       
    65 
       
    66 // Construction
       
    67 
       
    68     CKeyHandlerTimer( MHandlerTimer* aHandler );
       
    69 
       
    70     void ConstructL();
       
    71 
       
    72 private: // data
       
    73 
       
    74     /// Pointer to handler timer. Not owned.
       
    75     MHandlerTimer* iHandler;
       
    76     }; 
       
    77 
       
    78 } // namespace AiWsPlugin
       
    79 
       
    80 
       
    81 #endif // C_AIWSPLUGIN_KEYHANDLERTIMER_H