localconnectivityservice/generichid/tsrc/GenericHidTest/inc/timer.h
branchRCL_3
changeset 20 4a793f564d72
parent 19 0aa8cc770c8a
child 21 74aa6861c87d
equal deleted inserted replaced
19:0aa8cc770c8a 20:4a793f564d72
     1 /*
       
     2 * Copyright (c) 2004-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:  Hid timeout timer
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_TIMER_H
       
    19 #define C_TIMER_H
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 
       
    24 /**
       
    25  * HID headset driver class
       
    26  *
       
    27  * This class will notify an object after a specified timeout.
       
    28  * 
       
    29  * @since S60 v3.2
       
    30  */        
       
    31 NONSHARABLE_CLASS ( CWaitTimer ) : public CTimer
       
    32     {
       
    33 public:
       
    34     /**
       
    35      * Two-phased constructor.
       
    36      * @param aPriority priority to use for this timer
       
    37      * @param aTimeOutNotify object to notify of timeout event
       
    38      */
       
    39     static CWaitTimer* NewL( TTimeIntervalMicroSeconds32 aTimeOutTime );
       
    40 
       
    41     /**
       
    42      * Two-phased constructor.
       
    43      * @param aPriority priority to use for this timer
       
    44      * @param aTimeOutNotify object to notify of timeout event
       
    45      */    
       
    46     static CWaitTimer* NewLC(TTimeIntervalMicroSeconds32 aTimeOutTime );
       
    47 
       
    48     /**
       
    49     * Destructor
       
    50     */
       
    51     ~CWaitTimer();
       
    52 
       
    53 protected: 
       
    54 
       
    55     /**
       
    56      * From CTimer
       
    57      * Invoked when a timeout occurs
       
    58      * 
       
    59      * @since S60 v3.2
       
    60      * @return None.
       
    61      */
       
    62     virtual void RunL();
       
    63 
       
    64 private:
       
    65     CWaitTimer();
       
    66     void ConstructL( TTimeIntervalMicroSeconds32 aTimeOutTime );
       
    67 
       
    68 private: // Member variables
       
    69     CActiveSchedulerWait    iSyncWaiter;
       
    70     
       
    71     };
       
    72 #endif // C_TIMER_H