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 |
// when support for the various APIs are disabled in the dispatch layer.
|
|
15 |
//
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
/**
|
|
20 |
@file The TEFUnit test suite for SmsControl in the Common TSY
|
|
21 |
*/
|
|
22 |
|
|
23 |
#include "cctsycallcontrolmultipartyfunegative.h"
|
|
24 |
|
|
25 |
#include <etelmm.h>
|
|
26 |
#include <ctsy/ltsy/mltsydispatchcallcontrolmultipartyinterface.h>
|
|
27 |
|
|
28 |
#include <etel.h>
|
|
29 |
#include <et_clsvr.h>
|
|
30 |
#include <ctsy/mmtsy_names.h>
|
|
31 |
#include <ctsy/serviceapi/mmtsy_ipcdefs.h>
|
|
32 |
#include <ctsy/serviceapi/gsmerror.h>
|
|
33 |
#include <ctsy/ltsy/mltsydispatchcallcontrolinterface.h>
|
|
34 |
|
|
35 |
#include <test/tmockltsydata.h>
|
|
36 |
#include "mockltsyindicatorids.h"
|
|
37 |
|
|
38 |
#include "config.h"
|
|
39 |
|
|
40 |
|
|
41 |
CTestSuite* CCTsyCallControlMultipartyFUNegative::CreateSuiteL(const TDesC& aName)
|
|
42 |
{
|
|
43 |
SUB_SUITE;
|
|
44 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlMultipartyFUNegative, TestHangUpL);
|
|
45 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlMultipartyFUNegative, TestAddCallL);
|
|
46 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlMultipartyFUNegative, TestCreateConferenceL);
|
|
47 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlMultipartyFUNegative, TestSwapL);
|
|
48 |
ADD_TEST_STEP_ISO_CPP(CCTsyCallControlMultipartyFUNegative, TestGoOneToOneL);
|
|
49 |
END_SUITE;
|
|
50 |
}
|
|
51 |
|
|
52 |
/**
|
|
53 |
* @SYMTestCaseID BA-CTSYD-DIS-CALLCONTROLMULTIPARTY-NEGATIVE-UN0001
|
|
54 |
* @SYMComponent telephony_ctsy
|
|
55 |
* @SYMTestCaseDesc Test handing in CTSY dispatch when the Hangup API is disabled
|
|
56 |
* @SYMTestPriority High
|
|
57 |
* @SYMTestActions Disable API, call API, check correct error returned
|
|
58 |
* @SYMTestExpectedResults Pass
|
|
59 |
* @SYMTestType CT
|
|
60 |
*/
|
|
61 |
void CCTsyCallControlMultipartyFUNegative::TestHangUpL()
|
|
62 |
{
|
|
63 |
// Note: based on original non-negative test void CCTsyCallControlMultipartyFU::TestUseCase0003L()
|
|
64 |
|
|
65 |
TConfig config;
|
|
66 |
config.SetSupportedValue(MLtsyDispatchCallControlMultipartyConferenceHangUp::KLtsyDispatchCallControlMultipartyConferenceHangUpApiId, EFalse);
|
|
67 |
config.PushL();
|
|
68 |
|
|
69 |
OpenEtelServerL(EUseExtendedError);
|
|
70 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
71 |
OpenPhoneL();
|
|
72 |
|
|
73 |
RBuf8 data;
|
|
74 |
CleanupClosePushL(data);
|
|
75 |
|
|
76 |
TInt callId1 = 1;
|
|
77 |
TInt callId2 = 2;
|
|
78 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
79 |
DriverCreateConferenceCallL(mobileService, callId1, callId2);
|
|
80 |
|
|
81 |
DriverHangUpCallL(callId1, KErrGsmCCNormalCallClearing, EFalse);
|
|
82 |
DriverHangUpCallL(callId2, KErrGsmCCNormalCallClearing);
|
|
83 |
|
|
84 |
// Client side test
|
|
85 |
|
|
86 |
RMobileLine mobileLine;
|
|
87 |
CleanupClosePushL(mobileLine);
|
|
88 |
RMobileCall mobileCall;
|
|
89 |
CleanupClosePushL(mobileCall);
|
|
90 |
|
|
91 |
RMobileLine mobileLine2;
|
|
92 |
CleanupClosePushL(mobileLine2);
|
|
93 |
RMobileCall mobileCall2;
|
|
94 |
CleanupClosePushL(mobileCall2);
|
|
95 |
|
|
96 |
ClientDialAndHoldFirstCallDialSecondCallL(mobileService, mobileCall, mobileLine,
|
|
97 |
mobileCall2, mobileLine2);
|
|
98 |
|
|
99 |
RMobileConferenceCall confCall;
|
|
100 |
CleanupClosePushL(confCall);
|
|
101 |
|
|
102 |
TRequestStatus notifyCall1Status;
|
|
103 |
RMobileCall::TMobileCallStatus call1Status;
|
|
104 |
mobileCall.NotifyMobileCallStatusChange(notifyCall1Status, call1Status);
|
|
105 |
|
|
106 |
ClientCreateConferenceCallL(confCall);
|
|
107 |
|
|
108 |
User::WaitForRequest(notifyCall1Status);
|
|
109 |
ASSERT_EQUALS(KErrNone, notifyCall1Status.Int());
|
|
110 |
ASSERT_EQUALS(RMobileCall::EStatusConnected, call1Status);
|
|
111 |
|
|
112 |
TRequestStatus hangupStatus;
|
|
113 |
confCall.HangUp(hangupStatus);
|
|
114 |
User::WaitForRequest(hangupStatus);
|
|
115 |
ASSERT_EQUALS(KErrNotSupported, hangupStatus.Int());
|
|
116 |
|
|
117 |
// Boths calls should still be connected
|
|
118 |
RMobileCall::TMobileCallStatus callStatus;
|
|
119 |
ASSERT_EQUALS(KErrNone, mobileCall.GetMobileCallStatus(callStatus));
|
|
120 |
ASSERT_EQUALS(RMobileCall::EStatusConnected, callStatus);
|
|
121 |
ASSERT_EQUALS(KErrNone, mobileCall2.GetMobileCallStatus(callStatus));
|
|
122 |
ASSERT_EQUALS(RMobileCall::EStatusConnected, callStatus);
|
|
123 |
|
|
124 |
// Hang up the calls
|
|
125 |
ClientHangUpCallL(mobileCall);
|
|
126 |
ClientHangUpCallL(mobileCall2);
|
|
127 |
|
|
128 |
User::After(100000); // Allow the lifetimer to be updated before ending the test
|
|
129 |
|
|
130 |
mobileCall.Close();
|
|
131 |
mobileCall2.Close();
|
|
132 |
|
|
133 |
AssertMockLtsyStatusL();
|
|
134 |
CleanupStack::PopAndDestroy(8, &config); // confCall, this, config
|
|
135 |
}
|
|
136 |
|
|
137 |
|
|
138 |
/**
|
|
139 |
* @SYMTestCaseID BA-CTSYD-DIS-CALLCONTROLMULTIPARTY-NEGATIVE-UN0002
|
|
140 |
* @SYMComponent telephony_ctsy
|
|
141 |
* @SYMTestCaseDesc Test handing in CTSY dispatch when the AddCall API is disabled
|
|
142 |
* @SYMTestPriority High
|
|
143 |
* @SYMTestActions Disable API, call API, check correct error returned
|
|
144 |
* @SYMTestExpectedResults Pass
|
|
145 |
* @SYMTestType CT
|
|
146 |
*/
|
|
147 |
void CCTsyCallControlMultipartyFUNegative::TestAddCallL()
|
|
148 |
{
|
|
149 |
// Note: based on non-negative test CCTsyCallControlMultipartyFU::TestUseCase0007L()
|
|
150 |
|
|
151 |
TConfig config;
|
|
152 |
config.SetSupportedValue(MLtsyDispatchCallControlMultipartyConferenceAddCall::KLtsyDispatchCallControlMultipartyConferenceAddCallApiId, EFalse);
|
|
153 |
config.PushL();
|
|
154 |
|
|
155 |
OpenEtelServerL(EUseExtendedError);
|
|
156 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
157 |
OpenPhoneL();
|
|
158 |
|
|
159 |
TInt callId1 = 1;
|
|
160 |
TInt callId2 = 2;
|
|
161 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
162 |
DriverCreateConferenceCallAndHoldItL(mobileService, callId1, callId2);
|
|
163 |
|
|
164 |
TInt callId3 = 3;
|
|
165 |
DriverDialCallL(callId3, mobileService);
|
|
166 |
|
|
167 |
DriverHangUpCallL(callId1, KErrGsmCCNormalCallClearing, EFalse);
|
|
168 |
DriverHangUpCallL(callId2, KErrGsmCCNormalCallClearing, EFalse);
|
|
169 |
DriverHangUpCallL(callId3, KErrGsmCCNormalCallClearing);
|
|
170 |
|
|
171 |
// Client side test
|
|
172 |
|
|
173 |
RMobileLine mobileLine;
|
|
174 |
CleanupClosePushL(mobileLine);
|
|
175 |
RMobileCall mobileCall;
|
|
176 |
CleanupClosePushL(mobileCall);
|
|
177 |
|
|
178 |
RMobileLine mobileLine2;
|
|
179 |
CleanupClosePushL(mobileLine2);
|
|
180 |
RMobileCall mobileCall2;
|
|
181 |
CleanupClosePushL(mobileCall2);
|
|
182 |
|
|
183 |
ClientDialAndHoldFirstCallDialSecondCallL(mobileService, mobileCall, mobileLine,
|
|
184 |
mobileCall2, mobileLine2);
|
|
185 |
|
|
186 |
RMobileConferenceCall confCall;
|
|
187 |
CleanupClosePushL(confCall);
|
|
188 |
|
|
189 |
TRequestStatus notifyCall1Status;
|
|
190 |
RMobileCall::TMobileCallStatus call1Status;
|
|
191 |
mobileCall.NotifyMobileCallStatusChange(notifyCall1Status, call1Status);
|
|
192 |
|
|
193 |
ClientCreateConferenceCallL(confCall);
|
|
194 |
|
|
195 |
User::WaitForRequest(notifyCall1Status);
|
|
196 |
ASSERT_EQUALS(KErrNone, notifyCall1Status.Int());
|
|
197 |
ASSERT_EQUALS(RMobileCall::EStatusConnected, call1Status);
|
|
198 |
|
|
199 |
mobileCall.NotifyMobileCallStatusChange(notifyCall1Status, call1Status);
|
|
200 |
|
|
201 |
TRequestStatus notifyCall2Status;
|
|
202 |
RMobileCall::TMobileCallStatus call2Status;
|
|
203 |
mobileCall2.NotifyMobileCallStatusChange(notifyCall2Status, call2Status);
|
|
204 |
|
|
205 |
ClientSwapConferenceCallL(confCall, RMobileConferenceCall::EConferenceSwapped,
|
|
206 |
RMobileConferenceCall::EConferenceHold);
|
|
207 |
|
|
208 |
User::WaitForRequest(notifyCall1Status);
|
|
209 |
ASSERT_EQUALS(KErrNone, notifyCall1Status.Int());
|
|
210 |
ASSERT_EQUALS(RMobileCall::EStatusHold, call1Status);
|
|
211 |
|
|
212 |
User::WaitForRequest(notifyCall2Status);
|
|
213 |
ASSERT_EQUALS(KErrNone, notifyCall2Status.Int());
|
|
214 |
ASSERT_EQUALS(RMobileCall::EStatusHold, call2Status);
|
|
215 |
|
|
216 |
// Dial a new call and attempt to add it to the conference
|
|
217 |
RMobileLine mobileLine3;
|
|
218 |
CleanupClosePushL(mobileLine3);
|
|
219 |
RMobileCall mobileCall3;
|
|
220 |
CleanupClosePushL(mobileCall3);
|
|
221 |
|
|
222 |
ClientDialCallL(mobileLine3, mobileCall3, mobileService);
|
|
223 |
|
|
224 |
RMobileCall::TMobileCallInfoV1 callInfo;
|
|
225 |
RMobileCall::TMobileCallInfoV1Pckg callInfoPckg(callInfo);
|
|
226 |
ASSERT_EQUALS(KErrNone, mobileCall3.GetMobileCallInfo(callInfoPckg));
|
|
227 |
|
|
228 |
TRequestStatus status;
|
|
229 |
confCall.AddCall(status, callInfo.iCallName);
|
|
230 |
User::WaitForRequest(status);
|
|
231 |
ASSERT_EQUALS(status.Int(), KErrNotSupported);
|
|
232 |
|
|
233 |
// Hang up the calls
|
|
234 |
ClientHangUpCallL(mobileCall);
|
|
235 |
ClientHangUpCallL(mobileCall2);
|
|
236 |
ClientHangUpCallL(mobileCall3);
|
|
237 |
|
|
238 |
User::After(100000); // Allow the lifetimer to be updated before ending the test
|
|
239 |
|
|
240 |
mobileCall.Close();
|
|
241 |
mobileCall2.Close();
|
|
242 |
mobileCall3.Close();
|
|
243 |
|
|
244 |
AssertMockLtsyStatusL();
|
|
245 |
CleanupStack::PopAndDestroy(9, &config);
|
|
246 |
}
|
|
247 |
|
|
248 |
|
|
249 |
|
|
250 |
/**
|
|
251 |
* @SYMTestCaseID BA-CTSYD-DIS-CALLCONTROLMULTIPARTY-NEGATIVE-UN0003
|
|
252 |
* @SYMComponent telephony_ctsy
|
|
253 |
* @SYMTestCaseDesc Test handing in CTSY dispatch when the CreateConference API is disabled
|
|
254 |
* @SYMTestPriority High
|
|
255 |
* @SYMTestActions Disable API, call API, check correct error returned
|
|
256 |
* @SYMTestExpectedResults Pass
|
|
257 |
* @SYMTestType CT
|
|
258 |
*/
|
|
259 |
void CCTsyCallControlMultipartyFUNegative::TestCreateConferenceL()
|
|
260 |
{
|
|
261 |
TConfig config;
|
|
262 |
config.SetSupportedValue(MLtsyDispatchCallControlMultipartyCreateConference::KLtsyDispatchCallControlMultipartyCreateConferenceApiId, EFalse);
|
|
263 |
config.PushL();
|
|
264 |
|
|
265 |
OpenEtelServerL(EUseExtendedError);
|
|
266 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
267 |
OpenPhoneL();
|
|
268 |
|
|
269 |
RBuf8 data;
|
|
270 |
CleanupClosePushL(data);
|
|
271 |
|
|
272 |
// Set up correct conditions to be able to create a conference
|
|
273 |
TInt callId1 = 1;
|
|
274 |
TInt callId2 = 2;
|
|
275 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
276 |
DriverDialAndHoldFirstCallDialSecondCallL(mobileService, callId1, callId2);
|
|
277 |
|
|
278 |
RMobileLine mobileLine;
|
|
279 |
CleanupClosePushL(mobileLine);
|
|
280 |
RMobileCall mobileCall;
|
|
281 |
CleanupClosePushL(mobileCall);
|
|
282 |
|
|
283 |
RMobileLine mobileLine2;
|
|
284 |
CleanupClosePushL(mobileLine2);
|
|
285 |
RMobileCall mobileCall2;
|
|
286 |
CleanupClosePushL(mobileCall2);
|
|
287 |
|
|
288 |
ClientDialAndHoldFirstCallDialSecondCallL(mobileService, mobileCall, mobileLine,
|
|
289 |
mobileCall2, mobileLine2);
|
|
290 |
|
|
291 |
RMobileConferenceCall confCall;
|
|
292 |
CleanupClosePushL(confCall);
|
|
293 |
ASSERT_EQUALS(KErrNone, confCall.Open(iPhone));
|
|
294 |
|
|
295 |
// Hang up cause for normal hang up
|
|
296 |
DriverHangUpCallL(callId1, KErrGsmCCNormalCallClearing, EFalse);
|
|
297 |
DriverHangUpCallL(callId2, KErrGsmCCNormalCallClearing);
|
|
298 |
|
|
299 |
TRequestStatus status;
|
|
300 |
confCall.CreateConference(status);
|
|
301 |
User::WaitForRequest(status);
|
|
302 |
ASSERT_EQUALS(status.Int(), KErrNotSupported);
|
|
303 |
|
|
304 |
// Hang up the calls
|
|
305 |
ClientHangUpCallL(mobileCall);
|
|
306 |
ClientHangUpCallL(mobileCall2);
|
|
307 |
|
|
308 |
User::After(100000); // Allow the lifetimer to be updated before ending the test
|
|
309 |
|
|
310 |
mobileCall.Close();
|
|
311 |
mobileCall2.Close();
|
|
312 |
|
|
313 |
AssertMockLtsyStatusL();
|
|
314 |
CleanupStack::PopAndDestroy(8, &config);
|
|
315 |
}
|
|
316 |
|
|
317 |
|
|
318 |
|
|
319 |
/**
|
|
320 |
* @SYMTestCaseID BA-CTSYD-DIS-CALLCONTROLMULTIPARTY-NEGATIVE-UN0004
|
|
321 |
* @SYMComponent telephony_ctsy
|
|
322 |
* @SYMTestCaseDesc Test handing in CTSY dispatch when the Swap API is disabled
|
|
323 |
* @SYMTestPriority High
|
|
324 |
* @SYMTestActions Disable API, call API, check correct error returned
|
|
325 |
* @SYMTestExpectedResults Pass
|
|
326 |
* @SYMTestType CT
|
|
327 |
*/
|
|
328 |
void CCTsyCallControlMultipartyFUNegative::TestSwapL()
|
|
329 |
{
|
|
330 |
// Note: Equiv non-negative test is CCTsyCallControlMultipartyFU::TestUseCase0006L
|
|
331 |
|
|
332 |
TConfig config;
|
|
333 |
config.SetSupportedValue(MLtsyDispatchCallControlMultipartyConferenceSwap::KLtsyDispatchCallControlMultipartyConferenceSwapApiId, EFalse);
|
|
334 |
config.PushL();
|
|
335 |
|
|
336 |
OpenEtelServerL(EUseExtendedError);
|
|
337 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
338 |
OpenPhoneL();
|
|
339 |
|
|
340 |
RBuf8 data;
|
|
341 |
CleanupClosePushL(data);
|
|
342 |
|
|
343 |
TInt callId1 = 1;
|
|
344 |
TInt callId2 = 2;
|
|
345 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
346 |
DriverCreateConferenceCallAndHoldItL(mobileService, callId1, callId2);
|
|
347 |
|
|
348 |
TInt callId3 = 3;
|
|
349 |
DriverDialCallL(callId3, mobileService);
|
|
350 |
|
|
351 |
DriverHangUpCallL(callId1, KErrGsmCCNormalCallClearing, EFalse);
|
|
352 |
DriverHangUpCallL(callId2, KErrGsmCCNormalCallClearing, EFalse);
|
|
353 |
DriverHangUpCallL(callId3, KErrGsmCCNormalCallClearing);
|
|
354 |
|
|
355 |
// Client side test
|
|
356 |
|
|
357 |
RMobileLine mobileLine;
|
|
358 |
CleanupClosePushL(mobileLine);
|
|
359 |
RMobileCall mobileCall;
|
|
360 |
CleanupClosePushL(mobileCall);
|
|
361 |
|
|
362 |
RMobileLine mobileLine2;
|
|
363 |
CleanupClosePushL(mobileLine2);
|
|
364 |
RMobileCall mobileCall2;
|
|
365 |
CleanupClosePushL(mobileCall2);
|
|
366 |
|
|
367 |
RMobileConferenceCall confCall;
|
|
368 |
CleanupClosePushL(confCall);
|
|
369 |
|
|
370 |
ClientCreateConferenceCallAndHoldItL(mobileService, mobileCall,
|
|
371 |
mobileLine, mobileCall2, mobileLine2, confCall);
|
|
372 |
|
|
373 |
TRequestStatus notifyCall1Status;
|
|
374 |
RMobileCall::TMobileCallStatus call1Status;
|
|
375 |
mobileCall.NotifyMobileCallStatusChange(notifyCall1Status, call1Status);
|
|
376 |
|
|
377 |
TRequestStatus notifyCall2Status;
|
|
378 |
RMobileCall::TMobileCallStatus call2Status;
|
|
379 |
mobileCall2.NotifyMobileCallStatusChange(notifyCall2Status, call2Status);
|
|
380 |
|
|
381 |
// Dial a new call and attempt to swap the conference with it
|
|
382 |
RMobileLine mobileLine3;
|
|
383 |
CleanupClosePushL(mobileLine3);
|
|
384 |
RMobileCall mobileCall3;
|
|
385 |
CleanupClosePushL(mobileCall3);
|
|
386 |
|
|
387 |
ClientDialCallL(mobileLine3, mobileCall3, mobileService);
|
|
388 |
|
|
389 |
User::WaitForRequest(notifyCall1Status);
|
|
390 |
ASSERT_EQUALS(KErrNone, notifyCall1Status.Int());
|
|
391 |
ASSERT_EQUALS(RMobileCall::EStatusConnected, call1Status);
|
|
392 |
|
|
393 |
mobileCall.NotifyMobileCallStatusChange(notifyCall1Status, call1Status);
|
|
394 |
|
|
395 |
TRequestStatus swapStatus;
|
|
396 |
confCall.Swap(swapStatus);
|
|
397 |
User::WaitForRequest(swapStatus);
|
|
398 |
ASSERT_EQUALS(KErrNotSupported, swapStatus.Int());
|
|
399 |
|
|
400 |
User::WaitForRequest(notifyCall1Status);
|
|
401 |
ASSERT_EQUALS(KErrNone, notifyCall1Status.Int());
|
|
402 |
ASSERT_EQUALS(RMobileCall::EStatusHold, call1Status);
|
|
403 |
|
|
404 |
User::WaitForRequest(notifyCall2Status);
|
|
405 |
ASSERT_EQUALS(KErrNone, notifyCall2Status.Int());
|
|
406 |
ASSERT_EQUALS(RMobileCall::EStatusHold, call2Status);
|
|
407 |
|
|
408 |
RMobileConferenceCall::TMobileConferenceStatus confStatus;
|
|
409 |
ASSERT_EQUALS(KErrNone, confCall.GetConferenceStatus(confStatus));
|
|
410 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceHold, confStatus);
|
|
411 |
|
|
412 |
// Hang up the calls
|
|
413 |
ClientHangUpCallL(mobileCall);
|
|
414 |
ClientHangUpCallL(mobileCall2);
|
|
415 |
ClientHangUpCallL(mobileCall3);
|
|
416 |
|
|
417 |
User::After(100000); // Allow the lifetimer to be updated before ending the test
|
|
418 |
|
|
419 |
mobileCall.Close();
|
|
420 |
mobileCall2.Close();
|
|
421 |
mobileCall3.Close();
|
|
422 |
|
|
423 |
AssertMockLtsyStatusL();
|
|
424 |
|
|
425 |
CleanupStack::PopAndDestroy(10, &config);
|
|
426 |
}
|
|
427 |
|
|
428 |
|
|
429 |
/**
|
|
430 |
* @SYMTestCaseID BA-CTSYD-DIS-CALLCONTROLMULTIPARTY-NEGATIVE-UN0005
|
|
431 |
* @SYMComponent telephony_ctsy
|
|
432 |
* @SYMTestCaseDesc Test handing in CTSY dispatch when the GoOneToOne API is disabled
|
|
433 |
* @SYMTestPriority High
|
|
434 |
* @SYMTestActions Disable API, call API, check correct error returned
|
|
435 |
* @SYMTestExpectedResults Pass
|
|
436 |
* @SYMTestType CT
|
|
437 |
*/
|
|
438 |
void CCTsyCallControlMultipartyFUNegative::TestGoOneToOneL()
|
|
439 |
{
|
|
440 |
// Note: Equiv non-negative test CCTsyCallControlMultipartyFU::TestUseCase0008L()
|
|
441 |
|
|
442 |
TConfig config;
|
|
443 |
config.SetSupportedValue(MLtsyDispatchCallControlMultipartyConferenceGoOneToOne::KLtsyDispatchCallControlMultipartyConferenceGoOneToOneApiId, EFalse);
|
|
444 |
config.PushL();
|
|
445 |
|
|
446 |
OpenEtelServerL(EUseExtendedError);
|
|
447 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
448 |
OpenPhoneL();
|
|
449 |
|
|
450 |
RBuf8 data;
|
|
451 |
CleanupClosePushL(data);
|
|
452 |
|
|
453 |
TInt callId1 = 1;
|
|
454 |
TInt callId2 = 2;
|
|
455 |
RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService;
|
|
456 |
DriverCreateConferenceCallL(mobileService, callId1, callId2);
|
|
457 |
|
|
458 |
RArray<TInt> callIds;
|
|
459 |
CleanupClosePushL( callIds );
|
|
460 |
callIds.AppendL( callId1 );
|
|
461 |
callIds.AppendL( callId2 );
|
|
462 |
|
|
463 |
TMockLtsyData1<RArray<TInt> > ltsyData(callIds);
|
|
464 |
data.Close();
|
|
465 |
ltsyData.SerialiseL(data);
|
|
466 |
|
|
467 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyConferenceHangUp::KLtsyDispatchCallControlMultipartyConferenceHangUpApiId, data);
|
|
468 |
iMockLTSY.CompleteL(MLtsyDispatchCallControlMultipartyConferenceHangUp::KLtsyDispatchCallControlMultipartyConferenceHangUpApiId, KErrNone);
|
|
469 |
|
|
470 |
DriverCompleteSuccessfulHangUpNotificationsL(callId1, EFalse, KErrGsmCCNormalCallClearing, EFalse);
|
|
471 |
DriverCompleteSuccessfulHangUpNotificationsL(callId2, EFalse, KErrGsmCCNormalCallClearing, ETrue);
|
|
472 |
|
|
473 |
// Client Side Test
|
|
474 |
|
|
475 |
RMobileLine mobileLine;
|
|
476 |
CleanupClosePushL(mobileLine);
|
|
477 |
RMobileCall mobileCall;
|
|
478 |
CleanupClosePushL(mobileCall);
|
|
479 |
|
|
480 |
RMobileLine mobileLine2;
|
|
481 |
CleanupClosePushL(mobileLine2);
|
|
482 |
RMobileCall mobileCall2;
|
|
483 |
CleanupClosePushL(mobileCall2);
|
|
484 |
|
|
485 |
ClientDialAndHoldFirstCallDialSecondCallL(mobileService, mobileCall, mobileLine,
|
|
486 |
mobileCall2, mobileLine2);
|
|
487 |
|
|
488 |
RMobileConferenceCall confCall;
|
|
489 |
CleanupClosePushL(confCall);
|
|
490 |
|
|
491 |
TRequestStatus notifyCall1Status;
|
|
492 |
RMobileCall::TMobileCallStatus call1Status;
|
|
493 |
mobileCall.NotifyMobileCallStatusChange(notifyCall1Status, call1Status);
|
|
494 |
|
|
495 |
ClientCreateConferenceCallL(confCall);
|
|
496 |
|
|
497 |
User::WaitForRequest(notifyCall1Status);
|
|
498 |
ASSERT_EQUALS(KErrNone, notifyCall1Status.Int());
|
|
499 |
ASSERT_EQUALS(RMobileCall::EStatusConnected, call1Status);
|
|
500 |
|
|
501 |
TRequestStatus oneToOneStatus;
|
|
502 |
mobileCall2.GoOneToOne(oneToOneStatus);
|
|
503 |
User::WaitForRequest(oneToOneStatus);
|
|
504 |
ASSERT_EQUALS(KErrNotSupported, oneToOneStatus.Int());
|
|
505 |
|
|
506 |
TInt numCalls;
|
|
507 |
ASSERT_EQUALS(KErrNone, confCall.EnumerateCalls(numCalls));
|
|
508 |
ASSERT_EQUALS(2, numCalls);
|
|
509 |
|
|
510 |
TRequestStatus hangupStatus;
|
|
511 |
confCall.HangUp(hangupStatus);
|
|
512 |
User::WaitForRequest(hangupStatus);
|
|
513 |
ASSERT_EQUALS(KErrNone, hangupStatus.Int());
|
|
514 |
|
|
515 |
mobileCall.Close();
|
|
516 |
mobileCall2.Close();
|
|
517 |
|
|
518 |
AssertMockLtsyStatusL();
|
|
519 |
CleanupStack::PopAndDestroy(9, &config);
|
|
520 |
}
|
|
521 |
|
|
522 |
|
|
523 |
//
|
|
524 |
// Helper functions
|
|
525 |
//
|
|
526 |
|
|
527 |
void CCTsyCallControlMultipartyFUNegative::DriverCreateConferenceCallL(RMobilePhone::TMobileService aMobileService, TInt aCallId1, TInt aCallId2)
|
|
528 |
{
|
|
529 |
RBuf8 data;
|
|
530 |
CleanupClosePushL(data);
|
|
531 |
|
|
532 |
DriverDialAndHoldFirstCallDialSecondCallL(aMobileService, aCallId1, aCallId2);
|
|
533 |
|
|
534 |
TMockLtsyData2<TInt, TInt> createConfData(aCallId1, aCallId2);
|
|
535 |
createConfData.SerialiseL(data);
|
|
536 |
iMockLTSY.ExpectL(MLtsyDispatchCallControlMultipartyCreateConference::KLtsyDispatchCallControlMultipartyCreateConferenceApiId, data);
|
|
537 |
|
|
538 |
RMobileCall::TMobileCallStatus callStatus = RMobileCall::EStatusConnected;
|
|
539 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData(
|
|
540 |
aCallId1, RMobilePhone::EServiceUnspecified, callStatus);
|
|
541 |
data.Close();
|
|
542 |
mockCallData.SerialiseL(data);
|
|
543 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
544 |
|
|
545 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData2(
|
|
546 |
aCallId2, RMobilePhone::EServiceUnspecified, callStatus);
|
|
547 |
data.Close();
|
|
548 |
mockCallData2.SerialiseL(data);
|
|
549 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
550 |
|
|
551 |
CleanupStack::PopAndDestroy(1, &data);
|
|
552 |
} // CCTsyCallControlMultipartyFUNegative::DriverCreateConferenceCallL
|
|
553 |
|
|
554 |
void CCTsyCallControlMultipartyFUNegative::DriverCreateConferenceCallAndHoldItL(
|
|
555 |
RMobilePhone::TMobileService aMobileService, TInt aCallId1, TInt aCallId2)
|
|
556 |
{
|
|
557 |
RBuf8 data;
|
|
558 |
CleanupClosePushL(data);
|
|
559 |
|
|
560 |
DriverCreateConferenceCallL(aMobileService, aCallId1, aCallId2);
|
|
561 |
|
|
562 |
// Swapping a conference call when there isn't another call causes hold
|
|
563 |
// IPC to go to the dispatcher.
|
|
564 |
DriverHoldCallL(aCallId1, KErrNone);
|
|
565 |
|
|
566 |
// Call 2 which is part of the conference will go on hold
|
|
567 |
RMobileCall::TMobileCallStatus callStatus = RMobileCall::EStatusHold;
|
|
568 |
TMockLtsyCallData1<RMobileCall::TMobileCallStatus> mockCallData(
|
|
569 |
aCallId2, RMobilePhone::EServiceUnspecified, callStatus);
|
|
570 |
data.Close();
|
|
571 |
mockCallData.SerialiseL(data);
|
|
572 |
iMockLTSY.CompleteL(KMockLtsyDispatchCallControlNotifyCallStatusChangeIndId, KErrNone, data);
|
|
573 |
|
|
574 |
CleanupStack::PopAndDestroy(1, &data);
|
|
575 |
} // CCTsyCallControlMultipartyFUNegative::DriverCreateConferenceCallAndHoldItL
|
|
576 |
|
|
577 |
void CCTsyCallControlMultipartyFUNegative::ClientCreateConferenceCallL(RMobileConferenceCall& aConfCall)
|
|
578 |
{
|
|
579 |
ASSERT_EQUALS(KErrNone, aConfCall.Open(iPhone));
|
|
580 |
|
|
581 |
RMobileConferenceCall::TMobileConferenceEvent confEvent;
|
|
582 |
TName callName;
|
|
583 |
TRequestStatus notifyConfEventStatus;
|
|
584 |
aConfCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
585 |
|
|
586 |
TRequestStatus notifyConfStatus;
|
|
587 |
RMobileConferenceCall::TMobileConferenceStatus confStatus;
|
|
588 |
aConfCall.NotifyConferenceStatusChange(notifyConfStatus, confStatus);
|
|
589 |
|
|
590 |
TRequestStatus createConfStatus;
|
|
591 |
aConfCall.CreateConference(createConfStatus);
|
|
592 |
|
|
593 |
User::WaitForRequest(notifyConfEventStatus);
|
|
594 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int());
|
|
595 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceCallAdded, confEvent); // Call 1 when call status change notification completes
|
|
596 |
aConfCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
597 |
|
|
598 |
User::WaitForRequest(notifyConfEventStatus);
|
|
599 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int()); // Call 2 added when call status change notification completes
|
|
600 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceCallAdded, confEvent);
|
|
601 |
aConfCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
602 |
|
|
603 |
User::WaitForRequest(notifyConfEventStatus);
|
|
604 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int());
|
|
605 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceBuilt, confEvent);
|
|
606 |
|
|
607 |
User::WaitForRequest(notifyConfStatus);
|
|
608 |
ASSERT_EQUALS(KErrNone, notifyConfStatus.Int());
|
|
609 |
ASSERT_EQUALS(RMobileConferenceCall::EConferenceActive, confStatus);
|
|
610 |
|
|
611 |
User::WaitForRequest(createConfStatus);
|
|
612 |
ASSERT_EQUALS(KErrNone, createConfStatus.Int());
|
|
613 |
} // CCTsyCallControlMultipartyFUNegative::ClientCreateConferenceCallL
|
|
614 |
|
|
615 |
void CCTsyCallControlMultipartyFUNegative::ClientSwapConferenceCallL(RMobileConferenceCall& aConfCall,
|
|
616 |
RMobileConferenceCall::TMobileConferenceEvent aExpectedConfEvent, RMobileConferenceCall::TMobileConferenceStatus aExpectedConfStatus)
|
|
617 |
{
|
|
618 |
TRequestStatus notifyConfStatus;
|
|
619 |
RMobileConferenceCall::TMobileConferenceStatus confStatus;
|
|
620 |
aConfCall.NotifyConferenceStatusChange(notifyConfStatus, confStatus);
|
|
621 |
|
|
622 |
RMobileConferenceCall::TMobileConferenceEvent confEvent;
|
|
623 |
TName callName;
|
|
624 |
TRequestStatus notifyConfEventStatus;
|
|
625 |
aConfCall.NotifyConferenceEvent(notifyConfEventStatus, confEvent, callName);
|
|
626 |
|
|
627 |
TRequestStatus swapStatus;
|
|
628 |
aConfCall.Swap(swapStatus);
|
|
629 |
User::WaitForRequest(swapStatus);
|
|
630 |
ASSERT_EQUALS(KErrNone, swapStatus.Int());
|
|
631 |
|
|
632 |
User::WaitForRequest(notifyConfEventStatus);
|
|
633 |
ASSERT_EQUALS(KErrNone, notifyConfEventStatus.Int());
|
|
634 |
ASSERT_EQUALS(aExpectedConfEvent, confEvent);
|
|
635 |
|
|
636 |
User::WaitForRequest(notifyConfStatus);
|
|
637 |
ASSERT_EQUALS(KErrNone, notifyConfStatus.Int());
|
|
638 |
ASSERT_EQUALS(aExpectedConfStatus, confStatus);
|
|
639 |
} // CCTsyCallControlMultipartyFUNegative::ClientSwapConferenceCallL
|
|
640 |
|
|
641 |
void CCTsyCallControlMultipartyFUNegative::ClientCreateConferenceCallAndHoldItL(
|
|
642 |
RMobilePhone::TMobileService aMobileService, RMobileCall& aMobileCall,
|
|
643 |
RMobileLine& aMobileLine, RMobileCall& aMobileCall2, RMobileLine& aMobileLine2,
|
|
644 |
RMobileConferenceCall& aConfCall)
|
|
645 |
{
|
|
646 |
ClientDialAndHoldFirstCallDialSecondCallL(aMobileService, aMobileCall, aMobileLine, aMobileCall2, aMobileLine2);
|
|
647 |
ClientCreateConferenceCallL(aConfCall);
|
|
648 |
ClientSwapConferenceCallL(aConfCall, RMobileConferenceCall::EConferenceSwapped, RMobileConferenceCall::EConferenceHold);
|
|
649 |
} // CCTsyCallControlMultipartyFUNegative::ClientCreateConferenceCallAndHoldItL
|
|
650 |
|