|
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 "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 Harness for VideoPlaybackControls |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: e003sa33#11 % |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #ifndef VIDEOPLAYBACKCONTROLSTEST_H |
|
24 #define VIDEOPLAYBACKCONTROLSTEST_H |
|
25 |
|
26 // INCLUDES |
|
27 #include <W32STD.H> |
|
28 #include <StifLogger.h> |
|
29 #include <StifTestModule.h> |
|
30 #include <TestScripterInternal.h> |
|
31 |
|
32 #include "mpxvpbc_stub.h" |
|
33 |
|
34 // MACROS |
|
35 #define TEST_CLASS_VERSION_MAJOR 0 |
|
36 #define TEST_CLASS_VERSION_MINOR 0 |
|
37 #define TEST_CLASS_VERSION_BUILD 0 |
|
38 |
|
39 // Logging path |
|
40 #ifdef __WINSCW__ |
|
41 _LIT( KVideoPlaybackControlsTestLogPath, |
|
42 "\\logs\\testframework\\VideoPlaybackViewControlsTest\\" ); |
|
43 #else |
|
44 _LIT( KVideoPlaybackControlsTestLogPath, |
|
45 "e:\\logs\\testframework\\VideoPlaybackViewControlsTest\\" ); |
|
46 #endif |
|
47 |
|
48 // Log file |
|
49 _LIT( KVideoPlaybackControlsTestLogFile, |
|
50 "VideoPlaybackControlsTest.txt" ); |
|
51 _LIT( KVideoPlaybackControlsTestLogFileWithTitle, |
|
52 "VideoPlaybackControlsTest_[%S].txt" ); |
|
53 |
|
54 // FORWARD DECLARATIONS |
|
55 class CMPXVideoPlaybackControlsController; |
|
56 |
|
57 // CLASS DECLARATION |
|
58 |
|
59 /** |
|
60 * CVideoPlaybackControlsTest test class for STIF Test Framework TestScripter. |
|
61 * |
|
62 * @lib ?library |
|
63 * @since ?Series60_version |
|
64 */ |
|
65 NONSHARABLE_CLASS(CVideoPlaybackControlsTest) : public CScriptBase |
|
66 { |
|
67 public: // Constructors and destructor |
|
68 |
|
69 /** |
|
70 * Two-phased constructor. |
|
71 */ |
|
72 static CVideoPlaybackControlsTest* NewL( CTestModuleIf& aTestModuleIf ); |
|
73 |
|
74 /** |
|
75 * Destructor. |
|
76 */ |
|
77 virtual ~CVideoPlaybackControlsTest(); |
|
78 |
|
79 public: // New functions |
|
80 |
|
81 /** |
|
82 * ?member_description. |
|
83 * @param ?arg1 ?description |
|
84 * @return ?description |
|
85 */ |
|
86 //?type ?member_function( ?type ?arg1 ); |
|
87 |
|
88 public: // Functions from base classes |
|
89 |
|
90 /** |
|
91 * From CScriptBase Runs a script line. |
|
92 * @param aItem Script line containing method name and parameters |
|
93 * @return Symbian OS error code |
|
94 */ |
|
95 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
96 |
|
97 protected: // New functions |
|
98 |
|
99 /** |
|
100 * ?member_description. |
|
101 * @param ?arg1 ?description |
|
102 * @return ?description |
|
103 */ |
|
104 //?type ?member_function( ?type ?arg1 ); |
|
105 |
|
106 protected: // Functions from base classes |
|
107 |
|
108 /** |
|
109 * From ?base_class ?member_description |
|
110 */ |
|
111 //?type ?member_function(); |
|
112 |
|
113 private: |
|
114 |
|
115 /** |
|
116 * C++ default constructor. |
|
117 */ |
|
118 CVideoPlaybackControlsTest( CTestModuleIf& aTestModuleIf ); |
|
119 |
|
120 /** |
|
121 * By default Symbian 2nd phase constructor is private. |
|
122 */ |
|
123 void ConstructL(); |
|
124 |
|
125 // Prohibit copy constructor if not deriving from CBase. |
|
126 // ?classname( const ?classname& ); |
|
127 // Prohibit assigment operator if not deriving from CBase. |
|
128 // ?classname& operator=( const ?classname& ); |
|
129 |
|
130 /** |
|
131 * Frees all resources allocated from test methods. |
|
132 */ |
|
133 void Delete(); |
|
134 |
|
135 /** |
|
136 * Method used to log version of test class |
|
137 */ |
|
138 void SendTestClassVersion(); |
|
139 |
|
140 /** |
|
141 * Create controls |
|
142 * @return Symbian OS error code. |
|
143 */ |
|
144 virtual TInt CreateControls( CStifItemParser& aItem ); |
|
145 |
|
146 /** |
|
147 * Delete controls |
|
148 * @return Symbian OS error code. |
|
149 */ |
|
150 virtual TInt DeleteControls(); |
|
151 /** |
|
152 * Test HandleEventL(EMPXControlCmdSetAspectRatio) |
|
153 * @return Symbian OS error code. |
|
154 */ |
|
155 virtual TInt SetAspectRatio( CStifItemParser& aItem ); |
|
156 |
|
157 /** |
|
158 * Test HandleEventL(EMPXControlCmdSetVolume) |
|
159 * @return Symbian OS error code. |
|
160 */ |
|
161 virtual TInt SetVolume( CStifItemParser& aItem ); |
|
162 |
|
163 /** |
|
164 * Test HandleEventL(EMPXControlCmdSetDuration) |
|
165 * @return Symbian OS error code. |
|
166 */ |
|
167 virtual TInt SetDuration( CStifItemParser& aItem ); |
|
168 |
|
169 /** |
|
170 * Issue pointer event |
|
171 * @return Symbian OS error code. |
|
172 */ |
|
173 virtual TInt PointerEvent( CStifItemParser& aItem ); |
|
174 |
|
175 /** |
|
176 * Issue pointer event |
|
177 * @return Symbian OS error code. |
|
178 */ |
|
179 virtual TInt KeyEvent( CStifItemParser& aItem ); |
|
180 |
|
181 /** |
|
182 * Check return value is expected value or not |
|
183 * @return Symbian OS error code. |
|
184 */ |
|
185 virtual TInt ExpectedResult( CStifItemParser& aItem ); |
|
186 |
|
187 /** |
|
188 * Set state |
|
189 * @return Symbian OS error code. |
|
190 */ |
|
191 virtual TInt SetState( CStifItemParser& aItem ); |
|
192 |
|
193 /** |
|
194 * Add default file details |
|
195 * @return Symbian OS error code. |
|
196 */ |
|
197 virtual TInt AddDefaultFileDetails(); |
|
198 |
|
199 /** |
|
200 * Add audio only file details |
|
201 * @return Symbian OS error code. |
|
202 */ |
|
203 virtual TInt AddAudioOnlyFileDetails(); |
|
204 |
|
205 /** |
|
206 * Add long file details |
|
207 * @return Symbian OS error code. |
|
208 */ |
|
209 virtual TInt AddLongFileDetails(); |
|
210 |
|
211 /** |
|
212 * Add same AR file details |
|
213 * @return symbian OS error code. |
|
214 */ |
|
215 virtual TInt AddSameARFileDetails(); |
|
216 |
|
217 /** |
|
218 * Add empty title file details |
|
219 * @return symbian OS error code. |
|
220 */ |
|
221 virtual TInt AddEmptyTitleFileDetailsL(); |
|
222 |
|
223 /** |
|
224 * Create controller |
|
225 */ |
|
226 void CreateController( const TDesC& aFileName, TInt aMode ); |
|
227 |
|
228 void TapOnScreen( TPointerEvent::TType aType, TPoint aPosition ); |
|
229 |
|
230 TInt ParseType( TDesC& aTypeName, TPointerEvent::TType& aType ); |
|
231 |
|
232 TFileName GetFileNameAndPath( TDesC& aFileName ); |
|
233 |
|
234 virtual TInt SetDownLoadSize(CStifItemParser& aItem ); |
|
235 |
|
236 virtual TInt SetDownLoadPostion(CStifItemParser& aItem ); |
|
237 |
|
238 virtual TInt UpdateDownloadPosition( CStifItemParser& aItem ); |
|
239 |
|
240 virtual TInt SetDownLoadPaused(); |
|
241 |
|
242 virtual TInt ClearDownLoadPaused(); |
|
243 |
|
244 virtual TInt TvOutConnected(); |
|
245 |
|
246 virtual TInt TvOutDisconnected(); |
|
247 |
|
248 virtual TInt HandleErrors(); |
|
249 |
|
250 virtual TInt SoftkeyPressed( CStifItemParser& aItem ); |
|
251 |
|
252 virtual TInt ShowControls(); |
|
253 |
|
254 virtual TInt ToggleVisibility(); |
|
255 |
|
256 virtual TInt HandleBackgroundEvnet(); |
|
257 |
|
258 virtual TInt ShowMediaDetailsViewer(); |
|
259 |
|
260 virtual TInt CloseMediaDetailsViewer(); |
|
261 |
|
262 //[TestMethods] - Do not remove |
|
263 |
|
264 public: |
|
265 // Data |
|
266 // ?one_line_short_description_of_data |
|
267 //?data_declaration; |
|
268 |
|
269 protected: |
|
270 // Data |
|
271 // ?one_line_short_description_of_data |
|
272 //?data_declaration; |
|
273 |
|
274 private: |
|
275 // Data |
|
276 // ?one_line_short_description_of_data |
|
277 //?data_declaration; |
|
278 |
|
279 // Reserved pointer for future extension |
|
280 //TAny* iReserved; |
|
281 |
|
282 public: |
|
283 // Friend classes |
|
284 //?friend_class_declaration; |
|
285 CMPXVideoPlaybackControlsController* iController; |
|
286 |
|
287 protected: |
|
288 // Friend classes |
|
289 //?friend_class_declaration; |
|
290 |
|
291 private: |
|
292 // Friend classes |
|
293 //?friend_class_declaration; |
|
294 CMPXVideoPlaybackContainer* iContainer; |
|
295 RWsSession iWsSession; |
|
296 }; |
|
297 |
|
298 #endif // VIDEOPLAYBACKCONTROLSTEST_H |
|
299 |
|
300 // End of File |