109 */ |
109 */ |
110 RProperty::Set( NMusSessionInformationApi::KCategoryUid, |
110 RProperty::Set( NMusSessionInformationApi::KCategoryUid, |
111 NMusSessionInformationApi::KMusCallEvent, |
111 NMusSessionInformationApi::KMusCallEvent, |
112 0 ); |
112 0 ); |
113 |
113 |
114 iCallEventMonitor = CMusCallEventMonitor::NewL( iCall, *this ); |
114 iCallEventMonitor = CMusCallEventMonitor::NewL( iCall, *this, *this ); |
115 |
115 |
116 } |
116 } |
117 |
117 |
118 |
118 |
119 // ----------------------------------------------------------------------------- |
119 // ----------------------------------------------------------------------------- |
168 val ); |
168 val ); |
169 EUNIT_ASSERT( val==NMusSessionInformationApi::ECallConnected); |
169 EUNIT_ASSERT( val==NMusSessionInformationApi::ECallConnected); |
170 |
170 |
171 // Test : Local Transfered. Means no call. |
171 // Test : Local Transfered. Means no call. |
172 iCallEventMonitor->Cancel(); |
172 iCallEventMonitor->Cancel(); |
173 RProperty::Get( NMusSessionInformationApi::KCategoryUid, |
|
174 NMusSessionInformationApi::KMusCallEvent, |
|
175 val ); |
|
176 TInt callEnt = val; |
|
177 RTelHelper::SetCallEvent( RMobileCall::ELocalTransfer ); |
173 RTelHelper::SetCallEvent( RMobileCall::ELocalTransfer ); |
178 iCallEventMonitor->RunL(); |
174 iCallEventMonitor->RunL(); |
179 RProperty::Get( NMusSessionInformationApi::KCategoryUid, |
175 RProperty::Get( NMusSessionInformationApi::KCategoryUid, |
180 NMusSessionInformationApi::KMusCallEvent, |
176 NMusSessionInformationApi::KMusCallEvent, |
181 val ); |
177 val ); |
182 |
178 |
183 EUNIT_ASSERT( callEnt==val ); |
179 EUNIT_ASSERT( val==NMusSessionInformationApi::ENoCall); |
184 |
180 |
185 // Test : Remote is on hold |
181 // Test : Remote is on hold |
186 iCallEventMonitor->Cancel(); |
182 iCallEventMonitor->Cancel(); |
187 RTelHelper::SetCallEvent( RMobileCall::ERemoteHold ); |
183 RTelHelper::SetCallEvent( RMobileCall::ERemoteHold ); |
188 iCallEventMonitor->RunL(); |
184 iCallEventMonitor->RunL(); |
214 EUNIT_ASSERT( val==NMusSessionInformationApi::ENoCall); |
210 EUNIT_ASSERT( val==NMusSessionInformationApi::ENoCall); |
215 */ |
211 */ |
216 |
212 |
217 // Test : Remote is on conference |
213 // Test : Remote is on conference |
218 iCallEventMonitor->Cancel(); |
214 iCallEventMonitor->Cancel(); |
219 RProperty::Get( NMusSessionInformationApi::KCategoryUid, |
|
220 NMusSessionInformationApi::KMusCallEvent, |
|
221 val ); |
|
222 callEnt = val; |
|
223 RTelHelper::SetCallEvent( RMobileCall::ERemoteConferenceCreate ); |
215 RTelHelper::SetCallEvent( RMobileCall::ERemoteConferenceCreate ); |
224 iCallEventMonitor->RunL(); |
216 iCallEventMonitor->RunL(); |
225 RProperty::Get( NMusSessionInformationApi::KCategoryUid, |
217 RProperty::Get( NMusSessionInformationApi::KCategoryUid, |
226 NMusSessionInformationApi::KMusCallEvent, |
218 NMusSessionInformationApi::KMusCallEvent, |
227 val ); |
219 val ); |
228 EUNIT_ASSERT( callEnt==val ); |
220 EUNIT_ASSERT( val==NMusSessionInformationApi::EConferenceCall); |
229 |
221 |
230 // Test : Remote conference transfer |
222 // Test : Remote conference transfer |
231 iCallEventMonitor->Cancel(); |
223 iCallEventMonitor->Cancel(); |
232 RTelHelper::SetCallEvent( RMobileCall::ERemoteTransferring ); |
224 RTelHelper::SetCallEvent( RMobileCall::ERemoteTransferring ); |
233 iCallEventMonitor->RunL(); |
225 iCallEventMonitor->RunL(); |
234 RProperty::Get( NMusSessionInformationApi::KCategoryUid, |
226 RProperty::Get( NMusSessionInformationApi::KCategoryUid, |
235 NMusSessionInformationApi::KMusCallEvent, |
227 NMusSessionInformationApi::KMusCallEvent, |
236 val ); |
228 val ); |
237 EUNIT_ASSERT( val==callEnt ); |
229 EUNIT_ASSERT( val==NMusSessionInformationApi::EConferenceCall);//Previous state. |
238 |
230 |
239 // remote is connected state and local resume |
231 // remote is connected state and local resume |
240 iCallEventMonitor->Cancel(); |
232 iCallEventMonitor->Cancel(); |
241 RTelHelper::SetCallEvent( RMobileCall::ELocalResume ); |
233 RTelHelper::SetCallEvent( RMobileCall::ELocalResume ); |
242 iCallEventMonitor->iRemoteCallEvent = RMobileCall::ERemoteResume; |
234 iCallEventMonitor->iRemoteCallEvent = RMobileCall::ERemoteResume; |
298 // |
290 // |
299 void UT_CMusCallEventMonitor::UT_CMusCallEventMonitor_RunErrorL() |
291 void UT_CMusCallEventMonitor::UT_CMusCallEventMonitor_RunErrorL() |
300 { |
292 { |
301 EUNIT_ASSERT( iCallEventMonitor ); |
293 EUNIT_ASSERT( iCallEventMonitor ); |
302 TInt error = KErrNotFound; |
294 TInt error = KErrNotFound; |
303 EUNIT_ASSERT_EQUALS(iCallEventMonitor->RunError(error), KErrNone); |
295 iCallEventMonitor->RunError(error); |
304 EUNIT_ASSERT_EQUALS(iCallEventMonitor->RunError(KErrNone), KErrNone); |
296 } |
305 } |
297 |
306 |
298 |
307 |
299 // ----------------------------------------------------------------------------- |
308 |
300 // MusCallStateChanged from the MusCallStateObserver |
|
301 // ----------------------------------------------------------------------------- |
|
302 // |
|
303 void UT_CMusCallEventMonitor::MusCallStateChanged() |
|
304 { |
|
305 //NOP: |
|
306 } |
309 |
307 |
310 |
308 |
311 // TEST TABLE |
309 // TEST TABLE |
312 |
310 |
313 EUNIT_BEGIN_TEST_TABLE( |
311 EUNIT_BEGIN_TEST_TABLE( |