email/framework/inc/T_MsgAsyncStep.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 the header file for CT_MsgAsyncStep.
       
    17 * 
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 #ifndef __T_MSG_ASYNCSTEP_H__
       
    27 #define __T_MSG_ASYNCSTEP_H__
       
    28 
       
    29 
       
    30 /* User includes */
       
    31 #include "T_MsgStep.h"
       
    32 #include "T_MsgActive.h"
       
    33 #include "T_MsgTimer.h"
       
    34 
       
    35 
       
    36 /* This implements a base class for the asynchronous test steps */
       
    37 class CT_MsgAsyncStep : public CT_MsgStep, private MT_MsgActiveCallback, private MT_MsgTimerCallback
       
    38 	{
       
    39 public:
       
    40 	/**
       
    41 	* Destructor
       
    42 	*/
       
    43 	virtual ~CT_MsgAsyncStep();
       
    44 
       
    45 	/* Derived from CTestStep
       
    46 	 * Calls the doTestStepPreambleL of the base class CTestStep
       
    47 	 * Reads in the ProgressTime and CancelTime for the asynchronous operation
       
    48 	 */
       
    49 	virtual enum TVerdict doTestStepPreambleL();
       
    50 
       
    51 protected:
       
    52 
       
    53 	CT_MsgAsyncStep();
       
    54 
       
    55 	/* 
       
    56 	 * Children must call this in their own NewL().
       
    57  	 */
       
    58 	void ConstructL(); 				 
       
    59 
       
    60 	/* Method to return the object of CT_MsgActive */
       
    61 	CT_MsgActive& Active() { return *iActive; }
       
    62 
       
    63 	/* Derived  from CT_MsgStep 
       
    64 	 * Displays the progress of the asynchronous operation
       
    65 	 */
       
    66 	virtual void ProgressL(TBool bFinal) = 0;
       
    67 
       
    68 private:
       
    69 	/*	Derived from MT_MsgActiveCallback */
       
    70 	virtual void Completed();
       
    71 
       
    72 	/*	MT_MsgTimerCallback implementation */
       
    73 	virtual void	TimerCompletedL(CTimer* aTimer);
       
    74 
       
    75 private:
       
    76 	/* To be used in asynchronous operations */
       
    77 	CT_MsgActive*		iActive;
       
    78 	/* Timer object */
       
    79 	CT_MsgTimer*		iTimerCancel;
       
    80 	/* Gets the timer progress */
       
    81 	CT_MsgTimer*		iTimerProgress;
       
    82 
       
    83 	TInt iTimeProgress;
       
    84 	};
       
    85 
       
    86 #endif /* __T_MSG_ASYNCSTEP_H__ */