First public contribution.
2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
21 #if (!defined __MANAGER_STEP_H__)
22 #define __MANAGER_STEP_H__
23 #include <test/testexecutestepbase.h>
26 #include <caf/dirstreamable.h>
27 #include "contentIterator.h"
29 // Constants used to name test cases
30 _LIT(KCAFDeleteStep,"CAFDeleteStep");
31 _LIT(KCAFCopyFileStep,"CAFCopyFileStep");
32 _LIT(KCAFRenameFileStep,"CAFRenameFileStep");
33 _LIT(KCAFMkDirStep,"CAFMkDirStep");
34 _LIT(KCAFMkDirAllStep,"CAFMkDirAllStep");
35 _LIT(KCAFRmDirStep,"CAFRmDirStep");
36 _LIT(KCAFGetDirStep,"CAFGetDirStep");
37 _LIT(KCAFManagerNotifyStep,"CAFManagerNotifyStep");
38 _LIT(KCAFManagerSetPropertyStep,"CAFManagerSetPropertyStep");
39 _LIT(KCAFManagerDisplayInfoStep,"CAFManagerDisplayInfoStep");
40 _LIT(KCAFManagerListAgentsStep,"CAFManagerListAgentsStep");
41 _LIT(KCAFManagerAgentSpecificStep,"CAFManagerAgentSpecificStep");
42 _LIT(KCAFManagerDisplayConfigStep,"CAFManagerDisplayConfigStep");
43 _LIT(KCAFManagerAttributeStep,"CAFManagerAttributeStep");
44 _LIT(KCAFManagerAttributeSetStep,"CAFManagerAttributeSetStep");
45 _LIT(KCAFManagerStringAttributeStep,"CAFManagerStringAttributeStep");
46 _LIT(KCAFManagerStringAttributeSetStep,"CAFManagerStringAttributeSetStep");
47 _LIT(KCAFManagerDisplayInfoByFileHandleStep,"CAFManagerDisplayInfoByFileHandleStep");
48 _LIT(KCAFManagerAttributeByFileHandleStep,"CAFManagerAttributeByFileHandleStep");
49 _LIT(KCAFManagerAttributeSetByFileHandleStep,"CAFManagerAttributeSetByFileHandleStep");
50 _LIT(KCAFManagerStringAttributeByFileHandleStep,"CAFManagerStringAttributeByFileHandleStep");
51 _LIT(KCAFManagerStringAttributeSetByFileHandleStep,"CAFManagerStringAttributeSetByFileHandleStep");
58 * Used to test CManager::DeleteFile()
59 * The INI file specifies the file to delete and the expected return code.
60 * For instance this can be used to try and delete a file that does not exist or a file
61 * that is read-only or has rights that don't allow it to be deleted
62 * INI file paramerters
64 * filename - the file to delete
66 * result - the expected return code
68 * @internalComponent Exposure internally
70 class CCAFDeleteStep : public CCAFStep
73 CCAFDeleteStep(CCAFServer& aParent);
75 virtual TVerdict doTestStepL();
81 * Used to test CManager::CopyFile()
82 * The INI file specifies the file to delete and the expected return code.
83 * For instance this can be used to try and delete a file that does not exist or a file
84 * that is read-only or has rights that don't allow it to be deleted
85 * INI file paramerters
87 source - the source file
88 destination - the destination file
89 result - the expected return code
91 * @internalComponent Exposure internally
93 class CCAFCopyFileStep : public CCAFStep
96 CCAFCopyFileStep(CCAFServer& aParent);
98 virtual TVerdict doTestStepL();
104 * Used to test CManager::RenameFile()
105 * The INI file specifies the file to delete and the expected return code.
106 * For instance this can be used to try and delete a file that does not exist or a file
107 * that is read-only or has rights that don't allow it to be deleted
108 * INI file paramerters
110 source - the source file
111 destination - the destination file
112 result - the expected return code
114 * @internalComponent Exposure internally
116 class CCAFRenameFileStep : public CCAFStep
119 CCAFRenameFileStep(CCAFServer& aParent);
120 ~CCAFRenameFileStep();
121 virtual TVerdict doTestStepL();
127 * Used to test CManager::MkDir()
128 * The INI file specifies the file to delete and the expected return code.
129 * For instance this can be used to try and delete a file that does not exist or a file
130 * that is read-only or has rights that don't allow it to be deleted
131 * INI file paramerters
133 path - the directory to create
134 result - the expected return code
136 * @internalComponent Exposure internally
138 class CCAFMkDirStep : public CCAFStep
141 CCAFMkDirStep(CCAFServer& aParent);
143 virtual TVerdict doTestStepL();
149 * Used to test CManager::MkDirAll()
150 * The INI file specifies the file to delete and the expected return code.
151 * For instance this can be used to try and delete a file that does not exist or a file
152 * that is read-only or has rights that don't allow it to be deleted
153 * INI file paramerters
155 path - the directory to create
156 result - the expected return code
158 * @internalComponent Exposure internally
160 class CCAFMkDirAllStep : public CCAFStep
163 CCAFMkDirAllStep(CCAFServer& aParent);
165 virtual TVerdict doTestStepL();
171 * Used to test CManager::RmDir()
172 * The INI file specifies the file to delete and the expected return code.
173 * For instance this can be used to try and delete a file that does not exist or a file
174 * that is read-only or has rights that don't allow it to be deleted
175 * INI file paramerters
177 path - the directory to create
178 result - the expected return code
180 * @internalComponent Exposure internally
182 class CCAFRmDirStep : public CCAFStep
185 CCAFRmDirStep(CCAFServer& aParent);
187 virtual TVerdict doTestStepL();
193 * Used to test CManager::GetDir()
194 * The INI file specifies the file to delete and the expected return code.
195 * For instance this can be used to try and delete a file that does not exist or a file
196 * that is read-only or has rights that don't allow it to be deleted
197 * INI file paramerters
199 path - the directory to list
200 result - the expected return code
202 * @internalComponent Exposure internally
204 class CCAFGetDirStep : public CCAFStep
207 CCAFGetDirStep(CCAFServer& aParent);
209 virtual TVerdict doTestStepL();
211 void DisplayList(CDir& aDir);
217 * Used to test CManager::NotifyStatusChange()
218 * The INI file specifies the file to delete and the expected return code.
219 * For instance this can be used to try and delete a file that does not exist or a file
220 * that is read-only or has rights that don't allow it to be deleted
221 * INI file paramerters
226 * @internalComponent Exposure internally
228 class CCAFManagerNotifyStep : public CCAFStep
231 CCAFManagerNotifyStep(CCAFServer& aParent);
232 ~CCAFManagerNotifyStep();
233 virtual TVerdict doTestStepL();
239 * Used to test CManager::SetProperty()
240 * The INI file specifies the file to delete and the expected return code.
241 * For instance this can be used to try and delete a file that does not exist or a file
242 * that is read-only or has rights that don't allow it to be deleted
243 * INI file paramerters
248 * @internalComponent Exposure internally
250 class CCAFManagerSetPropertyStep : public CCAFStep
253 CCAFManagerSetPropertyStep(CCAFServer& aParent);
254 ~CCAFManagerSetPropertyStep();
255 virtual TVerdict doTestStepL();
261 * Used to test CManager::DisplayInfo()
262 * The INI file specifies the file to delete and the expected return code.
263 * For instance this can be used to try and delete a file that does not exist or a file
264 * that is read-only or has rights that don't allow it to be deleted
265 * INI file paramerters
270 * @internalComponent Exposure internally
272 class CCAFManagerDisplayInfoStep : public CCAFStep
275 CCAFManagerDisplayInfoStep(CCAFServer& aParent);
276 ~CCAFManagerDisplayInfoStep();
277 virtual TVerdict doTestStepL();
284 * Used to test CManager::ListAgents()
285 * The INI file specifies the file to delete and the expected return code.
286 * For instance this can be used to try and delete a file that does not exist or a file
287 * that is read-only or has rights that don't allow it to be deleted
288 * INI file paramerters
293 * @internalComponent Exposure internally
295 class CCAFManagerListAgentsStep : public CCAFStep
298 CCAFManagerListAgentsStep(CCAFServer& aParent);
299 ~CCAFManagerListAgentsStep();
300 virtual TVerdict doTestStepL();
308 * Used to test CManager::AgentSpecificCommand()
309 * The INI file specifies the file to delete and the expected return code.
310 * For instance this can be used to try and delete a file that does not exist or a file
311 * that is read-only or has rights that don't allow it to be deleted
312 * INI file paramerters
317 * @internalComponent Exposure internally
319 class CCAFManagerAgentSpecificStep : public CCAFStep
322 CCAFManagerAgentSpecificStep(CCAFServer& aParent);
323 ~CCAFManagerAgentSpecificStep();
324 virtual TVerdict doTestStepL();
331 * Used to test CManager::DisplayManagentInfoL()
332 * The INI file specifies the file to delete and the expected return code.
333 * For instance this can be used to try and delete a file that does not exist or a file
334 * that is read-only or has rights that don't allow it to be deleted
335 * INI file paramerters
340 * @internalComponent Exposure internally
342 class CCAFManagerDisplayConfigStep : public CCAFStep
345 CCAFManagerDisplayConfigStep(CCAFServer& aParent);
346 ~CCAFManagerDisplayConfigStep();
347 virtual TVerdict doTestStepL();
354 * Used to test CManager::GetAttribute()
355 * The INI file specifies the file to delete and the expected return code.
356 * For instance this can be used to try and delete a file that does not exist or a file
357 * that is read-only or has rights that don't allow it to be deleted
358 * INI file paramerters
363 * @internalComponent Exposure internally
365 class CCAFManagerAttributeStep : public CCAFStep
368 CCAFManagerAttributeStep(CCAFServer& aParent);
369 ~CCAFManagerAttributeStep();
370 virtual TVerdict doTestStepL();
371 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
372 TVerdict doWmdrmTestStepL();
373 #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
379 * Used to test CManager::GetAttributeSet()
380 * The INI file specifies the file to delete and the expected return code.
381 * For instance this can be used to try and delete a file that does not exist or a file
382 * that is read-only or has rights that don't allow it to be deleted
383 * INI file paramerters
388 * @internalComponent Exposure internally
390 class CCAFManagerAttributeSetStep : public CCAFStep
393 CCAFManagerAttributeSetStep(CCAFServer& aParent);
394 ~CCAFManagerAttributeSetStep();
395 virtual TVerdict doTestStepL();
396 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
397 TVerdict doWmdrmTestStepL();
398 #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
405 * Used to test CManager::GetAttribute()
406 * The INI file specifies the file to delete and the expected return code.
407 * For instance this can be used to try and delete a file that does not exist or a file
408 * that is read-only or has rights that don't allow it to be deleted
409 * INI file paramerters
414 * @internalComponent Exposure internally
416 class CCAFManagerStringAttributeStep : public CCAFStep
419 CCAFManagerStringAttributeStep(CCAFServer& aParent);
420 ~CCAFManagerStringAttributeStep();
421 virtual TVerdict doTestStepL();
422 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
423 TVerdict doWmdrmTestStepL();
424 #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
431 * Used to test CManager::GetStringAttributeSet()
432 * The INI file specifies the file to delete and the expected return code.
433 * For instance this can be used to try and delete a file that does not exist or a file
434 * that is read-only or has rights that don't allow it to be deleted
435 * INI file paramerters
440 * @internalComponent Exposure internally
442 class CCAFManagerStringAttributeSetStep : public CCAFStep
445 CCAFManagerStringAttributeSetStep(CCAFServer& aParent);
446 ~CCAFManagerStringAttributeSetStep();
447 virtual TVerdict doTestStepL();
448 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
449 TVerdict doWmdrmTestStepL();
450 #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
457 _LIT(KCAFContentIteratorStep,"CAFContentIteratorStep");
461 * Used to test CContentIterator
462 * The INI file specifies the file to delete and the expected return code.
463 * For instance this can be used to try and delete a file that does not exist or a file
464 * that is read-only or has rights that don't allow it to be deleted
465 * INI file paramerters
470 * @internalComponent Exposure internally
472 class CCAFContentIteratorStep : public CCAFStep
475 CCAFContentIteratorStep(CCAFServer& aParent);
476 ~CCAFContentIteratorStep();
477 virtual TVerdict doTestStepL();
478 void PrintResult(const TDesC& aFileName, const TDesC& aUniqueId, const TDesC& aMimeType);
485 /** Used by CCAFContentIteratorStep
487 class CIteratorTestStateMachine : public CActive
490 CIteratorTestStateMachine(CCAFContentIteratorStep *aParent);
491 virtual ~CIteratorTestStateMachine();
493 void RunTestL(const TDesC& aPath, TBool aRecursive, const TDesC8& aMimeType);
497 virtual void DoCancel();
504 ContentAccess::CContentIterator *iter;
505 CCAFContentIteratorStep *iParent;
511 * Used to test CManager::DisplayInfo() (file handle overload)
515 class CCAFManagerDisplayInfoByFileHandleStep : public CCAFStep
518 CCAFManagerDisplayInfoByFileHandleStep(CCAFServer& aParent);
519 ~CCAFManagerDisplayInfoByFileHandleStep();
520 virtual TVerdict doTestStepL();
526 * Used to test CManager::GetAttribute() (file handle overload)
528 * @internalComponent Exposure internally
530 class CCAFManagerAttributeByFileHandleStep : public CCAFStep
533 CCAFManagerAttributeByFileHandleStep(CCAFServer& aParent);
534 ~CCAFManagerAttributeByFileHandleStep();
535 virtual TVerdict doTestStepL();
541 * Used to test CManager::GetAttributeSet() (file handle overload)
543 * @internalComponent Exposure internally
545 class CCAFManagerAttributeSetByFileHandleStep : public CCAFStep
548 CCAFManagerAttributeSetByFileHandleStep(CCAFServer& aParent);
549 ~CCAFManagerAttributeSetByFileHandleStep();
550 virtual TVerdict doTestStepL();
556 * Used to test CManager::GetAttribute() (file handle overload)
558 * @internalComponent Exposure internally
560 class CCAFManagerStringAttributeByFileHandleStep : public CCAFStep
563 CCAFManagerStringAttributeByFileHandleStep(CCAFServer& aParent);
564 ~CCAFManagerStringAttributeByFileHandleStep();
565 virtual TVerdict doTestStepL();
571 * Used to test CManager::GetStringAttributeSet() (file handle overload)
573 * @internalComponent Exposure internally
575 class CCAFManagerStringAttributeSetByFileHandleStep : public CCAFStep
578 CCAFManagerStringAttributeSetByFileHandleStep(CCAFServer& aParent);
579 ~CCAFManagerStringAttributeSetByFileHandleStep();
580 virtual TVerdict doTestStepL();