|
1 /* |
|
2 * Copyright (c) 2002 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 "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Class declarations for Module Test Automation Code for |
|
15 * Provisioning |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 // INCLUDES |
|
27 #include <StifLogger.h> |
|
28 #include <TestScripterInternal.h> |
|
29 #include <StifTestModule.h> |
|
30 #include <CWPEngine.h> |
|
31 #include <MWPContextObserver.h> |
|
32 #include <BADESCA.h> |
|
33 |
|
34 // CONSTANTS |
|
35 //const ?type ?constant_var = ?constant; |
|
36 |
|
37 // MACROS |
|
38 //#define ?macro ?macro_def |
|
39 // Logging path |
|
40 _LIT(KmoduletestprovisioningLogPath, |
|
41 "\\logs\\testframework\\moduletestprovisioning\\"); |
|
42 // Log file |
|
43 _LIT(KmoduletestprovisioningLogFile, "moduletestprovisioning.txt"); |
|
44 |
|
45 _LIT(KProxy, "PROXY_TEST"); |
|
46 _LIT(KTPS, "TPS"); |
|
47 _LIT(KName, "TEST_CASE_CONTEXT"); |
|
48 |
|
49 // FUNCTION PROTOTYPES |
|
50 //?type ?function_name(?arg_list); |
|
51 |
|
52 // FORWARD DECLARATIONS |
|
53 //class ?FORWARD_CLASSNAME; |
|
54 class Cmoduletestprovisioning; |
|
55 class CWPContextObserver; |
|
56 |
|
57 // DATA TYPES |
|
58 //enum ?declaration |
|
59 //typedef ?declaration |
|
60 //extern ?data_type; |
|
61 |
|
62 // CLASS DECLARATION |
|
63 |
|
64 /** |
|
65 * Cmoduletestprovisioning test class for STIF Test Framework TestScripter. |
|
66 * ?other_description_lines |
|
67 * |
|
68 * @lib ?library |
|
69 * @since ?Series60_version |
|
70 */ |
|
71 NONSHARABLE_CLASS(Cmoduletestprovisioning) : public CScriptBase |
|
72 { |
|
73 public: // Constructors and destructor |
|
74 |
|
75 /** |
|
76 * Two-phased constructor. |
|
77 */ |
|
78 static Cmoduletestprovisioning* NewL( CTestModuleIf& aTestModuleIf ); |
|
79 |
|
80 /** |
|
81 * Destructor. |
|
82 */ |
|
83 virtual ~Cmoduletestprovisioning(); |
|
84 |
|
85 public: // New functions |
|
86 |
|
87 /** |
|
88 * ?member_description. |
|
89 * @since ?Series60_version |
|
90 * @param ?arg1 ?description |
|
91 * @return ?description |
|
92 */ |
|
93 //?type ?member_function( ?type ?arg1 ); |
|
94 |
|
95 public: // Functions from base classes |
|
96 |
|
97 /** |
|
98 * From CScriptBase Runs a script line. |
|
99 * @since ?Series60_version |
|
100 * @param aItem Script line containing method name and parameters |
|
101 * @return Symbian OS error code |
|
102 */ |
|
103 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
104 |
|
105 protected: // New functions |
|
106 |
|
107 /** |
|
108 * ?member_description. |
|
109 * @since ?Series60_version |
|
110 * @param ?arg1 ?description |
|
111 * @return ?description |
|
112 */ |
|
113 //?type ?member_function( ?type ?arg1 ); |
|
114 |
|
115 protected: // Functions from base classes |
|
116 |
|
117 /** |
|
118 * From ?base_class ?member_description |
|
119 */ |
|
120 //?type ?member_function(); |
|
121 |
|
122 private: |
|
123 |
|
124 /** |
|
125 * C++ default constructor. |
|
126 */ |
|
127 Cmoduletestprovisioning( CTestModuleIf& aTestModuleIf ); |
|
128 |
|
129 /** |
|
130 * By default Symbian 2nd phase constructor is private. |
|
131 */ |
|
132 void ConstructL(); |
|
133 |
|
134 // Prohibit copy constructor if not deriving from CBase. |
|
135 // ?classname( const ?classname& ); |
|
136 // Prohibit assigment operator if not deriving from CBase. |
|
137 // ?classname& operator=( const ?classname& ); |
|
138 |
|
139 /** |
|
140 * Frees all resources allocated from test methods. |
|
141 * @since ?Series60_version |
|
142 */ |
|
143 void Delete(); |
|
144 |
|
145 /** |
|
146 * Test methods are listed below. |
|
147 */ |
|
148 |
|
149 /** |
|
150 * Example test method. |
|
151 * @since ?Series60_version |
|
152 * @param aItem Script line containing parameters. |
|
153 * @return Symbian OS error code. |
|
154 */ |
|
155 virtual TInt ExampleL( CStifItemParser& aItem ); |
|
156 //ADD NEW METHOD DEC HERE |
|
157 virtual TInt CreateandDeleteL( ); |
|
158 HBufC8* GetfilecontentsL(TPtrC aString ); |
|
159 TInt ImportDocumentL(CStifItemParser& aItem ); |
|
160 void SetUpEngineL( ); |
|
161 TInt PopulateL(); |
|
162 TInt ImportL(CStifItemParser& aItem); |
|
163 TInt ItemCountL(CStifItemParser& aItem); |
|
164 TInt InternAndExternL(CStifItemParser& aItem); |
|
165 TInt SaveL(CStifItemParser& aItem); |
|
166 TInt SummaryTitleandTextL(CStifItemParser& aItem ); |
|
167 TInt SetAsDefaultL(CStifItemParser& aItem); |
|
168 TInt StoreAndRestoreL(CStifItemParser& aItem); |
|
169 TInt DetailsL(CStifItemParser& aItem); |
|
170 TInt CreateContextL(CStifItemParser& aItem); |
|
171 TInt DeleteContextL(CStifItemParser& aItem); |
|
172 TInt ContextDataCountL( ); |
|
173 TInt ContextUidsL( ); |
|
174 TUint32 ContextcreateL( ); |
|
175 TInt ContextNameL( ); |
|
176 TInt ContextTPSL( ); |
|
177 TInt ContextProxiesL( ); |
|
178 TInt ContextL(CStifItemParser& aItem); |
|
179 TInt BuilderL(); |
|
180 TInt CurrentContextL(); |
|
181 TInt CreateparameterNewL(); |
|
182 TInt CreateparameterNewLC(); |
|
183 TInt CSetandGetparamIDL(); |
|
184 TInt CSetandGetparamNameL(); |
|
185 TInt CSetandGetparamValueL(); |
|
186 TInt InternAndExternparamL(); |
|
187 TInt GetparamTypeL(); |
|
188 TInt InsertCharacteristicL(); |
|
189 TInt InsertLinkCharacteristicL(); |
|
190 TInt SetandGetCharacternameL(); |
|
191 TInt SetDataCharacteristicL(); |
|
192 TInt SetIndexDataCharacteristicL(); |
|
193 TInt DeleteAllDataCharacteristicL(); |
|
194 TInt GetParamValuecharactristicL(); |
|
195 TInt AccesspointL(); |
|
196 TInt ReadHBufCL(CStifItemParser& aItem ); |
|
197 TInt CheckURI( CStifItemParser& aItem ); |
|
198 TInt CheckIPV6( CStifItemParser& aItem ); |
|
199 TInt CheckIPV4( CStifItemParser& aItem ); |
|
200 TInt CWPAdapterL(); |
|
201 TInt DeleteContextDataL( ); |
|
202 TInt ContextExistsForUidL(); |
|
203 TInt ContextExistsForTPSL( CStifItemParser& aItem ); |
|
204 TInt CharacteristicSetData1L( ); |
|
205 TInt CharacteristicSetData2L( ); |
|
206 TInt AcceptL(); |
|
207 TInt ExternparamL(); |
|
208 TInt NewLEngineL(); |
|
209 TInt CreateandDeleteNewL( ); |
|
210 void SetUpContextObserverL(TInt data); |
|
211 TInt RegisterContextObserverL(); |
|
212 TInt UnRegisterContextObserverL(); |
|
213 TInt CreateSetAPL(TPtrC& aOrig); |
|
214 TInt SetAPDetailsL(CStifItemParser& aItem ); |
|
215 TInt GetAPIDL(CStifItemParser& aItem); |
|
216 |
|
217 //TInt AcceptL(CStifItemParser& aItem); |
|
218 public: // Data |
|
219 // ?one_line_short_description_of_data |
|
220 //?data_declaration; |
|
221 |
|
222 protected: // Data |
|
223 // ?one_line_short_description_of_data |
|
224 //?data_declaration; |
|
225 |
|
226 private: // Data |
|
227 |
|
228 // ?one_line_short_description_of_data |
|
229 //?data_declaration; |
|
230 |
|
231 // Reserved pointer for future extension |
|
232 //TAny* iReserved; |
|
233 |
|
234 public: // Friend classes |
|
235 //?friend_class_declaration; |
|
236 protected: // Friend classes |
|
237 //?friend_class_declaration; |
|
238 private: // Friend classes |
|
239 //?friend_class_declaration; |
|
240 CWPEngine* iEngine; |
|
241 CDesC16Array* iProxies; |
|
242 TBool flag; |
|
243 //Context Observer |
|
244 CWPContextObserver* iObserver; |
|
245 }; |
|
246 // Class declaration of Context Observer |
|
247 // This class is used for creating a dummy object |
|
248 // of Context observer |
|
249 class CWPContextObserver : public CBase, public MWPContextObserver |
|
250 { |
|
251 public: |
|
252 |
|
253 //Constructors |
|
254 void ConstructL(TInt data); |
|
255 static CWPContextObserver* NewL(TInt data); |
|
256 |
|
257 //Destructor. |
|
258 virtual ~CWPContextObserver(); |
|
259 |
|
260 /** |
|
261 * Called when the context database is changed. |
|
262 */ |
|
263 void ContextChangeL(RDbNotifier::TEvent aEvent); |
|
264 |
|
265 private: |
|
266 CWPContextObserver(); |
|
267 |
|
268 private: |
|
269 TInt data; |
|
270 }; |
|
271 |
|
272 // End of File |