smsprotocols/smsstack/smsu/inc/SmsuTimer.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Declares CSmsuTimeout
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #ifndef SMSU_TIMER_H__
       
    24 #define SMSU_TIMER_H__
       
    25 
       
    26 #include <e32base.h>
       
    27 
       
    28 #include "smsuact.h"
       
    29 
       
    30 
       
    31 /**
       
    32  *  Asynchronous utility class that times out
       
    33  *  another active object given during construction.
       
    34  *  @internalComponent
       
    35  */
       
    36 class CSmsuTimeout : public CTimer
       
    37 	{
       
    38 public:
       
    39 	static CSmsuTimeout* NewL(CSmsuActiveBase& aActive);
       
    40 	~CSmsuTimeout();
       
    41 
       
    42 	void Start(const TTimeIntervalMicroSeconds32& aTimeIntervalMicroSeconds32);
       
    43 
       
    44 	inline TBool TimedOut() const {return iTimedOut;};
       
    45 
       
    46 	void RequestCompleteMyselfAfterCancel(TInt aStatus);
       
    47 
       
    48 private:
       
    49 	CSmsuTimeout(CSmsuActiveBase& aActive);
       
    50 	void RunL();
       
    51 
       
    52 protected:
       
    53 	CSmsuActiveBase&  iActive;        //< reference to the timer observer
       
    54 	TBool  iTimedOut;                 //< ETrue if it actually timed out
       
    55 	TBool  iCompleteMyselfRequested;  //< ETrue if a restart after cancel needed
       
    56 	TInt  iCompleteMyselfStatus;      //< Restart status value.
       
    57 	};
       
    58 
       
    59 #endif // SMSU_TIMER_H__