0
|
1 |
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// TestStepPlayerManip.cpp
|
|
15 |
// (manipulation)
|
|
16 |
// This file contains testing steps for the Unit
|
|
17 |
// test of the MMF 'Deprecated' Audio Clients.
|
|
18 |
// Tests opening sounds of various formats
|
|
19 |
// from a file with various parameters and constructor calls
|
|
20 |
//
|
|
21 |
//
|
|
22 |
|
|
23 |
|
|
24 |
#ifndef __TEST_STEP_PLAYER_MANIP__
|
|
25 |
#define __TEST_STEP_PLAYER_MANIP__
|
|
26 |
|
|
27 |
/**
|
|
28 |
*
|
|
29 |
* Play and Stop sound
|
|
30 |
*
|
|
31 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
32 |
*
|
|
33 |
* @xxxx
|
|
34 |
*
|
|
35 |
*/
|
|
36 |
const TInt KBufSize = 25;
|
|
37 |
|
|
38 |
class CTestStepPlayerStop : public CTestStepUnitMMFAudClient,
|
|
39 |
public MMdaAudioPlayerCallback
|
|
40 |
{
|
|
41 |
public:
|
|
42 |
static CTestStepPlayerStop* NewL();
|
|
43 |
CTestStepPlayerStop();
|
|
44 |
~CTestStepPlayerStop();
|
|
45 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
46 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
47 |
virtual TVerdict DoTestStepL();
|
|
48 |
|
|
49 |
// from MMdaAudioPlayerCallback
|
|
50 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
51 |
virtual void MapcPlayComplete(TInt aError);
|
|
52 |
|
|
53 |
private:
|
|
54 |
TInt iError;
|
|
55 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
56 |
TBool iHasPlayed;
|
|
57 |
};
|
|
58 |
|
|
59 |
/**
|
|
60 |
*
|
|
61 |
* Get sound Duration
|
|
62 |
*
|
|
63 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
64 |
*
|
|
65 |
* @xxxx
|
|
66 |
*
|
|
67 |
*/
|
|
68 |
class CTestStepPlayerDuration : public CTestStepUnitMMFAudClient,
|
|
69 |
public MMdaAudioPlayerCallback
|
|
70 |
{
|
|
71 |
public:
|
|
72 |
static CTestStepPlayerDuration* NewL();
|
|
73 |
CTestStepPlayerDuration();
|
|
74 |
~CTestStepPlayerDuration();
|
|
75 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
76 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
77 |
virtual TVerdict DoTestStepL();
|
|
78 |
|
|
79 |
// from MMdaAudioPlayerCallback
|
|
80 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
81 |
virtual void MapcPlayComplete(TInt aError);
|
|
82 |
|
|
83 |
private:
|
|
84 |
TInt iError;
|
|
85 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
86 |
};
|
|
87 |
|
|
88 |
/**
|
|
89 |
*
|
|
90 |
* Set sound Repeats
|
|
91 |
*
|
|
92 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
93 |
*
|
|
94 |
* @xxxx
|
|
95 |
*
|
|
96 |
*/
|
|
97 |
class CTestStepPlayerRepeats : public CTestStepUnitMMFAudClient,
|
|
98 |
public MMdaAudioPlayerCallback
|
|
99 |
{
|
|
100 |
public:
|
|
101 |
static CTestStepPlayerRepeats* NewL(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName);
|
|
102 |
|
|
103 |
~CTestStepPlayerRepeats();
|
|
104 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
105 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
106 |
virtual TVerdict DoTestStepL();
|
|
107 |
|
|
108 |
// from MMdaAudioPlayerCallback
|
|
109 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
110 |
virtual void MapcPlayComplete(TInt aError);
|
|
111 |
private:
|
|
112 |
CTestStepPlayerRepeats(const TDesC& aTestName, const TDesC& aSectName, const TDesC& aKeyName);
|
|
113 |
private:
|
|
114 |
TInt iError;
|
|
115 |
TBuf<KBufSize> iSectName; // Section name for retrieving filename
|
|
116 |
TBuf<KBufSize> iKeyName; // Key name for retrieving filename
|
|
117 |
|
|
118 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
119 |
};
|
|
120 |
|
|
121 |
|
|
122 |
/**
|
|
123 |
*
|
|
124 |
* Set sound Repeats & test state during Trailing silence
|
|
125 |
*
|
|
126 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
127 |
*
|
|
128 |
* @xxxx
|
|
129 |
*
|
|
130 |
*/
|
|
131 |
class CTestStepPlayerRepeatsState : public CTestStepUnitMMFAudClient,
|
|
132 |
public MMdaAudioPlayerCallback
|
|
133 |
{
|
|
134 |
public:
|
|
135 |
enum TSchedulerStopReasons {EUnknown, EPlayerInitialized, EPlayComplete, ETimer};
|
|
136 |
|
|
137 |
public:
|
|
138 |
static CTestStepPlayerRepeatsState* NewL();
|
|
139 |
CTestStepPlayerRepeatsState();
|
|
140 |
~CTestStepPlayerRepeatsState();
|
|
141 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
142 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
143 |
virtual TVerdict DoTestStepL();
|
|
144 |
|
|
145 |
// from MMdaAudioPlayerCallback
|
|
146 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
147 |
virtual void MapcPlayComplete(TInt aError);
|
|
148 |
|
|
149 |
class CCallbackTimer : public CTimer
|
|
150 |
{
|
|
151 |
public:
|
|
152 |
CCallbackTimer(CTestStepPlayerRepeatsState& aTest);
|
|
153 |
~CCallbackTimer();
|
|
154 |
static CCallbackTimer* NewL(CTestStepPlayerRepeatsState& aTest);
|
|
155 |
void RunL();
|
|
156 |
private:
|
|
157 |
CTestStepPlayerRepeatsState& iTest;
|
|
158 |
};
|
|
159 |
|
|
160 |
private:
|
|
161 |
TInt iError;
|
|
162 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
163 |
|
|
164 |
CCallbackTimer* iTimer;
|
|
165 |
|
|
166 |
public:
|
|
167 |
TSchedulerStopReasons iSchedulerStopReason;
|
|
168 |
};
|
|
169 |
|
|
170 |
/**
|
|
171 |
*
|
|
172 |
* Set Volume Ramp
|
|
173 |
*
|
|
174 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
175 |
*
|
|
176 |
* @xxxx
|
|
177 |
*
|
|
178 |
*/
|
|
179 |
class CTestStepPlayerVolRamp : public CTestStepUnitMMFAudClient,
|
|
180 |
public MMdaAudioPlayerCallback
|
|
181 |
{
|
|
182 |
public:
|
|
183 |
static CTestStepPlayerVolRamp* NewL();
|
|
184 |
CTestStepPlayerVolRamp();
|
|
185 |
~CTestStepPlayerVolRamp();
|
|
186 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
187 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
188 |
virtual TVerdict DoTestStepL();
|
|
189 |
|
|
190 |
// from MMdaAudioPlayerCallback
|
|
191 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
192 |
virtual void MapcPlayComplete(TInt aError);
|
|
193 |
|
|
194 |
private:
|
|
195 |
TInt iError;
|
|
196 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
197 |
TTimeIntervalMicroSeconds* iDuration;
|
|
198 |
};
|
|
199 |
|
|
200 |
/**
|
|
201 |
*
|
|
202 |
* Set Volume
|
|
203 |
*
|
|
204 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
205 |
*
|
|
206 |
* @xxxx
|
|
207 |
*
|
|
208 |
*/
|
|
209 |
class CTestStepPlayerVol : public CTestStepUnitMMFAudClient,
|
|
210 |
public MMdaAudioPlayerCallback
|
|
211 |
{
|
|
212 |
public:
|
|
213 |
static CTestStepPlayerVol* NewL();
|
|
214 |
CTestStepPlayerVol();
|
|
215 |
~CTestStepPlayerVol();
|
|
216 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
217 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
218 |
virtual TVerdict DoTestStepL();
|
|
219 |
|
|
220 |
// from MMdaAudioPlayerCallback
|
|
221 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
222 |
virtual void MapcPlayComplete(TInt aError);
|
|
223 |
|
|
224 |
private:
|
|
225 |
TInt iError;
|
|
226 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
227 |
TPtrC iFileName2;
|
|
228 |
};
|
|
229 |
|
|
230 |
/**
|
|
231 |
*
|
|
232 |
* Get/Set position
|
|
233 |
*
|
|
234 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
235 |
*
|
|
236 |
* @xxxx
|
|
237 |
*
|
|
238 |
*/
|
|
239 |
class CTestStepPlayerPosition : public CTestStepUnitMMFAudClient,
|
|
240 |
public MMdaAudioPlayerCallback
|
|
241 |
{
|
|
242 |
public:
|
|
243 |
static CTestStepPlayerPosition* NewL();
|
|
244 |
CTestStepPlayerPosition();
|
|
245 |
~CTestStepPlayerPosition();
|
|
246 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
247 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
248 |
virtual TVerdict DoTestStepL();
|
|
249 |
|
|
250 |
// from MMdaAudioPlayerCallback
|
|
251 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
252 |
virtual void MapcPlayComplete(TInt aError);
|
|
253 |
|
|
254 |
private:
|
|
255 |
TInt iError;
|
|
256 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
257 |
TTimeIntervalMicroSeconds iDuration;
|
|
258 |
TBool iHasPlayed;
|
|
259 |
};
|
|
260 |
|
|
261 |
/**
|
|
262 |
*
|
|
263 |
* Set/Clear Play WIndow
|
|
264 |
*
|
|
265 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
266 |
*
|
|
267 |
* @xxxx
|
|
268 |
*
|
|
269 |
*/
|
|
270 |
class CTestStepPlayerPlayWindow : public CTestStepUnitMMFAudClient,
|
|
271 |
public MMdaAudioPlayerCallback
|
|
272 |
{
|
|
273 |
public:
|
|
274 |
static CTestStepPlayerPlayWindow* NewL();
|
|
275 |
CTestStepPlayerPlayWindow();
|
|
276 |
~CTestStepPlayerPlayWindow();
|
|
277 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
278 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
279 |
virtual TVerdict DoTestStepL();
|
|
280 |
|
|
281 |
// from MMdaAudioPlayerCallback
|
|
282 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
283 |
virtual void MapcPlayComplete(TInt aError);
|
|
284 |
|
|
285 |
private:
|
|
286 |
TInt iError;
|
|
287 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
288 |
TTimeIntervalMicroSeconds iDuration, iBeginning, iMiddle,iEnd;
|
|
289 |
TBool iHasPlayed;
|
|
290 |
};
|
|
291 |
|
|
292 |
/**
|
|
293 |
*
|
|
294 |
* Get/Set balance
|
|
295 |
*
|
|
296 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
297 |
*
|
|
298 |
* @xxxx
|
|
299 |
*
|
|
300 |
*/
|
|
301 |
class CTestStepPlayerBalance : public CTestStepUnitMMFAudClient,
|
|
302 |
public MMdaAudioPlayerCallback
|
|
303 |
{
|
|
304 |
public:
|
|
305 |
static CTestStepPlayerBalance* NewL();
|
|
306 |
CTestStepPlayerBalance();
|
|
307 |
~CTestStepPlayerBalance();
|
|
308 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
309 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
310 |
virtual TVerdict DoTestStepL();
|
|
311 |
|
|
312 |
// from MMdaAudioPlayerCallback
|
|
313 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
314 |
virtual void MapcPlayComplete(TInt aError);
|
|
315 |
|
|
316 |
private:
|
|
317 |
TInt iError;
|
|
318 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
319 |
TTimeIntervalMicroSeconds iDuration;
|
|
320 |
};
|
|
321 |
|
|
322 |
/**
|
|
323 |
*
|
|
324 |
* Close
|
|
325 |
*
|
|
326 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
327 |
*
|
|
328 |
* @xxxx
|
|
329 |
*
|
|
330 |
*/
|
|
331 |
class CTestStepPlayerClose : public CTestStepUnitMMFAudClient,
|
|
332 |
public MMdaAudioPlayerCallback
|
|
333 |
{
|
|
334 |
public:
|
|
335 |
static CTestStepPlayerClose* NewL();
|
|
336 |
CTestStepPlayerClose();
|
|
337 |
~CTestStepPlayerClose();
|
|
338 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
339 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
340 |
virtual TVerdict DoTestStepL();
|
|
341 |
|
|
342 |
// from MMdaAudioPlayerCallback
|
|
343 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
344 |
virtual void MapcPlayComplete(TInt aError);
|
|
345 |
|
|
346 |
private:
|
|
347 |
TInt iError;
|
|
348 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
349 |
TTimeIntervalMicroSeconds iDuration;
|
|
350 |
};
|
|
351 |
|
|
352 |
/**
|
|
353 |
*
|
|
354 |
* Metadata
|
|
355 |
*
|
|
356 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
357 |
*
|
|
358 |
* @xxxx
|
|
359 |
*
|
|
360 |
*/
|
|
361 |
class CTestStepPlayerMeta : public CTestStepUnitMMFAudClient,
|
|
362 |
public MMdaAudioPlayerCallback
|
|
363 |
{
|
|
364 |
public:
|
|
365 |
static CTestStepPlayerMeta* NewL();
|
|
366 |
CTestStepPlayerMeta();
|
|
367 |
~CTestStepPlayerMeta();
|
|
368 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
369 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
370 |
virtual TVerdict DoTestStepL();
|
|
371 |
|
|
372 |
// from MMdaAudioPlayerCallback
|
|
373 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
374 |
virtual void MapcPlayComplete(TInt aError);
|
|
375 |
|
|
376 |
private:
|
|
377 |
TInt iError;
|
|
378 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
379 |
TInt iNum;
|
|
380 |
};
|
|
381 |
|
|
382 |
/**
|
|
383 |
*
|
|
384 |
* Priority
|
|
385 |
*
|
|
386 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
387 |
*
|
|
388 |
* @xxxx
|
|
389 |
*
|
|
390 |
*/
|
|
391 |
class CTestStepPlayerPriority : public CTestStepUnitMMFAudClient,
|
|
392 |
public MMdaAudioPlayerCallback
|
|
393 |
{
|
|
394 |
public:
|
|
395 |
static CTestStepPlayerPriority* NewL();
|
|
396 |
CTestStepPlayerPriority();
|
|
397 |
~CTestStepPlayerPriority();
|
|
398 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
399 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
400 |
virtual TVerdict DoTestStepL();
|
|
401 |
|
|
402 |
// from MMdaAudioPlayerCallback
|
|
403 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
404 |
virtual void MapcPlayComplete(TInt aError);
|
|
405 |
|
|
406 |
private:
|
|
407 |
TInt iError;
|
|
408 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
409 |
TInt iNum;
|
|
410 |
};
|
|
411 |
|
|
412 |
|
|
413 |
//
|
|
414 |
// CTestStepPlayerPauseSetPosPlay
|
|
415 |
//
|
|
416 |
class CTestStepPlayerPauseSetPosPlay : public CTestStepUnitMMFAudClient,
|
|
417 |
public MMdaAudioPlayerCallback
|
|
418 |
{
|
|
419 |
public:
|
|
420 |
static CTestStepPlayerPauseSetPosPlay* NewL();
|
|
421 |
CTestStepPlayerPauseSetPosPlay();
|
|
422 |
~CTestStepPlayerPauseSetPosPlay();
|
|
423 |
void Close();
|
|
424 |
|
|
425 |
virtual TVerdict DoTestStepL();
|
|
426 |
|
|
427 |
// from MMdaAudioPlayerCallback
|
|
428 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
429 |
virtual void MapcPlayComplete(TInt aError);
|
|
430 |
|
|
431 |
protected:
|
|
432 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
433 |
TInt iError;
|
|
434 |
};
|
|
435 |
|
|
436 |
//
|
|
437 |
// CTestStepPlayerPlayWaitSetPos - Start playing the file, wait and then mid-playback reset the position to a different point. Ensure playback completes.
|
|
438 |
//
|
|
439 |
class CTestStepPlayerPlayWaitSetPos : public CTestStepUnitMMFAudClient,
|
|
440 |
public MMdaAudioPlayerCallback
|
|
441 |
{
|
|
442 |
public:
|
|
443 |
static CTestStepPlayerPlayWaitSetPos* NewL();
|
|
444 |
CTestStepPlayerPlayWaitSetPos();
|
|
445 |
~CTestStepPlayerPlayWaitSetPos();
|
|
446 |
|
|
447 |
virtual TVerdict DoTestStepL();
|
|
448 |
|
|
449 |
// from MMdaAudioPlayerCallback
|
|
450 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
451 |
virtual void MapcPlayComplete(TInt aError);
|
|
452 |
|
|
453 |
static TInt TimerCallback(TAny* aParentObject);
|
|
454 |
void DoTimerCallback();
|
|
455 |
|
|
456 |
protected:
|
|
457 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
458 |
CPeriodic* iSetPositionCountDown;
|
|
459 |
TInt iError;
|
|
460 |
};
|
|
461 |
|
|
462 |
/**
|
|
463 |
*
|
|
464 |
* GetImplementationInfo
|
|
465 |
*
|
|
466 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
467 |
*
|
|
468 |
* @xxxx
|
|
469 |
*
|
|
470 |
*/
|
|
471 |
class CTestStepPlayerGetImplementationInfo : public CTestStepUnitMMFAudClient,
|
|
472 |
public MMdaAudioPlayerCallback
|
|
473 |
{
|
|
474 |
public:
|
|
475 |
static CTestStepPlayerGetImplementationInfo* NewL();
|
|
476 |
CTestStepPlayerGetImplementationInfo();
|
|
477 |
~CTestStepPlayerGetImplementationInfo();
|
|
478 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
479 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
480 |
virtual TVerdict DoTestStepL();
|
|
481 |
|
|
482 |
// from MMdaAudioPlayerCallback
|
|
483 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
484 |
virtual void MapcPlayComplete(TInt aError);
|
|
485 |
|
|
486 |
private:
|
|
487 |
TInt iError;
|
|
488 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
489 |
TInt iNum;
|
|
490 |
};
|
|
491 |
|
|
492 |
|
|
493 |
/**
|
|
494 |
*
|
|
495 |
* SendCustomCommandSync
|
|
496 |
*
|
|
497 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
498 |
*
|
|
499 |
* @xxxx
|
|
500 |
*
|
|
501 |
*/
|
|
502 |
class CTestStepPlayerSendCustomCommandSync : public CTestStepUnitMMFAudClient,
|
|
503 |
public MMdaAudioPlayerCallback
|
|
504 |
{
|
|
505 |
public:
|
|
506 |
static CTestStepPlayerSendCustomCommandSync* NewL();
|
|
507 |
CTestStepPlayerSendCustomCommandSync();
|
|
508 |
~CTestStepPlayerSendCustomCommandSync();
|
|
509 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
510 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
511 |
virtual TVerdict DoTestStepL();
|
|
512 |
|
|
513 |
// from MMdaAudioPlayerCallback
|
|
514 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
515 |
virtual void MapcPlayComplete(TInt aError);
|
|
516 |
|
|
517 |
private:
|
|
518 |
TInt iError;
|
|
519 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
520 |
TInt iNum;
|
|
521 |
};
|
|
522 |
|
|
523 |
|
|
524 |
/**
|
|
525 |
*
|
|
526 |
* SendCustomCommandSync
|
|
527 |
*
|
|
528 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
529 |
*
|
|
530 |
* @xxxx
|
|
531 |
*
|
|
532 |
*/
|
|
533 |
class CTestStepPlayerSendCustomCommandAsync : public CTestStepUnitMMFAudClient,
|
|
534 |
public MMdaAudioPlayerCallback
|
|
535 |
{
|
|
536 |
public:
|
|
537 |
static CTestStepPlayerSendCustomCommandAsync* NewL();
|
|
538 |
CTestStepPlayerSendCustomCommandAsync();
|
|
539 |
~CTestStepPlayerSendCustomCommandAsync();
|
|
540 |
void Close();
|
|
541 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
542 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
543 |
virtual TVerdict DoTestStepL();
|
|
544 |
|
|
545 |
// from MMdaAudioPlayerCallback
|
|
546 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
547 |
virtual void MapcPlayComplete(TInt aError);
|
|
548 |
|
|
549 |
class CAsyncObserver : public CActive
|
|
550 |
{
|
|
551 |
public:
|
|
552 |
CAsyncObserver() : CActive(EPriorityStandard) {CActiveScheduler::Add(this);}
|
|
553 |
void RunL()
|
|
554 |
{
|
|
555 |
CActiveScheduler::Stop();
|
|
556 |
}
|
|
557 |
void DoCancel(){;}
|
|
558 |
TRequestStatus& ActiveStatus(){SetActive();return iStatus;}
|
|
559 |
};
|
|
560 |
|
|
561 |
|
|
562 |
private:
|
|
563 |
TInt iError;
|
|
564 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
565 |
CAsyncObserver* iAsyncObserver;
|
|
566 |
TInt iNum;
|
|
567 |
};
|
|
568 |
|
|
569 |
|
|
570 |
/**
|
|
571 |
*
|
|
572 |
* ReloadingTest
|
|
573 |
*
|
|
574 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
575 |
*
|
|
576 |
* @xxxx
|
|
577 |
*
|
|
578 |
*/
|
|
579 |
class CTestStepPlayerReloadingTest : public CTestStepUnitMMFAudClient,
|
|
580 |
public MMdaAudioPlayerCallback,
|
|
581 |
public MAudioLoadingObserver
|
|
582 |
{
|
|
583 |
public:
|
|
584 |
static CTestStepPlayerReloadingTest* NewL();
|
|
585 |
CTestStepPlayerReloadingTest();
|
|
586 |
~CTestStepPlayerReloadingTest();
|
|
587 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
588 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
589 |
virtual TVerdict DoTestStepL();
|
|
590 |
|
|
591 |
// from MMdaAudioPlayerCallback
|
|
592 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
593 |
virtual void MapcPlayComplete(TInt aError);
|
|
594 |
|
|
595 |
virtual void MaloLoadingStarted();
|
|
596 |
virtual void MaloLoadingComplete();
|
|
597 |
|
|
598 |
private:
|
|
599 |
TInt iError;
|
|
600 |
TBool iCorrectEventReceived;
|
|
601 |
TBool iEventReceived;
|
|
602 |
TBool iLoadingComplete;
|
|
603 |
TBool iLoadingStarted;
|
|
604 |
|
|
605 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
606 |
TInt iNum;
|
|
607 |
};
|
|
608 |
|
|
609 |
/**
|
|
610 |
*
|
|
611 |
* Test Open sound specifying a url
|
|
612 |
*
|
|
613 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
614 |
*
|
|
615 |
* @xxxx
|
|
616 |
*
|
|
617 |
*/
|
|
618 |
class CTestStepPlayerOpenUrl : public CTestStepUnitMMFAudClient,
|
|
619 |
public MMdaAudioPlayerCallback
|
|
620 |
{
|
|
621 |
public:
|
|
622 |
static CTestStepPlayerOpenUrl* NewL();
|
|
623 |
CTestStepPlayerOpenUrl();
|
|
624 |
~CTestStepPlayerOpenUrl();
|
|
625 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
626 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
627 |
virtual TVerdict DoTestStepL();
|
|
628 |
|
|
629 |
// from MMdaAudioPlayerCallback
|
|
630 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
631 |
virtual void MapcPlayComplete(TInt aError);
|
|
632 |
|
|
633 |
private:
|
|
634 |
void OpenAndStartSchedulerL(TInt);
|
|
635 |
|
|
636 |
private:
|
|
637 |
TInt iError;
|
|
638 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
639 |
TPtrC iURL;
|
|
640 |
TPtrC iLongURL;
|
|
641 |
TPtrC iMimeType;
|
|
642 |
};
|
|
643 |
|
|
644 |
/**
|
|
645 |
*
|
|
646 |
* Test Open sound specifying Uri Tag
|
|
647 |
*
|
|
648 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
649 |
*
|
|
650 |
* @xxxx
|
|
651 |
*
|
|
652 |
*/
|
|
653 |
class CTestStepPlayerOpenviaUriTag : public CTestStepUnitMMFAudClient,
|
|
654 |
public MMdaAudioPlayerCallback
|
|
655 |
{
|
|
656 |
public:
|
|
657 |
static CTestStepPlayerOpenviaUriTag* NewL();
|
|
658 |
CTestStepPlayerOpenviaUriTag();
|
|
659 |
~CTestStepPlayerOpenviaUriTag();
|
|
660 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
661 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
662 |
virtual TVerdict DoTestStepL();
|
|
663 |
|
|
664 |
// from MMdaAudioPlayerCallback
|
|
665 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
666 |
virtual void MapcPlayComplete(TInt aError);
|
|
667 |
|
|
668 |
private:
|
|
669 |
void OpenAndStartSchedulerL(TInt);
|
|
670 |
|
|
671 |
private:
|
|
672 |
TInt iError;
|
|
673 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
674 |
TPtrC iURL;
|
|
675 |
TPtrC iMimeType;
|
|
676 |
};
|
|
677 |
|
|
678 |
/**
|
|
679 |
*
|
|
680 |
* Test Open sound Trying next controller
|
|
681 |
*
|
|
682 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
683 |
*
|
|
684 |
* @xxxx
|
|
685 |
*
|
|
686 |
*/
|
|
687 |
class CTestStepPlayerOpenTryNextCtrl : public CTestStepUnitMMFAudClient,
|
|
688 |
public MMdaAudioPlayerCallback
|
|
689 |
{
|
|
690 |
public:
|
|
691 |
static CTestStepPlayerOpenTryNextCtrl* NewL();
|
|
692 |
CTestStepPlayerOpenTryNextCtrl();
|
|
693 |
~CTestStepPlayerOpenTryNextCtrl();
|
|
694 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
695 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
696 |
virtual TVerdict DoTestStepL();
|
|
697 |
|
|
698 |
// from MMdaAudioPlayerCallback
|
|
699 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
700 |
virtual void MapcPlayComplete(TInt aError);
|
|
701 |
|
|
702 |
private:
|
|
703 |
void OpenAndStartSchedulerL(TInt);
|
|
704 |
|
|
705 |
private:
|
|
706 |
TInt iError;
|
|
707 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
708 |
TPtrC iURL;
|
|
709 |
TPtrC iMimeType;
|
|
710 |
};
|
|
711 |
|
|
712 |
|
|
713 |
/**
|
|
714 |
*
|
|
715 |
* INC048184 - SetPlayWindow,play,Stop,Fast Farward,Close,play
|
|
716 |
* make sure second play starts from start of file
|
|
717 |
*
|
|
718 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
719 |
*
|
|
720 |
* @xxxx
|
|
721 |
*
|
|
722 |
*/
|
|
723 |
class CTestStepPlayerPlayStopFFPlayNext : public CTestStepUnitMMFAudClient,
|
|
724 |
public MMdaAudioPlayerCallback
|
|
725 |
{
|
|
726 |
public:
|
|
727 |
static CTestStepPlayerPlayStopFFPlayNext* NewL();
|
|
728 |
~CTestStepPlayerPlayStopFFPlayNext();
|
|
729 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
730 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
731 |
virtual TVerdict DoTestStepL();
|
|
732 |
|
|
733 |
// from MMdaAudioPlayerCallback
|
|
734 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
735 |
virtual void MapcPlayComplete(TInt aError);
|
|
736 |
|
|
737 |
private:
|
|
738 |
CTestStepPlayerPlayStopFFPlayNext();
|
|
739 |
void FastForward(const TTimeIntervalMicroSeconds aPosition);
|
|
740 |
void Next(void);
|
|
741 |
private:
|
|
742 |
TInt iError;
|
|
743 |
TInt iCurrentState;
|
|
744 |
TPtrC iFileName;
|
|
745 |
CMdaAudioPlayerUtility* iPlayerUtility;
|
|
746 |
};
|
|
747 |
|
|
748 |
/**
|
|
749 |
*
|
|
750 |
* DEF067052: To setpriorities after Pausing the player
|
|
751 |
*
|
|
752 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
753 |
*
|
|
754 |
* @xxxx
|
|
755 |
*
|
|
756 |
*/
|
|
757 |
class CTestStepMultipleSetPlayerPriority : public CTestStepUnitMMFAudClient,
|
|
758 |
public MMdaAudioPlayerCallback
|
|
759 |
{
|
|
760 |
public:
|
|
761 |
static CTestStepMultipleSetPlayerPriority* NewL();
|
|
762 |
CTestStepMultipleSetPlayerPriority();
|
|
763 |
~CTestStepMultipleSetPlayerPriority();
|
|
764 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
765 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
766 |
virtual TVerdict DoTestStepL();
|
|
767 |
|
|
768 |
// from MMdaAudioPlayerCallback
|
|
769 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
770 |
virtual void MapcPlayComplete(TInt aError);
|
|
771 |
|
|
772 |
private:
|
|
773 |
TInt iError;
|
|
774 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
775 |
};
|
|
776 |
|
|
777 |
|
|
778 |
/**
|
|
779 |
*
|
|
780 |
* DEF070060: play-pause-play fails on JSR135 TCK test (setloopcount2)
|
|
781 |
*
|
|
782 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
783 |
*
|
|
784 |
* @xxxx
|
|
785 |
*
|
|
786 |
*/
|
|
787 |
class CTestStepPlayerPlayPausePlay : public CTestStepUnitMMFAudClient,
|
|
788 |
public MMdaAudioPlayerCallback
|
|
789 |
{
|
|
790 |
public:
|
|
791 |
static CTestStepPlayerPlayPausePlay* NewL();
|
|
792 |
CTestStepPlayerPlayPausePlay();
|
|
793 |
~CTestStepPlayerPlayPausePlay();
|
|
794 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
795 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
796 |
virtual TVerdict DoTestStepL();
|
|
797 |
|
|
798 |
// from MMdaAudioPlayerCallback
|
|
799 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
800 |
virtual void MapcPlayComplete(TInt aError);
|
|
801 |
|
|
802 |
private:
|
|
803 |
TInt iError;
|
|
804 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
805 |
};
|
|
806 |
|
|
807 |
/**
|
|
808 |
*
|
|
809 |
* DEF078081: TCK fail: CMMFMdaAudioPlayerUtility::Duration can't handle infinite sounds
|
|
810 |
* This defect resulted in the call TMMFDurationInfo Duration(TTimeIntervalMicroSeconds& aDuration)
|
|
811 |
* being added to CMdaAudioPlayerUtility, CMdaAudioRecorderUtility
|
|
812 |
*
|
|
813 |
* This test case checks that the call returns TMMFDurationInfo::EMMFDurationInfoValid
|
|
814 |
*
|
|
815 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
816 |
*
|
|
817 |
* @xxxx
|
|
818 |
*
|
|
819 |
*/
|
|
820 |
class CTestStepPlaybackDurationInformation : public CTestStepUnitMMFAudClient,
|
|
821 |
public MMdaAudioPlayerCallback
|
|
822 |
{
|
|
823 |
public:
|
|
824 |
static CTestStepPlaybackDurationInformation* NewL();
|
|
825 |
CTestStepPlaybackDurationInformation();
|
|
826 |
~CTestStepPlaybackDurationInformation();
|
|
827 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
828 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
829 |
virtual TVerdict DoTestStepL();
|
|
830 |
|
|
831 |
// from MMdaAudioPlayerCallback
|
|
832 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
833 |
virtual void MapcPlayComplete(TInt);
|
|
834 |
|
|
835 |
private:
|
|
836 |
TInt iError;
|
|
837 |
CMdaAudioPlayerUtility* iPlayer;
|
|
838 |
};
|
|
839 |
|
|
840 |
/**
|
|
841 |
*
|
|
842 |
* CheckImplementationInfo
|
|
843 |
*
|
|
844 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
845 |
*
|
|
846 |
* @xxxx
|
|
847 |
*
|
|
848 |
*/
|
|
849 |
class CTestStepPlayerCheckImplementationInfo : public CTestStepUnitMMFAudClient,
|
|
850 |
public MMdaAudioPlayerCallback
|
|
851 |
{
|
|
852 |
public:
|
|
853 |
static CTestStepPlayerCheckImplementationInfo* NewL();
|
|
854 |
CTestStepPlayerCheckImplementationInfo();
|
|
855 |
~CTestStepPlayerCheckImplementationInfo();
|
|
856 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
857 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
858 |
virtual TVerdict DoTestStepL();
|
|
859 |
|
|
860 |
// from MMdaAudioPlayerCallback
|
|
861 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
862 |
virtual void MapcPlayComplete(TInt aError);
|
|
863 |
|
|
864 |
private:
|
|
865 |
TInt iError;
|
|
866 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
867 |
TInt iNum;
|
|
868 |
};
|
|
869 |
|
|
870 |
|
|
871 |
/* DEF090666 : T:Aclnt - Pausing during repeat causes the file to close itself
|
|
872 |
*
|
|
873 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
874 |
*/
|
|
875 |
|
|
876 |
class CTestStepPlayerRepeatsPause : public CTestStepUnitMMFAudClient,
|
|
877 |
public MMdaAudioPlayerCallback
|
|
878 |
{
|
|
879 |
public:
|
|
880 |
enum TSchedulerStopReasons {EUnknown, EPlayerInitialized, EPlayComplete, ETimer};
|
|
881 |
public:
|
|
882 |
static CTestStepPlayerRepeatsPause* NewL();
|
|
883 |
CTestStepPlayerRepeatsPause();
|
|
884 |
~CTestStepPlayerRepeatsPause();
|
|
885 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
886 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
887 |
virtual TVerdict DoTestStepL();
|
|
888 |
|
|
889 |
// from MMdaAudioPlayerCallback
|
|
890 |
virtual void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
|
|
891 |
virtual void MapcPlayComplete(TInt aError);
|
|
892 |
|
|
893 |
class CCallbackTimer : public CTimer
|
|
894 |
{
|
|
895 |
public:
|
|
896 |
CCallbackTimer(CTestStepPlayerRepeatsPause& aTest);
|
|
897 |
~CCallbackTimer();
|
|
898 |
static CCallbackTimer* NewL(CTestStepPlayerRepeatsPause& aTest);
|
|
899 |
void RunL();
|
|
900 |
private:
|
|
901 |
CTestStepPlayerRepeatsPause& iTest;
|
|
902 |
};
|
|
903 |
private:
|
|
904 |
TInt iError;
|
|
905 |
CMMFMdaAudioPlayerUtility* iPlayer;
|
|
906 |
CCallbackTimer* iTimer;
|
|
907 |
public:
|
|
908 |
TSchedulerStopReasons iSchedulerStopReason;
|
|
909 |
};
|
|
910 |
|
|
911 |
|
|
912 |
#endif //(__TEST_STEP_PLAYER_MANIP__)
|