|
1 /* |
|
2 * Copyright (c) 2002 - 2007 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: test classes and functions in AiwGenericParam.h and AiwVariant.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef C_TESTSDKAIWGP_H |
|
22 #define C_TESTSDKAIWGP_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <stiflogger.h> |
|
26 #include <testscripterinternal.h> |
|
27 #include <stifitemparser.h> |
|
28 #include <stiftestmodule.h> |
|
29 #include <testclassassert.h> |
|
30 #include <aiwvariant.h> |
|
31 #include <aiwvarianttype.hrh> |
|
32 #include <aiwgenericparam.h> |
|
33 #include <aiwgenericparam.hrh> |
|
34 |
|
35 // MACROS |
|
36 #define TEST_CLASS_VERSION_MAJOR 0 |
|
37 #define TEST_CLASS_VERSION_MINOR 0 |
|
38 #define TEST_CLASS_VERSION_BUILD 0 |
|
39 |
|
40 // Logging path |
|
41 _LIT( KtestsdkaiwgpLogPath, "\\logs\\testframework\\testsdkaiwgp\\" ); |
|
42 // Log file |
|
43 _LIT( KtestsdkaiwgpLogFile, "testsdkaiwgp.txt" ); |
|
44 _LIT( KtestsdkaiwgpLogFileWithTitle, "testsdkaiwgp_[%S].txt" ); |
|
45 |
|
46 /** |
|
47 * CTestSDKAiwgp test class for STIF Test Framework TestScripter. |
|
48 * @since S60 5.0 |
|
49 */ |
|
50 NONSHARABLE_CLASS(CTestSDKAiwgp) : public CScriptBase |
|
51 { |
|
52 public: // Constructors and destructor |
|
53 |
|
54 /** |
|
55 * Two-phased constructor. |
|
56 */ |
|
57 static CTestSDKAiwgp* NewL( CTestModuleIf& aTestModuleIf ); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 virtual ~CTestSDKAiwgp(); |
|
63 |
|
64 public: // Functions from base classes |
|
65 |
|
66 /** |
|
67 * From CScriptBase Runs a script line. |
|
68 * @since ?Series60_version |
|
69 * @param aItem Script line containing method name and parameters |
|
70 * @return Symbian OS error code |
|
71 */ |
|
72 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
73 |
|
74 private: |
|
75 |
|
76 /** |
|
77 * C++ default constructor. |
|
78 */ |
|
79 CTestSDKAiwgp( CTestModuleIf& aTestModuleIf ); |
|
80 |
|
81 /** |
|
82 * By default Symbian 2nd phase constructor is private. |
|
83 */ |
|
84 void ConstructL(); |
|
85 |
|
86 /** |
|
87 * Frees all resources allocated from test methods. |
|
88 * @since ?Series60_version |
|
89 */ |
|
90 void Delete(); |
|
91 |
|
92 /** |
|
93 * Method used to log version of test class |
|
94 */ |
|
95 void SendTestClassVersion(); |
|
96 |
|
97 /** |
|
98 * Turn off ScreenSaver |
|
99 * @since S60 5.0 |
|
100 * @return Symbian OS error code. |
|
101 */ |
|
102 void TurnOffScreenSaver(); |
|
103 |
|
104 /** |
|
105 * Restore ScreenSaver |
|
106 * @since S60 5.0 |
|
107 * @return Symbian OS error code. |
|
108 */ |
|
109 void RestoreScreenSaver(); |
|
110 |
|
111 |
|
112 private: // test functions |
|
113 /** |
|
114 * TestTAiwVariantL test TAiwVariant function |
|
115 * @since S60 5.0 |
|
116 * @param aItem never used |
|
117 * return Symbian OS error code. |
|
118 */ |
|
119 virtual TInt TestTAiwVariantL( CStifItemParser& aItem ); |
|
120 /** |
|
121 * test some function of TAiwVariant in default constructor |
|
122 * @since S60 5.0 |
|
123 * @param aItem never used |
|
124 * return Symbian OS error code. |
|
125 */ |
|
126 virtual TInt TestAiwVFuncByDefaultConstructor(); |
|
127 /** |
|
128 * test some function in of TAiwVariant TInt32 constructor |
|
129 * @since S60 5.0 |
|
130 * @param aItem never used |
|
131 * return Symbian OS error code. |
|
132 */ |
|
133 virtual TInt TestAiwVFuncByTInt32Constructor(); |
|
134 /** |
|
135 * test some function of TAiwVariant in TUid constructor |
|
136 * @since S60 5.0 |
|
137 * @param aItem never used |
|
138 * return Symbian OS error code. |
|
139 */ |
|
140 virtual TInt TestAiwVFuncByTUidConstructor(); |
|
141 /** |
|
142 * test some function in of TAiwVariant TDesC constructor |
|
143 * @since S60 5.0 |
|
144 * @param aItem never used |
|
145 * return Symbian OS error code. |
|
146 */ |
|
147 virtual TInt TestAiwVFuncByTDesCConstructor(); |
|
148 /** |
|
149 * test some function in of TAiwVariant HBufC constructor |
|
150 * @since S60 5.0 |
|
151 * @param aItem never used |
|
152 * return Symbian OS error code. |
|
153 */ |
|
154 virtual TInt TestAiwVFuncByHBufCConstructorL(); |
|
155 /** |
|
156 * test some function in of TAiwVariant TDesC8 constructor |
|
157 * @since S60 5.0 |
|
158 * @param aItem never used |
|
159 * return Symbian OS error code. |
|
160 */ |
|
161 virtual TInt TestAiwVFuncByTDesC8Constructor(); |
|
162 /** |
|
163 * test some function in of TAiwVariant TTime constructor |
|
164 * @since S60 5.0 |
|
165 * @param aItem never used |
|
166 * return Symbian OS error code. |
|
167 */ |
|
168 virtual TInt TestAiwVFuncByTTimeConstructor(); |
|
169 /** |
|
170 * test some function in of TAiwVariant RFile constructor |
|
171 * @since S60 5.0 |
|
172 * @param aItem never used |
|
173 * return Symbian OS error code. |
|
174 */ |
|
175 virtual TInt TestAiwVFuncByRFileConstructorL(); |
|
176 /** |
|
177 * test some function in of TAiwVariant Copy constructor |
|
178 * @since S60 5.0 |
|
179 * @param aItem never used |
|
180 * return Symbian OS error code. |
|
181 */ |
|
182 virtual TInt TestAiwVFuncByCopyConstructor(); |
|
183 |
|
184 /** |
|
185 * TestTAiwGP test TAiwGenericParam function |
|
186 * @since S60 5.0 |
|
187 * @aItem is three number of TAiwGenericParam SemanticId |
|
188 * return Symbian OS error code. |
|
189 */ |
|
190 virtual TInt TestTAiwGP( CStifItemParser& aItem ); |
|
191 /** |
|
192 * test TAiwGenericParam function in default constructor |
|
193 * @since S60 5.0 |
|
194 * @aItem is the number for id set testting |
|
195 * return Symbian OS error code. |
|
196 */ |
|
197 virtual TInt TestAiwGPFuncByDefaultConstructor( CStifItemParser& aItem ); |
|
198 /** |
|
199 * test TAiwGenericParam function in constructor with one parameter |
|
200 * @since S60 5.0 |
|
201 * @aItem is the number for id set testting |
|
202 * return Symbian OS error code. |
|
203 */ |
|
204 virtual TInt TestAiwGPFuncByConstructorOnePara( CStifItemParser& aItem ); |
|
205 /** |
|
206 * test TAiwGenericParam function in constructor with two parameters |
|
207 * @since S60 5.0 |
|
208 * @aItem is the number for id set testting |
|
209 * return Symbian OS error code. |
|
210 */ |
|
211 virtual TInt TestAiwGPFuncByConstructorTwoPara( CStifItemParser& aItem ); |
|
212 |
|
213 /** |
|
214 * Test CAiwGenericParamList, test four new functions |
|
215 * @since S60 5.0 |
|
216 * @param aItem never used |
|
217 * return Symbian OS error code. |
|
218 */ |
|
219 virtual TInt TestTAiwGPListNewFunctionsL( CStifItemParser& aItem ); |
|
220 |
|
221 /** |
|
222 * Test Count function of CAiwGenericParamList |
|
223 * @since S60 5.0 |
|
224 * @aItem 1 is the list count, 2 is the count of some type |
|
225 * return Symbian OS error code. |
|
226 */ |
|
227 virtual TInt TestTAiwGPListCountL( CStifItemParser& aItem ); |
|
228 |
|
229 /** |
|
230 * Test [] operator of CAiwGenericParamList |
|
231 * @since S60 5.0 |
|
232 * @param aItem never used |
|
233 * return Symbian OS error code. |
|
234 */ |
|
235 virtual TInt TestTAiwGPListSquareBracketL( CStifItemParser& aItem ); |
|
236 |
|
237 /** |
|
238 * Test two AppendL functions of CAiwGenericParamList |
|
239 * @since S60 5.0 |
|
240 * @aItem is a number 1 append a item, 2 append a list |
|
241 * return Symbian OS error code. |
|
242 */ |
|
243 virtual TInt TestTAiwGPListAppendL( CStifItemParser& aItem ); |
|
244 |
|
245 /** |
|
246 * Test Reset function of CAiwGenericParamList |
|
247 * @since S60 5.0 |
|
248 * @param aItem never used |
|
249 * return Symbian OS error code. |
|
250 */ |
|
251 virtual TInt TestTAiwGPListResetL( CStifItemParser& aItem ); |
|
252 |
|
253 /** |
|
254 * Test two Find functions of CAiwGenericParamList |
|
255 * @since S60 5.0 |
|
256 * @aItem is a number, 1 is find the first item, 2 is find the next item |
|
257 * return Symbian OS error code. |
|
258 */ |
|
259 virtual TInt TestTAiwGPListFindL( CStifItemParser& aItem ); |
|
260 |
|
261 /** |
|
262 * Test Size function of CAiwGenericParamList |
|
263 * @since S60 5.0 |
|
264 * @param aItem never used |
|
265 * return Symbian OS error code. |
|
266 */ |
|
267 virtual TInt TestTAiwGPListSizeL( CStifItemParser& aItem ); |
|
268 |
|
269 /** |
|
270 * Test Remove function of CAiwGenericParamList |
|
271 * @since S60 5.0 |
|
272 * @param aItem never used |
|
273 * return Symbian OS error code. |
|
274 */ |
|
275 virtual TInt TestTAiwGPListRemoveL( CStifItemParser& aItem ); |
|
276 |
|
277 /** |
|
278 * Test InternalizeL and ExternalizeL function of CAiwGenericParamList |
|
279 * @since S60 5.0 |
|
280 * @param aItem never used |
|
281 * return Symbian OS error code. |
|
282 */ |
|
283 virtual TInt TestTAiwGPListInternalizeLAndExternalizeL( CStifItemParser& aItem ); |
|
284 |
|
285 /** |
|
286 * Test PackForServerL function of CAiwGenericParamList |
|
287 * @since S60 5.0 |
|
288 * @param aItem never used |
|
289 * return Symbian OS error code. |
|
290 */ |
|
291 virtual TInt TestTAiwGPListPackForServerL( CStifItemParser& aItem ); |
|
292 |
|
293 /** |
|
294 * Test UnpackFromClientL function of CAiwGenericParamList |
|
295 * @since S60 5.0 |
|
296 * @param aItem never used |
|
297 * return Symbian OS error code. |
|
298 */ |
|
299 virtual TInt TestTAiwGPListUnpackFromClientL( CStifItemParser& aItem ); |
|
300 |
|
301 private: // Data |
|
302 |
|
303 enum TSwitchId |
|
304 { |
|
305 ECaseOne = 1, |
|
306 ECaseTwo |
|
307 }; |
|
308 |
|
309 /** |
|
310 * ScreenSaver Property |
|
311 */ |
|
312 TInt iOldScreenSaverProperty; |
|
313 |
|
314 }; |
|
315 |
|
316 #endif // C_TESTSDKAIWGP_H |
|
317 // End of File |