os/mm/devsound/a3fcharacterisationtest/src/char_a3f_devsound_initializationtest.h
First public contribution.
1 // Copyright (c) 2008-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
17 #include "char_a3f_devsound_testbase.h"
19 #ifndef CHAR_A3F_DEVSOUND_INITIALIZATIONTEST_H
20 #define CHAR_A3F_DEVSOUND_INITIALIZATIONTEST_H
23 *========================================================================================================
24 * MM-A3F-DEVSOUND-CHRTZ-INIT-0001
26 class RA3FDevSoundToneInitializationTest: public RA3FDevSoundTestBase
29 static RA3FDevSoundToneInitializationTest* NewL(const TDesC& aTestName);
32 RA3FDevSoundToneInitializationTest(const TDesC& aTestName);
33 void DoKickoffTestL();
34 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
38 *========================================================================================================
39 * MM-A3F-DEVSOUND-CHRTZ-INIT-0002
41 class RA3FDevSoundToneCancelInitializeTest: public RA3FDevSoundTestBase
44 static RA3FDevSoundToneCancelInitializeTest* NewL(const TDesC& aTestName);
47 RA3FDevSoundToneCancelInitializeTest(const TDesC& aTestName);
48 void DoKickoffTestL();
49 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
50 void DoTimerCallback();
51 void InitializeComplete(TInt aError);
54 TBool iInitCompleteReceived;
55 TMMFSampleRate iESampleRate;
61 *========================================================================================================
62 * MM-A3F-DEVSOUND-CHRTZ-INIT-0003
64 class RA3FDevSoundToneInitializeToPlayTonesTwiceTest: public RA3FDevSoundTestBase
67 static RA3FDevSoundToneInitializeToPlayTonesTwiceTest* NewL(const TDesC& aTestName);
69 RA3FDevSoundToneInitializeToPlayTonesTwiceTest(const TDesC& aTestName);
70 void DoKickoffTestL();
71 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
78 *========================================================================================================
79 * MM-A3F-DEVSOUND-CHRTZ-INIT-0004
81 class RA3FDevSoundToneInitializeToPlayTonesThenAudioTest: public RA3FDevSoundTestBase
84 static RA3FDevSoundToneInitializeToPlayTonesThenAudioTest* NewL(const TDesC& aTestName);
86 RA3FDevSoundToneInitializeToPlayTonesThenAudioTest(const TDesC& aTestName);
87 void DoKickoffTestL();
88 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
95 *========================================================================================================
96 * MM-A3F-DEVSOUND-CHRTZ-INIT-0005
98 class RA3FDevSoundToneInitializeToPlayTonesThenRecordAudioTest: public RA3FDevSoundTestBase
101 static RA3FDevSoundToneInitializeToPlayTonesThenRecordAudioTest* NewL(const TDesC& aTestName);
103 RA3FDevSoundToneInitializeToPlayTonesThenRecordAudioTest(const TDesC& aTestName);
104 void DoKickoffTestL();
105 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
108 TBool iReinitialized;
112 *========================================================================================================
113 * MM-A3F-DEVSOUND-CHRTZ-INIT-0006
115 class RA3FDevSoundToneInitializeTFourCCTest: public RA3FDevSoundTestBase
118 static RA3FDevSoundToneInitializeTFourCCTest* NewL(const TDesC& aTestName);
121 RA3FDevSoundToneInitializeTFourCCTest(const TDesC& aTestName);
122 void DoKickoffTestL();
123 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
127 *========================================================================================================
128 * MM-A3F-DEVSOUND-CHRTZ-INIT-0007
130 class RA3FDevSoundInitializeInvalidModeTest: public RA3FDevSoundTestBase
133 static RA3FDevSoundInitializeInvalidModeTest* NewL(const TDesC& aTestName);
136 RA3FDevSoundInitializeInvalidModeTest(const TDesC& aTestName);
137 void DoKickoffTestL();
138 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
142 *========================================================================================================
143 * MM-A3F-DEVSOUND-CHRTZ-INIT-0008
145 class RA3FDevSoundPlayInitializationTest: public RA3FDevSoundTestBase
148 static RA3FDevSoundPlayInitializationTest* NewL(const TDesC& aTestName);
151 RA3FDevSoundPlayInitializationTest(const TDesC& aTestName);
152 void DoKickoffTestL();
153 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
157 *========================================================================================================
158 * MM-A3F-DEVSOUND-CHRTZ-INIT-0009
160 class RA3FDevSoundPlayCancelInitializeTest: public RA3FDevSoundTestBase
163 static RA3FDevSoundPlayCancelInitializeTest* NewL(const TDesC& aTestName);
165 RA3FDevSoundPlayCancelInitializeTest(const TDesC& aTestName);
166 void DoKickoffTestL();
167 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
168 void DoTimerCallback();
169 void InitializeComplete(TInt aError);
172 TBool iInitCompleteReceived;
173 TMMFSampleRate iESampleRate;
179 *========================================================================================================
180 * MM-A3F-DEVSOUND-CHRTZ-INIT-0010
182 class RA3FDevSoundPlayInitializeToPlayAudioThenTonesTest: public RA3FDevSoundTestBase
185 static RA3FDevSoundPlayInitializeToPlayAudioThenTonesTest* NewL(const TDesC& aTestName);
187 RA3FDevSoundPlayInitializeToPlayAudioThenTonesTest(const TDesC& aTestName);
188 void DoKickoffTestL();
189 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
192 TBool iReinitialized;
196 *========================================================================================================
197 * MM-A3F-DEVSOUND-CHRTZ-INIT-0011
199 class RA3FDevSoundPlayInitializeToPlayAudioTwiceTest: public RA3FDevSoundTestBase
202 static RA3FDevSoundPlayInitializeToPlayAudioTwiceTest* NewL(const TDesC& aTestName);
204 RA3FDevSoundPlayInitializeToPlayAudioTwiceTest(const TDesC& aTestName);
205 void DoKickoffTestL();
206 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
209 TBool iReinitialized;
213 *========================================================================================================
214 * MM-A3F-DEVSOUND-CHRTZ-INIT-0012
216 class RA3FDevSoundPlayInitializeToPlayAudioThenRecordTest: public RA3FDevSoundTestBase
219 static RA3FDevSoundPlayInitializeToPlayAudioThenRecordTest* NewL(const TDesC& aTestName);
221 RA3FDevSoundPlayInitializeToPlayAudioThenRecordTest(const TDesC& aTestName);
222 void DoKickoffTestL();
223 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
226 TBool iReinitialized;
230 *========================================================================================================
231 * MM-A3F-DEVSOUND-CHRTZ-INIT-0013
233 class RA3FDevSoundPlayInitializeInvalidTFourCCTest: public RA3FDevSoundTestBase
236 static RA3FDevSoundPlayInitializeInvalidTFourCCTest* NewL(const TDesC& aTestName);
239 RA3FDevSoundPlayInitializeInvalidTFourCCTest(const TDesC& aTestName);
240 void DoKickoffTestL();
241 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
245 *========================================================================================================
246 * MM-A3F-DEVSOUND-CHRTZ-INIT-0014
248 class RA3FDevSoundRecordInitializationTest: public RA3FDevSoundTestBase
251 static RA3FDevSoundRecordInitializationTest* NewL(const TDesC& aTestName);
253 RA3FDevSoundRecordInitializationTest(const TDesC& aTestName);
254 void DoKickoffTestL();
255 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
259 *========================================================================================================
260 * MM-A3F-DEVSOUND-CHRTZ-INIT-0015
262 class RA3FDevSoundRecordCancelInitializeTest: public RA3FDevSoundTestBase
265 static RA3FDevSoundRecordCancelInitializeTest* NewL(const TDesC& aTestName);
268 RA3FDevSoundRecordCancelInitializeTest(const TDesC& aTestName);
269 void DoKickoffTestL();
270 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
271 void DoTimerCallback();
272 void InitializeComplete(TInt aError);
275 TBool iInitCompleteReceived;
276 TMMFSampleRate iESampleRate;
282 *========================================================================================================
283 * MM-A3F-DEVSOUND-CHRTZ-INIT-0016
285 class RA3FDevSoundRecordInitializeThenPlayToneInitializeTest: public RA3FDevSoundTestBase
288 static RA3FDevSoundRecordInitializeThenPlayToneInitializeTest* NewL(const TDesC& aTestName);
290 RA3FDevSoundRecordInitializeThenPlayToneInitializeTest(const TDesC& aTestName);
291 void DoKickoffTestL();
292 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
295 TBool iReinitialized;
299 *========================================================================================================
300 * MM-A3F-DEVSOUND-CHRTZ-INIT-0017
302 class RA3FDevSoundRecordInitializeThenPlayAudioInitializeTest: public RA3FDevSoundTestBase
305 static RA3FDevSoundRecordInitializeThenPlayAudioInitializeTest* NewL(const TDesC& aTestName);
307 RA3FDevSoundRecordInitializeThenPlayAudioInitializeTest(const TDesC& aTestName);
308 void DoKickoffTestL();
309 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
312 TBool iReinitialized;
316 *========================================================================================================
317 * MM-A3F-DEVSOUND-CHRTZ-INIT-0018
319 class RA3FDevSoundRecordInitializeToRecordAudioTwiceTest: public RA3FDevSoundTestBase
322 static RA3FDevSoundRecordInitializeToRecordAudioTwiceTest* NewL(const TDesC& aTestName);
324 RA3FDevSoundRecordInitializeToRecordAudioTwiceTest(const TDesC& aTestName);
325 void DoKickoffTestL();
326 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
329 TBool iReinitialized;
333 *========================================================================================================
334 * MM-A3F-DEVSOUND-CHRTZ-INIT-0019
336 class RA3FDevSoundRecordInitializeNoFormatSpecificationPresentedTest: public RA3FDevSoundTestBase
339 static RA3FDevSoundRecordInitializeNoFormatSpecificationPresentedTest* NewL(const TDesC& aTestName);
342 RA3FDevSoundRecordInitializeNoFormatSpecificationPresentedTest(const TDesC& aTestName);
343 void DoKickoffTestL();
344 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
348 *========================================================================================================
349 * MM-A3F-DEVSOUND-CHRTZ-INIT-0020
351 class RA3FDevSoundPlayDataWithoutInitializeTest: public RA3FDevSoundTestBase
354 static RA3FDevSoundPlayDataWithoutInitializeTest* NewL(const TDesC& aTestName);
357 RA3FDevSoundPlayDataWithoutInitializeTest(const TDesC& aTestName);
358 void DoKickoffTestL();
359 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
360 void DoTimerCallback();
364 *========================================================================================================
365 * MM-A3F-DEVSOUND-CHRTZ-INIT-0021
367 class RA3FDevSoundPlayDTMFStringWithoutInitializeTest: public RA3FDevSoundTestBase
370 static RA3FDevSoundPlayDTMFStringWithoutInitializeTest* NewL(const TDesC& aTestName);
373 RA3FDevSoundPlayDTMFStringWithoutInitializeTest(const TDesC& aTestName);
374 void DoKickoffTestL();
375 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
378 TBuf16<KMaxStringLength> iDTMFString;
382 *========================================================================================================
383 * MM-A3F-DEVSOUND-CHRTZ-INIT-0022
385 class RA3FDevSoundPlayDualToneWithoutInitializeTest: public RA3FDevSoundTestBase
388 static RA3FDevSoundPlayDualToneWithoutInitializeTest* NewL(const TDesC& aTestName);
391 RA3FDevSoundPlayDualToneWithoutInitializeTest(const TDesC& aTestName);
392 void DoKickoffTestL();
393 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
397 TInt iFrequencyTone1;
398 TInt iFrequencyTone2;
402 *========================================================================================================
403 * MM-A3F-DEVSOUND-CHRTZ-INIT-0023
405 class RA3FDevSoundPlayFixedSequenceWithoutInitializeTest: public RA3FDevSoundTestBase
408 static RA3FDevSoundPlayFixedSequenceWithoutInitializeTest* NewL(const TDesC& aTestName);
411 RA3FDevSoundPlayFixedSequenceWithoutInitializeTest(const TDesC& aTestName);
412 void DoKickoffTestL();
413 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
417 *========================================================================================================
418 * MM-A3F-DEVSOUND-CHRTZ-INIT-0024
420 class RA3FDevSoundPlayInitWithoutInitializeTest: public RA3FDevSoundTestBase
423 static RA3FDevSoundPlayInitWithoutInitializeTest* NewL(const TDesC& aTestName);
426 RA3FDevSoundPlayInitWithoutInitializeTest(const TDesC& aTestName);
427 void DoKickoffTestL();
428 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
432 *========================================================================================================
433 * MM-A3F-DEVSOUND-CHRTZ-INIT-0025
435 class RA3FDevSoundPlayToneWithoutInitializeTest: public RA3FDevSoundTestBase
438 static RA3FDevSoundPlayToneWithoutInitializeTest* NewL(const TDesC& aTestName);
441 RA3FDevSoundPlayToneWithoutInitializeTest(const TDesC& aTestName);
442 void DoKickoffTestL();
443 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
447 TInt iFrequencyTone1;
451 *========================================================================================================
452 * MM-A3F-DEVSOUND-CHRTZ-INIT-0026
454 class RA3FDevSoundPlayToneSequenceWithoutInitializeTest: public RA3FDevSoundTestBase
457 static RA3FDevSoundPlayToneSequenceWithoutInitializeTest* NewL(const TDesC& aTestName);
460 RA3FDevSoundPlayToneSequenceWithoutInitializeTest(const TDesC& aTestName);
461 void DoKickoffTestL();
462 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
466 *========================================================================================================
467 * MM-A3F-DEVSOUND-CHRTZ-INIT-0027
469 class RA3FDevSoundRecordDataWithoutInitializeTest: public RA3FDevSoundTestBase
472 static RA3FDevSoundRecordDataWithoutInitializeTest* NewL(const TDesC& aTestName);
475 RA3FDevSoundRecordDataWithoutInitializeTest(const TDesC& aTestName);
476 void DoKickoffTestL();
477 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
478 void DoTimerCallback();
482 *========================================================================================================
483 * MM-A3F-DEVSOUND-CHRTZ-INIT-0028
485 class RA3FDevSoundRecordInitWithoutInitializeTest: public RA3FDevSoundTestBase
488 static RA3FDevSoundRecordInitWithoutInitializeTest* NewL(const TDesC& aTestName);
491 RA3FDevSoundRecordInitWithoutInitializeTest(const TDesC& aTestName);
492 void DoKickoffTestL();
493 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
497 *========================================================================================================
498 * MM-A3F-DEVSOUND-CHRTZ-INIT-0029
500 class RA3FDevSoundToneInitializationMoreThanOnceBeforeInitCompleteTest: public RA3FDevSoundTestBase
503 static RA3FDevSoundToneInitializationMoreThanOnceBeforeInitCompleteTest* NewL(const TDesC& aTestName);
506 RA3FDevSoundToneInitializationMoreThanOnceBeforeInitCompleteTest(const TDesC& aTestName);
507 void DoKickoffTestL();
508 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
512 *========================================================================================================
513 * MM-A3F-DEVSOUND-CHRTZ-INIT-0030
515 class RA3FDevSoundPlayInitializationMoreThanOnceBeforeInitCompleteTest: public RA3FDevSoundTestBase
518 static RA3FDevSoundPlayInitializationMoreThanOnceBeforeInitCompleteTest* NewL(const TDesC& aTestName);
521 RA3FDevSoundPlayInitializationMoreThanOnceBeforeInitCompleteTest(const TDesC& aTestName);
522 void DoKickoffTestL();
523 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
527 *========================================================================================================
528 * MM-A3F-DEVSOUND-CHRTZ-INIT-0031
530 class RA3FDevSoundRecordInitializationMoreThanOnceBeforeInitCompleteTest: public RA3FDevSoundTestBase
533 static RA3FDevSoundRecordInitializationMoreThanOnceBeforeInitCompleteTest* NewL(const TDesC& aTestName);
536 RA3FDevSoundRecordInitializationMoreThanOnceBeforeInitCompleteTest(const TDesC& aTestName);
537 void DoKickoffTestL();
538 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
542 *========================================================================================================
543 * MM-A3F-DEVSOUND-CHRTZ-INIT-0032
545 class RA3FDevSoundToneFirstInitializationLeavesThenSecondSucceeds: public RA3FDevSoundTestBase
548 static RA3FDevSoundToneFirstInitializationLeavesThenSecondSucceeds* NewL(const TDesC& aTestName);
551 RA3FDevSoundToneFirstInitializationLeavesThenSecondSucceeds(const TDesC& aTestName);
552 void DoKickoffTestL();
553 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
557 *========================================================================================================
558 * MM-A3F-DEVSOUND-CHRTZ-INIT-0033
560 class RA3FDevSoundPlayFirstInitializationLeavesThenSecondSucceeds: public RA3FDevSoundTestBase
563 static RA3FDevSoundPlayFirstInitializationLeavesThenSecondSucceeds* NewL(const TDesC& aTestName);
566 RA3FDevSoundPlayFirstInitializationLeavesThenSecondSucceeds(const TDesC& aTestName);
567 void DoKickoffTestL();
568 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
572 *========================================================================================================
573 * MM-A3F-DEVSOUND-CHRTZ-INIT-0034
575 class RA3FDevSoundRecordFirstInitializationLeavesThenSecondSucceeds: public RA3FDevSoundTestBase
578 static RA3FDevSoundRecordFirstInitializationLeavesThenSecondSucceeds* NewL(const TDesC& aTestName);
581 RA3FDevSoundRecordFirstInitializationLeavesThenSecondSucceeds(const TDesC& aTestName);
582 void DoKickoffTestL();
583 void Fsm(TMmfDevSoundEvent aDevSoundEvent, TInt aError);
585 #endif //CHAR_A3F_DEVSOUND_INITIALIZATIONTEST_H