|
1 /* |
|
2 * Copyright (c) 2004 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __UT_CILBCPAYLOADFORMATWRITE_H__ |
|
22 #define __UT_CILBCPAYLOADFORMATWRITE_H__ |
|
23 |
|
24 // EXTERNAL INCLUDES |
|
25 #include <digia/eunit/ceunittestsuiteclass.h> |
|
26 |
|
27 // INTERNAL INCLUDES |
|
28 #include <mmf/common/mmfcontroller.h> |
|
29 #include <mmf/server/mmfformat.h> |
|
30 #include <e32base.h> |
|
31 #include "rtpapi.h" |
|
32 #include "mccdef.h" // MMccEventHandler definition |
|
33 #include "mccinternaldef.h" // MMccEventHandler definition |
|
34 #include "mccinternalcodecs.h" |
|
35 |
|
36 // FORWARD DECLARATIONS |
|
37 class CIlbcPayloadFormatWrite; |
|
38 class MDataSink; |
|
39 class CMccRtpDataSink; |
|
40 class CMccRtpMediaClock; |
|
41 |
|
42 // CLASS DEFINITION |
|
43 /** |
|
44 * |
|
45 * EUnitWizard generated test class. |
|
46 * |
|
47 */ |
|
48 class UT_CIlbcPayloadFormatWrite : public CEUnitTestSuiteClass, |
|
49 public MAsyncEventHandler |
|
50 { |
|
51 public: // Constructors and destructors |
|
52 |
|
53 /** |
|
54 * Two phase construction |
|
55 */ |
|
56 static UT_CIlbcPayloadFormatWrite* NewL(); |
|
57 static UT_CIlbcPayloadFormatWrite* NewLC(); |
|
58 /** |
|
59 * Destructor |
|
60 */ |
|
61 ~UT_CIlbcPayloadFormatWrite(); |
|
62 |
|
63 private: // Constructors and destructors |
|
64 |
|
65 UT_CIlbcPayloadFormatWrite(); |
|
66 void ConstructL(); |
|
67 |
|
68 private: // New methods |
|
69 |
|
70 |
|
71 void SetupAL(); |
|
72 |
|
73 void Setup2AL(); |
|
74 |
|
75 void SetupL(); |
|
76 |
|
77 void Teardown(); |
|
78 |
|
79 |
|
80 void UT_CIlbcPayloadFormatWrite_NewLL(); |
|
81 |
|
82 void UT_CIlbcPayloadFormatWrite_FrameTimeIntervalL(); |
|
83 |
|
84 |
|
85 void UT_CIlbcPayloadFormatWrite_DurationL(); |
|
86 |
|
87 |
|
88 void UT_CIlbcPayloadFormatWrite_CreateSinkBufferLL(); |
|
89 |
|
90 |
|
91 void UT_CIlbcPayloadFormatWrite_SinkDataTypeCodeL(); |
|
92 |
|
93 |
|
94 void UT_CIlbcPayloadFormatWrite_SetSinkDataTypeCodeL(); |
|
95 |
|
96 |
|
97 void UT_CIlbcPayloadFormatWrite_SinkThreadLogonL(); |
|
98 |
|
99 |
|
100 void UT_CIlbcPayloadFormatWrite_SinkThreadLogoffL(); |
|
101 |
|
102 |
|
103 void UT_CIlbcPayloadFormatWrite_EmptyBufferLL(); |
|
104 |
|
105 |
|
106 void UT_CIlbcPayloadFormatWrite_BufferEmptiedLL(); |
|
107 |
|
108 |
|
109 void UT_CIlbcPayloadFormatWrite_SampleRateL(); |
|
110 |
|
111 |
|
112 void UT_CIlbcPayloadFormatWrite_SetSampleRateL(); |
|
113 |
|
114 |
|
115 void UT_CIlbcPayloadFormatWrite_DeliverPacketLL(); |
|
116 |
|
117 |
|
118 void UT_CIlbcPayloadFormatWrite_EmptySourceBufferLL(); |
|
119 |
|
120 |
|
121 void UT_CIlbcPayloadFormatWrite_SourceBufferEmptiedLL(); |
|
122 |
|
123 |
|
124 void UT_CIlbcPayloadFormatWrite_SinkPrimeLL(); |
|
125 |
|
126 |
|
127 void UT_CIlbcPayloadFormatWrite_SinkPlayLL(); |
|
128 |
|
129 |
|
130 void UT_CIlbcPayloadFormatWrite_SinkPauseLL(); |
|
131 |
|
132 |
|
133 void UT_CIlbcPayloadFormatWrite_SinkStopLL(); |
|
134 |
|
135 void UT_CIlbcPayloadFormatWrite_ConfigurePayloadFormatLL(); |
|
136 |
|
137 void UT_CIlbcPayloadFormatWrite_UpdateConfigurationLL(); |
|
138 |
|
139 void UT_CIlbcPayloadFormatWrite_NumChannelsL(); |
|
140 |
|
141 |
|
142 // VIRTUALS |
|
143 |
|
144 virtual TInt SendEventToClient( const TMMFEvent& /*aEvent*/ ) { return KErrNone; } |
|
145 |
|
146 virtual TInt SendMccEventToClient( TMccEvent& /*aEvent*/ ) { return KErrNone; } |
|
147 |
|
148 virtual void StateChange( TInt /*aState*/, TUint32 /*aLink*/ ) {} |
|
149 |
|
150 virtual void ErrorOccured( TInt /*aError*/, |
|
151 TUint32 /*aSessionId*/, |
|
152 TUint32 /*aLinkId*/, |
|
153 TUint32 /*aStreamId*/, |
|
154 TUint32 /*aEndpointId*/ ) {} |
|
155 |
|
156 |
|
157 private: // Data |
|
158 |
|
159 |
|
160 TBool iAlloc; |
|
161 CIlbcPayloadFormatWrite* iWrite; |
|
162 MDataSource* iUlSink; |
|
163 MDataSink* iRtpDataSinkStub; |
|
164 CMMFBuffer* iBuffer; |
|
165 CMMFBuffer* iBuf; |
|
166 |
|
167 CMMFDataBuffer* iBuff; |
|
168 |
|
169 TMccCodecInfo iCodec; |
|
170 |
|
171 CMccRtpMediaClock* iRtpMediaClock; |
|
172 TMediaId iMediaId; |
|
173 |
|
174 EUNIT_DECLARE_TEST_TABLE; |
|
175 |
|
176 }; |
|
177 |
|
178 #endif // __UT_CILBCPAYLOADFORMATWRITE_H__ |
|
179 |
|
180 // End of file |