codhandler/codeng/inc/Timeout.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2004 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 the License "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 *      Declaration of class CTimeout.   
       
    16 *      
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef TIMEOUT_H
       
    22 #define TIMEOUT_H
       
    23 
       
    24 // INCLUDE FILES
       
    25 
       
    26 #include <e32base.h>
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31 * Timeout timer.
       
    32 */
       
    33 NONSHARABLE_CLASS( CTimeout ): public CTimer
       
    34     {
       
    35     public:     // Construct / destruct
       
    36 
       
    37         /**
       
    38         * Two phase constructor. Leaves on failure.
       
    39         * @param aPriority Active object priority.
       
    40         * @param aCallback Callback to be called when timer expires.
       
    41         * This callback must return EFalse - it will NOT be called only again.
       
    42         * @return The constructed timeout timer.
       
    43         */      
       
    44         static CTimeout* NewL( TInt aPriority, TCallBack aCallBack );
       
    45         
       
    46         /**
       
    47         * Destructor.
       
    48         */
       
    49         virtual ~CTimeout();
       
    50 
       
    51     protected:  // from CActive
       
    52 
       
    53         /**
       
    54         * Outstanding request completed (timed out). CAsyncCallBack
       
    55         */
       
    56         virtual void RunL();
       
    57 
       
    58     protected:  // Construct / destruct
       
    59 
       
    60         /**
       
    61         * Constructor.
       
    62         * @param aPriority Active object priority.
       
    63         * @param aCallback Callback to be called when timer expires.
       
    64         */      
       
    65         CTimeout( TInt aPriority, TCallBack aCallBack );
       
    66         
       
    67     private:    // data
       
    68 
       
    69         TCallBack iCallBack;                ///< Callback.
       
    70     };
       
    71 
       
    72 #endif /* def TIMEOUT_H */