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 |
// This file contains testing steps for the Unit
|
|
15 |
// test of the MMF 'Deprecated' Audio Clients.
|
|
16 |
// Tests opening sounds of various formats
|
|
17 |
// from a file with various parameters and constructor calls
|
|
18 |
//
|
|
19 |
//
|
|
20 |
|
|
21 |
|
|
22 |
#ifndef __TEST_STEP_TONE__
|
|
23 |
#define __TEST_STEP_TONE__
|
|
24 |
|
|
25 |
|
|
26 |
const TInt KHeapSizeToneTestEKA2 = 128000; // Heapsize for tone tests on EKA2
|
|
27 |
const TInt KTestTimeout = 2000000; // Currently used only by CTestStepTonePlayDualToneInvalidFreq
|
|
28 |
|
|
29 |
/**
|
|
30 |
*
|
|
31 |
* Alloc Failure New Tone utility
|
|
32 |
*
|
|
33 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
34 |
*
|
|
35 |
* @xxxx
|
|
36 |
*
|
|
37 |
*/
|
|
38 |
class CTestStepToneAllocFailNew : public CTestStepUnitMMFAudClient,
|
|
39 |
public MMdaAudioToneObserver //,
|
|
40 |
//public MDevSoundObserver
|
|
41 |
{
|
|
42 |
public:
|
|
43 |
static CTestStepToneAllocFailNew* NewL();
|
|
44 |
CTestStepToneAllocFailNew();
|
|
45 |
~CTestStepToneAllocFailNew();
|
|
46 |
virtual TVerdict DoTestStepL();
|
|
47 |
|
|
48 |
// from MMdaAudioToneObserver
|
|
49 |
virtual void MatoPrepareComplete(TInt aError);
|
|
50 |
virtual void MatoPlayComplete(TInt aError);
|
|
51 |
// from MMdaAudioToneObserver??
|
|
52 |
//virtual void DevSoundInitFinished(TInt aError);
|
|
53 |
//virtual void ToneFinished(TInt aError);
|
|
54 |
|
|
55 |
private:
|
|
56 |
TInt iError;
|
|
57 |
CMMFMdaAudioToneUtility* iTone;
|
|
58 |
};
|
|
59 |
|
|
60 |
/**
|
|
61 |
*
|
|
62 |
* Test New Tone utility
|
|
63 |
*
|
|
64 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
65 |
*
|
|
66 |
* @xxxx
|
|
67 |
*
|
|
68 |
*/
|
|
69 |
class CTestStepToneNew : public CTestStepUnitMMFAudClient,
|
|
70 |
public MMdaAudioToneObserver
|
|
71 |
{
|
|
72 |
public:
|
|
73 |
static CTestStepToneNew* NewL();
|
|
74 |
CTestStepToneNew();
|
|
75 |
~CTestStepToneNew();
|
|
76 |
virtual TVerdict DoTestStepL();
|
|
77 |
|
|
78 |
// from MMdaAudioToneObserver
|
|
79 |
virtual void MatoPrepareComplete(TInt aError);
|
|
80 |
virtual void MatoPlayComplete(TInt aError);
|
|
81 |
|
|
82 |
private:
|
|
83 |
TInt iError;
|
|
84 |
CMMFMdaAudioToneUtility* iTone;
|
|
85 |
};
|
|
86 |
|
|
87 |
/**
|
|
88 |
*
|
|
89 |
* Test New Tone utility with various Priority and Preference params
|
|
90 |
*
|
|
91 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
92 |
*
|
|
93 |
* @xxxx
|
|
94 |
*
|
|
95 |
*/
|
|
96 |
class CTestStepToneNewPriorPref : public CTestStepUnitMMFAudClient,
|
|
97 |
public MMdaAudioToneObserver
|
|
98 |
{
|
|
99 |
public:
|
|
100 |
static CTestStepToneNewPriorPref* NewL();
|
|
101 |
CTestStepToneNewPriorPref();
|
|
102 |
~CTestStepToneNewPriorPref();
|
|
103 |
virtual TVerdict DoTestStepL();
|
|
104 |
|
|
105 |
// from MMdaAudioToneObserver
|
|
106 |
virtual void MatoPrepareComplete(TInt aError);
|
|
107 |
virtual void MatoPlayComplete(TInt aError);
|
|
108 |
|
|
109 |
private:
|
|
110 |
TInt iError;
|
|
111 |
CMMFMdaAudioToneUtility* iTone;
|
|
112 |
};
|
|
113 |
|
|
114 |
/**
|
|
115 |
*
|
|
116 |
* Tone utility, Prepare to play
|
|
117 |
*
|
|
118 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
119 |
*
|
|
120 |
* @xxxx
|
|
121 |
*
|
|
122 |
*/
|
|
123 |
class CTestStepTonePrepareToPlayTone : public CTestStepUnitMMFAudClient,
|
|
124 |
public MMdaAudioToneObserver
|
|
125 |
{
|
|
126 |
public:
|
|
127 |
static CTestStepTonePrepareToPlayTone* NewL();
|
|
128 |
CTestStepTonePrepareToPlayTone();
|
|
129 |
~CTestStepTonePrepareToPlayTone();
|
|
130 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
131 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
132 |
virtual TVerdict DoTestStepL();
|
|
133 |
|
|
134 |
// from MMdaAudioToneObserver
|
|
135 |
virtual void MatoPrepareComplete(TInt aError);
|
|
136 |
virtual void MatoPlayComplete(TInt aError);
|
|
137 |
|
|
138 |
private:
|
|
139 |
TInt iError;
|
|
140 |
CMMFMdaAudioToneUtility* iTone;
|
|
141 |
};
|
|
142 |
|
|
143 |
/**
|
|
144 |
*
|
|
145 |
* Test Tone Prepare DTMF String
|
|
146 |
*
|
|
147 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
148 |
*
|
|
149 |
* @xxxx
|
|
150 |
*
|
|
151 |
*/
|
|
152 |
class CTestStepTonePrepareToPlayDTMFString : public CTestStepUnitMMFAudClient,
|
|
153 |
public MMdaAudioToneObserver
|
|
154 |
{
|
|
155 |
public:
|
|
156 |
static CTestStepTonePrepareToPlayDTMFString* NewL();
|
|
157 |
CTestStepTonePrepareToPlayDTMFString();
|
|
158 |
~CTestStepTonePrepareToPlayDTMFString();
|
|
159 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
160 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
161 |
virtual TVerdict DoTestStepL();
|
|
162 |
|
|
163 |
// from MMdaAudioToneObserver
|
|
164 |
virtual void MatoPrepareComplete(TInt aError);
|
|
165 |
virtual void MatoPlayComplete(TInt aError);
|
|
166 |
|
|
167 |
private:
|
|
168 |
TInt iError;
|
|
169 |
TBool iPlayComplete;
|
|
170 |
CMMFMdaAudioToneUtility* iTone;
|
|
171 |
};
|
|
172 |
|
|
173 |
/**
|
|
174 |
*
|
|
175 |
* Test Tone Prepare File Sequence
|
|
176 |
*
|
|
177 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
178 |
*
|
|
179 |
* @xxxx
|
|
180 |
*
|
|
181 |
*/
|
|
182 |
class CTestStepTonePrepareToPlayFileSeq : public CTestStepUnitMMFAudClient,
|
|
183 |
public MMdaAudioToneObserver
|
|
184 |
{
|
|
185 |
public:
|
|
186 |
static CTestStepTonePrepareToPlayFileSeq* NewL();
|
|
187 |
CTestStepTonePrepareToPlayFileSeq();
|
|
188 |
~CTestStepTonePrepareToPlayFileSeq();
|
|
189 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
190 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
191 |
virtual TVerdict DoTestStepL();
|
|
192 |
|
|
193 |
// from MMdaAudioToneObserver
|
|
194 |
virtual void MatoPrepareComplete(TInt aError);
|
|
195 |
virtual void MatoPlayComplete(TInt aError);
|
|
196 |
|
|
197 |
protected:
|
|
198 |
TInt iError;
|
|
199 |
CMMFMdaAudioToneUtility* iTone;
|
|
200 |
};
|
|
201 |
|
|
202 |
/**
|
|
203 |
*
|
|
204 |
* Test Tone Prepare DRM File Sequence
|
|
205 |
* (INC087436)
|
|
206 |
*
|
|
207 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
208 |
*
|
|
209 |
* @xxxx
|
|
210 |
*
|
|
211 |
*/
|
|
212 |
class CTestStepTonePrepareToPlayDRMFileSeq : public CTestStepTonePrepareToPlayFileSeq
|
|
213 |
{
|
|
214 |
public:
|
|
215 |
static CTestStepTonePrepareToPlayDRMFileSeq* NewL();
|
|
216 |
CTestStepTonePrepareToPlayDRMFileSeq();
|
|
217 |
~CTestStepTonePrepareToPlayDRMFileSeq();
|
|
218 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
219 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
220 |
virtual TVerdict DoTestStepL();
|
|
221 |
};
|
|
222 |
|
|
223 |
/**
|
|
224 |
*
|
|
225 |
* Test Tone Prepare Descriptor Sequence
|
|
226 |
*
|
|
227 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
228 |
*
|
|
229 |
* @xxxx
|
|
230 |
*
|
|
231 |
*/
|
|
232 |
class CTestStepTonePrepareToPlayDescSeq : public CTestStepUnitMMFAudClient,
|
|
233 |
public MMdaAudioToneObserver
|
|
234 |
{
|
|
235 |
public:
|
|
236 |
static CTestStepTonePrepareToPlayDescSeq* NewL();
|
|
237 |
CTestStepTonePrepareToPlayDescSeq();
|
|
238 |
~CTestStepTonePrepareToPlayDescSeq();
|
|
239 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
240 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
241 |
virtual TVerdict DoTestStepL();
|
|
242 |
|
|
243 |
// from MMdaAudioToneObserver
|
|
244 |
virtual void MatoPrepareComplete(TInt aError);
|
|
245 |
virtual void MatoPlayComplete(TInt aError);
|
|
246 |
|
|
247 |
private:
|
|
248 |
TInt iError;
|
|
249 |
CMMFMdaAudioToneUtility* iTone;
|
|
250 |
};
|
|
251 |
|
|
252 |
/**
|
|
253 |
*
|
|
254 |
* Test Tone Prepare Fixed Sequence
|
|
255 |
*
|
|
256 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
257 |
*
|
|
258 |
* @xxxx
|
|
259 |
*
|
|
260 |
*/
|
|
261 |
class CTestStepTonePrepareToPlayFixedSeq : public CTestStepUnitMMFAudClient,
|
|
262 |
public MMdaAudioToneObserver
|
|
263 |
{
|
|
264 |
public:
|
|
265 |
static CTestStepTonePrepareToPlayFixedSeq* NewL();
|
|
266 |
CTestStepTonePrepareToPlayFixedSeq();
|
|
267 |
~CTestStepTonePrepareToPlayFixedSeq();
|
|
268 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
269 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
270 |
virtual TVerdict DoTestStepL();
|
|
271 |
|
|
272 |
// from MMdaAudioToneObserver
|
|
273 |
virtual void MatoPrepareComplete(TInt aError);
|
|
274 |
virtual void MatoPlayComplete(TInt aError);
|
|
275 |
|
|
276 |
private:
|
|
277 |
TInt iError;
|
|
278 |
CMMFMdaAudioToneUtility* iTone;
|
|
279 |
};
|
|
280 |
|
|
281 |
/**
|
|
282 |
*
|
|
283 |
* Alloc Failure New Tone utility
|
|
284 |
*
|
|
285 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
286 |
*
|
|
287 |
* @xxxx
|
|
288 |
*
|
|
289 |
*/
|
|
290 |
class CTestStepTonePrepareToPlayTonePlay : public CTestStepUnitMMFAudClient,
|
|
291 |
public MMdaAudioToneObserver
|
|
292 |
{
|
|
293 |
public:
|
|
294 |
static CTestStepTonePrepareToPlayTonePlay* NewL();
|
|
295 |
CTestStepTonePrepareToPlayTonePlay();
|
|
296 |
~CTestStepTonePrepareToPlayTonePlay();
|
|
297 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
298 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
299 |
virtual TVerdict DoTestStepL();
|
|
300 |
|
|
301 |
// from MMdaAudioToneObserver
|
|
302 |
virtual void MatoPrepareComplete(TInt aError);
|
|
303 |
virtual void MatoPlayComplete(TInt aError);
|
|
304 |
|
|
305 |
private:
|
|
306 |
TInt iError;
|
|
307 |
CMMFMdaAudioToneUtility* iTone;
|
|
308 |
TBool iHasPlayed;
|
|
309 |
};
|
|
310 |
|
|
311 |
/**
|
|
312 |
* class used to encapsulate information about a dual tone
|
|
313 |
*/
|
|
314 |
class TToneInfo
|
|
315 |
{
|
|
316 |
public:
|
|
317 |
TInt iFreq1;
|
|
318 |
TInt iFreq2;
|
|
319 |
TInt iDuration;
|
|
320 |
};
|
|
321 |
|
|
322 |
class CTestStepTonePrepareToPlayDualTonePlay : public CTestStepUnitMMFAudClient,
|
|
323 |
public MMdaAudioToneObserver
|
|
324 |
{
|
|
325 |
public:
|
|
326 |
static CTestStepTonePrepareToPlayDualTonePlay* NewL();
|
|
327 |
CTestStepTonePrepareToPlayDualTonePlay();
|
|
328 |
~CTestStepTonePrepareToPlayDualTonePlay();
|
|
329 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
330 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
331 |
virtual TVerdict DoTestStepL();
|
|
332 |
|
|
333 |
// from MMdaAudioToneObserver
|
|
334 |
virtual void MatoPrepareComplete(TInt aError);
|
|
335 |
virtual void MatoPlayComplete(TInt aError);
|
|
336 |
|
|
337 |
private:
|
|
338 |
TInt GetTune(const TDesC& aDtmfString, RArray<TToneInfo>& aTones);
|
|
339 |
|
|
340 |
private:
|
|
341 |
TInt iError;
|
|
342 |
CMMFMdaAudioToneUtility* iTone;
|
|
343 |
TBool iHasPlayed;
|
|
344 |
};
|
|
345 |
|
|
346 |
class CTestStepTonePlayDualToneInvalidFreq : public CTestStepUnitMMFAudClient,
|
|
347 |
public MMdaAudioToneObserver
|
|
348 |
{
|
|
349 |
public:
|
|
350 |
static CTestStepTonePlayDualToneInvalidFreq* NewL(const TDesC& aName);
|
|
351 |
CTestStepTonePlayDualToneInvalidFreq(const TDesC& aName);
|
|
352 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
353 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
354 |
virtual TVerdict DoTestStepL();
|
|
355 |
|
|
356 |
// from MMdaAudioToneObserver
|
|
357 |
virtual void MatoPrepareComplete(TInt aError);
|
|
358 |
virtual void MatoPlayComplete(TInt aError);
|
|
359 |
|
|
360 |
virtual void TimeoutExpired();
|
|
361 |
static TInt TimeoutExpiredStaticCallback(TAny* aPtr);
|
|
362 |
|
|
363 |
private:
|
|
364 |
TInt iPrepareError;
|
|
365 |
TInt iPlayError;
|
|
366 |
CMMFMdaAudioToneUtility* iTone;
|
|
367 |
};
|
|
368 |
|
|
369 |
|
|
370 |
/**
|
|
371 |
*
|
|
372 |
* Cancel Play Tone utility
|
|
373 |
*
|
|
374 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
375 |
*
|
|
376 |
* @xxxx
|
|
377 |
*
|
|
378 |
*/
|
|
379 |
class CTestStepToneCancelPlay : public CTestStepUnitMMFAudClient,
|
|
380 |
public MMdaAudioToneObserver
|
|
381 |
{
|
|
382 |
public:
|
|
383 |
static CTestStepToneCancelPlay* NewL();
|
|
384 |
CTestStepToneCancelPlay();
|
|
385 |
~CTestStepToneCancelPlay();
|
|
386 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
387 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
388 |
virtual TVerdict DoTestStepL();
|
|
389 |
|
|
390 |
// from MMdaAudioToneObserver
|
|
391 |
virtual void MatoPrepareComplete(TInt aError);
|
|
392 |
virtual void MatoPlayComplete(TInt aError);
|
|
393 |
|
|
394 |
private:
|
|
395 |
TInt iError;
|
|
396 |
CMMFMdaAudioToneUtility* iTone;
|
|
397 |
};
|
|
398 |
|
|
399 |
//-----------------------------------------------------------------
|
|
400 |
/**
|
|
401 |
*
|
|
402 |
* Cancel Prepare Tone utility
|
|
403 |
*
|
|
404 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
405 |
*
|
|
406 |
* @xxxx
|
|
407 |
*
|
|
408 |
*/
|
|
409 |
class CTestStepToneCancelPrepare : public CTestStepUnitMMFAudClient,
|
|
410 |
public MMdaAudioToneObserver
|
|
411 |
{
|
|
412 |
public:
|
|
413 |
static CTestStepToneCancelPrepare* NewL();
|
|
414 |
CTestStepToneCancelPrepare();
|
|
415 |
~CTestStepToneCancelPrepare();
|
|
416 |
virtual TVerdict DoTestStepPreambleL(void);
|
|
417 |
virtual TVerdict DoTestStepPostambleL(void);
|
|
418 |
virtual TVerdict DoTestStepL();
|
|
419 |
|
|
420 |
// from MMdaAudioToneObserver
|
|
421 |
virtual void MatoPrepareComplete(TInt aError);
|
|
422 |
virtual void MatoPlayComplete(TInt aError);
|
|
423 |
|
|
424 |
private:
|
|
425 |
TInt iError;
|
|
426 |
CMMFMdaAudioToneUtility* iTone;
|
|
427 |
};
|
|
428 |
//-----------------------------------------------------------------
|
|
429 |
|
|
430 |
/**
|
|
431 |
*
|
|
432 |
* set DTMF lengths
|
|
433 |
*
|
|
434 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
435 |
*
|
|
436 |
* @xxxx
|
|
437 |
*
|
|
438 |
*/
|
|
439 |
class CTestStepToneSetDTMFLengths : public CTestStepUnitMMFAudClient,
|
|
440 |
public MMdaAudioToneObserver
|
|
441 |
{
|
|
442 |
public:
|
|
443 |
static CTestStepToneSetDTMFLengths* NewL();
|
|
444 |
CTestStepToneSetDTMFLengths();
|
|
445 |
~CTestStepToneSetDTMFLengths();
|
|
446 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
447 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
448 |
virtual TVerdict DoTestStepL();
|
|
449 |
|
|
450 |
// from MMdaAudioToneObserver
|
|
451 |
virtual void MatoPrepareComplete(TInt aError);
|
|
452 |
virtual void MatoPlayComplete(TInt aError);
|
|
453 |
|
|
454 |
private:
|
|
455 |
TInt iError;
|
|
456 |
CMMFMdaAudioToneUtility* iTone;
|
|
457 |
};
|
|
458 |
|
|
459 |
/**
|
|
460 |
*
|
|
461 |
* Set Volume Tone Utility
|
|
462 |
*
|
|
463 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
464 |
*
|
|
465 |
* @xxxx
|
|
466 |
*
|
|
467 |
*/
|
|
468 |
class CTestStepToneSetVolume : public CTestStepUnitMMFAudClient,
|
|
469 |
public MMdaAudioToneObserver
|
|
470 |
{
|
|
471 |
public:
|
|
472 |
static CTestStepToneSetVolume* NewL();
|
|
473 |
CTestStepToneSetVolume();
|
|
474 |
~CTestStepToneSetVolume();
|
|
475 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
476 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
477 |
virtual TVerdict DoTestStepL();
|
|
478 |
|
|
479 |
// from MMdaAudioToneObserver
|
|
480 |
virtual void MatoPrepareComplete(TInt aError);
|
|
481 |
virtual void MatoPlayComplete(TInt aError);
|
|
482 |
|
|
483 |
private:
|
|
484 |
TInt iError;
|
|
485 |
CMMFMdaAudioToneUtility* iTone;
|
|
486 |
};
|
|
487 |
|
|
488 |
/**
|
|
489 |
*
|
|
490 |
* Get Volume Tone Utility
|
|
491 |
*
|
|
492 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
493 |
*
|
|
494 |
* @xxxx
|
|
495 |
*
|
|
496 |
*/
|
|
497 |
class CTestStepToneGetVolume : public CTestStepUnitMMFAudClient,
|
|
498 |
public MMdaAudioToneObserver
|
|
499 |
{
|
|
500 |
public:
|
|
501 |
static CTestStepToneGetVolume* NewL();
|
|
502 |
CTestStepToneGetVolume();
|
|
503 |
~CTestStepToneGetVolume();
|
|
504 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
505 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
506 |
virtual TVerdict DoTestStepL();
|
|
507 |
|
|
508 |
// from MMdaAudioToneObserver
|
|
509 |
virtual void MatoPrepareComplete(TInt aError);
|
|
510 |
virtual void MatoPlayComplete(TInt aError);
|
|
511 |
|
|
512 |
private:
|
|
513 |
TInt iError;
|
|
514 |
CMMFMdaAudioToneUtility* iTone;
|
|
515 |
};
|
|
516 |
|
|
517 |
/**
|
|
518 |
*
|
|
519 |
* Set Priority Tone Utility
|
|
520 |
*
|
|
521 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
522 |
*
|
|
523 |
* @xxxx
|
|
524 |
*
|
|
525 |
*/
|
|
526 |
class CTestStepToneSetPriority : public CTestStepUnitMMFAudClient,
|
|
527 |
public MMdaAudioToneObserver
|
|
528 |
{
|
|
529 |
public:
|
|
530 |
static CTestStepToneSetPriority* NewL();
|
|
531 |
CTestStepToneSetPriority();
|
|
532 |
~CTestStepToneSetPriority();
|
|
533 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
534 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
535 |
virtual TVerdict DoTestStepL();
|
|
536 |
|
|
537 |
// from MMdaAudioToneObserver
|
|
538 |
virtual void MatoPrepareComplete(TInt aError);
|
|
539 |
virtual void MatoPlayComplete(TInt aError);
|
|
540 |
|
|
541 |
private:
|
|
542 |
TInt iError;
|
|
543 |
CMMFMdaAudioToneUtility* iTone;
|
|
544 |
};
|
|
545 |
|
|
546 |
/**
|
|
547 |
*
|
|
548 |
* Set Repeats Tone Utility
|
|
549 |
*
|
|
550 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
551 |
*
|
|
552 |
* @xxxx
|
|
553 |
*
|
|
554 |
*/
|
|
555 |
class CTestStepToneSetRepeats : public CTestStepUnitMMFAudClient,
|
|
556 |
public MMdaAudioToneObserver
|
|
557 |
{
|
|
558 |
public:
|
|
559 |
static CTestStepToneSetRepeats* NewL();
|
|
560 |
CTestStepToneSetRepeats();
|
|
561 |
~CTestStepToneSetRepeats();
|
|
562 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
563 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
564 |
virtual TVerdict DoTestStepL();
|
|
565 |
|
|
566 |
// from MMdaAudioToneObserver
|
|
567 |
virtual void MatoPrepareComplete(TInt aError);
|
|
568 |
virtual void MatoPlayComplete(TInt aError);
|
|
569 |
|
|
570 |
private:
|
|
571 |
TInt iError;
|
|
572 |
CMMFMdaAudioToneUtility* iTone;
|
|
573 |
};
|
|
574 |
|
|
575 |
/**
|
|
576 |
*
|
|
577 |
* Set Volume Ramp Tone Utility
|
|
578 |
*
|
|
579 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
580 |
*
|
|
581 |
* @xxxx
|
|
582 |
*
|
|
583 |
*/
|
|
584 |
class CTestStepToneSetVolumeRamp : public CTestStepUnitMMFAudClient,
|
|
585 |
public MMdaAudioToneObserver
|
|
586 |
{
|
|
587 |
public:
|
|
588 |
static CTestStepToneSetVolumeRamp* NewL();
|
|
589 |
CTestStepToneSetVolumeRamp();
|
|
590 |
~CTestStepToneSetVolumeRamp();
|
|
591 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
592 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
593 |
virtual TVerdict DoTestStepL();
|
|
594 |
|
|
595 |
// from MMdaAudioToneObserver
|
|
596 |
virtual void MatoPrepareComplete(TInt aError);
|
|
597 |
virtual void MatoPlayComplete(TInt aError);
|
|
598 |
|
|
599 |
private:
|
|
600 |
TInt iError;
|
|
601 |
CMMFMdaAudioToneUtility* iTone;
|
|
602 |
};
|
|
603 |
|
|
604 |
/**
|
|
605 |
*
|
|
606 |
* Get Fixed Sequence number and name Tone Utility
|
|
607 |
*
|
|
608 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
609 |
*
|
|
610 |
* @xxxx
|
|
611 |
*
|
|
612 |
*/
|
|
613 |
class CTestStepToneGetFixedSeq : public CTestStepUnitMMFAudClient,
|
|
614 |
public MMdaAudioToneObserver
|
|
615 |
{
|
|
616 |
public:
|
|
617 |
static CTestStepToneGetFixedSeq* NewL();
|
|
618 |
CTestStepToneGetFixedSeq();
|
|
619 |
~CTestStepToneGetFixedSeq();
|
|
620 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
621 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
622 |
virtual TVerdict DoTestStepL();
|
|
623 |
|
|
624 |
// from MMdaAudioToneObserver
|
|
625 |
virtual void MatoPrepareComplete(TInt aError);
|
|
626 |
virtual void MatoPlayComplete(TInt aError);
|
|
627 |
|
|
628 |
private:
|
|
629 |
TInt iError;
|
|
630 |
CMMFMdaAudioToneUtility* iTone;
|
|
631 |
};
|
|
632 |
|
|
633 |
/**
|
|
634 |
*
|
|
635 |
* Get State Tone Utility
|
|
636 |
*
|
|
637 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
638 |
*
|
|
639 |
* @xxxx
|
|
640 |
*
|
|
641 |
*/
|
|
642 |
class CTestStepToneState : public CTestStepUnitMMFAudClient,
|
|
643 |
public MMdaAudioToneObserver
|
|
644 |
{
|
|
645 |
public:
|
|
646 |
static CTestStepToneState* NewL();
|
|
647 |
CTestStepToneState();
|
|
648 |
~CTestStepToneState();
|
|
649 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
650 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
651 |
virtual TVerdict DoTestStepL();
|
|
652 |
|
|
653 |
// from MMdaAudioToneObserver
|
|
654 |
virtual void MatoPrepareComplete(TInt aError);
|
|
655 |
virtual void MatoPlayComplete(TInt aError);
|
|
656 |
|
|
657 |
|
|
658 |
private:
|
|
659 |
TInt iError;
|
|
660 |
CMMFMdaAudioToneUtility* iTone;
|
|
661 |
TBool iHasPlayed;
|
|
662 |
};
|
|
663 |
|
|
664 |
|
|
665 |
// Negative testing
|
|
666 |
|
|
667 |
/**
|
|
668 |
*
|
|
669 |
* Test Tone Prepare DTMF String
|
|
670 |
*
|
|
671 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
672 |
*
|
|
673 |
* @xxxx
|
|
674 |
*
|
|
675 |
*/
|
|
676 |
class CTestStepTonePrepareToPlayIllegalDTMFString : public CTestStepUnitMMFAudClient,
|
|
677 |
public MMdaAudioToneObserver
|
|
678 |
{
|
|
679 |
public:
|
|
680 |
static CTestStepTonePrepareToPlayIllegalDTMFString* NewL();
|
|
681 |
CTestStepTonePrepareToPlayIllegalDTMFString();
|
|
682 |
~CTestStepTonePrepareToPlayIllegalDTMFString();
|
|
683 |
virtual enum TVerdict DoTestStepPreambleL(void);
|
|
684 |
virtual enum TVerdict DoTestStepPostambleL(void);
|
|
685 |
virtual TVerdict DoTestStepL();
|
|
686 |
|
|
687 |
// from MMdaAudioToneObserver
|
|
688 |
virtual void MatoPrepareComplete(TInt aError);
|
|
689 |
virtual void MatoPlayComplete(TInt aError);
|
|
690 |
|
|
691 |
private:
|
|
692 |
TInt iError;
|
|
693 |
TBool iPlayComplete;
|
|
694 |
CMMFMdaAudioToneUtility* iTone;
|
|
695 |
};
|
|
696 |
|
|
697 |
|
|
698 |
/**
|
|
699 |
*
|
|
700 |
* Test Playing a zero length tone on CMdaAudioToneUtility
|
|
701 |
* (DEF044042)
|
|
702 |
*
|
|
703 |
* @lib "TSU_MMF_ACLNT_01.lib"
|
|
704 |
*
|
|
705 |
* @xxxx
|
|
706 |
*
|
|
707 |
*/
|
|
708 |
class CTestStepTonePlayZeroLength : public CTestStepUnitMMFAudClient,
|
|
709 |
public MMdaAudioToneObserver
|
|
710 |
{
|
|
711 |
public:
|
|
712 |
static CTestStepTonePlayZeroLength* NewL();
|
|
713 |
CTestStepTonePlayZeroLength();
|
|
714 |
~CTestStepTonePlayZeroLength();
|
|
715 |
virtual TVerdict DoTestStepPreambleL(void);
|
|
716 |
virtual TVerdict DoTestStepPostambleL(void);
|
|
717 |
virtual TVerdict DoTestStepL();
|
|
718 |
// From MMdaAudioToneObserver
|
|
719 |
virtual void MatoPrepareComplete(TInt aError);
|
|
720 |
virtual void MatoPlayComplete(TInt aError);
|
|
721 |
private:
|
|
722 |
TInt iError;
|
|
723 |
CMdaAudioToneUtility* iTone;
|
|
724 |
};
|
|
725 |
|
|
726 |
class CToneActiveObject;
|
|
727 |
class RTestStepTonePlayBeforeInitialized : public RAsyncTestStep,
|
|
728 |
public MMdaAudioToneObserver
|
|
729 |
{
|
|
730 |
friend class CToneActiveObject;
|
|
731 |
|
|
732 |
public:
|
|
733 |
static RTestStepTonePlayBeforeInitialized* NewL();
|
|
734 |
RTestStepTonePlayBeforeInitialized();
|
|
735 |
|
|
736 |
void KickoffTestL();
|
|
737 |
void CloseTest();
|
|
738 |
|
|
739 |
void MatoPrepareComplete(TInt aError);
|
|
740 |
void MatoPlayComplete(TInt aError);
|
|
741 |
private:
|
|
742 |
CMMFMdaAudioToneUtility* iTone;
|
|
743 |
CToneActiveObject* iToneActiveObject;
|
|
744 |
};
|
|
745 |
|
|
746 |
class CToneActiveObject : public CActive
|
|
747 |
{
|
|
748 |
public:
|
|
749 |
CToneActiveObject(RTestStepTonePlayBeforeInitialized& aTest);
|
|
750 |
~CToneActiveObject();
|
|
751 |
|
|
752 |
void Activate();
|
|
753 |
void RunL();
|
|
754 |
void DoCancel();
|
|
755 |
|
|
756 |
private:
|
|
757 |
RTestStepTonePlayBeforeInitialized& iTest;
|
|
758 |
};
|
|
759 |
|
|
760 |
|
|
761 |
class RTestStepTonePlayWhenBusy : public RAsyncTestStep,
|
|
762 |
public MMdaAudioToneObserver
|
|
763 |
{
|
|
764 |
public:
|
|
765 |
static RTestStepTonePlayWhenBusy* NewL();
|
|
766 |
|
|
767 |
RTestStepTonePlayWhenBusy();
|
|
768 |
|
|
769 |
void KickoffTestL();
|
|
770 |
void CloseTest();
|
|
771 |
|
|
772 |
void MatoPrepareComplete(TInt aError);
|
|
773 |
void MatoPlayComplete(TInt aError);
|
|
774 |
private:
|
|
775 |
CMdaAudioToneUtility* iTone;
|
|
776 |
CBusyTestUnit* iBusy;
|
|
777 |
TInt iBusyPercent; // how busy to make things in %age
|
|
778 |
TInt iBusyDelay; // delay before busy time
|
|
779 |
TInt iBusyLength; // length of busy period
|
|
780 |
TInt iToneLength;
|
|
781 |
};
|
|
782 |
|
|
783 |
#endif //(__TEST_STEP_TONE__)
|