|
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 CTestCasePsdAgt which is the base class for all |
|
15 // the Psd Agt suite test steps |
|
16 // |
|
17 // |
|
18 |
|
19 #if (!defined __PSDAGTTESTSTEP_H__) |
|
20 #define __PSDAGTTESTSTEP_H__ |
|
21 |
|
22 #include <tnifnotify.h> // MDummyNifToAgtHarnessNotify |
|
23 #include "AgtNotify.h" // AgtNotify - used to talk to dummy ETEL |
|
24 #include "tdummynifagentref.h" // CNifAgentRefN1 |
|
25 |
|
26 #include "PsdDialogServer.h" |
|
27 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
28 #include <comms-infras/nifprvar_internal.h> |
|
29 #endif |
|
30 |
|
31 class CTestSuite; |
|
32 class CTestSuitePsdAgt; |
|
33 |
|
34 class CTestStepPsdAgt : public CTestStep, public MDummyNifToAgtHarnessNotify, public CDialogServer::MObserver |
|
35 { |
|
36 public: |
|
37 CTestStepPsdAgt(const TPtrC &aName); |
|
38 |
|
39 // tests may optionaly implement pre and post ambles |
|
40 virtual enum TVerdict doTestStepPreambleL( void ); |
|
41 virtual enum TVerdict doTestStepPostambleL( void ); |
|
42 |
|
43 // pointer to suite which owns this test |
|
44 CTestSuitePsdAgt * iPsdAgtSuite; |
|
45 |
|
46 void DelayL(TInt aMicroseconds); |
|
47 |
|
48 // MDummyNifToAgtHarnessNotify |
|
49 virtual TInt Notification(TAgentToNifEventType aEvent, TAny* aInfo); |
|
50 virtual void AgentProgress(TInt aStage, TInt aError); |
|
51 |
|
52 // Called by framework to do the test |
|
53 virtual enum TVerdict doTestStepL( void ); |
|
54 |
|
55 // Pure Virtual, overridden by derived classes to implement a specific PSDAGX test |
|
56 virtual enum TVerdict doPsdAgtTestStepL( void )=0; |
|
57 |
|
58 public: |
|
59 // From CDialogServer::MObserver |
|
60 virtual void DialogHasAppeared(); |
|
61 |
|
62 public: |
|
63 enum TVerdict iResult; |
|
64 |
|
65 protected: |
|
66 |
|
67 // Functions to switch between GPRS and CDMA modes |
|
68 void SetGPRSModeL(MAgtNotify & aAgtNotify); |
|
69 |
|
70 |
|
71 // Common Connection Routines |
|
72 void NormalConnectL(); |
|
73 void ReConnectL(); |
|
74 void NormalConnectOOML(); |
|
75 void ReConnectOOML(); |
|
76 void ConnectExpectErrorL(TInt aError, TInt aStage); |
|
77 void QoSChangeDisconnectL(MAgtNotify & aAgtNotify); |
|
78 void QoSChangeNoDisconnectL(MAgtNotify & aAgtNotify); |
|
79 void QoSChangeWithinTimeoutL(MAgtNotify & aAgtNotify); |
|
80 void ConnectAndWaitForAsyncronousRequestL(); |
|
81 void ConnectAndWaitForEightySecondsL(); |
|
82 void ConnectAndWaitForTwentySecondsL(); |
|
83 |
|
84 |
|
85 // Internal virtual functions called by the Notification() member |
|
86 // Should be overridden when required in base classes |
|
87 virtual void PsdAgtGetDataVolumeRequest(TUint32 &aSent, TUint32 &aReceived); |
|
88 virtual void PsdAgtDisconnectRequest(); |
|
89 |
|
90 CDialogServer* iDlgSvr; |
|
91 TInt iStage; // Current stage in a test case |
|
92 CActiveScheduler *iActiveScheduler; |
|
93 |
|
94 private: |
|
95 // Callback for Delay() function |
|
96 static TInt TimerCallback(TAny *); |
|
97 |
|
98 }; |
|
99 |
|
100 #endif /* __PSDAGTTESTSTEP_H__ */ |