|
1 |
|
2 /* |
|
3 * Copyright (c) 2010-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
4 * All rights reserved. |
|
5 * This component and the accompanying materials are made available |
|
6 * under the terms of "Eclipse Public License v1.0" |
|
7 * which accompanies this distribution, and is available |
|
8 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 * |
|
10 * Initial Contributors: |
|
11 * Nokia Corporation - initial contribution. |
|
12 * |
|
13 * Contributors: |
|
14 * |
|
15 * Description: MT_PhoneRingingTonePlayer |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef __MT_PHONERINGINGTONEPLAYER_H__ |
|
20 #define __MT_PHONERINGINGTONEPLAYER_H__ |
|
21 |
|
22 #include <CEUnitTestSuiteClass.h> |
|
23 |
|
24 #include "devsoundstub.h" |
|
25 #include "rphonetoneclient.h" |
|
26 |
|
27 #include <e32def.h> |
|
28 #ifndef NONSHARABLE_CLASS |
|
29 #define NONSHARABLE_CLASS(x) class x |
|
30 #endif |
|
31 |
|
32 NONSHARABLE_CLASS( MT_PhoneRingingTonePlayer ) |
|
33 : public CEUnitTestSuiteClass |
|
34 { |
|
35 public: |
|
36 |
|
37 static MT_PhoneRingingTonePlayer* NewL(); |
|
38 static MT_PhoneRingingTonePlayer* NewLC(); |
|
39 ~MT_PhoneRingingTonePlayer(); |
|
40 |
|
41 private: |
|
42 |
|
43 MT_PhoneRingingTonePlayer(); |
|
44 void ConstructL(); |
|
45 |
|
46 private: |
|
47 |
|
48 void SetupL(); |
|
49 |
|
50 void Teardown(); |
|
51 |
|
52 void EmptySetupL(); |
|
53 |
|
54 void EmptyTeardown(); |
|
55 |
|
56 // Test cases : |
|
57 |
|
58 void MT_Empty(); |
|
59 |
|
60 /*done*/ void MT_CreateServerInstanceAndConnectL(); |
|
61 |
|
62 /*done*/ void MT_CreateServerInstanceAndConnectTwiceL(); // Inter-process communication fuzzing ( IPC - fuzz ) |
|
63 |
|
64 /*done*/ void MT_PlayDefaultL(); |
|
65 |
|
66 /*done*/ void MT_PlayCustomSampleL(); |
|
67 |
|
68 /*done*/ void MT_PlayCustomSampleWithDelayL(); |
|
69 |
|
70 /*done*/ void MT_PlayCustomSampleWithErrorL(); // Switch to default playback |
|
71 |
|
72 /*done*/ void MT_PlayCustomSampleWithDelayAndErrorL(); // timer callback |
|
73 |
|
74 /*done*/ void MT_PlayCustomToneL(); |
|
75 |
|
76 /*done*/ void MT_PlayCustomToneWithDelayL(); |
|
77 |
|
78 /*done*/ void MT_PlayCustomToneWithErrorL(); |
|
79 |
|
80 /*done*/ void MT_PlayCustomToneWithDelayAndErrorL(); |
|
81 |
|
82 /*done*/ void MT_PlayAndStopL(); |
|
83 |
|
84 /*done*/ void MT_PlayAndStopDuringInitL(); |
|
85 |
|
86 /*done*/ void MT_PlaySilentL(); |
|
87 |
|
88 |
|
89 private: |
|
90 |
|
91 // Utility functions |
|
92 |
|
93 TBool SamplePlayerContainsCall( CMdaAudioPlayerUtility::TFunctionCall aCall ); |
|
94 TBool SamplePlayerContainsCallData( CTestFunctionCallData* aData ); |
|
95 TBool SamplePlayerContainsOnlyOneCall( CMdaAudioPlayerUtility::TFunctionCall aCall ); |
|
96 TBool TonePlayerContainsOnlyOneCall( CMdaAudioToneUtility::TFunctionCall aCall ); |
|
97 TBool TonePlayerContainsCall( CMdaAudioToneUtility::TFunctionCall aCall ); |
|
98 TBool TonePlayerContainsCallData( CTestFunctionCallData* aData ); |
|
99 |
|
100 private: |
|
101 |
|
102 RPhoneToneClient iClient; |
|
103 |
|
104 |
|
105 EUNIT_DECLARE_TEST_TABLE; |
|
106 |
|
107 |
|
108 |
|
109 }; |
|
110 |
|
111 #endif // __MT_PHONERINGINGTONEPLAYER_H__ |
|
112 |
|
113 // End of file |