contentstorage/srvinc/catimeout.h
changeset 85 7feec50967db
equal deleted inserted replaced
4:1a2a00e78665 85:7feec50967db
       
     1 /*
       
     2  * Copyright (c) 2008 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:  ?Description
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef TIMEOUT_H
       
    19 #define TIMEOUT_H
       
    20 
       
    21 // INCLUDE FILES
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 // CLASS DECLARATION
       
    26 
       
    27 /**
       
    28  * Timeout timer.
       
    29  */
       
    30 NONSHARABLE_CLASS( CTimeout ): public CTimer
       
    31     {
       
    32 public:
       
    33     // Construct / destruct
       
    34 
       
    35     /**
       
    36      * Two phase constructor. Leaves on failure.
       
    37      * @param aPriority Active object priority.
       
    38      * @param aCallback Callback to be called when timer expires.
       
    39      * This callback must return EFalse - it will NOT be called only again.
       
    40      * @return The constructed timeout timer.
       
    41      */
       
    42     static CTimeout* NewL( TInt aPriority, TCallBack aCallBack );
       
    43 
       
    44     /**
       
    45      * Destructor.
       
    46      */
       
    47     virtual ~CTimeout();
       
    48 
       
    49 protected:
       
    50     // from CActive
       
    51 
       
    52     /**
       
    53      * Outstanding request completed (timed out).
       
    54      */
       
    55     virtual void RunL();
       
    56 
       
    57 protected:
       
    58     // 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:
       
    68     // data
       
    69 
       
    70     TCallBack iCallBack; ///< Callback.
       
    71     };
       
    72 
       
    73 #endif // TIMEOUT_H
       
    74 // End of File