|
1 // Copyright (c) 2007-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 // Test step definitions for the ConferenceCallControl functional unit. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @internalTechnology |
|
20 */ |
|
21 |
|
22 #include "cctsyintegrationtestconferencecallcontrol.h" |
|
23 #include "cctsyinidata.h" |
|
24 #include "etelmmerr.h" |
|
25 #include "cctsytestlogging.h" |
|
26 #include <stdlib.h> |
|
27 |
|
28 |
|
29 |
|
30 CCTSYIntegrationTestConferenceCallControlBase::CCTSYIntegrationTestConferenceCallControlBase(CEtelSessionMgr& aEtelSessionMgr) |
|
31 : CCTSYIntegrationTestSuiteStepBase(aEtelSessionMgr), |
|
32 iCallControlTsyTestHelper(*this), |
|
33 iNetworkTsyTestHelper(*this) |
|
34 /** |
|
35 * Constructor |
|
36 */ |
|
37 { |
|
38 } |
|
39 |
|
40 CCTSYIntegrationTestConferenceCallControlBase::~CCTSYIntegrationTestConferenceCallControlBase() |
|
41 /* |
|
42 * Destructor |
|
43 */ |
|
44 { |
|
45 } |
|
46 |
|
47 |
|
48 /** |
|
49 * Make a call and verify the new status |
|
50 * @param aCall Call object |
|
51 * @param aNumber Number is be used |
|
52 * @return Status of conference call |
|
53 */ |
|
54 RMobileCall::TMobileCallStatus CCTSYIntegrationTestConferenceCallControlBase::MakeCallL(RMobileCall& aCall, TPtrC& aNumber) |
|
55 { |
|
56 |
|
57 // set up notification for call status changes |
|
58 TExtEtelRequestStatus notifyCallStatus(aCall,EMobileCallNotifyMobileCallStatusChange); |
|
59 CleanupStack::PushL(notifyCallStatus); |
|
60 RMobileCall::TMobileCallStatus callStatus; |
|
61 aCall.NotifyMobileCallStatusChange(notifyCallStatus, callStatus); |
|
62 |
|
63 // Dial the number |
|
64 TCoreEtelRequestStatus<RMobileCall> dialStatus(aCall, &RCall::DialCancel); |
|
65 CleanupStack::PushL(dialStatus); |
|
66 aCall.Dial(dialStatus, aNumber); |
|
67 ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RMobileCall::Dial timed-out")); |
|
68 ASSERT_EQUALS(dialStatus.Int(), KErrNone, _L("RMobileCall::Dial returned an error") ); |
|
69 |
|
70 // Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusDialling -> EStatusConnecting -> EStatusConnected. |
|
71 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(aCall, notifyCallStatus, callStatus, RMobileCall::EStatusDialling, KErrNone); |
|
72 aCall.NotifyMobileCallStatusChange(notifyCallStatus, callStatus); |
|
73 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(aCall, notifyCallStatus, callStatus, RMobileCall::EStatusConnecting, KErrNone); |
|
74 aCall.NotifyMobileCallStatusChange(notifyCallStatus, callStatus); |
|
75 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(aCall, notifyCallStatus, callStatus, RMobileCall::EStatusConnected, KErrNone); |
|
76 |
|
77 // Pop |
|
78 // notifyCallStatus |
|
79 // dialStatus |
|
80 CleanupStack::PopAndDestroy(2, ¬ifyCallStatus); |
|
81 |
|
82 return callStatus; |
|
83 } |
|
84 |
|
85 |
|
86 /** |
|
87 * Place a call on hold and verify the new status |
|
88 * @param aCall Call object |
|
89 * @return Status of conference call |
|
90 */ |
|
91 RMobileCall::TMobileCallStatus CCTSYIntegrationTestConferenceCallControlBase::HoldCallL( RMobileCall& aCall) |
|
92 { |
|
93 |
|
94 // Post notification for call status change |
|
95 TExtEtelRequestStatus notifyMobileCallStatusChangeStatus(aCall, EMobileCallNotifyMobileCallStatusChange); |
|
96 CleanupStack::PushL(notifyMobileCallStatusChangeStatus); |
|
97 RMobileCall::TMobileCallStatus mobileCallStatus; |
|
98 aCall.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus, mobileCallStatus); |
|
99 |
|
100 // Hold call |
|
101 TExtEtelRequestStatus reqHoldStatus(aCall, EMobileCallHold); |
|
102 CleanupStack::PushL(reqHoldStatus); |
|
103 aCall.Hold(reqHoldStatus); |
|
104 ASSERT_EQUALS(WaitForRequestWithTimeOut(reqHoldStatus, ETimeMedium), KErrNone, _L("RMobileCall::Hold timed-out")); |
|
105 ASSERT_EQUALS(reqHoldStatus.Int(), KErrNone, _L("RMobileCall::Hold returned an error")); |
|
106 |
|
107 // Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusHold. |
|
108 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(aCall, |
|
109 notifyMobileCallStatusChangeStatus, |
|
110 mobileCallStatus, |
|
111 RMobileCall::EStatusHold, |
|
112 KErrNone); |
|
113 // Pop |
|
114 // notifyMobileCallStatusChangeStatus |
|
115 // reqHoldStatus |
|
116 CleanupStack::PopAndDestroy(2, ¬ifyMobileCallStatusChangeStatus); |
|
117 |
|
118 return mobileCallStatus; |
|
119 } |
|
120 |
|
121 |
|
122 /** |
|
123 * Add a call to a conference. Leaves on failure. |
|
124 * @param aConfCall Conference call object |
|
125 * @param aCall Call object to use |
|
126 * @param aNumber Number to dial |
|
127 * |
|
128 */ |
|
129 void CCTSYIntegrationTestConferenceCallControlBase::AddCallToConferenceL( RMobileConferenceCall& aConfCall, |
|
130 RMobileCall& aCall, TPtrC& aNumber, |
|
131 TInt aIndex ) |
|
132 { |
|
133 |
|
134 DEBUG_PRINTF3(_L("Adding call %d to conference : %S"), aIndex, &aNumber ); |
|
135 // Swap the conference call. |
|
136 TExtEtelRequestStatus reqSwapConfStatus(aConfCall,EMobileConferenceCallSwap); |
|
137 CleanupStack::PushL(reqSwapConfStatus); |
|
138 aConfCall.Swap(reqSwapConfStatus); |
|
139 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqSwapConfStatus,ETimeShort),KErrNone, _L("RMobileConferenceCall::Swap timed out")); |
|
140 ASSERT_EQUALS( reqSwapConfStatus.Int(),KErrNone, _L("RMobileConferenceCall::Swap returned error")); |
|
141 TEST_CHECK_POINT_L(_L("RMobileConferenceCall::Swap failed")); |
|
142 |
|
143 // Dial a number that answers |
|
144 // Check RMobileCall::GetMobileCallStatus returns status of EStatusConnected. |
|
145 RMobileCall::TMobileCallStatus callStatus = MakeCallL(aCall, aNumber); |
|
146 ASSERT_EQUALS(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call")); |
|
147 TEST_CHECK_POINT_L(_L("Failed to connect call")); |
|
148 |
|
149 // Set up notification |
|
150 TExtEtelRequestStatus notifyConfEventStatus(aConfCall,EMobileConferenceCallNotifyConferenceEvent); |
|
151 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
152 TName confEventCallName; |
|
153 aConfCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
154 |
|
155 // Add call to the conference |
|
156 TExtEtelRequestStatus reqAddCallStatus(aConfCall,EMobileConferenceCallAddCall); |
|
157 CleanupStack::PushL(reqAddCallStatus); |
|
158 |
|
159 // Get the call info (need the name) |
|
160 RCall::TCallInfo callInfo; |
|
161 TInt err = aCall.GetInfo(callInfo); |
|
162 ASSERT_EQUALS(err, KErrNone, _L("RCall::GetInfo returned error")); |
|
163 aConfCall.AddCall(reqAddCallStatus,callInfo.iCallName); |
|
164 ASSERT_EQUALS(WaitForRequestWithTimeOut(reqAddCallStatus,ETimeShort),KErrNone, _L("RMobileConferenceCall::AddCall timed out")); |
|
165 ASSERT_EQUALS(reqAddCallStatus.Int(),KErrNone, _L("RMobileConferenceCall::AddCall returned error")); |
|
166 TEST_CHECK_POINT_L(_L("AddCallToConferenceL failed")); |
|
167 |
|
168 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceCallAdded |
|
169 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( aConfCall, |
|
170 notifyConfEventStatus, |
|
171 confEvent, |
|
172 RMobileConferenceCall::EConferenceCallAdded, |
|
173 confEventCallName, |
|
174 KErrNone); |
|
175 |
|
176 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
177 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
178 ASSERT_EQUALS(aConfCall.GetConferenceStatus(confCallConfStatus), KErrNone, _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
179 ASSERT_EQUALS(confCallConfStatus, RMobileConferenceCall::EConferenceActive, _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
180 TEST_CHECK_POINT_L(_L("AddCallToConferenceL failed")); |
|
181 |
|
182 // Pop |
|
183 // reqAddCallStatus |
|
184 // reqSwapConfStatus |
|
185 CleanupStack::PopAndDestroy(2,&reqSwapConfStatus); |
|
186 } |
|
187 |
|
188 /** |
|
189 * Check the conference call information returned |
|
190 * @param aConfCall Conference call object |
|
191 * @param aNumber Dialled number for comparison |
|
192 * @param aCallCount 1-based call number |
|
193 */ |
|
194 void CCTSYIntegrationTestConferenceCallControlBase::CheckConfCallInfo(RMobileConferenceCall& aConfCall, |
|
195 TPtrC& aNumber, |
|
196 TInt aCallCount) |
|
197 { |
|
198 DEBUG_PRINTF2(_L("Checking call info from conf call for call %d"), aCallCount); |
|
199 |
|
200 // Check RMobileConferenceCall::GetMobileCallInfo returns |
|
201 RMobileCall::TMobileCallInfoV3 mobileCallInfo; |
|
202 RMobileCall::TMobileCallInfoV3Pckg mobileCallInfoPkg(mobileCallInfo); |
|
203 TInt err = aConfCall.GetMobileCallInfo(aCallCount-1, mobileCallInfoPkg); |
|
204 ASSERT_EQUALS(err, KErrNone, _L("RMobileCall::GetMobileCallInfo returned an error")); |
|
205 |
|
206 // Valid iCallName |
|
207 ASSERT_TRUE(mobileCallInfo.iCallName.Length() > 0, |
|
208 _L("RMobileConferenceCall::GetMobileCallInfo returned empty iCallName")); |
|
209 |
|
210 // Correct number in iDialledParty |
|
211 TPtrC dialledPartyNumber(mobileCallInfo.iDialledParty.iTelNumber); |
|
212 ASSERT_EQUALS_DES16( dialledPartyNumber, aNumber, |
|
213 _L("RMobileConferenceCall::GetMobileCallInfo iDialledParty number does not match called number")); |
|
214 |
|
215 // Valid iLineName |
|
216 ASSERT_TRUE(mobileCallInfo.iLineName.Length() > 0, _L("RMobileConferenceCall::GetMobileCallInfo returned empty iLineName")); |
|
217 |
|
218 // iStatus of EStatusConnected |
|
219 ASSERT_EQUALS(mobileCallInfo.iStatus, RMobileCall::EStatusConnected, _L("RMobileConferenceCall::GetMobileCallInfo iDialledParty number does not match called number")); |
|
220 |
|
221 // Relevant bits set in iValid based on the above parameters |
|
222 // $CTSYProblem CTSY does not return the RMobileCall::KCallRemoteParty bit |
|
223 ASSERT_BITS_SET(mobileCallInfo.iValid, RMobileCall::KCallDialledParty, // | RMobileCall::KCallRemoteParty, |
|
224 KNoUnwantedBits, _L("RMobileConferenceCall::GetMobileCallInfo returned invalid iValid")); |
|
225 |
|
226 } |
|
227 |
|
228 |
|
229 |
|
230 CCTSYIntegrationTestConferenceCallControl0001::CCTSYIntegrationTestConferenceCallControl0001(CEtelSessionMgr& aEtelSessionMgr) |
|
231 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
232 /** |
|
233 * Constructor. |
|
234 */ |
|
235 { |
|
236 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0001::GetTestStepName()); |
|
237 } |
|
238 |
|
239 CCTSYIntegrationTestConferenceCallControl0001::~CCTSYIntegrationTestConferenceCallControl0001() |
|
240 /** |
|
241 * Destructor. |
|
242 */ |
|
243 { |
|
244 } |
|
245 |
|
246 TVerdict CCTSYIntegrationTestConferenceCallControl0001::doTestStepL() |
|
247 /** |
|
248 * @SYMTestCaseID BA-CTSY-INT-CONC-0001 |
|
249 * @SYMFssID BA/CTSY/CONC-0001 |
|
250 * @SYMTestCaseDesc Create a conference call with no calls. |
|
251 * @SYMTestPriority High |
|
252 * @SYMTestActions RMobileConferenceCall::NotifyConferenceStatusChange, RMobileConferenceCall::EnumerateCalls, RMobileConferenceCall::GetCaps, RMobileConferenceCall::GetConferenceStatus, RMobileConferenceCall::CreateConference, RMobileConferenceCall::NotifyCapsChange |
|
253 * @SYMTestExpectedResults Pass - Conference creation fails with KErrNotReady. |
|
254 * @SYMTestType CIT |
|
255 * @SYMTestCaseDependencies live/automatic |
|
256 * |
|
257 * Reason for test: Verify creating a conference fails. |
|
258 * Verify conference call related notifications do not complete. |
|
259 * |
|
260 * @return - TVerdict code |
|
261 */ |
|
262 { |
|
263 |
|
264 // |
|
265 // SET UP |
|
266 // |
|
267 |
|
268 // Get conference call subsession. |
|
269 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
270 |
|
271 // Make sure we are on the network |
|
272 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone); |
|
273 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
274 |
|
275 // Get conference call subsession. |
|
276 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
277 |
|
278 // |
|
279 // SET UP END |
|
280 // |
|
281 |
|
282 StartTest(); |
|
283 |
|
284 // |
|
285 // TEST START |
|
286 // |
|
287 |
|
288 // === Check conference status and information before creating a conference === |
|
289 |
|
290 // Check RMobileConferenceCall::GetCaps returns caps NOT in set of KCapsCreate | KCapsHangUp | KCapsSwap |
|
291 TUint32 caps; |
|
292 TInt result = confCall.GetCaps(caps); |
|
293 ASSERT_EQUALS(result, KErrNone, _L("RMobileConferenceCall::GetCaps failed.")); |
|
294 |
|
295 TUint unwantedCaps = RMobileConferenceCall::KCapsCreate | |
|
296 RMobileConferenceCall::KCapsHangUp | |
|
297 RMobileConferenceCall::KCapsSwap; |
|
298 |
|
299 ASSERT_BITS_SET( caps, KNoUnwantedBits, unwantedCaps, _L("RMobileConferenceCall::GetCaps returned wrong mask") ); |
|
300 |
|
301 // Check RMobileConferenceCall::EnumerateCalls returns aCount = 0 |
|
302 TInt callCount; |
|
303 ASSERT_EQUALS( confCall.EnumerateCalls(callCount), KErrNone, |
|
304 _L("RMobileConferenceCall::EnumerateCalls failed.")); |
|
305 ASSERT_EQUALS(callCount,0, _L("RMobileConferenceCall::EnumerateCalls returned non-zero")); |
|
306 |
|
307 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceIdle |
|
308 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
309 ASSERT_EQUALS(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
310 _L("RMobileConferenceCall::GetConferenceStatus failed")); |
|
311 ASSERT_EQUALS( RMobileConferenceCall::EConferenceIdle,confCallConfStatus, |
|
312 _L("RMobileConferenceCall::GetConferenceStatus returned bad state")); |
|
313 |
|
314 // Request notification for RMobileConferenceCall::NotifyCapsChange |
|
315 TExtEtelRequestStatus notifyCapsChangeStatus(confCall, EMobileConferenceCallNotifyCapsChange); |
|
316 CleanupStack::PushL(notifyCapsChangeStatus); |
|
317 TUint32 confCallCaps; |
|
318 confCall.NotifyCapsChange(notifyCapsChangeStatus, confCallCaps); |
|
319 |
|
320 // Request notification for RMobileConferenceCall::NotifyConferenceEvent |
|
321 TExtEtelRequestStatus notifyConfEventStatus(confCall, EMobileConferenceCallNotifyConferenceEvent); |
|
322 CleanupStack::PushL(notifyConfEventStatus); |
|
323 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
324 TName confEventName; |
|
325 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventName); |
|
326 |
|
327 // Request notification for RMobileConferenceCall::NotifyConferenceStatusChange |
|
328 TExtEtelRequestStatus notifyConfStatusChange(confCall, EMobileConferenceCallNotifyConferenceStatusChange); |
|
329 CleanupStack::PushL(notifyConfStatusChange); |
|
330 RMobileConferenceCall::TMobileConferenceStatus confStatus; |
|
331 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
332 |
|
333 // Create a conference with RMobileConferenceCall::CreateConference |
|
334 TExtEtelRequestStatus createConfStatus(confCall, EMobileConferenceCallCreateConference); |
|
335 CleanupStack::PushL(createConfStatus); |
|
336 confCall.CreateConference(createConfStatus); |
|
337 |
|
338 ASSERT_EQUALS(WaitForRequestWithTimeOut(createConfStatus, ETimeMedium), KErrNone, |
|
339 _L("RMobileConferenceCall::CreateConference timed out.")); |
|
340 |
|
341 // Check conference creation completes with KErrNotReady |
|
342 ASSERT_EQUALS( createConfStatus.Int(), KErrNotReady, |
|
343 _L("RMobileConferenceCall::CreateConference did not return KErrNotReady") ); |
|
344 |
|
345 |
|
346 // === Check conference notifications did not complete === |
|
347 |
|
348 // Check RMobileConferenceCall::NotifyCapsChange is still KRequestPending |
|
349 ASSERT_EQUALS( notifyCapsChangeStatus.Int(), KRequestPending, |
|
350 _L("NotifyCapsChange completed unexpectedly")); |
|
351 |
|
352 // Check RMobileConferenceCall::NotifyConferenceEvent is still KRequestPending |
|
353 ASSERT_EQUALS( notifyConfEventStatus.Int(), KRequestPending, |
|
354 _L("NotifyConferenceEvent completed unexpectedly")); |
|
355 |
|
356 // Check RMobileConferenceCall::NotifyConferenceStatusChange is still KRequestPending |
|
357 ASSERT_EQUALS( notifyConfStatusChange.Int(), KRequestPending, |
|
358 _L("NotifyConferenceStatusChange completed unexpectedly")); |
|
359 |
|
360 // |
|
361 // TEST END |
|
362 // |
|
363 |
|
364 StartCleanup(); |
|
365 |
|
366 CleanupStack::PopAndDestroy(4, ¬ifyCapsChangeStatus); |
|
367 |
|
368 return TestStepResult(); |
|
369 } |
|
370 |
|
371 TPtrC CCTSYIntegrationTestConferenceCallControl0001::GetTestStepName() |
|
372 /** |
|
373 * @return The test step name. |
|
374 */ |
|
375 { |
|
376 return _L("CCTSYIntegrationTestConferenceCallControl0001"); |
|
377 } |
|
378 |
|
379 |
|
380 |
|
381 CCTSYIntegrationTestConferenceCallControl0002::CCTSYIntegrationTestConferenceCallControl0002(CEtelSessionMgr& aEtelSessionMgr) |
|
382 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
383 /** |
|
384 * Constructor. |
|
385 */ |
|
386 { |
|
387 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0002::GetTestStepName()); |
|
388 } |
|
389 |
|
390 CCTSYIntegrationTestConferenceCallControl0002::~CCTSYIntegrationTestConferenceCallControl0002() |
|
391 /** |
|
392 * Destructor. |
|
393 */ |
|
394 { |
|
395 } |
|
396 |
|
397 TVerdict CCTSYIntegrationTestConferenceCallControl0002::doTestStepL() |
|
398 /** |
|
399 * @SYMTestCaseID BA-CTSY-INT-CONC-0002 |
|
400 * @SYMFssID BA/CTSY/CONC-0002 |
|
401 * @SYMTestCaseDesc Create a conference call with only one call. |
|
402 * @SYMTestPriority High |
|
403 * @SYMTestActions RMobileConferenceCall::NotifyConferenceStatusChange, RMobileConferenceCall::EnumerateCalls, RMobileConferenceCall::GetCaps, RMobileConferenceCall::GetConferenceStatus, RMobileConferenceCall::CreateConference, RMobileConferenceCall::NotifyCapsChange, RCall::GetStatus, RCall::HangUp, RCall::Dial, RCall::NotifyStatusChange |
|
404 * @SYMTestExpectedResults Pass - Conference creation fails with KErrMMEtelCallForbidden |
|
405 * @SYMTestType CIT |
|
406 * @SYMTestCaseDependencies live/automatic |
|
407 * |
|
408 * Reason for test: Verify creating a conference fails. |
|
409 Verify conference call related notifications can be cancelled. |
|
410 * |
|
411 * @return - TVerdict code |
|
412 */ |
|
413 { |
|
414 |
|
415 // |
|
416 // SET UP |
|
417 // |
|
418 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
419 iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone); |
|
420 |
|
421 // Get conference call subsession. |
|
422 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
423 |
|
424 // Get voice line 1. |
|
425 RMobileLine& voiceLine1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
426 |
|
427 // Get call 1. |
|
428 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1); |
|
429 |
|
430 |
|
431 // |
|
432 // SET UP END |
|
433 // |
|
434 |
|
435 StartTest(); |
|
436 |
|
437 // |
|
438 // TEST START |
|
439 // |
|
440 |
|
441 // post a notifier for RCall::NotifyStatusChange |
|
442 TCoreEtelRequestStatus<RCall> notifyStatusChangeStatus (call1, &RCall::NotifyStatusChangeCancel); |
|
443 CleanupStack::PushL(notifyStatusChangeStatus); |
|
444 RCall::TStatus callStatus; |
|
445 call1.NotifyStatusChange(notifyStatusChangeStatus,callStatus); |
|
446 |
|
447 // Dial a number that answers. |
|
448 TPtrC number; |
|
449 ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, |
|
450 _L("CTestStep::GetStringFromConfig did not complete as expected")); |
|
451 TCoreEtelRequestStatus<RMobileCall> dialStatus(call1, &RCall::DialCancel); |
|
452 CleanupStack::PushL(dialStatus); |
|
453 call1.Dial(dialStatus, number); |
|
454 ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, |
|
455 _L("RCall::Dial timed-out")) |
|
456 ASSERT_EQUALS(dialStatus.Int(), KErrNone, _L("RCall::Dial returned an error")); |
|
457 |
|
458 // === Check call status === |
|
459 |
|
460 // Check RCall::NotifyStatusChange completes with EStatusDialling -> EStatusConnecting -> EStatusConnected. |
|
461 RCall::TStatus expectedCallStatus = RCall::EStatusDialling; |
|
462 iCallControlTsyTestHelper.WaitForCallNotifyStatusChange(call1, |
|
463 notifyStatusChangeStatus, |
|
464 callStatus, |
|
465 expectedCallStatus, |
|
466 KErrNone); |
|
467 |
|
468 call1.NotifyStatusChange(notifyStatusChangeStatus,callStatus); |
|
469 expectedCallStatus = RCall::EStatusConnecting; |
|
470 iCallControlTsyTestHelper.WaitForCallNotifyStatusChange(call1, |
|
471 notifyStatusChangeStatus, |
|
472 callStatus, |
|
473 expectedCallStatus, |
|
474 KErrNone); |
|
475 |
|
476 call1.NotifyStatusChange(notifyStatusChangeStatus,callStatus); |
|
477 expectedCallStatus = RCall::EStatusConnected; |
|
478 iCallControlTsyTestHelper.WaitForCallNotifyStatusChange(call1, |
|
479 notifyStatusChangeStatus, |
|
480 callStatus, |
|
481 expectedCallStatus, |
|
482 KErrNone); |
|
483 |
|
484 // Check RCall::GetStatus returns EStatusConnected. |
|
485 ASSERT_EQUALS(call1.GetStatus(callStatus),KErrNone, _L("RCall::GetStatus returned an error")); |
|
486 ASSERT_EQUALS(callStatus, RCall::EStatusConnected, |
|
487 _L("RCall::GetStatus returned an unexpected call status")); |
|
488 |
|
489 // === Check conference caps, status and info are correct. === |
|
490 |
|
491 // Check RMobileConferenceCall::GetCaps returns caps NOT in set of KCapsCreate | KCapsHangUp | KCapsSwap |
|
492 TUint32 caps; |
|
493 ASSERT_EQUALS(confCall.GetCaps(caps), KErrNone, |
|
494 _L("RMobileConferenceCall::GetCaps returned an error")); |
|
495 TUint32 wantedCaps = KNoWantedBits; |
|
496 TUint32 unWantedCaps = RMobileConferenceCall::KCapsCreate | RMobileConferenceCall::KCapsHangUp | RMobileConferenceCall::KCapsSwap; |
|
497 ASSERT_BITS_SET(caps, wantedCaps, unWantedCaps, |
|
498 _L("RMobileConferenceCall::GetGaps returned unexpected caps")); |
|
499 |
|
500 // Check RMobileConferenceCall::EnumerateCalls returns aCount = 0 |
|
501 TInt count; |
|
502 ASSERT_EQUALS(confCall.EnumerateCalls(count), KErrNone, |
|
503 _L("RMobileConferenceCall::EnumerateCalls returned an error")); |
|
504 ASSERT_EQUALS(count,0, _L("RMobileConferenceCall::EnumerateCalls did not return aCount = 0")); |
|
505 |
|
506 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceIdle |
|
507 RMobileConferenceCall::TMobileConferenceStatus confStatus; |
|
508 ASSERT_EQUALS(confCall.GetConferenceStatus(confStatus), KErrNone, |
|
509 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
510 ASSERT_EQUALS(confStatus, RMobileConferenceCall::EConferenceIdle, |
|
511 _L("RMobileConferenceCall::GetConferenceStatus did not return status of EConferenceIdle")); |
|
512 |
|
513 // Request notification for RMobileConferenceCall::NotifyCapsChange |
|
514 TExtEtelRequestStatus notifyCapsChangeStatus (confCall, EMobileConferenceCallNotifyCapsChange); |
|
515 CleanupStack::PushL(notifyCapsChangeStatus); |
|
516 confCall.NotifyCapsChange(notifyCapsChangeStatus, caps); |
|
517 |
|
518 // Request notification for RMobileConferenceCall::NotifyConferenceEvent |
|
519 TExtEtelRequestStatus notifyConfEventStatus(confCall, EMobileConferenceCallNotifyConferenceEvent); |
|
520 CleanupStack::PushL(notifyConfEventStatus); |
|
521 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
522 TName confName; |
|
523 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confName); |
|
524 |
|
525 // Request notification for RMobileConferenceCall::NotifyConferenceStatusChange |
|
526 TExtEtelRequestStatus notifyMobileConfStatusChangeStatus (confCall, EMobileConferenceCallNotifyConferenceStatusChange); |
|
527 CleanupStack::PushL(notifyMobileConfStatusChangeStatus); |
|
528 RMobileConferenceCall::TMobileConferenceStatus mobileConfStatus; |
|
529 confCall.NotifyConferenceStatusChange(notifyMobileConfStatusChangeStatus,mobileConfStatus); |
|
530 |
|
531 // Create a conference with RMobileConferenceCall::CreateConference |
|
532 TExtEtelRequestStatus createConfStatus (confCall, EMobileConferenceCallCreateConference); |
|
533 CleanupStack::PushL(createConfStatus); |
|
534 confCall.CreateConference(createConfStatus); |
|
535 ASSERT_EQUALS(WaitForRequestWithTimeOut(createConfStatus, ETimeMedium), KErrNone, _L("RMobileConferenceCall::CreateConference timed-out")); |
|
536 |
|
537 // Check conference creation completes with KErrMMEtelCallForbidden |
|
538 |
|
539 ASSERT_EQUALS(createConfStatus.Int(), KErrMMEtelCallForbidden, _L("RMobileConferenceCall::CreateConference returned an error")); |
|
540 |
|
541 // === Check conference notifications did not complete === |
|
542 |
|
543 // Check RMobileConferenceCall::NotifyCapsChange is still KRequestPending |
|
544 ASSERT_EQUALS(notifyCapsChangeStatus.Int(), KRequestPending, _L("RMobileConferenceCall::NotifyCapsChange is not KRequestPending")); |
|
545 |
|
546 // Check RMobileConferenceCall::NotifyConferenceEvent is still KRequestPending |
|
547 ASSERT_EQUALS(notifyConfEventStatus.Int(), KRequestPending, _L("RMobileConferenceCall::NotifyConferenceEvent is not KRequestPending")); |
|
548 |
|
549 // Check RMobileConferenceCall::NotifyConferenceStatusChange is still KRequestPending |
|
550 ASSERT_EQUALS(notifyMobileConfStatusChangeStatus.Int(), KRequestPending, _L("RMobileConferenceCall::NotifyConferenceStatusChange is not KRequestPending")); |
|
551 |
|
552 // Hang up call. |
|
553 ASSERT_EQUALS(call1.HangUp(), KErrNone, _L("RCall::HangUp return value not KErrNone")); |
|
554 |
|
555 // |
|
556 // TEST END |
|
557 // |
|
558 |
|
559 StartCleanup(); |
|
560 |
|
561 //createConfStatus |
|
562 //notifyMobileConfStatusChangeStatus |
|
563 //notifyConfEventStatus |
|
564 //notifyCapsChangeStatus |
|
565 //dialStatus |
|
566 CleanupStack::PopAndDestroy(6,¬ifyStatusChangeStatus); |
|
567 |
|
568 return TestStepResult(); |
|
569 } |
|
570 |
|
571 TPtrC CCTSYIntegrationTestConferenceCallControl0002::GetTestStepName() |
|
572 /** |
|
573 * @return The test step name. |
|
574 */ |
|
575 { |
|
576 return _L("CCTSYIntegrationTestConferenceCallControl0002"); |
|
577 } |
|
578 |
|
579 |
|
580 |
|
581 CCTSYIntegrationTestConferenceCallControl0003::CCTSYIntegrationTestConferenceCallControl0003(CEtelSessionMgr& aEtelSessionMgr) |
|
582 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
583 /** |
|
584 * Constructor. |
|
585 */ |
|
586 { |
|
587 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0003::GetTestStepName()); |
|
588 } |
|
589 |
|
590 CCTSYIntegrationTestConferenceCallControl0003::~CCTSYIntegrationTestConferenceCallControl0003() |
|
591 /** |
|
592 * Destructor. |
|
593 */ |
|
594 { |
|
595 } |
|
596 |
|
597 TVerdict CCTSYIntegrationTestConferenceCallControl0003::doTestStepL() |
|
598 /** |
|
599 * @SYMTestCaseID BA-CTSY-INT-CONC-0003 |
|
600 * @SYMFssID BA/CTSY/CONC-0003 |
|
601 * @SYMTestCaseDesc Ensure that a data call cannot be part of a creation set |
|
602 * @SYMTestPriority High |
|
603 * @SYMTestActions RMobileConferenceCall::EnumerateCalls, RMobileConferenceCall::CreateConference, RMobileConferenceCall::GetConferenceStatus |
|
604 * @SYMTestExpectedResults Pass - Create conference fails. |
|
605 * @SYMTestType CIT |
|
606 * @SYMTestCaseDependencies live/automatic |
|
607 * |
|
608 * Reason for test: Verify creating a conference fails. |
|
609 * |
|
610 * @return - TVerdict code |
|
611 */ |
|
612 { |
|
613 |
|
614 // |
|
615 // SET UP |
|
616 // |
|
617 |
|
618 // Get the test numbers |
|
619 TPtrC number; |
|
620 CHECK_TRUE_L(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, _L("CTestStep::GetStringFromConfig did not complete as expected")); |
|
621 TPtrC dataNumber; |
|
622 CHECK_TRUE_L(GetStringFromConfig(KIniDataNumSection, KIniDataNumber1, dataNumber) != EFalse, _L("CTestStep::GetStringFromConfig did not complete as expected")); |
|
623 |
|
624 // Get the phone session |
|
625 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
626 |
|
627 // Make sure we are on the network |
|
628 CHECK_EQUALS_L(iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("Failed to register on home network")); |
|
629 |
|
630 // Get conference call |
|
631 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
632 |
|
633 // Get voice line 1. |
|
634 RMobileLine& voiceLine1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
635 |
|
636 // Get call 1. |
|
637 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1); |
|
638 |
|
639 // Get data line 1. |
|
640 RMobileLine& dataLine= iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KDataLine); |
|
641 |
|
642 // Get call 2 with data line 1. |
|
643 RMobileCall& dataCall = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KDataLine, KCall2); |
|
644 |
|
645 |
|
646 // |
|
647 // SET UP END |
|
648 // |
|
649 |
|
650 StartTest(); |
|
651 |
|
652 // |
|
653 // TEST START |
|
654 // |
|
655 |
|
656 |
|
657 // Dial a number that answers on call 1. |
|
658 RMobileCall::TMobileCallStatus call1Status = MakeCallL(call1, number); |
|
659 ASSERT_EQUALS(call1Status, RMobileCall::EStatusConnected, _L("Failed to connect call")); |
|
660 |
|
661 // Hold call 1. |
|
662 call1Status = HoldCallL(call1); |
|
663 ASSERT_EQUALS(call1Status, RMobileCall::EStatusHold, _L("Failed to hold the call")); |
|
664 |
|
665 // Post notification for data call status changes |
|
666 TExtEtelRequestStatus notifyDataCallStatus(dataCall, EMobileCallNotifyMobileCallStatusChange); |
|
667 CleanupStack::PushL(notifyDataCallStatus); |
|
668 RMobileCall::TMobileCallStatus dataCallStatus; |
|
669 dataCall.NotifyMobileCallStatusChange(notifyDataCallStatus, dataCallStatus); |
|
670 |
|
671 // Dial a number that answers on call 2. |
|
672 TCoreEtelRequestStatus<RMobileCall> dataDialStatus(dataCall, &RCall::DialCancel); |
|
673 CleanupStack::PushL(dataDialStatus); |
|
674 RMobileCall::TMobileDataCallParamsV1 dataCallParams; |
|
675 RMobileCall::TMobileDataCallParamsV1Pckg dataCallParamsPkg(dataCallParams); |
|
676 dataCallParams.iService = RMobileCall::EServiceDataCircuitAsyncRdi; |
|
677 dataCallParams.iSpeed = RMobileCall::ESpeed9600; |
|
678 dataCallParams.iProtocol = RMobileCall::EProtocolV32; |
|
679 dataCallParams.iQoS = RMobileCall::EQoSNonTransparent; |
|
680 dataCallParams.iRLPVersion = RMobileCall::ERLPSingleLinkVersion1; |
|
681 dataCallParams.iV42bisReq = RMobileCall::EV42bisBothDirections; |
|
682 |
|
683 // $CTSYKnownFailure defect id=50008. Data call cannot be made if an active or connecting call exists |
|
684 // CMmDataCallTsy::Dial returns -2020 (KErrEtelCallAlreadyActive) |
|
685 ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d </font>"), 50008); |
|
686 |
|
687 dataCall.Dial(dataDialStatus, dataCallParamsPkg, dataNumber); |
|
688 ASSERT_EQUALS(WaitForRequestWithTimeOut(dataDialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out")); |
|
689 ASSERT_EQUALS(dataDialStatus.Int(), KErrNone, _L("RCall::Dial returned an error")); |
|
690 |
|
691 // === Ensure both calls are connected for the test to start. === |
|
692 |
|
693 // Data call |
|
694 RMobileCall::TMobileCallStatus expectedDataCallStatus = RMobileCall::EStatusConnected; |
|
695 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(dataCall, |
|
696 notifyDataCallStatus, |
|
697 dataCallStatus, |
|
698 expectedDataCallStatus, |
|
699 KErrNone); |
|
700 |
|
701 // Voice call |
|
702 RCall::TStatus callStatus; |
|
703 ASSERT_EQUALS(call1.GetStatus(callStatus), KErrNone, _L("RCall::GetStatus returned an error")); |
|
704 ASSERT_EQUALS(callStatus, RCall::EStatusConnected, _L("RCall::GetStatus did not return EStatusConnected as expected")); |
|
705 |
|
706 |
|
707 // === Check conference caps, status and info are correct. === |
|
708 |
|
709 // Check RMobileConferenceCall::GetCaps returns caps NOT in set of KCapsCreate | KCapsHangUp | KCapsSwap |
|
710 TUint32 caps; |
|
711 TUint unwantedCaps = RMobileConferenceCall::KCapsCreate | RMobileConferenceCall::KCapsHangUp | RMobileConferenceCall::KCapsSwap; |
|
712 ASSERT_EQUALS(confCall.GetCaps(caps), KErrNone, _L("RMobileConferenceCall::GetCaps failed.")); |
|
713 ASSERT_BITS_SET(caps, KNoWantedBits, unwantedCaps, _L("RMobileConferenceCall::GetCaps returned wrong mask")); |
|
714 |
|
715 // Check RMobileConferenceCall::EnumerateCalls returns aCount = 0 |
|
716 TInt callCount; |
|
717 ASSERT_EQUALS(confCall.EnumerateCalls(callCount), KErrNone, _L("RMobileConferenceCall::EnumerateCalls failed.")); |
|
718 ASSERT_EQUALS(callCount, 0, _L("RMobileConferenceCall::EnumerateCalls returned non-zero")); |
|
719 |
|
720 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceIdle |
|
721 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
722 RMobileConferenceCall::TMobileConferenceStatus wantedConfCallConfStatus = RMobileConferenceCall::EConferenceIdle; |
|
723 ASSERT_EQUALS(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, _L("RMobileConferenceCall::GetConferenceStatus failed")); |
|
724 ASSERT_EQUALS(confCallConfStatus, wantedConfCallConfStatus, _L("RMobileConferenceCall::GetConferenceStatus returned wrong status")); |
|
725 |
|
726 // Create the conference. |
|
727 TExtEtelRequestStatus createConfStatus(confCall, EMobileConferenceCallCreateConference); |
|
728 CleanupStack::PushL(createConfStatus); |
|
729 confCall.CreateConference(createConfStatus); |
|
730 ASSERT_EQUALS(WaitForRequestWithTimeOut(createConfStatus, ETimeMedium), KErrNone, _L("RMobileConferenceCall::CreateConference timed out.")); |
|
731 |
|
732 // Check this fails (error != KErrNone). |
|
733 ASSERT_TRUE(createConfStatus.Int() != KErrNone, _L("RMobileConferenceCall::CreateConference did not return error as expected")); |
|
734 |
|
735 // Hangup calls |
|
736 TCoreEtelRequestStatus<RCall> hangUpStatus (call1, &RCall::HangUpCancel); |
|
737 CleanupStack::PushL(hangUpStatus); |
|
738 call1.HangUp(hangUpStatus); |
|
739 ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeLong), KErrNone, _L("RCall::HangUp timed-out")); |
|
740 ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RCall::HangUp returned an error")); |
|
741 |
|
742 dataCall.HangUp(hangUpStatus); |
|
743 ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeLong), KErrNone, _L("RCall::HangUp timed-out")); |
|
744 ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, _L("RCall::HangUp returned an error")); |
|
745 |
|
746 // |
|
747 // TEST END |
|
748 // |
|
749 |
|
750 StartCleanup(); |
|
751 |
|
752 // Pop |
|
753 // notifyDataCallStatus |
|
754 // dataDialStatus |
|
755 // createConfStatus |
|
756 // hangUpStatus |
|
757 CleanupStack::PopAndDestroy(4, ¬ifyDataCallStatus); |
|
758 |
|
759 return TestStepResult(); |
|
760 } |
|
761 |
|
762 TPtrC CCTSYIntegrationTestConferenceCallControl0003::GetTestStepName() |
|
763 /** |
|
764 * @return The test step name. |
|
765 */ |
|
766 { |
|
767 return _L("CCTSYIntegrationTestConferenceCallControl0003"); |
|
768 } |
|
769 |
|
770 |
|
771 |
|
772 CCTSYIntegrationTestConferenceCallControl0004::CCTSYIntegrationTestConferenceCallControl0004(CEtelSessionMgr& aEtelSessionMgr) |
|
773 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
774 /** |
|
775 * Constructor. |
|
776 */ |
|
777 { |
|
778 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0004::GetTestStepName()); |
|
779 } |
|
780 |
|
781 CCTSYIntegrationTestConferenceCallControl0004::~CCTSYIntegrationTestConferenceCallControl0004() |
|
782 /** |
|
783 * Destructor. |
|
784 */ |
|
785 { |
|
786 } |
|
787 |
|
788 TVerdict CCTSYIntegrationTestConferenceCallControl0004::doTestStepL() |
|
789 /** |
|
790 * @SYMTestCaseID BA-CTSY-INT-CONC-0004 |
|
791 * @SYMFssID BA/CTSY/CONC-0004 |
|
792 * @SYMTestCaseDesc Create a conference call with one active call and one held call then hang up conference call. |
|
793 * @SYMTestPriority High |
|
794 * @SYMTestActions RLine::NotifyStatusChange, RMobileConferenceCall::NotifyConferenceStatusChange, RMobileConferenceCall::GetMobileCallInfo, RMobileLine::NotifyMobileLineStatusChange, RMobileCall::GetMobileCallStatus, RMobileConferenceCall::NotifyCapsChange, RMobileCall::NotifyMobileCallStatusChange, RCall::NotifyStatusChange, RMobileLine::GetMobileLineStatus, RLine::GetStatus, RMobileConferenceCall::GetCaps, RMobileConferenceCall::EnumerateCalls, RMobileConferenceCall::GetConferenceStatus, RMobileConferenceCall::HangUp, RCall::GetStatus |
|
795 * @SYMTestExpectedResults Pass - Conference call created. |
|
796 * @SYMTestType CIT |
|
797 * @SYMTestCaseDependencies live/automatic |
|
798 * Reason for test: Verify conference creation successful. |
|
799 Verify conference call related notifications complete correctly and can be cancelled. |
|
800 * |
|
801 * @return - TVerdict code |
|
802 */ |
|
803 { |
|
804 |
|
805 // |
|
806 // SET UP |
|
807 // |
|
808 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
809 iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone); |
|
810 |
|
811 // Get conference call subsession. |
|
812 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
813 |
|
814 // Get voice line 1. |
|
815 RMobileLine& voiceLine1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
816 |
|
817 // Get call 1. |
|
818 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1); |
|
819 |
|
820 // Get call 2. |
|
821 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2); |
|
822 |
|
823 // |
|
824 // SET UP END |
|
825 // |
|
826 StartTest(); |
|
827 |
|
828 |
|
829 // |
|
830 // TEST START |
|
831 // |
|
832 |
|
833 // === Check conference caps, status and info are correct. === |
|
834 |
|
835 // Check RMobileConferenceCall::GetCaps returns caps NOT in set of KCapsCreate | KCapsHangUp | KCapsSwap |
|
836 |
|
837 TUint32 caps; |
|
838 TUint32 wantedCaps = KNoWantedBits; |
|
839 TUint32 unWantedCaps = RMobileConferenceCall::KCapsCreate | |
|
840 RMobileConferenceCall::KCapsHangUp | |
|
841 RMobileConferenceCall::KCapsSwap; |
|
842 ASSERT_EQUALS(confCall.GetCaps(caps), KErrNone, |
|
843 _L("RMobileConferenceCall::GetCaps returned an error")); |
|
844 ASSERT_BITS_SET(caps, wantedCaps, unWantedCaps, |
|
845 _L("RMobileConferenceCall::GetCaps returned the wrong caps NOT set")); |
|
846 |
|
847 // Check RMobileConferenceCall::EnumerateCalls returns aCount = 0 |
|
848 TInt count; |
|
849 ASSERT_EQUALS(confCall.EnumerateCalls(count), KErrNone, |
|
850 _L("RMobileConferenceCall::EnumerateCalls returned an error")); |
|
851 ASSERT_EQUALS(count,0, _L("RMobileConferenceCall::EnumerateCalls did not return aCount = 0")); |
|
852 |
|
853 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceIdle |
|
854 RMobileConferenceCall::TMobileConferenceStatus confStatus; |
|
855 ASSERT_EQUALS(confCall.GetConferenceStatus(confStatus), KErrNone, |
|
856 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
857 ASSERT_EQUALS(confStatus, RMobileConferenceCall::EConferenceIdle, |
|
858 _L("RMobileConferenceCall::GetConferenceStatus did not return status of EConferenceIdle")); |
|
859 |
|
860 // post a notifier for RCall::NotifyStatusChange |
|
861 TCoreEtelRequestStatus<RCall> notifyStatusChangeStatus (call1,&RCall::NotifyStatusChangeCancel); |
|
862 CleanupStack::PushL(notifyStatusChangeStatus); |
|
863 RCall::TStatus callStatus; |
|
864 call1.NotifyStatusChange(notifyStatusChangeStatus,callStatus); |
|
865 |
|
866 // Dial a number that answers using call 1. |
|
867 TPtrC number; |
|
868 ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, |
|
869 _L("CTestStep::GetStringFromConfig did not complete as expected")); |
|
870 TCoreEtelRequestStatus<RMobileCall> dialStatus(call1, &RCall::DialCancel); |
|
871 CleanupStack::PushL(dialStatus); |
|
872 call1.Dial(dialStatus, number); |
|
873 ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, |
|
874 _L("RCall::Dial timed-out")) |
|
875 ASSERT_EQUALS(dialStatus.Int(), KErrNone, _L("RCall::Dial returned an error")) |
|
876 TEST_CHECK_POINT_L(_L("Failed to dial call1")); |
|
877 |
|
878 // === Check call status for call 1 and 2 === |
|
879 // Check RCall::NotifyStatusChange for call 1 completes with EStatusDialling -> |
|
880 RCall::TStatus expectedCallStatus = RCall::EStatusDialling; |
|
881 iCallControlTsyTestHelper.WaitForCallNotifyStatusChange(call1, |
|
882 notifyStatusChangeStatus, |
|
883 callStatus, |
|
884 expectedCallStatus, |
|
885 KErrNone); |
|
886 |
|
887 // Check RCall::NotifyStatusChange for call 1 completes with EStatusConnecting -> |
|
888 call1.NotifyStatusChange(notifyStatusChangeStatus,callStatus); |
|
889 expectedCallStatus = RCall::EStatusConnecting; |
|
890 iCallControlTsyTestHelper.WaitForCallNotifyStatusChange(call1, |
|
891 notifyStatusChangeStatus, |
|
892 callStatus, |
|
893 expectedCallStatus, |
|
894 KErrNone); |
|
895 |
|
896 // Check RCall::NotifyStatusChange for call 1 completes with EStatusConnected. |
|
897 call1.NotifyStatusChange(notifyStatusChangeStatus,callStatus); |
|
898 expectedCallStatus = RCall::EStatusConnected; |
|
899 iCallControlTsyTestHelper.WaitForCallNotifyStatusChange(call1, |
|
900 notifyStatusChangeStatus, |
|
901 callStatus, |
|
902 expectedCallStatus, |
|
903 KErrNone); |
|
904 |
|
905 // Check RCall::GetStatus returns EStatusConnected. |
|
906 ASSERT_EQUALS(call1.GetStatus(callStatus),KErrNone, _L("RCall::GetStatus returned an error")); |
|
907 ASSERT_EQUALS(callStatus, RCall::EStatusConnected, |
|
908 _L("RCall::GetStatus returned an unexpected call status")); |
|
909 |
|
910 // Hold call 1. |
|
911 TExtEtelRequestStatus holdStatus (call1,EMobileCallHold); |
|
912 CleanupStack::PushL(holdStatus); |
|
913 call1.Hold(holdStatus); |
|
914 ASSERT_EQUALS(WaitForRequestWithTimeOut(holdStatus, ETimeMedium), KErrNone, |
|
915 _L("RMobileCall::Hold timed-out")); |
|
916 ASSERT_EQUALS(dialStatus.Int(), KErrNone, |
|
917 _L("RMobileCall::Hold returned an error")); |
|
918 |
|
919 // post a notifier for RCall::NotifyStatusChange on call2 |
|
920 TCoreEtelRequestStatus<RCall> notifyStatusChangeStatus2 (call2,&RCall::NotifyStatusChangeCancel); |
|
921 CleanupStack::PushL(notifyStatusChangeStatus2); |
|
922 RCall::TStatus callStatus2; |
|
923 call2.NotifyStatusChange(notifyStatusChangeStatus2,callStatus2); |
|
924 |
|
925 // post a notifier for RMobileConferenceCall::NotifyCapsChange |
|
926 TExtEtelRequestStatus notifyCapsChangeStatus (call1,EMobileConferenceCallNotifyCapsChange); |
|
927 CleanupStack::PushL(notifyCapsChangeStatus); |
|
928 confCall.NotifyCapsChange(notifyCapsChangeStatus, caps); |
|
929 |
|
930 // Dial a number that answers using call 2. |
|
931 TPtrC number2; |
|
932 ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber2, number2) != EFalse, |
|
933 _L("CTestStep::GetStringFromConfig did not complete as expected")); |
|
934 TCoreEtelRequestStatus<RMobileCall> dialStatus2(call2, &RCall::DialCancel); |
|
935 CleanupStack::PushL(dialStatus2); |
|
936 call2.Dial(dialStatus2, number2); |
|
937 ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus2, ETimeMedium), KErrNone, |
|
938 _L("RCall::Dial timed-out")); |
|
939 ASSERT_EQUALS(dialStatus2.Int(), KErrNone, _L("RCall::Dial returned an error")); |
|
940 TEST_CHECK_POINT_L(_L("Failed to dial call 2")); |
|
941 |
|
942 // Check RCall::NotifyStatusChange for call 2 completes with EStatusDialling -> |
|
943 expectedCallStatus = RCall::EStatusDialling; |
|
944 iCallControlTsyTestHelper.WaitForCallNotifyStatusChange(call2, |
|
945 notifyStatusChangeStatus2, |
|
946 callStatus2, |
|
947 expectedCallStatus, |
|
948 KErrNone); |
|
949 |
|
950 // Check RCall::NotifyStatusChange for call 2 completes with EStatusConnecting -> |
|
951 call2.NotifyStatusChange(notifyStatusChangeStatus2,callStatus2); |
|
952 expectedCallStatus = RCall::EStatusConnecting; |
|
953 iCallControlTsyTestHelper.WaitForCallNotifyStatusChange(call2, |
|
954 notifyStatusChangeStatus2, |
|
955 callStatus2, |
|
956 expectedCallStatus, |
|
957 KErrNone); |
|
958 |
|
959 // Check RCall::NotifyStatusChange for call 2 completes with EStatusConnected. |
|
960 call2.NotifyStatusChange(notifyStatusChangeStatus2,callStatus2); |
|
961 expectedCallStatus = RCall::EStatusConnected; |
|
962 iCallControlTsyTestHelper.WaitForCallNotifyStatusChange(call2, |
|
963 notifyStatusChangeStatus2, |
|
964 callStatus2, |
|
965 expectedCallStatus, |
|
966 KErrNone); |
|
967 |
|
968 // Check RCall::GetStatus returns EStatusConnected. |
|
969 ASSERT_EQUALS(call2.GetStatus(callStatus2),KErrNone, _L("RCall::GetStatus returned an error")); |
|
970 ASSERT_EQUALS(callStatus2, RCall::EStatusConnected, |
|
971 _L("RCall::GetStatus returned an unexpected call status")); |
|
972 |
|
973 |
|
974 // === Check conference caps indicate conference can now be created === |
|
975 // Check RMobileConferenceCall::NotifyCapsChange completes with caps in set of KCapsCreate |
|
976 wantedCaps = RMobileConferenceCall::KCapsCreate; |
|
977 unWantedCaps = KNoUnwantedBits; |
|
978 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyCapsChange(confCall, |
|
979 notifyCapsChangeStatus, |
|
980 caps, |
|
981 wantedCaps, |
|
982 unWantedCaps, |
|
983 KErrNone); |
|
984 |
|
985 // Check RMobileConferenceCall::GetCaps returns caps in set of KCapsCreate |
|
986 ASSERT_EQUALS(confCall.GetCaps(caps), KErrNone, |
|
987 _L("RMobileConferenceCall::GetCaps returned an error")); |
|
988 wantedCaps = RMobileConferenceCall::KCapsCreate; |
|
989 unWantedCaps = KNoUnwantedBits; |
|
990 ASSERT_BITS_SET(caps, wantedCaps, unWantedCaps, |
|
991 _L("RMobileConferenceCall::GetGaps returned unexpected caps")); |
|
992 |
|
993 // Post a notifier for RMobileConferenceCall::NotifyCapsChange |
|
994 confCall.NotifyCapsChange(notifyCapsChangeStatus, caps); |
|
995 |
|
996 // Post a notifier for RMobileConferenceCall::NotifyConferenceEvent |
|
997 TExtEtelRequestStatus notifyConfEventStatus(confCall, |
|
998 EMobileConferenceCallNotifyConferenceEvent); |
|
999 CleanupStack::PushL(notifyConfEventStatus); |
|
1000 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
1001 TName confName; |
|
1002 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confName); |
|
1003 |
|
1004 // Post a notifier for RMobileConferenceCall::NotifyConferenceStatusChange |
|
1005 TExtEtelRequestStatus notifyMobileConfStatusChangeStatus (confCall, |
|
1006 EMobileConferenceCallNotifyConferenceStatusChange); |
|
1007 CleanupStack::PushL(notifyMobileConfStatusChangeStatus); |
|
1008 RMobileConferenceCall::TMobileConferenceStatus mobileConfStatus; |
|
1009 confCall.NotifyConferenceStatusChange(notifyMobileConfStatusChangeStatus,mobileConfStatus); |
|
1010 |
|
1011 // Create a conference. |
|
1012 TExtEtelRequestStatus createConfStatus (confCall,EMobileConferenceCallCreateConference); |
|
1013 CleanupStack::PushL(createConfStatus); |
|
1014 confCall.CreateConference(createConfStatus); |
|
1015 ASSERT_EQUALS(WaitForRequestWithTimeOut(createConfStatus, ETimeMedium), KErrNone, |
|
1016 _L("RMobileConferenceCall::CreateConference timed-out")); |
|
1017 ASSERT_EQUALS(createConfStatus.Int(), KErrNone, |
|
1018 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
1019 TEST_CHECK_POINT_L(_L("Failed to dial call")); |
|
1020 |
|
1021 |
|
1022 // === Check conference caps indicate conference can now be created === |
|
1023 |
|
1024 // Check RMobileConferenceCall::NotifyCapsChange completes with caps in set of KCapsHangUp | KCapsSwap |
|
1025 // Check RMobileConferenceCall::NotifyCapsChange completes with caps NOT in set of KCapsCreate |
|
1026 wantedCaps = RMobileConferenceCall::KCapsHangUp | RMobileConferenceCall::KCapsSwap; |
|
1027 unWantedCaps = RMobileConferenceCall::KCapsCreate; |
|
1028 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyCapsChange(confCall, |
|
1029 notifyCapsChangeStatus, |
|
1030 caps, |
|
1031 wantedCaps, |
|
1032 unWantedCaps, |
|
1033 KErrNone); |
|
1034 |
|
1035 // Check RMobileConferenceCall::GetCaps returns caps in set of KCapsHangUp | KCapsSwap |
|
1036 // Check RMobileConferenceCall::GetCaps returns caps NOT in set of KCapsCreate |
|
1037 wantedCaps = RMobileConferenceCall::KCapsHangUp | RMobileConferenceCall::KCapsSwap; |
|
1038 unWantedCaps = RMobileConferenceCall::KCapsCreate; |
|
1039 ASSERT_EQUALS(confCall.GetCaps(caps), KErrNone, |
|
1040 _L("RMobileConferenceCall::GetCaps returned an error")); |
|
1041 ASSERT_BITS_SET(caps, wantedCaps, unWantedCaps, |
|
1042 _L("RMobileConferenceCall::GetGaps returned unexpected caps")); |
|
1043 |
|
1044 |
|
1045 // === Check conference event === |
|
1046 |
|
1047 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceBuilt |
|
1048 RMobileConferenceCall::TMobileConferenceEvent expectedEvent = RMobileConferenceCall::EConferenceBuilt; |
|
1049 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent(confCall, |
|
1050 notifyConfEventStatus, |
|
1051 confEvent, |
|
1052 expectedEvent, |
|
1053 confName, |
|
1054 KErrNone); |
|
1055 |
|
1056 ASSERT_EQUALS(confEvent, expectedEvent, _L("RMobileConferenceCall::NotifyConferenceEvent returned unexpected event")); |
|
1057 |
|
1058 // === Check conference status === |
|
1059 |
|
1060 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceActive |
|
1061 RMobileConferenceCall::TMobileConferenceStatus expectedStatus = RMobileConferenceCall::EConferenceActive; |
|
1062 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange(confCall, |
|
1063 notifyMobileConfStatusChangeStatus, |
|
1064 mobileConfStatus, |
|
1065 expectedStatus, |
|
1066 KErrNone); |
|
1067 |
|
1068 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
1069 ASSERT_EQUALS(confCall.GetConferenceStatus(confStatus), KErrNone, |
|
1070 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
1071 ASSERT_EQUALS(confStatus, RMobileConferenceCall::EConferenceActive, |
|
1072 _L("RMobileConferenceCall::GetConferenceStatus status was not EConferenceActive")); |
|
1073 |
|
1074 |
|
1075 // === Get call info belonging to individual call in the conference === |
|
1076 // Check RMobileConferenceCall::EnumerateCalls returns aCount = 2 |
|
1077 ASSERT_EQUALS(confCall.EnumerateCalls(count), KErrNone, |
|
1078 _L("RMobileConferenceCall::EnumerateCalls returned an error")); |
|
1079 ASSERT_EQUALS(count, 2, _L("RMobileConferenceCall::EnumerateCalls did not return aCount = 2")); |
|
1080 |
|
1081 // Check RMobileConferenceCall::GetMobileCallInfo with aIndex = 0 returns KErrNone |
|
1082 TInt index = 0; |
|
1083 RMobileCall::TMobileCallInfoV1 callInfo; |
|
1084 RMobileCall::TMobileCallInfoV1Pckg callInfoPckg(callInfo); |
|
1085 ASSERT_EQUALS(confCall.GetMobileCallInfo(index,callInfoPckg), KErrNone, |
|
1086 _L("RMobileConferenceCall::GetMobileCallInfo returned an error")); |
|
1087 |
|
1088 // valid iCallName |
|
1089 ASSERT_TRUE(callInfo.iCallName.Length() > 0, |
|
1090 _L("RMobileConferenceCall::GetMobileCallInfo did not return valid iCallName")); |
|
1091 |
|
1092 // correct number in iDialledParty |
|
1093 ASSERT_EQUALS_DES16(callInfo.iDialledParty.iTelNumber, number, |
|
1094 _L("RMobileConferenceCall::GetMobileCallInfo did not return correct number in iDialledParty")); |
|
1095 |
|
1096 // valid iLineName |
|
1097 ASSERT_TRUE(callInfo.iLineName.Length() > 0, |
|
1098 _L("RMobileConferenceCall::GetMobileCallInfo did not return valid iLineName")); |
|
1099 |
|
1100 // iStatus of EStatusConnected |
|
1101 ASSERT_EQUALS(callInfo.iStatus, RMobileCall::EStatusConnected, |
|
1102 _L("RMobileConferenceCall::GetMobileCallInfo did not return iStatus of EStatusConnected")); |
|
1103 |
|
1104 // relevant bits set in iValid based on the above parameters |
|
1105 TUint32 wantedBits = RMobileCall::KCallDialledParty | RMobileCall::KCallId; |
|
1106 TUint32 unWantedBits = KNoUnwantedBits; |
|
1107 ASSERT_BITS_SET(callInfo.iValid, wantedBits, unWantedBits, |
|
1108 _L("RMobileConferenceCall::GetMobileCallInfo did not return relevant bits set in iValid")); |
|
1109 |
|
1110 // Check RMobileConferenceCall::GetMobileCallInfo with aIndex = 1 returns |
|
1111 index = 1; |
|
1112 ASSERT_EQUALS(confCall.GetMobileCallInfo(index,callInfoPckg), KErrNone, |
|
1113 _L("RMobileConferenceCall::GetMobileCallInfo with aIndex = 1 returned an error")); |
|
1114 |
|
1115 // valid iCallName |
|
1116 ASSERT_TRUE(callInfo.iCallName.Length() > 0, |
|
1117 _L("RMobileConferenceCall::GetMobileCallInfo did not return valid iCallName")); |
|
1118 |
|
1119 // correct number in iDialledParty |
|
1120 ASSERT_EQUALS_DES16(callInfo.iDialledParty.iTelNumber, number2, |
|
1121 _L("RMobileConferenceCall::GetMobileCallInfo did not return correct number in iDialledParty")); |
|
1122 |
|
1123 // valid iLineName |
|
1124 ASSERT_TRUE(callInfo.iLineName.Length() > 0, |
|
1125 _L("RMobileConferenceCall::GetMobileCallInfo did not return valid iLineName")); |
|
1126 |
|
1127 // iStatus of EStatusConnected |
|
1128 ASSERT_EQUALS(callInfo.iStatus, RMobileCall::EStatusConnected, |
|
1129 _L("RMobileConferenceCall::GetMobileCallInfo did not return iStatus of EStatusConnected")); |
|
1130 |
|
1131 // relevant bits set in iValid based on the above parameters |
|
1132 wantedBits = RMobileCall::KCallDialledParty | RMobileCall::KCallId; |
|
1133 unWantedBits = KNoUnwantedBits; |
|
1134 ASSERT_BITS_SET(callInfo.iValid, wantedBits, unWantedBits, |
|
1135 _L("RMobileConferenceCall::GetMobileCallInfo did not return relevant bits set in iValid")); |
|
1136 |
|
1137 // Post Notifier for RMobileConferenceCall::NotifyCapsChange |
|
1138 confCall.NotifyCapsChange(notifyCapsChangeStatus, caps); |
|
1139 |
|
1140 // Post Notifier for RMobileConferenceCall::NotifyConferenceEvent |
|
1141 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confName); |
|
1142 |
|
1143 // Post a notifier for RMobileConferenceCall::NotifyConferenceStatusChange |
|
1144 confCall.NotifyConferenceStatusChange(notifyMobileConfStatusChangeStatus,mobileConfStatus); |
|
1145 |
|
1146 // post a notifier for RCall::NotifyStatusChange for call 1 |
|
1147 call1.NotifyStatusChange(notifyStatusChangeStatus,callStatus); |
|
1148 |
|
1149 // Post a notifier for RMobileCall::NotifyMobileCallStatusChange for call1 |
|
1150 TExtEtelRequestStatus notifyMobileCallStatusChangeStatus (call1,EMobileCallNotifyMobileCallStatusChange); |
|
1151 CleanupStack::PushL(notifyMobileCallStatusChangeStatus); |
|
1152 RMobileCall::TMobileCallStatus mobileCallStatus; |
|
1153 call1.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus, mobileCallStatus); |
|
1154 |
|
1155 // Post a notifier for RCall::NotifyStatusChange for call2 |
|
1156 call2.NotifyStatusChange(notifyStatusChangeStatus2,callStatus2); |
|
1157 |
|
1158 // Post a notifier for RMobileCall::NotifyMobileCallStatusChange for call2 |
|
1159 TExtEtelRequestStatus notifyMobileCallStatusChangeStatus2 (call2,EMobileCallNotifyMobileCallStatusChange); |
|
1160 CleanupStack::PushL(notifyMobileCallStatusChangeStatus2); |
|
1161 RMobileCall::TMobileCallStatus mobileCallStatus2; |
|
1162 call2.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus2, mobileCallStatus2); |
|
1163 |
|
1164 // Post a notifier for RLine::NotifyStatusChange on line1 |
|
1165 TCoreEtelRequestStatus<RLine> notifyLineStatusChange (voiceLine1,&RLine::NotifyStatusChangeCancel); |
|
1166 CleanupStack::PushL(notifyLineStatusChange); |
|
1167 RCall::TStatus lineStatus; |
|
1168 voiceLine1.NotifyStatusChange(notifyLineStatusChange,lineStatus); |
|
1169 |
|
1170 // Post a notifier for RMobileLine::NotifyMobileLineStatusChange for line 1 |
|
1171 TExtEtelRequestStatus notifyMobileLineStatusChangeStatus (voiceLine1,EMobileLineNotifyMobileLineStatusChange); |
|
1172 CleanupStack::PushL(notifyMobileLineStatusChangeStatus); |
|
1173 RMobileCall::TMobileCallStatus mobileLineStatus; |
|
1174 voiceLine1.NotifyMobileLineStatusChange(notifyMobileLineStatusChangeStatus, mobileLineStatus); |
|
1175 |
|
1176 // Hang up conference call with RMobileConferenceCall::HangUp |
|
1177 TExtEtelRequestStatus hangUpStatus (confCall,EMobileConferenceCallHangUp); |
|
1178 CleanupStack::PushL(hangUpStatus); |
|
1179 confCall.HangUp(hangUpStatus); |
|
1180 ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone, |
|
1181 _L("RMobileConferenceCall::HangUp timed-out")); |
|
1182 ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, |
|
1183 _L("RMobileConferenceCall::HangUp returned an error")); |
|
1184 |
|
1185 // === Check conference caps === |
|
1186 // Check RMobileConferenceCall::NotifyCapsChange completes with caps of 0 |
|
1187 wantedCaps = 0; |
|
1188 unWantedCaps = KNoUnwantedBits; |
|
1189 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyCapsChange(confCall, |
|
1190 notifyCapsChangeStatus, |
|
1191 caps, |
|
1192 wantedCaps, |
|
1193 unWantedCaps, |
|
1194 KErrNone); |
|
1195 |
|
1196 // Check RMobileConferenceCall::GetCaps returns caps of 0 |
|
1197 ASSERT_EQUALS(confCall.GetCaps(caps), KErrNone, |
|
1198 _L("RMobileConferenceCall::GetCaps returned an error")); |
|
1199 wantedCaps = 0; |
|
1200 unWantedCaps = KNoUnwantedBits; |
|
1201 ASSERT_BITS_SET(caps, wantedCaps, unWantedCaps, |
|
1202 _L("RMobileConferenceCall::GetGaps returned unexpected caps")); |
|
1203 |
|
1204 |
|
1205 // === Check conference event === |
|
1206 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceTerminated |
|
1207 // $CTSYKnownFailure defect id=10018 this notification is not delivered (times out) |
|
1208 ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d </font>"), 10018); |
|
1209 /* |
|
1210 expectedEvent = RMobileConferenceCall::EConferenceTerminated; |
|
1211 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent(confCall, |
|
1212 notifyConfEventStatus, |
|
1213 confEvent, |
|
1214 expectedEvent, |
|
1215 confName, |
|
1216 KErrNone); |
|
1217 |
|
1218 */ |
|
1219 // === Check conference status === |
|
1220 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceIdle |
|
1221 |
|
1222 |
|
1223 expectedStatus = RMobileConferenceCall::EConferenceIdle; |
|
1224 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange(confCall, |
|
1225 notifyMobileConfStatusChangeStatus, |
|
1226 mobileConfStatus, |
|
1227 expectedStatus, |
|
1228 KErrNone); |
|
1229 |
|
1230 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceIdle |
|
1231 ASSERT_EQUALS(confCall.GetConferenceStatus(confStatus), KErrNone, |
|
1232 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
1233 ASSERT_EQUALS(confStatus, RMobileConferenceCall::EConferenceIdle, |
|
1234 _L("RMobileConferenceCall::GetConferenceStatus status was not EConferenceActive")); |
|
1235 |
|
1236 |
|
1237 // === Check individual calls in conference terminated === |
|
1238 |
|
1239 // === Check call status === |
|
1240 // Check RCall::NotifyStatusChange for call 1 completes with EStatusHangingUp -> |
|
1241 expectedCallStatus = RCall::EStatusHangingUp; |
|
1242 iCallControlTsyTestHelper.WaitForCallNotifyStatusChange(call1, |
|
1243 notifyStatusChangeStatus, |
|
1244 callStatus, |
|
1245 expectedCallStatus, |
|
1246 KErrNone); |
|
1247 |
|
1248 // Check RCall::NotifyStatusChange for call 1 completes with EStatusIdle. |
|
1249 call1.NotifyStatusChange(notifyStatusChangeStatus,callStatus); |
|
1250 expectedCallStatus = RCall::EStatusIdle; |
|
1251 iCallControlTsyTestHelper.WaitForCallNotifyStatusChange(call1, |
|
1252 notifyStatusChangeStatus, |
|
1253 callStatus, |
|
1254 expectedCallStatus, |
|
1255 KErrNone); |
|
1256 |
|
1257 // Check RCall::GetStatus for call 1 returns EStatusIdle. |
|
1258 ASSERT_EQUALS(call1.GetStatus(callStatus),KErrNone, _L("RCall::GetStatus returned an error")); |
|
1259 ASSERT_EQUALS(callStatus, RCall::EStatusIdle, |
|
1260 _L("RCall::GetStatus returned an unexpected call status")); |
|
1261 |
|
1262 // Check RMobileCall::NotifyMobileCallStatusChange for call 1 completes with EStatusDisconnecting -> |
|
1263 RMobileCall::TMobileCallStatus expectedMobileCallStatus = RMobileCall::EStatusDisconnecting; |
|
1264 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call1, |
|
1265 notifyMobileCallStatusChangeStatus, |
|
1266 mobileCallStatus, |
|
1267 expectedMobileCallStatus, |
|
1268 KErrNone); |
|
1269 |
|
1270 // Check RMobileCall::NotifyMobileCallStatusChange for call 1 completes with EStatusIdle. |
|
1271 call1.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus, mobileCallStatus); |
|
1272 expectedMobileCallStatus = RMobileCall::EStatusIdle; |
|
1273 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call1, |
|
1274 notifyMobileCallStatusChangeStatus, |
|
1275 mobileCallStatus, |
|
1276 expectedMobileCallStatus, |
|
1277 KErrNone); |
|
1278 |
|
1279 // Check RMobileCall::GetMobileCallStatus for call 1 returns status of EStatusIdle. |
|
1280 ASSERT_EQUALS(call1.GetMobileCallStatus(mobileCallStatus), KErrNone, |
|
1281 _L("RMobileCall::GetMobileCallStatus returned an error")); |
|
1282 ASSERT_EQUALS(mobileCallStatus, RMobileCall::EStatusIdle, |
|
1283 _L("RMobileCall::GetMobileCallStatus returned an unexpected call status")); |
|
1284 |
|
1285 // Check RCall::NotifyStatusChange for call 2 completes with EStatusHangingUp -> |
|
1286 expectedCallStatus = RCall::EStatusHangingUp; |
|
1287 iCallControlTsyTestHelper.WaitForCallNotifyStatusChange(call2, |
|
1288 notifyStatusChangeStatus2, |
|
1289 callStatus2, |
|
1290 expectedCallStatus, |
|
1291 KErrNone); |
|
1292 |
|
1293 // Check RCall::NotifyStatusChange for call 2 completes with EStatusIdle. |
|
1294 call2.NotifyStatusChange(notifyStatusChangeStatus2,callStatus2); |
|
1295 expectedCallStatus = RCall::EStatusIdle; |
|
1296 iCallControlTsyTestHelper.WaitForCallNotifyStatusChange(call2, |
|
1297 notifyStatusChangeStatus2, |
|
1298 callStatus2, |
|
1299 expectedCallStatus, |
|
1300 KErrNone); |
|
1301 |
|
1302 |
|
1303 // Check RMobileCall::NotifyMobileCallStatusChange for call 2 completes with EStatusDisconnecting -> |
|
1304 expectedMobileCallStatus = RMobileCall::EStatusDisconnecting; |
|
1305 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call2, |
|
1306 notifyMobileCallStatusChangeStatus2, |
|
1307 mobileCallStatus2, |
|
1308 expectedMobileCallStatus, |
|
1309 KErrNone); |
|
1310 |
|
1311 // Check RMobileCall::NotifyMobileCallStatusChange for call 2 completes with EStatusIdle. |
|
1312 call2.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus2, mobileCallStatus2); |
|
1313 expectedMobileCallStatus = RMobileCall::EStatusIdle; |
|
1314 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call2, |
|
1315 notifyMobileCallStatusChangeStatus2, |
|
1316 mobileCallStatus2, |
|
1317 expectedMobileCallStatus, |
|
1318 KErrNone); |
|
1319 |
|
1320 // Check RMobileCall::GetMobileCallStatus for call 2 returns status of EStatusIdle. |
|
1321 ASSERT_EQUALS(call2.GetMobileCallStatus(mobileCallStatus2), KErrNone, |
|
1322 _L("RMobileCall::GetMobileCallStatus on call 2 returned an error")); |
|
1323 ASSERT_EQUALS(mobileCallStatus2, RMobileCall::EStatusIdle, |
|
1324 _L("RMobileCall::GetMobileCallStatus on call 2 returned an unexpected call status")); |
|
1325 |
|
1326 // === Check line status === |
|
1327 // Check RLine::NotifyStatusChange for line 1 completes with EStatusHangingUp -> |
|
1328 RCall::TStatus expectedLineStatus = RCall::EStatusHangingUp; |
|
1329 iCallControlTsyTestHelper.WaitForLineNotifyStatusChange(voiceLine1, |
|
1330 notifyLineStatusChange, |
|
1331 lineStatus, |
|
1332 expectedLineStatus, |
|
1333 KErrNone); |
|
1334 |
|
1335 // Check RLine::NotifyStatusChange for line 1 completes with EStatusIdle |
|
1336 voiceLine1.NotifyStatusChange(notifyLineStatusChange,lineStatus); |
|
1337 expectedLineStatus = RCall::EStatusIdle; |
|
1338 iCallControlTsyTestHelper.WaitForLineNotifyStatusChange(voiceLine1, |
|
1339 notifyLineStatusChange, |
|
1340 lineStatus, |
|
1341 expectedLineStatus, |
|
1342 KErrNone); |
|
1343 |
|
1344 // Check RLine::GetStatus for line 1 returns EStatusIdle |
|
1345 ASSERT_EQUALS(voiceLine1.GetStatus(lineStatus),KErrNone, |
|
1346 _L("RLine::GetStatus for line 1 returned an error")); |
|
1347 ASSERT_EQUALS(lineStatus, RCall::EStatusIdle, |
|
1348 _L("RLine::GetStatus returned an unexpected call status")); |
|
1349 |
|
1350 // Check RMobileLine::NotifyMobileLineStatusChange for line 1 completes with EStatusDisconnecting -> |
|
1351 RMobileCall::TMobileCallStatus expectedMobileLineStatus = RMobileCall::EStatusDisconnecting; |
|
1352 iCallControlTsyTestHelper.WaitForMobileLineNotifyMobileLineStatusChange(voiceLine1, |
|
1353 notifyMobileLineStatusChangeStatus, |
|
1354 mobileLineStatus, |
|
1355 expectedMobileLineStatus, |
|
1356 KErrNone); |
|
1357 |
|
1358 // Check RMobileLine::NotifyMobileLineStatusChange for line 1 completes with EStatusIdle |
|
1359 voiceLine1.NotifyMobileLineStatusChange(notifyMobileLineStatusChangeStatus, mobileLineStatus); |
|
1360 expectedMobileLineStatus = RMobileCall::EStatusIdle; |
|
1361 iCallControlTsyTestHelper.WaitForMobileLineNotifyMobileLineStatusChange(voiceLine1, |
|
1362 notifyMobileLineStatusChangeStatus, |
|
1363 mobileLineStatus, |
|
1364 expectedMobileLineStatus, |
|
1365 KErrNone); |
|
1366 |
|
1367 // Check RMobileLine::GetMobileLineStatus for line 1 returns EStatusIdle |
|
1368 ASSERT_EQUALS(voiceLine1.GetMobileLineStatus(mobileLineStatus), KErrNone, |
|
1369 _L("RMobileLine::GetMobileLineStatus returned an error")); |
|
1370 ASSERT_EQUALS(mobileLineStatus, RMobileCall::EStatusIdle, |
|
1371 _L("RMobileLine::GetMobileLineStatus returned an unexpected call status")); |
|
1372 |
|
1373 |
|
1374 // |
|
1375 // TEST END |
|
1376 // |
|
1377 |
|
1378 StartCleanup(); |
|
1379 |
|
1380 // Hangup calls |
|
1381 call1.HangUp(); |
|
1382 call2.HangUp(); |
|
1383 |
|
1384 /* notifyStatusChangeStatus |
|
1385 dialStatus |
|
1386 holdStatus |
|
1387 notifyStatusChangeStatus2 |
|
1388 notifyCapsChangeStatus |
|
1389 dialStatus2 |
|
1390 notifyConfEventStatus |
|
1391 notifyMobileConfStatusChangeStatus |
|
1392 createConfStatus |
|
1393 notifyMobileCallStatusChangeStatus |
|
1394 notifyMobileCallStatusChangeStatus2 |
|
1395 notifyLineStatusChange |
|
1396 notifyMobileLineStatusChangeStatus |
|
1397 hangUpStatus */ |
|
1398 CleanupStack::PopAndDestroy(14, ¬ifyStatusChangeStatus); |
|
1399 return TestStepResult(); |
|
1400 } |
|
1401 |
|
1402 TPtrC CCTSYIntegrationTestConferenceCallControl0004::GetTestStepName() |
|
1403 /** |
|
1404 * @return The test step name. |
|
1405 */ |
|
1406 { |
|
1407 return _L("CCTSYIntegrationTestConferenceCallControl0004"); |
|
1408 } |
|
1409 |
|
1410 |
|
1411 |
|
1412 CCTSYIntegrationTestConferenceCallControl0005::CCTSYIntegrationTestConferenceCallControl0005(CEtelSessionMgr& aEtelSessionMgr) |
|
1413 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
1414 /** |
|
1415 * Constructor. |
|
1416 */ |
|
1417 { |
|
1418 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0005::GetTestStepName()); |
|
1419 } |
|
1420 |
|
1421 CCTSYIntegrationTestConferenceCallControl0005::~CCTSYIntegrationTestConferenceCallControl0005() |
|
1422 /** |
|
1423 * Destructor. |
|
1424 */ |
|
1425 { |
|
1426 } |
|
1427 |
|
1428 TVerdict CCTSYIntegrationTestConferenceCallControl0005::doTestStepL() |
|
1429 /** |
|
1430 * @SYMTestCaseID BA-CTSY-INT-CONC-0005 |
|
1431 * @SYMFssID BA/CTSY/CONC-0005 |
|
1432 * @SYMTestCaseDesc Swap a conference call with an active voice call. |
|
1433 * @SYMTestPriority High |
|
1434 * @SYMTestActions RMobileCall::NotifyMobileCallStatusChange, RMobileConferenceCall::NotifyConferenceEvent, RMobileConferenceCall::NotifyConferenceStatusChange, RMobileCall::GetMobileCallStatus, RMobileConferenceCall::Swap, RMobileConferenceCall::GetConferenceStatus |
|
1435 * @SYMTestExpectedResults Pass - Conference call swapped. |
|
1436 * @SYMTestType CIT |
|
1437 * @SYMTestCaseDependencies live/automatic |
|
1438 * |
|
1439 * Reason for test: Verify conference creation successful. |
|
1440 Verify conference call notifications complete with correct values. |
|
1441 * |
|
1442 * @return - TVerdict code |
|
1443 */ |
|
1444 { |
|
1445 |
|
1446 // |
|
1447 // SET UP |
|
1448 // |
|
1449 |
|
1450 |
|
1451 // Create a three party conference call. (Two remote parties) |
|
1452 |
|
1453 // Get voice line 3. |
|
1454 |
|
1455 // Get call 3. |
|
1456 |
|
1457 |
|
1458 // |
|
1459 // SET UP END |
|
1460 // |
|
1461 |
|
1462 StartTest(); |
|
1463 |
|
1464 // |
|
1465 // TEST START |
|
1466 // |
|
1467 |
|
1468 |
|
1469 // Swap the conference call with RMobileConferenceCall::Swap |
|
1470 |
|
1471 // === Check conference event === |
|
1472 |
|
1473 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceSwapped |
|
1474 |
|
1475 // === Check conference status === |
|
1476 |
|
1477 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceHold |
|
1478 |
|
1479 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceHold |
|
1480 |
|
1481 // Dial a number that answers on call 3. |
|
1482 |
|
1483 // Check RMobileCall::NotifyMobileCallStatusChange for call 3 completes with EStatusConnected |
|
1484 |
|
1485 // Check RMobileCall::GetMobileCallStatus for call 3 returns status of EStatusConnected |
|
1486 |
|
1487 // Swap the conference call with RMobileConferenceCall::Swap |
|
1488 |
|
1489 // === Check conference event === |
|
1490 |
|
1491 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceSwapped |
|
1492 |
|
1493 // === Check conference status === |
|
1494 |
|
1495 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceActive |
|
1496 |
|
1497 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
1498 |
|
1499 // === Check call 3 on hold === |
|
1500 |
|
1501 // Check RMobileCall::NotifyMobileCallStatusChange for call 3 completes with EStatusHold |
|
1502 |
|
1503 // Check RMobileCall::GetMobileCallStatus for call 3 returns status of EStatusHold |
|
1504 |
|
1505 |
|
1506 // |
|
1507 // TEST END |
|
1508 // |
|
1509 |
|
1510 StartCleanup(); |
|
1511 |
|
1512 // Put any required test clean up here, then remove this comment |
|
1513 |
|
1514 return TestStepResult(); |
|
1515 } |
|
1516 |
|
1517 TPtrC CCTSYIntegrationTestConferenceCallControl0005::GetTestStepName() |
|
1518 /** |
|
1519 * @return The test step name. |
|
1520 */ |
|
1521 { |
|
1522 return _L("CCTSYIntegrationTestConferenceCallControl0005"); |
|
1523 } |
|
1524 |
|
1525 |
|
1526 |
|
1527 CCTSYIntegrationTestConferenceCallControl0006::CCTSYIntegrationTestConferenceCallControl0006(CEtelSessionMgr& aEtelSessionMgr) |
|
1528 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
1529 /** |
|
1530 * Constructor. |
|
1531 */ |
|
1532 { |
|
1533 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0006::GetTestStepName()); |
|
1534 } |
|
1535 |
|
1536 CCTSYIntegrationTestConferenceCallControl0006::~CCTSYIntegrationTestConferenceCallControl0006() |
|
1537 /** |
|
1538 * Destructor. |
|
1539 */ |
|
1540 { |
|
1541 } |
|
1542 |
|
1543 TVerdict CCTSYIntegrationTestConferenceCallControl0006::doTestStepL() |
|
1544 /** |
|
1545 * @SYMTestCaseID BA-CTSY-INT-CONC-0006 |
|
1546 * @SYMFssID BA/CTSY/CONC-0006 |
|
1547 * @SYMTestCaseDesc Swap a conference call. |
|
1548 * @SYMTestPriority High |
|
1549 * @SYMTestActions RMobileConferenceCall::NotifyConferenceEvent, RMobileConferenceCall::NotifyConferenceStatusChange, RMobileConferenceCall::GetCaps, RMobileCall::GetMobileCallStatus, RMobileConferenceCall::Swap, RMobileConferenceCall::GetConferenceStatus, RMobileConferenceCall::NotifyCapsChange, RMobileConferenceCall::HangUp |
|
1550 * @SYMTestExpectedResults Pass - Conference call swapped with an active call. |
|
1551 * @SYMTestType CIT |
|
1552 * @SYMTestCaseDependencies live/automatic |
|
1553 * |
|
1554 * Reason for test: Verify conference call can be swapped from active to hold and vice versa. |
|
1555 Verify conference call notifications complete correctly. |
|
1556 * |
|
1557 * @return - TVerdict code |
|
1558 */ |
|
1559 { |
|
1560 |
|
1561 // |
|
1562 // SET UP |
|
1563 // |
|
1564 |
|
1565 TPtrC num1, num2, num3; |
|
1566 |
|
1567 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
1568 _L("Failed to obtain 1st number for test") ); |
|
1569 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
1570 _L("Failed to obtain 2nd number for test") ); |
|
1571 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber3, num3), |
|
1572 _L("Failed to obtain 3rd number for test") ); |
|
1573 |
|
1574 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
1575 |
|
1576 // Get conference call subsession. |
|
1577 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
1578 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
1579 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
1580 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
1581 |
|
1582 // Make sure we are on the network |
|
1583 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone); |
|
1584 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
1585 |
|
1586 // Create a three party conference call (two remote parties). |
|
1587 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
1588 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
1589 |
|
1590 callStatus = HoldCallL(call1); |
|
1591 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
1592 |
|
1593 callStatus = MakeCallL(call2, num2); |
|
1594 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
1595 |
|
1596 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
1597 CleanupStack::PushL(reqCreConfStatus); |
|
1598 |
|
1599 confCall.CreateConference(reqCreConfStatus); |
|
1600 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
1601 _L("RMobileConferenceCall::CreateConference timed out")); |
|
1602 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
1603 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
1604 |
|
1605 // |
|
1606 // SET UP END |
|
1607 // |
|
1608 |
|
1609 StartTest(); |
|
1610 |
|
1611 // |
|
1612 // TEST START |
|
1613 // |
|
1614 |
|
1615 // Post a notifier for RMobileConferenceCall::NotifyConferenceEvent |
|
1616 TExtEtelRequestStatus notifyConfEventStatus(confCall, EMobileConferenceCallNotifyConferenceEvent); |
|
1617 CleanupStack::PushL( notifyConfEventStatus ); |
|
1618 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
1619 TName confEventCallName; |
|
1620 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
1621 |
|
1622 // Post a notifier for RMobileConferenceCall::NotifyConferenceStatusChange |
|
1623 TExtEtelRequestStatus notifyConfStatusChange(confCall, EMobileConferenceCallNotifyConferenceStatusChange); |
|
1624 CleanupStack::PushL(notifyConfStatusChange); |
|
1625 RMobileConferenceCall::TMobileConferenceStatus confStatus; |
|
1626 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
1627 |
|
1628 // Post a notifier for RMobileCall::NotifyMobileCallStatusChange for call1 |
|
1629 TExtEtelRequestStatus notifyMobileCallStatusChangeStatus (call1, EMobileCallNotifyMobileCallStatusChange); |
|
1630 CleanupStack::PushL(notifyMobileCallStatusChangeStatus); |
|
1631 RMobileCall::TMobileCallStatus mobileCallStatus; |
|
1632 call1.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus, mobileCallStatus); |
|
1633 |
|
1634 // Post a notifier for RMobileCall::NotifyMobileCallStatusChange for call2 |
|
1635 TExtEtelRequestStatus notifyMobileCallStatusChangeStatus2 (call2, EMobileCallNotifyMobileCallStatusChange); |
|
1636 CleanupStack::PushL(notifyMobileCallStatusChangeStatus2); |
|
1637 RMobileCall::TMobileCallStatus mobileCallStatus2; |
|
1638 call2.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus2, mobileCallStatus2); |
|
1639 |
|
1640 // Post a notifier for RMobileCall::NotifyCapsChange |
|
1641 TExtEtelRequestStatus notifyCapsChangeStatus(confCall, EMobileConferenceCallNotifyCapsChange); |
|
1642 CleanupStack::PushL(notifyCapsChangeStatus); |
|
1643 TUint32 confCallCaps; |
|
1644 confCall.NotifyCapsChange(notifyCapsChangeStatus, confCallCaps); |
|
1645 |
|
1646 // Swap the conference call with RMobileConferenceCall::Swap |
|
1647 TExtEtelRequestStatus reqSwapConfStatus(confCall, EMobileConferenceCallSwap); |
|
1648 CleanupStack::PushL(reqSwapConfStatus); |
|
1649 |
|
1650 confCall.Swap(reqSwapConfStatus); |
|
1651 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqSwapConfStatus, ETimeShort),KErrNone, |
|
1652 _L("RMobileConferenceCall::Swap timed out")); |
|
1653 ASSERT_EQUALS( reqSwapConfStatus.Int(),KErrNone, |
|
1654 _L("RMobileConferenceCall::Swap returned error")); |
|
1655 TEST_CHECK_POINT_L(_L("RMobileConferenceCall::Swap failed")); |
|
1656 |
|
1657 // === Check conference event === |
|
1658 |
|
1659 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceSwapped |
|
1660 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent(confCall, |
|
1661 notifyConfEventStatus, |
|
1662 confEvent, |
|
1663 RMobileConferenceCall::EConferenceSwapped, |
|
1664 confEventCallName, |
|
1665 KErrNone); |
|
1666 |
|
1667 ASSERT_EQUALS( confEvent, RMobileConferenceCall::EConferenceSwapped, |
|
1668 _L("RMobileConferenceCall::NotifyConferenceEvent returned unexpected event")); |
|
1669 |
|
1670 TEST_CHECK_POINT_L(_L("RMobileConferenceCall::Swap failed")); |
|
1671 |
|
1672 // Repost NotifyConferenceEvent |
|
1673 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
1674 |
|
1675 // === Check conference status === |
|
1676 |
|
1677 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceHold |
|
1678 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange(confCall, |
|
1679 notifyConfStatusChange, |
|
1680 confStatus, |
|
1681 RMobileConferenceCall::EConferenceHold, |
|
1682 KErrNone); |
|
1683 |
|
1684 ASSERT_EQUALS( confStatus, RMobileConferenceCall::EConferenceHold, |
|
1685 _L("RMobileConferenceCall::NotifyConferenceStatusChange returned wrong status")); |
|
1686 |
|
1687 // repost NotifyConferenceStatusChange |
|
1688 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus); |
|
1689 |
|
1690 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceHold |
|
1691 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
1692 ASSERT_EQUALS(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
1693 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
1694 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceHold, |
|
1695 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceHold")); |
|
1696 |
|
1697 TEST_CHECK_POINT_L(_L("Conference status incorrect")); |
|
1698 |
|
1699 // === Check individual calls in conference go on hold === |
|
1700 |
|
1701 // Check RMobileCall::NotifyMobileCallStatusChange for call 1 completes with EStatusHold |
|
1702 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call1, |
|
1703 notifyMobileCallStatusChangeStatus, |
|
1704 mobileCallStatus, |
|
1705 RMobileCall::EStatusHold, |
|
1706 KErrNone); |
|
1707 |
|
1708 ASSERT_EQUALS( mobileCallStatus, RMobileCall::EStatusHold, |
|
1709 _L("RMobileConferenceCall::NotifyMobileCallStatusChange returned unexpected event")); |
|
1710 |
|
1711 // repost call1 NotifyMobileCallStatusChange |
|
1712 call1.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus, mobileCallStatus); |
|
1713 |
|
1714 // Check RMobileCall::GetMobileCallStatus for call 1 returns status of EStatusHold |
|
1715 RMobileCall::TMobileCallStatus getMobileCallStatus; |
|
1716 ASSERT_EQUALS(call1.GetMobileCallStatus(getMobileCallStatus), KErrNone, |
|
1717 _L("RMobileCall::GetMobileCallStatus returned an error")); |
|
1718 ASSERT_EQUALS(getMobileCallStatus, RMobileCall::EStatusHold, |
|
1719 _L("RMobileCall::GetMobileCallStatus returned an unexpected call status")); |
|
1720 |
|
1721 // Check RMobileCall::NotifyMobileCallStatusChange for call 2 completes with EStatusHold |
|
1722 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call2, |
|
1723 notifyMobileCallStatusChangeStatus2, |
|
1724 mobileCallStatus2, |
|
1725 RMobileCall::EStatusHold, |
|
1726 KErrNone); |
|
1727 ASSERT_EQUALS( mobileCallStatus2, RMobileCall::EStatusHold, |
|
1728 _L("RMobileConferenceCall::NotifyMobileCallStatusChange returned unexpected event")); |
|
1729 |
|
1730 // repost call2 NotifyMobileCallStatusChange |
|
1731 call2.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus2, mobileCallStatus2); |
|
1732 |
|
1733 // Check RMobileCall::GetMobileCallStatus for call 2 returns status of EStatusHold |
|
1734 ASSERT_EQUALS(call2.GetMobileCallStatus(getMobileCallStatus), KErrNone, |
|
1735 _L("RMobileCall::GetMobileCallStatus returned an error")); |
|
1736 ASSERT_EQUALS(getMobileCallStatus, RMobileCall::EStatusHold, |
|
1737 _L("RMobileCall::GetMobileCallStatus returned an unexpected call status")); |
|
1738 |
|
1739 // Swap the conference call with RMobileConferenceCall::Swap |
|
1740 confCall.Swap(reqSwapConfStatus); |
|
1741 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqSwapConfStatus, ETimeShort),KErrNone, |
|
1742 _L("RMobileConferenceCall::Swap timed out")); |
|
1743 ASSERT_EQUALS( reqSwapConfStatus.Int(),KErrNone, |
|
1744 _L("RMobileConferenceCall::Swap returned error")); |
|
1745 TEST_CHECK_POINT_L(_L("RMobileConferenceCall::Swap failed")); |
|
1746 |
|
1747 // === Check conference event === |
|
1748 |
|
1749 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceSwapped |
|
1750 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent(confCall, |
|
1751 notifyConfEventStatus, |
|
1752 confEvent, |
|
1753 RMobileConferenceCall::EConferenceSwapped, |
|
1754 confEventCallName, |
|
1755 KErrNone); |
|
1756 |
|
1757 ASSERT_EQUALS( confEvent, RMobileConferenceCall::EConferenceSwapped, |
|
1758 _L("RMobileConferenceCall::NotifyConferenceEvent returned unexpected event")); |
|
1759 |
|
1760 TEST_CHECK_POINT_L(_L("RMobileConferenceCall::Swap failed")); |
|
1761 |
|
1762 |
|
1763 // === Check conference status === |
|
1764 |
|
1765 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceActive |
|
1766 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange(confCall, |
|
1767 notifyConfStatusChange, |
|
1768 confStatus, |
|
1769 RMobileConferenceCall::EConferenceActive, |
|
1770 KErrNone); |
|
1771 |
|
1772 ASSERT_EQUALS( confStatus, RMobileConferenceCall::EConferenceActive, |
|
1773 _L("RMobileConferenceCall::NotifyConferenceStatusChange returned unexpected event")); |
|
1774 |
|
1775 // repost NotifyConferenceStatusChange |
|
1776 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus); |
|
1777 |
|
1778 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
1779 ASSERT_EQUALS(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
1780 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
1781 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
1782 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
1783 |
|
1784 // === Check individual calls in conference go on === |
|
1785 |
|
1786 // Check RMobileCall::NotifyMobileCallStatusChange for call 1 completes with EStatusConnected |
|
1787 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call1, |
|
1788 notifyMobileCallStatusChangeStatus, |
|
1789 mobileCallStatus, |
|
1790 RMobileCall::EStatusConnected, |
|
1791 KErrNone); |
|
1792 ASSERT_EQUALS( mobileCallStatus, RMobileCall::EStatusConnected, |
|
1793 _L("RMobileConferenceCall::NotifyMobileCallStatusChange returned unexpected status")); |
|
1794 |
|
1795 // Check RMobileCall::GetMobileCallStatus for call 1 returns status of EStatusConnected |
|
1796 ASSERT_EQUALS(call1.GetMobileCallStatus(getMobileCallStatus), KErrNone, |
|
1797 _L("RMobileCall::GetMobileCallStatus returned an error")); |
|
1798 ASSERT_EQUALS(getMobileCallStatus, RMobileCall::EStatusConnected, |
|
1799 _L("RMobileCall::GetMobileCallStatus returned an unexpected call status")); |
|
1800 |
|
1801 // Check RMobileCall::NotifyMobileCallStatusChange for call 2 completes with EStatusConnected |
|
1802 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call2, |
|
1803 notifyMobileCallStatusChangeStatus2, |
|
1804 mobileCallStatus2, |
|
1805 RMobileCall::EStatusConnected, |
|
1806 KErrNone); |
|
1807 ASSERT_EQUALS( mobileCallStatus2, RMobileCall::EStatusConnected, |
|
1808 _L("RMobileConferenceCall::NotifyMobileCallStatusChange returned unexpected status")); |
|
1809 |
|
1810 // Check RMobileCall::GetMobileCallStatus for call 2 returns status of EStatusConnected |
|
1811 ASSERT_EQUALS(call2.GetMobileCallStatus(getMobileCallStatus), KErrNone, |
|
1812 _L("RMobileCall::GetMobileCallStatus returned an error")); |
|
1813 ASSERT_EQUALS(getMobileCallStatus, RMobileCall::EStatusConnected, |
|
1814 _L("RMobileCall::GetMobileCallStatus returned an unexpected call status")); |
|
1815 |
|
1816 // repost |
|
1817 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
1818 |
|
1819 |
|
1820 // Hang up conference call with RMobileConferenceCall::HangUp |
|
1821 TExtEtelRequestStatus hangUpStatus (confCall,EMobileConferenceCallHangUp); |
|
1822 CleanupStack::PushL(hangUpStatus); |
|
1823 confCall.HangUp(hangUpStatus); |
|
1824 ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone, |
|
1825 _L("RMobileConferenceCall::HangUp timed-out")); |
|
1826 ASSERT_EQUALS(hangUpStatus.Int(), KErrNone, |
|
1827 _L("RMobileConferenceCall::HangUp returned an error")); |
|
1828 |
|
1829 // === Check conference caps === |
|
1830 |
|
1831 // Check RMobileConferenceCall::NotifyCapsChange completes with caps of 0 |
|
1832 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyCapsChange(confCall, |
|
1833 notifyCapsChangeStatus, |
|
1834 confCallCaps, |
|
1835 KNoWantedBits, |
|
1836 KNoWantedBits, |
|
1837 KErrNone); |
|
1838 |
|
1839 // Check RMobileConferenceCall::GetCaps returns caps of 0 |
|
1840 TUint32 caps; |
|
1841 TInt result = confCall.GetCaps(caps); |
|
1842 ASSERT_EQUALS(result, KErrNone, _L("RMobileConferenceCall::GetCaps failed.")); |
|
1843 ASSERT_BITS_SET(caps, KNoWantedBits, KNoWantedBits, _L("RMobileConferenceCall::GetCaps returned wrong mask") ); |
|
1844 |
|
1845 // === Check conference event === |
|
1846 |
|
1847 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceTerminated |
|
1848 // $CTSYKnownFailure defect id=10018 this notification is not delivered (times out) |
|
1849 ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 10018); |
|
1850 /* |
|
1851 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent(confCall, |
|
1852 notifyConfEventStatus, |
|
1853 confEvent, |
|
1854 RMobileConferenceCall::EConferenceTerminated, |
|
1855 confEventCallName, |
|
1856 KErrNone); |
|
1857 |
|
1858 ASSERT_EQUALS( confEvent, RMobileConferenceCall::EConferenceTerminated, |
|
1859 _L("RMobileConferenceCall::NotifyConferenceEvent returned unexpected event")); |
|
1860 */ |
|
1861 |
|
1862 // === Check conference status === |
|
1863 |
|
1864 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceIdle |
|
1865 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange(confCall, |
|
1866 notifyConfStatusChange, |
|
1867 confStatus, |
|
1868 RMobileConferenceCall::EConferenceIdle, |
|
1869 KErrNone); |
|
1870 |
|
1871 ASSERT_EQUALS( confStatus, RMobileConferenceCall::EConferenceIdle, |
|
1872 _L("RMobileConferenceCall::NotifyConferenceStatusChange returned wrong status")); |
|
1873 |
|
1874 |
|
1875 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceIdle |
|
1876 ASSERT_EQUALS(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
1877 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
1878 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceIdle, |
|
1879 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceIdle")); |
|
1880 |
|
1881 // |
|
1882 // TEST END |
|
1883 // |
|
1884 |
|
1885 StartCleanup(); |
|
1886 |
|
1887 // Hangup calls |
|
1888 call1.HangUp(); |
|
1889 call2.HangUp(); |
|
1890 |
|
1891 CleanupStack::PopAndDestroy(&hangUpStatus); |
|
1892 CleanupStack::PopAndDestroy(&reqSwapConfStatus); |
|
1893 CleanupStack::PopAndDestroy(¬ifyCapsChangeStatus); |
|
1894 CleanupStack::PopAndDestroy(¬ifyMobileCallStatusChangeStatus2); |
|
1895 CleanupStack::PopAndDestroy(¬ifyMobileCallStatusChangeStatus); |
|
1896 CleanupStack::PopAndDestroy(¬ifyConfStatusChange); |
|
1897 CleanupStack::PopAndDestroy(¬ifyConfEventStatus); |
|
1898 CleanupStack::PopAndDestroy(&reqCreConfStatus); |
|
1899 |
|
1900 return TestStepResult(); |
|
1901 } |
|
1902 |
|
1903 TPtrC CCTSYIntegrationTestConferenceCallControl0006::GetTestStepName() |
|
1904 /** |
|
1905 * @return The test step name. |
|
1906 */ |
|
1907 { |
|
1908 return _L("CCTSYIntegrationTestConferenceCallControl0006"); |
|
1909 } |
|
1910 |
|
1911 |
|
1912 |
|
1913 CCTSYIntegrationTestConferenceCallControl0007::CCTSYIntegrationTestConferenceCallControl0007(CEtelSessionMgr& aEtelSessionMgr) |
|
1914 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
1915 /** |
|
1916 * Constructor. |
|
1917 */ |
|
1918 { |
|
1919 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0007::GetTestStepName()); |
|
1920 } |
|
1921 |
|
1922 CCTSYIntegrationTestConferenceCallControl0007::~CCTSYIntegrationTestConferenceCallControl0007() |
|
1923 /** |
|
1924 * Destructor. |
|
1925 */ |
|
1926 { |
|
1927 } |
|
1928 |
|
1929 TVerdict CCTSYIntegrationTestConferenceCallControl0007::doTestStepL() |
|
1930 /** |
|
1931 * @SYMTestCaseID BA-CTSY-INT-CONC-0007 |
|
1932 * @SYMFssID BA/CTSY/CONC-0007 |
|
1933 * @SYMTestCaseDesc Hang up a two party conference call after one remote party has already hung up. |
|
1934 * @SYMTestPriority High |
|
1935 * @SYMTestActions RMobileConferenceCall::NotifyConferenceEvent, RMobileConferenceCall::NotifyConferenceStatusChange, RMobileConferenceCall::GetCaps, RMobileConferenceCall::GetConferenceStatus, RMobileConferenceCall::NotifyCapsChange |
|
1936 * @SYMTestExpectedResults Pass - KErrNotReady on attempt to hang up conference call. |
|
1937 * @SYMTestType CIT |
|
1938 * @SYMTestCaseDependencies live/manual |
|
1939 * |
|
1940 * Reason for test: Verify conference call related notifications complete correctly. |
|
1941 Verify conference call cannot be hung up when there is an active call in the conference |
|
1942 * |
|
1943 * @return - TVerdict code |
|
1944 */ |
|
1945 { |
|
1946 |
|
1947 // |
|
1948 // SET UP |
|
1949 // |
|
1950 |
|
1951 // Need to call a number which is answered and can be hung up |
|
1952 // For this manual test the user must set up a number they can answer and hang up on number 2 |
|
1953 _LIT(KPromptCheckNum3,"Check that the INI file has a \"RPS\" number you can answer on VoiceNumber2"); |
|
1954 DisplayUserInteractionPromptL(KPromptCheckNum3); |
|
1955 |
|
1956 TPtrC num1, num2; |
|
1957 |
|
1958 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
1959 _L("Failed to obtain 1st number for test") ); |
|
1960 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
1961 _L("Failed to obtain 2nd number for test") ); |
|
1962 |
|
1963 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
1964 |
|
1965 // Get conference call subsession. |
|
1966 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
1967 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
1968 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
1969 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
1970 |
|
1971 // Make sure we are on the network |
|
1972 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone); |
|
1973 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
1974 |
|
1975 // Create a three party conference call. (Two remote parties where RPS is one of the remote parties.) |
|
1976 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
1977 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
1978 |
|
1979 callStatus = HoldCallL(call1); |
|
1980 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
1981 |
|
1982 callStatus = MakeCallL(call2, num2); |
|
1983 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
1984 |
|
1985 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
1986 CleanupStack::PushL(reqCreConfStatus); |
|
1987 |
|
1988 confCall.CreateConference(reqCreConfStatus); |
|
1989 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
1990 _L("RMobileConferenceCall::CreateConference timed out")); |
|
1991 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
1992 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
1993 |
|
1994 // |
|
1995 // SET UP END |
|
1996 // |
|
1997 |
|
1998 StartTest(); |
|
1999 |
|
2000 // |
|
2001 // TEST START |
|
2002 // |
|
2003 |
|
2004 // Post notification for RMobileCall::NotifyCapsChange |
|
2005 TExtEtelRequestStatus notifyCapsChangeStatus(confCall, EMobileConferenceCallNotifyCapsChange); |
|
2006 CleanupStack::PushL(notifyCapsChangeStatus); |
|
2007 TUint32 confCallCaps; |
|
2008 confCall.NotifyCapsChange(notifyCapsChangeStatus, confCallCaps); |
|
2009 |
|
2010 // Post notification for RMobileCall::NotifyConferenceEvent |
|
2011 TExtEtelRequestStatus notifyConfEventStatus(confCall,EMobileConferenceCallNotifyConferenceEvent); |
|
2012 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
2013 TName confEventCallName; |
|
2014 confCall.NotifyConferenceEvent( notifyConfEventStatus, confEvent, confEventCallName ); |
|
2015 |
|
2016 // Request notification for RMobileConferenceCall::NotifyConferenceStatusChange |
|
2017 TExtEtelRequestStatus notifyConfStatusChange(confCall, EMobileConferenceCallNotifyConferenceStatusChange); |
|
2018 CleanupStack::PushL(notifyConfStatusChange); |
|
2019 RMobileConferenceCall::TMobileConferenceStatus confStatus; |
|
2020 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
2021 |
|
2022 // RPS hangs up. |
|
2023 |
|
2024 _LIT(KPromptForHangup,"Please hangup \"RPS\" call (call 2)"); |
|
2025 DisplayUserInteractionPromptL(KPromptForHangup); |
|
2026 |
|
2027 // === Conference should have terminated since there are no longer three parties === |
|
2028 |
|
2029 // === Check conference caps === |
|
2030 |
|
2031 // Check RMobileConferenceCall::NotifyCapsChange completes with caps of 0 |
|
2032 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyCapsChange(confCall, |
|
2033 notifyCapsChangeStatus, |
|
2034 confCallCaps, |
|
2035 0, |
|
2036 KNoUnwantedBits, |
|
2037 KErrNone); |
|
2038 |
|
2039 // Check RMobileConferenceCall::GetCaps returns caps of 0 |
|
2040 TUint32 caps; |
|
2041 TInt result = confCall.GetCaps(caps); |
|
2042 ASSERT_EQUALS(result, KErrNone, _L("RMobileConferenceCall::GetCaps failed.")); |
|
2043 ASSERT_BITS_SET( caps, KNoUnwantedBits, KNoUnwantedBits, _L("RMobileConferenceCall::GetCaps returned wrong mask") ); |
|
2044 |
|
2045 // === Check conference event === |
|
2046 |
|
2047 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceTerminated |
|
2048 // $CTSYKnownFailure defect id=10018 this notification is not delivered (times out) |
|
2049 ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 10018); |
|
2050 /* |
|
2051 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent(confCall, |
|
2052 notifyConfEventStatus, |
|
2053 confEvent, |
|
2054 RMobileConferenceCall::EConferenceTerminated, |
|
2055 confEventCallName, |
|
2056 KErrNone); |
|
2057 */ |
|
2058 // === Check conference status === |
|
2059 |
|
2060 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceIdle |
|
2061 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange(confCall, |
|
2062 notifyConfStatusChange, |
|
2063 confStatus, |
|
2064 RMobileConferenceCall::EConferenceIdle, |
|
2065 KErrNone); |
|
2066 |
|
2067 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceIdle |
|
2068 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
2069 ASSERT_EQUALS(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
2070 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
2071 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceIdle, |
|
2072 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceIdle")); |
|
2073 |
|
2074 // === Hang up conference when it has already been terminated === |
|
2075 |
|
2076 // Hang up conference. |
|
2077 TExtEtelRequestStatus hangUpStatus (confCall,EMobileConferenceCallHangUp); |
|
2078 CleanupStack::PushL(hangUpStatus); |
|
2079 confCall.HangUp(hangUpStatus); |
|
2080 |
|
2081 // Check hang up returns KErrNotReady |
|
2082 ASSERT_EQUALS(WaitForRequestWithTimeOut(hangUpStatus, ETimeMedium), KErrNone, |
|
2083 _L("RMobileConferenceCall::HangUp timed-out")); |
|
2084 |
|
2085 ASSERT_EQUALS(hangUpStatus.Int(), KErrAccessDenied, |
|
2086 _L("RMobileConferenceCall::HangUp returned an unexpected error")); |
|
2087 |
|
2088 // |
|
2089 // TEST END |
|
2090 // |
|
2091 |
|
2092 StartCleanup(); |
|
2093 |
|
2094 // Hang up calls |
|
2095 call1.HangUp(); |
|
2096 call2.HangUp(); |
|
2097 |
|
2098 CleanupStack::PopAndDestroy(&hangUpStatus); |
|
2099 CleanupStack::PopAndDestroy(¬ifyConfStatusChange); |
|
2100 CleanupStack::PopAndDestroy(¬ifyCapsChangeStatus); |
|
2101 CleanupStack::PopAndDestroy(&reqCreConfStatus); |
|
2102 |
|
2103 return TestStepResult(); |
|
2104 } |
|
2105 |
|
2106 TPtrC CCTSYIntegrationTestConferenceCallControl0007::GetTestStepName() |
|
2107 /** |
|
2108 * @return The test step name. |
|
2109 */ |
|
2110 { |
|
2111 return _L("CCTSYIntegrationTestConferenceCallControl0007"); |
|
2112 } |
|
2113 |
|
2114 |
|
2115 |
|
2116 CCTSYIntegrationTestConferenceCallControl0008::CCTSYIntegrationTestConferenceCallControl0008(CEtelSessionMgr& aEtelSessionMgr) |
|
2117 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
2118 /** |
|
2119 * Constructor. |
|
2120 */ |
|
2121 { |
|
2122 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0008::GetTestStepName()); |
|
2123 } |
|
2124 |
|
2125 CCTSYIntegrationTestConferenceCallControl0008::~CCTSYIntegrationTestConferenceCallControl0008() |
|
2126 /** |
|
2127 * Destructor. |
|
2128 */ |
|
2129 { |
|
2130 } |
|
2131 |
|
2132 TVerdict CCTSYIntegrationTestConferenceCallControl0008::doTestStepL() |
|
2133 /** |
|
2134 * @SYMTestCaseID BA-CTSY-INT-CONC-0008 |
|
2135 * @SYMFssID BA/CTSY/CONC-0008 |
|
2136 * @SYMTestCaseDesc Hang up a conference call after the calls in the conference are hung up. |
|
2137 * @SYMTestPriority High |
|
2138 * @SYMTestActions RMobileCall::NotifyMobileCallStatusChange, RCall::NotifyStatusChange, RMobileConferenceCall::EnumerateCalls, RMobileConferenceCall::GetCaps, RMobileCall::GetMobileCallStatus, RMobileConferenceCall::GetConferenceStatus, RCall::GetStatus |
|
2139 * @SYMTestExpectedResults Pass - Calls in conference terminate. |
|
2140 * @SYMTestType CIT |
|
2141 * @SYMTestCaseDependencies live/automatic |
|
2142 * |
|
2143 * Reason for test: Verify conference call hangs up. |
|
2144 Verify conference call notifications complete correctly. |
|
2145 * |
|
2146 * @return - TVerdict code |
|
2147 */ |
|
2148 { |
|
2149 |
|
2150 // |
|
2151 // SET UP |
|
2152 // |
|
2153 |
|
2154 TPtrC num1, num2; |
|
2155 |
|
2156 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
2157 _L("Failed to obtain 1st number for test") ); |
|
2158 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
2159 _L("Failed to obtain 2nd number for test") ); |
|
2160 |
|
2161 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
2162 |
|
2163 // Get conference call subsession. |
|
2164 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
2165 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
2166 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
2167 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
2168 |
|
2169 // Make sure we are on the network |
|
2170 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone); |
|
2171 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
2172 |
|
2173 // Create a three party conference call. (Two remote parties where RPS is one of the remote parties.) |
|
2174 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
2175 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
2176 |
|
2177 callStatus = HoldCallL(call1); |
|
2178 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
2179 |
|
2180 callStatus = MakeCallL(call2, num2); |
|
2181 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
2182 |
|
2183 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
2184 CleanupStack::PushL(reqCreConfStatus); |
|
2185 |
|
2186 confCall.CreateConference(reqCreConfStatus); |
|
2187 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
2188 _L("RMobileConferenceCall::CreateConference timed out")); |
|
2189 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
2190 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
2191 |
|
2192 // |
|
2193 // SET UP END |
|
2194 // |
|
2195 |
|
2196 StartTest(); |
|
2197 |
|
2198 // |
|
2199 // TEST START |
|
2200 // |
|
2201 |
|
2202 // Post a notifier for RCall::NotifyStatusChange for call 1 |
|
2203 TCoreEtelRequestStatus<RCall> notifyStatusChangeStatus (call1, &RCall::NotifyStatusChangeCancel); |
|
2204 CleanupStack::PushL(notifyStatusChangeStatus); |
|
2205 RCall::TStatus notifyStatusChangeCallStatus; |
|
2206 call1.NotifyStatusChange(notifyStatusChangeStatus, notifyStatusChangeCallStatus); |
|
2207 |
|
2208 // Post a notifier for RCall::NotifyStatusChange for call 2 |
|
2209 TCoreEtelRequestStatus<RCall> notifyStatusChangeStatus2 (call2, &RCall::NotifyStatusChangeCancel); |
|
2210 CleanupStack::PushL(notifyStatusChangeStatus2); |
|
2211 RCall::TStatus notifyStatusChangeCallStatus2; |
|
2212 call2.NotifyStatusChange(notifyStatusChangeStatus2, notifyStatusChangeCallStatus2); |
|
2213 |
|
2214 // Post a notifier for RMobileCall::NotifyMobileCallStatusChange for call 1 |
|
2215 TExtEtelRequestStatus notifyMobileCallStatusChangeStatus (call1, EMobileCallNotifyMobileCallStatusChange); |
|
2216 CleanupStack::PushL(notifyMobileCallStatusChangeStatus); |
|
2217 RMobileCall::TMobileCallStatus mobileCallStatus; |
|
2218 call1.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus, mobileCallStatus); |
|
2219 |
|
2220 // Post a notifier for RMobileCall::NotifyMobileCallStatusChange for call 2 |
|
2221 TExtEtelRequestStatus notifyMobileCallStatusChangeStatus2 (call2, EMobileCallNotifyMobileCallStatusChange); |
|
2222 CleanupStack::PushL(notifyMobileCallStatusChangeStatus2); |
|
2223 RMobileCall::TMobileCallStatus mobileCallStatus2; |
|
2224 call2.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus2, mobileCallStatus2); |
|
2225 |
|
2226 // Hang up call 1 in the conference. |
|
2227 ASSERT_EQUALS(call1.HangUp(), KErrNone, _L("RMobileCall::HangUp return value not KErrNone")); |
|
2228 |
|
2229 // === Check call status === |
|
2230 |
|
2231 // Check RCall::NotifyStatusChange for call 1 completes with EStatusHangingUp -> EStatusIdle. |
|
2232 RCall::TStatus expectedCallStatus = RCall::EStatusHangingUp; |
|
2233 iCallControlTsyTestHelper.WaitForCallNotifyStatusChange(call1, |
|
2234 notifyStatusChangeStatus, |
|
2235 notifyStatusChangeCallStatus, |
|
2236 expectedCallStatus, |
|
2237 KErrNone); |
|
2238 |
|
2239 call1.NotifyStatusChange(notifyStatusChangeStatus, notifyStatusChangeCallStatus); |
|
2240 |
|
2241 expectedCallStatus = RCall::EStatusIdle; |
|
2242 |
|
2243 iCallControlTsyTestHelper.WaitForCallNotifyStatusChange(call1, |
|
2244 notifyStatusChangeStatus, |
|
2245 notifyStatusChangeCallStatus, |
|
2246 expectedCallStatus, |
|
2247 KErrNone); |
|
2248 |
|
2249 call1.NotifyStatusChange(notifyStatusChangeStatus, notifyStatusChangeCallStatus); |
|
2250 |
|
2251 // Check RCall::GetStatus for call 1 returns EStatusIdle. |
|
2252 RCall::TStatus getStatus; |
|
2253 ASSERT_EQUALS(call1.GetStatus(getStatus), KErrNone, _L("RCall::GetStatus returned an error")); |
|
2254 ASSERT_EQUALS(getStatus, RCall::EStatusIdle, |
|
2255 _L("RCall::GetStatus returned an unexpected call status")); |
|
2256 |
|
2257 // Check RMobileCall::NotifyMobileCallStatusChange for call 1 completes with EStatusDisconnecting -> EStatusIdle. |
|
2258 RMobileCall::TMobileCallStatus expectedMobileCallStatus = RMobileCall::EStatusDisconnecting; |
|
2259 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call1, |
|
2260 notifyMobileCallStatusChangeStatus, |
|
2261 mobileCallStatus, |
|
2262 expectedMobileCallStatus, |
|
2263 KErrNone); |
|
2264 |
|
2265 call1.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus, mobileCallStatus); |
|
2266 |
|
2267 expectedMobileCallStatus = RMobileCall::EStatusIdle; |
|
2268 |
|
2269 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call1, |
|
2270 notifyMobileCallStatusChangeStatus, |
|
2271 mobileCallStatus, |
|
2272 expectedMobileCallStatus, |
|
2273 KErrNone); |
|
2274 |
|
2275 // Check RMobileCall::GetMobileCallStatus for call 1 returns status of EStatusIdle. |
|
2276 RMobileCall::TMobileCallStatus getMobileCallStatus; |
|
2277 ASSERT_EQUALS(call1.GetMobileCallStatus(getMobileCallStatus), KErrNone, |
|
2278 _L("RMobileCall::GetMobileCallStatus returned an error")); |
|
2279 ASSERT_EQUALS(getMobileCallStatus, RMobileCall::EStatusIdle, |
|
2280 _L("RMobileCall::GetMobileCallStatus returned an unexpected call status")); |
|
2281 |
|
2282 // Hang up call 2 in the conference. |
|
2283 ASSERT_TRUE(call2.HangUp()==KErrNone, _L("RMobileCall::HangUp return value not KErrNone")); |
|
2284 |
|
2285 // === Check call status === |
|
2286 |
|
2287 // Check RCall::NotifyStatusChange for call 2 completes with EStatusHangingUp -> EStatusIdle. |
|
2288 expectedCallStatus = RCall::EStatusHangingUp; |
|
2289 iCallControlTsyTestHelper.WaitForCallNotifyStatusChange(call2, |
|
2290 notifyStatusChangeStatus2, |
|
2291 notifyStatusChangeCallStatus2, |
|
2292 expectedCallStatus, |
|
2293 KErrNone); |
|
2294 |
|
2295 call2.NotifyStatusChange(notifyStatusChangeStatus2, notifyStatusChangeCallStatus2); |
|
2296 |
|
2297 expectedCallStatus = RCall::EStatusIdle; |
|
2298 |
|
2299 iCallControlTsyTestHelper.WaitForCallNotifyStatusChange(call2, |
|
2300 notifyStatusChangeStatus2, |
|
2301 notifyStatusChangeCallStatus2, |
|
2302 expectedCallStatus, |
|
2303 KErrNone); |
|
2304 |
|
2305 call2.NotifyStatusChange(notifyStatusChangeStatus2, notifyStatusChangeCallStatus2); |
|
2306 |
|
2307 // Check RCall::GetStatus for call 2 returns EStatusIdle. |
|
2308 ASSERT_EQUALS(call2.GetStatus(getStatus), KErrNone, _L("RCall::GetStatus returned an error")); |
|
2309 ASSERT_EQUALS(getStatus, RCall::EStatusIdle, |
|
2310 _L("RCall::GetStatus returned an unexpected call status")); |
|
2311 |
|
2312 // Check RMobileCall::NotifyMobileCallStatusChange for call 2 completes with EStatusDisconnecting -> EStatusIdle. |
|
2313 expectedMobileCallStatus = RMobileCall::EStatusDisconnecting; |
|
2314 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call2, |
|
2315 notifyMobileCallStatusChangeStatus2, |
|
2316 mobileCallStatus2, |
|
2317 expectedMobileCallStatus, |
|
2318 KErrNone); |
|
2319 |
|
2320 call2.NotifyMobileCallStatusChange(notifyMobileCallStatusChangeStatus2, mobileCallStatus2); |
|
2321 |
|
2322 expectedMobileCallStatus = RMobileCall::EStatusIdle; |
|
2323 |
|
2324 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(call2, |
|
2325 notifyMobileCallStatusChangeStatus2, |
|
2326 mobileCallStatus2, |
|
2327 expectedMobileCallStatus, |
|
2328 KErrNone); |
|
2329 |
|
2330 // Check RMobileCall::GetMobileCallStatus for call 2 returns status of EStatusIdle. |
|
2331 ASSERT_EQUALS(call2.GetMobileCallStatus(getMobileCallStatus), KErrNone, |
|
2332 _L("RMobileCall::GetMobileCallStatus returned an error")); |
|
2333 ASSERT_EQUALS(getMobileCallStatus, RMobileCall::EStatusIdle, |
|
2334 _L("RMobileCall::GetMobileCallStatus returned an unexpected call status")); |
|
2335 |
|
2336 // === Conference should have terminated === |
|
2337 |
|
2338 // Check RMobileConferenceCall::GetCaps returns caps NOT in set of KCapsCreate | KCapsHangUp | KCapsSwap |
|
2339 TUint32 caps; |
|
2340 TInt result = confCall.GetCaps(caps); |
|
2341 ASSERT_EQUALS(result, KErrNone, _L("RMobileConferenceCall::GetCaps failed.")) |
|
2342 TUint32 unwantedbits = RMobileConferenceCall::KCapsCreate | RMobileConferenceCall::KCapsHangUp | RMobileConferenceCall::KCapsSwap; |
|
2343 ASSERT_BITS_SET( caps, KNoUnwantedBits, unwantedbits, _L("RMobileConferenceCall::GetCaps returned wrong mask") ) |
|
2344 |
|
2345 // Check RMobileConferenceCall::EnumerateCalls returns aCount = 0 |
|
2346 TInt callCount; |
|
2347 ASSERT_EQUALS( confCall.EnumerateCalls(callCount), KErrNone, |
|
2348 _L("RMobileConferenceCall::EnumerateCalls failed.")); |
|
2349 ASSERT_EQUALS(callCount, 0, _L("RMobileConferenceCall::EnumerateCalls returned non-zero")); |
|
2350 |
|
2351 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceIdle |
|
2352 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
2353 ASSERT_EQUALS(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
2354 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
2355 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceIdle, |
|
2356 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceIdle")); |
|
2357 |
|
2358 // |
|
2359 // TEST END |
|
2360 // |
|
2361 |
|
2362 StartCleanup(); |
|
2363 |
|
2364 //notifyMobileCallStatusChangeStatus2 |
|
2365 //notifyMobileCallStatusChangeStatus |
|
2366 //notifyStatusChangeStatus2 |
|
2367 //notifyStatusChangeStatus |
|
2368 //reqCreConfStatus |
|
2369 CleanupStack::PopAndDestroy(5, &reqCreConfStatus); |
|
2370 |
|
2371 return TestStepResult(); |
|
2372 } |
|
2373 |
|
2374 TPtrC CCTSYIntegrationTestConferenceCallControl0008::GetTestStepName() |
|
2375 /** |
|
2376 * @return The test step name. |
|
2377 */ |
|
2378 { |
|
2379 return _L("CCTSYIntegrationTestConferenceCallControl0008"); |
|
2380 } |
|
2381 |
|
2382 |
|
2383 |
|
2384 CCTSYIntegrationTestConferenceCallControl0009::CCTSYIntegrationTestConferenceCallControl0009(CEtelSessionMgr& aEtelSessionMgr) |
|
2385 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
2386 /** |
|
2387 * Constructor. |
|
2388 */ |
|
2389 { |
|
2390 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0009::GetTestStepName()); |
|
2391 } |
|
2392 |
|
2393 CCTSYIntegrationTestConferenceCallControl0009::~CCTSYIntegrationTestConferenceCallControl0009() |
|
2394 /** |
|
2395 * Destructor. |
|
2396 */ |
|
2397 { |
|
2398 } |
|
2399 |
|
2400 TVerdict CCTSYIntegrationTestConferenceCallControl0009::doTestStepL() |
|
2401 /** |
|
2402 * @SYMTestCaseID BA-CTSY-INT-CONC-0009 |
|
2403 * @SYMFssID BA/CTSY/CONC-0009 |
|
2404 * @SYMTestCaseDesc Hold second call in conference in two call conference call. |
|
2405 * @SYMTestPriority High |
|
2406 * @SYMTestActions RMobileCall::Hold |
|
2407 * @SYMTestExpectedResults Pass - KErrNotReady on attempt to hold. |
|
2408 * @SYMTestType CIT |
|
2409 * @SYMTestCaseDependencies live/automatic |
|
2410 * |
|
2411 * Reason for test: Verify error is returned and existing conference remains active. |
|
2412 * |
|
2413 * @return - TVerdict code |
|
2414 */ |
|
2415 { |
|
2416 |
|
2417 // |
|
2418 // SET UP |
|
2419 // |
|
2420 |
|
2421 TPtrC num1, num2; |
|
2422 |
|
2423 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
2424 _L("Failed to obtain 1st number for test") ); |
|
2425 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
2426 _L("Failed to obtain 2nd number for test") ); |
|
2427 |
|
2428 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
2429 |
|
2430 // Get conference call subsession. |
|
2431 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
2432 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
2433 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
2434 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
2435 |
|
2436 // Make sure we are on the network |
|
2437 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone); |
|
2438 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
2439 |
|
2440 // Create a three party conference call (two remote parties). |
|
2441 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
2442 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
2443 |
|
2444 callStatus = HoldCallL(call1); |
|
2445 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
2446 |
|
2447 callStatus = MakeCallL(call2, num2); |
|
2448 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
2449 |
|
2450 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
2451 CleanupStack::PushL(reqCreConfStatus); |
|
2452 |
|
2453 confCall.CreateConference(reqCreConfStatus); |
|
2454 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
2455 _L("RMobileConferenceCall::CreateConference timed out")); |
|
2456 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
2457 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
2458 |
|
2459 // |
|
2460 // SET UP END |
|
2461 // |
|
2462 |
|
2463 StartTest(); |
|
2464 |
|
2465 // |
|
2466 // TEST START |
|
2467 // |
|
2468 |
|
2469 // Hold call 2 in the conference call. |
|
2470 TExtEtelRequestStatus reqHoldStatus(call2,EMobileCallHold); |
|
2471 CleanupStack::PushL(reqHoldStatus); |
|
2472 |
|
2473 call2.Hold(reqHoldStatus); |
|
2474 |
|
2475 // Check KErrNotReady is returned. |
|
2476 ASSERT_EQUALS(WaitForRequestWithTimeOut(reqHoldStatus, ETimeMedium), KErrNone, _L("RMobileCall::Hold timed-out")); |
|
2477 ASSERT_EQUALS(reqHoldStatus.Int(), KErrNotReady, _L("RMobileCall::Hold returned an error") ) |
|
2478 |
|
2479 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
2480 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
2481 ASSERT_EQUALS(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
2482 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
2483 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
2484 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceIdle")); |
|
2485 |
|
2486 // |
|
2487 // TEST END |
|
2488 // |
|
2489 |
|
2490 StartCleanup(); |
|
2491 |
|
2492 TExtEtelRequestStatus reqHangupStatus(confCall, EMobileConferenceCallHangUp ); |
|
2493 CleanupStack::PushL(reqHangupStatus); |
|
2494 confCall.HangUp(reqHangupStatus); |
|
2495 WaitForRequestWithTimeOut(reqHangupStatus,ETimeMedium); |
|
2496 |
|
2497 // Hangup calls |
|
2498 call1.HangUp(); |
|
2499 call2.HangUp(); |
|
2500 |
|
2501 // reqHangupStatus |
|
2502 // reqHoldStatus |
|
2503 CleanupStack::PopAndDestroy(3, &reqCreConfStatus); |
|
2504 |
|
2505 return TestStepResult(); |
|
2506 } |
|
2507 |
|
2508 TPtrC CCTSYIntegrationTestConferenceCallControl0009::GetTestStepName() |
|
2509 /** |
|
2510 * @return The test step name. |
|
2511 */ |
|
2512 { |
|
2513 return _L("CCTSYIntegrationTestConferenceCallControl0009"); |
|
2514 } |
|
2515 |
|
2516 CCTSYIntegrationTestConferenceCallControl0010::CCTSYIntegrationTestConferenceCallControl0010(CEtelSessionMgr& aEtelSessionMgr) |
|
2517 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
2518 /** |
|
2519 * Constructor. |
|
2520 */ |
|
2521 { |
|
2522 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0010::GetTestStepName()); |
|
2523 } |
|
2524 |
|
2525 CCTSYIntegrationTestConferenceCallControl0010::~CCTSYIntegrationTestConferenceCallControl0010() |
|
2526 /** |
|
2527 * Destructor. |
|
2528 */ |
|
2529 { |
|
2530 } |
|
2531 |
|
2532 TVerdict CCTSYIntegrationTestConferenceCallControl0010::doTestStepL() |
|
2533 /** |
|
2534 * @SYMTestCaseID BA-CTSY-INT-CONC-0010 |
|
2535 * @SYMFssID BA/CTSY/CONC-0010 |
|
2536 * @SYMTestCaseDesc Dial another call when there is an active conference call. Conference call on automatic hold. |
|
2537 * @SYMTestPriority High |
|
2538 * @SYMTestActions RMobileCall::NotifyMobileCallStatusChange, RCall::NotifyStatusChange, RMobileConferenceCall::NotifyConferenceStatusChange, RMobileConferenceCall::GetCaps, RMobileCall::GetMobileCallStatus, RMobileConferenceCall::GetConferenceStatus, RMobileConferenceCall::NotifyCapsChange, RMobileConferenceCall::HangUp, RCall::Dial |
|
2539 * @SYMTestExpectedResults Pass - Third call dials successfully. Conference call goes on automatic hold. |
|
2540 * @SYMTestType CIT |
|
2541 * @SYMTestCaseDependencies live/automatic |
|
2542 * |
|
2543 * Reason for test: Verify third call can be made. |
|
2544 Verify conference call notifications complete correctly. |
|
2545 * |
|
2546 * @return - TVerdict code |
|
2547 */ |
|
2548 { |
|
2549 |
|
2550 // |
|
2551 // SET UP |
|
2552 // |
|
2553 |
|
2554 TPtrC num1, num2, num3; |
|
2555 |
|
2556 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
2557 _L("Failed to obtain 1st number for test") ); |
|
2558 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
2559 _L("Failed to obtain 2nd number for test") ); |
|
2560 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber3, num3), |
|
2561 _L("Failed to obtain 3rd number for test") ); |
|
2562 |
|
2563 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
2564 |
|
2565 // Get conference call subsession. |
|
2566 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
2567 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
2568 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
2569 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
2570 |
|
2571 // Make sure we are on the network |
|
2572 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone); |
|
2573 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
2574 |
|
2575 // Create a three party conference call (two remote parties). |
|
2576 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
2577 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
2578 |
|
2579 callStatus = HoldCallL(call1); |
|
2580 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
2581 |
|
2582 callStatus = MakeCallL(call2, num2); |
|
2583 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
2584 |
|
2585 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
2586 CleanupStack::PushL(reqCreConfStatus); |
|
2587 |
|
2588 confCall.CreateConference(reqCreConfStatus); |
|
2589 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
2590 _L("RMobileConferenceCall::CreateConference timed out")); |
|
2591 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
2592 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
2593 |
|
2594 // Get voice line 3. |
|
2595 |
|
2596 // Get call 3. |
|
2597 RMobileCall& call3 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall3 ); |
|
2598 |
|
2599 // |
|
2600 // SET UP END |
|
2601 // |
|
2602 |
|
2603 StartTest(); |
|
2604 |
|
2605 // |
|
2606 // TEST START |
|
2607 // |
|
2608 |
|
2609 // post a notifier for RMobileConferenceCall::NotifyConferenceStatusChange |
|
2610 TExtEtelRequestStatus notifyConfStatusChange(confCall, EMobileConferenceCallNotifyConferenceStatusChange); |
|
2611 CleanupStack::PushL(notifyConfStatusChange); |
|
2612 RMobileConferenceCall::TMobileConferenceStatus confStatus; |
|
2613 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
2614 |
|
2615 // post a notifier for RCall::NotifyMobileCallStatusChange for call 1 |
|
2616 TExtEtelRequestStatus notifyCallStatus(call1, EMobileCallNotifyMobileCallStatusChange); |
|
2617 CleanupStack::PushL(notifyCallStatus); |
|
2618 RMobileCall::TMobileCallStatus notifyMobileCallStatusChangeStatus; |
|
2619 call1.NotifyMobileCallStatusChange( notifyCallStatus, notifyMobileCallStatusChangeStatus ); |
|
2620 |
|
2621 // post a notifier for RCall::NotifyMobileCallStatusChange for call 2 |
|
2622 TExtEtelRequestStatus notifyCallStatus2(call2, EMobileCallNotifyMobileCallStatusChange); |
|
2623 CleanupStack::PushL(notifyCallStatus2); |
|
2624 RMobileCall::TMobileCallStatus notifyMobileCallStatusChangeStatus2; |
|
2625 call2.NotifyMobileCallStatusChange( notifyCallStatus2, notifyMobileCallStatusChangeStatus2 ); |
|
2626 |
|
2627 // Dial a number that answers on call 3. |
|
2628 callStatus = MakeCallL(call3, num3); |
|
2629 ASSERT_EQUALS(callStatus, RMobileCall::EStatusConnected,_L("Failed to connect call3")); |
|
2630 |
|
2631 // === Check conference goes on automatic hold === |
|
2632 |
|
2633 // === Check conference status === |
|
2634 |
|
2635 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceHold |
|
2636 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
2637 notifyConfStatusChange, |
|
2638 confStatus, |
|
2639 RMobileConferenceCall::EConferenceHold, |
|
2640 KErrNone); |
|
2641 |
|
2642 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
2643 |
|
2644 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceHold |
|
2645 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
2646 ASSERT_EQUALS(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
2647 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
2648 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceHold, |
|
2649 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceHold")); |
|
2650 |
|
2651 // === Check individual calls in conference go on hold === |
|
2652 |
|
2653 // Check RMobileCall::NotifyMobileCallStatusChange for call 1 completes with EStatusHold |
|
2654 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange( call1, |
|
2655 notifyCallStatus, |
|
2656 notifyMobileCallStatusChangeStatus, |
|
2657 RMobileCall::EStatusHold, |
|
2658 KErrNone ); |
|
2659 |
|
2660 // Check RMobileCall::GetMobileCallStatus for call 1 returns status of EStatusHold |
|
2661 err = call1.GetMobileCallStatus(callStatus); |
|
2662 ASSERT_EQUALS(err, KErrNone,_L("RMobileCall::GetMobileCallStatus returned an error")); |
|
2663 ASSERT_EQUALS(callStatus, RMobileCall::EStatusHold, _L("RMobileCall::GetMobileCallStatus returned wrong status")) |
|
2664 |
|
2665 // Check RMobileCall::NotifyMobileCallStatusChange for call 2 completes with EStatusHold |
|
2666 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange( call2, |
|
2667 notifyCallStatus2, |
|
2668 notifyMobileCallStatusChangeStatus2, |
|
2669 RMobileCall::EStatusHold, |
|
2670 KErrNone ); |
|
2671 |
|
2672 // Check RMobileCall::GetMobileCallStatus for call 2 returns status of EStatusHold |
|
2673 err = call2.GetMobileCallStatus(callStatus); |
|
2674 ASSERT_EQUALS(err, KErrNone,_L("RMobileCall::GetMobileCallStatus returned an error")); |
|
2675 ASSERT_EQUALS(callStatus, RMobileCall::EStatusHold, _L("RMobileCall::GetMobileCallStatus returned wrong status")) |
|
2676 |
|
2677 // Request notification for RMobileConferenceCall::NotifyCapsChange |
|
2678 TExtEtelRequestStatus notifyCapsChangeStatus(confCall, EMobileConferenceCallNotifyCapsChange); |
|
2679 CleanupStack::PushL(notifyCapsChangeStatus); |
|
2680 TUint32 confCallCaps; |
|
2681 confCall.NotifyCapsChange(notifyCapsChangeStatus, confCallCaps); |
|
2682 |
|
2683 // Request notification for RMobileConferenceCall::NotifyConferenceEvent |
|
2684 TExtEtelRequestStatus notifyConfEventStatus(confCall,EMobileConferenceCallNotifyConferenceEvent); |
|
2685 CleanupStack::PushL(notifyConfEventStatus); |
|
2686 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
2687 TName confEventCallName; |
|
2688 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
2689 |
|
2690 // Hang up conference call. |
|
2691 TExtEtelRequestStatus reqHangupStatus(confCall, EMobileConferenceCallHangUp ); |
|
2692 CleanupStack::PushL(reqHangupStatus); |
|
2693 confCall.HangUp(reqHangupStatus); |
|
2694 WaitForRequestWithTimeOut(reqHangupStatus,ETimeMedium); |
|
2695 |
|
2696 // === Check conference caps === |
|
2697 |
|
2698 // Check RMobileConferenceCall::NotifyCapsChange completes with caps of 0 |
|
2699 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyCapsChange(confCall, |
|
2700 notifyCapsChangeStatus, |
|
2701 confCallCaps, |
|
2702 0, |
|
2703 KNoUnwantedBits, |
|
2704 KErrNone); |
|
2705 |
|
2706 // Check RMobileConferenceCall::GetCaps returns caps of 0 |
|
2707 err = confCall.GetCaps(confCallCaps); |
|
2708 ASSERT_EQUALS(confCallCaps, (TUint32)0, _L("RMobileConferenceCall::NotifyCapsChange returned non-zero caps")); |
|
2709 |
|
2710 // === Check conference event === |
|
2711 |
|
2712 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceTerminated |
|
2713 // $CTSYKnownFailure defect id=10018 this notification is not delivered (times out) |
|
2714 /* |
|
2715 ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 10018); |
|
2716 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( confCall, |
|
2717 notifyConfEventStatus, |
|
2718 confEvent,RMobileConferenceCall::EConferenceTerminated, |
|
2719 confEventCallName, |
|
2720 KErrNone); |
|
2721 */ |
|
2722 // === Check conference status === |
|
2723 |
|
2724 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceIdle |
|
2725 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
2726 notifyConfStatusChange, |
|
2727 confStatus, |
|
2728 RMobileConferenceCall::EConferenceIdle, |
|
2729 KErrNone); |
|
2730 |
|
2731 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceIdle |
|
2732 ASSERT_EQUALS(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
2733 _L("RMobileConferenceCall::GetConferenceStatus returned an error")) |
|
2734 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceIdle, |
|
2735 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
2736 |
|
2737 // |
|
2738 // TEST END |
|
2739 // |
|
2740 |
|
2741 // Hangup for safety |
|
2742 call1.HangUp(); |
|
2743 call2.HangUp(); |
|
2744 call3.HangUp(); |
|
2745 |
|
2746 StartCleanup(); |
|
2747 |
|
2748 // reqHangupStatus |
|
2749 // notifyConfEventStatus |
|
2750 // notifyCapsChangeStatus |
|
2751 // notifyCallStatus2 |
|
2752 // notifyCallStatus |
|
2753 // notifyConfStatusChange |
|
2754 // reqCreConfStatus |
|
2755 CleanupStack::PopAndDestroy( 7, &reqCreConfStatus ); |
|
2756 |
|
2757 return TestStepResult(); |
|
2758 } |
|
2759 |
|
2760 TPtrC CCTSYIntegrationTestConferenceCallControl0010::GetTestStepName() |
|
2761 /** |
|
2762 * @return The test step name. |
|
2763 */ |
|
2764 { |
|
2765 return _L("CCTSYIntegrationTestConferenceCallControl0010"); |
|
2766 } |
|
2767 |
|
2768 |
|
2769 |
|
2770 CCTSYIntegrationTestConferenceCallControl0011::CCTSYIntegrationTestConferenceCallControl0011(CEtelSessionMgr& aEtelSessionMgr) |
|
2771 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
2772 /** |
|
2773 * Constructor. |
|
2774 */ |
|
2775 { |
|
2776 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0011::GetTestStepName()); |
|
2777 } |
|
2778 |
|
2779 CCTSYIntegrationTestConferenceCallControl0011::~CCTSYIntegrationTestConferenceCallControl0011() |
|
2780 /** |
|
2781 * Destructor. |
|
2782 */ |
|
2783 { |
|
2784 } |
|
2785 |
|
2786 TVerdict CCTSYIntegrationTestConferenceCallControl0011::doTestStepL() |
|
2787 /** |
|
2788 * @SYMTestCaseID BA-CTSY-INT-CONC-0011 |
|
2789 * @SYMFssID BA/CTSY/CONC-0011 |
|
2790 * @SYMTestCaseDesc Create a conference call when there is already one active. |
|
2791 * @SYMTestPriority High |
|
2792 * @SYMTestActions RMobileConferenceCall::GetConferenceStatus |
|
2793 * @SYMTestExpectedResults Pass - KErrNotReady on attempt to create second conference call. |
|
2794 * @SYMTestType CIT |
|
2795 * @SYMTestCaseDependencies live/automatic |
|
2796 * |
|
2797 * Reason for test: Verify failure to create conference call and existing conference remains active. |
|
2798 * |
|
2799 * @return - TVerdict code |
|
2800 */ |
|
2801 { |
|
2802 |
|
2803 // |
|
2804 // SET UP |
|
2805 // |
|
2806 |
|
2807 TPtrC num1, num2; |
|
2808 |
|
2809 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
2810 _L("Failed to obtain 1st number for test") ); |
|
2811 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
2812 _L("Failed to obtain 2nd number for test") ); |
|
2813 |
|
2814 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
2815 |
|
2816 // Get conference call subsession. |
|
2817 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
2818 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
2819 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
2820 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
2821 |
|
2822 // Make sure we are on the network |
|
2823 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone); |
|
2824 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
2825 |
|
2826 // Create a three party conference call (two remote parties). |
|
2827 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
2828 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
2829 |
|
2830 callStatus = HoldCallL(call1); |
|
2831 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
2832 |
|
2833 callStatus = MakeCallL(call2, num2); |
|
2834 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
2835 |
|
2836 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
2837 CleanupStack::PushL(reqCreConfStatus); |
|
2838 |
|
2839 confCall.CreateConference(reqCreConfStatus); |
|
2840 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
2841 _L("RMobileConferenceCall::CreateConference timed out")); |
|
2842 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
2843 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
2844 |
|
2845 // |
|
2846 // SET UP END |
|
2847 // |
|
2848 |
|
2849 StartTest(); |
|
2850 |
|
2851 // |
|
2852 // TEST START |
|
2853 // |
|
2854 |
|
2855 // Attempt to create another conference. |
|
2856 confCall.CreateConference(reqCreConfStatus); |
|
2857 |
|
2858 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
2859 _L("RMobileConferenceCall::CreateConference timed out")); |
|
2860 |
|
2861 // Check KErrNotReady is returned. |
|
2862 CHECK_EQUALS_L( reqCreConfStatus.Int(), KErrNotReady, |
|
2863 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
2864 |
|
2865 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
2866 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
2867 ASSERT_EQUALS(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
2868 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
2869 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
2870 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
2871 |
|
2872 // |
|
2873 // TEST END |
|
2874 // |
|
2875 |
|
2876 StartCleanup(); |
|
2877 |
|
2878 TExtEtelRequestStatus reqHangupStatus(confCall, EMobileConferenceCallHangUp ); |
|
2879 CleanupStack::PushL(reqHangupStatus); |
|
2880 confCall.HangUp(reqHangupStatus); |
|
2881 WaitForRequestWithTimeOut(reqHangupStatus,ETimeMedium); |
|
2882 |
|
2883 // hang up for safety |
|
2884 call1.HangUp(); |
|
2885 call2.HangUp(); |
|
2886 |
|
2887 CleanupStack::PopAndDestroy(&reqHangupStatus); |
|
2888 CleanupStack::PopAndDestroy(&reqCreConfStatus); |
|
2889 |
|
2890 return TestStepResult(); |
|
2891 } |
|
2892 |
|
2893 TPtrC CCTSYIntegrationTestConferenceCallControl0011::GetTestStepName() |
|
2894 /** |
|
2895 * @return The test step name. |
|
2896 */ |
|
2897 { |
|
2898 return _L("CCTSYIntegrationTestConferenceCallControl0011"); |
|
2899 } |
|
2900 |
|
2901 |
|
2902 |
|
2903 CCTSYIntegrationTestConferenceCallControl0012::CCTSYIntegrationTestConferenceCallControl0012(CEtelSessionMgr& aEtelSessionMgr) |
|
2904 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
2905 /** |
|
2906 * Constructor. |
|
2907 */ |
|
2908 { |
|
2909 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0012::GetTestStepName()); |
|
2910 } |
|
2911 |
|
2912 CCTSYIntegrationTestConferenceCallControl0012::~CCTSYIntegrationTestConferenceCallControl0012() |
|
2913 /** |
|
2914 * Destructor. |
|
2915 */ |
|
2916 { |
|
2917 } |
|
2918 |
|
2919 TVerdict CCTSYIntegrationTestConferenceCallControl0012::doTestStepL() |
|
2920 /** |
|
2921 * @SYMTestCaseID BA-CTSY-INT-CONC-0012 |
|
2922 * @SYMFssID BA/CTSY/CONC-0012 |
|
2923 * @SYMTestCaseDesc Set up conference call again after a two party one is closed when one party hangs up. |
|
2924 * @SYMTestPriority High |
|
2925 * @SYMTestActions RMobileConferenceCall::CreateConference, RCall::Dial, RMobileConferenceCall::NotifyConferenceEvent, RMobileCall::NotifyMobileCallStatusChange, RMobileConferenceCall::NotifyConferenceStatusChange, RMobileConferenceCall::GetCaps, RMobileCall::GetMobileCallStatus, RMobileConferenceCall::GetConferenceStatus, RMobileConferenceCall::HangUp, RMobileConferenceCall::NotifyCapsChange |
|
2926 * @SYMTestExpectedResults Pass - Conference call can be created again. |
|
2927 * @SYMTestType CIT |
|
2928 * @SYMTestCaseDependencies live/automatic |
|
2929 * |
|
2930 * Reason for test: Verify conference call created. Verify conference call notifications complete correctly. |
|
2931 * |
|
2932 * @return - TVerdict code |
|
2933 */ |
|
2934 { |
|
2935 |
|
2936 // |
|
2937 // SET UP |
|
2938 // |
|
2939 |
|
2940 // Create a three party conference call (two remote parties). |
|
2941 // Make sure we are on the network |
|
2942 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
2943 |
|
2944 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL( phone ); |
|
2945 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
2946 |
|
2947 // Get the test numbers |
|
2948 TPtrC num1, num2; |
|
2949 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
2950 _L("Failed to obtain 1st number for test") ); |
|
2951 |
|
2952 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
2953 _L("Failed to obtain 2nd number for test") ); |
|
2954 // Get conference call subsession. |
|
2955 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
2956 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
2957 |
|
2958 // and the call objects |
|
2959 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
2960 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
2961 |
|
2962 // Create a three party conference call (two remote parties). |
|
2963 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
2964 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
2965 |
|
2966 // Hold 1st call |
|
2967 callStatus = HoldCallL(call1); |
|
2968 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
2969 |
|
2970 // Make second call |
|
2971 callStatus = MakeCallL(call2, num2); |
|
2972 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
2973 |
|
2974 // Create the conference |
|
2975 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
2976 CleanupStack::PushL(reqCreConfStatus); |
|
2977 |
|
2978 confCall.CreateConference(reqCreConfStatus); |
|
2979 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
2980 _L("RMobileConferenceCall::CreateConference timed out")); |
|
2981 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
2982 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
2983 |
|
2984 // |
|
2985 // SET UP END |
|
2986 // |
|
2987 |
|
2988 StartTest(); |
|
2989 |
|
2990 // |
|
2991 // TEST START |
|
2992 // |
|
2993 |
|
2994 |
|
2995 // Hang up call 1 in the conference call. |
|
2996 // Set up the notification for the call |
|
2997 TExtEtelRequestStatus notifyCallStatus(call1,EMobileCallNotifyMobileCallStatusChange); |
|
2998 CleanupStack::PushL(notifyCallStatus); |
|
2999 call1.NotifyMobileCallStatusChange( notifyCallStatus, callStatus ); |
|
3000 |
|
3001 // set up notification for the caps change |
|
3002 TExtEtelRequestStatus notifyCapsChangeStatus(confCall, EMobileConferenceCallNotifyCapsChange); |
|
3003 CleanupStack::PushL(notifyCapsChangeStatus); |
|
3004 |
|
3005 TUint32 confCallCaps; |
|
3006 confCall.NotifyCapsChange(notifyCapsChangeStatus, confCallCaps); |
|
3007 |
|
3008 // Setup the notification for the event |
|
3009 TExtEtelRequestStatus notifyConfEventStatus(confCall,EMobileConferenceCallNotifyConferenceEvent); |
|
3010 CleanupStack::PushL(notifyConfEventStatus); |
|
3011 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
3012 TName confEventCallName; |
|
3013 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
3014 |
|
3015 // Setup notification for the status change |
|
3016 TExtEtelRequestStatus notifyConfStatusChange(confCall, EMobileConferenceCallNotifyConferenceStatusChange); |
|
3017 CleanupStack::PushL(notifyConfStatusChange); |
|
3018 RMobileConferenceCall::TMobileConferenceStatus confStatus; |
|
3019 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
3020 |
|
3021 // Do the hangup |
|
3022 err = call1.HangUp(); |
|
3023 ASSERT_EQUALS(err, KErrNone, _L("RMobileCall::HangUp returned an error") ); |
|
3024 |
|
3025 // Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusDisconnecting -> EStatusIdle. |
|
3026 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange( call1, |
|
3027 notifyCallStatus, |
|
3028 callStatus, RMobileCall::EStatusDisconnecting, |
|
3029 KErrNone ); |
|
3030 ASSERT_EQUALS(callStatus, RMobileCall::EStatusDisconnecting, |
|
3031 _L("RMobileCall::NotifyMobileCallStatusChange returned incorrect status") ); |
|
3032 |
|
3033 call1.NotifyMobileCallStatusChange( notifyCallStatus, callStatus ); |
|
3034 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange( call1, |
|
3035 notifyCallStatus, |
|
3036 callStatus, RMobileCall::EStatusIdle, |
|
3037 KErrNone ); |
|
3038 ASSERT_EQUALS(callStatus, RMobileCall::EStatusIdle, |
|
3039 _L("RMobileCall::NotifyMobileCallStatusChange returned incorrect status") ); |
|
3040 |
|
3041 // Check RMobileCall::GetMobileCallStatus returns status of EStatusIdle. |
|
3042 err = call1.GetMobileCallStatus(callStatus); |
|
3043 ASSERT_EQUALS(err, KErrNone,_L("RMobileCall::GetMobileCallStatus returned an error")); |
|
3044 ASSERT_EQUALS(callStatus, RMobileCall::EStatusIdle, _L("RMobileCall::GetMobileCallStatus returned status not idle")); |
|
3045 |
|
3046 // === Conference should now terminate === |
|
3047 // === Check conference caps === |
|
3048 |
|
3049 // Check RMobileConferenceCall::NotifyCapsChange completes with caps of 0 |
|
3050 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyCapsChange(confCall, |
|
3051 notifyCapsChangeStatus, |
|
3052 confCallCaps, |
|
3053 0, |
|
3054 KNoUnwantedBits, |
|
3055 KErrNone); |
|
3056 |
|
3057 // Check RMobileConferenceCall::GetCaps returns caps of 0 |
|
3058 err = confCall.GetCaps(confCallCaps); |
|
3059 ASSERT_EQUALS(confCallCaps,(TUint32)0,_L("RMobileConferenceCall::NotifyCapsChange returned non-zero caps")); |
|
3060 |
|
3061 // === Check conference event === |
|
3062 |
|
3063 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceTerminated |
|
3064 // $CTSYKnownFailure defect id=10018 this notification is not delivered (times out) |
|
3065 |
|
3066 ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 10018); |
|
3067 /* |
|
3068 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( confCall, |
|
3069 notifyConfEventStatus, |
|
3070 confEvent,RMobileConferenceCall::EConferenceTerminated, |
|
3071 confEventCallName, |
|
3072 KErrNone); |
|
3073 |
|
3074 ASSERT_EQUALS(confEvent,RMobileConferenceCall::EConferenceTerminated, |
|
3075 _L("RMobileConferenceCall::NotifyConferenceEvent returned wrong event")); |
|
3076 */ |
|
3077 |
|
3078 // === Check conference status === |
|
3079 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceIdle |
|
3080 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
3081 notifyConfStatusChange, |
|
3082 confStatus,RMobileConferenceCall::EConferenceIdle, |
|
3083 KErrNone); |
|
3084 |
|
3085 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceIdle |
|
3086 err = confCall.GetConferenceStatus(confStatus); |
|
3087 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::GetConferenceStatus returned an error ")); |
|
3088 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceIdle, |
|
3089 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
3090 |
|
3091 // Dial a number that answers on call 1. |
|
3092 callStatus = MakeCallL(call1, num1); |
|
3093 ASSERT_EQUALS(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
3094 |
|
3095 // Create a conference. |
|
3096 // Setup notifications for caps change |
|
3097 confCall.NotifyCapsChange(notifyCapsChangeStatus, confCallCaps); |
|
3098 |
|
3099 // Setup notification for conference event |
|
3100 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
3101 |
|
3102 // Setup notification for conference status |
|
3103 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
3104 |
|
3105 // Create the conference |
|
3106 confCall.CreateConference(reqCreConfStatus); |
|
3107 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
3108 _L("RMobileConferenceCall::CreateConference timed out")); |
|
3109 ASSERT_EQUALS( reqCreConfStatus.Int(),KErrNone, |
|
3110 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
3111 |
|
3112 // === Check conference caps indicate conference can now be created === |
|
3113 // Check RMobileConferenceCall::NotifyCapsChange completes with caps in set of KCapsHangUp | KCapsSwap |
|
3114 // Check RMobileConferenceCall::NotifyCapsChange completes with caps NOT in set of KCapsCreate |
|
3115 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyCapsChange(confCall, |
|
3116 notifyCapsChangeStatus, |
|
3117 confCallCaps, |
|
3118 RMobileConferenceCall::KCapsHangUp | RMobileConferenceCall::KCapsSwap, |
|
3119 RMobileConferenceCall::KCapsCreate, |
|
3120 KErrNone); |
|
3121 |
|
3122 // Check RMobileConferenceCall::GetCaps returns caps in set of KCapsHangUp | KCapsSwap |
|
3123 // Check RMobileConferenceCall::GetCaps returns caps NOT in set of KCapsCreate |
|
3124 err = confCall.GetCaps(confCallCaps); |
|
3125 ASSERT_EQUALS(err, KErrNone,_L("RMobileConferenceCall::GetCaps returned error") ); |
|
3126 ASSERT_BITS_SET(confCallCaps, |
|
3127 RMobileConferenceCall::KCapsHangUp | RMobileConferenceCall::KCapsSwap, |
|
3128 RMobileConferenceCall::KCapsCreate, |
|
3129 _L("RMobileConferenceCall::NotifyCapsChange returned incorrect caps")); |
|
3130 |
|
3131 // === Check conference event === |
|
3132 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceBuilt |
|
3133 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( confCall, |
|
3134 notifyConfEventStatus, |
|
3135 confEvent,RMobileConferenceCall::EConferenceBuilt, |
|
3136 confEventCallName, |
|
3137 KErrNone); |
|
3138 |
|
3139 // === Check conference status === |
|
3140 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceActive |
|
3141 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
3142 notifyConfStatusChange, |
|
3143 confStatus,RMobileConferenceCall::EConferenceActive, |
|
3144 KErrNone); |
|
3145 |
|
3146 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
3147 err = confCall.GetConferenceStatus(confStatus); |
|
3148 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::GetConferenceStatus returned an error ")); |
|
3149 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceActive, |
|
3150 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
3151 |
|
3152 // Hang up conference call with RMobileConferenceCall::HangUp |
|
3153 TExtEtelRequestStatus reqHangupStatus(confCall, EMobileConferenceCallHangUp ); |
|
3154 CleanupStack::PushL(reqHangupStatus); |
|
3155 |
|
3156 confCall.HangUp(reqHangupStatus); |
|
3157 WaitForRequestWithTimeOut(reqHangupStatus,ETimeMedium); |
|
3158 |
|
3159 // |
|
3160 // TEST END |
|
3161 // |
|
3162 |
|
3163 StartCleanup(); |
|
3164 |
|
3165 // Hangup calls |
|
3166 call1.HangUp(); |
|
3167 call2.HangUp(); |
|
3168 |
|
3169 // reqHangupStatus |
|
3170 // notifyConfStatusChange |
|
3171 // notifyConfEventStatus |
|
3172 // notifyCapsChangeStatus |
|
3173 // notifyCallStatus |
|
3174 // reqCreConfStatus |
|
3175 CleanupStack::PopAndDestroy(6, &reqCreConfStatus); |
|
3176 |
|
3177 return TestStepResult(); |
|
3178 } |
|
3179 |
|
3180 TPtrC CCTSYIntegrationTestConferenceCallControl0012::GetTestStepName() |
|
3181 /** |
|
3182 * @return The test step name. |
|
3183 */ |
|
3184 { |
|
3185 return _L("CCTSYIntegrationTestConferenceCallControl0012"); |
|
3186 } |
|
3187 |
|
3188 |
|
3189 |
|
3190 CCTSYIntegrationTestConferenceCallControl0013::CCTSYIntegrationTestConferenceCallControl0013(CEtelSessionMgr& aEtelSessionMgr) |
|
3191 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
3192 /** |
|
3193 * Constructor. |
|
3194 */ |
|
3195 { |
|
3196 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0013::GetTestStepName()); |
|
3197 } |
|
3198 |
|
3199 CCTSYIntegrationTestConferenceCallControl0013::~CCTSYIntegrationTestConferenceCallControl0013() |
|
3200 /** |
|
3201 * Destructor. |
|
3202 */ |
|
3203 { |
|
3204 } |
|
3205 |
|
3206 TVerdict CCTSYIntegrationTestConferenceCallControl0013::doTestStepL() |
|
3207 /** |
|
3208 * @SYMTestCaseID BA-CTSY-INT-CONC-0013 |
|
3209 * @SYMFssID BA/CTSY/CONC-0013 |
|
3210 * @SYMTestCaseDesc Create a five remote party conference call. |
|
3211 * @SYMTestPriority High |
|
3212 * @SYMTestActions RMobileConferenceCall::GetMobileCallInfo, RMobileCall::GetMobileCallStatus, RMobileCall::GetMobileCallInfo, RMobileCall::NotifyMobileCallStatusChange, RCall::GetInfo, RMobileConferenceCall::AddCall, RMobileConferenceCall::EnumerateCalls, RMobileConferenceCall::GetConferenceStatus, RMobileConferenceCall::Swap |
|
3213 * @SYMTestExpectedResults Pass - Five party conference call created. |
|
3214 * @SYMTestType CIT |
|
3215 * @SYMTestCaseDependencies live/automatic |
|
3216 * |
|
3217 * Reason for test: Verify calls can be added to conference call. Verify conference call notifications complete correctly. Verify call info correct. |
|
3218 * |
|
3219 * @return - TVerdict code |
|
3220 */ |
|
3221 { |
|
3222 |
|
3223 // |
|
3224 // SET UP |
|
3225 // |
|
3226 // Get the test numbers |
|
3227 TPtrC num1, num2, num3, num4, num5; |
|
3228 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
3229 _L("Failed to obtain 1st number for test") ); |
|
3230 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
3231 _L("Failed to obtain 2nd number for test") ); |
|
3232 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber3, num3), |
|
3233 _L("Failed to obtain 3rd number for test") ); |
|
3234 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber4, num4), |
|
3235 _L("Failed to obtain 4th number for test") ); |
|
3236 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber5, num5), |
|
3237 _L("Failed to obtain 5th number for test") ); |
|
3238 |
|
3239 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
3240 |
|
3241 // Get conference call subsession. |
|
3242 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
3243 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
3244 |
|
3245 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
3246 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
3247 |
|
3248 // Make sure we are on the network |
|
3249 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL( phone ); |
|
3250 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
3251 |
|
3252 // Create a three party conference call (two remote parties). |
|
3253 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
3254 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
3255 |
|
3256 callStatus = HoldCallL(call1); |
|
3257 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
3258 |
|
3259 callStatus = MakeCallL(call2, num2); |
|
3260 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
3261 |
|
3262 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
3263 CleanupStack::PushL(reqCreConfStatus); |
|
3264 |
|
3265 confCall.CreateConference(reqCreConfStatus); |
|
3266 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
3267 _L("RMobileConferenceCall::CreateConference timed out")); |
|
3268 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
3269 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
3270 |
|
3271 // Get call 3. |
|
3272 RMobileCall& call3 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall3 ); |
|
3273 // Get call 4 |
|
3274 RMobileCall& call4 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall4 ); |
|
3275 // Get call 5. |
|
3276 RMobileCall& call5 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall5 ); |
|
3277 |
|
3278 |
|
3279 // |
|
3280 // SET UP END |
|
3281 // |
|
3282 |
|
3283 StartTest(); |
|
3284 |
|
3285 // |
|
3286 // TEST START |
|
3287 // |
|
3288 |
|
3289 // Add call 3 to the conference using RMobileConferenceCall::AddCall |
|
3290 // - and also perform checks specified in test spec |
|
3291 AddCallTestStepL( confCall, call3, num3, 3 ); |
|
3292 TEST_CHECK_POINT_L(_L("Adding call3 failed")); |
|
3293 |
|
3294 // Repeat dialling a call on call 4 and 5 and adding those |
|
3295 // to the conference (RMobileConferenceCall::EnumerateCalls should return aCount which is one higher than |
|
3296 // previous call each time). |
|
3297 // Test and checks done by function |
|
3298 AddCallTestStepL( confCall, call4, num4, 4 ); |
|
3299 TEST_CHECK_POINT_L(_L("Adding call4 failed")); |
|
3300 AddCallTestStepL( confCall, call5, num5, 5 ); |
|
3301 TEST_CHECK_POINT_L(_L("Adding call5 failed")); |
|
3302 |
|
3303 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
3304 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
3305 ASSERT_EQUALS(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
3306 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
3307 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
3308 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
3309 |
|
3310 |
|
3311 // For each call in the conference check RMobileConferenceCall::GetMobileCallInfo |
|
3312 CheckConfCallInfo( confCall, num1, 1 ); |
|
3313 CheckConfCallInfo( confCall, num2, 2 ); |
|
3314 CheckConfCallInfo( confCall, num3, 3 ); |
|
3315 CheckConfCallInfo( confCall, num4, 4 ); |
|
3316 CheckConfCallInfo( confCall, num5, 5 ); |
|
3317 |
|
3318 // |
|
3319 // TEST END |
|
3320 // |
|
3321 |
|
3322 StartCleanup(); |
|
3323 |
|
3324 TExtEtelRequestStatus reqHangupStatus(confCall, EMobileConferenceCallHangUp ); |
|
3325 CleanupStack::PushL(reqHangupStatus); |
|
3326 confCall.HangUp(reqHangupStatus); |
|
3327 WaitForRequestWithTimeOut(reqHangupStatus,ETimeMedium); |
|
3328 |
|
3329 // Hangup calls |
|
3330 call1.HangUp(); |
|
3331 call2.HangUp(); |
|
3332 call3.HangUp(); |
|
3333 call4.HangUp(); |
|
3334 call5.HangUp(); |
|
3335 |
|
3336 // reqHangupStatus |
|
3337 // reqCreConfStatus |
|
3338 CleanupStack::PopAndDestroy(2,&reqCreConfStatus); |
|
3339 |
|
3340 return TestStepResult(); |
|
3341 } |
|
3342 |
|
3343 |
|
3344 /** |
|
3345 * Add a call to the conference call |
|
3346 * @param aConfCall Conference call object |
|
3347 * @param aCall Call object to use |
|
3348 * @param aNumber Number to dial |
|
3349 * @param aCallCount 1-based call number |
|
3350 */ |
|
3351 |
|
3352 void CCTSYIntegrationTestConferenceCallControl0013::AddCallTestStepL( RMobileConferenceCall& aConfCall, |
|
3353 RMobileCall& aCall, TPtrC& aNumber, |
|
3354 TInt aCallCount ) |
|
3355 { |
|
3356 |
|
3357 DEBUG_PRINTF2(_L("Performing test step adding call %d"), aCallCount ); |
|
3358 |
|
3359 // Setup the notification for the swap |
|
3360 TExtEtelRequestStatus notifyConfEventStatus(aConfCall,EMobileConferenceCallNotifyConferenceEvent); |
|
3361 CleanupStack::PushL( notifyConfEventStatus ); |
|
3362 |
|
3363 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
3364 TName confEventCallName; |
|
3365 |
|
3366 aConfCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
3367 |
|
3368 // Swap the conference call. |
|
3369 TExtEtelRequestStatus reqSwapConfStatus(aConfCall,EMobileConferenceCallSwap); |
|
3370 CleanupStack::PushL(reqSwapConfStatus); |
|
3371 |
|
3372 aConfCall.Swap(reqSwapConfStatus); |
|
3373 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqSwapConfStatus,ETimeShort),KErrNone, |
|
3374 _L("RMobileConferenceCall::Swap timed out")); |
|
3375 ASSERT_EQUALS( reqSwapConfStatus.Int(),KErrNone, |
|
3376 _L("RMobileConferenceCall::Swap returned error")); |
|
3377 |
|
3378 // === Check conference event === |
|
3379 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceSwapped |
|
3380 |
|
3381 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( aConfCall, |
|
3382 notifyConfEventStatus, |
|
3383 confEvent,RMobileConferenceCall::EConferenceSwapped, |
|
3384 confEventCallName, |
|
3385 KErrNone); |
|
3386 |
|
3387 ASSERT_EQUALS( confEvent, RMobileConferenceCall::EConferenceSwapped, |
|
3388 _L("RMobileConferenceCall::Swap returned unexpected event")); |
|
3389 |
|
3390 // Dial a number that answers on call |
|
3391 // Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusDialling -> EStatusConnecting -> EStatusConnected. |
|
3392 // Check RMobileCall::GetMobileCallStatus returns status of EStatusConnected. |
|
3393 RMobileCall::TMobileCallStatus callStatus = MakeCallL(aCall, aNumber); |
|
3394 ASSERT_EQUALS(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call")); |
|
3395 |
|
3396 // Wait a bit so that the duration has a chance to be > 0 |
|
3397 User::After(2*KOneSecond); |
|
3398 |
|
3399 // === Check call info === |
|
3400 RCall::TCallInfo callInfo; |
|
3401 TInt err = aCall.GetInfo(callInfo); |
|
3402 ASSERT_EQUALS( err, KErrNone, _L("RCall::GetInfo returned error")); |
|
3403 |
|
3404 // Check RCall::GetInfo for call returns valid call name. |
|
3405 ASSERT_TRUE(callInfo.iCallName.Length() > 0, _L("RCall::GetInfo returned empty iCallName")); |
|
3406 |
|
3407 // Check RCall::GetInfo for call returns valid voice line name. |
|
3408 ASSERT_TRUE(callInfo.iLineName.Length() > 0, _L("RCall::GetInfo returned empty iLineName")); |
|
3409 |
|
3410 // Check RCall::GetInfo for call returns hook status of EHookStatusOff. |
|
3411 // $CTSYProblem Does not return EHookStatusOff, returns EHookStatusUnknown |
|
3412 |
|
3413 ASSERT_EQUALS(callInfo.iHookStatus, RCall::EHookStatusUnknown, |
|
3414 _L("RCall::GetInfo hook status not EHookStatusUnknown")); |
|
3415 |
|
3416 // Check RCall::GetInfo for call returns call status of EStatusConnected. |
|
3417 ASSERT_EQUALS(callInfo.iStatus, RCall::EStatusConnected, |
|
3418 _L("RCall::GetInfo returns call status not EStatusConnected")); |
|
3419 |
|
3420 // Check RCall::GetInfo for call returns call duration of > 0. |
|
3421 ASSERT_TRUE(callInfo.iDuration.Int() > 0, _L("RCall::GetInfo returned 0 duration")); |
|
3422 |
|
3423 // Check RMobileCall::GetMobileCallInfo for call returns valid line name. |
|
3424 RMobileCall::TMobileCallInfoV3 mobileCallInfo; |
|
3425 RMobileCall::TMobileCallInfoV3Pckg mobileCallInfoPkg(mobileCallInfo); |
|
3426 err = aCall.GetMobileCallInfo(mobileCallInfoPkg); |
|
3427 ASSERT_EQUALS( err, KErrNone, _L("RMobileCall::GetMobileCallInfo returned an error")); |
|
3428 |
|
3429 // Check RMobileCall::GetMobileCallInfo for call returns iValid > 0. |
|
3430 ASSERT_TRUE(mobileCallInfo.iValid > 0, _L("RMobileCall::GetMobileCallInfo returned zero iValid")); |
|
3431 |
|
3432 // Check RMobileCall::GetMobileCallInfo for call returns data for attributes marked as valid in iValid. |
|
3433 if( mobileCallInfo.iValid & RMobileCall::KCallStartTime ) |
|
3434 { |
|
3435 ASSERT_TRUE(mobileCallInfo.iStartTime.Year() > 0, |
|
3436 _L("RMobileCall::GetMobileCallInfo returned invalid iStartTime")); |
|
3437 } |
|
3438 |
|
3439 if( mobileCallInfo.iValid & RMobileCall::KCallDuration ) |
|
3440 { |
|
3441 ASSERT_TRUE(mobileCallInfo.iDuration.Int() > 0, |
|
3442 _L("RMobileCall::GetMobileCallInfo returned invalid iDuration")); |
|
3443 } |
|
3444 |
|
3445 |
|
3446 if( mobileCallInfo.iValid & RMobileCall::KCallId ) |
|
3447 { |
|
3448 ASSERT_TRUE(mobileCallInfo.iCallId != -1, |
|
3449 _L("RMobileCall::GetMobileCallInfo returned invalid iCallId")); |
|
3450 } |
|
3451 |
|
3452 if( mobileCallInfo.iValid & RMobileCall::KCallRemoteParty ) |
|
3453 { |
|
3454 ASSERT_TRUE(mobileCallInfo.iRemoteParty.iDirection > 0, |
|
3455 _L("RMobileCall::GetMobileCallInfo returned invalid iRemoteParty")); |
|
3456 } |
|
3457 |
|
3458 if( mobileCallInfo.iValid & RMobileCall::KCallDialledParty ) |
|
3459 { |
|
3460 ASSERT_TRUE(mobileCallInfo.iDialledParty.iTelNumber.Length() > 0, |
|
3461 _L("RMobileCall::GetMobileCallInfo returned invalid iDialledParty")); |
|
3462 } |
|
3463 |
|
3464 if( mobileCallInfo.iValid & RMobileCall::KCallExitCode ) |
|
3465 { |
|
3466 // $CTSYProblem CTSY returns KErrNone not KErrNotFound as suggested by the documentation |
|
3467 ASSERT_EQUALS(mobileCallInfo.iExitCode, KErrNone, |
|
3468 _L("RMobileCall::GetMobileCallInfo returned invalid iExitCode")); |
|
3469 } |
|
3470 |
|
3471 if( mobileCallInfo.iValid & RMobileCall::KCallEmergency ) |
|
3472 { |
|
3473 ASSERT_TRUE( !mobileCallInfo.iEmergency, |
|
3474 _L("RMobileCall::GetMobileCallInfo returned invalid iEmergency")); |
|
3475 } |
|
3476 |
|
3477 if( mobileCallInfo.iValid & RMobileCall::KCallForwarded ) |
|
3478 { |
|
3479 ASSERT_TRUE( !mobileCallInfo.iForwarded, |
|
3480 _L("RMobileCall::GetMobileCallInfo returned invalid iForwarded")); |
|
3481 } |
|
3482 |
|
3483 if( mobileCallInfo.iValid & RMobileCall::KCallPrivacy ) |
|
3484 { |
|
3485 ASSERT_TRUE( (mobileCallInfo.iPrivacy == RMobilePhone::EPrivacyUnspecified) || |
|
3486 (mobileCallInfo.iPrivacy == RMobilePhone::EPrivacyOff) || |
|
3487 (mobileCallInfo.iPrivacy == RMobilePhone::EPrivacyOn), |
|
3488 _L("RMobileCall::GetMobileCallInfo returned invalid iPrivacy")); |
|
3489 } |
|
3490 |
|
3491 if( mobileCallInfo.iValid & RMobileCall::KCallTch ) |
|
3492 { |
|
3493 ASSERT_TRUE( (mobileCallInfo.iTch == RMobileCall::ETchUnknown) || |
|
3494 (mobileCallInfo.iTch == RMobileCall::ETchDigital) || |
|
3495 (mobileCallInfo.iTch == RMobileCall::ETchAnalog), |
|
3496 _L("RMobileCall::GetMobileCallInfo returned invalid iTch")); |
|
3497 } |
|
3498 |
|
3499 if( mobileCallInfo.iValid & RMobileCall::KCallAlternating ) |
|
3500 { |
|
3501 ASSERT_TRUE( (mobileCallInfo.iAlternatingCall == RMobilePhone::EAlternatingModeUnspecified) || |
|
3502 (mobileCallInfo.iAlternatingCall == RMobilePhone::EAlternatingModeSingle) || |
|
3503 (mobileCallInfo.iAlternatingCall == RMobilePhone::EAlternatingModeVoiceData) || |
|
3504 (mobileCallInfo.iAlternatingCall == RMobilePhone::EAlternatingModeVoiceThenData) || |
|
3505 (mobileCallInfo.iAlternatingCall == RMobilePhone::EAlternatingModeVoiceFax), |
|
3506 _L("RMobileCall::GetMobileCallInfo returned invalid iAlternatingCall")); |
|
3507 } |
|
3508 |
|
3509 // V3 |
|
3510 if( mobileCallInfo.iValid & RMobileCall::KCallSecurity ) |
|
3511 { |
|
3512 ASSERT_TRUE( (mobileCallInfo.iSecurity == RMobilePhone::ECipheringOff) || |
|
3513 (mobileCallInfo.iSecurity == RMobilePhone::ECipheringGSM) || |
|
3514 (mobileCallInfo.iSecurity == RMobilePhone::ECipheringWCDMA) || |
|
3515 (mobileCallInfo.iSecurity == RMobilePhone::ECipheringCDMA), |
|
3516 _L("RMobileCall::GetMobileCallInfo returned invalid iSecurity")); |
|
3517 } |
|
3518 |
|
3519 // Check RMobileCall::GetMobileCallInfo for call returns valid line name. |
|
3520 ASSERT_TRUE(mobileCallInfo.iLineName.Length() > 0, _L("RMobileCall::GetMobileCallInfo returned zero length line name")); |
|
3521 |
|
3522 // Set up notification |
|
3523 aConfCall.NotifyConferenceEvent( notifyConfEventStatus, confEvent, confEventCallName ); |
|
3524 |
|
3525 // Add call to the conference using RMobileConferenceCall::AddCall |
|
3526 TExtEtelRequestStatus reqAddCallStatus(aConfCall,EMobileConferenceCallAddCall); |
|
3527 CleanupStack::PushL(reqAddCallStatus); |
|
3528 aConfCall.AddCall(reqAddCallStatus,callInfo.iCallName); |
|
3529 |
|
3530 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqAddCallStatus,ETimeShort),KErrNone, |
|
3531 _L("RMobileConferenceCall::AddCall timed out")); |
|
3532 ASSERT_EQUALS( reqAddCallStatus.Int(),KErrNone, |
|
3533 _L("RMobileConferenceCall::AddCall returned error")); |
|
3534 |
|
3535 // === Check conference event and status === |
|
3536 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceCallAdded |
|
3537 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( aConfCall, |
|
3538 notifyConfEventStatus, |
|
3539 confEvent,RMobileConferenceCall::EConferenceCallAdded, |
|
3540 confEventCallName, |
|
3541 KErrNone); |
|
3542 |
|
3543 // Check RMobileConferenceCall::NotifyConferenceEvent completes with aCallName = callname of call |
|
3544 ASSERT_EQUALS_DES16(confEventCallName,callInfo.iCallName, |
|
3545 _L("RMobileConferenceCall::NotifyConferenceEvent did not return matching call name")); |
|
3546 |
|
3547 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
3548 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
3549 ASSERT_EQUALS(aConfCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
3550 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
3551 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
3552 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
3553 |
|
3554 // Check RMobileConferenceCall::EnumerateCalls returns aCount |
|
3555 TInt confCallCount; |
|
3556 ASSERT_EQUALS( aConfCall.EnumerateCalls(confCallCount), KErrNone, |
|
3557 _L("RMobileConferenceCall::EnumerateCalls returned an error") ); |
|
3558 |
|
3559 ASSERT_EQUALS( confCallCount, aCallCount, |
|
3560 _L("RMobileConferenceCall::EnumerateCalls returned bad count") ); |
|
3561 |
|
3562 // reqAddCallStatus |
|
3563 // reqSwapConfStatus |
|
3564 // notifyConfEventStatus |
|
3565 CleanupStack::PopAndDestroy(3,¬ifyConfEventStatus); |
|
3566 |
|
3567 } |
|
3568 |
|
3569 |
|
3570 TPtrC CCTSYIntegrationTestConferenceCallControl0013::GetTestStepName() |
|
3571 /** |
|
3572 * @return The test step name. |
|
3573 */ |
|
3574 { |
|
3575 return _L("CCTSYIntegrationTestConferenceCallControl0013"); |
|
3576 } |
|
3577 |
|
3578 |
|
3579 |
|
3580 CCTSYIntegrationTestConferenceCallControl0014::CCTSYIntegrationTestConferenceCallControl0014(CEtelSessionMgr& aEtelSessionMgr) |
|
3581 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
3582 /** |
|
3583 * Constructor. |
|
3584 */ |
|
3585 { |
|
3586 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0014::GetTestStepName()); |
|
3587 } |
|
3588 |
|
3589 CCTSYIntegrationTestConferenceCallControl0014::~CCTSYIntegrationTestConferenceCallControl0014() |
|
3590 /** |
|
3591 * Destructor. |
|
3592 */ |
|
3593 { |
|
3594 } |
|
3595 |
|
3596 TVerdict CCTSYIntegrationTestConferenceCallControl0014::doTestStepL() |
|
3597 /** |
|
3598 * @SYMTestCaseID BA-CTSY-INT-CONC-0014 |
|
3599 * @SYMFssID BA/CTSY/CONC-0014 |
|
3600 * @SYMTestCaseDesc Swap five party conference call. |
|
3601 * @SYMTestPriority High |
|
3602 * @SYMTestActions RMobileConferenceCall::NotifyConferenceStatusChange, RMobileConferenceCall::Swap, RMobileConferenceCall::GetConferenceStatus, RMobileConferenceCall::HangUp |
|
3603 * @SYMTestExpectedResults Pass - Conference call swapped. |
|
3604 * @SYMTestType CIT |
|
3605 * @SYMTestCaseDependencies live/automatic |
|
3606 * |
|
3607 * Reason for test: Verify conference call swapped. Verify conference call notifications complete correctly. |
|
3608 * |
|
3609 * @return - TVerdict code |
|
3610 */ |
|
3611 { |
|
3612 |
|
3613 // |
|
3614 // SET UP |
|
3615 // |
|
3616 |
|
3617 // Create basic 5 party conference call. |
|
3618 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
3619 |
|
3620 // Make sure we are on the network |
|
3621 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL( phone ); |
|
3622 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
3623 |
|
3624 // Get the test numbers |
|
3625 TPtrC num1, num2, num3, num4, num5; |
|
3626 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
3627 _L("Failed to obtain 1st number for test") ); |
|
3628 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
3629 _L("Failed to obtain 2nd number for test") ); |
|
3630 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber3, num3), |
|
3631 _L("Failed to obtain 3rd number for test") ); |
|
3632 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber4, num4), |
|
3633 _L("Failed to obtain 4th number for test") ); |
|
3634 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber5, num5), |
|
3635 _L("Failed to obtain 5th number for test") ); |
|
3636 |
|
3637 // Get conference call subsession. |
|
3638 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
3639 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
3640 |
|
3641 // and the call objects |
|
3642 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
3643 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
3644 RMobileCall& call3 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall3 ); |
|
3645 RMobileCall& call4 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall4 ); |
|
3646 RMobileCall& call5 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall5 ); |
|
3647 |
|
3648 // Create a three party conference call (two remote parties). |
|
3649 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
3650 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
3651 |
|
3652 // Hold 1st call |
|
3653 callStatus = HoldCallL(call1); |
|
3654 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
3655 |
|
3656 // Make second call |
|
3657 callStatus = MakeCallL(call2, num2); |
|
3658 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
3659 |
|
3660 // Create the conference |
|
3661 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
3662 CleanupStack::PushL(reqCreConfStatus); |
|
3663 |
|
3664 confCall.CreateConference(reqCreConfStatus); |
|
3665 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
3666 _L("RMobileConferenceCall::CreateConference timed out")); |
|
3667 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
3668 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
3669 |
|
3670 // Add the other calls |
|
3671 AddCallToConferenceL( confCall, call3, num3, 3 ); |
|
3672 AddCallToConferenceL( confCall, call4, num4, 4 ); |
|
3673 AddCallToConferenceL( confCall, call5, num5, 5 ); |
|
3674 |
|
3675 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
3676 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
3677 CHECK_EQUALS_L(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
3678 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
3679 CHECK_EQUALS_L( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
3680 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
3681 |
|
3682 // |
|
3683 // SET UP END |
|
3684 // |
|
3685 |
|
3686 StartTest(); |
|
3687 |
|
3688 // |
|
3689 // TEST START |
|
3690 // |
|
3691 |
|
3692 // Swap the conference call with RMobileConferenceCall::Swap |
|
3693 // Setup the notification for the swap |
|
3694 TExtEtelRequestStatus notifyConfEventStatus(confCall,EMobileConferenceCallNotifyConferenceEvent); |
|
3695 CleanupStack::PushL( notifyConfEventStatus ); |
|
3696 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
3697 TName confEventCallName; |
|
3698 |
|
3699 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
3700 |
|
3701 // set up the notification for the status change |
|
3702 TExtEtelRequestStatus notifyConfStatusChange(confCall, EMobileConferenceCallNotifyConferenceStatusChange); |
|
3703 CleanupStack::PushL(notifyConfStatusChange); |
|
3704 RMobileConferenceCall::TMobileConferenceStatus confStatus; |
|
3705 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
3706 |
|
3707 TExtEtelRequestStatus reqSwapConfStatus(confCall,EMobileConferenceCallSwap); |
|
3708 CleanupStack::PushL(reqSwapConfStatus); |
|
3709 |
|
3710 // Do the swap |
|
3711 confCall.Swap(reqSwapConfStatus); |
|
3712 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqSwapConfStatus,ETimeShort),KErrNone, |
|
3713 _L("RMobileConferenceCall::Swap timed out")); |
|
3714 ASSERT_EQUALS( reqSwapConfStatus.Int(),KErrNone, |
|
3715 _L("RMobileConferenceCall::Swap returned error")); |
|
3716 TEST_CHECK_POINT_L(_L("RMobileConferenceCall::Swap failed")); |
|
3717 |
|
3718 // === Check conference event === |
|
3719 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceSwapped |
|
3720 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( confCall, |
|
3721 notifyConfEventStatus, |
|
3722 confEvent,RMobileConferenceCall::EConferenceSwapped, |
|
3723 confEventCallName, |
|
3724 KErrNone); |
|
3725 // Logging |
|
3726 ASSERT_EQUALS( confEvent, RMobileConferenceCall::EConferenceSwapped, |
|
3727 _L("RMobileConferenceCall::Swap returned unexpected event")); |
|
3728 |
|
3729 // === Check conference status === |
|
3730 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceHold |
|
3731 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
3732 notifyConfStatusChange, |
|
3733 confStatus,RMobileConferenceCall::EConferenceHold, |
|
3734 KErrNone); |
|
3735 |
|
3736 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceHold |
|
3737 err = confCall.GetConferenceStatus(confStatus); |
|
3738 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::GetConferenceStatus returned an error ")); |
|
3739 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceHold, |
|
3740 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
3741 |
|
3742 // Hang up conference call with RMobileConferenceCall::HangUp |
|
3743 |
|
3744 TExtEtelRequestStatus reqHangupStatus(confCall, EMobileConferenceCallHangUp ); |
|
3745 CleanupStack::PushL(reqHangupStatus); |
|
3746 confCall.HangUp(reqHangupStatus); |
|
3747 WaitForRequestWithTimeOut(reqHangupStatus,ETimeMedium); |
|
3748 |
|
3749 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceIdle |
|
3750 err = confCall.GetConferenceStatus(confStatus); |
|
3751 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceIdle, |
|
3752 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
3753 |
|
3754 // |
|
3755 // TEST END |
|
3756 // |
|
3757 |
|
3758 StartCleanup(); |
|
3759 |
|
3760 // Hangup calls |
|
3761 call1.HangUp(); |
|
3762 call2.HangUp(); |
|
3763 call3.HangUp(); |
|
3764 call4.HangUp(); |
|
3765 call5.HangUp(); |
|
3766 |
|
3767 // reqHangupStatus |
|
3768 // reqSwapConfStatus |
|
3769 // notifyConfStatusChange |
|
3770 // notifyConfEventStatus |
|
3771 // reqCreConfStatus |
|
3772 CleanupStack::PopAndDestroy(5,&reqCreConfStatus); |
|
3773 |
|
3774 return TestStepResult(); |
|
3775 } |
|
3776 |
|
3777 TPtrC CCTSYIntegrationTestConferenceCallControl0014::GetTestStepName() |
|
3778 /** |
|
3779 * @return The test step name. |
|
3780 */ |
|
3781 { |
|
3782 return _L("CCTSYIntegrationTestConferenceCallControl0014"); |
|
3783 } |
|
3784 |
|
3785 |
|
3786 |
|
3787 CCTSYIntegrationTestConferenceCallControl0015::CCTSYIntegrationTestConferenceCallControl0015(CEtelSessionMgr& aEtelSessionMgr) |
|
3788 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
3789 /** |
|
3790 * Constructor. |
|
3791 */ |
|
3792 { |
|
3793 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0015::GetTestStepName()); |
|
3794 } |
|
3795 |
|
3796 CCTSYIntegrationTestConferenceCallControl0015::~CCTSYIntegrationTestConferenceCallControl0015() |
|
3797 /** |
|
3798 * Destructor. |
|
3799 */ |
|
3800 { |
|
3801 } |
|
3802 |
|
3803 TVerdict CCTSYIntegrationTestConferenceCallControl0015::doTestStepL() |
|
3804 /** |
|
3805 * @SYMTestCaseID BA-CTSY-INT-CONC-0015 |
|
3806 * @SYMFssID BA/CTSY/CONC-0015 |
|
3807 * @SYMTestCaseDesc Swap five party conference call, then swap it again. |
|
3808 * @SYMTestPriority High |
|
3809 * @SYMTestActions RMobileConferenceCall::NotifyConferenceStatusChange, RMobileConferenceCall::Swap, RMobileConferenceCall::GetConferenceStatus, RMobileConferenceCall::HangUp |
|
3810 * @SYMTestExpectedResults Pass - Conference call swapped. |
|
3811 * @SYMTestType CIT |
|
3812 * @SYMTestCaseDependencies live/automatic |
|
3813 * |
|
3814 * Reason for test: Verify conference call swapped. Verify conference call notifications complete correctly. |
|
3815 * |
|
3816 * @return - TVerdict code |
|
3817 */ |
|
3818 { |
|
3819 |
|
3820 // |
|
3821 // SET UP |
|
3822 // |
|
3823 |
|
3824 // Create basic 5 party conference call. |
|
3825 // Make sure we are on the network |
|
3826 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
3827 |
|
3828 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL( phone ); |
|
3829 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
3830 |
|
3831 // Get the test numbers |
|
3832 TPtrC num1, num2, num3, num4, num5; |
|
3833 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
3834 _L("Failed to obtain 1st number for test") ); |
|
3835 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
3836 _L("Failed to obtain 2nd number for test") ); |
|
3837 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber3, num3), |
|
3838 _L("Failed to obtain 3rd number for test") ); |
|
3839 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber4, num4), |
|
3840 _L("Failed to obtain 4th number for test") ); |
|
3841 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber5, num5), |
|
3842 _L("Failed to obtain 5th number for test") ); |
|
3843 |
|
3844 // Get conference call subsession. |
|
3845 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
3846 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
3847 |
|
3848 // and the call objects |
|
3849 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
3850 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
3851 RMobileCall& call3 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall3 ); |
|
3852 RMobileCall& call4 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall4 ); |
|
3853 RMobileCall& call5 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall5 ); |
|
3854 |
|
3855 // Create a three party conference call (two remote parties). |
|
3856 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
3857 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
3858 |
|
3859 // Hold 1st call |
|
3860 callStatus = HoldCallL(call1); |
|
3861 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
3862 |
|
3863 // Make second call |
|
3864 callStatus = MakeCallL(call2, num2); |
|
3865 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
3866 |
|
3867 // Create the conference |
|
3868 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
3869 CleanupStack::PushL(reqCreConfStatus); |
|
3870 |
|
3871 confCall.CreateConference(reqCreConfStatus); |
|
3872 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
3873 _L("RMobileConferenceCall::CreateConference timed out")); |
|
3874 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
3875 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
3876 |
|
3877 // Add the other calls |
|
3878 AddCallToConferenceL( confCall, call3, num3, 3 ); |
|
3879 AddCallToConferenceL( confCall, call4, num4, 4 ); |
|
3880 AddCallToConferenceL( confCall, call5, num5, 5 ); |
|
3881 |
|
3882 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
3883 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
3884 CHECK_EQUALS_L(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
3885 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
3886 CHECK_EQUALS_L( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
3887 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
3888 |
|
3889 // |
|
3890 // SET UP END |
|
3891 // |
|
3892 |
|
3893 StartTest(); |
|
3894 |
|
3895 // |
|
3896 // TEST START |
|
3897 // |
|
3898 |
|
3899 // Swap the conference call with RMobileConferenceCall::Swap |
|
3900 // Setup the notification for the swap |
|
3901 TExtEtelRequestStatus notifyConfEventStatus(confCall,EMobileConferenceCallNotifyConferenceEvent); |
|
3902 CleanupStack::PushL( notifyConfEventStatus ); |
|
3903 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
3904 TName confEventCallName; |
|
3905 |
|
3906 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
3907 |
|
3908 // set up the notification for the status change |
|
3909 TExtEtelRequestStatus notifyConfStatusChange(confCall, EMobileConferenceCallNotifyConferenceStatusChange); |
|
3910 CleanupStack::PushL(notifyConfStatusChange); |
|
3911 RMobileConferenceCall::TMobileConferenceStatus confStatus; |
|
3912 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
3913 |
|
3914 TExtEtelRequestStatus reqSwapConfStatus(confCall,EMobileConferenceCallSwap); |
|
3915 CleanupStack::PushL(reqSwapConfStatus); |
|
3916 |
|
3917 // Do the swap |
|
3918 confCall.Swap(reqSwapConfStatus); |
|
3919 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqSwapConfStatus,ETimeShort),KErrNone, |
|
3920 _L("RMobileConferenceCall::Swap timed out")); |
|
3921 ASSERT_EQUALS( reqSwapConfStatus.Int(),KErrNone, |
|
3922 _L("RMobileConferenceCall::Swap returned error")); |
|
3923 TEST_CHECK_POINT_L(_L("RMobileConferenceCall::Swap failed")); |
|
3924 |
|
3925 // === Check conference event === |
|
3926 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceSwapped |
|
3927 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( confCall, |
|
3928 notifyConfEventStatus, |
|
3929 confEvent,RMobileConferenceCall::EConferenceSwapped, |
|
3930 confEventCallName, |
|
3931 KErrNone); |
|
3932 // Logging |
|
3933 ASSERT_EQUALS( confEvent, RMobileConferenceCall::EConferenceSwapped, |
|
3934 _L("RMobileConferenceCall::Swap returned unexpected event")); |
|
3935 |
|
3936 // === Check conference status === |
|
3937 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceHold |
|
3938 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
3939 notifyConfStatusChange, |
|
3940 confStatus,RMobileConferenceCall::EConferenceHold, |
|
3941 KErrNone); |
|
3942 |
|
3943 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceHold |
|
3944 err = confCall.GetConferenceStatus(confStatus); |
|
3945 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::GetConferenceStatus returned error")); |
|
3946 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceHold, |
|
3947 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
3948 |
|
3949 |
|
3950 |
|
3951 // Swap the conference call with RMobileConferenceCall::Swap |
|
3952 // repost notifications |
|
3953 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
3954 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
3955 |
|
3956 // do the swap |
|
3957 confCall.Swap(reqSwapConfStatus); |
|
3958 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqSwapConfStatus,ETimeShort),KErrNone, |
|
3959 _L("RMobileConferenceCall::Swap timed out")); |
|
3960 ASSERT_EQUALS( reqSwapConfStatus.Int(),KErrNone, |
|
3961 _L("RMobileConferenceCall::Swap returned error")); |
|
3962 TEST_CHECK_POINT_L(_L("RMobileConferenceCall::Swap failed")); |
|
3963 |
|
3964 // === Check conference event === |
|
3965 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceSwapped |
|
3966 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( confCall, |
|
3967 notifyConfEventStatus, |
|
3968 confEvent,RMobileConferenceCall::EConferenceSwapped, |
|
3969 confEventCallName, |
|
3970 KErrNone); |
|
3971 // Logging |
|
3972 ASSERT_EQUALS( confEvent, RMobileConferenceCall::EConferenceSwapped, |
|
3973 _L("RMobileConferenceCall::Swap returned unexpected event")); |
|
3974 |
|
3975 // === Check conference status === |
|
3976 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceActive |
|
3977 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
3978 notifyConfStatusChange, |
|
3979 confStatus,RMobileConferenceCall::EConferenceActive, |
|
3980 KErrNone); |
|
3981 |
|
3982 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
3983 err = confCall.GetConferenceStatus(confStatus); |
|
3984 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceActive, |
|
3985 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
3986 |
|
3987 TExtEtelRequestStatus reqHangupStatus(confCall, EMobileConferenceCallHangUp ); |
|
3988 CleanupStack::PushL(reqHangupStatus); |
|
3989 confCall.HangUp(reqHangupStatus); |
|
3990 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqHangupStatus,ETimeMedium), KErrNone, |
|
3991 _L("RMobileConferenceCall::HangUp returned error") ); |
|
3992 ASSERT_EQUALS( reqHangupStatus.Int(), KErrNone, _L("RMobileConferenceCall::HangUp returned error") ); |
|
3993 |
|
3994 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceIdle |
|
3995 err = confCall.GetConferenceStatus(confStatus); |
|
3996 ASSERT_EQUALS(err, KErrNone, _L("RMobileConferenceCall::GetConferenceStatus returned error")); |
|
3997 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceIdle, |
|
3998 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
3999 |
|
4000 // |
|
4001 // TEST END |
|
4002 // |
|
4003 |
|
4004 StartCleanup(); |
|
4005 |
|
4006 // Hangup calls |
|
4007 call1.HangUp(); |
|
4008 call2.HangUp(); |
|
4009 call3.HangUp(); |
|
4010 call4.HangUp(); |
|
4011 call5.HangUp(); |
|
4012 |
|
4013 // reqHangupStatus |
|
4014 // reqSwapConfStatus |
|
4015 // notifyConfStatusChange |
|
4016 // notifyConfEventStatus |
|
4017 // reqCreConfStatus |
|
4018 CleanupStack::PopAndDestroy(5,&reqCreConfStatus); |
|
4019 |
|
4020 return TestStepResult(); |
|
4021 } |
|
4022 |
|
4023 TPtrC CCTSYIntegrationTestConferenceCallControl0015::GetTestStepName() |
|
4024 /** |
|
4025 * @return The test step name. |
|
4026 */ |
|
4027 { |
|
4028 return _L("CCTSYIntegrationTestConferenceCallControl0015"); |
|
4029 } |
|
4030 |
|
4031 |
|
4032 |
|
4033 CCTSYIntegrationTestConferenceCallControl0016::CCTSYIntegrationTestConferenceCallControl0016(CEtelSessionMgr& aEtelSessionMgr) |
|
4034 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
4035 /** |
|
4036 * Constructor. |
|
4037 */ |
|
4038 { |
|
4039 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0016::GetTestStepName()); |
|
4040 } |
|
4041 |
|
4042 CCTSYIntegrationTestConferenceCallControl0016::~CCTSYIntegrationTestConferenceCallControl0016() |
|
4043 /** |
|
4044 * Destructor. |
|
4045 */ |
|
4046 { |
|
4047 } |
|
4048 |
|
4049 TVerdict CCTSYIntegrationTestConferenceCallControl0016::doTestStepL() |
|
4050 /** |
|
4051 * @SYMTestCaseID BA-CTSY-INT-CONC-0016 |
|
4052 * @SYMFssID BA/CTSY/CONC-0016 |
|
4053 * @SYMTestCaseDesc Dial 6th call when there is an active 5 party conference call. Conference call auto holds. |
|
4054 * @SYMTestPriority High |
|
4055 * @SYMTestActions RMobileCall::NotifyMobileCallStatusChange, RMobileConferenceCall::NotifyConferenceStatusChange, RMobileCall::GetMobileCallStatus, RMobileConferenceCall::GetConferenceStatus, RMobileConferenceCall::Hangup |
|
4056 * @SYMTestExpectedResults Pass - Conference call holds automatically when 6th call dialled. |
|
4057 * @SYMTestType CIT |
|
4058 * @SYMTestCaseDependencies live/automatic |
|
4059 * |
|
4060 * Reason for test: Verify conference call auto holds. Verify conference call notifications complete correctly. |
|
4061 * |
|
4062 * @return - TVerdict code |
|
4063 */ |
|
4064 { |
|
4065 |
|
4066 // |
|
4067 // SET UP |
|
4068 // |
|
4069 |
|
4070 // Create basic 5 party conference call. |
|
4071 // Make sure we are on the network |
|
4072 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
4073 |
|
4074 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL( phone ); |
|
4075 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
4076 |
|
4077 // Get the test numbers |
|
4078 TPtrC num1, num2, num3, num4, num5; |
|
4079 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
4080 _L("Failed to obtain 1st number for test") ); |
|
4081 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
4082 _L("Failed to obtain 2nd number for test") ); |
|
4083 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber3, num3), |
|
4084 _L("Failed to obtain 3rd number for test") ); |
|
4085 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber4, num4), |
|
4086 _L("Failed to obtain 4th number for test") ); |
|
4087 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber5, num5), |
|
4088 _L("Failed to obtain 5th number for test") ); |
|
4089 |
|
4090 // Get conference call subsession. |
|
4091 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
4092 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
4093 |
|
4094 // and the call objects |
|
4095 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
4096 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
4097 RMobileCall& call3 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall3 ); |
|
4098 RMobileCall& call4 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall4 ); |
|
4099 RMobileCall& call5 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall5 ); |
|
4100 |
|
4101 // Create a three party conference call (two remote parties). |
|
4102 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
4103 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
4104 |
|
4105 // Hold 1st call |
|
4106 callStatus = HoldCallL(call1); |
|
4107 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
4108 |
|
4109 // Make second call |
|
4110 callStatus = MakeCallL(call2, num2); |
|
4111 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
4112 |
|
4113 // Create the conference |
|
4114 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
4115 CleanupStack::PushL(reqCreConfStatus); |
|
4116 |
|
4117 confCall.CreateConference(reqCreConfStatus); |
|
4118 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
4119 _L("RMobileConferenceCall::CreateConference timed out")); |
|
4120 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
4121 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
4122 |
|
4123 // Add the other calls |
|
4124 AddCallToConferenceL( confCall, call3, num3, 3 ); |
|
4125 TEST_CHECK_POINT_L(_L("Adding call3 failed")); |
|
4126 AddCallToConferenceL( confCall, call4, num4, 4 ); |
|
4127 TEST_CHECK_POINT_L(_L("Adding call4 failed")); |
|
4128 AddCallToConferenceL( confCall, call5, num5, 5 ); |
|
4129 TEST_CHECK_POINT_L(_L("Adding call5 failed")); |
|
4130 |
|
4131 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
4132 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
4133 CHECK_EQUALS_L(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
4134 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
4135 CHECK_EQUALS_L( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
4136 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
4137 |
|
4138 // Get call 6. |
|
4139 // Get its number, too |
|
4140 TPtrC num6; |
|
4141 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber6, num6), |
|
4142 _L("Failed to obtain 6th number for test") ); |
|
4143 RMobileCall& call6 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall6 ); |
|
4144 |
|
4145 |
|
4146 // |
|
4147 // SET UP END |
|
4148 // |
|
4149 |
|
4150 StartTest(); |
|
4151 |
|
4152 // |
|
4153 // TEST START |
|
4154 // |
|
4155 |
|
4156 |
|
4157 // set up the notification for the status change |
|
4158 TExtEtelRequestStatus notifyConfStatusChange(confCall, EMobileConferenceCallNotifyConferenceStatusChange); |
|
4159 CleanupStack::PushL(notifyConfStatusChange); |
|
4160 RMobileConferenceCall::TMobileConferenceStatus confStatus; |
|
4161 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
4162 |
|
4163 // Dial a number that answers on call 6. |
|
4164 callStatus = MakeCallL(call6, num6); |
|
4165 ASSERT_EQUALS(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call6")); |
|
4166 |
|
4167 // === Check conference call auto-holds. === |
|
4168 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceHold |
|
4169 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
4170 notifyConfStatusChange, |
|
4171 confStatus,RMobileConferenceCall::EConferenceHold, |
|
4172 KErrNone); |
|
4173 |
|
4174 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceHold |
|
4175 err = confCall.GetConferenceStatus(confStatus); |
|
4176 ASSERT_EQUALS(err, KErrNone, _L("RMobileConferenceCall::GetConferenceStatus returned error")); |
|
4177 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceHold, |
|
4178 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
4179 |
|
4180 // Hang up conference call. |
|
4181 TExtEtelRequestStatus reqHangupStatus(confCall, EMobileConferenceCallHangUp ); |
|
4182 CleanupStack::PushL(reqHangupStatus); |
|
4183 confCall.HangUp(reqHangupStatus); |
|
4184 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqHangupStatus,ETimeMedium), KErrNone, |
|
4185 _L("RMobileConferenceCall::HangUp returned error") ); |
|
4186 ASSERT_EQUALS( reqHangupStatus.Int(), KErrNone, _L("RMobileConferenceCall::HangUp returned error") ); |
|
4187 |
|
4188 // |
|
4189 // TEST END |
|
4190 // |
|
4191 |
|
4192 StartCleanup(); |
|
4193 |
|
4194 // Hangup calls |
|
4195 call1.HangUp(); |
|
4196 call2.HangUp(); |
|
4197 call3.HangUp(); |
|
4198 call4.HangUp(); |
|
4199 call5.HangUp(); |
|
4200 call6.HangUp(); |
|
4201 |
|
4202 // reqHangupStatus |
|
4203 // notifyConfStatusChange |
|
4204 // reqCreConfStatus |
|
4205 CleanupStack::PopAndDestroy(3, &reqCreConfStatus); |
|
4206 |
|
4207 return TestStepResult(); |
|
4208 } |
|
4209 |
|
4210 TPtrC CCTSYIntegrationTestConferenceCallControl0016::GetTestStepName() |
|
4211 /** |
|
4212 * @return The test step name. |
|
4213 */ |
|
4214 { |
|
4215 return _L("CCTSYIntegrationTestConferenceCallControl0016"); |
|
4216 } |
|
4217 |
|
4218 |
|
4219 |
|
4220 CCTSYIntegrationTestConferenceCallControl0017::CCTSYIntegrationTestConferenceCallControl0017(CEtelSessionMgr& aEtelSessionMgr) |
|
4221 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
4222 /** |
|
4223 * Constructor. |
|
4224 */ |
|
4225 { |
|
4226 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0017::GetTestStepName()); |
|
4227 } |
|
4228 |
|
4229 CCTSYIntegrationTestConferenceCallControl0017::~CCTSYIntegrationTestConferenceCallControl0017() |
|
4230 /** |
|
4231 * Destructor. |
|
4232 */ |
|
4233 { |
|
4234 } |
|
4235 |
|
4236 TVerdict CCTSYIntegrationTestConferenceCallControl0017::doTestStepL() |
|
4237 /** |
|
4238 * @SYMTestCaseID BA-CTSY-INT-CONC-0017 |
|
4239 * @SYMFssID BA/CTSY/CONC-0017 |
|
4240 * @SYMTestCaseDesc Swap a five party conference call then dial a 6th call. |
|
4241 * @SYMTestPriority High |
|
4242 * @SYMTestActions RMobileCall::NotifyMobileCallStatusChange, RMobileConferenceCall::NotifyConferenceEvent, RMobileConferenceCall::NotifyConferenceStatusChange, RMobileCall::GetMobileCallStatus, RMobileConferenceCall::GetConferenceStatus, RMobileConferenceCall::Hangup |
|
4243 * @SYMTestExpectedResults Pass - Conference call swapped. 6th call dialled. |
|
4244 * @SYMTestType CIT |
|
4245 * @SYMTestCaseDependencies live/automatic |
|
4246 * |
|
4247 * Reason for test: Verify conference call held and 6th call dialled. Verify conference call notifications complete correctly. |
|
4248 * |
|
4249 * @return - TVerdict code |
|
4250 */ |
|
4251 { |
|
4252 |
|
4253 // |
|
4254 // SET UP |
|
4255 // |
|
4256 |
|
4257 // Create basic 5 party conference call. |
|
4258 // Make sure we are on the network |
|
4259 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
4260 |
|
4261 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL( phone ); |
|
4262 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
4263 |
|
4264 // Get the test numbers |
|
4265 TPtrC num1, num2, num3, num4, num5; |
|
4266 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
4267 _L("Failed to obtain 1st number for test") ); |
|
4268 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
4269 _L("Failed to obtain 2nd number for test") ); |
|
4270 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber3, num3), |
|
4271 _L("Failed to obtain 3rd number for test") ); |
|
4272 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber4, num4), |
|
4273 _L("Failed to obtain 4th number for test") ); |
|
4274 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber5, num5), |
|
4275 _L("Failed to obtain 5th number for test") ); |
|
4276 |
|
4277 // Get conference call subsession. |
|
4278 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
4279 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
4280 |
|
4281 // and the call objects |
|
4282 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
4283 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
4284 RMobileCall& call3 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall3 ); |
|
4285 RMobileCall& call4 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall4 ); |
|
4286 RMobileCall& call5 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall5 ); |
|
4287 |
|
4288 // Create a three party conference call (two remote parties). |
|
4289 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
4290 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
4291 |
|
4292 // Hold 1st call |
|
4293 callStatus = HoldCallL(call1); |
|
4294 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
4295 |
|
4296 // Make second call |
|
4297 callStatus = MakeCallL(call2, num2); |
|
4298 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
4299 |
|
4300 // Create the conference |
|
4301 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
4302 CleanupStack::PushL(reqCreConfStatus); |
|
4303 |
|
4304 confCall.CreateConference(reqCreConfStatus); |
|
4305 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
4306 _L("RMobileConferenceCall::CreateConference timed out")); |
|
4307 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
4308 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
4309 |
|
4310 // Add the other calls |
|
4311 AddCallToConferenceL( confCall, call3, num3, 3 ); |
|
4312 TEST_CHECK_POINT_L(_L("Adding call3 failed")); |
|
4313 AddCallToConferenceL( confCall, call4, num4, 4 ); |
|
4314 TEST_CHECK_POINT_L(_L("Adding call4 failed")); |
|
4315 AddCallToConferenceL( confCall, call5, num5, 5 ); |
|
4316 TEST_CHECK_POINT_L(_L("Adding call5 failed")); |
|
4317 |
|
4318 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
4319 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
4320 CHECK_EQUALS_L(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
4321 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
4322 CHECK_EQUALS_L( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
4323 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
4324 |
|
4325 // Get call 6. |
|
4326 // Get its number, too |
|
4327 TPtrC num6; |
|
4328 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber6, num6), |
|
4329 _L("Failed to obtain 6th number for test") ); |
|
4330 RMobileCall& call6 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall6 ); |
|
4331 |
|
4332 |
|
4333 // |
|
4334 // SET UP END |
|
4335 // |
|
4336 |
|
4337 StartTest(); |
|
4338 |
|
4339 // |
|
4340 // TEST START |
|
4341 // |
|
4342 |
|
4343 |
|
4344 // Swap conference call. |
|
4345 // Setup the notification for the event |
|
4346 TExtEtelRequestStatus notifyConfEventStatus(confCall,EMobileConferenceCallNotifyConferenceEvent); |
|
4347 CleanupStack::PushL( notifyConfEventStatus ); |
|
4348 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
4349 TName confEventCallName; |
|
4350 |
|
4351 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
4352 |
|
4353 // set up the notification for the status change |
|
4354 TExtEtelRequestStatus notifyConfStatusChange(confCall, EMobileConferenceCallNotifyConferenceStatusChange); |
|
4355 CleanupStack::PushL(notifyConfStatusChange); |
|
4356 RMobileConferenceCall::TMobileConferenceStatus confStatus; |
|
4357 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
4358 |
|
4359 // Do the swap |
|
4360 TExtEtelRequestStatus reqSwapConfStatus(confCall,EMobileConferenceCallSwap); |
|
4361 CleanupStack::PushL(reqSwapConfStatus); |
|
4362 confCall.Swap(reqSwapConfStatus); |
|
4363 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqSwapConfStatus,ETimeShort),KErrNone, |
|
4364 _L("RMobileConferenceCall::Swap timed out")); |
|
4365 ASSERT_EQUALS( reqSwapConfStatus.Int(),KErrNone, |
|
4366 _L("RMobileConferenceCall::Swap returned error")); |
|
4367 |
|
4368 // Logging |
|
4369 ASSERT_EQUALS( confEvent, RMobileConferenceCall::EConferenceSwapped, |
|
4370 _L("RMobileConferenceCall::Swap returned unexpected event")); |
|
4371 |
|
4372 // === Check conference call status === |
|
4373 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceHold |
|
4374 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
4375 notifyConfStatusChange, |
|
4376 confStatus,RMobileConferenceCall::EConferenceHold, |
|
4377 KErrNone); |
|
4378 |
|
4379 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceHold |
|
4380 err = confCall.GetConferenceStatus(confStatus); |
|
4381 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::GetConferenceStatus returned an error")) |
|
4382 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceHold, |
|
4383 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
4384 |
|
4385 // === Check conference event === |
|
4386 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceSwapped |
|
4387 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( confCall, |
|
4388 notifyConfEventStatus, |
|
4389 confEvent,RMobileConferenceCall::EConferenceSwapped, |
|
4390 confEventCallName, |
|
4391 KErrNone); |
|
4392 |
|
4393 // Dial a number that answers on call 6. |
|
4394 |
|
4395 // Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusDialling -> EStatusConnecting -> EStatusConnected. |
|
4396 // Check RMobileCall::GetMobileCallStatus returns status of EStatusConnected. |
|
4397 callStatus = MakeCallL(call6, num6); |
|
4398 ASSERT_EQUALS(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call6")); |
|
4399 |
|
4400 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceHold |
|
4401 err = confCall.GetConferenceStatus(confStatus); |
|
4402 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceHold, |
|
4403 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
4404 |
|
4405 // Hang up conference call. |
|
4406 TExtEtelRequestStatus reqHangupStatus(confCall, EMobileConferenceCallHangUp ); |
|
4407 CleanupStack::PushL(reqHangupStatus); |
|
4408 confCall.HangUp(reqHangupStatus); |
|
4409 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqHangupStatus,ETimeMedium), KErrNone, |
|
4410 _L("RMobileConferenceCall::HangUp returned error") ); |
|
4411 ASSERT_EQUALS( reqHangupStatus.Int(), KErrNone, _L("RMobileConferenceCall::HangUp returned error") ); |
|
4412 |
|
4413 // |
|
4414 // TEST END |
|
4415 // |
|
4416 |
|
4417 StartCleanup(); |
|
4418 |
|
4419 // Hangup calls |
|
4420 call1.HangUp(); |
|
4421 call2.HangUp(); |
|
4422 call3.HangUp(); |
|
4423 call4.HangUp(); |
|
4424 call5.HangUp(); |
|
4425 call6.HangUp(); |
|
4426 |
|
4427 // reqHangupStatus |
|
4428 // reqSwapConfStatus |
|
4429 // notifyConfStatusChange |
|
4430 // notifyConfEventStatus |
|
4431 // reqCreConfStatus |
|
4432 CleanupStack::PopAndDestroy(5, &reqCreConfStatus); |
|
4433 |
|
4434 return TestStepResult(); |
|
4435 } |
|
4436 |
|
4437 TPtrC CCTSYIntegrationTestConferenceCallControl0017::GetTestStepName() |
|
4438 /** |
|
4439 * @return The test step name. |
|
4440 */ |
|
4441 { |
|
4442 return _L("CCTSYIntegrationTestConferenceCallControl0017"); |
|
4443 } |
|
4444 |
|
4445 |
|
4446 |
|
4447 CCTSYIntegrationTestConferenceCallControl0018::CCTSYIntegrationTestConferenceCallControl0018(CEtelSessionMgr& aEtelSessionMgr) |
|
4448 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
4449 /** |
|
4450 * Constructor. |
|
4451 */ |
|
4452 { |
|
4453 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0018::GetTestStepName()); |
|
4454 } |
|
4455 |
|
4456 CCTSYIntegrationTestConferenceCallControl0018::~CCTSYIntegrationTestConferenceCallControl0018() |
|
4457 /** |
|
4458 * Destructor. |
|
4459 */ |
|
4460 { |
|
4461 } |
|
4462 |
|
4463 TVerdict CCTSYIntegrationTestConferenceCallControl0018::doTestStepL() |
|
4464 /** |
|
4465 * @SYMTestCaseID BA-CTSY-INT-CONC-0018 |
|
4466 * @SYMFssID BA/CTSY/CONC-0018 |
|
4467 * @SYMTestCaseDesc Swap 6th active call with five party conference call. |
|
4468 * @SYMTestPriority High |
|
4469 * @SYMTestActions RMobileConferenceCall::NotifyConferenceEvent, RMobileConferenceCall::NotifyConferenceStatusChange, RCall::Dial, RMobileCall::Hold, RCall::GetInfo, RMobileConferenceCall::CreateConference, RMobileConferenceCall::Swap, RMobileConferenceCall::AddCall, RLine::NotifyStatusChange, RMobileCall::NotifyMobileCallStatusChange, RMobileConferenceCall::GetCaps, RMobileConferenceCall::GetConferenceStatus, RMobileConferenceCall::GetMobileCallInfo |
|
4470 * @SYMTestExpectedResults Pass - Conference call swapped with 6th call. |
|
4471 * @SYMTestType CIT |
|
4472 * @SYMTestCaseDependencies live/automatic |
|
4473 * |
|
4474 * Reason for test: Verify conference call and 6th voice call swapped. Verify conference call notifications complete correctly. |
|
4475 * |
|
4476 * @return - TVerdict code |
|
4477 */ |
|
4478 { |
|
4479 |
|
4480 // |
|
4481 // SET UP |
|
4482 // |
|
4483 |
|
4484 // Create basic 5 party conference call. |
|
4485 // Make sure we are on the network |
|
4486 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
4487 |
|
4488 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL( phone ); |
|
4489 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
4490 |
|
4491 // Get the test numbers |
|
4492 TPtrC num1, num2, num3, num4, num5; |
|
4493 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
4494 _L("Failed to obtain 1st number for test") ); |
|
4495 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
4496 _L("Failed to obtain 2nd number for test") ); |
|
4497 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber3, num3), |
|
4498 _L("Failed to obtain 3rd number for test") ); |
|
4499 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber4, num4), |
|
4500 _L("Failed to obtain 4th number for test") ); |
|
4501 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber5, num5), |
|
4502 _L("Failed to obtain 5th number for test") ); |
|
4503 |
|
4504 // Get conference call subsession. |
|
4505 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
4506 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
4507 |
|
4508 // and the call objects |
|
4509 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
4510 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
4511 RMobileCall& call3 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall3 ); |
|
4512 RMobileCall& call4 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall4 ); |
|
4513 RMobileCall& call5 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall5 ); |
|
4514 |
|
4515 // Create a three party conference call (two remote parties). |
|
4516 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
4517 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
4518 |
|
4519 // Hold 1st call |
|
4520 callStatus = HoldCallL(call1); |
|
4521 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
4522 |
|
4523 // Make second call |
|
4524 callStatus = MakeCallL(call2, num2); |
|
4525 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
4526 |
|
4527 // Create the conference |
|
4528 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
4529 CleanupStack::PushL(reqCreConfStatus); |
|
4530 |
|
4531 confCall.CreateConference(reqCreConfStatus); |
|
4532 |
|
4533 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
4534 _L("RMobileConferenceCall::CreateConference timed out")); |
|
4535 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
4536 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
4537 |
|
4538 // Add the other calls |
|
4539 AddCallToConferenceL( confCall, call3, num3, 3 ); |
|
4540 TEST_CHECK_POINT_L(_L("Adding call3 failed")); |
|
4541 AddCallToConferenceL( confCall, call4, num4, 4 ); |
|
4542 TEST_CHECK_POINT_L(_L("Adding call4 failed")); |
|
4543 AddCallToConferenceL( confCall, call5, num5, 5 ); |
|
4544 TEST_CHECK_POINT_L(_L("Adding call5 failed")); |
|
4545 |
|
4546 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
4547 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
4548 CHECK_EQUALS_L(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
4549 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
4550 CHECK_EQUALS_L( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
4551 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
4552 |
|
4553 // Get call 6. |
|
4554 // Get its number, too |
|
4555 TPtrC num6; |
|
4556 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber6, num6), |
|
4557 _L("Failed to obtain 6th number for test") ); |
|
4558 RMobileCall& call6 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall6 ); |
|
4559 |
|
4560 // |
|
4561 // SET UP END |
|
4562 // |
|
4563 |
|
4564 StartTest(); |
|
4565 |
|
4566 // |
|
4567 // TEST START |
|
4568 // |
|
4569 |
|
4570 // Swap conference call. |
|
4571 |
|
4572 // Setup the notification for the event |
|
4573 TExtEtelRequestStatus notifyConfEventStatus(confCall,EMobileConferenceCallNotifyConferenceEvent); |
|
4574 CleanupStack::PushL(notifyConfEventStatus); |
|
4575 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
4576 TName confEventCallName; |
|
4577 |
|
4578 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
4579 |
|
4580 // set up the notification for the status change |
|
4581 TExtEtelRequestStatus notifyConfStatusChange(confCall, EMobileConferenceCallNotifyConferenceStatusChange); |
|
4582 CleanupStack::PushL(notifyConfStatusChange); |
|
4583 RMobileConferenceCall::TMobileConferenceStatus confStatus; |
|
4584 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
4585 |
|
4586 // Do the swap |
|
4587 TExtEtelRequestStatus reqSwapConfStatus(confCall,EMobileConferenceCallSwap); |
|
4588 CleanupStack::PushL(reqSwapConfStatus); |
|
4589 |
|
4590 confCall.Swap(reqSwapConfStatus); |
|
4591 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqSwapConfStatus,ETimeShort),KErrNone, |
|
4592 _L("RMobileConferenceCall::Swap timed out")); |
|
4593 ASSERT_EQUALS( reqSwapConfStatus.Int(),KErrNone, |
|
4594 _L("RMobileConferenceCall::Swap returned error")); |
|
4595 |
|
4596 // === Check conference event === |
|
4597 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceSwapped |
|
4598 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( confCall, |
|
4599 notifyConfEventStatus, |
|
4600 confEvent,RMobileConferenceCall::EConferenceSwapped, |
|
4601 confEventCallName, |
|
4602 KErrNone); |
|
4603 |
|
4604 // === Check conference call status === |
|
4605 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceHold |
|
4606 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
4607 notifyConfStatusChange, |
|
4608 confStatus,RMobileConferenceCall::EConferenceHold, |
|
4609 KErrNone); |
|
4610 |
|
4611 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceHold |
|
4612 err = confCall.GetConferenceStatus(confStatus); |
|
4613 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceHold, |
|
4614 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
4615 |
|
4616 // Dial 6th call. |
|
4617 callStatus = MakeCallL(call6, num6); |
|
4618 ASSERT_EQUALS(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call6")); |
|
4619 |
|
4620 // Swap conference call (active). |
|
4621 |
|
4622 // set up the notification for the event |
|
4623 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
4624 // set up the notification for the status change |
|
4625 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
4626 // Do the swap |
|
4627 confCall.Swap(reqSwapConfStatus); |
|
4628 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqSwapConfStatus,ETimeShort),KErrNone, |
|
4629 _L("RMobileConferenceCall::Swap timed out")); |
|
4630 ASSERT_EQUALS( reqSwapConfStatus.Int(),KErrNone, |
|
4631 _L("RMobileConferenceCall::Swap returned error")); |
|
4632 |
|
4633 // === Check conference event === |
|
4634 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceSwapped |
|
4635 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( confCall, |
|
4636 notifyConfEventStatus, |
|
4637 confEvent,RMobileConferenceCall::EConferenceSwapped, |
|
4638 confEventCallName, |
|
4639 KErrNone); |
|
4640 |
|
4641 // === Check conference call status === |
|
4642 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceActive |
|
4643 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
4644 notifyConfStatusChange, |
|
4645 confStatus,RMobileConferenceCall::EConferenceActive, |
|
4646 KErrNone); |
|
4647 |
|
4648 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
4649 err = confCall.GetConferenceStatus(confStatus); |
|
4650 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceActive, |
|
4651 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
4652 |
|
4653 |
|
4654 // Hang up conference call. |
|
4655 TExtEtelRequestStatus reqHangupStatus(confCall, EMobileConferenceCallHangUp ); |
|
4656 CleanupStack::PushL(reqHangupStatus); |
|
4657 |
|
4658 confCall.HangUp(reqHangupStatus); |
|
4659 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqHangupStatus,ETimeMedium), KErrNone, |
|
4660 _L("RMobileConferenceCall::HangUp returned error") ); |
|
4661 ASSERT_EQUALS( reqHangupStatus.Int(), KErrNone, _L("RMobileConferenceCall::HangUp returned error") ); |
|
4662 |
|
4663 // Hang up 6th call. |
|
4664 call6.HangUp(); |
|
4665 |
|
4666 // Dial a number that answers on call 6. |
|
4667 // Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusDialling -> EStatusConnecting -> EStatusConnected. |
|
4668 callStatus = MakeCallL(call6, num6); |
|
4669 // Check RMobileCall::GetMobileCallStatus returns status of EStatusConnected. |
|
4670 ASSERT_EQUALS(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call6")); |
|
4671 |
|
4672 |
|
4673 // |
|
4674 // TEST END |
|
4675 // |
|
4676 |
|
4677 StartCleanup(); |
|
4678 |
|
4679 // Hangup calls |
|
4680 call1.HangUp(); |
|
4681 call2.HangUp(); |
|
4682 call3.HangUp(); |
|
4683 call4.HangUp(); |
|
4684 call5.HangUp(); |
|
4685 call6.HangUp(); |
|
4686 |
|
4687 // notifyConfStatusChange |
|
4688 // notifyConfEventStatus |
|
4689 // reqSwapConfStatus |
|
4690 // reqHangupStatus |
|
4691 // reqCreConfStatus |
|
4692 CleanupStack::PopAndDestroy(5, &reqCreConfStatus); |
|
4693 |
|
4694 return TestStepResult(); |
|
4695 } |
|
4696 |
|
4697 TPtrC CCTSYIntegrationTestConferenceCallControl0018::GetTestStepName() |
|
4698 /** |
|
4699 * @return The test step name. |
|
4700 */ |
|
4701 { |
|
4702 return _L("CCTSYIntegrationTestConferenceCallControl0018"); |
|
4703 } |
|
4704 |
|
4705 |
|
4706 |
|
4707 CCTSYIntegrationTestConferenceCallControl0019::CCTSYIntegrationTestConferenceCallControl0019(CEtelSessionMgr& aEtelSessionMgr) |
|
4708 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
4709 /** |
|
4710 * Constructor. |
|
4711 */ |
|
4712 { |
|
4713 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0019::GetTestStepName()); |
|
4714 } |
|
4715 |
|
4716 CCTSYIntegrationTestConferenceCallControl0019::~CCTSYIntegrationTestConferenceCallControl0019() |
|
4717 /** |
|
4718 * Destructor. |
|
4719 */ |
|
4720 { |
|
4721 } |
|
4722 |
|
4723 TVerdict CCTSYIntegrationTestConferenceCallControl0019::doTestStepL() |
|
4724 /** |
|
4725 * @SYMTestCaseID BA-CTSY-INT-CONC-0019 |
|
4726 * @SYMFssID BA/CTSY/CONC-0019 |
|
4727 * @SYMTestCaseDesc Create another conference call when there is already a five party conference call active. |
|
4728 * @SYMTestPriority High |
|
4729 * @SYMTestActions |
|
4730 * @SYMTestExpectedResults Pass - KErrNotReady on attempt to create second conference call. |
|
4731 * @SYMTestType CIT |
|
4732 * @SYMTestCaseDependencies live/automatic |
|
4733 * |
|
4734 * Reason for test: Verify creation of second conference fails. Verify conference call notifications complete correctly. |
|
4735 * |
|
4736 * @return - TVerdict code |
|
4737 */ |
|
4738 { |
|
4739 |
|
4740 // |
|
4741 // SET UP |
|
4742 // |
|
4743 |
|
4744 // Create basic 5 party conference call. |
|
4745 // Make sure we are on the network |
|
4746 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
4747 |
|
4748 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL( phone ); |
|
4749 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
4750 |
|
4751 // Get the test numbers |
|
4752 TPtrC num1, num2, num3, num4, num5; |
|
4753 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
4754 _L("Failed to obtain 1st number for test") ); |
|
4755 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
4756 _L("Failed to obtain 2nd number for test") ); |
|
4757 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber3, num3), |
|
4758 _L("Failed to obtain 3rd number for test") ); |
|
4759 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber4, num4), |
|
4760 _L("Failed to obtain 4th number for test") ); |
|
4761 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber5, num5), |
|
4762 _L("Failed to obtain 5th number for test") ); |
|
4763 |
|
4764 // Get conference call subsession. |
|
4765 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
4766 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
4767 |
|
4768 // and the call objects |
|
4769 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
4770 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
4771 RMobileCall& call3 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall3 ); |
|
4772 RMobileCall& call4 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall4 ); |
|
4773 RMobileCall& call5 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall5 ); |
|
4774 |
|
4775 // Create a three party conference call (two remote parties). |
|
4776 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
4777 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
4778 |
|
4779 // Hold 1st call |
|
4780 callStatus = HoldCallL(call1); |
|
4781 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
4782 |
|
4783 // Make second call |
|
4784 callStatus = MakeCallL(call2, num2); |
|
4785 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
4786 |
|
4787 // Create the conference |
|
4788 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
4789 CleanupStack::PushL(reqCreConfStatus); |
|
4790 |
|
4791 confCall.CreateConference(reqCreConfStatus); |
|
4792 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
4793 _L("RMobileConferenceCall::CreateConference timed out")); |
|
4794 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
4795 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
4796 |
|
4797 // Add the other calls |
|
4798 AddCallToConferenceL( confCall, call3, num3, 3 ); |
|
4799 TEST_CHECK_POINT_L(_L("Adding call3 failed")); |
|
4800 AddCallToConferenceL( confCall, call4, num4, 4 ); |
|
4801 TEST_CHECK_POINT_L(_L("Adding call4 failed")); |
|
4802 AddCallToConferenceL( confCall, call5, num5, 5 ); |
|
4803 TEST_CHECK_POINT_L(_L("Adding call5 failed")); |
|
4804 |
|
4805 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
4806 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
4807 CHECK_EQUALS_L(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
4808 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
4809 CHECK_EQUALS_L( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
4810 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
4811 |
|
4812 |
|
4813 // |
|
4814 // SET UP END |
|
4815 // |
|
4816 |
|
4817 StartTest(); |
|
4818 |
|
4819 // |
|
4820 // TEST START |
|
4821 // |
|
4822 |
|
4823 // Call RMobileConferenceCall::CreateConference again. |
|
4824 confCall.CreateConference(reqCreConfStatus); |
|
4825 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
4826 _L("RMobileConferenceCall::CreateConference timed out")); |
|
4827 |
|
4828 // Check KErrNotReady returned. |
|
4829 CHECK_EQUALS_L( reqCreConfStatus.Int(), KErrNotReady, |
|
4830 _L("RMobileConferenceCall::CreateConference did not return KErrNotReady")); |
|
4831 |
|
4832 |
|
4833 |
|
4834 // |
|
4835 // TEST END |
|
4836 // |
|
4837 |
|
4838 StartCleanup(); |
|
4839 |
|
4840 // Hangup calls |
|
4841 call1.HangUp(); |
|
4842 call2.HangUp(); |
|
4843 call3.HangUp(); |
|
4844 call4.HangUp(); |
|
4845 call5.HangUp(); |
|
4846 |
|
4847 // reqCreConfStatus |
|
4848 CleanupStack::PopAndDestroy( 1, &reqCreConfStatus ); |
|
4849 |
|
4850 return TestStepResult(); |
|
4851 } |
|
4852 |
|
4853 TPtrC CCTSYIntegrationTestConferenceCallControl0019::GetTestStepName() |
|
4854 /** |
|
4855 * @return The test step name. |
|
4856 */ |
|
4857 { |
|
4858 return _L("CCTSYIntegrationTestConferenceCallControl0019"); |
|
4859 } |
|
4860 |
|
4861 |
|
4862 |
|
4863 CCTSYIntegrationTestConferenceCallControl0020::CCTSYIntegrationTestConferenceCallControl0020(CEtelSessionMgr& aEtelSessionMgr) |
|
4864 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
4865 /** |
|
4866 * Constructor. |
|
4867 */ |
|
4868 { |
|
4869 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0020::GetTestStepName()); |
|
4870 } |
|
4871 |
|
4872 CCTSYIntegrationTestConferenceCallControl0020::~CCTSYIntegrationTestConferenceCallControl0020() |
|
4873 /** |
|
4874 * Destructor. |
|
4875 */ |
|
4876 { |
|
4877 } |
|
4878 |
|
4879 TVerdict CCTSYIntegrationTestConferenceCallControl0020::doTestStepL() |
|
4880 /** |
|
4881 * @SYMTestCaseID BA-CTSY-INT-CONC-0020 |
|
4882 * @SYMFssID BA/CTSY/CONC-0020 |
|
4883 * @SYMTestCaseDesc Hang up 3rd call in five party conference call. |
|
4884 * @SYMTestPriority High |
|
4885 * @SYMTestActions RMobileConferenceCall::NotifyConferenceStatusChange, RMobileConferenceCall::GetMobileCallInfo, RCall::HangUp, RMobileConferenceCall::NotifyCapsChange, RMobileConferenceCall::GetCaps, RMobileConferenceCall::EnumerateCalls, RMobileConferenceCall::GetConferenceStatus |
|
4886 * @SYMTestExpectedResults Pass - Third call hung up. Conference is still active. Conference info correct. |
|
4887 * @SYMTestType CIT |
|
4888 * @SYMTestCaseDependencies live/automatic |
|
4889 * |
|
4890 * Reason for test: Verify call hung up. Verify conference call notifications complete correctly. |
|
4891 * |
|
4892 * @return - TVerdict code |
|
4893 */ |
|
4894 { |
|
4895 |
|
4896 // |
|
4897 // SET UP |
|
4898 // |
|
4899 |
|
4900 // Create basic 5 party conference call. |
|
4901 // Make sure we are on the network |
|
4902 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
4903 |
|
4904 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL( phone ); |
|
4905 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
4906 |
|
4907 // Get the test numbers |
|
4908 TPtrC num1, num2, num3, num4, num5; |
|
4909 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
4910 _L("Failed to obtain 1st number for test") ); |
|
4911 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
4912 _L("Failed to obtain 2nd number for test") ); |
|
4913 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber6, num3), |
|
4914 _L("Failed to obtain 3rd number for test") ); |
|
4915 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber4, num4), |
|
4916 _L("Failed to obtain 4th number for test") ); |
|
4917 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber5, num5), |
|
4918 _L("Failed to obtain 5th number for test") ); |
|
4919 |
|
4920 // Get conference call subsession. |
|
4921 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
4922 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
4923 |
|
4924 // and the call objects |
|
4925 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
4926 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
4927 RMobileCall& call3 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall3 ); |
|
4928 RMobileCall& call4 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall4 ); |
|
4929 RMobileCall& call5 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall5 ); |
|
4930 |
|
4931 // Create a three party conference call (two remote parties). |
|
4932 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
4933 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
4934 |
|
4935 // Hold 1st call |
|
4936 callStatus = HoldCallL(call1); |
|
4937 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
4938 |
|
4939 // Make second call |
|
4940 callStatus = MakeCallL(call2, num2); |
|
4941 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
4942 |
|
4943 // Create the conference |
|
4944 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
4945 CleanupStack::PushL(reqCreConfStatus); |
|
4946 |
|
4947 confCall.CreateConference(reqCreConfStatus); |
|
4948 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
4949 _L("RMobileConferenceCall::CreateConference timed out")); |
|
4950 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
4951 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
4952 |
|
4953 // Add the other calls |
|
4954 AddCallToConferenceL( confCall, call3, num3, 3 ); |
|
4955 TEST_CHECK_POINT_L(_L("Adding call3 failed")); |
|
4956 AddCallToConferenceL( confCall, call4, num4, 4 ); |
|
4957 TEST_CHECK_POINT_L(_L("Adding call4 failed")); |
|
4958 AddCallToConferenceL( confCall, call5, num5, 5 ); |
|
4959 TEST_CHECK_POINT_L(_L("Adding call5 failed")); |
|
4960 |
|
4961 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
4962 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
4963 CHECK_EQUALS_L(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
4964 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
4965 CHECK_EQUALS_L( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
4966 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
4967 |
|
4968 // |
|
4969 // SET UP END |
|
4970 // |
|
4971 |
|
4972 StartTest(); |
|
4973 |
|
4974 // |
|
4975 // TEST START |
|
4976 // |
|
4977 |
|
4978 // === Check conference caps, status and info are correct. === |
|
4979 TUint32 confCallCaps; |
|
4980 err = confCall.GetCaps(confCallCaps); |
|
4981 |
|
4982 // Check RMobileConferenceCall::GetCaps returns caps in set of KCapsHangUp | KCapsSwap |
|
4983 // Check RMobileConferenceCall::GetCaps returns caps NOT in set of KCapsCreate |
|
4984 ASSERT_BITS_SET(confCallCaps, RMobileConferenceCall::KCapsHangUp | RMobileConferenceCall::KCapsSwap, |
|
4985 RMobileConferenceCall::KCapsCreate, |
|
4986 _L("RMobileConferenceCall::GetCaps returned wrong bits") ); |
|
4987 |
|
4988 // Check RMobileConferenceCall::EnumerateCalls returns aCount = 5 |
|
4989 TInt callCount; |
|
4990 err = confCall.EnumerateCalls(callCount); |
|
4991 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::EnumerateCalls returned error")); |
|
4992 ASSERT_EQUALS(callCount,5, _L("RMobileConferenceCall::EnumerateCalls returned wrong count")); |
|
4993 |
|
4994 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
4995 err = confCall.GetConferenceStatus(confCallConfStatus); |
|
4996 ASSERT_EQUALS(err, KErrNone, _L("RMobileConferenceCall::GetConferenceStatus returned error")); |
|
4997 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
4998 _L("RMobileConferenceCall::GetConferenceStatus returned bad state")); |
|
4999 |
|
5000 // Hang up call 3 in the conference with RCall::HangUp |
|
5001 |
|
5002 // Setup the notification for the event |
|
5003 TExtEtelRequestStatus notifyConfEventStatus(confCall,EMobileConferenceCallNotifyConferenceEvent); |
|
5004 CleanupStack::PushL(notifyConfEventStatus); |
|
5005 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
5006 TName confEventCallName; |
|
5007 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
5008 |
|
5009 // Do the hangup |
|
5010 call3.HangUp(); |
|
5011 |
|
5012 // === Check conference event and status === |
|
5013 |
|
5014 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceCallRemoved |
|
5015 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( confCall, |
|
5016 notifyConfEventStatus, |
|
5017 confEvent,RMobileConferenceCall::EConferenceCallRemoved, |
|
5018 confEventCallName, |
|
5019 KErrNone); |
|
5020 |
|
5021 // Check RMobileConferenceCall::NotifyConferenceEvent completes with aCallName = callname of call 3 |
|
5022 RMobileCall::TCallInfo callInfo; |
|
5023 err = call3.GetInfo(callInfo); |
|
5024 ASSERT_EQUALS( err, KErrNone, _L("RCall::GetInfo returned error")); |
|
5025 ASSERT_EQUALS_DES16(confEventCallName, callInfo.iCallName, |
|
5026 _L("RMobileConferenceCall::NotifyConferenceEvent returned wrong call name") ); |
|
5027 |
|
5028 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
5029 ASSERT_EQUALS(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
5030 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
5031 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
5032 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
5033 |
|
5034 // Check RMobileConferenceCall::EnumerateCalls returns aCount = 4 |
|
5035 err = confCall.EnumerateCalls(callCount); |
|
5036 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::EnumerateCalls returned error")); |
|
5037 ASSERT_EQUALS(callCount,4, _L("RMobileConferenceCall::EnumerateCalls returned wrong count")); |
|
5038 |
|
5039 // === Get call info for all the calls in the conference === |
|
5040 // Check RMobileConferenceCall::GetMobileCallInfo returns |
|
5041 // valid iCallName |
|
5042 // correct number in iDialledParty |
|
5043 // valid iLineName |
|
5044 // valid iRemoteParty |
|
5045 // iStatus of EStatusConnected |
|
5046 // relevant bits set in iValid based on the above parameters |
|
5047 CheckConfCallInfo( confCall, num1, 1 ); |
|
5048 CheckConfCallInfo( confCall, num2, 2 ); // NB skipped 3! |
|
5049 CheckConfCallInfo( confCall, num4, 3 ); |
|
5050 CheckConfCallInfo( confCall, num5, 4 ); |
|
5051 |
|
5052 // Hang up conference call. |
|
5053 // set up notifications |
|
5054 TExtEtelRequestStatus notifyCapsChangeStatus(confCall, EMobileConferenceCallNotifyCapsChange); |
|
5055 CleanupStack::PushL(notifyCapsChangeStatus); |
|
5056 confCall.NotifyCapsChange(notifyCapsChangeStatus, confCallCaps); |
|
5057 |
|
5058 TExtEtelRequestStatus notifyConfStatusChange(confCall, EMobileConferenceCallNotifyConferenceStatusChange); |
|
5059 CleanupStack::PushL(notifyConfStatusChange); |
|
5060 RMobileConferenceCall::TMobileConferenceStatus confStatus; |
|
5061 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
5062 |
|
5063 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
5064 |
|
5065 // do the hangup |
|
5066 TExtEtelRequestStatus reqHangupStatus(confCall, EMobileConferenceCallHangUp ); |
|
5067 CleanupStack::PushL(reqHangupStatus); |
|
5068 |
|
5069 confCall.HangUp(reqHangupStatus); |
|
5070 err = WaitForRequestWithTimeOut(reqHangupStatus,ETimeMedium); |
|
5071 ASSERT_EQUALS(err,KErrNone,_L("RMobileConferenceCall::HangUp timed out")); |
|
5072 ASSERT_EQUALS(reqHangupStatus.Int(),KErrNone,_L("RMobileConferenceCall::HangUp returned an error")); |
|
5073 |
|
5074 // === Check conference caps === |
|
5075 // Check RMobileConferenceCall::NotifyCapsChange completes with caps of 0 |
|
5076 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyCapsChange(confCall, |
|
5077 notifyCapsChangeStatus, |
|
5078 confCallCaps, |
|
5079 0, |
|
5080 KNoUnwantedBits, |
|
5081 KErrNone); |
|
5082 // Just for the log |
|
5083 ASSERT_EQUALS(confCallCaps,(TUint32)0,_L("RMobileConferenceCall::NotifyCapsChange returned non-zero caps")); |
|
5084 |
|
5085 // Check RMobileConferenceCall::GetCaps returns caps of 0 |
|
5086 err = confCall.GetCaps(confCallCaps); |
|
5087 ASSERT_EQUALS(confCallCaps,(TUint32)0,_L("RMobileConferenceCall::NotifyCapsChange returned non-zero caps")); |
|
5088 |
|
5089 // === Check conference event === |
|
5090 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceCallRemoved |
|
5091 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( confCall, |
|
5092 notifyConfEventStatus, |
|
5093 confEvent,RMobileConferenceCall::EConferenceCallRemoved, |
|
5094 confEventCallName, |
|
5095 KErrNone); |
|
5096 // Just for the log |
|
5097 // $CTSYProblem completes with EConferenceCallRemoved |
|
5098 ASSERT_EQUALS(confEvent,RMobileConferenceCall::EConferenceCallRemoved, |
|
5099 _L("RMobileConferenceCall::NotifyConferenceEvent returned wrong event")); |
|
5100 |
|
5101 // === Check conference status === |
|
5102 |
|
5103 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceIdle |
|
5104 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
5105 notifyConfStatusChange, |
|
5106 confStatus,RMobileConferenceCall::EConferenceIdle, |
|
5107 KErrNone); |
|
5108 |
|
5109 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceIdle |
|
5110 err = confCall.GetConferenceStatus(confStatus); |
|
5111 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::GetConferenceStatus returned an error ")); |
|
5112 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceIdle, |
|
5113 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
5114 |
|
5115 // |
|
5116 // TEST END |
|
5117 // |
|
5118 |
|
5119 StartCleanup(); |
|
5120 |
|
5121 // Hangup calls |
|
5122 call1.HangUp(); |
|
5123 call2.HangUp(); |
|
5124 call4.HangUp(); |
|
5125 call5.HangUp(); |
|
5126 |
|
5127 // reqHangupStatus |
|
5128 // notifyConfStatusChange |
|
5129 // notifyCapsChangeStatus |
|
5130 // notifyConfEventStatus |
|
5131 // reqCreConfStatus |
|
5132 CleanupStack::PopAndDestroy( 5, &reqCreConfStatus ); |
|
5133 |
|
5134 return TestStepResult(); |
|
5135 } |
|
5136 |
|
5137 TPtrC CCTSYIntegrationTestConferenceCallControl0020::GetTestStepName() |
|
5138 /** |
|
5139 * @return The test step name. |
|
5140 */ |
|
5141 { |
|
5142 return _L("CCTSYIntegrationTestConferenceCallControl0020"); |
|
5143 } |
|
5144 |
|
5145 |
|
5146 |
|
5147 CCTSYIntegrationTestConferenceCallControl0021::CCTSYIntegrationTestConferenceCallControl0021(CEtelSessionMgr& aEtelSessionMgr) |
|
5148 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
5149 /** |
|
5150 * Constructor. |
|
5151 */ |
|
5152 { |
|
5153 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0021::GetTestStepName()); |
|
5154 } |
|
5155 |
|
5156 CCTSYIntegrationTestConferenceCallControl0021::~CCTSYIntegrationTestConferenceCallControl0021() |
|
5157 /** |
|
5158 * Destructor. |
|
5159 */ |
|
5160 { |
|
5161 } |
|
5162 |
|
5163 TVerdict CCTSYIntegrationTestConferenceCallControl0021::doTestStepL() |
|
5164 /** |
|
5165 * @SYMTestCaseID BA-CTSY-INT-CONC-0021 |
|
5166 * @SYMFssID BA/CTSY/CONC-0021 |
|
5167 * @SYMTestCaseDesc Remote party terminates call in a five party conference call. |
|
5168 * @SYMTestPriority High |
|
5169 * @SYMTestActions RMobileConferenceCall::NotifyConferenceStatusChange, RMobileConferenceCall::GetMobileCallInfo, RMobileCall::NotifyCallEvent, RMobileConferenceCall::NotifyCapsChange, RMobileConferenceCall::GetCaps, RMobileConferenceCall::EnumerateCalls, RMobileConferenceCall::GetConferenceStatus |
|
5170 * @SYMTestExpectedResults Pass - Conference is still active and conference notifications complete correctly. |
|
5171 * @SYMTestType CIT |
|
5172 * @SYMTestCaseDependencies live/manual |
|
5173 * |
|
5174 * Reason for test: Verify call hung up. Verify conference call notifications complete correctly. |
|
5175 * |
|
5176 * @return - TVerdict code |
|
5177 */ |
|
5178 { |
|
5179 |
|
5180 // |
|
5181 // SET UP |
|
5182 // |
|
5183 |
|
5184 // Create basic 5 party conference call (one call should be to RPS). |
|
5185 |
|
5186 // For this manual test the user must set up a number they can answer and hang up on number 3 |
|
5187 _LIT(KPromptCheckNum3,"Check that the INI file has a \"RPS\" number you can answer on VoiceNumber3"); |
|
5188 DisplayUserInteractionPromptL(KPromptCheckNum3); |
|
5189 |
|
5190 // Make sure we are on the network |
|
5191 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
5192 |
|
5193 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL( phone ); |
|
5194 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
5195 |
|
5196 // Get the test numbers |
|
5197 TPtrC num1, num2, num3, num4, num5; |
|
5198 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
5199 _L("Failed to obtain 1st number for test") ); |
|
5200 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
5201 _L("Failed to obtain 2nd number for test") ); |
|
5202 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber3, num3), |
|
5203 _L("Failed to obtain 3rd number for test") ); |
|
5204 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber4, num4), |
|
5205 _L("Failed to obtain 4th number for test") ); |
|
5206 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber5, num5), |
|
5207 _L("Failed to obtain 5th number for test") ); |
|
5208 |
|
5209 // Get conference call subsession. |
|
5210 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
5211 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
5212 |
|
5213 // and the call objects |
|
5214 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
5215 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
5216 RMobileCall& call3 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall3 ); |
|
5217 RMobileCall& call4 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall4 ); |
|
5218 RMobileCall& call5 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall5 ); |
|
5219 |
|
5220 // Create a three party conference call (two remote parties). |
|
5221 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
5222 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
5223 |
|
5224 // Hold 1st call |
|
5225 callStatus = HoldCallL(call1); |
|
5226 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
5227 |
|
5228 // Make second call |
|
5229 callStatus = MakeCallL(call2, num2); |
|
5230 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
5231 |
|
5232 // Create the conference |
|
5233 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
5234 CleanupStack::PushL(reqCreConfStatus); |
|
5235 |
|
5236 confCall.CreateConference(reqCreConfStatus); |
|
5237 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
5238 _L("RMobileConferenceCall::CreateConference timed out")); |
|
5239 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
5240 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
5241 |
|
5242 // Add the other calls |
|
5243 AddCallToConferenceL( confCall, call3, num3, 3 ); |
|
5244 TEST_CHECK_POINT_L(_L("Adding call3 failed")); |
|
5245 AddCallToConferenceL( confCall, call4, num4, 4 ); |
|
5246 TEST_CHECK_POINT_L(_L("Adding call4 failed")); |
|
5247 AddCallToConferenceL( confCall, call5, num5, 5 ); |
|
5248 TEST_CHECK_POINT_L(_L("Adding call5 failed")); |
|
5249 |
|
5250 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
5251 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
5252 CHECK_EQUALS_L(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
5253 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
5254 CHECK_EQUALS_L( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
5255 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
5256 |
|
5257 |
|
5258 // |
|
5259 // SET UP END |
|
5260 // |
|
5261 |
|
5262 StartTest(); |
|
5263 |
|
5264 // |
|
5265 // TEST START |
|
5266 // |
|
5267 |
|
5268 |
|
5269 // === Check conference caps, status and info are correct. === |
|
5270 |
|
5271 TUint32 confCallCaps; |
|
5272 err = confCall.GetCaps(confCallCaps); |
|
5273 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::GetCaps returned error")); |
|
5274 |
|
5275 // Check RMobileConferenceCall::GetCaps returns caps in set of KCapsHangUp | KCapsSwap |
|
5276 // Check RMobileConferenceCall::GetCaps returns caps NOT in set of KCapsCreate |
|
5277 ASSERT_BITS_SET(confCallCaps, RMobileConferenceCall::KCapsHangUp | RMobileConferenceCall::KCapsSwap, |
|
5278 RMobileConferenceCall::KCapsCreate, |
|
5279 _L("RMobileConferenceCall::GetCaps returned wrong bits") ); |
|
5280 |
|
5281 // Check RMobileConferenceCall::EnumerateCalls returns aCount = 5 |
|
5282 TInt callCount; |
|
5283 err = confCall.EnumerateCalls(callCount); |
|
5284 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::EnumerateCalls returned error")); |
|
5285 ASSERT_EQUALS(callCount,5, _L("RMobileConferenceCall::EnumerateCalls returned wrong count")); |
|
5286 |
|
5287 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
5288 ASSERT_EQUALS(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
5289 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
5290 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
5291 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
5292 |
|
5293 // RPS hangs up. |
|
5294 |
|
5295 // Setup the notification for change in call status |
|
5296 TExtEtelRequestStatus notifyCallEventStatus( call3, EMobileCallNotifyCallEvent ); |
|
5297 CleanupStack::PushL( notifyCallEventStatus ); |
|
5298 RMobileCall::TMobileCallEvent callEvent; |
|
5299 call3.NotifyCallEvent(notifyCallEventStatus, callEvent); |
|
5300 |
|
5301 // Setup the notification for the conference event |
|
5302 TExtEtelRequestStatus notifyConfEventStatus(confCall,EMobileConferenceCallNotifyConferenceEvent); |
|
5303 CleanupStack::PushL(notifyConfEventStatus); |
|
5304 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
5305 TName confEventCallName; |
|
5306 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
5307 |
|
5308 // Hangup the RPS call |
|
5309 _LIT(KPromptForHangup,"Please hangup \"RPS\" call (call 3)"); |
|
5310 DisplayUserInteractionPromptL(KPromptForHangup); |
|
5311 |
|
5312 // === Check for notification of remote termination === |
|
5313 // Check RMobileCall::NotifyCallEvent completes with ERemoteTerminated. |
|
5314 iCallControlTsyTestHelper.WaitForMobileCallNotifyCallEvent(call3, |
|
5315 notifyCallEventStatus, |
|
5316 callEvent, |
|
5317 RMobileCall::ERemoteTerminated, |
|
5318 KErrNone ); |
|
5319 |
|
5320 // === Check conference event and status === |
|
5321 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceCallRemoved |
|
5322 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( confCall, |
|
5323 notifyConfEventStatus, |
|
5324 confEvent,RMobileConferenceCall::EConferenceCallRemoved, |
|
5325 confEventCallName, |
|
5326 KErrNone); |
|
5327 |
|
5328 // Check RMobileConferenceCall::NotifyConferenceEvent completes with aCallName = callname of call 3 |
|
5329 RMobileCall::TCallInfo callInfo; |
|
5330 err = call3.GetInfo(callInfo); |
|
5331 ASSERT_EQUALS( err, KErrNone, _L("RCall::GetInfo returned error")); |
|
5332 ASSERT_EQUALS_DES16( confEventCallName, |
|
5333 callInfo.iCallName, |
|
5334 _L("RMobileConferenceCall::NotifyConferenceEvent returned wrong call name") ); |
|
5335 |
|
5336 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
5337 ASSERT_EQUALS(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
5338 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
5339 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
5340 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
5341 |
|
5342 // Check RMobileConferenceCall::EnumerateCalls returns aCount = 4 |
|
5343 err = confCall.EnumerateCalls(callCount); |
|
5344 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::EnumerateCalls returned error")); |
|
5345 ASSERT_EQUALS(callCount,4, _L("RMobileConferenceCall::EnumerateCalls returned wrong count")); |
|
5346 |
|
5347 // === Get call info for all the calls in the conference === |
|
5348 // Check RMobileConferenceCall::GetMobileCallInfo returns |
|
5349 // valid iCallName |
|
5350 // correct number in iDialledParty |
|
5351 // valid iLineName |
|
5352 // valid iRemoteParty |
|
5353 // iStatus of EStatusConnected |
|
5354 // relevant bits set in iValid based on the above parameters |
|
5355 CheckConfCallInfo( confCall, num1, 1 ); |
|
5356 CheckConfCallInfo( confCall, num2, 2 ); // NB skipped 3! |
|
5357 CheckConfCallInfo( confCall, num4, 3 ); |
|
5358 CheckConfCallInfo( confCall, num5, 4 ); |
|
5359 |
|
5360 // Hang up conference call. |
|
5361 // set up notifications |
|
5362 TExtEtelRequestStatus notifyCapsChangeStatus(confCall, EMobileConferenceCallNotifyCapsChange); |
|
5363 CleanupStack::PushL(notifyCapsChangeStatus); |
|
5364 confCall.NotifyCapsChange(notifyCapsChangeStatus, confCallCaps); |
|
5365 |
|
5366 TExtEtelRequestStatus notifyConfStatusChange(confCall, EMobileConferenceCallNotifyConferenceStatusChange); |
|
5367 CleanupStack::PushL(notifyConfStatusChange); |
|
5368 RMobileConferenceCall::TMobileConferenceStatus confStatus; |
|
5369 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
5370 |
|
5371 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
5372 |
|
5373 // do the hangup |
|
5374 TExtEtelRequestStatus reqHangupStatus(confCall, EMobileConferenceCallHangUp ); |
|
5375 CleanupStack::PushL(reqHangupStatus); |
|
5376 |
|
5377 confCall.HangUp(reqHangupStatus); |
|
5378 err = WaitForRequestWithTimeOut(reqHangupStatus,ETimeMedium); |
|
5379 ASSERT_EQUALS(err,KErrNone,_L("RMobileConferenceCall::HangUp timed out")); |
|
5380 ASSERT_EQUALS(reqHangupStatus.Int(),KErrNone,_L("RMobileConferenceCall::HangUp returned an error")); |
|
5381 |
|
5382 // === Check conference caps === |
|
5383 // Check RMobileConferenceCall::NotifyCapsChange completes with caps of 0 |
|
5384 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyCapsChange(confCall, |
|
5385 notifyCapsChangeStatus, |
|
5386 confCallCaps, |
|
5387 0, |
|
5388 KNoUnwantedBits, |
|
5389 KErrNone); |
|
5390 // Just for the log |
|
5391 ASSERT_EQUALS(confCallCaps,(TUint32)0,_L("RMobileConferenceCall::NotifyCapsChange returned non-zero caps")); |
|
5392 |
|
5393 // Check RMobileConferenceCall::GetCaps returns caps of 0 |
|
5394 err = confCall.GetCaps(confCallCaps); |
|
5395 ASSERT_EQUALS(confCallCaps,(TUint32)0,_L("RMobileConferenceCall::NotifyCapsChange returned non-zero caps")); |
|
5396 |
|
5397 // === Check conference event === |
|
5398 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceCallRemoved |
|
5399 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( confCall, |
|
5400 notifyConfEventStatus, |
|
5401 confEvent,RMobileConferenceCall::EConferenceCallRemoved, |
|
5402 confEventCallName, |
|
5403 KErrNone); |
|
5404 // Just for the log |
|
5405 ASSERT_EQUALS(confEvent,RMobileConferenceCall::EConferenceCallRemoved, |
|
5406 _L("RMobileConferenceCall::NotifyConferenceEvent returned wrong event")); |
|
5407 |
|
5408 // === Check conference status === |
|
5409 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceIdle |
|
5410 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
5411 notifyConfStatusChange, |
|
5412 confStatus,RMobileConferenceCall::EConferenceIdle, |
|
5413 KErrNone); |
|
5414 |
|
5415 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceIdle |
|
5416 err = confCall.GetConferenceStatus(confStatus); |
|
5417 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::GetConferenceStatus returned an error ")); |
|
5418 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceIdle, |
|
5419 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
5420 |
|
5421 // |
|
5422 // TEST END |
|
5423 // |
|
5424 |
|
5425 StartCleanup(); |
|
5426 |
|
5427 // hang up calls |
|
5428 call1.HangUp(); |
|
5429 call2.HangUp(); |
|
5430 call3.HangUp(); |
|
5431 call4.HangUp(); |
|
5432 call5.HangUp(); |
|
5433 |
|
5434 // reqHangupStatus |
|
5435 // notifyConfStatusChange |
|
5436 // notifyCapsChangeStatus |
|
5437 // notifyConfEventStatus |
|
5438 // notifyCallEventStatus |
|
5439 // reqCreConfStatus |
|
5440 CleanupStack::PopAndDestroy( 6, &reqCreConfStatus ); |
|
5441 |
|
5442 |
|
5443 // |
|
5444 // TEST END |
|
5445 // |
|
5446 |
|
5447 StartCleanup(); |
|
5448 |
|
5449 // Put any required test clean up here, then remove this comment |
|
5450 |
|
5451 return TestStepResult(); |
|
5452 } |
|
5453 |
|
5454 TPtrC CCTSYIntegrationTestConferenceCallControl0021::GetTestStepName() |
|
5455 /** |
|
5456 * @return The test step name. |
|
5457 */ |
|
5458 { |
|
5459 return _L("CCTSYIntegrationTestConferenceCallControl0021"); |
|
5460 } |
|
5461 |
|
5462 |
|
5463 |
|
5464 CCTSYIntegrationTestConferenceCallControl0022::CCTSYIntegrationTestConferenceCallControl0022(CEtelSessionMgr& aEtelSessionMgr) |
|
5465 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
5466 /** |
|
5467 * Constructor. |
|
5468 */ |
|
5469 { |
|
5470 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0022::GetTestStepName()); |
|
5471 } |
|
5472 |
|
5473 CCTSYIntegrationTestConferenceCallControl0022::~CCTSYIntegrationTestConferenceCallControl0022() |
|
5474 /** |
|
5475 * Destructor. |
|
5476 */ |
|
5477 { |
|
5478 } |
|
5479 |
|
5480 TVerdict CCTSYIntegrationTestConferenceCallControl0022::doTestStepL() |
|
5481 /** |
|
5482 * @SYMTestCaseID BA-CTSY-INT-CONC-0022 |
|
5483 * @SYMFssID BA/CTSY/CONC-0022 |
|
5484 * @SYMTestCaseDesc Attempt to add a sixth party to a five party conference call. |
|
5485 * @SYMTestPriority High |
|
5486 * @SYMTestActions RMobileConferenceCall::NotifyConferenceStatusChange, RMobileConferenceCall::EnumerateCalls, RMobileConferenceCall::GetCaps, RMobileConferenceCall::AddCall, RMobileCall::GetMobileCallStatus, RMobileConferenceCall::Swap, RMobileConferenceCall::GetConferenceStatus, RCall::Dial |
|
5487 * @SYMTestExpectedResults Pass - Error on attempt to add a 6th call to the conference. |
|
5488 * @SYMTestType CIT |
|
5489 * @SYMTestCaseDependencies live/automatic |
|
5490 * |
|
5491 * Reason for test: Verify error returned and conference call is still active. |
|
5492 * |
|
5493 * @return - TVerdict code |
|
5494 */ |
|
5495 { |
|
5496 |
|
5497 // |
|
5498 // SET UP |
|
5499 // |
|
5500 |
|
5501 |
|
5502 // Create basic 5 party conference call. |
|
5503 // Make sure we are on the network |
|
5504 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
5505 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL( phone ); |
|
5506 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
5507 |
|
5508 // Get the test numbers |
|
5509 TPtrC num1, num2, num3, num4, num5; |
|
5510 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
5511 _L("Failed to obtain 1st number for test") ); |
|
5512 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
5513 _L("Failed to obtain 2nd number for test") ); |
|
5514 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber3, num3), |
|
5515 _L("Failed to obtain 3rd number for test") ); |
|
5516 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber4, num4), |
|
5517 _L("Failed to obtain 4th number for test") ); |
|
5518 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber5, num5), |
|
5519 _L("Failed to obtain 5th number for test") ); |
|
5520 |
|
5521 // Get conference call subsession. |
|
5522 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
5523 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
5524 |
|
5525 // and the call objects |
|
5526 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
5527 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
5528 RMobileCall& call3 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall3 ); |
|
5529 RMobileCall& call4 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall4 ); |
|
5530 RMobileCall& call5 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall5 ); |
|
5531 |
|
5532 // Create a three party conference call (two remote parties). |
|
5533 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
5534 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
5535 |
|
5536 // Hold 1st call |
|
5537 callStatus = HoldCallL(call1); |
|
5538 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
5539 |
|
5540 // Make second call |
|
5541 callStatus = MakeCallL(call2, num2); |
|
5542 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
5543 |
|
5544 // Create the conference |
|
5545 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
5546 CleanupStack::PushL(reqCreConfStatus); |
|
5547 |
|
5548 confCall.CreateConference(reqCreConfStatus); |
|
5549 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
5550 _L("RMobileConferenceCall::CreateConference timed out")); |
|
5551 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
5552 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
5553 |
|
5554 // Add the other calls |
|
5555 AddCallToConferenceL( confCall, call3, num3, 3 ); |
|
5556 TEST_CHECK_POINT_L(_L("Adding call3 failed")); |
|
5557 AddCallToConferenceL( confCall, call4, num4, 4 ); |
|
5558 TEST_CHECK_POINT_L(_L("Adding call4 failed")); |
|
5559 AddCallToConferenceL( confCall, call5, num5, 5 ); |
|
5560 TEST_CHECK_POINT_L(_L("Adding call5 failed")); |
|
5561 |
|
5562 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
5563 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
5564 CHECK_EQUALS_L(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
5565 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
5566 CHECK_EQUALS_L( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
5567 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
5568 |
|
5569 // Get call 6. |
|
5570 // Get its number, too |
|
5571 TPtrC num6; |
|
5572 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber6, num6), |
|
5573 _L("Failed to obtain 6th number for test") ); |
|
5574 RMobileCall& call6 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall6 ); |
|
5575 |
|
5576 // |
|
5577 // SET UP END |
|
5578 // |
|
5579 |
|
5580 StartTest(); |
|
5581 |
|
5582 // |
|
5583 // TEST START |
|
5584 // |
|
5585 |
|
5586 // Swap the conference call with RMobileConferenceCall::Swap |
|
5587 |
|
5588 // Setup the status change notification |
|
5589 TExtEtelRequestStatus notifyConfStatusChange(confCall, EMobileConferenceCallNotifyConferenceStatusChange); |
|
5590 CleanupStack::PushL(notifyConfStatusChange); |
|
5591 RMobileConferenceCall::TMobileConferenceStatus confStatus; |
|
5592 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
5593 |
|
5594 // Do the swap |
|
5595 TExtEtelRequestStatus reqSwapConfStatus(confCall,EMobileConferenceCallSwap); |
|
5596 CleanupStack::PushL(reqSwapConfStatus); |
|
5597 confCall.Swap(reqSwapConfStatus); |
|
5598 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqSwapConfStatus,ETimeShort),KErrNone, |
|
5599 _L("RMobileConferenceCall::Swap timed out")); |
|
5600 ASSERT_EQUALS( reqSwapConfStatus.Int(),KErrNone, |
|
5601 _L("RMobileConferenceCall::Swap returned error")); |
|
5602 |
|
5603 // === Check conference status === |
|
5604 |
|
5605 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceHold |
|
5606 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
5607 notifyConfStatusChange, |
|
5608 confStatus,RMobileConferenceCall::EConferenceHold, |
|
5609 KErrNone ); |
|
5610 |
|
5611 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceHold |
|
5612 err = confCall.GetConferenceStatus(confStatus); |
|
5613 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::GetConferenceStatus returned an error ")); |
|
5614 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceHold, |
|
5615 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
5616 |
|
5617 // Dial a number that answers on call 6. |
|
5618 // Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusDialling -> EStatusConnecting -> EStatusConnected. |
|
5619 // Check RMobileCall::GetMobileCallStatus returns status of EStatusConnected. |
|
5620 callStatus = MakeCallL(call6, num6); |
|
5621 ASSERT_EQUALS(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call6")); |
|
5622 |
|
5623 // Attempt to add call 6 to the conference with RMobileConferenceCall::AddCall |
|
5624 TExtEtelRequestStatus reqAddCallStatus(confCall,EMobileConferenceCallAddCall); |
|
5625 CleanupStack::PushL(reqAddCallStatus); |
|
5626 |
|
5627 // Get the call info (need the name) |
|
5628 RCall::TCallInfo callInfo; |
|
5629 err = call6.GetInfo(callInfo); |
|
5630 ASSERT_EQUALS( err, KErrNone, _L("RCall::GetInfo returned error")); |
|
5631 |
|
5632 |
|
5633 confCall.AddCall(reqAddCallStatus,callInfo.iCallName); |
|
5634 ASSERT_EQUALS( WaitForRequestWithTimeOut(reqAddCallStatus,ETimeShort),KErrNone, |
|
5635 _L("RMobileConferenceCall::AddCall timed out")); |
|
5636 |
|
5637 // Check error is returned. |
|
5638 ASSERT_TRUE( reqAddCallStatus.Int() != KErrNone, _L("RMobileConferenceCall::AddCall returned KErrNone")); |
|
5639 |
|
5640 // === Check conference caps, status and info are correct. === |
|
5641 TUint32 confCallCaps; |
|
5642 err = confCall.GetCaps(confCallCaps); |
|
5643 |
|
5644 // Check RMobileConferenceCall::GetCaps returns caps in set of KCapsHangUp | KCapsSwap |
|
5645 // Check RMobileConferenceCall::GetCaps returns caps NOT in set of KCapsCreate |
|
5646 ASSERT_BITS_SET(confCallCaps, RMobileConferenceCall::KCapsHangUp | RMobileConferenceCall::KCapsSwap, |
|
5647 RMobileConferenceCall::KCapsCreate, |
|
5648 _L("RMobileConferenceCall::GetCaps returned wrong bits") ); |
|
5649 |
|
5650 // Check RMobileConferenceCall::EnumerateCalls returns aCount = 5 |
|
5651 TInt callCount; |
|
5652 err = confCall.EnumerateCalls(callCount); |
|
5653 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::EnumerateCalls returned error")); |
|
5654 ASSERT_EQUALS(callCount,5, _L("RMobileConferenceCall::EnumerateCalls returned wrong count")); |
|
5655 |
|
5656 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceHold |
|
5657 CHECK_EQUALS_L(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
5658 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
5659 CHECK_EQUALS_L( confCallConfStatus, RMobileConferenceCall::EConferenceHold, |
|
5660 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceHold")); |
|
5661 |
|
5662 |
|
5663 // |
|
5664 // TEST END |
|
5665 // |
|
5666 |
|
5667 StartCleanup(); |
|
5668 |
|
5669 // Hangup calls |
|
5670 call1.HangUp(); |
|
5671 call2.HangUp(); |
|
5672 call3.HangUp(); |
|
5673 call4.HangUp(); |
|
5674 call5.HangUp(); |
|
5675 call6.HangUp(); |
|
5676 |
|
5677 // reqAddCallStatus |
|
5678 // reqSwapConfStatus |
|
5679 // notifyConfStatusChange |
|
5680 // reqCreConfStatus |
|
5681 CleanupStack::PopAndDestroy( 4, &reqCreConfStatus ); |
|
5682 |
|
5683 return TestStepResult(); |
|
5684 } |
|
5685 |
|
5686 TPtrC CCTSYIntegrationTestConferenceCallControl0022::GetTestStepName() |
|
5687 /** |
|
5688 * @return The test step name. |
|
5689 */ |
|
5690 { |
|
5691 return _L("CCTSYIntegrationTestConferenceCallControl0022"); |
|
5692 } |
|
5693 |
|
5694 |
|
5695 |
|
5696 CCTSYIntegrationTestConferenceCallControl0023::CCTSYIntegrationTestConferenceCallControl0023(CEtelSessionMgr& aEtelSessionMgr) |
|
5697 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
5698 /** |
|
5699 * Constructor. |
|
5700 */ |
|
5701 { |
|
5702 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0023::GetTestStepName()); |
|
5703 } |
|
5704 |
|
5705 CCTSYIntegrationTestConferenceCallControl0023::~CCTSYIntegrationTestConferenceCallControl0023() |
|
5706 /** |
|
5707 * Destructor. |
|
5708 */ |
|
5709 { |
|
5710 } |
|
5711 |
|
5712 TVerdict CCTSYIntegrationTestConferenceCallControl0023::doTestStepL() |
|
5713 /** |
|
5714 * @SYMTestCaseID BA-CTSY-INT-CONC-0023 |
|
5715 * @SYMFssID BA/CTSY/CONC-0023 |
|
5716 * @SYMTestCaseDesc Go one to one with call in a two party conference call. |
|
5717 * @SYMTestPriority High |
|
5718 * @SYMTestActions RMobileConferenceCall::NotifyConferenceStatusChange, RMobileConferenceCall::GetCaps, RMobileConferenceCall::GetConferenceStatus, RMobileCall::GoOneToOne, RMobileConferenceCall::NotifyCapsChange, RMobileCall::GetMobileCallCaps, RCall::HangUp |
|
5719 * @SYMTestExpectedResults Pass - Go one to one succeeds. |
|
5720 * @SYMTestType CIT |
|
5721 * @SYMTestCaseDependencies live/automatic |
|
5722 * |
|
5723 * Reason for test: Verify go one to one succeeds. Verify conference call notifications complete correctly. |
|
5724 * |
|
5725 * @return - TVerdict code |
|
5726 */ |
|
5727 { |
|
5728 |
|
5729 // |
|
5730 // SET UP |
|
5731 // |
|
5732 |
|
5733 // Create basic 2 party conference call. |
|
5734 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
5735 |
|
5736 // Make sure we are on the network |
|
5737 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL( phone ); |
|
5738 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
5739 |
|
5740 // Get the test numbers |
|
5741 TPtrC num1, num2; |
|
5742 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
5743 _L("Failed to obtain 1st number for test") ); |
|
5744 |
|
5745 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
5746 _L("Failed to obtain 2nd number for test") ); |
|
5747 |
|
5748 // Get conference call subsession. |
|
5749 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
5750 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
5751 |
|
5752 // and the call objects |
|
5753 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
5754 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
5755 |
|
5756 // Create a three party conference call (two remote parties). |
|
5757 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
5758 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
5759 |
|
5760 // Hold 1st call |
|
5761 callStatus = HoldCallL(call1); |
|
5762 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
5763 |
|
5764 // Make second call |
|
5765 callStatus = MakeCallL(call2, num2); |
|
5766 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
5767 |
|
5768 // Create the conference |
|
5769 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
5770 CleanupStack::PushL(reqCreConfStatus); |
|
5771 |
|
5772 confCall.CreateConference(reqCreConfStatus); |
|
5773 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
5774 _L("RMobileConferenceCall::CreateConference timed out")); |
|
5775 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
5776 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
5777 |
|
5778 // |
|
5779 // SET UP END |
|
5780 // |
|
5781 |
|
5782 StartTest(); |
|
5783 |
|
5784 // |
|
5785 // TEST START |
|
5786 // |
|
5787 |
|
5788 // Check RMobileCall::GetMobileCallCaps for second call includes iCallControlCaps in set of KCapsOneToOne |
|
5789 // Check RMobileCall::GetMobileCallCaps for second call includes iCallControlCaps NOT in set of KCapsJoin |
|
5790 RMobileCall::TMobileCallCapsV1 callCaps; |
|
5791 RMobileCall::TMobileCallCapsV1Pckg callCapsPkg(callCaps); |
|
5792 |
|
5793 err = call2.GetMobileCallCaps(callCapsPkg); |
|
5794 ASSERT_EQUALS(err,KErrNone,_L("RMobileCall::GetMobileCallCaps returned an error")); |
|
5795 ASSERT_BITS_SET( callCaps.iCallControlCaps, RMobileCall::KCapsOneToOne, RMobileCall::KCapsJoin, |
|
5796 _L("RMobileCall::GetMobileCallCaps returned wrong bits in iCallControlCaps")); |
|
5797 |
|
5798 // Go one to one with second call with RMobileCall::GoOneToOne |
|
5799 |
|
5800 // set up the notification for the conference status change |
|
5801 TExtEtelRequestStatus notifyConfStatusChange(confCall, EMobileConferenceCallNotifyConferenceStatusChange); |
|
5802 CleanupStack::PushL(notifyConfStatusChange); |
|
5803 RMobileConferenceCall::TMobileConferenceStatus confStatus; |
|
5804 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
5805 |
|
5806 // Setup the notification for the conference event |
|
5807 TExtEtelRequestStatus notifyConfEventStatus(confCall,EMobileConferenceCallNotifyConferenceEvent); |
|
5808 CleanupStack::PushL(notifyConfEventStatus); |
|
5809 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
5810 TName confEventCallName; |
|
5811 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
5812 |
|
5813 // set up conf call caps change notification |
|
5814 TExtEtelRequestStatus notifyCapsChangeStatus(confCall, EMobileConferenceCallNotifyCapsChange); |
|
5815 CleanupStack::PushL(notifyCapsChangeStatus); |
|
5816 |
|
5817 TUint32 confCallCaps; |
|
5818 confCall.NotifyCapsChange(notifyCapsChangeStatus, confCallCaps); |
|
5819 |
|
5820 // Get the name of call1 for comparison |
|
5821 RCall::TCallInfo call1Info; |
|
5822 err = call1.GetInfo(call1Info); |
|
5823 ASSERT_EQUALS( err, KErrNone, _L("RCall::GetInfo returned error")); |
|
5824 |
|
5825 // Check RCall::GetInfo for call returns valid call name. |
|
5826 ASSERT_TRUE(call1Info.iCallName.Length() > 0, _L("RCall::GetInfo returned empty iCallName")); |
|
5827 |
|
5828 // make the GoOneToOne call |
|
5829 TExtEtelRequestStatus reqGoOneToOneStatus(call2,EMobileCallGoOneToOne); |
|
5830 CleanupStack::PushL(reqGoOneToOneStatus); |
|
5831 |
|
5832 call2.GoOneToOne(reqGoOneToOneStatus); |
|
5833 err = WaitForRequestWithTimeOut(reqGoOneToOneStatus, ETimeShort ); |
|
5834 ASSERT_EQUALS( err, KErrNone, _L("RMobileCall::GoOneToOne timed out")); |
|
5835 ASSERT_EQUALS( reqGoOneToOneStatus.Int(), KErrNone, _L("RMobileCall::GoOneToOne returned error")); |
|
5836 |
|
5837 // === Check the conference goes to idle === |
|
5838 |
|
5839 // === Check conference event === |
|
5840 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceCallRemoved |
|
5841 // (call 1 has been removed) |
|
5842 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( confCall, |
|
5843 notifyConfEventStatus, |
|
5844 confEvent,RMobileConferenceCall::EConferenceCallRemoved, |
|
5845 confEventCallName, |
|
5846 KErrNone); |
|
5847 |
|
5848 ASSERT_EQUALS_DES16( confEventCallName, call1Info.iCallName, |
|
5849 _L("RMobileConferenceCall::NotifyConferenceEvent returned event for wrong call") ) |
|
5850 |
|
5851 // === Check conference status === |
|
5852 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceIdle |
|
5853 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
5854 notifyConfStatusChange, |
|
5855 confStatus,RMobileConferenceCall::EConferenceIdle, |
|
5856 KErrNone); |
|
5857 |
|
5858 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceIdle |
|
5859 err = confCall.GetConferenceStatus(confStatus); |
|
5860 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::GetConferenceStatus returned an error ")); |
|
5861 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceIdle, |
|
5862 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
5863 |
|
5864 // === Check conference caps === |
|
5865 // Check RMobileConferenceCall::NotifyCapsChange completes with caps of KCapsCreate |
|
5866 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyCapsChange(confCall, |
|
5867 notifyCapsChangeStatus, |
|
5868 confCallCaps, |
|
5869 RMobileConferenceCall::KCapsCreate, |
|
5870 KNoUnwantedBits, |
|
5871 KErrNone); |
|
5872 ASSERT_EQUALS(confCallCaps, (TUint32)RMobileConferenceCall::KCapsCreate, |
|
5873 _L("RMobileConferenceCall::NotifyCapsChange returned incorrect caps")); |
|
5874 |
|
5875 // Check RMobileConferenceCall::GetCaps returns caps of KCapsCreate |
|
5876 err = confCall.GetCaps(confCallCaps); |
|
5877 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::GetCaps returned an error ")); |
|
5878 ASSERT_EQUALS(confCallCaps, (TUint32)RMobileConferenceCall::KCapsCreate, |
|
5879 _L("RMobileConferenceCall::GetCaps returned incorrect caps")); |
|
5880 |
|
5881 // === Hangup call 1 == |
|
5882 |
|
5883 // set up notifier |
|
5884 confCall.NotifyCapsChange(notifyCapsChangeStatus, confCallCaps); |
|
5885 |
|
5886 // Do the hangup |
|
5887 err = call1.HangUp(); |
|
5888 ASSERT_EQUALS( err, KErrNone, _L("RCall::HangUp returned an error ")); |
|
5889 |
|
5890 // === Check conference caps === |
|
5891 // Check RMobileConferenceCall::NotifyCapsChange completes with caps of 0 |
|
5892 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyCapsChange(confCall, |
|
5893 notifyCapsChangeStatus, |
|
5894 confCallCaps, |
|
5895 0, |
|
5896 KNoUnwantedBits, |
|
5897 KErrNone); |
|
5898 // Logging |
|
5899 ASSERT_EQUALS( confCallCaps, (TUint32)0,_L("RMobileConferenceCall::NotifyCapsChange returned incorrect caps")); |
|
5900 |
|
5901 // Check RMobileConferenceCall::GetCaps returns caps of 0 |
|
5902 err = confCall.GetCaps(confCallCaps); |
|
5903 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::GetCaps returned an error ")); |
|
5904 ASSERT_EQUALS(confCallCaps,(TUint32)0,_L("RMobileConferenceCall::NotifyCapsChange returned non-zero caps")); |
|
5905 |
|
5906 // Hang up second call. |
|
5907 err = call2.HangUp(); |
|
5908 ASSERT_EQUALS( err, KErrNone, _L("RCall::HangUp returned an error ")); |
|
5909 |
|
5910 |
|
5911 // |
|
5912 // TEST END |
|
5913 // |
|
5914 |
|
5915 StartCleanup(); |
|
5916 |
|
5917 // reqGoOneToOneStatus |
|
5918 // notifyCapsChangeStatus |
|
5919 // notifyConfEventStatus |
|
5920 // notifyConfStatusChange |
|
5921 // reqCreConfStatus |
|
5922 CleanupStack::PopAndDestroy( 5, &reqCreConfStatus ); |
|
5923 |
|
5924 return TestStepResult(); |
|
5925 } |
|
5926 |
|
5927 TPtrC CCTSYIntegrationTestConferenceCallControl0023::GetTestStepName() |
|
5928 /** |
|
5929 * @return The test step name. |
|
5930 */ |
|
5931 { |
|
5932 return _L("CCTSYIntegrationTestConferenceCallControl0023"); |
|
5933 } |
|
5934 |
|
5935 |
|
5936 |
|
5937 CCTSYIntegrationTestConferenceCallControl0024::CCTSYIntegrationTestConferenceCallControl0024(CEtelSessionMgr& aEtelSessionMgr) |
|
5938 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
5939 /** |
|
5940 * Constructor. |
|
5941 */ |
|
5942 { |
|
5943 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0024::GetTestStepName()); |
|
5944 } |
|
5945 |
|
5946 CCTSYIntegrationTestConferenceCallControl0024::~CCTSYIntegrationTestConferenceCallControl0024() |
|
5947 /** |
|
5948 * Destructor. |
|
5949 */ |
|
5950 { |
|
5951 } |
|
5952 |
|
5953 TVerdict CCTSYIntegrationTestConferenceCallControl0024::doTestStepL() |
|
5954 /** |
|
5955 * @SYMTestCaseID BA-CTSY-INT-CONC-0024 |
|
5956 * @SYMFssID BA/CTSY/CONC-0024 |
|
5957 * @SYMTestCaseDesc Check the last client closing an active conference call hangs it up cleanly |
|
5958 * @SYMTestPriority High |
|
5959 * @SYMTestActions RTelServer::Close, RMobilePhone::GetMobileCallStatus, RMobilePhone::Close, RMobileConferenceCall::Close, RMobilePhone::Open, User::After, RTelServer::Connect, RTelServer::SetExtendedErrorGranularity, RMobileConferenceCall::EnumerateCalls, RMobileConferenceCall::Open |
|
5960 * @SYMTestExpectedResults Pass - Conference call hung up successfully. |
|
5961 * @SYMTestType CIT |
|
5962 * @SYMTestCaseDependencies live/automatic |
|
5963 * |
|
5964 * Reason for test: Verify call in conference becomes idle when last client closes session. |
|
5965 * |
|
5966 * @return - TVerdict code |
|
5967 */ |
|
5968 { |
|
5969 |
|
5970 // |
|
5971 // SET UP |
|
5972 // |
|
5973 |
|
5974 // Create basic 2 party conference call. |
|
5975 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
5976 |
|
5977 // Call TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL |
|
5978 CHECK_EQUALS_L(iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error")); |
|
5979 |
|
5980 // Get the test numbers |
|
5981 TPtrC num1, num2; |
|
5982 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
5983 _L("Failed to obtain 1st number for test") ); |
|
5984 |
|
5985 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
5986 _L("Failed to obtain 2nd number for test") ); |
|
5987 |
|
5988 // Get conference call subsession. |
|
5989 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
5990 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
5991 |
|
5992 // and the call objects |
|
5993 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
5994 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
5995 |
|
5996 // Create a three party conference call (two remote parties). |
|
5997 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
5998 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
5999 |
|
6000 // Hold 1st call |
|
6001 callStatus = HoldCallL(call1); |
|
6002 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
6003 |
|
6004 // Make second call |
|
6005 callStatus = MakeCallL(call2, num2); |
|
6006 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
6007 |
|
6008 // Create the conference |
|
6009 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
6010 CleanupStack::PushL(reqCreConfStatus); |
|
6011 |
|
6012 confCall.CreateConference(reqCreConfStatus); |
|
6013 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
6014 _L("RMobileConferenceCall::CreateConference timed out")); |
|
6015 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
6016 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
6017 |
|
6018 // Ensure conference call is active. |
|
6019 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
6020 CHECK_EQUALS_L(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
6021 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
6022 CHECK_EQUALS_L( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
6023 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
6024 |
|
6025 // |
|
6026 // SET UP END |
|
6027 // |
|
6028 |
|
6029 StartTest(); |
|
6030 |
|
6031 // |
|
6032 // TEST START |
|
6033 // |
|
6034 |
|
6035 // === Open second phone client === |
|
6036 |
|
6037 // Declare a second RTelServer subsession (RTelServer 2) |
|
6038 // Connect to it with RTelServer::Connect |
|
6039 RTelServer telServer = iEtelSessionMgr.GetServerL(KAltServer); |
|
6040 ASSERT_EQUALS(telServer.Connect(), KErrNone, _L("RTelServer::Connect returned with error")); |
|
6041 |
|
6042 // Set extended error granularity RTelServer::SetExtendedErrorGranularity(RTelServer::EErrorExtended) |
|
6043 ASSERT_EQUALS(telServer.SetExtendedErrorGranularity(RTelServer::EErrorExtended), KErrNone, _L("RTelServer::SetExtendedErrorGranularity returned with error")); |
|
6044 |
|
6045 // Load the TSY with RTelServer::LoadPhoneModule |
|
6046 TBufC<10> fileName = _L("PHONETSY"); |
|
6047 ASSERT_EQUALS(telServer.LoadPhoneModule(fileName), KErrNone, _L("RTelServer::SetExtendedErrorGranularity returned with error")); |
|
6048 |
|
6049 // Declare a new RMobilePhone (phone 2) |
|
6050 // Open the phone with RMobilePhone::Open with aSession=alternate RTelServer |
|
6051 RMobilePhone& phone2 = iEtelSessionMgr.GetPhoneL(KAltServer, KMainPhone); |
|
6052 |
|
6053 // === Open a second RMobileConference call subsession with second client === |
|
6054 |
|
6055 // === and enumerate calls === |
|
6056 |
|
6057 // Declare a RMobileConferenceCall subsession (conference call 2) |
|
6058 // Open the RMobileConferenceCall with RMobileConferenceCall::Open |
|
6059 RMobileConferenceCall& confCall2 = iEtelSessionMgr.GetConferenceCallL(KAltServer,KMainPhone,KMainConferenceCall); |
|
6060 |
|
6061 // Check RMobileConferenceCall::EnumerateCalls returns aCount=2 |
|
6062 TInt enumerateCallsCount; |
|
6063 TInt requireEnumerateCallsCount = 2; |
|
6064 |
|
6065 ASSERT_EQUALS(confCall2.EnumerateCalls(enumerateCallsCount), KErrNone, _L("RMobileConferenceCall::EnumerateCalls returned with error")); |
|
6066 ASSERT_EQUALS(enumerateCallsCount, requireEnumerateCallsCount, _L("RMobileConferenceCall::EnumerateCalls did not return 2")); |
|
6067 |
|
6068 // Close the conference call 2 subsession with RMobileConferenceCall::Close |
|
6069 iEtelSessionMgr.ReleaseConferenceCall(KAltServer,KMainPhone,KMainConferenceCall); |
|
6070 |
|
6071 // Wait 10 seconds to allow calls to be cleaned up with User::After(); |
|
6072 User::After(10 * KOneSecond); |
|
6073 |
|
6074 // Check RMobileConferenceCall::EnumerateCalls with (conference call 1 subsession) returns aCount=2 |
|
6075 ASSERT_EQUALS(confCall.EnumerateCalls(enumerateCallsCount), KErrNone, _L("RMobileConferenceCall::EnumerateCalls returned with error")); |
|
6076 ASSERT_EQUALS(enumerateCallsCount, requireEnumerateCallsCount, _L("RMobileConferenceCall::EnumerateCalls did not return 2")); |
|
6077 |
|
6078 // Close the phone 2 subsession with RMobilePhone::Close |
|
6079 iEtelSessionMgr.ReleasePhone(KAltServer, KMainPhone); |
|
6080 |
|
6081 // Close the RTelServer 2 subsession with RTelServer::Close |
|
6082 iEtelSessionMgr.ReleaseServer(KAltServer); |
|
6083 |
|
6084 // === Check one of the calls is still connected === |
|
6085 |
|
6086 // Check RMobilePhone::GetMobileCallStatus on one of the calls in the conference returns EStatusConnected |
|
6087 RMobileCall::TMobileCallStatus getMobileCallStatus; |
|
6088 ASSERT_EQUALS(call1.GetMobileCallStatus(getMobileCallStatus), KErrNone, _L("RMobileCall::GetMobileCallStatus returned with error")); |
|
6089 ASSERT_EQUALS(getMobileCallStatus, RMobileCall::EStatusConnected, _L("RMobileCall::GetMobileCallStatus did not return EStatusConnected")); |
|
6090 |
|
6091 // === Close the conference call subsession and check call is idle === |
|
6092 |
|
6093 // Close the first conference call subsession with RMobileConferenceCall::Close |
|
6094 iEtelSessionMgr.ReleaseConferenceCall(KMainServer,KMainPhone,KMainConferenceCall); |
|
6095 |
|
6096 User::After(5 * KOneSecond); |
|
6097 |
|
6098 // Check RMobilePhone::GetMobileCallStatus on one of the calls in the conference returns EStatusIdle |
|
6099 ASSERT_EQUALS(call1.GetMobileCallStatus(getMobileCallStatus), KErrNone, _L("RMobileCall::GetMobileCallStatus returned with error")); |
|
6100 ASSERT_EQUALS(getMobileCallStatus, RMobileCall::EStatusIdle, _L("RMobileCall::GetMobileCallStatus did not return EStatusIdle")); |
|
6101 |
|
6102 // |
|
6103 // TEST END |
|
6104 // |
|
6105 |
|
6106 StartCleanup(); |
|
6107 |
|
6108 CleanupStack::PopAndDestroy(&reqCreConfStatus); |
|
6109 |
|
6110 return TestStepResult(); |
|
6111 } |
|
6112 |
|
6113 TPtrC CCTSYIntegrationTestConferenceCallControl0024::GetTestStepName() |
|
6114 /** |
|
6115 * @return The test step name. |
|
6116 */ |
|
6117 { |
|
6118 return _L("CCTSYIntegrationTestConferenceCallControl0024"); |
|
6119 } |
|
6120 |
|
6121 |
|
6122 |
|
6123 CCTSYIntegrationTestConferenceCallControl0025::CCTSYIntegrationTestConferenceCallControl0025(CEtelSessionMgr& aEtelSessionMgr) |
|
6124 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
6125 /** |
|
6126 * Constructor. |
|
6127 */ |
|
6128 { |
|
6129 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0025::GetTestStepName()); |
|
6130 } |
|
6131 |
|
6132 CCTSYIntegrationTestConferenceCallControl0025::~CCTSYIntegrationTestConferenceCallControl0025() |
|
6133 /** |
|
6134 * Destructor. |
|
6135 */ |
|
6136 { |
|
6137 } |
|
6138 |
|
6139 TVerdict CCTSYIntegrationTestConferenceCallControl0025::doTestStepL() |
|
6140 /** |
|
6141 * @SYMTestCaseID BA-CTSY-INT-CONC-0025 |
|
6142 * @SYMFssID BA/CTSY/CONC-0025 |
|
6143 * @SYMTestCaseDesc Go one to one with call in a five party conference call. |
|
6144 * @SYMTestPriority High |
|
6145 * @SYMTestActions RMobileConferenceCall::NotifyConferenceStatusChange, RCall::HangUp, RMobileCall::GoOneToOne, RMobileConferenceCall::NotifyCapsChange, RMobileConferenceCall::GetCaps, RMobileConferenceCall::GetConferenceStatus, RMobileConferenceCall::HangUp, RMobileCall::GetMobileCallCaps |
|
6146 * @SYMTestExpectedResults Pass - Go one to one succeeds. |
|
6147 * @SYMTestType CIT |
|
6148 * @SYMTestCaseDependencies live/automatic |
|
6149 * |
|
6150 * Reason for test: Verify go one to one succeeds. Verify conference call notifications complete correctly. |
|
6151 * |
|
6152 * @return - TVerdict code |
|
6153 */ |
|
6154 { |
|
6155 |
|
6156 // |
|
6157 // SET UP |
|
6158 // |
|
6159 |
|
6160 // Create basic 5 party conference call. |
|
6161 // Make sure we are on the network |
|
6162 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
6163 TInt err = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL( phone ); |
|
6164 CHECK_EQUALS_L( err, KErrNone, _L("Failed to register on home network")); |
|
6165 |
|
6166 // Get the test numbers |
|
6167 TPtrC num1, num2, num3, num4, num5; |
|
6168 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
6169 _L("Failed to obtain 1st number for test") ); |
|
6170 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
6171 _L("Failed to obtain 2nd number for test") ); |
|
6172 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber3, num3), |
|
6173 _L("Failed to obtain 3rd number for test") ); |
|
6174 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber4, num4), |
|
6175 _L("Failed to obtain 4th number for test") ); |
|
6176 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber5, num5), |
|
6177 _L("Failed to obtain 5th number for test") ); |
|
6178 |
|
6179 // Get conference call subsession. |
|
6180 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
6181 RMobileLine& line1 = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KVoiceLine); |
|
6182 |
|
6183 // and the call objects |
|
6184 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
6185 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
6186 RMobileCall& call3 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall3 ); |
|
6187 RMobileCall& call4 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall4 ); |
|
6188 RMobileCall& call5 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall5 ); |
|
6189 |
|
6190 // Create a three party conference call (two remote parties). |
|
6191 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
6192 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
6193 |
|
6194 // Hold 1st call |
|
6195 callStatus = HoldCallL(call1); |
|
6196 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
6197 |
|
6198 // Make second call |
|
6199 callStatus = MakeCallL(call2, num2); |
|
6200 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
6201 |
|
6202 // Create the conference |
|
6203 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
6204 CleanupStack::PushL(reqCreConfStatus); |
|
6205 |
|
6206 confCall.CreateConference(reqCreConfStatus); |
|
6207 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
6208 _L("RMobileConferenceCall::CreateConference timed out")); |
|
6209 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
6210 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
6211 |
|
6212 // Add the other calls |
|
6213 AddCallToConferenceL( confCall, call3, num3, 3 ); |
|
6214 AddCallToConferenceL( confCall, call4, num4, 4 ); |
|
6215 AddCallToConferenceL( confCall, call5, num5, 5 ); |
|
6216 |
|
6217 // |
|
6218 // SET UP END |
|
6219 // |
|
6220 |
|
6221 StartTest(); |
|
6222 |
|
6223 // |
|
6224 // TEST START |
|
6225 // |
|
6226 |
|
6227 // Check RMobileCall::GetMobileCallCaps for third call includes iCallEventCaps in set of KCapsOneToOne |
|
6228 // Check RMobileCall::GetMobileCallCaps for third call includes iCallEventCaps NOT in set of KCapsJoin |
|
6229 RMobileCall::TMobileCallCapsV1 callCaps; |
|
6230 RMobileCall::TMobileCallCapsV1Pckg callCapsPkg(callCaps); |
|
6231 |
|
6232 err = call3.GetMobileCallCaps(callCapsPkg); |
|
6233 ASSERT_EQUALS(err,KErrNone,_L("RMobileCall::GetMobileCallCaps returned an error")); |
|
6234 ASSERT_BITS_SET( callCaps.iCallControlCaps, RMobileCall::KCapsOneToOne, RMobileCall::KCapsJoin, |
|
6235 _L("RMobileCall::GetMobileCallCaps returned wrong bits in iCallControlCaps")); |
|
6236 |
|
6237 // Go one to one with third call with RMobileCall::GoOneToOne |
|
6238 |
|
6239 // set up the notification for the conference status change |
|
6240 TExtEtelRequestStatus notifyConfStatusChange(confCall, EMobileConferenceCallNotifyConferenceStatusChange); |
|
6241 CleanupStack::PushL(notifyConfStatusChange); |
|
6242 RMobileConferenceCall::TMobileConferenceStatus confStatus; |
|
6243 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
6244 |
|
6245 // make the GoOneToOne call |
|
6246 TExtEtelRequestStatus reqGoOneToOneStatus(call3,EMobileCallGoOneToOne); |
|
6247 CleanupStack::PushL(reqGoOneToOneStatus); |
|
6248 call3.GoOneToOne(reqGoOneToOneStatus); |
|
6249 err = WaitForRequestWithTimeOut(reqGoOneToOneStatus, ETimeShort ); |
|
6250 ASSERT_EQUALS( err, KErrNone, _L("RMobileCall::GoOneToOne timed out")); |
|
6251 ASSERT_EQUALS( reqGoOneToOneStatus.Int(), KErrNone, _L("RMobileCall::GoOneToOne returned error")); |
|
6252 |
|
6253 // === Check conference call goes on automatic hold === |
|
6254 |
|
6255 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceHold |
|
6256 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
6257 notifyConfStatusChange, |
|
6258 confStatus,RMobileConferenceCall::EConferenceHold, |
|
6259 KErrNone); |
|
6260 |
|
6261 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceHold |
|
6262 err = confCall.GetConferenceStatus(confStatus); |
|
6263 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::GetConferenceStatus returned an error ")); |
|
6264 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceHold, |
|
6265 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
6266 |
|
6267 // Hang up third call with RCall::HangUp |
|
6268 |
|
6269 // Setup the notification for the conference event |
|
6270 TExtEtelRequestStatus notifyConfEventStatus(confCall,EMobileConferenceCallNotifyConferenceEvent); |
|
6271 CleanupStack::PushL(notifyConfEventStatus); |
|
6272 RMobileConferenceCall::TMobileConferenceEvent confEvent; |
|
6273 TName confEventCallName; |
|
6274 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
6275 |
|
6276 // setup the notification for conference status change |
|
6277 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
6278 |
|
6279 // do the hangup |
|
6280 err = call3.HangUp(); |
|
6281 ASSERT_EQUALS( err, KErrNone, _L("RCall::HangUp returned an error ")); |
|
6282 |
|
6283 // === Check number of calls in conference === |
|
6284 |
|
6285 // Check RMobileConferenceCall::EnumerateCalls returns aCount = 4 |
|
6286 TUint32 confCallCaps; |
|
6287 TInt callCount; |
|
6288 err = confCall.EnumerateCalls(callCount); |
|
6289 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::EnumerateCalls returned error")); |
|
6290 ASSERT_EQUALS( callCount, 4,_L("RMobileConferenceCall::EnumerateCalls returned wrong count") ); |
|
6291 |
|
6292 // === Check conference event === |
|
6293 |
|
6294 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceCallRemoved |
|
6295 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent( confCall, |
|
6296 notifyConfEventStatus, |
|
6297 confEvent,RMobileConferenceCall::EConferenceCallRemoved, |
|
6298 confEventCallName, |
|
6299 KErrNone); |
|
6300 |
|
6301 // Check RMobileConferenceCall::NotifyConferenceEvent completes with aCallName = callname of call 3 |
|
6302 RMobileCall::TCallInfo callInfo; |
|
6303 err = call3.GetInfo(callInfo); |
|
6304 ASSERT_EQUALS( err, KErrNone, _L("RCall::GetInfo returned error")); |
|
6305 ASSERT_EQUALS_DES16(confEventCallName, callInfo.iCallName, |
|
6306 _L("RMobileConferenceCall::NotifyConferenceEvent returned wrong call name") ); |
|
6307 |
|
6308 // === Check conference status === |
|
6309 |
|
6310 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceActive |
|
6311 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
6312 notifyConfStatusChange, |
|
6313 confStatus,RMobileConferenceCall::EConferenceActive, |
|
6314 KErrNone); |
|
6315 |
|
6316 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceActive |
|
6317 RMobileConferenceCall::TMobileConferenceStatus confCallConfStatus; |
|
6318 ASSERT_EQUALS(confCall.GetConferenceStatus(confCallConfStatus), KErrNone, |
|
6319 _L("RMobileConferenceCall::GetConferenceStatus returned an error")); |
|
6320 ASSERT_EQUALS( confCallConfStatus, RMobileConferenceCall::EConferenceActive, |
|
6321 _L("RMobileConferenceCall::GetConferenceStatus did not return EConferenceActive")); |
|
6322 |
|
6323 // Hang up conference call with RMobileConferenceCall::HangUp |
|
6324 |
|
6325 // set up caps change notify |
|
6326 TExtEtelRequestStatus notifyCapsChangeStatus(confCall, EMobileConferenceCallNotifyCapsChange); |
|
6327 CleanupStack::PushL(notifyCapsChangeStatus); |
|
6328 confCall.NotifyCapsChange(notifyCapsChangeStatus, confCallCaps); |
|
6329 |
|
6330 // Set up status change notify |
|
6331 confCall.NotifyConferenceStatusChange(notifyConfStatusChange, confStatus ); |
|
6332 |
|
6333 // Set up event notify |
|
6334 confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, confEventCallName); |
|
6335 |
|
6336 // do the hangup |
|
6337 TExtEtelRequestStatus reqHangupStatus(confCall, EMobileConferenceCallHangUp ); |
|
6338 CleanupStack::PushL(reqHangupStatus); |
|
6339 confCall.HangUp(reqHangupStatus); |
|
6340 err = WaitForRequestWithTimeOut(reqHangupStatus,ETimeMedium); |
|
6341 ASSERT_EQUALS(err,KErrNone,_L("RMobileConferenceCall::HangUp timed out")); |
|
6342 ASSERT_EQUALS(reqHangupStatus.Int(),KErrNone,_L("RMobileConferenceCall::HangUp returned an error")); |
|
6343 |
|
6344 // === Check conference caps === |
|
6345 // Check RMobileConferenceCall::NotifyCapsChange completes with caps of 0 |
|
6346 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyCapsChange(confCall, |
|
6347 notifyCapsChangeStatus, |
|
6348 confCallCaps, |
|
6349 0, |
|
6350 KNoUnwantedBits, |
|
6351 KErrNone); |
|
6352 ASSERT_EQUALS(confCallCaps,(TUint32)0,_L("RMobileConferenceCall::NotifyCapsChange returned non-zero caps")); |
|
6353 |
|
6354 // Check RMobileConferenceCall::GetCaps returns caps of 0 |
|
6355 err = confCall.GetCaps(confCallCaps); |
|
6356 ASSERT_EQUALS(confCallCaps,(TUint32)0,_L("RMobileConferenceCall::NotifyCapsChange returned non-zero caps")); |
|
6357 |
|
6358 // === Check conference event === |
|
6359 |
|
6360 // Check RMobileConferenceCall::NotifyConferenceEvent completes with EConferenceTerminated |
|
6361 // $CTSYKnownFailure defect id=10018 this notification is not delivered (times out) |
|
6362 ERR_PRINTF1(_L("<font color=Orange>$CTSYKnownFailure: defect id = 10018</font>")); |
|
6363 /****** |
|
6364 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceEvent(confCall, |
|
6365 notifyConfEventStatus, |
|
6366 confEvent, |
|
6367 RMobileConferenceCall::EConferenceTerminated, |
|
6368 confEventCallName, |
|
6369 KErrNone); |
|
6370 ******/ |
|
6371 // === Check conference status === |
|
6372 // Check RMobileConferenceCall::NotifyConferenceStatusChange completes with EConferenceIdle |
|
6373 iCallControlTsyTestHelper.WaitForMobileConferenceCallNotifyConferenceStatusChange( confCall, |
|
6374 notifyConfStatusChange, |
|
6375 confStatus,RMobileConferenceCall::EConferenceIdle, |
|
6376 KErrNone); |
|
6377 |
|
6378 // Check RMobileConferenceCall::GetConferenceStatus returns EConferenceIdle |
|
6379 err = confCall.GetConferenceStatus(confStatus); |
|
6380 ASSERT_EQUALS( err, KErrNone, _L("RMobileConferenceCall::GetConferenceStatus returned an error ")); |
|
6381 ASSERT_EQUALS( confStatus,RMobileConferenceCall::EConferenceIdle, |
|
6382 _L("RMobileConferenceCall::GetConferenceStatus returned unexpected result")); |
|
6383 |
|
6384 // |
|
6385 // TEST END |
|
6386 // |
|
6387 |
|
6388 StartCleanup(); |
|
6389 |
|
6390 // reqHangupStatus |
|
6391 // notifyCapsChangeStatus |
|
6392 // notifyConfEventStatus |
|
6393 // reqGoOneToOneStatus |
|
6394 // notifyConfStatusChange |
|
6395 // reqCreConfStatus |
|
6396 CleanupStack::PopAndDestroy( 6, &reqCreConfStatus ); |
|
6397 return TestStepResult(); |
|
6398 } |
|
6399 |
|
6400 TPtrC CCTSYIntegrationTestConferenceCallControl0025::GetTestStepName() |
|
6401 /** |
|
6402 * @return The test step name. |
|
6403 */ |
|
6404 { |
|
6405 return _L("CCTSYIntegrationTestConferenceCallControl0025"); |
|
6406 } |
|
6407 |
|
6408 |
|
6409 |
|
6410 CCTSYIntegrationTestConferenceCallControl0026::CCTSYIntegrationTestConferenceCallControl0026(CEtelSessionMgr& aEtelSessionMgr) |
|
6411 : CCTSYIntegrationTestConferenceCallControlBase(aEtelSessionMgr) |
|
6412 /** |
|
6413 * Constructor. |
|
6414 */ |
|
6415 { |
|
6416 SetTestStepName(CCTSYIntegrationTestConferenceCallControl0026::GetTestStepName()); |
|
6417 } |
|
6418 |
|
6419 CCTSYIntegrationTestConferenceCallControl0026::~CCTSYIntegrationTestConferenceCallControl0026() |
|
6420 /** |
|
6421 * Destructor. |
|
6422 */ |
|
6423 { |
|
6424 } |
|
6425 |
|
6426 TVerdict CCTSYIntegrationTestConferenceCallControl0026::doTestStepL() |
|
6427 /** |
|
6428 * @SYMTestCaseID BA-CTSY-INT-CONC-0026 |
|
6429 * @SYMFssID BA/CTSY/CONC-0026 |
|
6430 * @SYMTestCaseDesc Go one to one with a call that is not part of a conference. |
|
6431 * @SYMTestPriority High |
|
6432 * @SYMTestActions RMobileCall::GetMobileCallStatus, RMobileCall::GoOneToOne, RMobileCall::GetMobileCallCaps, RCall::Dial |
|
6433 * @SYMTestExpectedResults Pass - KErrNotSupported returned. |
|
6434 * @SYMTestType CIT |
|
6435 * @SYMTestCaseDependencies live/automatic |
|
6436 * |
|
6437 * Reason for test: Verify KErrNotSupported is returned and call caps are correct. |
|
6438 * |
|
6439 * @return - TVerdict code |
|
6440 */ |
|
6441 { |
|
6442 |
|
6443 // |
|
6444 // SET UP |
|
6445 // |
|
6446 |
|
6447 // Create a basic 2 party conference call. |
|
6448 RMobilePhone& phone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
6449 |
|
6450 // Call TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL |
|
6451 CHECK_EQUALS_L(iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(phone), KErrNone, _L("TNetworkTsyTestHelper::WaitForRegisteredOnHomeNetworkL returned with an error")); |
|
6452 |
|
6453 // Get the test numbers |
|
6454 TPtrC num1, num2, num3; |
|
6455 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber1, num1), |
|
6456 _L("Failed to obtain 1st number for test") ); |
|
6457 |
|
6458 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber2, num2), |
|
6459 _L("Failed to obtain 2nd number for test") ); |
|
6460 |
|
6461 CHECK_TRUE_L( GetStringFromConfig( KIniVoiceNumSection, KIniVoiceNumber3, num3), |
|
6462 _L("Failed to obtain 3rd number for test") ); |
|
6463 |
|
6464 // Get conference call subsession. |
|
6465 RMobileConferenceCall& confCall = iEtelSessionMgr.GetConferenceCallL(KMainServer,KMainPhone,KMainConferenceCall); |
|
6466 |
|
6467 // and the call objects |
|
6468 RMobileCall& call1 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall1 ); |
|
6469 RMobileCall& call2 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall2 ); |
|
6470 |
|
6471 // Create a three party conference call (two remote parties). |
|
6472 RMobileCall::TMobileCallStatus callStatus = MakeCallL(call1, num1); |
|
6473 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call1")); |
|
6474 |
|
6475 // Hold 1st call |
|
6476 callStatus = HoldCallL(call1); |
|
6477 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusHold,_L("Failed to hold call1")); |
|
6478 |
|
6479 // Make second call |
|
6480 callStatus = MakeCallL(call2, num2); |
|
6481 CHECK_EQUALS_L(callStatus,RMobileCall::EStatusConnected,_L("Failed to connect call2")); |
|
6482 |
|
6483 // Create the conference |
|
6484 TExtEtelRequestStatus reqCreConfStatus(phone, EMobileConferenceCallCreateConference); |
|
6485 CleanupStack::PushL(reqCreConfStatus); |
|
6486 |
|
6487 confCall.CreateConference(reqCreConfStatus); |
|
6488 CHECK_EQUALS_L( WaitForRequestWithTimeOut(reqCreConfStatus,ETimeShort),KErrNone, |
|
6489 _L("RMobileConferenceCall::CreateConference timed out")); |
|
6490 CHECK_EQUALS_L( reqCreConfStatus.Int(),KErrNone, |
|
6491 _L("RMobileConferenceCall::CreateConference returned an error")); |
|
6492 |
|
6493 // Get call 3. |
|
6494 RMobileCall& call3 = iEtelSessionMgr.GetCallL(KMainServer, KMainPhone, KVoiceLine, KCall3 ); |
|
6495 |
|
6496 // |
|
6497 // SET UP END |
|
6498 // |
|
6499 |
|
6500 StartTest(); |
|
6501 |
|
6502 // |
|
6503 // TEST START |
|
6504 // |
|
6505 |
|
6506 // Dial a number that answers on call 3. |
|
6507 // Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusDialling -> EStatusConnecting -> EStatusConnected. |
|
6508 callStatus = MakeCallL(call3, num3); |
|
6509 ASSERT_EQUALS(callStatus, RMobileCall::EStatusConnected,_L("Failed to connect call3")); |
|
6510 |
|
6511 // Check RMobileCall::GetMobileCallStatus returns status of EStatusConnected. |
|
6512 RMobileCall::TMobileCallStatus getMobileCallStatus; |
|
6513 ASSERT_EQUALS(call3.GetMobileCallStatus(getMobileCallStatus), KErrNone, _L("RMobileCall::GetMobileCallStatus returned error")); ; |
|
6514 ASSERT_EQUALS(getMobileCallStatus, RMobileCall::EStatusConnected,_L("RMobileCall::GetMobileCallStatus did not return EStatusConnected")); |
|
6515 |
|
6516 // Check RMobileCall::GetMobileCallCaps includes iCallEventCaps in set of KCapsJoin |
|
6517 // Check RMobileCall::GetMobileCallCaps includes iCallEventCaps NOT in set of KCapsOneToOne |
|
6518 RMobileCall::TMobileCallCapsV1 callCaps; |
|
6519 RMobileCall::TMobileCallCapsV1Pckg callCapsPkg(callCaps); |
|
6520 |
|
6521 ASSERT_EQUALS(call3.GetMobileCallCaps(callCapsPkg), KErrNone, _L("RMobileCall::GetMobileCallCaps returned error")); ; |
|
6522 ASSERT_BITS_SET(callCaps.iCallControlCaps, RMobileCall::KCapsJoin, RMobileCall::KCapsOneToOne, |
|
6523 _L("RMobileCall::GetMobileCallCaps returned wrong bits in iCallControlCaps")); |
|
6524 |
|
6525 // Try to go one to one with call 3 using RMobileCall::GoOneToOne |
|
6526 TExtEtelRequestStatus goOneToOneStatus(call3, EMobileCallGoOneToOne); |
|
6527 CleanupStack::PushL(goOneToOneStatus); |
|
6528 |
|
6529 call3.GoOneToOne(goOneToOneStatus); |
|
6530 |
|
6531 // Check KErrNotSupported is returned. |
|
6532 ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 10046); |
|
6533 TInt err = WaitForRequestWithTimeOut(goOneToOneStatus, ETimeShort); |
|
6534 ASSERT_EQUALS(err, KErrNotSupported, _L("RMobileCall::GoOneToOne timed out")); |
|
6535 |
|
6536 // |
|
6537 // TEST END |
|
6538 // |
|
6539 |
|
6540 StartCleanup(); |
|
6541 |
|
6542 // Put any required test clean up here, then remove this comment |
|
6543 CleanupStack::PopAndDestroy(&reqCreConfStatus); |
|
6544 CleanupStack::PopAndDestroy(&goOneToOneStatus); |
|
6545 |
|
6546 return TestStepResult(); |
|
6547 } |
|
6548 |
|
6549 TPtrC CCTSYIntegrationTestConferenceCallControl0026::GetTestStepName() |
|
6550 /** |
|
6551 * @return The test step name. |
|
6552 */ |
|
6553 { |
|
6554 return _L("CCTSYIntegrationTestConferenceCallControl0026"); |
|
6555 } |
|
6556 |
|
6557 |
|
6558 |