|
1 /* |
|
2 * Copyright (c) 2008 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 "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: DownloadMgrClientApiTest test module. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef DOWNLOADMGRCLIENTAPITEST_H |
|
21 #define DOWNLOADMGRCLIENTAPITEST_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <StifTestModule.h> |
|
25 #include <StifLogger.h> |
|
26 #include <f32file.h> |
|
27 #include <DownloadMgrClient.h> |
|
28 #include <CDownloadMgrUiLibRegistry.h> |
|
29 |
|
30 // CONSTANTS |
|
31 const TInt KThisAppUid = 0x101FB3E7; |
|
32 |
|
33 // MACROS |
|
34 |
|
35 // Logging path |
|
36 _LIT( KDownloadMgrClientApiTestLogPath, "\\logs\\testframework\\DownloadMgrClientApiTest\\" ); |
|
37 // Log file |
|
38 _LIT( KDownloadMgrClientApiTestLogFile, "DownloadMgrClientApiTest.txt" ); |
|
39 |
|
40 // Function pointer related internal definitions |
|
41 // Rounding known bug in GCC |
|
42 |
|
43 #ifdef __VC32__ |
|
44 #define GETPTR |
|
45 #else |
|
46 #define GETPTR & |
|
47 #endif |
|
48 #define ENTRY(str,func) {_S(str), GETPTR func,0,0,0} |
|
49 #define FUNCENTRY(func) {_S(#func), GETPTR func,0,0,0} |
|
50 #define OOM_ENTRY(str,func,a,b,c) {_S(str), GETPTR func,a,b,c} |
|
51 #define OOM_FUNCENTRY(func,a,b,c) {_S(#func), GETPTR func,a,b,c} |
|
52 |
|
53 // DATA TYPES |
|
54 //enum ?declaration |
|
55 //typedef ?declaration |
|
56 //extern ?data_type; |
|
57 |
|
58 // FUNCTION PROTOTYPES |
|
59 //?type ?function_name(?arg_list); |
|
60 |
|
61 // FORWARD DECLARATIONS |
|
62 class CDownloadMgrClientApiTest; |
|
63 class CActiveDownloadMgrDbNotifier; |
|
64 |
|
65 // A typedef for function that does the actual testing, |
|
66 // function is a type |
|
67 // TInt CDemoModule::<NameOfFunction> ( TTestResult& aResult ) |
|
68 typedef TInt (CDownloadMgrClientApiTest::* TestFunction)(TTestResult&); |
|
69 |
|
70 // CLASS DECLARATION |
|
71 |
|
72 /** |
|
73 * An internal structure containing a test case name and |
|
74 * the pointer to function doing the test |
|
75 * |
|
76 * @lib ?library |
|
77 * @since ?Series60_version |
|
78 */ |
|
79 class TCaseInfoInternal |
|
80 { |
|
81 public: |
|
82 const TText* iCaseName; |
|
83 TestFunction iMethod; |
|
84 TBool iIsOOMTest; |
|
85 TInt iFirstMemoryAllocation; |
|
86 TInt iLastMemoryAllocation; |
|
87 }; |
|
88 |
|
89 // CLASS DECLARATION |
|
90 |
|
91 /** |
|
92 * A structure containing a test case name and |
|
93 * the pointer to function doing the test |
|
94 * |
|
95 * @lib ?library |
|
96 * @since ?Series60_version |
|
97 */ |
|
98 class TCaseInfo |
|
99 { |
|
100 public: |
|
101 TPtrC iCaseName; |
|
102 TestFunction iMethod; |
|
103 TBool iIsOOMTest; |
|
104 TInt iFirstMemoryAllocation; |
|
105 TInt iLastMemoryAllocation; |
|
106 |
|
107 TCaseInfo( const TText* a ) : iCaseName( (TText*) a ) |
|
108 { |
|
109 }; |
|
110 |
|
111 }; |
|
112 |
|
113 // CLASS DECLARATION |
|
114 |
|
115 /** |
|
116 * This a DownloadMgrBCTest class. |
|
117 * ?other_description_lines |
|
118 * |
|
119 * @lib ?library |
|
120 * @since ?Series60_version |
|
121 */ |
|
122 NONSHARABLE_CLASS(CDownloadMgrClientApiTest) : public CTestModuleBase, |
|
123 public MHttpDownloadMgrObserver, |
|
124 public MHttpDownloadMgrNextUriObserver |
|
125 { |
|
126 public: // Constructors and destructor |
|
127 |
|
128 /** |
|
129 * Two-phased constructor. |
|
130 */ |
|
131 static CDownloadMgrClientApiTest* NewL(); |
|
132 |
|
133 /** |
|
134 * Destructor. |
|
135 */ |
|
136 virtual ~CDownloadMgrClientApiTest(); |
|
137 |
|
138 public: // New functions |
|
139 |
|
140 /** |
|
141 * ?member_description. |
|
142 * @since ?Series60_version |
|
143 * @param ?arg1 ?description |
|
144 * @return ?description |
|
145 */ |
|
146 //?type ?member_function( ?type ?arg1 ); |
|
147 |
|
148 public: // Functions from base classes |
|
149 |
|
150 /** |
|
151 * From CTestModuleBase InitL is used to initialize the DownloadMgrBCTest. |
|
152 * It is called once for every instance of DownloadMgrBCTest after |
|
153 * its creation. |
|
154 * @since ?Series60_version |
|
155 * @param aIniFile Initialization file for the test module (optional) |
|
156 * @param aFirstTime Flag is true when InitL is executed for first |
|
157 * created instance of DownloadMgrBCTest. |
|
158 * @return Symbian OS error code |
|
159 */ |
|
160 TInt InitL( TFileName& aIniFile, TBool aFirstTime ); |
|
161 |
|
162 /** |
|
163 * From CTestModuleBase GetTestCasesL is used to inquiry test cases |
|
164 * from DownloadMgrBCTest. |
|
165 * @since ?Series60_version |
|
166 * @param aTestCaseFile Test case file (optional) |
|
167 * @param aTestCases Array of TestCases returned to test framework |
|
168 * @return Symbian OS error code |
|
169 */ |
|
170 TInt GetTestCasesL( const TFileName& aTestCaseFile, |
|
171 RPointerArray<TTestCaseInfo>& aTestCases ); |
|
172 |
|
173 /** |
|
174 * From CTestModuleBase RunTestCaseL is used to run an individual |
|
175 * test case. |
|
176 * @since ?Series60_version |
|
177 * @param aCaseNumber Test case number |
|
178 * @param aTestCaseFile Test case file (optional) |
|
179 * @param aResult Test case result returned to test framework (PASS/FAIL) |
|
180 * @return Symbian OS error code (test case execution error, which is |
|
181 * not reported in aResult parameter as test case failure). |
|
182 */ |
|
183 TInt RunTestCaseL( const TInt aCaseNumber, |
|
184 const TFileName& aTestCaseFile, |
|
185 TTestResult& aResult ); |
|
186 |
|
187 /** |
|
188 * From CTestModuleBase; OOMTestQueryL is used to specify is particular |
|
189 * test case going to be executed using OOM conditions |
|
190 * @param aTestCaseFile Test case file (optional) |
|
191 * @param aCaseNumber Test case number (optional) |
|
192 * @param aFailureType OOM failure type (optional) |
|
193 * @param aFirstMemFailure The first heap memory allocation failure value (optional) |
|
194 * @param aLastMemFailure The last heap memory allocation failure value (optional) |
|
195 * @return TBool |
|
196 */ |
|
197 virtual TBool OOMTestQueryL( const TFileName& /* aTestCaseFile */, |
|
198 const TInt /* aCaseNumber */, |
|
199 TOOMFailureType& /* aFailureType */, |
|
200 TInt& /* aFirstMemFailure */, |
|
201 TInt& /* aLastMemFailure */ ); |
|
202 |
|
203 /** |
|
204 * From CTestModuleBase; User may add implementation for OOM test |
|
205 * environment initialization. Usually no implementation is required. |
|
206 * @param aTestCaseFile Test case file (optional) |
|
207 * @param aCaseNumber Test case number (optional) |
|
208 * @return None |
|
209 */ |
|
210 virtual void OOMTestInitializeL( const TFileName& /* aTestCaseFile */, |
|
211 const TInt /* aCaseNumber */ ); |
|
212 |
|
213 /** |
|
214 * From CTestModuleBase; OOMHandleWarningL. User may add implementation |
|
215 * for OOM test warning handling. Usually no implementation is required. |
|
216 * @param aTestCaseFile Test case file (optional) |
|
217 * @param aCaseNumber Test case number (optional) |
|
218 * @param aFailNextValue FailNextValue for OOM test execution (optional) |
|
219 * @return None |
|
220 */ |
|
221 virtual void OOMHandleWarningL( const TFileName& /* aTestCaseFile */, |
|
222 const TInt /* aCaseNumber */, |
|
223 TInt& /* aFailNextValue */); |
|
224 |
|
225 /** |
|
226 * From CTestModuleBase; OOMTestFinalizeL may be used to finalize OOM |
|
227 * test environment. Usually no implementation is required. |
|
228 * @param aTestCaseFile Test case file (optional) |
|
229 * @param aCaseNumber Test case number (optional) |
|
230 * @return None |
|
231 */ |
|
232 virtual void OOMTestFinalizeL( const TFileName& /* aTestCaseFile */, |
|
233 const TInt /* aCaseNumber */ ); |
|
234 |
|
235 private: // from MHttpDownloadMgrObserver |
|
236 |
|
237 void HandleDMgrEventL( RHttpDownload& aDownload, THttpDownloadEvent aEvent ); |
|
238 |
|
239 private: // from MHttpDownloadMgrObserver |
|
240 |
|
241 void NextUriL( RHttpDownload& aDownload, const TDesC8& aUri ); |
|
242 |
|
243 private: // Functions to test RHttpDownload interface |
|
244 |
|
245 /** |
|
246 * RHttpDownload Start test case. |
|
247 * @since ?Series60_version |
|
248 * @param aResult Test case result (PASS/FAIL) |
|
249 * @return Symbian OS error code (test case execution error |
|
250 * that is not returned as test case result in aResult) |
|
251 */ |
|
252 TInt DownloadStartTest( TTestResult& aResult ); |
|
253 |
|
254 /** |
|
255 * RHttpDownload Pause test case. |
|
256 * @since ?Series60_version |
|
257 * @param aResult Test case result (PASS/FAIL) |
|
258 * @return Symbian OS error code (test case execution error |
|
259 * that is not returned as test case result in aResult) |
|
260 */ |
|
261 TInt DownloadPauseTest( TTestResult& aResult ); |
|
262 |
|
263 /** |
|
264 * RHttpDownload Reset test case. |
|
265 * @since ?Series60_version |
|
266 * @param aResult Test case result (PASS/FAIL) |
|
267 * @return Symbian OS error code (test case execution error |
|
268 * that is not returned as test case result in aResult) |
|
269 */ |
|
270 TInt DownloadResetTest( TTestResult& aResult ); |
|
271 |
|
272 /** |
|
273 * RHttpDownload Delete test case. |
|
274 * @since ?Series60_version |
|
275 * @param aResult Test case result (PASS/FAIL) |
|
276 * @return Symbian OS error code (test case execution error |
|
277 * that is not returned as test case result in aResult) |
|
278 */ |
|
279 TInt DownloadDeleteTest( TTestResult& aResult ); |
|
280 |
|
281 /** |
|
282 * RHttpDownload Move test case. |
|
283 * @since ?Series60_version |
|
284 * @param aResult Test case result (PASS/FAIL) |
|
285 * @return Symbian OS error code (test case execution error |
|
286 * that is not returned as test case result in aResult) |
|
287 */ |
|
288 TInt DownloadMoveTest( TTestResult& aResult ); |
|
289 |
|
290 /** |
|
291 * RHttpDownload GetIntAttribute test case. |
|
292 * @since ?Series60_version |
|
293 * @param aResult Test case result (PASS/FAIL) |
|
294 * @return Symbian OS error code (test case execution error |
|
295 * that is not returned as test case result in aResult) |
|
296 */ |
|
297 TInt DownloadGetIntAttributeTest( TTestResult& aResult ); |
|
298 |
|
299 /** |
|
300 * RHttpDownload GetBoolAttribute test case. |
|
301 * @since ?Series60_version |
|
302 * @param aResult Test case result (PASS/FAIL) |
|
303 * @return Symbian OS error code (test case execution error |
|
304 * that is not returned as test case result in aResult) |
|
305 */ |
|
306 TInt DownloadGetBoolAttributeTest( TTestResult& aResult ); |
|
307 |
|
308 /** |
|
309 * RHttpDownload GetStringAttribute test case with TDes16 argument. |
|
310 * @since ?Series60_version |
|
311 * @param aResult Test case result (PASS/FAIL) |
|
312 * @return Symbian OS error code (test case execution error |
|
313 * that is not returned as test case result in aResult) |
|
314 */ |
|
315 TInt DownloadGetStringAttribute16Test( TTestResult& aResult ); |
|
316 |
|
317 /** |
|
318 * RHttpDownload GetStringAttribute test case with TDes8 argument. |
|
319 * @since ?Series60_version |
|
320 * @param aResult Test case result (PASS/FAIL) |
|
321 * @return Symbian OS error code (test case execution error |
|
322 * that is not returned as test case result in aResult) |
|
323 */ |
|
324 TInt DownloadGetStringAttribute8Test( TTestResult& aResult ); |
|
325 |
|
326 /** |
|
327 * RHttpDownload GetFileHandleAttribute test case. |
|
328 * @since ?Series60_version |
|
329 * @param aResult Test case result (PASS/FAIL) |
|
330 * @return Symbian OS error code (test case execution error |
|
331 * that is not returned as test case result in aResult) |
|
332 */ |
|
333 TInt DownloadGetFileHandleAttributeTest( TTestResult& aResult ); |
|
334 |
|
335 /** |
|
336 * RHttpDownload SetIntAttribute test case. |
|
337 * @since ?Series60_version |
|
338 * @param aResult Test case result (PASS/FAIL) |
|
339 * @return Symbian OS error code (test case execution error |
|
340 * that is not returned as test case result in aResult) |
|
341 */ |
|
342 TInt DownloadSetIntAttributeTest( TTestResult& aResult ); |
|
343 |
|
344 /** |
|
345 * RHttpDownload SetBoolAttribute test case. |
|
346 * @since ?Series60_version |
|
347 * @param aResult Test case result (PASS/FAIL) |
|
348 * @return Symbian OS error code (test case execution error |
|
349 * that is not returned as test case result in aResult) |
|
350 */ |
|
351 TInt DownloadSetBoolAttributeTest( TTestResult& aResult ); |
|
352 |
|
353 /** |
|
354 * RHttpDownload SetStringAttribute test case with TDes16 argument. |
|
355 * @since ?Series60_version |
|
356 * @param aResult Test case result (PASS/FAIL) |
|
357 * @return Symbian OS error code (test case execution error |
|
358 * that is not returned as test case result in aResult) |
|
359 */ |
|
360 TInt DownloadSetStringAttribute16Test( TTestResult& aResult ); |
|
361 |
|
362 /** |
|
363 * RHttpDownload SetStringAttribute test case with TDes8 argument. |
|
364 * @since ?Series60_version |
|
365 * @param aResult Test case result (PASS/FAIL) |
|
366 * @return Symbian OS error code (test case execution error |
|
367 * that is not returned as test case result in aResult) |
|
368 */ |
|
369 TInt DownloadSetStringAttribute8Test( TTestResult& aResult ); |
|
370 |
|
371 /** |
|
372 * RHttpDownload SetFileHandleAttribute test case. |
|
373 * @since ?Series60_version |
|
374 * @param aResult Test case result (PASS/FAIL) |
|
375 * @return Symbian OS error code (test case execution error |
|
376 * that is not returned as test case result in aResult) |
|
377 */ |
|
378 TInt DownloadSetFileHandleAttributeTest( TTestResult& aResult ); |
|
379 |
|
380 private: // Functions to test RHttpDownloadMgr interface |
|
381 |
|
382 /** |
|
383 * RHttpDownloadMgr ConnectL test case. |
|
384 * @since ?Series60_version |
|
385 * @param aResult Test case result (PASS/FAIL) |
|
386 * @return Symbian OS error code (test case execution error |
|
387 * that is not returned as test case result in aResult) |
|
388 */ |
|
389 TInt ManagerConnectLTest( TTestResult& aResult ); |
|
390 |
|
391 /** |
|
392 * RHttpDownloadMgr Version test case. |
|
393 * @since ?Series60_version |
|
394 * @param aResult Test case result (PASS/FAIL) |
|
395 * @return Symbian OS error code (test case execution error |
|
396 * that is not returned as test case result in aResult) |
|
397 */ |
|
398 TInt ManagerVersionTest( TTestResult& aResult ); |
|
399 |
|
400 /** |
|
401 * RHttpDownloadMgr Close test case. |
|
402 * @since ?Series60_version |
|
403 * @param aResult Test case result (PASS/FAIL) |
|
404 * @return Symbian OS error code (test case execution error |
|
405 * that is not returned as test case result in aResult) |
|
406 */ |
|
407 TInt ManagerCloseTest( TTestResult& aResult ); |
|
408 |
|
409 /** |
|
410 * RHttpDownloadMgr CurrentDownloads test case. |
|
411 * @since ?Series60_version |
|
412 * @param aResult Test case result (PASS/FAIL) |
|
413 * @return Symbian OS error code (test case execution error |
|
414 * that is not returned as test case result in aResult) |
|
415 */ |
|
416 TInt ManagerCurrentDownloadsTest( TTestResult& aResult ); |
|
417 |
|
418 /** |
|
419 * RHttpDownloadMgr CreateDownloadL test case. |
|
420 * @since ?Series60_version |
|
421 * @param aResult Test case result (PASS/FAIL) |
|
422 * @return Symbian OS error code (test case execution error |
|
423 * that is not returned as test case result in aResult) |
|
424 */ |
|
425 TInt ManagerCreateDownloadLWithBoolTest( TTestResult& aResult ); |
|
426 |
|
427 /** |
|
428 * RHttpDownloadMgr CreateDownloadL test case. |
|
429 * @since ?Series60_version |
|
430 * @param aResult Test case result (PASS/FAIL) |
|
431 * @return Symbian OS error code (test case execution error |
|
432 * that is not returned as test case result in aResult) |
|
433 */ |
|
434 TInt ManagerCreateDownloadLTest( TTestResult& aResult ); |
|
435 |
|
436 /** |
|
437 * RHttpDownloadMgr CreateClientSideDownloadL test case. |
|
438 * @since ?Series60_version |
|
439 * @param aResult Test case result (PASS/FAIL) |
|
440 * @return Symbian OS error code (test case execution error |
|
441 * that is not returned as test case result in aResult) |
|
442 */ |
|
443 TInt ManagerCreateClientSideDownloadLTest( TTestResult& aResult ); |
|
444 |
|
445 /** |
|
446 * RHttpDownloadMgr CreateCodDownloadL test case. |
|
447 * @since ?Series60_version |
|
448 * @param aResult Test case result (PASS/FAIL) |
|
449 * @return Symbian OS error code (test case execution error |
|
450 * that is not returned as test case result in aResult) |
|
451 */ |
|
452 TInt ManagerCreateCodDownloadLTest( TTestResult& aResult ); |
|
453 |
|
454 /** |
|
455 * RHttpDownloadMgr FindDownload test case. |
|
456 * @since ?Series60_version |
|
457 * @param aResult Test case result (PASS/FAIL) |
|
458 * @return Symbian OS error code (test case execution error |
|
459 * that is not returned as test case result in aResult) |
|
460 */ |
|
461 TInt ManagerFindDownloadTest( TTestResult& aResult ); |
|
462 |
|
463 /** |
|
464 * RHttpDownloadMgr PauseAll test case. |
|
465 * @since ?Series60_version |
|
466 * @param aResult Test case result (PASS/FAIL) |
|
467 * @return Symbian OS error code (test case execution error |
|
468 * that is not returned as test case result in aResult) |
|
469 */ |
|
470 TInt ManagerPauseAllTest( TTestResult& aResult ); |
|
471 |
|
472 /** |
|
473 * RHttpDownloadMgr StartAll test case. |
|
474 * @since ?Series60_version |
|
475 * @param aResult Test case result (PASS/FAIL) |
|
476 * @return Symbian OS error code (test case execution error |
|
477 * that is not returned as test case result in aResult) |
|
478 */ |
|
479 TInt ManagerStartAllTest( TTestResult& aResult ); |
|
480 |
|
481 /** |
|
482 * RHttpDownloadMgr ResetAll test case. |
|
483 * @since ?Series60_version |
|
484 * @param aResult Test case result (PASS/FAIL) |
|
485 * @return Symbian OS error code (test case execution error |
|
486 * that is not returned as test case result in aResult) |
|
487 */ |
|
488 TInt ManagerResetAllTest( TTestResult& aResult ); |
|
489 |
|
490 /** |
|
491 * RHttpDownloadMgr DeleteAll test case. |
|
492 * @since ?Series60_version |
|
493 * @param aResult Test case result (PASS/FAIL) |
|
494 * @return Symbian OS error code (test case execution error |
|
495 * that is not returned as test case result in aResult) |
|
496 */ |
|
497 TInt ManagerDeleteAllTest( TTestResult& aResult ); |
|
498 |
|
499 /** |
|
500 * RHttpDownloadMgr Disconnect test case. |
|
501 * @since ?Series60_version |
|
502 * @param aResult Test case result (PASS/FAIL) |
|
503 * @return Symbian OS error code (test case execution error |
|
504 * that is not returned as test case result in aResult) |
|
505 */ |
|
506 TInt ManagerDisconnectTest( TTestResult& aResult ); |
|
507 |
|
508 /** |
|
509 * RHttpDownloadMgr GetIntAttribute test case. |
|
510 * @since ?Series60_version |
|
511 * @param aResult Test case result (PASS/FAIL) |
|
512 * @return Symbian OS error code (test case execution error |
|
513 * that is not returned as test case result in aResult) |
|
514 */ |
|
515 TInt ManagerGetIntAttributeTest( TTestResult& aResult ); |
|
516 |
|
517 /** |
|
518 * RHttpDownloadMgr GetBoolAttribute test case. |
|
519 * @since ?Series60_version |
|
520 * @param aResult Test case result (PASS/FAIL) |
|
521 * @return Symbian OS error code (test case execution error |
|
522 * that is not returned as test case result in aResult) |
|
523 */ |
|
524 TInt ManagerGetBoolAttributeTest( TTestResult& aResult ); |
|
525 |
|
526 /** |
|
527 * RHttpDownloadMgr GetStringAttribute test case. |
|
528 * @since ?Series60_version |
|
529 * @param aResult Test case result (PASS/FAIL) |
|
530 * @return Symbian OS error code (test case execution error |
|
531 * that is not returned as test case result in aResult) |
|
532 */ |
|
533 TInt ManagerGetStringAttribute16Test( TTestResult& aResult ); |
|
534 |
|
535 /** |
|
536 * RHttpDownloadMgr GetStringAttribute test case. |
|
537 * @since ?Series60_version |
|
538 * @param aResult Test case result (PASS/FAIL) |
|
539 * @return Symbian OS error code (test case execution error |
|
540 * that is not returned as test case result in aResult) |
|
541 */ |
|
542 TInt ManagerGetStringAttribute8Test( TTestResult& aResult ); |
|
543 |
|
544 /** |
|
545 * RHttpDownloadMgr SetIntAttribute test case. |
|
546 * @since ?Series60_version |
|
547 * @param aResult Test case result (PASS/FAIL) |
|
548 * @return Symbian OS error code (test case execution error |
|
549 * that is not returned as test case result in aResult) |
|
550 */ |
|
551 TInt ManagerSetIntAttributeTest( TTestResult& aResult ); |
|
552 |
|
553 /** |
|
554 * RHttpDownloadMgr SetBoolAttribute test case. |
|
555 * @since ?Series60_version |
|
556 * @param aResult Test case result (PASS/FAIL) |
|
557 * @return Symbian OS error code (test case execution error |
|
558 * that is not returned as test case result in aResult) |
|
559 */ |
|
560 TInt ManagerSetBoolAttributeTest( TTestResult& aResult ); |
|
561 |
|
562 /** |
|
563 * RHttpDownloadMgr SetStringAttribute test case. |
|
564 * @since ?Series60_version |
|
565 * @param aResult Test case result (PASS/FAIL) |
|
566 * @return Symbian OS error code (test case execution error |
|
567 * that is not returned as test case result in aResult) |
|
568 */ |
|
569 TInt ManagerSetStringAttribute16Test( TTestResult& aResult ); |
|
570 |
|
571 /** |
|
572 * RHttpDownloadMgr SetStringAttribute test case. |
|
573 * @since ?Series60_version |
|
574 * @param aResult Test case result (PASS/FAIL) |
|
575 * @return Symbian OS error code (test case execution error |
|
576 * that is not returned as test case result in aResult) |
|
577 */ |
|
578 TInt ManagerSetStringAttribute8Test( TTestResult& aResult ); |
|
579 |
|
580 /** |
|
581 * RHttpDownloadMgr SetDefaultIntAttribute test case. |
|
582 * @since ?Series60_version |
|
583 * @param aResult Test case result (PASS/FAIL) |
|
584 * @return Symbian OS error code (test case execution error |
|
585 * that is not returned as test case result in aResult) |
|
586 */ |
|
587 TInt ManagerSetDefaultIntAttributeTest( TTestResult& aResult ); |
|
588 |
|
589 /** |
|
590 * RHttpDownloadMgr SetDefaultBoolAttribute test case. |
|
591 * @since ?Series60_version |
|
592 * @param aResult Test case result (PASS/FAIL) |
|
593 * @return Symbian OS error code (test case execution error |
|
594 * that is not returned as test case result in aResult) |
|
595 */ |
|
596 TInt ManagerSetDefaultBoolAttributeTest( TTestResult& aResult ); |
|
597 |
|
598 /** |
|
599 * RHttpDownloadMgr SetDefaultStringAttribute test case. |
|
600 * @since ?Series60_version |
|
601 * @param aResult Test case result (PASS/FAIL) |
|
602 * @return Symbian OS error code (test case execution error |
|
603 * that is not returned as test case result in aResult) |
|
604 */ |
|
605 TInt ManagerSetDefaultStringAttribute16Test( TTestResult& aResult ); |
|
606 |
|
607 /** |
|
608 * RHttpDownloadMgr SetDefaultStringAttribute test case. |
|
609 * @since ?Series60_version |
|
610 * @param aResult Test case result (PASS/FAIL) |
|
611 * @return Symbian OS error code (test case execution error |
|
612 * that is not returned as test case result in aResult) |
|
613 */ |
|
614 TInt ManagerSetDefaultStringAttribute8Test( TTestResult& aResult ); |
|
615 |
|
616 /** |
|
617 * RHttpDownloadMgr AddObserverL test case. |
|
618 * @since ?Series60_version |
|
619 * @param aResult Test case result (PASS/FAIL) |
|
620 * @return Symbian OS error code (test case execution error |
|
621 * that is not returned as test case result in aResult) |
|
622 */ |
|
623 TInt ManagerAddObserverLTest( TTestResult& aResult ); |
|
624 |
|
625 /** |
|
626 * RHttpDownloadMgr RemoveObserver test case. |
|
627 * @since ?Series60_version |
|
628 * @param aResult Test case result (PASS/FAIL) |
|
629 * @return Symbian OS error code (test case execution error |
|
630 * that is not returned as test case result in aResult) |
|
631 */ |
|
632 TInt ManagerRemoveObserverTest( TTestResult& aResult ); |
|
633 |
|
634 /** |
|
635 * RHttpDownloadMgr SetNextUriObserver test case. |
|
636 * @since ?Series60_version |
|
637 * @param aResult Test case result (PASS/FAIL) |
|
638 * @return Symbian OS error code (test case execution error |
|
639 * that is not returned as test case result in aResult) |
|
640 */ |
|
641 TInt ManagerSetNextUriObserverTest( TTestResult& aResult ); |
|
642 |
|
643 private: |
|
644 |
|
645 /** |
|
646 * C++ default constructor. |
|
647 */ |
|
648 CDownloadMgrClientApiTest(); |
|
649 |
|
650 /** |
|
651 * By default Symbian 2nd phase constructor is private. |
|
652 */ |
|
653 void ConstructL(); |
|
654 |
|
655 // Prohibit copy constructor if not deriving from CBase. |
|
656 // ?classname( const ?classname& ); |
|
657 // Prohibit assigment operator if not deriving from CBase. |
|
658 // ?classname& operator=( const ?classname& ); |
|
659 |
|
660 /** |
|
661 * Function returning test case name and pointer to test case function. |
|
662 * @since ?Series60_version |
|
663 * @param aCaseNumber test case number |
|
664 * @return TCaseInfo |
|
665 */ |
|
666 const TCaseInfo Case ( const TInt aCaseNumber ) const; |
|
667 |
|
668 public: // Data |
|
669 // ?one_line_short_description_of_data |
|
670 //?data_declaration; |
|
671 |
|
672 protected: // Data |
|
673 // ?one_line_short_description_of_data |
|
674 //?data_declaration; |
|
675 |
|
676 private: // Data |
|
677 // Pointer to test (function) to be executed |
|
678 TestFunction iMethod; |
|
679 |
|
680 CStifLogger * iLog; |
|
681 |
|
682 RFs iFileSystem; |
|
683 RHttpDownloadMgr iDownloadManager; |
|
684 |
|
685 // Reserved pointer for future extension |
|
686 //TAny* iReserved; |
|
687 |
|
688 public: // Friend classes |
|
689 //?friend_class_declaration; |
|
690 protected: // Friend classes |
|
691 //?friend_class_declaration; |
|
692 private: // Friend classes |
|
693 //?friend_class_declaration; |
|
694 |
|
695 }; |
|
696 |
|
697 #endif // DOWNLOADMGRCLIENTAPITEST_H |
|
698 |
|
699 // End of File |