24
|
1 |
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// The TEFUnit test suite for CallControlMultipartyControl in the Common TSY.
|
|
15 |
//
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
/**
|
|
20 |
@file
|
|
21 |
*/
|
|
22 |
|
|
23 |
#include "cctsycallcontrolmultipartyfu.h"
|
|
24 |
#include "mockltsyindicatorids.h"
|
|
25 |
|
|
26 |
#include <etel.h>
|
|
27 |
#include <etelmm.h>
|
|
28 |
#include <et_clsvr.h>
|
|
29 |
#include <ctsy/mmtsy_names.h>
|
|
30 |
#include <ctsy/serviceapi/mmtsy_ipcdefs.h>
|
|
31 |
#include <test/tmockltsydata.h>
|
|
32 |
#include <ctsy/serviceapi/gsmerror.h>
|
|
33 |
#include <ctsy/ltsy/mltsydispatchcallcontrolmultipartyinterface.h>
|
|
34 |
#include <ctsy/ltsy/mltsydispatchcallcontrolinterface.h>
|
|
35 |
|
|
36 |
CTestSuite* CCTsyCallControlMultipartyFU::CreateSuiteL(const TDesC& aName)
|
|
37 |
{
|
|
38 |
SUB_SUITE;
|
|
39 |
|
|
40 |
//add use-case tests
|
|
41 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlMultipartyFU, TestUseCase0001L);
|
|
42 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlMultipartyFU, TestUseCase0002L);
|
|
43 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlMultipartyFU, TestUseCase0003L);
|
|
44 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlMultipartyFU, TestUseCase0004L);
|
|
45 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlMultipartyFU, TestUseCase0005L);
|
|
46 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlMultipartyFU, TestUseCase0006L);
|
|
47 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlMultipartyFU, TestUseCase0007L);
|
|
48 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlMultipartyFU, TestUseCase0008L);
|
|
49 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlMultipartyFU, TestUseCase0009L);
|
|
50 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlMultipartyFU, TestUseCase0010L);
|
|
51 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlMultipartyFU, TestUseCase0011L);
|
|
52 |
|
|
53 |
//add other unit tests
|
|
54 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlMultipartyFU, TestUnit0001L);
|
|
55 |
|
|
56 |
END_SUITE;
|
|
57 |
}
|
|
58 |
|
|
59 |
|
|
60 |
//
|
|
61 |
// Use-case tests
|
|
62 |
//
|
|
63 |
|
|
64 |
/**
|
|
65 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROLMULTIPARTY-UC0001
|
|
66 |
@SYMComponent telephony_ctsy
|
|
67 |
@SYMTestCaseDesc Test support in CTSY for creating a multiparty conference call
|
|
68 |
@SYMTestPriority High
|
|
69 |
@SYMTestActions Invokes dialling two calls and creating a conference call
|
|
70 |
@SYMTestExpectedResults Pass
|
|
71 |
@SYMTestType CT
|
|
72 |
*/
|
|
73 |
void CCTsyCallControlMultipartyFU::TestUseCase0001L()
|
|
74 |
{
|
|
75 |
OpenEtelServerL(EUseExtendedError);
|
|
76 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
77 |
OpenPhoneL();
|
|
78 |
|
|
79 |
TInt callId1 = 1;
|
|
80 |
TInt callId2 = 2;
|
|
81 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
82 |
DriverCreateConferenceCallL(mobileService, callId1, callId2);
|
|
83 |
|
|
84 |
RBuf8 data;
|
|
85 |
CleanupClosePushL(data);
|
|
86 |
|
|
87 |
RArray<TInt> callIds;
|
|
88 |
CleanupClosePushL( callIds );
|
|
89 |
callIds.AppendL( callId1 );
|
|
90 |
callIds.AppendL( callId2 );
|
|
91 |
|
|
92 |
TMockLtsyData1<RArray<TInt> > ltsyData(callIds);
|
|
93 |
ltsyData.SerialiseL(data);
|
|
94 |
|
|
95 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyConferenceHangUp::KLtsyDispatchCallControlMultipartyConferenceHangUpApiId, data);
|
|
96 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlMultipartyConferenceHangUp::KLtsyDispatchCallControlMultipartyConferenceHangUpApiId, KErrNone);
|
|
97 |
|
|
98 |
DriverCompleteSuccessfulHangUpNotificationsL(callId1, EFalse, KErrGsmCCNormalCallClearing, EFalse);
|
|
99 |
DriverCompleteSuccessfulHangUpNotificationsL(callId2, EFalse, KErrGsmCCNormalCallClearing);
|
|
100 |
|
|
101 |
// Client side test
|
|
102 |
|
|
103 |
RMobileLine mobileLine;
|
|
104 |
CleanupClosePushL(mobileLine);
|
|
105 |
RMobileCall mobileCall;
|
|
106 |
CleanupClosePushL(mobileCall);
|
|
107 |
|
|
108 |
RMobileLine mobileLine2;
|
|
109 |
CleanupClosePushL(mobileLine2);
|
|
110 |
RMobileCall mobileCall2;
|
|
111 |
CleanupClosePushL(mobileCall2);
|
|
112 |
|
|
113 |
ClientDialAndHoldFirstCallDialSecondCallL(mobileService, mobileCall, mobileLine,
|
|
114 |
mobileCall2, mobileLine2);
|
|
115 |
|
|
116 |
RMobileConferenceCall confCall;
|
|
117 |
CleanupClosePushL(confCall);
|
|
118 |
|
|
119 |
ClientCreateConferenceCallL(confCall);
|
|
120 |
|
|
121 |
TRequestStatus notifyConfStatus;
|
|
122 |
RMobileConferenceCall::TMobileConferenceStatus confStatus;
|
|
123 |
confCall.NotifyConferenceStatusChange(notifyConfStatus, confStatus);
|
|
124 |
|
|
125 |
RMobileConferenceCall::TMobileConferenceEvent confEvent;
|
|
126 |
TName callName;
|
|
127 |
TRequestStatus notifyConfEventStatus;
|
|
128 |
confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
129 |
|
|
130 |
TRequestStatus hangupStatus;
|
|
131 |
confCall.HangUp(hangupStatus);
|
|
132 |
|
|
133 |
User::WaitForRequest(notifyConfEventStatus);
|
|
134 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int());
|
|
135 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceCallRemoved, confEvent);
|
|
136 |
confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
137 |
|
|
138 |
User::WaitForRequest(notifyConfEventStatus);
|
|
139 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int());
|
|
140 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceCallRemoved, confEvent);
|
|
141 |
|
|
142 |
User::WaitForRequest(notifyConfStatus);
|
|
143 |
ASSERT_EQUALS(KErrNone, notifyConfStatus.Int());
|
|
144 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceIdle, confStatus);
|
|
145 |
|
|
146 |
User::WaitForRequest(hangupStatus);
|
|
147 |
ASSERT_EQUALS(KErrNone, hangupStatus.Int());
|
|
148 |
|
|
149 |
confCall.Close();
|
|
150 |
User::After(50000);
|
|
151 |
mobileCall.Close();
|
|
152 |
User::After(50000);
|
|
153 |
mobileCall2.Close();
|
|
154 |
User::After(50000);
|
|
155 |
|
|
156 |
AssertMockLtsyStatusL();
|
|
157 |
CleanupStack::PopAndDestroy(8, this);
|
|
158 |
} // CCTsyCallControlMultipartyFU::TestUseCase0001L
|
|
159 |
|
|
160 |
/**
|
|
161 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROLMULTIPARTY-UC0002
|
|
162 |
@SYMComponent telephony_ctsy
|
|
163 |
@SYMTestCaseDesc Test support in CTSY for failure to create a conference call
|
|
164 |
@SYMTestPriority High
|
|
165 |
@SYMTestActions Invokes dialling two calls and attempting to create a conference call
|
|
166 |
@SYMTestExpectedResults Pass
|
|
167 |
@SYMTestType CT
|
|
168 |
*/
|
|
169 |
void CCTsyCallControlMultipartyFU::TestUseCase0002L()
|
|
170 |
{
|
|
171 |
OpenEtelServerL(EUseExtendedError);
|
|
172 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
173 |
OpenPhoneL();
|
|
174 |
|
|
175 |
RBuf8 data;
|
|
176 |
CleanupClosePushL(data);
|
|
177 |
|
|
178 |
TInt callId1 = 1;
|
|
179 |
TInt callId2 = 2;
|
|
180 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
181 |
DriverDialAndHoldFirstCallDialSecondCallL(mobileService, callId1, callId2);
|
|
182 |
TMockLtsyData2<TInt, TInt> createConfData(callId1, callId2);
|
|
183 |
createConfData.SerialiseL(data);
|
|
184 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyCreateConference::KLtsyDispatchCallControlMultipartyCreateConferenceApiId, data);
|
|
185 |
|
|
186 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlMultipartyCreateConference::KLtsyDispatchCallControlMultipartyCreateConferenceApiId, KErrGeneral);
|
|
187 |
|
|
188 |
TInt hangUpCause = KErrGsmCCNormalCallClearing; // Hang up cause for normal hang up
|
|
189 |
TMockLtsyData2<TInt, TInt> mockData1(callId1, hangUpCause);
|
|
190 |
data.Close();
|
|
191 |
mockData1.SerialiseL(data);
|
|
192 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlHangUp::KLtsyDispatchCallControlHangUpApiId, data);
|
|
193 |
|
|
194 |
TMockLtsyData2<TInt, TInt> mockData2(callId2, hangUpCause);
|
|
195 |
data.Close();
|
|
196 |
mockData2.SerialiseL(data);
|
|
197 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlHangUp::KLtsyDispatchCallControlHangUpApiId, data);
|
|
198 |
|
|
199 |
// Client side test
|
|
200 |
|
|
201 |
RMobileLine mobileLine;
|
|
202 |
CleanupClosePushL(mobileLine);
|
|
203 |
RMobileCall mobileCall;
|
|
204 |
CleanupClosePushL(mobileCall);
|
|
205 |
|
|
206 |
RMobileLine mobileLine2;
|
|
207 |
CleanupClosePushL(mobileLine2);
|
|
208 |
RMobileCall mobileCall2;
|
|
209 |
CleanupClosePushL(mobileCall2);
|
|
210 |
|
|
211 |
ClientDialAndHoldFirstCallDialSecondCallL(mobileService, mobileCall, mobileLine,
|
|
212 |
mobileCall2, mobileLine2);
|
|
213 |
|
|
214 |
RMobileConferenceCall confCall;
|
|
215 |
CleanupClosePushL(confCall);
|
|
216 |
ASSERT_EQUALS(KErrNone, confCall.Open(iPhone));
|
|
217 |
|
|
218 |
TRequestStatus createConfStatus;
|
|
219 |
confCall.CreateConference(createConfStatus);
|
|
220 |
User::WaitForRequest(createConfStatus);
|
|
221 |
ASSERT_EQUALS(KErrGeneral, createConfStatus.Int());
|
|
222 |
|
|
223 |
// Both calls should still be in their original state (call 1 - held, call 2 - connected)
|
|
224 |
RMobileCall::TMobileCallStatus callStatus;
|
|
225 |
ASSERT_EQUALS(KErrNone, mobileCall.GetMobileCallStatus(callStatus));
|
|
226 |
ASSERT_EQUALS(RMobileCall::EStatusHold, callStatus);
|
|
227 |
ASSERT_EQUALS(KErrNone, mobileCall2.GetMobileCallStatus(callStatus));
|
|
228 |
ASSERT_EQUALS(RMobileCall::EStatusConnected, callStatus);
|
|
229 |
|
|
230 |
confCall.Close();
|
|
231 |
User::After(50000);
|
|
232 |
mobileCall.Close();
|
|
233 |
User::After(50000);
|
|
234 |
mobileCall2.Close();
|
|
235 |
User::After(50000);
|
|
236 |
|
|
237 |
AssertMockLtsyStatusL();
|
|
238 |
CleanupStack::PopAndDestroy(7, this);
|
|
239 |
} // CCTsyCallControlMultipartyFU::TestUseCase0002L
|
|
240 |
|
|
241 |
/**
|
|
242 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROLMULTIPARTY-UC0003
|
|
243 |
@SYMComponent telephony_ctsy
|
|
244 |
@SYMTestCaseDesc Test support in CTSY for failure to hang up a conference call
|
|
245 |
@SYMTestPriority High
|
|
246 |
@SYMTestActions Invokes RMobileConferenceCall::HangUp
|
|
247 |
@SYMTestExpectedResults Pass
|
|
248 |
@SYMTestType CT
|
|
249 |
*/
|
|
250 |
void CCTsyCallControlMultipartyFU::TestUseCase0003L()
|
|
251 |
{
|
|
252 |
OpenEtelServerL(EUseExtendedError);
|
|
253 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
254 |
OpenPhoneL();
|
|
255 |
|
|
256 |
RBuf8 data;
|
|
257 |
CleanupClosePushL(data);
|
|
258 |
|
|
259 |
TInt callId1 = 1;
|
|
260 |
TInt callId2 = 2;
|
|
261 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
262 |
DriverCreateConferenceCallL(mobileService, callId1, callId2);
|
|
263 |
|
|
264 |
RArray<TInt> callIds;
|
|
265 |
CleanupClosePushL( callIds );
|
|
266 |
callIds.AppendL( callId1 );
|
|
267 |
callIds.AppendL( callId2 );
|
|
268 |
|
|
269 |
TMockLtsyData1<RArray<TInt> > ltsyData(callIds);
|
|
270 |
ltsyData.SerialiseL(data);
|
|
271 |
|
|
272 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyConferenceHangUp::KLtsyDispatchCallControlMultipartyConferenceHangUpApiId, data);
|
|
273 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlMultipartyConferenceHangUp::KLtsyDispatchCallControlMultipartyConferenceHangUpApiId, KErrGeneral);
|
|
274 |
|
|
275 |
// Clean up when subsessions are closed
|
|
276 |
DriverCloseTwoRemotePartyConferenceAndCallSubsessionsL(callId1, callId2, callIds);
|
|
277 |
|
|
278 |
// Client side test
|
|
279 |
|
|
280 |
RMobileLine mobileLine;
|
|
281 |
CleanupClosePushL(mobileLine);
|
|
282 |
RMobileCall mobileCall;
|
|
283 |
CleanupClosePushL(mobileCall);
|
|
284 |
|
|
285 |
RMobileLine mobileLine2;
|
|
286 |
CleanupClosePushL(mobileLine2);
|
|
287 |
RMobileCall mobileCall2;
|
|
288 |
CleanupClosePushL(mobileCall2);
|
|
289 |
|
|
290 |
ClientDialAndHoldFirstCallDialSecondCallL(mobileService, mobileCall, mobileLine,
|
|
291 |
mobileCall2, mobileLine2);
|
|
292 |
|
|
293 |
RMobileConferenceCall confCall;
|
|
294 |
CleanupClosePushL(confCall);
|
|
295 |
|
|
296 |
ClientCreateConferenceCallL(confCall);
|
|
297 |
|
|
298 |
TRequestStatus hangupStatus;
|
|
299 |
confCall.HangUp(hangupStatus);
|
|
300 |
User::WaitForRequest(hangupStatus);
|
|
301 |
ASSERT_EQUALS(KErrGeneral, hangupStatus.Int());
|
|
302 |
|
|
303 |
// Boths calls should still be connected
|
|
304 |
RMobileCall::TMobileCallStatus callStatus;
|
|
305 |
ASSERT_EQUALS(KErrNone, mobileCall.GetMobileCallStatus(callStatus));
|
|
306 |
ASSERT_EQUALS(RMobileCall::EStatusConnected, callStatus);
|
|
307 |
ASSERT_EQUALS(KErrNone, mobileCall2.GetMobileCallStatus(callStatus));
|
|
308 |
ASSERT_EQUALS(RMobileCall::EStatusConnected, callStatus);
|
|
309 |
|
|
310 |
confCall.Close();
|
|
311 |
User::After(50000);
|
|
312 |
mobileCall.Close();
|
|
313 |
User::After(50000);
|
|
314 |
mobileCall2.Close();
|
|
315 |
User::After(50000);
|
|
316 |
|
|
317 |
AssertMockLtsyStatusL();
|
|
318 |
CleanupStack::PopAndDestroy(8, this);
|
|
319 |
} // CCTsyCallControlMultipartyFU::TestUseCase0003L
|
|
320 |
|
|
321 |
/**
|
|
322 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROLMULTIPARTY-UC0004
|
|
323 |
@SYMComponent telephony_ctsy
|
|
324 |
@SYMTestCaseDesc Test support in CTSY for hang up of remote party in conference call
|
|
325 |
@SYMTestPriority High
|
|
326 |
@SYMTestActions Invokes creation of a 2 remote party conference call with one party hanging up therefore terminating the conference.
|
|
327 |
@SYMTestExpectedResults Pass
|
|
328 |
@SYMTestType CT
|
|
329 |
*/
|
|
330 |
void CCTsyCallControlMultipartyFU::TestUseCase0004L()
|
|
331 |
{
|
|
332 |
OpenEtelServerL(EUseExtendedError);
|
|
333 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
334 |
OpenPhoneL();
|
|
335 |
|
|
336 |
RBuf8 data;
|
|
337 |
CleanupClosePushL(data);
|
|
338 |
|
|
339 |
TInt callId1 = 1;
|
|
340 |
TInt callId2 = 2;
|
|
341 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
342 |
DriverCreateConferenceCallL(mobileService, callId1, callId2);
|
|
343 |
|
|
344 |
TInt delayBeforeRemotePartyHangsUp = 5;
|
|
345 |
DriverCompleteSuccessfulHangUpNotificationsL(callId1, EFalse, KErrGsmCCNormalCallClearing, EFalse, delayBeforeRemotePartyHangsUp);
|
|
346 |
|
|
347 |
TInt hangUpCause = KErrGsmCCNormalCallClearing; // Hang up cause for normal hang up
|
|
348 |
TMockLtsyData2<TInt, TInt> mockData2(callId2, hangUpCause);
|
|
349 |
data.Close();
|
|
350 |
mockData2.SerialiseL(data);
|
|
351 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlHangUp::KLtsyDispatchCallControlHangUpApiId, data);
|
|
352 |
|
|
353 |
// Client side test
|
|
354 |
|
|
355 |
RMobileLine mobileLine;
|
|
356 |
CleanupClosePushL(mobileLine);
|
|
357 |
RMobileCall mobileCall;
|
|
358 |
CleanupClosePushL(mobileCall);
|
|
359 |
|
|
360 |
RMobileLine mobileLine2;
|
|
361 |
CleanupClosePushL(mobileLine2);
|
|
362 |
RMobileCall mobileCall2;
|
|
363 |
CleanupClosePushL(mobileCall2);
|
|
364 |
|
|
365 |
ClientDialAndHoldFirstCallDialSecondCallL(mobileService, mobileCall, mobileLine,
|
|
366 |
mobileCall2, mobileLine2);
|
|
367 |
|
|
368 |
RMobileConferenceCall confCall;
|
|
369 |
CleanupClosePushL(confCall);
|
|
370 |
|
|
371 |
ClientCreateConferenceCallL(confCall);
|
|
372 |
|
|
373 |
TRequestStatus notifyConfStatus;
|
|
374 |
RMobileConferenceCall::TMobileConferenceStatus confStatus;
|
|
375 |
confCall.NotifyConferenceStatusChange(notifyConfStatus, confStatus);
|
|
376 |
|
|
377 |
RMobileConferenceCall::TMobileConferenceEvent confEvent;
|
|
378 |
TName callName;
|
|
379 |
TRequestStatus notifyConfEventStatus;
|
|
380 |
confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
381 |
|
|
382 |
// MockSY should complete queued the hang up call status change notifications now
|
|
383 |
// If it doesn't, delay to simulate this above needs to be increased.
|
|
384 |
|
|
385 |
User::WaitForRequest(notifyConfEventStatus);
|
|
386 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int());
|
|
387 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceCallRemoved, confEvent);
|
|
388 |
confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
389 |
|
|
390 |
User::WaitForRequest(notifyConfEventStatus);
|
|
391 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int());
|
|
392 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceCallRemoved, confEvent);
|
|
393 |
|
|
394 |
User::WaitForRequest(notifyConfStatus);
|
|
395 |
ASSERT_EQUALS(KErrNone, notifyConfStatus.Int());
|
|
396 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceIdle, confStatus);
|
|
397 |
|
|
398 |
confCall.Close();
|
|
399 |
User::After(50000);
|
|
400 |
mobileCall.Close();
|
|
401 |
User::After(50000);
|
|
402 |
mobileCall2.Close();
|
|
403 |
User::After(50000);
|
|
404 |
|
|
405 |
AssertMockLtsyStatusL();
|
|
406 |
CleanupStack::PopAndDestroy(7, this);
|
|
407 |
} // CCTsyCallControlMultipartyFU::TestUseCase0004L
|
|
408 |
|
|
409 |
|
|
410 |
/**
|
|
411 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROLMULTIPARTY-UC0005
|
|
412 |
@SYMComponent telephony_ctsy
|
|
413 |
@SYMTestCaseDesc Test support in CTSY for swapping a conference call
|
|
414 |
@SYMTestPriority High
|
|
415 |
@SYMTestActions Invokes RMobileConferenceCall::Swap and RMobileConferenceCall::AddCall
|
|
416 |
@SYMTestExpectedResults Pass
|
|
417 |
@SYMTestType CT
|
|
418 |
*/
|
|
419 |
void CCTsyCallControlMultipartyFU::TestUseCase0005L()
|
|
420 |
{
|
|
421 |
OpenEtelServerL(EUseExtendedError);
|
|
422 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
423 |
OpenPhoneL();
|
|
424 |
|
|
425 |
RBuf8 data;
|
|
426 |
CleanupClosePushL(data);
|
|
427 |
|
|
428 |
// This use case demonstrates swapping of conference calls.
|
|
429 |
// It does the following:
|
|
430 |
// - Set up a conference call with two remote parties
|
|
431 |
// - Swap the conference call (when it is the only active call)
|
|
432 |
// - The conference call goes on hold
|
|
433 |
// - Dial a third call and add it to the conference
|
|
434 |
// - The conference gets connected again with all three calls being a part of it
|
|
435 |
// - Swap the conference call to put it back on hold
|
|
436 |
// - Dial a fourth call
|
|
437 |
// - Swap the conference call making it active and the fourth call on hold
|
|
438 |
// - Close down
|
|
439 |
|
|
440 |
TInt callId1 = 1;
|
|
441 |
TInt callId2 = 2;
|
|
442 |
TInt callId3 = 3;
|
|
443 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
444 |
DriverCreateConferenceWithThreeRemotePartiesL(mobileService, callId1, callId2, callId3);
|
|
445 |
|
|
446 |
// Swapping conference call when there is no held call is the same as
|
|
447 |
// holding the conference call
|
|
448 |
DriverHoldCallL(callId1, KErrNone);
|
|
449 |
|
|
450 |
// Other calls in the conference all go on hold too
|
|
451 |
RMobileCall::TMobileCallStatus callStatus = RMobileCall::EStatusHold;
|
|
452 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData6(
|
|
453 |
callId2, RMobilePhone::EServiceUnspecified, callStatus);
|
|
454 |
data.Close();
|
|
455 |
mockCallData6.SerialiseL(data);
|
|
456 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
457 |
|
|
458 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData7(
|
|
459 |
callId3, RMobilePhone::EServiceUnspecified, callStatus);
|
|
460 |
data.Close();
|
|
461 |
mockCallData7.SerialiseL(data);
|
|
462 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
463 |
|
|
464 |
TInt callId4 = 4;
|
|
465 |
DriverDialCallL(callId4, mobileService);
|
|
466 |
|
|
467 |
TMockLtsyData2<TInt, TInt> mockCallData12(callId1, callId4);
|
|
468 |
data.Close();
|
|
469 |
mockCallData12.SerialiseL(data);
|
|
470 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyConferenceSwap::KLtsyDispatchCallControlMultipartyConferenceSwapApiId, data);
|
|
471 |
|
|
472 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlMultipartyConferenceSwap::KLtsyDispatchCallControlMultipartyConferenceSwapApiId, KErrNone);
|
|
473 |
|
|
474 |
// Call 4 goes on hold, the other three which are part of the conference become connected
|
|
475 |
callStatus = RMobileCall::EStatusHold;
|
|
476 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData8(
|
|
477 |
callId4, RMobilePhone::EServiceUnspecified, callStatus);
|
|
478 |
data.Close();
|
|
479 |
mockCallData8.SerialiseL(data);
|
|
480 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
481 |
|
|
482 |
callStatus = RMobileCall::EStatusConnected;
|
|
483 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData9(
|
|
484 |
callId1, RMobilePhone::EServiceUnspecified, callStatus);
|
|
485 |
data.Close();
|
|
486 |
mockCallData9.SerialiseL(data);
|
|
487 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
488 |
|
|
489 |
callStatus = RMobileCall::EStatusConnected;
|
|
490 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData10(
|
|
491 |
callId2, RMobilePhone::EServiceUnspecified, callStatus);
|
|
492 |
data.Close();
|
|
493 |
mockCallData10.SerialiseL(data);
|
|
494 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
495 |
|
|
496 |
callStatus = RMobileCall::EStatusConnected;
|
|
497 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData11(
|
|
498 |
callId3, RMobilePhone::EServiceUnspecified, callStatus);
|
|
499 |
data.Close();
|
|
500 |
mockCallData11.SerialiseL(data);
|
|
501 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
502 |
|
|
503 |
RArray<TInt> callIds;
|
|
504 |
CleanupClosePushL( callIds );
|
|
505 |
callIds.AppendL( callId1 );
|
|
506 |
callIds.AppendL( callId2 );
|
|
507 |
callIds.AppendL( callId3 );
|
|
508 |
|
|
509 |
TMockLtsyData1<RArray<TInt> > ltsyData(callIds);
|
|
510 |
data.Close();
|
|
511 |
ltsyData.SerialiseL(data);
|
|
512 |
|
|
513 |
// Tidy up at the end of the test
|
|
514 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyConferenceHangUp::KLtsyDispatchCallControlMultipartyConferenceHangUpApiId, data);
|
|
515 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlMultipartyConferenceHangUp::KLtsyDispatchCallControlMultipartyConferenceHangUpApiId, KErrNone);
|
|
516 |
|
|
517 |
DriverCompleteSuccessfulHangUpNotificationsL(callId1, EFalse, KErrGsmCCNormalCallClearing, EFalse);
|
|
518 |
DriverCompleteSuccessfulHangUpNotificationsL(callId2, EFalse, KErrGsmCCNormalCallClearing, EFalse);
|
|
519 |
DriverCompleteSuccessfulHangUpNotificationsL(callId3, EFalse, KErrGsmCCNormalCallClearing, EFalse);
|
|
520 |
|
|
521 |
DriverCompleteSuccessfulHangUpNotificationsL(callId4, EFalse, KErrGsmCCNormalCallClearing, ETrue);
|
|
522 |
|
|
523 |
// Client side test
|
|
524 |
|
|
525 |
RMobileLine mobileLine;
|
|
526 |
CleanupClosePushL(mobileLine);
|
|
527 |
RMobileCall mobileCall;
|
|
528 |
CleanupClosePushL(mobileCall);
|
|
529 |
|
|
530 |
RMobileLine mobileLine2;
|
|
531 |
CleanupClosePushL(mobileLine2);
|
|
532 |
RMobileCall mobileCall2;
|
|
533 |
CleanupClosePushL(mobileCall2);
|
|
534 |
|
|
535 |
RMobileConferenceCall confCall;
|
|
536 |
CleanupClosePushL(confCall);
|
|
537 |
|
|
538 |
RMobileLine mobileLine3;
|
|
539 |
CleanupClosePushL(mobileLine3);
|
|
540 |
RMobileCall mobileCall3;
|
|
541 |
CleanupClosePushL(mobileCall3);
|
|
542 |
|
|
543 |
ClientCreateConferenceCallWithThreeRemotePartiesL(mobileService, mobileCall,
|
|
544 |
mobileLine, mobileCall2, mobileLine2, mobileCall3, mobileLine3, confCall);
|
|
545 |
|
|
546 |
ClientSwapConferenceCallL(confCall, RMobileConferenceCall::EConferenceSwapped,
|
|
547 |
RMobileConferenceCall::EConferenceHold);
|
|
548 |
|
|
549 |
RMobileLine mobileLine4;
|
|
550 |
CleanupClosePushL(mobileLine4);
|
|
551 |
RMobileCall mobileCall4;
|
|
552 |
CleanupClosePushL(mobileCall4);
|
|
553 |
|
|
554 |
ClientDialCallL(mobileLine4, mobileCall4, mobileService);
|
|
555 |
|
|
556 |
ClientSwapConferenceCallL(confCall, RMobileConferenceCall::EConferenceSwapped,
|
|
557 |
RMobileConferenceCall::EConferenceActive);
|
|
558 |
|
|
559 |
// Call 4 should now be held
|
|
560 |
ASSERT_EQUALS(KErrNone, mobileCall4.GetMobileCallStatus(callStatus));
|
|
561 |
ASSERT_EQUALS(RMobileCall::EStatusHold, callStatus);
|
|
562 |
|
|
563 |
// Tidy up at the end of the test
|
|
564 |
TRequestStatus hangupStatus;
|
|
565 |
confCall.HangUp(hangupStatus);
|
|
566 |
User::WaitForRequest(hangupStatus);
|
|
567 |
ASSERT_EQUALS(KErrNone, hangupStatus.Int());
|
|
568 |
|
|
569 |
AssertMockLtsyStatusL();
|
|
570 |
CleanupStack::PopAndDestroy(12, this);
|
|
571 |
} // CCTsyCallControlMultipartyFU::TestUseCase0005L
|
|
572 |
|
|
573 |
|
|
574 |
/**
|
|
575 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROLMULTIPARTY-UC0006
|
|
576 |
@SYMComponent telephony_ctsy
|
|
577 |
@SYMTestCaseDesc Test support in CTSY for failure to swap a conference call
|
|
578 |
@SYMTestPriority High
|
|
579 |
@SYMTestActions Invokes RMobileConferenceCall::Swap
|
|
580 |
@SYMTestExpectedResults Pass
|
|
581 |
@SYMTestType CT
|
|
582 |
*/
|
|
583 |
void CCTsyCallControlMultipartyFU::TestUseCase0006L()
|
|
584 |
{
|
|
585 |
OpenEtelServerL(EUseExtendedError);
|
|
586 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
587 |
OpenPhoneL();
|
|
588 |
|
|
589 |
RBuf8 data;
|
|
590 |
CleanupClosePushL(data);
|
|
591 |
|
|
592 |
TInt callId1 = 1;
|
|
593 |
TInt callId2 = 2;
|
|
594 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
595 |
DriverCreateConferenceCallAndHoldItL(mobileService, callId1, callId2);
|
|
596 |
|
|
597 |
TInt callId3 = 3;
|
|
598 |
DriverDialCallL(callId3, mobileService);
|
|
599 |
|
|
600 |
TMockLtsyData2<TInt, TInt> mockCallData12(callId1, callId3);
|
|
601 |
data.Close();
|
|
602 |
mockCallData12.SerialiseL(data);
|
|
603 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyConferenceSwap::KLtsyDispatchCallControlMultipartyConferenceSwapApiId, data);
|
|
604 |
|
|
605 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlMultipartyConferenceSwap::KLtsyDispatchCallControlMultipartyConferenceSwapApiId, KErrGeneral);
|
|
606 |
|
|
607 |
RArray<TInt> callIds;
|
|
608 |
CleanupClosePushL( callIds );
|
|
609 |
callIds.AppendL( callId1 );
|
|
610 |
callIds.AppendL( callId2 );
|
|
611 |
|
|
612 |
DriverCloseThreeRemotePartyConferenceAndCallSubsessionsL(callId1, callId2, callId3, callIds);
|
|
613 |
|
|
614 |
// Client side test
|
|
615 |
|
|
616 |
RMobileLine mobileLine;
|
|
617 |
CleanupClosePushL(mobileLine);
|
|
618 |
RMobileCall mobileCall;
|
|
619 |
CleanupClosePushL(mobileCall);
|
|
620 |
|
|
621 |
RMobileLine mobileLine2;
|
|
622 |
CleanupClosePushL(mobileLine2);
|
|
623 |
RMobileCall mobileCall2;
|
|
624 |
CleanupClosePushL(mobileCall2);
|
|
625 |
|
|
626 |
RMobileConferenceCall confCall;
|
|
627 |
CleanupClosePushL(confCall);
|
|
628 |
|
|
629 |
ClientCreateConferenceCallAndHoldItL(mobileService, mobileCall,
|
|
630 |
mobileLine, mobileCall2, mobileLine2, confCall);
|
|
631 |
|
|
632 |
// Dial a new call and attempt to swap the conference with it
|
|
633 |
RMobileLine mobileLine3;
|
|
634 |
CleanupClosePushL(mobileLine3);
|
|
635 |
RMobileCall mobileCall3;
|
|
636 |
CleanupClosePushL(mobileCall3);
|
|
637 |
|
|
638 |
ClientDialCallL(mobileLine3, mobileCall3, mobileService);
|
|
639 |
|
|
640 |
TRequestStatus swapStatus;
|
|
641 |
confCall.Swap(swapStatus);
|
|
642 |
User::WaitForRequest(swapStatus);
|
|
643 |
ASSERT_EQUALS(KErrGeneral, swapStatus.Int());
|
|
644 |
|
|
645 |
RMobileConferenceCall::TMobileConferenceStatus confStatus;
|
|
646 |
ASSERT_EQUALS(KErrNone, confCall.GetConferenceStatus(confStatus));
|
|
647 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceHold, confStatus);
|
|
648 |
|
|
649 |
confCall.Close();
|
|
650 |
User::After(50000);
|
|
651 |
mobileCall.Close();
|
|
652 |
User::After(50000);
|
|
653 |
mobileCall2.Close();
|
|
654 |
User::After(50000);
|
|
655 |
mobileCall3.Close();
|
|
656 |
User::After(50000);
|
|
657 |
|
|
658 |
AssertMockLtsyStatusL();
|
|
659 |
CleanupStack::PopAndDestroy(10, this);
|
|
660 |
} // CCTsyCallControlMultipartyFU::TestUseCase0006L
|
|
661 |
|
|
662 |
|
|
663 |
/**
|
|
664 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROLMULTIPARTY-UC0007
|
|
665 |
@SYMComponent telephony_ctsy
|
|
666 |
@SYMTestCaseDesc Test support in CTSY for failure to add a call to the conference
|
|
667 |
@SYMTestPriority High
|
|
668 |
@SYMTestActions Invokes RMobileConferenceCall::AddCall
|
|
669 |
@SYMTestExpectedResults Pass
|
|
670 |
@SYMTestType CT
|
|
671 |
*/
|
|
672 |
void CCTsyCallControlMultipartyFU::TestUseCase0007L()
|
|
673 |
{
|
|
674 |
OpenEtelServerL(EUseExtendedError);
|
|
675 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
676 |
OpenPhoneL();
|
|
677 |
|
|
678 |
RBuf8 data;
|
|
679 |
CleanupClosePushL(data);
|
|
680 |
|
|
681 |
TInt callId1 = 1;
|
|
682 |
TInt callId2 = 2;
|
|
683 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
684 |
DriverCreateConferenceCallAndHoldItL(mobileService, callId1, callId2);
|
|
685 |
|
|
686 |
TInt callId3 = 3;
|
|
687 |
DriverDialCallL(callId3, mobileService);
|
|
688 |
|
|
689 |
TMockLtsyData2<TInt, TInt> mockData(callId3, callId1);
|
|
690 |
data.Close();
|
|
691 |
mockData.SerialiseL(data);
|
|
692 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyConferenceAddCall::KLtsyDispatchCallControlMultipartyConferenceAddCallApiId, data);
|
|
693 |
|
|
694 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlMultipartyConferenceAddCall::KLtsyDispatchCallControlMultipartyConferenceAddCallApiId, KErrGeneral);
|
|
695 |
|
|
696 |
// Tidy up at end of test
|
|
697 |
|
|
698 |
RArray<TInt> callIds;
|
|
699 |
CleanupClosePushL( callIds );
|
|
700 |
callIds.AppendL( callId1 );
|
|
701 |
callIds.AppendL( callId2 );
|
|
702 |
|
|
703 |
DriverCloseThreeRemotePartyConferenceAndCallSubsessionsL(callId1, callId2, callId3, callIds);
|
|
704 |
|
|
705 |
// Client side test
|
|
706 |
|
|
707 |
RMobileLine mobileLine;
|
|
708 |
CleanupClosePushL(mobileLine);
|
|
709 |
RMobileCall mobileCall;
|
|
710 |
CleanupClosePushL(mobileCall);
|
|
711 |
|
|
712 |
RMobileLine mobileLine2;
|
|
713 |
CleanupClosePushL(mobileLine2);
|
|
714 |
RMobileCall mobileCall2;
|
|
715 |
CleanupClosePushL(mobileCall2);
|
|
716 |
|
|
717 |
ClientDialAndHoldFirstCallDialSecondCallL(mobileService, mobileCall, mobileLine,
|
|
718 |
mobileCall2, mobileLine2);
|
|
719 |
|
|
720 |
RMobileConferenceCall confCall;
|
|
721 |
CleanupClosePushL(confCall);
|
|
722 |
|
|
723 |
ClientCreateConferenceCallL(confCall);
|
|
724 |
|
|
725 |
ClientSwapConferenceCallL(confCall, RMobileConferenceCall::EConferenceSwapped,
|
|
726 |
RMobileConferenceCall::EConferenceHold);
|
|
727 |
|
|
728 |
// Dial a new call and attempt to add it to the conference
|
|
729 |
RMobileLine mobileLine3;
|
|
730 |
CleanupClosePushL(mobileLine3);
|
|
731 |
RMobileCall mobileCall3;
|
|
732 |
CleanupClosePushL(mobileCall3);
|
|
733 |
|
|
734 |
ClientDialCallL(mobileLine3, mobileCall3, mobileService);
|
|
735 |
|
|
736 |
RMobileCall::TMobileCallInfoV1 callInfo;
|
|
737 |
RMobileCall::TMobileCallInfoV1Pckg callInfoPckg(callInfo);
|
|
738 |
ASSERT_EQUALS(KErrNone, mobileCall3.GetMobileCallInfo(callInfoPckg));
|
|
739 |
|
|
740 |
TRequestStatus addCallStatus;
|
|
741 |
confCall.AddCall(addCallStatus, callInfo.iCallName);
|
|
742 |
User::WaitForRequest(addCallStatus);
|
|
743 |
ASSERT_EQUALS(KErrGeneral, addCallStatus.Int());
|
|
744 |
|
|
745 |
confCall.Close();
|
|
746 |
User::After(50000);
|
|
747 |
mobileCall.Close();
|
|
748 |
User::After(50000);
|
|
749 |
mobileCall2.Close();
|
|
750 |
User::After(50000);
|
|
751 |
mobileCall3.Close();
|
|
752 |
User::After(50000);
|
|
753 |
|
|
754 |
AssertMockLtsyStatusL();
|
|
755 |
CleanupStack::PopAndDestroy(10, this);
|
|
756 |
} // CCTsyCallControlMultipartyFU::TestUseCase0007L
|
|
757 |
|
|
758 |
/**
|
|
759 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROLMULTIPARTY-UC0008
|
|
760 |
@SYMComponent telephony_ctsy
|
|
761 |
@SYMTestCaseDesc Test support in CTSY for going one to one in a conference call with two remote parties
|
|
762 |
@SYMTestPriority High
|
|
763 |
@SYMTestActions Invokes RMobileCall::GoOneToOne
|
|
764 |
@SYMTestExpectedResults Pass
|
|
765 |
@SYMTestType CT
|
|
766 |
*/
|
|
767 |
void CCTsyCallControlMultipartyFU::TestUseCase0008L()
|
|
768 |
{
|
|
769 |
OpenEtelServerL(EUseExtendedError);
|
|
770 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
771 |
OpenPhoneL();
|
|
772 |
|
|
773 |
RBuf8 data;
|
|
774 |
CleanupClosePushL(data);
|
|
775 |
|
|
776 |
TInt callId1 = 1;
|
|
777 |
TInt callId2 = 2;
|
|
778 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
779 |
DriverCreateConferenceCallL(mobileService, callId1, callId2);
|
|
780 |
|
|
781 |
TMockLtsyData1<TInt> oneToOneData(callId2);
|
|
782 |
oneToOneData.SerialiseL(data);
|
|
783 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyConferenceGoOneToOne::KLtsyDispatchCallControlMultipartyConferenceGoOneToOneApiId, data);
|
|
784 |
|
|
785 |
TMockLtsyData1<TInt> oneToOneMockData(callId2);
|
|
786 |
data.Close();
|
|
787 |
oneToOneMockData.SerialiseL(data);
|
|
788 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlMultipartyConferenceGoOneToOne::KLtsyDispatchCallControlMultipartyConferenceGoOneToOneApiId, KErrNone, data);
|
|
789 |
|
|
790 |
// Call 2 is connected and call 1 goes on hold
|
|
791 |
RMobileCall::TMobileCallStatus callStatus = RMobileCall::EStatusHold;
|
|
792 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData(
|
|
793 |
callId1, RMobilePhone::EServiceUnspecified, callStatus);
|
|
794 |
data.Close();
|
|
795 |
mockCallData.SerialiseL(data);
|
|
796 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
797 |
|
|
798 |
callStatus = RMobileCall::EStatusConnected;
|
|
799 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData2(
|
|
800 |
callId2, RMobilePhone::EServiceUnspecified, callStatus);
|
|
801 |
data.Close();
|
|
802 |
mockCallData2.SerialiseL(data);
|
|
803 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
804 |
|
|
805 |
TInt hangUpCause = KErrGsmCCNormalCallClearing; // Hang up cause for normal hang up
|
|
806 |
TMockLtsyData2<TInt, TInt> mockData2(callId1, hangUpCause);
|
|
807 |
data.Close();
|
|
808 |
mockData2.SerialiseL(data);
|
|
809 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlHangUp::KLtsyDispatchCallControlHangUpApiId, data);
|
|
810 |
|
|
811 |
TMockLtsyData2<TInt, TInt> mockData3(callId2, hangUpCause);
|
|
812 |
data.Close();
|
|
813 |
mockData3.SerialiseL(data);
|
|
814 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlHangUp::KLtsyDispatchCallControlHangUpApiId, data);
|
|
815 |
|
|
816 |
// Client side test
|
|
817 |
|
|
818 |
RMobileLine mobileLine;
|
|
819 |
CleanupClosePushL(mobileLine);
|
|
820 |
RMobileCall mobileCall;
|
|
821 |
CleanupClosePushL(mobileCall);
|
|
822 |
|
|
823 |
RMobileLine mobileLine2;
|
|
824 |
CleanupClosePushL(mobileLine2);
|
|
825 |
RMobileCall mobileCall2;
|
|
826 |
CleanupClosePushL(mobileCall2);
|
|
827 |
|
|
828 |
ClientDialAndHoldFirstCallDialSecondCallL(mobileService, mobileCall, mobileLine,
|
|
829 |
mobileCall2, mobileLine2);
|
|
830 |
|
|
831 |
RMobileConferenceCall confCall;
|
|
832 |
CleanupClosePushL(confCall);
|
|
833 |
|
|
834 |
ClientCreateConferenceCallL(confCall);
|
|
835 |
|
|
836 |
RMobileConferenceCall::TMobileConferenceEvent confEvent;
|
|
837 |
TName callName;
|
|
838 |
TRequestStatus notifyConfEventStatus;
|
|
839 |
confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
840 |
|
|
841 |
TRequestStatus confCallReqStatus;
|
|
842 |
RMobileConferenceCall::TMobileConferenceStatus confStatus;
|
|
843 |
confCall.NotifyConferenceStatusChange(confCallReqStatus, confStatus);
|
|
844 |
|
|
845 |
TRequestStatus oneToOneStatus;
|
|
846 |
mobileCall2.GoOneToOne(oneToOneStatus);
|
|
847 |
User::WaitForRequest(oneToOneStatus);
|
|
848 |
ASSERT_EQUALS(KErrNone, oneToOneStatus.Int());
|
|
849 |
|
|
850 |
User::WaitForRequest(confCallReqStatus);
|
|
851 |
ASSERT_EQUALS(KErrNone, confCallReqStatus.Int());
|
|
852 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceIdle, confStatus);
|
|
853 |
|
|
854 |
User::WaitForRequest(notifyConfEventStatus);
|
|
855 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int());
|
|
856 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceCallRemoved, confEvent);
|
|
857 |
confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
858 |
|
|
859 |
User::WaitForRequest(notifyConfEventStatus);
|
|
860 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int());
|
|
861 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceCallRemoved, confEvent);
|
|
862 |
confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
863 |
|
|
864 |
User::WaitForRequest(notifyConfEventStatus);
|
|
865 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int());
|
|
866 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceSplit, confEvent);
|
|
867 |
|
|
868 |
ASSERT_EQUALS(KErrNone, mobileCall.GetMobileCallStatus(callStatus));
|
|
869 |
ASSERT_EQUALS(RMobileCall::EStatusHold, callStatus);
|
|
870 |
ASSERT_EQUALS(KErrNone, mobileCall2.GetMobileCallStatus(callStatus));
|
|
871 |
ASSERT_EQUALS(RMobileCall::EStatusConnected, callStatus);
|
|
872 |
|
|
873 |
mobileCall.Close();
|
|
874 |
User::After(50000);
|
|
875 |
mobileCall2.Close();
|
|
876 |
User::After(50000);
|
|
877 |
|
|
878 |
AssertMockLtsyStatusL();
|
|
879 |
CleanupStack::PopAndDestroy(7, this);
|
|
880 |
} // CCTsyCallControlMultipartyFU::TestUseCase0008L
|
|
881 |
|
|
882 |
/**
|
|
883 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROLMULTIPARTY-UC0009
|
|
884 |
@SYMComponent telephony_ctsy
|
|
885 |
@SYMTestCaseDesc Test support in CTSY for going one to one in a conference call with three remote parties
|
|
886 |
@SYMTestPriority High
|
|
887 |
@SYMTestActions Invokes RMobileCall::GoOneToOne
|
|
888 |
@SYMTestExpectedResults Pass
|
|
889 |
@SYMTestType CT
|
|
890 |
*/
|
|
891 |
void CCTsyCallControlMultipartyFU::TestUseCase0009L()
|
|
892 |
{
|
|
893 |
OpenEtelServerL(EUseExtendedError);
|
|
894 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
895 |
OpenPhoneL();
|
|
896 |
|
|
897 |
RBuf8 data;
|
|
898 |
CleanupClosePushL(data);
|
|
899 |
|
|
900 |
TInt callId1 = 1;
|
|
901 |
TInt callId2 = 2;
|
|
902 |
TInt callId3 = 3;
|
|
903 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
904 |
DriverCreateConferenceWithThreeRemotePartiesL(mobileService, callId1, callId2, callId3);
|
|
905 |
|
|
906 |
TMockLtsyData1<TInt> oneToOneData(callId2);
|
|
907 |
oneToOneData.SerialiseL(data);
|
|
908 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyConferenceGoOneToOne::KLtsyDispatchCallControlMultipartyConferenceGoOneToOneApiId, data);
|
|
909 |
|
|
910 |
TMockLtsyData1<TInt> oneToOneMockData(callId2);
|
|
911 |
data.Close();
|
|
912 |
oneToOneMockData.SerialiseL(data);
|
|
913 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlMultipartyConferenceGoOneToOne::KLtsyDispatchCallControlMultipartyConferenceGoOneToOneApiId, KErrNone, data);
|
|
914 |
|
|
915 |
// Call 2 is connected and call 1, 3 go on hold
|
|
916 |
RMobileCall::TMobileCallStatus callStatus = RMobileCall::EStatusHold;
|
|
917 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData(
|
|
918 |
callId1, RMobilePhone::EServiceUnspecified, callStatus);
|
|
919 |
data.Close();
|
|
920 |
mockCallData.SerialiseL(data);
|
|
921 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
922 |
|
|
923 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData2(
|
|
924 |
callId3, RMobilePhone::EServiceUnspecified, callStatus);
|
|
925 |
data.Close();
|
|
926 |
mockCallData2.SerialiseL(data);
|
|
927 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
928 |
|
|
929 |
callStatus = RMobileCall::EStatusConnected;
|
|
930 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData3(
|
|
931 |
callId2, RMobilePhone::EServiceUnspecified, callStatus);
|
|
932 |
data.Close();
|
|
933 |
mockCallData3.SerialiseL(data);
|
|
934 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
935 |
|
|
936 |
// Tidy up at end of test
|
|
937 |
TInt hangUpCause = KErrGsmCCNormalCallClearing; // Hang up cause for normal hang up
|
|
938 |
TMockLtsyData2<TInt, TInt> mockData1(callId1, hangUpCause);
|
|
939 |
data.Close();
|
|
940 |
mockData1.SerialiseL(data);
|
|
941 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlHangUp::KLtsyDispatchCallControlHangUpApiId, data);
|
|
942 |
|
|
943 |
TMockLtsyData2<TInt, TInt> mockData2(callId2, hangUpCause);
|
|
944 |
data.Close();
|
|
945 |
mockData2.SerialiseL(data);
|
|
946 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlHangUp::KLtsyDispatchCallControlHangUpApiId, data);
|
|
947 |
|
|
948 |
TMockLtsyData2<TInt, TInt> mockData3(callId3, hangUpCause);
|
|
949 |
data.Close();
|
|
950 |
mockData3.SerialiseL(data);
|
|
951 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlHangUp::KLtsyDispatchCallControlHangUpApiId, data);
|
|
952 |
|
|
953 |
RArray<TInt> callIds;
|
|
954 |
CleanupClosePushL( callIds ); // Empty call ids list since we remove the conference call after calls have hung up.
|
|
955 |
|
|
956 |
TMockLtsyData1<RArray<TInt> > ltsyData((RArray<TInt>&) callIds);
|
|
957 |
ltsyData.SerialiseL(data);
|
|
958 |
|
|
959 |
// Clean up when subsessions are closed (conference call only, no longer contains any calls)
|
|
960 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyConferenceHangUp::KLtsyDispatchCallControlMultipartyConferenceHangUpApiId, data);
|
|
961 |
|
|
962 |
// Client Side Test
|
|
963 |
|
|
964 |
RMobileLine mobileLine;
|
|
965 |
CleanupClosePushL(mobileLine);
|
|
966 |
RMobileCall mobileCall;
|
|
967 |
CleanupClosePushL(mobileCall);
|
|
968 |
|
|
969 |
RMobileLine mobileLine2;
|
|
970 |
CleanupClosePushL(mobileLine2);
|
|
971 |
RMobileCall mobileCall2;
|
|
972 |
CleanupClosePushL(mobileCall2);
|
|
973 |
|
|
974 |
RMobileConferenceCall confCall;
|
|
975 |
CleanupClosePushL(confCall);
|
|
976 |
|
|
977 |
RMobileLine mobileLine3;
|
|
978 |
CleanupClosePushL(mobileLine3);
|
|
979 |
RMobileCall mobileCall3;
|
|
980 |
CleanupClosePushL(mobileCall3);
|
|
981 |
|
|
982 |
ClientCreateConferenceCallWithThreeRemotePartiesL(mobileService, mobileCall,
|
|
983 |
mobileLine, mobileCall2, mobileLine2, mobileCall3, mobileLine3, confCall);
|
|
984 |
|
|
985 |
RMobileConferenceCall::TMobileConferenceEvent confEvent;
|
|
986 |
TName callName;
|
|
987 |
TRequestStatus notifyConfEventStatus;
|
|
988 |
confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
989 |
|
|
990 |
TRequestStatus confCallReqStatus;
|
|
991 |
RMobileConferenceCall::TMobileConferenceStatus confStatus;
|
|
992 |
confCall.NotifyConferenceStatusChange(confCallReqStatus, confStatus);
|
|
993 |
|
|
994 |
TRequestStatus oneToOneStatus;
|
|
995 |
mobileCall2.GoOneToOne(oneToOneStatus);
|
|
996 |
User::WaitForRequest(oneToOneStatus);
|
|
997 |
ASSERT_EQUALS(KErrNone, oneToOneStatus.Int());
|
|
998 |
|
|
999 |
User::WaitForRequest(notifyConfEventStatus);
|
|
1000 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int());
|
|
1001 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceCallRemoved, confEvent);
|
|
1002 |
confCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
1003 |
|
|
1004 |
User::WaitForRequest(notifyConfEventStatus);
|
|
1005 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int());
|
|
1006 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceSplit, confEvent);
|
|
1007 |
|
|
1008 |
ASSERT_EQUALS(KErrNone, mobileCall.GetMobileCallStatus(callStatus));
|
|
1009 |
ASSERT_EQUALS(RMobileCall::EStatusHold, callStatus);
|
|
1010 |
ASSERT_EQUALS(KErrNone, mobileCall2.GetMobileCallStatus(callStatus));
|
|
1011 |
ASSERT_EQUALS(RMobileCall::EStatusConnected, callStatus);
|
|
1012 |
ASSERT_EQUALS(KErrNone, mobileCall3.GetMobileCallStatus(callStatus));
|
|
1013 |
ASSERT_EQUALS(RMobileCall::EStatusHold, callStatus);
|
|
1014 |
|
|
1015 |
mobileCall.Close();
|
|
1016 |
User::After(50000);
|
|
1017 |
mobileCall2.Close();
|
|
1018 |
User::After(50000);
|
|
1019 |
mobileCall3.Close();
|
|
1020 |
User::After(50000);
|
|
1021 |
confCall.Close();
|
|
1022 |
User::After(50000);
|
|
1023 |
|
|
1024 |
AssertMockLtsyStatusL();
|
|
1025 |
CleanupStack::PopAndDestroy(10, this);
|
|
1026 |
} // CCTsyCallControlMultipartyFU::TestUseCase0009L
|
|
1027 |
|
|
1028 |
/**
|
|
1029 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROLMULTIPARTY-UC0010
|
|
1030 |
@SYMComponent telephony_ctsy
|
|
1031 |
@SYMTestCaseDesc Test support in CTSY for failing to go one-to-one with a call in a conference
|
|
1032 |
@SYMTestPriority High
|
|
1033 |
@SYMTestActions Invokes RMobileConferenceCall::GoOneToOne
|
|
1034 |
@SYMTestExpectedResults Pass
|
|
1035 |
@SYMTestType CT
|
|
1036 |
*/
|
|
1037 |
void CCTsyCallControlMultipartyFU::TestUseCase0010L()
|
|
1038 |
{
|
|
1039 |
OpenEtelServerL(EUseExtendedError);
|
|
1040 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
1041 |
OpenPhoneL();
|
|
1042 |
|
|
1043 |
RBuf8 data;
|
|
1044 |
CleanupClosePushL(data);
|
|
1045 |
|
|
1046 |
TInt callId1 = 1;
|
|
1047 |
TInt callId2 = 2;
|
|
1048 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
1049 |
DriverCreateConferenceCallL(mobileService, callId1, callId2);
|
|
1050 |
|
|
1051 |
TMockLtsyData1<TInt> oneToOneData(callId2);
|
|
1052 |
oneToOneData.SerialiseL(data);
|
|
1053 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyConferenceGoOneToOne::KLtsyDispatchCallControlMultipartyConferenceGoOneToOneApiId, data);
|
|
1054 |
|
|
1055 |
TMockLtsyData1<TInt> oneToOneMockData(callId2);
|
|
1056 |
data.Close();
|
|
1057 |
oneToOneMockData.SerialiseL(data);
|
|
1058 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlMultipartyConferenceGoOneToOne::KLtsyDispatchCallControlMultipartyConferenceGoOneToOneApiId, KErrGeneral, data);
|
|
1059 |
|
|
1060 |
RArray<TInt> callIds;
|
|
1061 |
CleanupClosePushL( callIds );
|
|
1062 |
callIds.AppendL( callId1 );
|
|
1063 |
callIds.AppendL( callId2 );
|
|
1064 |
|
|
1065 |
TMockLtsyData1<RArray<TInt> > ltsyData(callIds);
|
|
1066 |
data.Close();
|
|
1067 |
ltsyData.SerialiseL(data);
|
|
1068 |
|
|
1069 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyConferenceHangUp::KLtsyDispatchCallControlMultipartyConferenceHangUpApiId, data);
|
|
1070 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlMultipartyConferenceHangUp::KLtsyDispatchCallControlMultipartyConferenceHangUpApiId, KErrNone);
|
|
1071 |
|
|
1072 |
DriverCompleteSuccessfulHangUpNotificationsL(callId1, EFalse, KErrGsmCCNormalCallClearing, EFalse);
|
|
1073 |
DriverCompleteSuccessfulHangUpNotificationsL(callId2, EFalse, KErrGsmCCNormalCallClearing, ETrue);
|
|
1074 |
|
|
1075 |
// Client Side Test
|
|
1076 |
|
|
1077 |
RMobileLine mobileLine;
|
|
1078 |
CleanupClosePushL(mobileLine);
|
|
1079 |
RMobileCall mobileCall;
|
|
1080 |
CleanupClosePushL(mobileCall);
|
|
1081 |
|
|
1082 |
RMobileLine mobileLine2;
|
|
1083 |
CleanupClosePushL(mobileLine2);
|
|
1084 |
RMobileCall mobileCall2;
|
|
1085 |
CleanupClosePushL(mobileCall2);
|
|
1086 |
|
|
1087 |
ClientDialAndHoldFirstCallDialSecondCallL(mobileService, mobileCall, mobileLine,
|
|
1088 |
mobileCall2, mobileLine2);
|
|
1089 |
|
|
1090 |
RMobileConferenceCall confCall;
|
|
1091 |
CleanupClosePushL(confCall);
|
|
1092 |
|
|
1093 |
ClientCreateConferenceCallL(confCall);
|
|
1094 |
|
|
1095 |
TRequestStatus oneToOneStatus;
|
|
1096 |
mobileCall2.GoOneToOne(oneToOneStatus);
|
|
1097 |
User::WaitForRequest(oneToOneStatus);
|
|
1098 |
ASSERT_EQUALS(KErrGeneral, oneToOneStatus.Int());
|
|
1099 |
|
|
1100 |
TInt numCalls;
|
|
1101 |
ASSERT_EQUALS(KErrNone, confCall.EnumerateCalls(numCalls));
|
|
1102 |
ASSERT_EQUALS(2, numCalls);
|
|
1103 |
|
|
1104 |
TRequestStatus hangupStatus;
|
|
1105 |
confCall.HangUp(hangupStatus);
|
|
1106 |
User::WaitForRequest(hangupStatus);
|
|
1107 |
ASSERT_EQUALS(KErrNone, hangupStatus.Int());
|
|
1108 |
|
|
1109 |
AssertMockLtsyStatusL();
|
|
1110 |
CleanupStack::PopAndDestroy(8, this);
|
|
1111 |
} // CCTsyCallControlMultipartyFU::TestUseCase0010L
|
|
1112 |
|
|
1113 |
/**
|
|
1114 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROLMULTIPARTY-UC0011
|
|
1115 |
@SYMComponent telephony_ctsy
|
|
1116 |
@SYMTestCaseDesc Test support in CTSY for sending DTMF through a conference call
|
|
1117 |
@SYMTestPriority High
|
|
1118 |
@SYMTestActions Invokes RMobilePhone::SendDTMFTones
|
|
1119 |
@SYMTestExpectedResults Pass
|
|
1120 |
@SYMTestType CT
|
|
1121 |
*/
|
|
1122 |
void CCTsyCallControlMultipartyFU::TestUseCase0011L()
|
|
1123 |
{
|
|
1124 |
OpenEtelServerL(EUseExtendedError);
|
|
1125 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
1126 |
OpenPhoneL();
|
|
1127 |
|
|
1128 |
RBuf8 data;
|
|
1129 |
CleanupClosePushL(data);
|
|
1130 |
|
|
1131 |
TInt callId1 = 1;
|
|
1132 |
TInt callId2 = 2;
|
|
1133 |
TInt callId3 = 3;
|
|
1134 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
1135 |
DriverCreateConferenceWithThreeRemotePartiesL(mobileService, callId1, callId2, callId3);
|
|
1136 |
|
|
1137 |
// When DTMF digits are sent and the active call is a conference call, the call ID
|
|
1138 |
// of one of the calls taking part in the conference is sent to the LTSY.
|
|
1139 |
TBuf<5> tones = _L("A123B");
|
|
1140 |
data.Close();
|
|
1141 |
TMockLtsyData2<TInt, TBuf<5> > toneLtsyData(callId1, tones);
|
|
1142 |
toneLtsyData.SerialiseL(data);
|
|
1143 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlSendDtmfTones::KLtsyDispatchCallControlSendDtmfTonesApiId, data, KErrNone);
|
|
1144 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlSendDtmfTones::KLtsyDispatchCallControlSendDtmfTonesApiId, KErrNone);
|
|
1145 |
|
|
1146 |
RArray<TInt> callIds;
|
|
1147 |
CleanupClosePushL( callIds );
|
|
1148 |
callIds.AppendL( callId1 );
|
|
1149 |
callIds.AppendL( callId2 );
|
|
1150 |
callIds.AppendL( callId3 );
|
|
1151 |
|
|
1152 |
// Tidy up at end of test
|
|
1153 |
DriverCloseThreeRemotePartyConferenceAndCallSubsessionsL(callId1, callId2, callId3, callIds);
|
|
1154 |
|
|
1155 |
// Client Side Test
|
|
1156 |
|
|
1157 |
RMobileLine mobileLine;
|
|
1158 |
CleanupClosePushL(mobileLine);
|
|
1159 |
RMobileCall mobileCall;
|
|
1160 |
CleanupClosePushL(mobileCall);
|
|
1161 |
|
|
1162 |
RMobileLine mobileLine2;
|
|
1163 |
CleanupClosePushL(mobileLine2);
|
|
1164 |
RMobileCall mobileCall2;
|
|
1165 |
CleanupClosePushL(mobileCall2);
|
|
1166 |
|
|
1167 |
RMobileConferenceCall confCall;
|
|
1168 |
CleanupClosePushL(confCall);
|
|
1169 |
|
|
1170 |
RMobileLine mobileLine3;
|
|
1171 |
CleanupClosePushL(mobileLine3);
|
|
1172 |
RMobileCall mobileCall3;
|
|
1173 |
CleanupClosePushL(mobileCall3);
|
|
1174 |
|
|
1175 |
ClientCreateConferenceCallWithThreeRemotePartiesL(mobileService, mobileCall,
|
|
1176 |
mobileLine, mobileCall2, mobileLine2, mobileCall3, mobileLine3, confCall);
|
|
1177 |
|
|
1178 |
TRequestStatus sendStatus;
|
|
1179 |
iPhone.SendDTMFTones(sendStatus, tones);
|
|
1180 |
User::WaitForRequest(sendStatus);
|
|
1181 |
ASSERT_EQUALS(KErrNone, sendStatus.Int());
|
|
1182 |
|
|
1183 |
confCall.Close();
|
|
1184 |
User::After(50000);
|
|
1185 |
mobileCall.Close();
|
|
1186 |
User::After(50000);
|
|
1187 |
mobileCall2.Close();
|
|
1188 |
User::After(50000);
|
|
1189 |
mobileCall3.Close();
|
|
1190 |
User::After(50000);
|
|
1191 |
|
|
1192 |
AssertMockLtsyStatusL();
|
|
1193 |
CleanupStack::PopAndDestroy(10, this);
|
|
1194 |
} // CCTsyCallControlMultipartyFU::TestUseCase0011L
|
|
1195 |
|
|
1196 |
|
|
1197 |
//
|
|
1198 |
// Other unit tests
|
|
1199 |
//
|
|
1200 |
|
|
1201 |
/**
|
|
1202 |
@SYMTestCaseID BA-CTSYD-DIS-CALLCONTROLMULTIPARTY-UN0001
|
|
1203 |
@SYMComponent telephony_ctsy
|
|
1204 |
@SYMTestCaseDesc Test support in CTSY for RMobileConferenceCall::CreateConference
|
|
1205 |
@SYMTestPriority High
|
|
1206 |
@SYMTestActions Invokes RMobileConferenceCall::CreateConference
|
|
1207 |
@SYMTestExpectedResults Pass
|
|
1208 |
@SYMTestType UT
|
|
1209 |
*/
|
|
1210 |
void CCTsyCallControlMultipartyFU::TestUnit0001L()
|
|
1211 |
{
|
|
1212 |
OpenEtelServerL(EUseExtendedError);
|
|
1213 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
1214 |
OpenPhoneL();
|
|
1215 |
|
|
1216 |
RBuf8 data;
|
|
1217 |
CleanupClosePushL(data);
|
|
1218 |
|
|
1219 |
// Set up correct conditions to be able to create a conference
|
|
1220 |
TInt callId1 = 1;
|
|
1221 |
TInt callId2 = 2;
|
|
1222 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
1223 |
DriverDialAndHoldFirstCallDialSecondCallL(mobileService, callId1, callId2);
|
|
1224 |
|
|
1225 |
RMobileLine mobileLine;
|
|
1226 |
CleanupClosePushL(mobileLine);
|
|
1227 |
RMobileCall mobileCall;
|
|
1228 |
CleanupClosePushL(mobileCall);
|
|
1229 |
|
|
1230 |
RMobileLine mobileLine2;
|
|
1231 |
CleanupClosePushL(mobileLine2);
|
|
1232 |
RMobileCall mobileCall2;
|
|
1233 |
CleanupClosePushL(mobileCall2);
|
|
1234 |
|
|
1235 |
ClientDialAndHoldFirstCallDialSecondCallL(mobileService, mobileCall, mobileLine,
|
|
1236 |
mobileCall2, mobileLine2);
|
|
1237 |
|
|
1238 |
RMobileConferenceCall confCall;
|
|
1239 |
CleanupClosePushL(confCall);
|
|
1240 |
ASSERT_EQUALS(KErrNone, confCall.Open(iPhone));
|
|
1241 |
|
|
1242 |
//-------------------------------------------------------------------------
|
|
1243 |
// TEST A: failure to dispatch request to LTSY
|
|
1244 |
//-------------------------------------------------------------------------
|
|
1245 |
|
|
1246 |
TMockLtsyData2<TInt, TInt> createConfData(callId1, callId2);
|
|
1247 |
createConfData.SerialiseL(data);
|
|
1248 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyCreateConference::KLtsyDispatchCallControlMultipartyCreateConferenceApiId, data, KErrGeneral);
|
|
1249 |
|
|
1250 |
TRequestStatus createConfStatus;
|
|
1251 |
confCall.CreateConference(createConfStatus);
|
|
1252 |
User::WaitForRequest(createConfStatus);
|
|
1253 |
ASSERT_EQUALS(KErrGeneral, createConfStatus.Int());
|
|
1254 |
|
|
1255 |
//-------------------------------------------------------------------------
|
|
1256 |
// TEST B: failure on completion of pending request from LTSY->CTSY
|
|
1257 |
//-------------------------------------------------------------------------
|
|
1258 |
|
|
1259 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyCreateConference::KLtsyDispatchCallControlMultipartyCreateConferenceApiId, data);
|
|
1260 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlMultipartyCreateConference::KLtsyDispatchCallControlMultipartyCreateConferenceApiId, KErrGeneral);
|
|
1261 |
|
|
1262 |
confCall.CreateConference(createConfStatus);
|
|
1263 |
User::WaitForRequest(createConfStatus);
|
|
1264 |
ASSERT_EQUALS(KErrGeneral, createConfStatus.Int());
|
|
1265 |
|
|
1266 |
//-------------------------------------------------------------------------
|
|
1267 |
// TEST C: Successful completion request of
|
|
1268 |
// RMobileConferenceCall::CreateConference() when result is not cached.
|
|
1269 |
//-------------------------------------------------------------------------
|
|
1270 |
|
|
1271 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyCreateConference::KLtsyDispatchCallControlMultipartyCreateConferenceApiId, data);
|
|
1272 |
|
|
1273 |
RMobileCall::TMobileCallStatus callStatus = RMobileCall::EStatusConnected;
|
|
1274 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData(
|
|
1275 |
callId1, RMobilePhone::EServiceUnspecified, callStatus);
|
|
1276 |
data.Close();
|
|
1277 |
mockCallData.SerialiseL(data);
|
|
1278 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
1279 |
|
|
1280 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData2(
|
|
1281 |
callId2, RMobilePhone::EServiceUnspecified, callStatus);
|
|
1282 |
data.Close();
|
|
1283 |
mockCallData2.SerialiseL(data);
|
|
1284 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
1285 |
|
|
1286 |
confCall.CreateConference(createConfStatus);
|
|
1287 |
User::WaitForRequest(createConfStatus);
|
|
1288 |
ASSERT_EQUALS(KErrNone, createConfStatus.Int());
|
|
1289 |
|
|
1290 |
//-------------------------------------------------------------------------
|
|
1291 |
// TEST E: Unsolicited completion of RMobileConferenceCall::CreateConference()
|
|
1292 |
// from LTSY.
|
|
1293 |
//-------------------------------------------------------------------------
|
|
1294 |
|
|
1295 |
TRequestStatus terminatedStatus;
|
|
1296 |
iMockLTSY.NotifyTerminated(terminatedStatus);
|
|
1297 |
|
|
1298 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlMultipartyCreateConference::KLtsyDispatchCallControlMultipartyCreateConferenceApiId, KErrNone);
|
|
1299 |
|
|
1300 |
User::WaitForRequest(terminatedStatus);
|
|
1301 |
|
|
1302 |
RArray<TInt> callIds;
|
|
1303 |
CleanupClosePushL( callIds );
|
|
1304 |
callIds.AppendL( callId1 );
|
|
1305 |
callIds.AppendL( callId2 );
|
|
1306 |
|
|
1307 |
// Clean up when subsessions are closed
|
|
1308 |
DriverCloseTwoRemotePartyConferenceAndCallSubsessionsL(callId1, callId2, callIds);
|
|
1309 |
|
|
1310 |
confCall.Close();
|
|
1311 |
User::After(50000);
|
|
1312 |
mobileCall.Close();
|
|
1313 |
User::After(50000);
|
|
1314 |
mobileCall2.Close();
|
|
1315 |
User::After(50000);
|
|
1316 |
|
|
1317 |
AssertMockLtsyStatusL();
|
|
1318 |
CleanupStack::PopAndDestroy(8, this);
|
|
1319 |
} // CCTsyCallControlMultipartyFU::TestUnit0001L
|
|
1320 |
|
|
1321 |
|
|
1322 |
//
|
|
1323 |
// Helper functions
|
|
1324 |
//
|
|
1325 |
|
|
1326 |
void CCTsyCallControlMultipartyFU::DriverCreateConferenceCallL(RMobilePhone::TMobileService aMobileService, TInt aCallId1, TInt aCallId2)
|
|
1327 |
{
|
|
1328 |
RBuf8 data;
|
|
1329 |
CleanupClosePushL(data);
|
|
1330 |
|
|
1331 |
DriverDialAndHoldFirstCallDialSecondCallL(aMobileService, aCallId1, aCallId2);
|
|
1332 |
|
|
1333 |
TMockLtsyData2<TInt, TInt> createConfData(aCallId1, aCallId2);
|
|
1334 |
createConfData.SerialiseL(data);
|
|
1335 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyCreateConference::KLtsyDispatchCallControlMultipartyCreateConferenceApiId, data);
|
|
1336 |
|
|
1337 |
RMobileCall::TMobileCallStatus callStatus = RMobileCall::EStatusConnected;
|
|
1338 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData(
|
|
1339 |
aCallId1, RMobilePhone::EServiceUnspecified, callStatus);
|
|
1340 |
data.Close();
|
|
1341 |
mockCallData.SerialiseL(data);
|
|
1342 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
1343 |
|
|
1344 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData2(
|
|
1345 |
aCallId2, RMobilePhone::EServiceUnspecified, callStatus);
|
|
1346 |
data.Close();
|
|
1347 |
mockCallData2.SerialiseL(data);
|
|
1348 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
1349 |
|
|
1350 |
CleanupStack::PopAndDestroy(1, &data);
|
|
1351 |
} // CCTsyCallControlMultipartyFU::DriverCreateConferenceCallL
|
|
1352 |
|
|
1353 |
void CCTsyCallControlMultipartyFU::DriverCreateConferenceCallAndHoldItL(
|
|
1354 |
RMobilePhone::TMobileService aMobileService, TInt aCallId1, TInt aCallId2)
|
|
1355 |
{
|
|
1356 |
RBuf8 data;
|
|
1357 |
CleanupClosePushL(data);
|
|
1358 |
|
|
1359 |
DriverCreateConferenceCallL(aMobileService, aCallId1, aCallId2);
|
|
1360 |
|
|
1361 |
// Swapping a conference call when there isn't another call causes hold
|
|
1362 |
// IPC to go to the dispatcher.
|
|
1363 |
DriverHoldCallL(aCallId1, KErrNone);
|
|
1364 |
|
|
1365 |
// Call 2 which is part of the conference will go on hold
|
|
1366 |
RMobileCall::TMobileCallStatus callStatus = RMobileCall::EStatusHold;
|
|
1367 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData(
|
|
1368 |
aCallId2, RMobilePhone::EServiceUnspecified, callStatus);
|
|
1369 |
data.Close();
|
|
1370 |
mockCallData.SerialiseL(data);
|
|
1371 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
1372 |
|
|
1373 |
CleanupStack::PopAndDestroy(1, &data);
|
|
1374 |
} // CCTsyCallControlMultipartyFU::DriverCreateConferenceCallAndHoldItL
|
|
1375 |
|
|
1376 |
void CCTsyCallControlMultipartyFU::DriverCreateConferenceWithThreeRemotePartiesL(
|
|
1377 |
RMobilePhone::TMobileService aMobileService, TInt aCallId1, TInt aCallId2, TInt aCallId3)
|
|
1378 |
{
|
|
1379 |
RBuf8 data;
|
|
1380 |
CleanupClosePushL(data);
|
|
1381 |
|
|
1382 |
DriverCreateConferenceCallL(aMobileService, aCallId1, aCallId2);
|
|
1383 |
|
|
1384 |
// Swapping a conference call when there isn't another call causes hold
|
|
1385 |
// IPC to go to the dispatcher.
|
|
1386 |
DriverHoldCallL(aCallId1, KErrNone);
|
|
1387 |
|
|
1388 |
// Call 2 which is part of the conference will go on hold
|
|
1389 |
RMobileCall::TMobileCallStatus callStatus = RMobileCall::EStatusHold;
|
|
1390 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData(
|
|
1391 |
aCallId2, RMobilePhone::EServiceUnspecified, callStatus);
|
|
1392 |
data.Close();
|
|
1393 |
mockCallData.SerialiseL(data);
|
|
1394 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
1395 |
|
|
1396 |
DriverDialCallL(aCallId3, aMobileService);
|
|
1397 |
|
|
1398 |
TMockLtsyData2<TInt, TInt> mockData(aCallId3, aCallId1);
|
|
1399 |
data.Close();
|
|
1400 |
mockData.SerialiseL(data);
|
|
1401 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyConferenceAddCall::KLtsyDispatchCallControlMultipartyConferenceAddCallApiId, data);
|
|
1402 |
|
|
1403 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlMultipartyConferenceAddCall::KLtsyDispatchCallControlMultipartyConferenceAddCallApiId, KErrNone);
|
|
1404 |
|
|
1405 |
// When a call is added to the conference, all the calls end up connected
|
|
1406 |
callStatus = RMobileCall::EStatusConnected;
|
|
1407 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData3(
|
|
1408 |
aCallId1, RMobilePhone::EServiceUnspecified, callStatus);
|
|
1409 |
data.Close();
|
|
1410 |
mockCallData3.SerialiseL(data);
|
|
1411 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
1412 |
|
|
1413 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData4(
|
|
1414 |
aCallId2, RMobilePhone::EServiceUnspecified, callStatus);
|
|
1415 |
data.Close();
|
|
1416 |
mockCallData4.SerialiseL(data);
|
|
1417 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
1418 |
|
|
1419 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData5(
|
|
1420 |
aCallId3, RMobilePhone::EServiceUnspecified, callStatus);
|
|
1421 |
data.Close();
|
|
1422 |
mockCallData5.SerialiseL(data);
|
|
1423 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
1424 |
|
|
1425 |
CleanupStack::PopAndDestroy(1, &data);
|
|
1426 |
} // CCTsyCallControlMultipartyFU::DriverCreateConferenceWithThreeRemotePartiesL
|
|
1427 |
|
|
1428 |
void CCTsyCallControlMultipartyFU::DriverCloseTwoRemotePartyConferenceAndCallSubsessionsL(TInt aCallId1, TInt aCallId2, const RArray<TInt>& aCallIds)
|
|
1429 |
{
|
|
1430 |
RBuf8 data;
|
|
1431 |
CleanupClosePushL(data);
|
|
1432 |
|
|
1433 |
TMockLtsyData1<RArray<TInt> > ltsyData((RArray<TInt>&) aCallIds);
|
|
1434 |
ltsyData.SerialiseL(data);
|
|
1435 |
|
|
1436 |
// Clean up when subsessions are closed (conference call and the two calls in the conference)
|
|
1437 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyConferenceHangUp::KLtsyDispatchCallControlMultipartyConferenceHangUpApiId, data);
|
|
1438 |
|
|
1439 |
TInt hangUpCause = KErrGsmCCNormalCallClearing; // Hang up cause for normal hang up
|
|
1440 |
TMockLtsyData2<TInt, TInt> mockData1(aCallId1, hangUpCause);
|
|
1441 |
data.Close();
|
|
1442 |
mockData1.SerialiseL(data);
|
|
1443 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlHangUp::KLtsyDispatchCallControlHangUpApiId, data);
|
|
1444 |
|
|
1445 |
TMockLtsyData2<TInt, TInt> mockData2(aCallId2, hangUpCause);
|
|
1446 |
data.Close();
|
|
1447 |
mockData2.SerialiseL(data);
|
|
1448 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlHangUp::KLtsyDispatchCallControlHangUpApiId, data);
|
|
1449 |
|
|
1450 |
CleanupStack::PopAndDestroy(1, &data);
|
|
1451 |
} // CCTsyCallControlMultipartyFU::DriverCloseConferenceAndCallSubsessionsL
|
|
1452 |
|
|
1453 |
void CCTsyCallControlMultipartyFU::DriverCloseThreeRemotePartyConferenceAndCallSubsessionsL(TInt aCallId1, TInt aCallId2, TInt aCallId3, const RArray<TInt>& aCallIds)
|
|
1454 |
{
|
|
1455 |
RBuf8 data;
|
|
1456 |
CleanupClosePushL(data);
|
|
1457 |
|
|
1458 |
DriverCloseTwoRemotePartyConferenceAndCallSubsessionsL(aCallId1, aCallId2, aCallIds);
|
|
1459 |
|
|
1460 |
TInt hangUpCause = KErrGsmCCNormalCallClearing; // Hang up cause for normal hang up
|
|
1461 |
TMockLtsyData2<TInt, TInt> mockData2(aCallId3, hangUpCause);
|
|
1462 |
data.Close();
|
|
1463 |
mockData2.SerialiseL(data);
|
|
1464 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlHangUp::KLtsyDispatchCallControlHangUpApiId, data);
|
|
1465 |
|
|
1466 |
CleanupStack::PopAndDestroy(1, &data);
|
|
1467 |
} // CCTsyCallControlMultipartyFU::DriverCloseThreeRemotePartyConferenceAndCallSubsessionsL
|
|
1468 |
|
|
1469 |
void CCTsyCallControlMultipartyFU::ClientCreateConferenceCallL(RMobileConferenceCall& aConfCall)
|
|
1470 |
{
|
|
1471 |
ASSERT_EQUALS(KErrNone, aConfCall.Open(iPhone));
|
|
1472 |
|
|
1473 |
RMobileConferenceCall::TMobileConferenceEvent confEvent;
|
|
1474 |
TName callName;
|
|
1475 |
TRequestStatus notifyConfEventStatus;
|
|
1476 |
aConfCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
1477 |
|
|
1478 |
TRequestStatus notifyConfStatus;
|
|
1479 |
RMobileConferenceCall::TMobileConferenceStatus confStatus;
|
|
1480 |
aConfCall.NotifyConferenceStatusChange(notifyConfStatus, confStatus);
|
|
1481 |
|
|
1482 |
TRequestStatus createConfStatus;
|
|
1483 |
aConfCall.CreateConference(createConfStatus);
|
|
1484 |
|
|
1485 |
User::WaitForRequest(notifyConfEventStatus);
|
|
1486 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int());
|
|
1487 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceCallAdded, confEvent); // Call 1 when call status change notification completes
|
|
1488 |
aConfCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
1489 |
|
|
1490 |
User::WaitForRequest(notifyConfEventStatus);
|
|
1491 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int()); // Call 2 added when call status change notification completes
|
|
1492 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceCallAdded, confEvent);
|
|
1493 |
aConfCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
1494 |
|
|
1495 |
User::WaitForRequest(notifyConfEventStatus);
|
|
1496 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int());
|
|
1497 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceBuilt, confEvent);
|
|
1498 |
|
|
1499 |
User::WaitForRequest(notifyConfStatus);
|
|
1500 |
ASSERT_EQUALS(KErrNone, notifyConfStatus.Int());
|
|
1501 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceActive, confStatus);
|
|
1502 |
|
|
1503 |
User::WaitForRequest(createConfStatus);
|
|
1504 |
ASSERT_EQUALS(KErrNone, createConfStatus.Int());
|
|
1505 |
} // CCTsyCallControlMultipartyFU::ClientCreateConferenceCallL
|
|
1506 |
|
|
1507 |
void CCTsyCallControlMultipartyFU::ClientSwapConferenceCallL(RMobileConferenceCall& aConfCall,
|
|
1508 |
RMobileConferenceCall::TMobileConferenceEvent aExpectedConfEvent, RMobileConferenceCall::TMobileConferenceStatus aExpectedConfStatus)
|
|
1509 |
{
|
|
1510 |
TRequestStatus notifyConfStatus;
|
|
1511 |
RMobileConferenceCall::TMobileConferenceStatus confStatus;
|
|
1512 |
aConfCall.NotifyConferenceStatusChange(notifyConfStatus, confStatus);
|
|
1513 |
|
|
1514 |
RMobileConferenceCall::TMobileConferenceEvent confEvent;
|
|
1515 |
TName callName;
|
|
1516 |
TRequestStatus notifyConfEventStatus;
|
|
1517 |
aConfCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
1518 |
|
|
1519 |
TRequestStatus swapStatus;
|
|
1520 |
aConfCall.Swap(swapStatus);
|
|
1521 |
User::WaitForRequest(swapStatus);
|
|
1522 |
ASSERT_EQUALS(KErrNone, swapStatus.Int());
|
|
1523 |
|
|
1524 |
User::WaitForRequest(notifyConfEventStatus);
|
|
1525 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int());
|
|
1526 |
ASSERT_EQUALS(aExpectedConfEvent, confEvent);
|
|
1527 |
|
|
1528 |
User::WaitForRequest(notifyConfStatus);
|
|
1529 |
ASSERT_EQUALS(KErrNone, notifyConfStatus.Int());
|
|
1530 |
ASSERT_EQUALS(aExpectedConfStatus, confStatus);
|
|
1531 |
} // CCTsyCallControlMultipartyFU::ClientSwapConferenceCallL
|
|
1532 |
|
|
1533 |
void CCTsyCallControlMultipartyFU::ClientCreateConferenceCallAndHoldItL(
|
|
1534 |
RMobilePhone::TMobileService aMobileService, RMobileCall& aMobileCall,
|
|
1535 |
RMobileLine& aMobileLine, RMobileCall& aMobileCall2, RMobileLine& aMobileLine2,
|
|
1536 |
RMobileConferenceCall& aConfCall)
|
|
1537 |
{
|
|
1538 |
ClientDialAndHoldFirstCallDialSecondCallL(aMobileService, aMobileCall, aMobileLine, aMobileCall2, aMobileLine2);
|
|
1539 |
ClientCreateConferenceCallL(aConfCall);
|
|
1540 |
ClientSwapConferenceCallL(aConfCall, RMobileConferenceCall::EConferenceSwapped, RMobileConferenceCall::EConferenceHold);
|
|
1541 |
} // CCTsyCallControlMultipartyFU::ClientCreateConferenceCallAndHoldItL
|
|
1542 |
|
|
1543 |
void CCTsyCallControlMultipartyFU::ClientCreateConferenceCallWithThreeRemotePartiesL(
|
|
1544 |
RMobilePhone::TMobileService aMobileService, RMobileCall& aMobileCall,
|
|
1545 |
RMobileLine& aMobileLine, RMobileCall& aMobileCall2, RMobileLine& aMobileLine2,
|
|
1546 |
RMobileCall& aMobileCall3, RMobileLine& aMobileLine3,
|
|
1547 |
RMobileConferenceCall& aConfCall)
|
|
1548 |
{
|
|
1549 |
ClientCreateConferenceCallAndHoldItL(aMobileService, aMobileCall,
|
|
1550 |
aMobileLine, aMobileCall2, aMobileLine2, aConfCall);
|
|
1551 |
|
|
1552 |
// Dial a new call and add it to the conference
|
|
1553 |
ClientDialCallL(aMobileLine3, aMobileCall3, aMobileService);
|
|
1554 |
|
|
1555 |
RMobileCall::TMobileCallInfoV1 callInfo;
|
|
1556 |
RMobileCall::TMobileCallInfoV1Pckg callInfoPckg(callInfo);
|
|
1557 |
ASSERT_EQUALS(KErrNone, aMobileCall3.GetMobileCallInfo(callInfoPckg));
|
|
1558 |
|
|
1559 |
TRequestStatus addCallStatus;
|
|
1560 |
aConfCall.AddCall(addCallStatus, callInfo.iCallName);
|
|
1561 |
User::WaitForRequest(addCallStatus);
|
|
1562 |
ASSERT_EQUALS(KErrNone, addCallStatus.Int());
|
|
1563 |
|
|
1564 |
TRequestStatus notifyConfStatus;
|
|
1565 |
RMobileConferenceCall::TMobileConferenceStatus confStatus;
|
|
1566 |
aConfCall.NotifyConferenceStatusChange(notifyConfStatus, confStatus);
|
|
1567 |
|
|
1568 |
RMobileConferenceCall::TMobileConferenceEvent confEvent;
|
|
1569 |
TName callName;
|
|
1570 |
TRequestStatus notifyConfEventStatus;
|
|
1571 |
aConfCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
1572 |
|
|
1573 |
User::WaitForRequest(notifyConfEventStatus);
|
|
1574 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int());
|
|
1575 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceCallAdded, confEvent);
|
|
1576 |
|
|
1577 |
User::WaitForRequest(notifyConfStatus);
|
|
1578 |
ASSERT_EQUALS(KErrNone, notifyConfStatus.Int());
|
|
1579 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceActive, confStatus);
|
|
1580 |
|
|
1581 |
TInt numCalls;
|
|
1582 |
ASSERT_EQUALS(KErrNone, aConfCall.EnumerateCalls(numCalls));
|
|
1583 |
ASSERT_EQUALS(3, numCalls);
|
|
1584 |
} // CCTsyCallControlMultipartyFU::ClientCreateConferenceCallWithThreeRemotePartiesL
|
|
1585 |
|
|
1586 |
|
|
1587 |
|