email/framework/inc/T_MsgTimer.h
branchSymbian2
changeset 1 8758140453c0
child 6 c108117318cb
equal deleted inserted replaced
0:e8c1ea2c6496 1:8758140453c0
       
     1 /*
       
     2 * Copyright (c) 2006-2009 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 "Symbian Foundation License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * @file 
       
    16 * This contains CT_MsgTimer class
       
    17 * 
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 #ifndef __T_MSG_TIMER_H__
       
    28 #define __T_MSG_TIMER_H__
       
    29 
       
    30 /* User Includes */
       
    31 #include <testexecutestepbase.h>
       
    32 
       
    33 
       
    34 
       
    35 
       
    36 /* Interface to be implemented by the dervied classes for asynchronous operation */
       
    37 class MT_MsgTimerCallback
       
    38 	{
       
    39 public:
       
    40 	/* To be implemented by the derived class */
       
    41 	virtual void	TimerCompletedL(CTimer* aTimer) = 0;
       
    42 	};
       
    43 
       
    44 
       
    45 
       
    46 
       
    47 /* Implementes a class that dervies from the CTimer, for an active timer object */
       
    48 class CT_MsgTimer : public CTimer
       
    49 	{
       
    50 public:
       
    51 	/**
       
    52 	* Two phase constructor that allocates and constructs
       
    53 	* a new CT_MsgTimer object 
       
    54 	*
       
    55 	* \param aCallback object to inform on timer completion.
       
    56 	* \param aPriority priority of CT_MsgTimer object.
       
    57 	* \return New Callback CT_MsgTimer object.
       
    58 	*/
       
    59 	static CT_MsgTimer*	NewL(MT_MsgTimerCallback& aCallback, TInt aPriority = EPriorityStandard);
       
    60 
       
    61 protected:
       
    62 	CT_MsgTimer(MT_MsgTimerCallback& aCallback, TInt aPriority);
       
    63 
       
    64 	/* 
       
    65 	 * Constructs a new asynchronous timer 
       
    66 	 * And adds the object to the active scheduler
       
    67 	 */
       
    68 	void ConstructL();
       
    69 
       
    70 	/* Signals on the complettion of the Timer */
       
    71 	virtual void RunL();
       
    72 
       
    73 private:
       
    74 	/*
       
    75 	 * This is internal and not intended for use.
       
    76 	 */
       
    77 	MT_MsgTimerCallback&	iCallback;
       
    78 	};
       
    79 
       
    80 #endif /* __T_MSG_TIMER_H__ */