telephonyprotocols/csdagt/TS_CsdAgt/TestStepCsdAgt.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2001-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 // This contains CTestStepCsdAgt which is the base class for all 
       
    15 // the Csd Agt suite test steps
       
    16 // 
       
    17 //
       
    18 
       
    19 #if (!defined __CSDAGTTESTSTEP_H__)
       
    20 #define __CSDAGTTESTSTEP_H__
       
    21 
       
    22 #include "tnifnotify.h"		// MDummyNifToAgtHarnessNotify
       
    23 #include "AgtNotify.h"      // AgtNotify - used to talk to dummy ETEL
       
    24 #include "tdummynifagentref.h"	// Dummy version of CNifAgentRef
       
    25 
       
    26 #include "CsdDialogServer.h" 
       
    27 
       
    28 /**
       
    29  * Forward declarations.
       
    30  *
       
    31  */
       
    32 class CTestSuite;
       
    33 class CTestSuiteCsdAgt;
       
    34 
       
    35 /**
       
    36  * CTestStepCsdAgt.
       
    37  *
       
    38  */
       
    39 class CTestStepCsdAgt : public CTestStep, public MDummyNifToAgtHarnessNotify, public CDialogServer::MObserver
       
    40 	{
       
    41 public:
       
    42 	CTestStepCsdAgt(TPtrC aName);
       
    43 	void ConstructL();
       
    44 	~CTestStepCsdAgt();
       
    45 
       
    46 	// pointer to suite which owns this test 
       
    47 	CTestSuiteCsdAgt * iCsdAgtSuite;
       
    48 
       
    49 	// Delay
       
    50 	void DelayL(TInt aMicroseconds);
       
    51 
       
    52 	// MDummyNifToAgtHarnessNotify
       
    53 	virtual TInt Notification(TAgentToNifEventType aEvent, TAny* aInfo);
       
    54 	virtual void AgentProgress(TInt aStage, TInt aError);
       
    55 
       
    56 	// Called by framework to do the test
       
    57 	virtual enum TVerdict doTestStepL( void );
       
    58 
       
    59 	// Pure Virtual, overridden by derived classes to implement a specific CSDAgt test
       
    60 	virtual enum TVerdict doCsdAgtTestStepL( void )=0;
       
    61 
       
    62 public:
       
    63 	// From CDialogServer::MObserver
       
    64 	virtual void DialogHasAppeared();
       
    65 
       
    66 public:
       
    67 	enum TVerdict iResult;
       
    68 
       
    69 protected:
       
    70 
       
    71 	// Functions to switch between modes
       
    72 	void SetGSMModeL(MAgtNotify & aAgtNotify);
       
    73 	void SetGPRSModeL(MAgtNotify & aAgtNotify);
       
    74 
       
    75 	// Common Connection Routines
       
    76 	void NormalConnectL();
       
    77 	void ReConnectL();
       
    78 	void ConnectExpectErrorL(TInt aError, TInt aStage);
       
    79 	void ConnectAndWaitForAsyncronousRequestL();
       
    80 	void NormalConnectDisconnectExpectsErrorL(TInt aError, TInt aStage);
       
    81 
       
    82 	// Internal virtual functions called by the Notification() member
       
    83 	// Should be overridden when required in base classes
       
    84 	virtual void CsdAgtDisconnectRequest();
       
    85 
       
    86 	CDialogServer* iDlgSvr;
       
    87 	TInt iStage;			// Current stage in a test case
       
    88 
       
    89 private:
       
    90 	// Callback for DelayL() function
       
    91 	static TInt TimerCallback(TAny *);
       
    92 	};
       
    93 
       
    94 #endif /* __CSDAGTTESTSTEP_H__ */