|
1 // Copyright (c) 2002-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 // $Header$ |
|
15 // The header file introducing the collection of HTTP command classes |
|
16 // of the Integration Harness framework. |
|
17 // on: aug 2002, |
|
18 // |
|
19 // |
|
20 |
|
21 #ifndef __HTTPTRANSACTIONCMDS_H__ |
|
22 #define __HTTPTRANSACTIONCMDS_H__ |
|
23 |
|
24 //----------------------------------------------------------------------------- |
|
25 // Command: The 'TRANSACTION' command which creates a transaction in the named session etc |
|
26 |
|
27 class CTestTransaction; |
|
28 |
|
29 class CCmdTransaction : public CCmdBase |
|
30 { |
|
31 public: |
|
32 |
|
33 static CCmdTransaction *NewL (TInt, const TDesC& aKeyphrase, const TDesC& aHelpPhrase); |
|
34 static CCmdTransaction *NewLC(TInt, const TDesC& aKeyphrase, const TDesC& aHelpPhrase); |
|
35 virtual ~CCmdTransaction(); |
|
36 |
|
37 // helper defs and methods for Transaction processing |
|
38 enum TTransactionModes |
|
39 { |
|
40 EIdleTransaction, |
|
41 EGetTransaction, |
|
42 EPostTransaction, |
|
43 EHeadTransaction, |
|
44 ETraceTransaction, |
|
45 |
|
46 // add new modes above this line |
|
47 EMaxTransactionModes |
|
48 }; |
|
49 |
|
50 protected: |
|
51 |
|
52 void ConstructL(TInt aCommandId, const TDesC& aKeyphrase, const TDesC& aHelpPhrase); |
|
53 CCmdTransaction() {}; // ensure a concrete class! |
|
54 |
|
55 public: |
|
56 TInt ProcessL (const TDesC& aCommand); |
|
57 |
|
58 // private methods for our own personal use! |
|
59 private: |
|
60 |
|
61 TBool checkConnectionExists(TPtrC &); |
|
62 TBool checkMethodExists(TPtrC &); |
|
63 TInt ParseCmdArgs( const TDesC& aCommand, TPtrC& aTransName, TPtrC& aConName, TPtrC& aTransMthd, |
|
64 TPtrC& aTransURI, TPtrC& aPostData); |
|
65 void ShowTransactions(); |
|
66 |
|
67 |
|
68 void CloseTransaction(RHTTPTransaction &); |
|
69 |
|
70 private: |
|
71 |
|
72 TInt iExpectedError; |
|
73 TBool iExpectError; |
|
74 TInt iTestFail; |
|
75 TInt iExpectedStatusCode; |
|
76 THTTPEvent iReceivedError; |
|
77 TInt iTransactionIndex; |
|
78 HTTP::TStrings eStrIndex; |
|
79 TBool iHasARequestBody; |
|
80 TInt iExpectedNumberRedirects; |
|
81 |
|
82 TInt iSessionEventIndex; |
|
83 TInt iTransactionEventIndex; |
|
84 }; |
|
85 |
|
86 class CCmdEndTransaction : public CCmdBase |
|
87 { |
|
88 public: |
|
89 |
|
90 static CCmdEndTransaction *NewL (TInt, const TDesC& aKeyphrase, const TDesC& aHelpPhrase); |
|
91 static CCmdEndTransaction *NewLC(TInt, const TDesC& aKeyphrase, const TDesC& aHelpPhrase); |
|
92 virtual ~CCmdEndTransaction(); |
|
93 |
|
94 protected: |
|
95 |
|
96 void ConstructL(TInt aCommandId, const TDesC& aKeyphrase, const TDesC& aHelpPhrase); |
|
97 CCmdEndTransaction() {}; // ensure a concrete class! |
|
98 |
|
99 public: |
|
100 TInt ProcessL (const TDesC& aCommand); |
|
101 |
|
102 // private methods for our own personal use! |
|
103 private: |
|
104 |
|
105 TInt ParseCmdArgs( const TDesC& aCommand, TPtrC& aTransName); |
|
106 }; |
|
107 |
|
108 class CCmdShowTransaction : public CCmdBase |
|
109 { |
|
110 public: |
|
111 |
|
112 static CCmdShowTransaction *NewL (TInt, const TDesC& aKeyphrase, const TDesC& aHelpPhrase); |
|
113 static CCmdShowTransaction *NewLC(TInt, const TDesC& aKeyphrase, const TDesC& aHelpPhrase); |
|
114 virtual ~CCmdShowTransaction(); |
|
115 |
|
116 protected: |
|
117 |
|
118 void ConstructL(TInt aCommandId, const TDesC& aKeyphrase, const TDesC& aHelpPhrase); |
|
119 CCmdShowTransaction() {}; // ensure a concrete class! |
|
120 |
|
121 public: |
|
122 TInt ProcessL (const TDesC& aCommand); |
|
123 }; |
|
124 |
|
125 //----------------------------------------------------------------------------- |
|
126 |
|
127 #endif // __HTTPTRANSACTIONCMDS_H__ |
|
128 |
|
129 //----------------------------------------------------------------------------- |
|
130 // End of File |
|
131 //----------------------------------------------------------------------------- |
|
132 |