|
1 /* |
|
2 * Copyright (c) 2005-2009 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: |
|
15 * This file contains the class CDataProviderStep. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 /** |
|
21 @file tdataproviderstep.h |
|
22 @internalTechnology |
|
23 */ |
|
24 |
|
25 #if (!defined __T_DATA_PROVIDER_STEP_H__) |
|
26 #define __T_DATA_PROVIDER_STEP_H__ |
|
27 |
|
28 #include <test/testexecutestepbase.h> |
|
29 #include "tdataprovider.h" |
|
30 #include <e32def.h> |
|
31 #include <e32std.h> |
|
32 #include <e32base.h> |
|
33 |
|
34 |
|
35 #include "dessisdataprovider.h" |
|
36 #include "filesisdataprovider.h" |
|
37 #include "cafsisdataprovider.h" |
|
38 |
|
39 #define KMAXBUF 100 |
|
40 |
|
41 using namespace Swi; |
|
42 |
|
43 class CDataProviderStep : public CTestStep |
|
44 { |
|
45 public: |
|
46 |
|
47 enum TDataProviderType |
|
48 /** |
|
49 Identifies the Type of the input |
|
50 */ |
|
51 { |
|
52 /** Read data from the descriptor */ |
|
53 EDesSisDataProvider = 1, |
|
54 /** Read data from the file */ |
|
55 EFileSisDataProvider, |
|
56 /** Read data from DRM file */ |
|
57 ECafSisDataProvider |
|
58 }; |
|
59 |
|
60 enum TOperation |
|
61 /** |
|
62 Identifies the operation mode |
|
63 */ |
|
64 { |
|
65 /** Read and Seek */ |
|
66 EReadAndSeek = 1, |
|
67 /** Read only */ |
|
68 EReadOnly, |
|
69 /** Read to a specific length*/ |
|
70 EReadSpecificLength |
|
71 }; |
|
72 |
|
73 enum TFileType |
|
74 { |
|
75 /** Use filename */ |
|
76 EFilename = 1, |
|
77 /** Use file handle*/ |
|
78 EFileHandle |
|
79 }; |
|
80 |
|
81 enum TStepType |
|
82 { |
|
83 /** Test DataL() */ |
|
84 EReadStep = 1, |
|
85 /** Test OpenDrmStepL()*/ |
|
86 EOpenStep, |
|
87 /** Seek Step*/ |
|
88 ESeekStep |
|
89 }; |
|
90 |
|
91 CDataProviderStep(); |
|
92 ~CDataProviderStep(); |
|
93 |
|
94 virtual TVerdict doTestStepPreambleL(); |
|
95 virtual TVerdict doTestStepPostambleL(); |
|
96 virtual TVerdict doTestStepL(); |
|
97 |
|
98 private: |
|
99 void DoReadL(MSisDataProvider *aSisDataProvider,const TInt& aOpType); |
|
100 void VerifyResult (const TPtr8& aDataConst , const TPtrC16& aExpectedSisData); |
|
101 }; |
|
102 |
|
103 |
|
104 _LIT(KDataProviderStep,"tdataproviderstep"); |
|
105 _LIT(KMemoryCheckStep,"MemoryCheckStep"); |
|
106 |
|
107 #endif |