24
|
1 |
// Copyright (c) 1997-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 |
//
|
|
15 |
|
|
16 |
#include <e32test.h>
|
|
17 |
|
|
18 |
#include "TE_EtelMMTestStepBase.h"
|
|
19 |
#include "TE_mmcall.h"
|
|
20 |
#include "testdef.h"
|
|
21 |
|
|
22 |
CTestCall::CTestCall()
|
|
23 |
/** Each test step initialises it's own name
|
|
24 |
*/
|
|
25 |
{
|
|
26 |
// store the name of this test case
|
|
27 |
// this is the name that is used by the script file
|
|
28 |
SetTestStepName(_L("TestCall"));
|
|
29 |
}
|
|
30 |
|
|
31 |
enum TVerdict CTestCall::doTestStepL()
|
|
32 |
//
|
|
33 |
// Test Call Functions
|
|
34 |
//
|
|
35 |
{
|
|
36 |
iTestCount =1;
|
|
37 |
INFO_PRINTF1(_L(""));
|
|
38 |
INFO_PRINTF1(_L("Test Mobile Call Functionality"));
|
|
39 |
|
|
40 |
RMobilePhone mmPhone;
|
|
41 |
TInt ret=mmPhone.Open(iTelServer,DMMTSY_PHONE_NAME);
|
|
42 |
TEST(ret==KErrNone);
|
|
43 |
|
|
44 |
RMobileLine mmLine;
|
|
45 |
ret=mmLine.Open(mmPhone,DMMTSY_LINE_VOICE_NAME);
|
|
46 |
TEST(ret==KErrNone);
|
|
47 |
|
|
48 |
RMobileCall mmCall;
|
|
49 |
TName callName;
|
|
50 |
ret=mmCall.OpenNewCall(mmLine,callName);
|
|
51 |
TEST(ret==KErrNone);
|
|
52 |
|
|
53 |
TRequestStatus reqStatus;
|
|
54 |
|
|
55 |
// Test DialNoFdnCheck (Overloaded)
|
|
56 |
|
|
57 |
TBuf<RMobilePhone::KMaxMobileTelNumberSize> TelNumber(DMMTSY_PHONE_TEL_NUMBER);
|
|
58 |
|
|
59 |
// Provide standard multimode call parameter package for DialNoFdnCheck
|
|
60 |
|
|
61 |
RMobileCall::TMobileCallParamsV1 mmCallParams;
|
|
62 |
RMobileCall::TMobileCallParamsV1Pckg mmCallParamsPckg(mmCallParams);
|
|
63 |
|
|
64 |
mmCallParams.iInterval = DMMTSY_CALL_INTERVAL;
|
|
65 |
mmCallParams.iIdRestrict = DMMTSY_CALL_CLI_RESTRICT_SETTING1;
|
|
66 |
mmCallParams.iCug.iExplicitInvoke = DMMTSY_CALL_CUG_INVOKE;
|
|
67 |
mmCallParams.iCug.iCugIndex = DMMTSY_CALL_CUG_INDEX;
|
|
68 |
mmCallParams.iCug.iSuppressOA = DMMTSY_CALL_CUG_OA;
|
|
69 |
mmCallParams.iCug.iSuppressPrefCug = DMMTSY_CALL_CUG_PREF;
|
|
70 |
mmCallParams.iAutoRedial = DMMTSY_CALL_AUTO_REDIAL_FLAG;
|
|
71 |
|
|
72 |
// First Asynchronous
|
|
73 |
mmCall.DialNoFdnCheck(reqStatus, TelNumber);
|
|
74 |
User::WaitForRequest(reqStatus);
|
|
75 |
TEST(reqStatus.Int()==KErrNone);
|
|
76 |
|
|
77 |
INFO_PRINTF2(_L("Test %d - RMobileCall::DialNoFdnCheck (First async) passed"), iTestCount++);
|
|
78 |
|
|
79 |
// First Asynchronous & cancel
|
|
80 |
mmCall.DialNoFdnCheck(reqStatus, TelNumber);
|
|
81 |
mmCall.CancelAsyncRequest(EMobileCallDialNoFdnCheck);
|
|
82 |
|
|
83 |
User::WaitForRequest(reqStatus);
|
|
84 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
85 |
|
|
86 |
if (reqStatus.Int()==KErrCancel)
|
|
87 |
INFO_PRINTF2(_L("Test %d - RMobileCall::DialNoFdnCheck (First async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
88 |
else
|
|
89 |
INFO_PRINTF2(_L("Test %d - RMobileCall::DialNoFdnCheck (First async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
90 |
|
|
91 |
// Second Asynchronous
|
|
92 |
mmCall.DialNoFdnCheck(reqStatus, mmCallParamsPckg, TelNumber);
|
|
93 |
User::WaitForRequest(reqStatus);
|
|
94 |
TEST(reqStatus.Int()==KErrNone);
|
|
95 |
|
|
96 |
INFO_PRINTF2(_L("Test %d - RMobileCall::DialNoFdnCheck (Second async) passed"), iTestCount++);
|
|
97 |
|
|
98 |
// Second Asynchronous & cancel
|
|
99 |
mmCall.DialNoFdnCheck(reqStatus, mmCallParamsPckg, TelNumber);
|
|
100 |
mmCall.CancelAsyncRequest(EMobileCallDialNoFdnCheck);
|
|
101 |
|
|
102 |
User::WaitForRequest(reqStatus);
|
|
103 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
104 |
|
|
105 |
if (reqStatus.Int()==KErrCancel)
|
|
106 |
INFO_PRINTF2(_L("Test %d - RMobileCall::DialNoFdnCheck (Second async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
107 |
else
|
|
108 |
INFO_PRINTF2(_L("Test %d - RMobileCall::DialNoFdnCheck (Second async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
109 |
|
|
110 |
// Test Set Call Parameters within Dial
|
|
111 |
// Create a multimode call parameter package, send it as part of Dial
|
|
112 |
mmCallParams.iInterval = DMMTSY_CALL_INTERVAL;
|
|
113 |
mmCallParams.iIdRestrict = DMMTSY_CALL_CLI_RESTRICT_SETTING1;
|
|
114 |
mmCallParams.iCug.iExplicitInvoke = DMMTSY_CALL_CUG_INVOKE;
|
|
115 |
mmCallParams.iCug.iCugIndex = DMMTSY_CALL_CUG_INDEX;
|
|
116 |
mmCallParams.iCug.iSuppressOA = DMMTSY_CALL_CUG_OA;
|
|
117 |
mmCallParams.iCug.iSuppressPrefCug = DMMTSY_CALL_CUG_PREF;
|
|
118 |
mmCallParams.iAutoRedial = DMMTSY_CALL_AUTO_REDIAL_FLAG;
|
|
119 |
|
|
120 |
// TBuf<RMobilePhone::KMaxMobileTelNumberSize> number(DMMTSY_PHONE_TEL_NUMBER);
|
|
121 |
iNumber = DMMTSY_PHONE_TEL_NUMBER;
|
|
122 |
TEST(KErrNone==mmCall.Dial(mmCallParamsPckg, iNumber));
|
|
123 |
INFO_PRINTF2(_L("Test %d - RMobileCall::Dial (MM Call Params) passed"), iTestCount++);
|
|
124 |
|
|
125 |
|
|
126 |
// Test Set Call using V2 Parameters within Dial
|
|
127 |
// Create a multimode call parameter package, send it as part of Dial
|
|
128 |
RMobileCall::TMobileCallParamsV2 mmCallParamsV2;
|
|
129 |
|
|
130 |
mmCallParamsV2.iInterval = DMMTSY_CALL_INTERVAL;
|
|
131 |
mmCallParamsV2.iIdRestrict = DMMTSY_CALL_CLI_RESTRICT_SETTING1;
|
|
132 |
mmCallParamsV2.iCug.iExplicitInvoke = DMMTSY_CALL_CUG_INVOKE;
|
|
133 |
mmCallParamsV2.iCug.iCugIndex = DMMTSY_CALL_CUG_INDEX;
|
|
134 |
mmCallParamsV2.iCug.iSuppressOA = DMMTSY_CALL_CUG_OA;
|
|
135 |
mmCallParamsV2.iCug.iSuppressPrefCug = DMMTSY_CALL_CUG_PREF;
|
|
136 |
mmCallParamsV2.iAutoRedial = DMMTSY_CALL_AUTO_REDIAL_FLAG;
|
|
137 |
mmCallParamsV2.iBearerMode = DMMTSY_CALL_NEW_BEARER;
|
|
138 |
|
|
139 |
RMobileCall::TMobileCallParamsV2Pckg mmCallParamsV2Pckg(mmCallParamsV2);
|
|
140 |
TEST(KErrNone==mmCall.Dial(mmCallParamsV2Pckg, iNumber));
|
|
141 |
INFO_PRINTF2(_L("Test %d - RMobileCall::Dial (MMv2 Call Params) passed"), iTestCount++);
|
|
142 |
|
|
143 |
// Test Set Call using V7 Parameters within Dial
|
|
144 |
// Create a multimode call parameter package, send it as part of Dial
|
|
145 |
RMobileCall::TMobileCallParamsV7 mmCallParamsV7;
|
|
146 |
TEST(mmCallParamsV7.ExtensionId() == RMobileCall::KETelMobileCallParamsV7);
|
|
147 |
|
|
148 |
mmCallParamsV7.iInterval = DMMTSY_CALL_INTERVAL;
|
|
149 |
mmCallParamsV7.iIdRestrict = DMMTSY_CALL_CLI_RESTRICT_SETTING1;
|
|
150 |
mmCallParamsV7.iCug.iExplicitInvoke = DMMTSY_CALL_CUG_INVOKE;
|
|
151 |
mmCallParamsV7.iCug.iCugIndex = DMMTSY_CALL_CUG_INDEX;
|
|
152 |
mmCallParamsV7.iCug.iSuppressOA = DMMTSY_CALL_CUG_OA;
|
|
153 |
mmCallParamsV7.iCug.iSuppressPrefCug = DMMTSY_CALL_CUG_PREF;
|
|
154 |
mmCallParamsV7.iAutoRedial = DMMTSY_CALL_AUTO_REDIAL_FLAG;
|
|
155 |
mmCallParamsV7.iBearerMode = DMMTSY_CALL_NEW_BEARER;
|
|
156 |
mmCallParamsV7.iCallParamOrigin = DMMTSY_CALL_PARAM_ORIGIN;
|
|
157 |
mmCallParamsV7.iSubAddress = DMMTSY_CALL_SUBADDRESS;
|
|
158 |
mmCallParamsV7.iBearerCap1 = DMMTSY_CALL_BEARER_CAP1;
|
|
159 |
mmCallParamsV7.iBearerCap2 = DMMTSY_CALL_BEARER_CAP2;
|
|
160 |
mmCallParamsV7.iBCRepeatIndicator = DMMTSY_CALL_BC_REPEAT_INDICATOR;
|
|
161 |
mmCallParamsV7.iIconId.iQualifier = DMMTSY_CALL_ICON_ID_QUALIFIER;
|
|
162 |
mmCallParamsV7.iIconId.iIdentifier = DMMTSY_CALL_ICON_ID_IDENTIFIER;
|
|
163 |
mmCallParamsV7.iAlphaId = DMMTSY_CALL_ALPHA_ID;
|
|
164 |
|
|
165 |
RMobileCall::TMobileCallParamsV7Pckg mmCallParamsV7Pckg(mmCallParamsV7);
|
|
166 |
TEST(KErrNone==mmCall.Dial(mmCallParamsV7Pckg, iNumber));
|
|
167 |
INFO_PRINTF2(_L("Test %d - RMobileCall::Dial (MMv7 Call Params) passed"), iTestCount++);
|
|
168 |
|
|
169 |
// Test RMobileCall::DialCallControl with RMobileCall::TMobileCallParamsV7
|
|
170 |
|
|
171 |
// If this test fails, ensure that the line:
|
|
172 |
// etel_KSatEngineSid 0x10281806
|
|
173 |
// is present in \epoc32\data\epoc.ini
|
|
174 |
TRequestStatus dialCallControlStatus;
|
|
175 |
mmCall.DialCallControl(dialCallControlStatus, mmCallParamsV7Pckg, iNumber);
|
|
176 |
User::WaitForRequest(dialCallControlStatus);
|
|
177 |
TEST(KErrNone==dialCallControlStatus.Int());
|
|
178 |
|
|
179 |
// Asynchronous and cancel
|
|
180 |
mmCall.DialCallControl(dialCallControlStatus, mmCallParamsV7Pckg, iNumber);
|
|
181 |
mmCall.CancelAsyncRequest(EMobileCallDialCallControl);
|
|
182 |
User::WaitForRequest(dialCallControlStatus);
|
|
183 |
TEST(KErrNone==dialCallControlStatus.Int() || KErrCancel==dialCallControlStatus.Int());
|
|
184 |
|
|
185 |
INFO_PRINTF2(_L("Test %d - RMobileCall::DialCallControl with RMobileCall::TMobileCallParamsV3 passed"), iTestCount++);
|
|
186 |
|
|
187 |
// Test RMobileCall::DialCallControl with no number
|
|
188 |
TBuf<1> noNumberBuf;
|
|
189 |
noNumberBuf.Zero();
|
|
190 |
mmCall.DialCallControl(dialCallControlStatus, mmCallParamsV7Pckg, noNumberBuf);
|
|
191 |
User::WaitForRequest(dialCallControlStatus);
|
|
192 |
TEST(KErrArgument==dialCallControlStatus.Int());
|
|
193 |
|
|
194 |
INFO_PRINTF2(_L("Test %d - RMobileCall::DialCallControl with RMobileCall::TMobileCallParamsV3 and no number passed"), iTestCount++);
|
|
195 |
|
|
196 |
//
|
|
197 |
|
|
198 |
// Try to get just the core ETel API parts of the TCallParams
|
|
199 |
RCall::TCallParams coreCallParams;
|
|
200 |
RCall::TCallParamsPckg coreCallParamsPckg(coreCallParams);
|
|
201 |
|
|
202 |
TEST(KErrNone==mmCall.GetCallParams(coreCallParamsPckg));
|
|
203 |
|
|
204 |
TEST(coreCallParams.ExtensionId()==0);
|
|
205 |
TEST(coreCallParams.iInterval==DMMTSY_CALL_INTERVAL);
|
|
206 |
|
|
207 |
// Get the multimode call parameters this time
|
|
208 |
RMobileCall::TMobileCallParamsV1 mmCallParams2;
|
|
209 |
RMobileCall::TMobileCallParamsV1Pckg mmCallParams2Pckg(mmCallParams2);
|
|
210 |
|
|
211 |
TEST(KErrNone==mmCall.GetCallParams(mmCallParams2Pckg));
|
|
212 |
|
|
213 |
TEST(mmCallParams2.ExtensionId()==RMobileCall::KETelMobileCallParamsV1);
|
|
214 |
TEST(mmCallParams2.iInterval==DMMTSY_CALL_INTERVAL);
|
|
215 |
TEST(mmCallParams2.iIdRestrict==DMMTSY_CALL_CLI_RESTRICT_SETTING1);
|
|
216 |
TEST(mmCallParams2.iCug.iExplicitInvoke==DMMTSY_CALL_CUG_INVOKE);
|
|
217 |
TEST(mmCallParams2.iCug.iCugIndex==DMMTSY_CALL_CUG_INDEX);
|
|
218 |
TEST(mmCallParams2.iCug.iSuppressOA==DMMTSY_CALL_CUG_OA);
|
|
219 |
TEST(mmCallParams2.iCug.iSuppressPrefCug==DMMTSY_CALL_CUG_PREF);
|
|
220 |
TEST(mmCallParams2.iAutoRedial==DMMTSY_CALL_AUTO_REDIAL_FLAG);
|
|
221 |
|
|
222 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GetCallParams (MM Call Params) passed"), iTestCount++);
|
|
223 |
|
|
224 |
// Test GetMobileDataCallCaps
|
|
225 |
RMobileCall::TMobileCallDataCapsV1 dataCaps, asyncDataCaps;
|
|
226 |
RMobileCall::TMobileCallDataCapsV1Pckg dataCapsPckg(dataCaps);
|
|
227 |
RMobileCall::TMobileCallDataCapsV1Pckg asyncDataCapsPckg(asyncDataCaps);
|
|
228 |
|
|
229 |
TEST(mmCall.GetMobileDataCallCaps(dataCapsPckg) == KErrNone);
|
|
230 |
ValidateCallDataCaps(dataCaps);
|
|
231 |
|
|
232 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GetMobileDataCallCaps (sync) passed"), iTestCount++);
|
|
233 |
|
|
234 |
// Test NotifyMobileDataCallCapsChange
|
|
235 |
// asynchronous
|
|
236 |
mmCall.NotifyMobileDataCallCapsChange(reqStatus,asyncDataCapsPckg);
|
|
237 |
User::WaitForRequest(reqStatus);
|
|
238 |
TEST(reqStatus.Int()==KErrNone);
|
|
239 |
ValidateCallDataCaps(asyncDataCaps);
|
|
240 |
|
|
241 |
// asynchronous & cancel
|
|
242 |
mmCall.NotifyMobileDataCallCapsChange(reqStatus,asyncDataCapsPckg);
|
|
243 |
mmCall.CancelAsyncRequest(EMobileCallNotifyMobileDataCallCapsChange);
|
|
244 |
User::WaitForRequest(reqStatus);
|
|
245 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
246 |
if (reqStatus.Int()==KErrCancel)
|
|
247 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyMobileDataCallCapsChange (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
248 |
else
|
|
249 |
{
|
|
250 |
ValidateCallDataCaps(asyncDataCaps);
|
|
251 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyMobileDataCallCapsChange (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
252 |
}
|
|
253 |
|
|
254 |
// Test Set Data Call Parameters within Dial
|
|
255 |
RMobileCall::TMobileDataCallParamsV1 dataParams, retrieveDataParams;
|
|
256 |
RMobileCall::TMobileDataCallParamsV1Pckg dataParamsPckg(dataParams);
|
|
257 |
RMobileCall::TMobileDataCallParamsV1Pckg retrieveDataParamsPckg(retrieveDataParams);
|
|
258 |
|
|
259 |
dataParams.iIdRestrict = DMMTSY_CALL_CLI_RESTRICT_SETTING1;
|
|
260 |
dataParams.iCug.iExplicitInvoke = DMMTSY_CALL_CUG_INVOKE;
|
|
261 |
dataParams.iCug.iCugIndex = DMMTSY_CALL_CUG_INDEX;
|
|
262 |
dataParams.iCug.iSuppressOA = DMMTSY_CALL_CUG_OA;
|
|
263 |
dataParams.iCug.iSuppressPrefCug = DMMTSY_CALL_CUG_PREF;
|
|
264 |
dataParams.iAutoRedial = DMMTSY_CALL_AUTO_REDIAL_FLAG;
|
|
265 |
|
|
266 |
dataParams.iService = DMMTSY_DATA_CALL_SERVICE;
|
|
267 |
dataParams.iSpeed = DMMTSY_DATA_CALL_SPEED;
|
|
268 |
dataParams.iProtocol = DMMTSY_DATA_CALL_PROTOCOL;
|
|
269 |
dataParams.iQoS = DMMTSY_DATA_CALL_QOS;
|
|
270 |
dataParams.iRLPVersion = DMMTSY_DATA_CALL_RLP;
|
|
271 |
dataParams.iV42bisReq = DMMTSY_DATA_CALL_V42BIS;
|
|
272 |
dataParams.iUseEdge = DMMTSY_DATA_CALL_EGPRS_REQUIRED;
|
|
273 |
|
|
274 |
mmCall.Dial(reqStatus, dataParamsPckg, iNumber);
|
|
275 |
User::WaitForRequest(reqStatus);
|
|
276 |
TEST(reqStatus.Int()==KErrNone);
|
|
277 |
INFO_PRINTF2(_L("Test %d - RMobileCall::Dial (Data Call Params) passed"), iTestCount++);
|
|
278 |
|
|
279 |
// Test Get Data Call Params
|
|
280 |
TEST(mmCall.GetCallParams(retrieveDataParamsPckg) == KErrNone);
|
|
281 |
TEST(retrieveDataParams.ExtensionId()==RMobileCall::KETelMobileDataCallParamsV1);
|
|
282 |
|
|
283 |
TEST(retrieveDataParams.iIdRestrict==DMMTSY_CALL_CLI_RESTRICT_SETTING1);
|
|
284 |
TEST(retrieveDataParams.iCug.iExplicitInvoke==DMMTSY_CALL_CUG_INVOKE);
|
|
285 |
TEST(retrieveDataParams.iCug.iCugIndex==DMMTSY_CALL_CUG_INDEX);
|
|
286 |
TEST(retrieveDataParams.iCug.iSuppressOA==DMMTSY_CALL_CUG_OA);
|
|
287 |
TEST(retrieveDataParams.iCug.iSuppressPrefCug==DMMTSY_CALL_CUG_PREF);
|
|
288 |
TEST(retrieveDataParams.iAutoRedial==DMMTSY_CALL_AUTO_REDIAL_FLAG);
|
|
289 |
ValidateDataCallParams(retrieveDataParams, 0);
|
|
290 |
|
|
291 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GetCallParams (Data Call Params) passed"), iTestCount++);
|
|
292 |
|
|
293 |
// Test Set Data Call Parameters within Dial
|
|
294 |
RMobileCall::TMobileDataCallParamsV8 dataParams8, retrieveDataParams8;
|
|
295 |
RMobileCall::TMobileDataCallParamsV8Pckg dataParamsPckg8(dataParams8);
|
|
296 |
RMobileCall::TMobileDataCallParamsV8Pckg retrieveDataParamsPckg8(retrieveDataParams8);
|
|
297 |
|
|
298 |
TEST(dataParams8.ExtensionId()== RMobileCall::KETelMobileDataCallParamsV8);
|
|
299 |
TEST(dataParams8.iCallParamOrigin == RMobileCall::EOriginatorUnknown);
|
|
300 |
TEST(dataParams8.iBCRepeatIndicator == RMobileCall::EBCAlternateMode);
|
|
301 |
|
|
302 |
dataParams8.iIdRestrict = DMMTSY_CALL_CLI_RESTRICT_SETTING1;
|
|
303 |
dataParams8.iCug.iExplicitInvoke = DMMTSY_CALL_CUG_INVOKE;
|
|
304 |
dataParams8.iCug.iCugIndex = DMMTSY_CALL_CUG_INDEX;
|
|
305 |
dataParams8.iCug.iSuppressOA = DMMTSY_CALL_CUG_OA;
|
|
306 |
dataParams8.iCug.iSuppressPrefCug = DMMTSY_CALL_CUG_PREF;
|
|
307 |
dataParams8.iAutoRedial = DMMTSY_CALL_AUTO_REDIAL_FLAG;
|
|
308 |
|
|
309 |
dataParams8.iService = DMMTSY_DATA_CALL_SERVICE;
|
|
310 |
dataParams8.iSpeed = DMMTSY_DATA_CALL_SPEED;
|
|
311 |
dataParams8.iProtocol = DMMTSY_DATA_CALL_PROTOCOL;
|
|
312 |
dataParams8.iQoS = DMMTSY_DATA_CALL_QOS;
|
|
313 |
dataParams8.iRLPVersion = DMMTSY_DATA_CALL_RLP;
|
|
314 |
dataParams8.iV42bisReq = DMMTSY_DATA_CALL_V42BIS;
|
|
315 |
dataParams8.iUseEdge = DMMTSY_DATA_CALL_EGPRS_REQUIRED;
|
|
316 |
dataParams8.iBearerMode = DMMTSY_PHONE_MULTICALLBEARERMODE_NOTSUPPORTED;
|
|
317 |
|
|
318 |
dataParams8.iCallParamOrigin = DMMTSY_CALL_PARAM_ORIGIN;
|
|
319 |
dataParams8.iSubAddress = DMMTSY_CALL_SUBADDRESS;
|
|
320 |
dataParams8.iBearerCap1 = DMMTSY_CALL_BEARER_CAP1;
|
|
321 |
dataParams8.iBearerCap2 = DMMTSY_CALL_BEARER_CAP2;
|
|
322 |
dataParams8.iBCRepeatIndicator = DMMTSY_CALL_BC_REPEAT_INDICATOR;
|
|
323 |
dataParams8.iIconId.iIdentifier = DMMTSY_CALL_ICON_ID_IDENTIFIER;
|
|
324 |
dataParams8.iIconId.iQualifier = DMMTSY_CALL_ICON_ID_QUALIFIER;
|
|
325 |
dataParams8.iAlphaId = DMMTSY_CALL_ALPHA_ID;
|
|
326 |
|
|
327 |
|
|
328 |
mmCall.Dial(reqStatus, dataParamsPckg8, iNumber);
|
|
329 |
User::WaitForRequest(reqStatus);
|
|
330 |
TEST(reqStatus.Int()==KErrNone);
|
|
331 |
INFO_PRINTF2(_L("Test %d - RMobileCall::Dial (Data Call Params8) passed"), iTestCount++);
|
|
332 |
|
|
333 |
// Test Get Data Call Params
|
|
334 |
TEST(mmCall.GetCallParams(retrieveDataParamsPckg8) == KErrNone);
|
|
335 |
TEST(retrieveDataParams8.ExtensionId()==RMobileCall::KETelMobileDataCallParamsV8);
|
|
336 |
|
|
337 |
TEST(retrieveDataParams8.iIdRestrict==DMMTSY_CALL_CLI_RESTRICT_SETTING1);
|
|
338 |
TEST(retrieveDataParams8.iCug.iExplicitInvoke==DMMTSY_CALL_CUG_INVOKE);
|
|
339 |
TEST(retrieveDataParams8.iCug.iCugIndex==DMMTSY_CALL_CUG_INDEX);
|
|
340 |
TEST(retrieveDataParams8.iCug.iSuppressOA==DMMTSY_CALL_CUG_OA);
|
|
341 |
TEST(retrieveDataParams8.iCug.iSuppressPrefCug==DMMTSY_CALL_CUG_PREF);
|
|
342 |
TEST(retrieveDataParams8.iAutoRedial==DMMTSY_CALL_AUTO_REDIAL_FLAG);
|
|
343 |
|
|
344 |
ValidateDataCallParams(retrieveDataParams8, 0);
|
|
345 |
TEST(retrieveDataParams8.iCallParamOrigin==DMMTSY_CALL_PARAM_ORIGIN);
|
|
346 |
TEST(retrieveDataParams8.iSubAddress==DMMTSY_CALL_SUBADDRESS);
|
|
347 |
TEST(retrieveDataParams8.iBearerCap1==DMMTSY_CALL_BEARER_CAP1);
|
|
348 |
TEST(retrieveDataParams8.iBearerCap2==DMMTSY_CALL_BEARER_CAP2);
|
|
349 |
TEST(retrieveDataParams8.iBCRepeatIndicator==DMMTSY_CALL_BC_REPEAT_INDICATOR);
|
|
350 |
TEST(retrieveDataParams8.iIconId.iIdentifier==DMMTSY_CALL_ICON_ID_IDENTIFIER);
|
|
351 |
TEST(retrieveDataParams8.iIconId.iQualifier==DMMTSY_CALL_ICON_ID_QUALIFIER);
|
|
352 |
TEST(retrieveDataParams8.iAlphaId==DMMTSY_CALL_ALPHA_ID);
|
|
353 |
|
|
354 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GetCallParams (Data Call Params8) passed"), iTestCount++);
|
|
355 |
|
|
356 |
// Test GetMobileDataCallRLPRange
|
|
357 |
RMobileCall::TMobileDataRLPRangesV1 rlpRanges;
|
|
358 |
RMobileCall::TMobileDataRLPRangesV1Pckg rlpRangesPckg(rlpRanges);
|
|
359 |
|
|
360 |
// asynchronous
|
|
361 |
mmCall.GetMobileDataCallRLPRange(reqStatus, DMMTSY_CALL_RLP_VERSION1, rlpRangesPckg);
|
|
362 |
User::WaitForRequest(reqStatus);
|
|
363 |
TEST(reqStatus.Int()==KErrNone);
|
|
364 |
|
|
365 |
// extract the returned rlpRanges from the package
|
|
366 |
rlpRanges = rlpRangesPckg();
|
|
367 |
ValidateRLPRange(rlpRanges);
|
|
368 |
|
|
369 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GetMobileDataCallRLPRange passed"), iTestCount++);
|
|
370 |
|
|
371 |
// asynchronous & cancel
|
|
372 |
mmCall.GetMobileDataCallRLPRange(reqStatus, DMMTSY_CALL_RLP_VERSION1, rlpRangesPckg);
|
|
373 |
mmCall.CancelAsyncRequest(EMobileCallGetMobileDataCallRLPRange);
|
|
374 |
User::WaitForRequest(reqStatus);
|
|
375 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
376 |
|
|
377 |
if (reqStatus.Int()==KErrCancel)
|
|
378 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GetMobileDataCallRLPRange (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
379 |
else
|
|
380 |
{
|
|
381 |
// extract the returned rlpRanges from the package
|
|
382 |
rlpRanges = rlpRangesPckg();
|
|
383 |
ValidateRLPRange(rlpRanges);
|
|
384 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GetMobileDataCallRLPRange (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
385 |
}
|
|
386 |
|
|
387 |
|
|
388 |
// Test Set Hcsd Parameters within Dial
|
|
389 |
RMobileCall::TMobileHscsdCallParamsV1 hscsdParams, retrieveHscsdParams;
|
|
390 |
RMobileCall::TMobileHscsdCallParamsV1Pckg hscsdParamsPckg(hscsdParams);
|
|
391 |
RMobileCall::TMobileHscsdCallParamsV1Pckg retrieveHscsdParamsPckg(retrieveHscsdParams);
|
|
392 |
|
|
393 |
hscsdParams.iIdRestrict = DMMTSY_CALL_CLI_RESTRICT_SETTING1;
|
|
394 |
hscsdParams.iCug.iExplicitInvoke = DMMTSY_CALL_CUG_INVOKE;
|
|
395 |
hscsdParams.iCug.iCugIndex = DMMTSY_CALL_CUG_INDEX;
|
|
396 |
hscsdParams.iCug.iSuppressOA = DMMTSY_CALL_CUG_OA;
|
|
397 |
hscsdParams.iCug.iSuppressPrefCug = DMMTSY_CALL_CUG_PREF;
|
|
398 |
hscsdParams.iAutoRedial = DMMTSY_CALL_AUTO_REDIAL_FLAG;
|
|
399 |
|
|
400 |
hscsdParams.iService = DMMTSY_DATA_CALL_SERVICE;
|
|
401 |
hscsdParams.iSpeed = DMMTSY_DATA_CALL_SPEED;
|
|
402 |
hscsdParams.iProtocol = DMMTSY_DATA_CALL_PROTOCOL;
|
|
403 |
hscsdParams.iQoS = DMMTSY_DATA_CALL_QOS;
|
|
404 |
hscsdParams.iRLPVersion = DMMTSY_DATA_CALL_RLP;
|
|
405 |
hscsdParams.iV42bisReq = DMMTSY_DATA_CALL_V42BIS;
|
|
406 |
hscsdParams.iUseEdge = DMMTSY_DATA_CALL_EGPRS_REQUIRED;
|
|
407 |
|
|
408 |
hscsdParams.iInterval = DMMTSY_CALL_INTERVAL;
|
|
409 |
hscsdParams.iWantedAiur = DMMTSY_CALL_HCSD_AIUR;
|
|
410 |
hscsdParams.iWantedRxTimeSlots = DMMTSY_CALL_HCSD_TS;
|
|
411 |
hscsdParams.iMaxTimeSlots = DMMTSY_CALL_HCSD_MAXTS;
|
|
412 |
hscsdParams.iCodings = DMMTSY_CALL_HCSD_CODING;
|
|
413 |
hscsdParams.iAsymmetry = DMMTSY_CALL_HCSD_ASYMMETRY;
|
|
414 |
hscsdParams.iUserInitUpgrade = DMMTSY_CALL_HCSD_USER_IMI;
|
|
415 |
|
|
416 |
// asynchronous
|
|
417 |
mmCall.Dial(reqStatus, hscsdParamsPckg, iNumber);
|
|
418 |
User::WaitForRequest(reqStatus);
|
|
419 |
TEST(reqStatus.Int()==KErrNone);
|
|
420 |
|
|
421 |
// Set the dyanmic HSCSD params
|
|
422 |
mmCall.SetDynamicHscsdParams(reqStatus,hscsdParams.iWantedAiur,hscsdParams.iWantedRxTimeSlots);
|
|
423 |
User::WaitForRequest(reqStatus);
|
|
424 |
TEST(reqStatus.Int()==KErrNone);
|
|
425 |
|
|
426 |
// asynchronous & cancel
|
|
427 |
mmCall.SetDynamicHscsdParams(reqStatus,hscsdParams.iWantedAiur,hscsdParams.iWantedRxTimeSlots);
|
|
428 |
mmCall.CancelAsyncRequest(EMobileCallSetDynamicHscsdParams);
|
|
429 |
User::WaitForRequest(reqStatus);
|
|
430 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
431 |
if (reqStatus.Int()==KErrCancel)
|
|
432 |
INFO_PRINTF2(_L("Test %d - RMobileCall::SetDynamicHscsdParams (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
433 |
else
|
|
434 |
INFO_PRINTF2(_L("Test %d - RMobileCall::SetDynamicHscsdParams (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
435 |
|
|
436 |
// Test Set Hscsd Params V7 within Dial
|
|
437 |
RMobileCall::TMobileHscsdCallParamsV7 hscsdParamsV7;
|
|
438 |
RMobileCall::TMobileHscsdCallParamsV7Pckg hscsdParamsV7Pckg(hscsdParamsV7);
|
|
439 |
|
|
440 |
hscsdParamsV7.iIdRestrict = DMMTSY_CALL_CLI_RESTRICT_SETTING1;
|
|
441 |
hscsdParamsV7.iCug.iExplicitInvoke = DMMTSY_CALL_CUG_INVOKE;
|
|
442 |
hscsdParamsV7.iCug.iCugIndex = DMMTSY_CALL_CUG_INDEX;
|
|
443 |
hscsdParamsV7.iCug.iSuppressOA = DMMTSY_CALL_CUG_OA;
|
|
444 |
hscsdParamsV7.iCug.iSuppressPrefCug = DMMTSY_CALL_CUG_PREF;
|
|
445 |
hscsdParamsV7.iAutoRedial = DMMTSY_CALL_AUTO_REDIAL_FLAG;
|
|
446 |
|
|
447 |
hscsdParamsV7.iService = DMMTSY_DATA_CALL_SERVICE;
|
|
448 |
hscsdParamsV7.iSpeed = DMMTSY_DATA_CALL_SPEED;
|
|
449 |
hscsdParamsV7.iProtocol = DMMTSY_DATA_CALL_PROTOCOL;
|
|
450 |
hscsdParamsV7.iQoS = DMMTSY_DATA_CALL_QOS;
|
|
451 |
hscsdParamsV7.iRLPVersion = DMMTSY_DATA_CALL_RLP;
|
|
452 |
hscsdParamsV7.iV42bisReq = DMMTSY_DATA_CALL_V42BIS;
|
|
453 |
hscsdParamsV7.iUseEdge = DMMTSY_DATA_CALL_EGPRS_REQUIRED;
|
|
454 |
|
|
455 |
hscsdParamsV7.iInterval = DMMTSY_CALL_INTERVAL;
|
|
456 |
hscsdParamsV7.iIdRestrict = DMMTSY_CALL_CLI_RESTRICT_SETTING1;
|
|
457 |
hscsdParamsV7.iWantedAiur = DMMTSY_CALL_HCSD_AIUR;
|
|
458 |
hscsdParamsV7.iWantedRxTimeSlots = DMMTSY_CALL_HCSD_TS;
|
|
459 |
hscsdParamsV7.iMaxTimeSlots = DMMTSY_CALL_HCSD_MAXTS;
|
|
460 |
hscsdParamsV7.iCodings = DMMTSY_CALL_HCSD_CODING;
|
|
461 |
hscsdParamsV7.iAsymmetry = DMMTSY_CALL_HCSD_ASYMMETRY;
|
|
462 |
hscsdParamsV7.iUserInitUpgrade = DMMTSY_CALL_HCSD_USER_IMI;
|
|
463 |
hscsdParamsV7.iBearerMode = DMMTSY_CALL_NEW_BEARER;
|
|
464 |
hscsdParamsV7.iCallParamOrigin = DMMTSY_CALL_PARAM_ORIGIN;
|
|
465 |
hscsdParamsV7.iIconId.iIdentifier = DMMTSY_CALL_ICON_ID_IDENTIFIER;
|
|
466 |
hscsdParamsV7.iIconId.iQualifier = DMMTSY_CALL_ICON_ID_QUALIFIER;
|
|
467 |
hscsdParamsV7.iAlphaId = DMMTSY_CALL_ALPHA_ID;
|
|
468 |
|
|
469 |
// asynchronous
|
|
470 |
mmCall.Dial(reqStatus, hscsdParamsV7Pckg, iNumber);
|
|
471 |
User::WaitForRequest(reqStatus);
|
|
472 |
TEST(reqStatus.Int()==KErrNone);
|
|
473 |
|
|
474 |
INFO_PRINTF2(_L("Test %d - RMobileCall::Dial (HSCSDv7 Call Params) passed"), iTestCount++);
|
|
475 |
|
|
476 |
// Test Get Hscsd Params
|
|
477 |
TEST(mmCall.GetCallParams(retrieveHscsdParamsPckg) == KErrNone);
|
|
478 |
TEST(retrieveHscsdParams.ExtensionId()==RMobileCall::KETelMobileHscsdCallParamsV1);
|
|
479 |
|
|
480 |
TEST(retrieveHscsdParams.iIdRestrict==DMMTSY_CALL_CLI_RESTRICT_SETTING1);
|
|
481 |
TEST(retrieveHscsdParams.iCug.iExplicitInvoke==DMMTSY_CALL_CUG_INVOKE);
|
|
482 |
TEST(retrieveHscsdParams.iCug.iCugIndex==DMMTSY_CALL_CUG_INDEX);
|
|
483 |
TEST(retrieveHscsdParams.iCug.iSuppressOA==DMMTSY_CALL_CUG_OA);
|
|
484 |
TEST(retrieveHscsdParams.iCug.iSuppressPrefCug==DMMTSY_CALL_CUG_PREF);
|
|
485 |
TEST(retrieveHscsdParams.iAutoRedial==DMMTSY_CALL_AUTO_REDIAL_FLAG);
|
|
486 |
|
|
487 |
ValidateHscsdParams(retrieveHscsdParams);
|
|
488 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GetCallParams (HSCSD params) passed"), iTestCount++);
|
|
489 |
|
|
490 |
// Test Set Hscsd Params V8 within Dial
|
|
491 |
RMobileCall::TMobileHscsdCallParamsV8 hscsdParams8, retrieveHscsdParams8;
|
|
492 |
RMobileCall::TMobileHscsdCallParamsV8Pckg hscsdParamsPckg8(hscsdParams8);
|
|
493 |
RMobileCall::TMobileHscsdCallParamsV8Pckg retrieveHscsdParamsPckg8(retrieveHscsdParams8);
|
|
494 |
|
|
495 |
TEST(hscsdParams8.ExtensionId()== RMobileCall::KETelMobileHscsdCallParamsV8);
|
|
496 |
TEST(hscsdParams8.iBCRepeatIndicator == RMobileCall::EBCAlternateMode);
|
|
497 |
|
|
498 |
hscsdParams8.iIdRestrict = DMMTSY_CALL_CLI_RESTRICT_SETTING1;
|
|
499 |
hscsdParams8.iCug.iExplicitInvoke = DMMTSY_CALL_CUG_INVOKE;
|
|
500 |
hscsdParams8.iCug.iCugIndex = DMMTSY_CALL_CUG_INDEX;
|
|
501 |
hscsdParams8.iCug.iSuppressOA = DMMTSY_CALL_CUG_OA;
|
|
502 |
hscsdParams8.iCug.iSuppressPrefCug = DMMTSY_CALL_CUG_PREF;
|
|
503 |
hscsdParams8.iAutoRedial = DMMTSY_CALL_AUTO_REDIAL_FLAG;
|
|
504 |
|
|
505 |
hscsdParams8.iService = DMMTSY_DATA_CALL_SERVICE;
|
|
506 |
hscsdParams8.iSpeed = DMMTSY_DATA_CALL_SPEED;
|
|
507 |
hscsdParams8.iProtocol = DMMTSY_DATA_CALL_PROTOCOL;
|
|
508 |
hscsdParams8.iQoS = DMMTSY_DATA_CALL_QOS;
|
|
509 |
hscsdParams8.iRLPVersion = DMMTSY_DATA_CALL_RLP;
|
|
510 |
hscsdParams8.iV42bisReq = DMMTSY_DATA_CALL_V42BIS;
|
|
511 |
hscsdParams8.iUseEdge = DMMTSY_DATA_CALL_EGPRS_REQUIRED;
|
|
512 |
|
|
513 |
hscsdParams8.iInterval = DMMTSY_CALL_INTERVAL;
|
|
514 |
hscsdParams8.iIdRestrict = DMMTSY_CALL_CLI_RESTRICT_SETTING1;
|
|
515 |
hscsdParams8.iWantedAiur = DMMTSY_CALL_HCSD_AIUR;
|
|
516 |
hscsdParams8.iWantedRxTimeSlots = DMMTSY_CALL_HCSD_TS;
|
|
517 |
hscsdParams8.iMaxTimeSlots = DMMTSY_CALL_HCSD_MAXTS;
|
|
518 |
hscsdParams8.iCodings = DMMTSY_CALL_HCSD_CODING;
|
|
519 |
hscsdParams8.iAsymmetry = DMMTSY_CALL_HCSD_ASYMMETRY;
|
|
520 |
hscsdParams8.iUserInitUpgrade = DMMTSY_CALL_HCSD_USER_IMI;
|
|
521 |
hscsdParams8.iBearerMode = DMMTSY_CALL_NEW_BEARER;
|
|
522 |
hscsdParams8.iCallParamOrigin = DMMTSY_CALL_PARAM_ORIGIN;
|
|
523 |
hscsdParams8.iIconId.iIdentifier = DMMTSY_CALL_ICON_ID_IDENTIFIER;
|
|
524 |
hscsdParams8.iIconId.iQualifier = DMMTSY_CALL_ICON_ID_QUALIFIER;
|
|
525 |
hscsdParams8.iAlphaId = DMMTSY_CALL_ALPHA_ID;
|
|
526 |
|
|
527 |
hscsdParams8.iSubAddress = DMMTSY_CALL_SUBADDRESS;
|
|
528 |
hscsdParams8.iBearerCap1 = DMMTSY_CALL_BEARER_CAP1;
|
|
529 |
hscsdParams8.iBearerCap2 = DMMTSY_CALL_BEARER_CAP2;
|
|
530 |
hscsdParams8.iBCRepeatIndicator = DMMTSY_CALL_BC_REPEAT_INDICATOR;
|
|
531 |
|
|
532 |
// asynchronous
|
|
533 |
mmCall.Dial(reqStatus, hscsdParamsPckg8, iNumber);
|
|
534 |
User::WaitForRequest(reqStatus);
|
|
535 |
TEST(reqStatus.Int()==KErrNone);
|
|
536 |
INFO_PRINTF2(_L("Test %d - RMobileCall::Dial (HSCSDv8 Call Params) passed"), iTestCount++);
|
|
537 |
|
|
538 |
// Test Get Hscsd Params
|
|
539 |
TEST(mmCall.GetCallParams(retrieveHscsdParamsPckg8) == KErrNone);
|
|
540 |
TEST(retrieveHscsdParams8.ExtensionId()==RMobileCall::KETelMobileHscsdCallParamsV8);
|
|
541 |
|
|
542 |
TEST(retrieveHscsdParams8.iIdRestrict==DMMTSY_CALL_CLI_RESTRICT_SETTING1);
|
|
543 |
TEST(retrieveHscsdParams8.iCug.iExplicitInvoke==DMMTSY_CALL_CUG_INVOKE);
|
|
544 |
TEST(retrieveHscsdParams8.iCug.iCugIndex==DMMTSY_CALL_CUG_INDEX);
|
|
545 |
TEST(retrieveHscsdParams8.iCug.iSuppressOA==DMMTSY_CALL_CUG_OA);
|
|
546 |
TEST(retrieveHscsdParams8.iCug.iSuppressPrefCug==DMMTSY_CALL_CUG_PREF);
|
|
547 |
TEST(retrieveHscsdParams8.iAutoRedial==DMMTSY_CALL_AUTO_REDIAL_FLAG);
|
|
548 |
|
|
549 |
ValidateHscsdParams(retrieveHscsdParams8);
|
|
550 |
TEST(retrieveHscsdParams8.iSubAddress == DMMTSY_CALL_SUBADDRESS);
|
|
551 |
TEST(retrieveHscsdParams8.iBearerCap1 == DMMTSY_CALL_BEARER_CAP1);
|
|
552 |
TEST(retrieveHscsdParams8.iBearerCap2 == DMMTSY_CALL_BEARER_CAP2);
|
|
553 |
TEST(retrieveHscsdParams8.iBCRepeatIndicator == DMMTSY_CALL_BC_REPEAT_INDICATOR);
|
|
554 |
|
|
555 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GetCallParams (HSCSD params) passed"), iTestCount++);
|
|
556 |
|
|
557 |
// Test Get HSCSD Call Information with version 1
|
|
558 |
RMobileCall::TMobileCallHscsdInfoV1 hscsdInfo, asyncHscsdInfo;
|
|
559 |
RMobileCall::TMobileCallHscsdInfoV1Pckg hscsdInfoPckg(hscsdInfo);
|
|
560 |
RMobileCall::TMobileCallHscsdInfoV1Pckg asyncHscsdInfoPckg(asyncHscsdInfo);
|
|
561 |
|
|
562 |
TEST(mmCall.GetCurrentHscsdInfo(hscsdInfoPckg) == KErrNone);
|
|
563 |
ValidateHscsdInfo(hscsdInfo);
|
|
564 |
|
|
565 |
// Test Get HSCSD Call Information with version 7
|
|
566 |
RMobileCall::TMobileCallHscsdInfoV7 hscsdInfoV7;
|
|
567 |
RMobileCall::TMobileCallHscsdInfoV7Pckg hscsdInfoV7Pckg(hscsdInfoV7);
|
|
568 |
TEST(mmCall.GetCurrentHscsdInfo(hscsdInfoV7Pckg) == KErrNone);
|
|
569 |
|
|
570 |
ValidateHscsdInfo(hscsdInfoV7);
|
|
571 |
TEST(hscsdInfoV7.iCallParamOrigin == DMMTSY_CALL_PARAM_ORIGIN);
|
|
572 |
TEST(hscsdInfoV7.iIconId.iQualifier == DMMTSY_CALL_ICON_ID_QUALIFIER);
|
|
573 |
TEST(hscsdInfoV7.iIconId.iIdentifier == DMMTSY_CALL_ICON_ID_IDENTIFIER);
|
|
574 |
TEST(hscsdInfoV7.iAlphaId == DMMTSY_CALL_ALPHA_ID);
|
|
575 |
TEST(hscsdInfoV7.iParamsCallControlModified == DMMTSY_CALL_PARAMS_CALL_CONTROL_MODIFIED);
|
|
576 |
|
|
577 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GetCurrentHscsdInfo (sync) passed"), iTestCount++);
|
|
578 |
|
|
579 |
// Test Get HSCSD Call Information with version 8
|
|
580 |
RMobileCall::TMobileCallHscsdInfoV8 hscsdInfoV8;
|
|
581 |
RMobileCall::TMobileCallHscsdInfoV8Pckg hscsdInfoV8Pckg(hscsdInfoV8);
|
|
582 |
TEST(mmCall.GetCurrentHscsdInfo(hscsdInfoV8Pckg) == KErrNone);
|
|
583 |
|
|
584 |
ValidateHscsdInfo(hscsdInfoV8);
|
|
585 |
TEST(hscsdInfoV8.iCallParamOrigin == DMMTSY_CALL_PARAM_ORIGIN);
|
|
586 |
TEST(hscsdInfoV8.iIconId.iQualifier == DMMTSY_CALL_ICON_ID_QUALIFIER);
|
|
587 |
TEST(hscsdInfoV8.iIconId.iIdentifier == DMMTSY_CALL_ICON_ID_IDENTIFIER);
|
|
588 |
TEST(hscsdInfoV8.iAlphaId == DMMTSY_CALL_ALPHA_ID);
|
|
589 |
TEST(hscsdInfoV8.iParamsCallControlModified == DMMTSY_CALL_PARAMS_CALL_CONTROL_MODIFIED);
|
|
590 |
TEST(hscsdInfoV8.iSubAddress == DMMTSY_CALL_SUBADDRESS);
|
|
591 |
TEST(hscsdInfoV8.iBearerCap1 == DMMTSY_CALL_BEARER_CAP1);
|
|
592 |
TEST(hscsdInfoV8.iBearerCap2 == DMMTSY_CALL_BEARER_CAP2);
|
|
593 |
TEST(hscsdInfoV8.iBCRepeatIndicator == DMMTSY_CALL_BC_REPEAT_INDICATOR);
|
|
594 |
|
|
595 |
|
|
596 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GetCurrentHscsdInfo (sync) passed"), iTestCount++);
|
|
597 |
|
|
598 |
|
|
599 |
// Test Notify Hscsd Info Change
|
|
600 |
// asynchronous
|
|
601 |
mmCall.NotifyHscsdInfoChange(reqStatus,asyncHscsdInfoPckg);
|
|
602 |
User::WaitForRequest(reqStatus);
|
|
603 |
TEST(reqStatus.Int()==KErrNone);
|
|
604 |
ValidateHscsdInfo(asyncHscsdInfo);
|
|
605 |
|
|
606 |
// asynchronous & cancel
|
|
607 |
mmCall.NotifyHscsdInfoChange(reqStatus,asyncHscsdInfoPckg);
|
|
608 |
mmCall.CancelAsyncRequest(EMobileCallNotifyHscsdInfoChange);
|
|
609 |
User::WaitForRequest(reqStatus);
|
|
610 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
611 |
if (reqStatus.Int()==KErrCancel)
|
|
612 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyHscsdInfoChange (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
613 |
else
|
|
614 |
{
|
|
615 |
ValidateHscsdInfo(asyncHscsdInfo);
|
|
616 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyHscsdInfoChange (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
617 |
}
|
|
618 |
|
|
619 |
// Close Call
|
|
620 |
mmCall.Close();
|
|
621 |
mmLine.Close();
|
|
622 |
mmPhone.Close();
|
|
623 |
INFO_PRINTF1(_L(""));
|
|
624 |
|
|
625 |
return TestStepResult();
|
|
626 |
}
|
|
627 |
|
|
628 |
CTestCallb::CTestCallb()
|
|
629 |
/** Each test step initialises it's own name
|
|
630 |
*/
|
|
631 |
{
|
|
632 |
// store the name of this test case
|
|
633 |
// this is the name that is used by the script file
|
|
634 |
SetTestStepName(_L("TestCall-2nd-part"));
|
|
635 |
}
|
|
636 |
|
|
637 |
enum TVerdict CTestCallb::doTestStepL()
|
|
638 |
//
|
|
639 |
// Test Call Functions
|
|
640 |
//
|
|
641 |
{
|
|
642 |
iTestCount =1;
|
|
643 |
INFO_PRINTF1(_L(""));
|
|
644 |
INFO_PRINTF1(_L("Test Mobile Call Functionality"));
|
|
645 |
// LOGTEXT(_L8("Test Mobile Call Functionality"));
|
|
646 |
|
|
647 |
RMobilePhone mmPhone;
|
|
648 |
TInt ret=mmPhone.Open(iTelServer,DMMTSY_PHONE_NAME);
|
|
649 |
TEST(ret==KErrNone);
|
|
650 |
|
|
651 |
RMobileLine mmLine;
|
|
652 |
ret=mmLine.Open(mmPhone,DMMTSY_LINE_VOICE_NAME);
|
|
653 |
TEST(ret==KErrNone);
|
|
654 |
|
|
655 |
RMobileCall mmCall;
|
|
656 |
TName callName;
|
|
657 |
ret=mmCall.OpenNewCall(mmLine,callName);
|
|
658 |
TEST(ret==KErrNone);
|
|
659 |
|
|
660 |
TRequestStatus reqStatus;
|
|
661 |
|
|
662 |
// Test DialNoFdnCheck (Overloaded)
|
|
663 |
|
|
664 |
// Provide stndard multimode call parameter package for DialNoFdnCheck
|
|
665 |
|
|
666 |
RMobileCall::TMobileCallParamsV1 mmCallParams;
|
|
667 |
|
|
668 |
mmCallParams.iInterval = DMMTSY_CALL_INTERVAL;
|
|
669 |
mmCallParams.iIdRestrict = DMMTSY_CALL_CLI_RESTRICT_SETTING1;
|
|
670 |
mmCallParams.iCug.iExplicitInvoke = DMMTSY_CALL_CUG_INVOKE;
|
|
671 |
mmCallParams.iCug.iCugIndex = DMMTSY_CALL_CUG_INDEX;
|
|
672 |
mmCallParams.iCug.iSuppressOA = DMMTSY_CALL_CUG_OA;
|
|
673 |
mmCallParams.iCug.iSuppressPrefCug = DMMTSY_CALL_CUG_PREF;
|
|
674 |
mmCallParams.iAutoRedial = DMMTSY_CALL_AUTO_REDIAL_FLAG;
|
|
675 |
|
|
676 |
// test.Next(_L("OK: RMobileCall's HSCSD Call Info"));
|
|
677 |
|
|
678 |
// Test Voice Fallback for Multimedia Calls
|
|
679 |
|
|
680 |
TName falbackCallName;
|
|
681 |
|
|
682 |
// asynchronous
|
|
683 |
|
|
684 |
mmCall.NotifyVoiceFallback(reqStatus, falbackCallName);
|
|
685 |
User::WaitForRequest(reqStatus);
|
|
686 |
TEST(reqStatus.Int()==KErrNone);
|
|
687 |
TEST(falbackCallName.Compare(DMMTSY_VOICE_FALLBACK_CALL_NAME) == 0);
|
|
688 |
|
|
689 |
// asynchronous & cancel
|
|
690 |
|
|
691 |
mmCall.NotifyVoiceFallback(reqStatus, falbackCallName);
|
|
692 |
mmCall.CancelAsyncRequest(EMobileCallNotifyVoiceFallback);
|
|
693 |
User::WaitForRequest(reqStatus);
|
|
694 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
695 |
if (reqStatus.Int()==KErrCancel)
|
|
696 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyVoiceFallback (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
697 |
else
|
|
698 |
{
|
|
699 |
TEST(falbackCallName.Compare(DMMTSY_VOICE_FALLBACK_CALL_NAME) == 0);
|
|
700 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyVoiceFallback (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
701 |
}
|
|
702 |
|
|
703 |
// test.Next(_L("OK: RMobileCall's Voice Fallback"));
|
|
704 |
|
|
705 |
|
|
706 |
// Test SwitchAlternating Data Call
|
|
707 |
|
|
708 |
// asynchronous
|
|
709 |
|
|
710 |
mmCall.SwitchAlternatingCall(reqStatus);
|
|
711 |
User::WaitForRequest(reqStatus);
|
|
712 |
TEST(reqStatus.Int()==KErrNone);
|
|
713 |
|
|
714 |
// asynchronous & cancel
|
|
715 |
|
|
716 |
mmCall.SwitchAlternatingCall(reqStatus);
|
|
717 |
mmCall.CancelAsyncRequest(EMobileCallSwitchAlternatingCall);
|
|
718 |
User::WaitForRequest(reqStatus);
|
|
719 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
720 |
if (reqStatus.Int()==KErrCancel)
|
|
721 |
INFO_PRINTF2(_L("Test %d - RMobileCall::SwitchAlternatingCall (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
722 |
else
|
|
723 |
INFO_PRINTF2(_L("Test %d - RMobileCall::SwitchAlternatingCall (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
724 |
|
|
725 |
|
|
726 |
// Test Notify Alternating Call Switch
|
|
727 |
|
|
728 |
// asynchronous
|
|
729 |
|
|
730 |
mmCall.NotifyAlternatingCallSwitch(reqStatus);
|
|
731 |
User::WaitForRequest(reqStatus);
|
|
732 |
TEST(reqStatus.Int()==KErrNone);
|
|
733 |
|
|
734 |
// asynchronous & cancel
|
|
735 |
|
|
736 |
mmCall.NotifyAlternatingCallSwitch(reqStatus);
|
|
737 |
mmCall.CancelAsyncRequest(EMobileCallNotifyAlternatingCallSwitch);
|
|
738 |
User::WaitForRequest(reqStatus);
|
|
739 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
740 |
if (reqStatus.Int()==KErrCancel)
|
|
741 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyAlternatingCallSwitch (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
742 |
else
|
|
743 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyAlternatingCallSwitch (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
744 |
|
|
745 |
// test.Next(_L("OK: RMobileCall's Alternating Calls"));
|
|
746 |
|
|
747 |
// Call Control caps
|
|
748 |
|
|
749 |
RMobileCall::TMobileCallCapsV1 callCaps;
|
|
750 |
RMobileCall::TMobileCallCapsV1Pckg callCapsPckg(callCaps);
|
|
751 |
|
|
752 |
// synchronous
|
|
753 |
|
|
754 |
TEST(mmCall.GetMobileCallCaps(callCapsPckg)==KErrNone);
|
|
755 |
TEST(callCaps.iCallControlCaps==DMMTSY_CALL_CONTROL_CAPS1);
|
|
756 |
TEST(callCaps.iCallEventCaps==DMMTSY_CALL_EVENT_CAPS1);
|
|
757 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GetMobileCallCaps (sync) passed"), iTestCount++);
|
|
758 |
|
|
759 |
// asynchronous
|
|
760 |
|
|
761 |
mmCall.NotifyMobileCallCapsChange(reqStatus, callCapsPckg);
|
|
762 |
User::WaitForRequest(reqStatus);
|
|
763 |
TEST(reqStatus.Int()==KErrNone);
|
|
764 |
TEST(callCaps.iCallControlCaps==DMMTSY_CALL_CONTROL_CAPS2);
|
|
765 |
TEST(callCaps.iCallEventCaps==DMMTSY_CALL_EVENT_CAPS2);
|
|
766 |
|
|
767 |
// asynchronous & cancel
|
|
768 |
|
|
769 |
mmCall.NotifyMobileCallCapsChange(reqStatus, callCapsPckg);
|
|
770 |
mmCall.CancelAsyncRequest(EMobileCallNotifyMobileCallCapsChange);
|
|
771 |
User::WaitForRequest(reqStatus);
|
|
772 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
773 |
if (reqStatus.Int()==KErrCancel)
|
|
774 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyMobileCallCapsChange (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
775 |
else
|
|
776 |
{
|
|
777 |
TEST(callCaps.iCallControlCaps==DMMTSY_CALL_CONTROL_CAPS2);
|
|
778 |
TEST(callCaps.iCallEventCaps==DMMTSY_CALL_EVENT_CAPS2);
|
|
779 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyMobileCallCapsChange (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
780 |
}
|
|
781 |
|
|
782 |
// Call Status
|
|
783 |
|
|
784 |
RMobileCall::TMobileCallStatus callStatus;
|
|
785 |
|
|
786 |
// synchronous
|
|
787 |
|
|
788 |
TEST(KErrNone==mmCall.GetMobileCallStatus(callStatus));
|
|
789 |
TEST(callStatus==DMMTSY_CALL_STATUS1);
|
|
790 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GetMobileCallStatus (sync) passed"), iTestCount++);
|
|
791 |
|
|
792 |
// asynchronous
|
|
793 |
|
|
794 |
mmCall.NotifyMobileCallStatusChange(reqStatus,callStatus);
|
|
795 |
User::WaitForRequest(reqStatus);
|
|
796 |
TEST(reqStatus.Int()==KErrNone);
|
|
797 |
TEST(callStatus==DMMTSY_CALL_STATUS2);
|
|
798 |
|
|
799 |
// asynchronous & cancel
|
|
800 |
|
|
801 |
mmCall.NotifyMobileCallStatusChange(reqStatus,callStatus);
|
|
802 |
mmCall.CancelAsyncRequest(EMobileCallNotifyMobileCallStatusChange);
|
|
803 |
User::WaitForRequest(reqStatus);
|
|
804 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
805 |
if (reqStatus.Int()==KErrCancel)
|
|
806 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyMobileCallStatusChange (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
807 |
else
|
|
808 |
{
|
|
809 |
TEST(callStatus==DMMTSY_CALL_STATUS2);
|
|
810 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyMobileCallStatusChange (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
811 |
}
|
|
812 |
|
|
813 |
// Call Hold
|
|
814 |
|
|
815 |
// asynchronous
|
|
816 |
|
|
817 |
mmCall.Hold(reqStatus);
|
|
818 |
User::WaitForRequest(reqStatus);
|
|
819 |
TEST(reqStatus.Int()==KErrNone);
|
|
820 |
|
|
821 |
// asynchronous & cancel
|
|
822 |
|
|
823 |
mmCall.Hold(reqStatus);
|
|
824 |
mmCall.CancelAsyncRequest(EMobileCallHold);
|
|
825 |
User::WaitForRequest(reqStatus);
|
|
826 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
827 |
if (reqStatus.Int()==KErrCancel)
|
|
828 |
INFO_PRINTF2(_L("Test %d - RMobileCall::Hold (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
829 |
else
|
|
830 |
INFO_PRINTF2(_L("Test %d - RMobileCall::Hold (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
831 |
|
|
832 |
// Call Resume
|
|
833 |
|
|
834 |
// asynchronous
|
|
835 |
|
|
836 |
mmCall.Resume(reqStatus);
|
|
837 |
User::WaitForRequest(reqStatus);
|
|
838 |
TEST(reqStatus.Int()==KErrNone);
|
|
839 |
|
|
840 |
// asynchronous & cancel
|
|
841 |
|
|
842 |
mmCall.Resume(reqStatus);
|
|
843 |
mmCall.CancelAsyncRequest(EMobileCallResume);
|
|
844 |
User::WaitForRequest(reqStatus);
|
|
845 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
846 |
if (reqStatus.Int()==KErrCancel)
|
|
847 |
INFO_PRINTF2(_L("Test %d - RMobileCall::Resume (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
848 |
else
|
|
849 |
INFO_PRINTF2(_L("Test %d - RMobileCall::Resume (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
850 |
|
|
851 |
// Call Swap
|
|
852 |
|
|
853 |
// asynchronous
|
|
854 |
|
|
855 |
mmCall.Swap(reqStatus);
|
|
856 |
User::WaitForRequest(reqStatus);
|
|
857 |
TEST(reqStatus.Int()==KErrNone);
|
|
858 |
|
|
859 |
// asynchronous & cancel
|
|
860 |
|
|
861 |
mmCall.Swap(reqStatus);
|
|
862 |
mmCall.CancelAsyncRequest(EMobileCallSwap);
|
|
863 |
User::WaitForRequest(reqStatus);
|
|
864 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
865 |
if (reqStatus.Int()==KErrCancel)
|
|
866 |
INFO_PRINTF2(_L("Test %d - RMobileCall::Swap (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
867 |
else
|
|
868 |
INFO_PRINTF2(_L("Test %d - RMobileCall::Swap (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
869 |
|
|
870 |
|
|
871 |
// Call Deflect
|
|
872 |
|
|
873 |
RMobilePhone::TMobileAddress deflectAddress;
|
|
874 |
RMobileCall::TMobileCallDeflect deflectType=DMMTSY_CALL_DEFLECT_TYPE;
|
|
875 |
|
|
876 |
deflectAddress.iTypeOfNumber = DMMTSY_PHONE_TON;
|
|
877 |
deflectAddress.iNumberPlan = DMMTSY_PHONE_NPI;
|
|
878 |
deflectAddress.iTelNumber = DMMTSY_PHONE_TEL_NUMBER;
|
|
879 |
|
|
880 |
// asynchronous
|
|
881 |
|
|
882 |
mmCall.Deflect(reqStatus,deflectType,deflectAddress);
|
|
883 |
User::WaitForRequest(reqStatus);
|
|
884 |
TEST(reqStatus.Int()==KErrNone);
|
|
885 |
|
|
886 |
// asynchronous & cancel
|
|
887 |
|
|
888 |
mmCall.Deflect(reqStatus,deflectType,deflectAddress);
|
|
889 |
mmCall.CancelAsyncRequest(EMobileCallDeflect);
|
|
890 |
User::WaitForRequest(reqStatus);
|
|
891 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
892 |
if (reqStatus.Int()==KErrCancel)
|
|
893 |
INFO_PRINTF2(_L("Test %d - RMobileCall::Deflect (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
894 |
else
|
|
895 |
INFO_PRINTF2(_L("Test %d - RMobileCall::Deflect (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
896 |
|
|
897 |
|
|
898 |
// Call Transfer
|
|
899 |
|
|
900 |
// asynchronous
|
|
901 |
|
|
902 |
mmCall.Transfer(reqStatus);
|
|
903 |
User::WaitForRequest(reqStatus);
|
|
904 |
TEST(reqStatus.Int()==KErrNone);
|
|
905 |
|
|
906 |
// asynchronous & cancel
|
|
907 |
|
|
908 |
mmCall.Transfer(reqStatus);
|
|
909 |
mmCall.CancelAsyncRequest(EMobileCallTransfer);
|
|
910 |
User::WaitForRequest(reqStatus);
|
|
911 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
912 |
if (reqStatus.Int()==KErrCancel)
|
|
913 |
INFO_PRINTF2(_L("Test %d - RMobileCall::Transfer (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
914 |
else
|
|
915 |
INFO_PRINTF2(_L("Test %d - RMobileCall::Transfer (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
916 |
|
|
917 |
// Call Go one to one
|
|
918 |
|
|
919 |
// asynchronous
|
|
920 |
|
|
921 |
mmCall.GoOneToOne(reqStatus);
|
|
922 |
User::WaitForRequest(reqStatus);
|
|
923 |
TEST(reqStatus.Int()==KErrNone);
|
|
924 |
|
|
925 |
// asynchronous & cancel
|
|
926 |
|
|
927 |
mmCall.GoOneToOne(reqStatus);
|
|
928 |
mmCall.CancelAsyncRequest(EMobileCallGoOneToOne);
|
|
929 |
User::WaitForRequest(reqStatus);
|
|
930 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
931 |
if (reqStatus.Int()==KErrCancel)
|
|
932 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GoOneToOne (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
933 |
else
|
|
934 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GoOneToOne (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
935 |
|
|
936 |
// asynchronous
|
|
937 |
|
|
938 |
RMobileCall::TMobileCallEvent event;
|
|
939 |
mmCall.NotifyCallEvent(reqStatus, event);
|
|
940 |
User::WaitForRequest(reqStatus);
|
|
941 |
TEST(reqStatus.Int()==KErrNone);
|
|
942 |
TEST(event==DMMTSY_CALL_EVENT1);
|
|
943 |
|
|
944 |
// asynchronous & cancel
|
|
945 |
|
|
946 |
mmCall.NotifyCallEvent(reqStatus, event);
|
|
947 |
mmCall.CancelAsyncRequest(EMobileCallNotifyCallEvent);
|
|
948 |
User::WaitForRequest(reqStatus);
|
|
949 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
950 |
if (reqStatus.Int()==KErrCancel)
|
|
951 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyCallEvent (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
952 |
else
|
|
953 |
{
|
|
954 |
TEST(event==DMMTSY_CALL_EVENT1);
|
|
955 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyCallEvent (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
956 |
}
|
|
957 |
|
|
958 |
// Get the big block of call information
|
|
959 |
|
|
960 |
RMobileCall::TMobileCallInfoV1 syncCallInfo;
|
|
961 |
RMobileCall::TMobileCallInfoV1Pckg syncCallInfoPckg(syncCallInfo);
|
|
962 |
|
|
963 |
// synchronous
|
|
964 |
|
|
965 |
TEST(KErrNone==mmCall.GetMobileCallInfo(syncCallInfoPckg));
|
|
966 |
syncCallInfo = syncCallInfoPckg();
|
|
967 |
|
|
968 |
ValidateMobileCallInfo(syncCallInfo);
|
|
969 |
|
|
970 |
//repeat for V3
|
|
971 |
RMobileCall::TMobileCallInfoV3 syncCallInfoV3;
|
|
972 |
RMobileCall::TMobileCallInfoV3Pckg syncCallInfoPckgV3(syncCallInfoV3);
|
|
973 |
|
|
974 |
TEST(KErrNone==mmCall.GetMobileCallInfo(syncCallInfoPckgV3));
|
|
975 |
ValidateMobileCallInfo(syncCallInfoV3);
|
|
976 |
|
|
977 |
TEST(syncCallInfoV3.iSecurity == DMMTSY_CALL_SECURITY);
|
|
978 |
|
|
979 |
//repeat for V7
|
|
980 |
RMobileCall::TMobileCallInfoV7 syncCallInfoV7;
|
|
981 |
RMobileCall::TMobileCallInfoV7Pckg syncCallInfoPckgV7(syncCallInfoV7);
|
|
982 |
TEST(syncCallInfoV7.ExtensionId() == KEtelExtMultimodeV7);
|
|
983 |
|
|
984 |
TEST(KErrNone==mmCall.GetMobileCallInfo(syncCallInfoPckgV7));
|
|
985 |
ValidateMobileCallInfo(syncCallInfoV7);
|
|
986 |
|
|
987 |
TEST(syncCallInfoV7.iSecurity == DMMTSY_CALL_SECURITY);
|
|
988 |
TEST(syncCallInfoV7.iCallParamOrigin == DMMTSY_CALL_ORIGIN);
|
|
989 |
TEST(syncCallInfoV7.iIconId.iQualifier == DMMTSY_CALL_ICON_ID_QUALIFIER);
|
|
990 |
TEST(syncCallInfoV7.iIconId.iIdentifier == DMMTSY_CALL_ICON_ID_IDENTIFIER);
|
|
991 |
TEST(syncCallInfoV7.iAlphaId == DMMTSY_CALL_ALPHA_ID);
|
|
992 |
|
|
993 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GetMobileCallInfo (sync) passed"), iTestCount++);
|
|
994 |
|
|
995 |
//repeat for V8
|
|
996 |
RMobileCall::TMobileCallInfoV8 syncCallInfoV8;
|
|
997 |
RMobileCall::TMobileCallInfoV8Pckg syncCallInfoPckgV8(syncCallInfoV8);
|
|
998 |
TEST(syncCallInfoV8.ExtensionId() == KEtelExtMultimodeV8);
|
|
999 |
TEST(syncCallInfoV8.iBCRepeatIndicator == RMobileCall::EBCAlternateMode);
|
|
1000 |
|
|
1001 |
TEST(KErrNone==mmCall.GetMobileCallInfo(syncCallInfoPckgV8));
|
|
1002 |
ValidateMobileCallInfo(syncCallInfoV8);
|
|
1003 |
|
|
1004 |
TEST(syncCallInfoV8.iSubAddress == DMMTSY_CALL_SUBADDRESS);
|
|
1005 |
TEST(syncCallInfoV8.iBearerCap1 == DMMTSY_CALL_BEARER_CAP1);
|
|
1006 |
TEST(syncCallInfoV8.iBearerCap2 == DMMTSY_CALL_BEARER_CAP2);
|
|
1007 |
TEST(syncCallInfoV8.iBCRepeatIndicator == DMMTSY_CALL_BC_REPEAT_INDICATOR);
|
|
1008 |
|
|
1009 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GetMobileCallInfo (sync) passed"), iTestCount++);
|
|
1010 |
|
|
1011 |
|
|
1012 |
// Close Call
|
|
1013 |
mmCall.Close();
|
|
1014 |
mmLine.Close();
|
|
1015 |
mmPhone.Close();
|
|
1016 |
INFO_PRINTF1(_L(""));
|
|
1017 |
|
|
1018 |
return TestStepResult();
|
|
1019 |
}
|
|
1020 |
|
|
1021 |
CTestCallc::CTestCallc()
|
|
1022 |
/** Each test step initialises it's own name
|
|
1023 |
*/
|
|
1024 |
{
|
|
1025 |
// store the name of this test case
|
|
1026 |
// this is the name that is used by the script file
|
|
1027 |
SetTestStepName(_L("TestCall-3rd-part"));
|
|
1028 |
}
|
|
1029 |
|
|
1030 |
enum TVerdict CTestCallc::doTestStepL()
|
|
1031 |
//
|
|
1032 |
// Test Call Functions
|
|
1033 |
//
|
|
1034 |
{
|
|
1035 |
iTestCount =1;
|
|
1036 |
INFO_PRINTF1(_L(""));
|
|
1037 |
INFO_PRINTF1(_L("Test Mobile Call Functionality"));
|
|
1038 |
// LOGTEXT(_L8("Test Mobile Call Functionality"));
|
|
1039 |
|
|
1040 |
RMobilePhone mmPhone;
|
|
1041 |
TInt ret=mmPhone.Open(iTelServer,DMMTSY_PHONE_NAME);
|
|
1042 |
TEST(ret==KErrNone);
|
|
1043 |
|
|
1044 |
RMobileLine mmLine;
|
|
1045 |
ret=mmLine.Open(mmPhone,DMMTSY_LINE_VOICE_NAME);
|
|
1046 |
TEST(ret==KErrNone);
|
|
1047 |
|
|
1048 |
RMobileCall mmCall;
|
|
1049 |
TName callName;
|
|
1050 |
ret=mmCall.OpenNewCall(mmLine,callName);
|
|
1051 |
TEST(ret==KErrNone);
|
|
1052 |
|
|
1053 |
TRequestStatus reqStatus;
|
|
1054 |
|
|
1055 |
// Test DialNoFdnCheck (Overloaded)
|
|
1056 |
|
|
1057 |
// Provide stndard multimode call parameter package for DialNoFdnCheck
|
|
1058 |
|
|
1059 |
RMobileCall::TMobileCallParamsV1 mmCallParams;
|
|
1060 |
RMobileCall::TMobileCallParamsV1Pckg mmCallParamsPckg(mmCallParams);
|
|
1061 |
|
|
1062 |
mmCallParams.iInterval = DMMTSY_CALL_INTERVAL;
|
|
1063 |
mmCallParams.iIdRestrict = DMMTSY_CALL_CLI_RESTRICT_SETTING1;
|
|
1064 |
mmCallParams.iCug.iExplicitInvoke = DMMTSY_CALL_CUG_INVOKE;
|
|
1065 |
mmCallParams.iCug.iCugIndex = DMMTSY_CALL_CUG_INDEX;
|
|
1066 |
mmCallParams.iCug.iSuppressOA = DMMTSY_CALL_CUG_OA;
|
|
1067 |
mmCallParams.iCug.iSuppressPrefCug = DMMTSY_CALL_CUG_PREF;
|
|
1068 |
mmCallParams.iAutoRedial = DMMTSY_CALL_AUTO_REDIAL_FLAG;
|
|
1069 |
|
|
1070 |
// Notify Call Event
|
|
1071 |
|
|
1072 |
|
|
1073 |
//test.next(_L("OK: RMobileCall's MobileCallControl"));
|
|
1074 |
|
|
1075 |
// Notify Remote Party Info change
|
|
1076 |
|
|
1077 |
RMobileCall::TMobileCallRemotePartyInfoV1 remoteParty;
|
|
1078 |
RMobileCall::TMobileCallRemotePartyInfoV1Pckg remotePartyPckg(remoteParty);
|
|
1079 |
|
|
1080 |
// asynchronous
|
|
1081 |
|
|
1082 |
mmCall.NotifyRemotePartyInfoChange(reqStatus, remotePartyPckg);
|
|
1083 |
User::WaitForRequest(reqStatus);
|
|
1084 |
TEST(reqStatus.Int()==KErrNone);
|
|
1085 |
|
|
1086 |
remoteParty=remotePartyPckg();
|
|
1087 |
ValidateRemotePartyInfoChange(remoteParty);
|
|
1088 |
|
|
1089 |
// asynchronous & cancel
|
|
1090 |
|
|
1091 |
mmCall.NotifyRemotePartyInfoChange(reqStatus, remotePartyPckg);
|
|
1092 |
mmCall.CancelAsyncRequest(EMobileCallNotifyRemotePartyInfoChange);
|
|
1093 |
User::WaitForRequest(reqStatus);
|
|
1094 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
1095 |
if (reqStatus.Int()==KErrCancel)
|
|
1096 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyRemotePartyInfoChange (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
1097 |
else
|
|
1098 |
{
|
|
1099 |
remoteParty=remotePartyPckg();
|
|
1100 |
ValidateRemotePartyInfoChange(remoteParty);
|
|
1101 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyRemotePartyInfoChange (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
1102 |
}
|
|
1103 |
|
|
1104 |
//test.next(_L("OK: RMobileCall's MobileCallInformation"));
|
|
1105 |
|
|
1106 |
// Test Privacy functional unit
|
|
1107 |
|
|
1108 |
RMobilePhone::TMobilePhonePrivacy asyncPrivacy;
|
|
1109 |
|
|
1110 |
// Test Set Privacy Privacy
|
|
1111 |
|
|
1112 |
TEST(mmCall.SetPrivacy(DMMTSY_CALL_SET_PRIVACY) == KErrNone);
|
|
1113 |
INFO_PRINTF2(_L("Test %d - RMobileCall::SetPrivacy (sync) passed"), iTestCount++);
|
|
1114 |
|
|
1115 |
// Test Notify Privacy Confirmation
|
|
1116 |
|
|
1117 |
// asynchronous
|
|
1118 |
|
|
1119 |
mmCall.NotifyPrivacyConfirmation(reqStatus, asyncPrivacy);
|
|
1120 |
User::WaitForRequest(reqStatus);
|
|
1121 |
TEST(reqStatus.Int() == KErrNone);
|
|
1122 |
TEST(asyncPrivacy == DMMTSY_CALL_SET_PRIVACY);
|
|
1123 |
|
|
1124 |
// asynchronous & cancel
|
|
1125 |
|
|
1126 |
mmCall.NotifyPrivacyConfirmation(reqStatus, asyncPrivacy);
|
|
1127 |
mmCall.CancelAsyncRequest(EMobileCallNotifyPrivacyConfirmation);
|
|
1128 |
User::WaitForRequest(reqStatus);
|
|
1129 |
TEST(reqStatus.Int() == KErrNone || reqStatus.Int() == KErrCancel);
|
|
1130 |
if (reqStatus.Int() == KErrNone)
|
|
1131 |
{
|
|
1132 |
TEST(asyncPrivacy == DMMTSY_CALL_SET_PRIVACY);
|
|
1133 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyPrivacyConfirmation (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
1134 |
}
|
|
1135 |
else
|
|
1136 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyPrivacyConfirmation (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
1137 |
|
|
1138 |
//test.next(_L("OK: RMobileCall's Privacy Settings OK"));
|
|
1139 |
|
|
1140 |
|
|
1141 |
// Test Set Traffic Channel Setting
|
|
1142 |
|
|
1143 |
TEST(mmCall.SetTrafficChannel(DMMTSY_CALL_TCH_REQUEST) == KErrNone);
|
|
1144 |
INFO_PRINTF2(_L("Test %d - RMobileCall::SetTrafficChannelSetting (sync) passed"), iTestCount++);
|
|
1145 |
|
|
1146 |
// Test Notify Traffic Channel Confirmation
|
|
1147 |
|
|
1148 |
// asynchronous
|
|
1149 |
|
|
1150 |
RMobileCall::TMobileCallTch asyncTCHType;
|
|
1151 |
|
|
1152 |
mmCall.NotifyTrafficChannelConfirmation(reqStatus, asyncTCHType);
|
|
1153 |
User::WaitForRequest(reqStatus);
|
|
1154 |
TEST(reqStatus.Int() == KErrNone);
|
|
1155 |
TEST(asyncTCHType == DMMTSY_CALL_TCH_SETTING);
|
|
1156 |
|
|
1157 |
// asynchronous & cancel
|
|
1158 |
|
|
1159 |
mmCall.NotifyTrafficChannelConfirmation(reqStatus, asyncTCHType);
|
|
1160 |
mmCall.CancelAsyncRequest(EMobileCallNotifyTrafficChannelConfirmation);
|
|
1161 |
User::WaitForRequest(reqStatus);
|
|
1162 |
TEST(reqStatus.Int() == KErrNone || reqStatus.Int() == KErrCancel);
|
|
1163 |
if (reqStatus.Int() == KErrNone)
|
|
1164 |
{
|
|
1165 |
TEST(asyncTCHType == DMMTSY_CALL_TCH_SETTING);
|
|
1166 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyTrafficChannelConfirmation (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
1167 |
}
|
|
1168 |
else
|
|
1169 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyTrafficChannelConfirmation (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
1170 |
|
|
1171 |
//test.next(_L("OK: RMobileCall's Traffic Channel OK"));
|
|
1172 |
|
|
1173 |
// asynchronous
|
|
1174 |
// If this test fails, ensure that the lines:
|
|
1175 |
// etel_KPriorityClientSid 0x10281806
|
|
1176 |
// etel_KLocationServicesNetworkGatewaySid 0x10281806
|
|
1177 |
// are present in \epoc32\data\epoc.ini
|
|
1178 |
|
|
1179 |
TBuf<RMobileENStore::KEmergencyNumberSize> aNumber(DMMTSY_EN_STORE_AMBULANCE_NUM);
|
|
1180 |
mmCall.DialEmergencyCall(reqStatus, aNumber);
|
|
1181 |
User::WaitForRequest(reqStatus);
|
|
1182 |
TEST(reqStatus.Int()==KErrNone);
|
|
1183 |
|
|
1184 |
// asynchronous & cancel
|
|
1185 |
|
|
1186 |
mmCall.DialEmergencyCall(reqStatus, aNumber);
|
|
1187 |
mmCall.CancelAsyncRequest(EMobileCallDialEmergencyCall);
|
|
1188 |
User::WaitForRequest(reqStatus);
|
|
1189 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
1190 |
if (reqStatus.Int()==KErrCancel)
|
|
1191 |
INFO_PRINTF2(_L("Test %d - RMobileCall::DialEmergencyCall (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
1192 |
else
|
|
1193 |
INFO_PRINTF2(_L("Test %d - RMobileCall::DialEmergencyCall (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
1194 |
|
|
1195 |
//test.next(_L("OK: RMobileCall's MobileCallEmergency"));
|
|
1196 |
|
|
1197 |
// Test ActivateCCBS
|
|
1198 |
|
|
1199 |
// asynchronous
|
|
1200 |
|
|
1201 |
TInt index;
|
|
1202 |
mmCall.ActivateCCBS(reqStatus, index);
|
|
1203 |
|
|
1204 |
User::WaitForRequest(reqStatus);
|
|
1205 |
TEST(reqStatus.Int()==KErrNone);
|
|
1206 |
|
|
1207 |
// asynchronous & cancel
|
|
1208 |
|
|
1209 |
mmCall.ActivateCCBS(reqStatus, index=0);
|
|
1210 |
mmCall.CancelAsyncRequest(EMobileCallActivateCCBS);
|
|
1211 |
User::WaitForRequest(reqStatus);
|
|
1212 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
1213 |
if (reqStatus.Int()==KErrCancel)
|
|
1214 |
INFO_PRINTF2(_L("Test %d - RMobileCall::ActivateCCBS (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
1215 |
else
|
|
1216 |
INFO_PRINTF2(_L("Test %d - RMobileCall::ActivateCCBS (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
1217 |
|
|
1218 |
|
|
1219 |
// Test RejectCCBS
|
|
1220 |
|
|
1221 |
TEST(mmCall.RejectCCBS() == KErrNone);
|
|
1222 |
INFO_PRINTF2(_L("Test %d - RMobileCall::RejectCCBS (sync) passed"), iTestCount++);
|
|
1223 |
|
|
1224 |
|
|
1225 |
|
|
1226 |
// Test Get UUS Caps
|
|
1227 |
|
|
1228 |
TUint32 uusCaps;
|
|
1229 |
|
|
1230 |
mmCall.GetUUSCaps(uusCaps);
|
|
1231 |
TEST(mmCall.GetUUSCaps(uusCaps) == KErrNone);
|
|
1232 |
TEST(uusCaps == DMMTSY_CALL_UUS_CAPS);
|
|
1233 |
|
|
1234 |
INFO_PRINTF2(_L("Test %d - RMobileCall::GetUUSCaps (sync) passed"), iTestCount++);
|
|
1235 |
|
|
1236 |
// Test Notify UUS Caps Change
|
|
1237 |
|
|
1238 |
// asynchronous
|
|
1239 |
|
|
1240 |
mmCall.NotifyUUSCapsChange(reqStatus, uusCaps);
|
|
1241 |
User::WaitForRequest(reqStatus);
|
|
1242 |
TEST(reqStatus.Int()==KErrNone);
|
|
1243 |
|
|
1244 |
// asynchronous & cancel
|
|
1245 |
|
|
1246 |
mmCall.NotifyUUSCapsChange(reqStatus, uusCaps);
|
|
1247 |
mmCall.CancelAsyncRequest(EMobileCallNotifyUUSCapsChange);
|
|
1248 |
User::WaitForRequest(reqStatus);
|
|
1249 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
1250 |
if (reqStatus.Int()==KErrCancel)
|
|
1251 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyUUSCapsChange (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
1252 |
else
|
|
1253 |
{
|
|
1254 |
TEST(uusCaps == DMMTSY_CALL_UUS_CAPS);
|
|
1255 |
INFO_PRINTF2(_L("Test %d - RMobileCall::NotifyUUSCapsChange (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
1256 |
}
|
|
1257 |
|
|
1258 |
// Test Dial With UUI
|
|
1259 |
// by passing UUI info into the Dial request
|
|
1260 |
|
|
1261 |
// Using multimode call parameters - mmCallParams2 & number
|
|
1262 |
|
|
1263 |
RMobileCall::TMobileCallUUSRequestV1 uusRequest;
|
|
1264 |
|
|
1265 |
uusRequest.iServiceReq = DMMTSY_CALL_UUI_SERVICE_REQ;
|
|
1266 |
uusRequest.iUUI= DMMTSY_CALL_UUI_INFO_DIAL;
|
|
1267 |
|
|
1268 |
RMobileCall::TMobileCallUUSRequestV1Pckg uusRequestPckg(uusRequest);
|
|
1269 |
|
|
1270 |
// Test Activate UUS
|
|
1271 |
|
|
1272 |
// asynchronous
|
|
1273 |
|
|
1274 |
mmCall.ActivateUUS(reqStatus,uusRequestPckg);
|
|
1275 |
User::WaitForRequest(reqStatus);
|
|
1276 |
TEST(reqStatus.Int()==KErrNone);
|
|
1277 |
|
|
1278 |
// asynchronous & cancel
|
|
1279 |
|
|
1280 |
mmCall.ActivateUUS(reqStatus,uusRequestPckg);
|
|
1281 |
mmCall.CancelAsyncRequest(EMobileCallActivateUUS);
|
|
1282 |
User::WaitForRequest(reqStatus);
|
|
1283 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
1284 |
if (reqStatus.Int()==KErrCancel)
|
|
1285 |
INFO_PRINTF2(_L("Test %d - RMobileCall::ActivateUUS (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
1286 |
else
|
|
1287 |
INFO_PRINTF2(_L("Test %d - RMobileCall::ActivateUUS (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
1288 |
|
|
1289 |
RMobileCall::TMobileCallUUI uuiAnswerInfo(DMMTSY_CALL_UUI_INFO_ANSWER);
|
|
1290 |
|
|
1291 |
// Test AnswerIncomingCallWithUUI
|
|
1292 |
|
|
1293 |
mmCallParams.iInterval = DMMTSY_CALL_INTERVAL;
|
|
1294 |
mmCallParams.iIdRestrict = DMMTSY_CALL_CLI_RESTRICT_SETTING1;
|
|
1295 |
mmCallParams.iCug.iExplicitInvoke = DMMTSY_CALL_CUG_INVOKE;
|
|
1296 |
mmCallParams.iCug.iCugIndex = DMMTSY_CALL_CUG_INDEX;
|
|
1297 |
mmCallParams.iCug.iSuppressOA = DMMTSY_CALL_CUG_OA;
|
|
1298 |
mmCallParams.iCug.iSuppressPrefCug = DMMTSY_CALL_CUG_PREF;
|
|
1299 |
mmCallParams.iAutoRedial = DMMTSY_CALL_AUTO_REDIAL_FLAG;
|
|
1300 |
|
|
1301 |
mmCall.AnswerIncomingCallWithUUI(reqStatus, mmCallParamsPckg, uuiAnswerInfo);
|
|
1302 |
User::WaitForRequest(reqStatus);
|
|
1303 |
TEST(reqStatus.Int()==KErrNone);
|
|
1304 |
|
|
1305 |
mmCall.AnswerIncomingCallWithUUI(reqStatus, mmCallParamsPckg, uuiAnswerInfo);
|
|
1306 |
mmCall.CancelAsyncRequest(EMobileCallAnswerWithUUI);
|
|
1307 |
User::WaitForRequest(reqStatus);
|
|
1308 |
if (reqStatus.Int()==KErrCancel)
|
|
1309 |
INFO_PRINTF2(_L("Test %d - RMobileCall::AnswerIncomingCallWithUUI (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
1310 |
else
|
|
1311 |
INFO_PRINTF2(_L("Test %d - RMobileCall::AnswerIncomingCallWithUUI (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
1312 |
|
|
1313 |
// Test Send UUI
|
|
1314 |
|
|
1315 |
// asynchronous
|
|
1316 |
RMobileCall::TMobileCallUUI uuiInfo(DMMTSY_CALL_UUI_INFO);
|
|
1317 |
|
|
1318 |
mmCall.SendUUI(reqStatus, DMMTSY_CALL_UUI_MORE_INFO, uuiInfo);
|
|
1319 |
User::WaitForRequest(reqStatus);
|
|
1320 |
TEST(reqStatus.Int()==KErrNone);
|
|
1321 |
|
|
1322 |
// asynchronous & cancel
|
|
1323 |
|
|
1324 |
mmCall.SendUUI(reqStatus, DMMTSY_CALL_UUI_MORE_INFO, uuiInfo);
|
|
1325 |
mmCall.CancelAsyncRequest(EMobileCallSendUUI);
|
|
1326 |
User::WaitForRequest(reqStatus);
|
|
1327 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
1328 |
if (reqStatus.Int()==KErrCancel)
|
|
1329 |
INFO_PRINTF2(_L("Test %d - RMobileCall::SendUUI (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
1330 |
else
|
|
1331 |
INFO_PRINTF2(_L("Test %d - RMobileCall::SendUUI (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
1332 |
|
|
1333 |
// Test Receive UUI
|
|
1334 |
|
|
1335 |
RMobileCall::TMobileCallUUI uui;
|
|
1336 |
|
|
1337 |
// asynchronous
|
|
1338 |
|
|
1339 |
mmCall.ReceiveUUI(reqStatus, uui);
|
|
1340 |
User::WaitForRequest(reqStatus);
|
|
1341 |
TEST(reqStatus.Int()==KErrNone);
|
|
1342 |
TEST(uui.Compare(DMMTSY_CALL_UUI_INFO) == 0);
|
|
1343 |
|
|
1344 |
// asynchronous & cancel
|
|
1345 |
|
|
1346 |
mmCall.ReceiveUUI(reqStatus, uui);
|
|
1347 |
mmCall.CancelAsyncRequest(EMobileCallReceiveUUI);
|
|
1348 |
User::WaitForRequest(reqStatus);
|
|
1349 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
1350 |
if (reqStatus.Int()==KErrCancel)
|
|
1351 |
INFO_PRINTF2(_L("Test %d - RMobileCall::ReceiveUUI (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
1352 |
else
|
|
1353 |
{
|
|
1354 |
TEST(uui.Compare(DMMTSY_CALL_UUI_INFO) != 0);
|
|
1355 |
INFO_PRINTF2(_L("Test %d - RMobileCall::ReceiveUUI (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
1356 |
}
|
|
1357 |
|
|
1358 |
// Test HangUp With UUI
|
|
1359 |
|
|
1360 |
// asynchronous
|
|
1361 |
|
|
1362 |
TBuf<RMobileCall::KMaxUUISize> uuiHangupInfo(DMMTSY_CALL_UUI_INFO_HANGUP);
|
|
1363 |
|
|
1364 |
mmCall.HangupWithUUI(reqStatus, uuiHangupInfo);
|
|
1365 |
User::WaitForRequest(reqStatus);
|
|
1366 |
TEST(reqStatus.Int()==KErrNone);
|
|
1367 |
|
|
1368 |
// asynchronous & cancel
|
|
1369 |
|
|
1370 |
mmCall.HangupWithUUI(reqStatus, uuiHangupInfo);
|
|
1371 |
mmCall.CancelAsyncRequest(EMobileCallHangupWithUUI);
|
|
1372 |
User::WaitForRequest(reqStatus);
|
|
1373 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
1374 |
if (reqStatus.Int()==KErrCancel)
|
|
1375 |
INFO_PRINTF2(_L("Test %d - RMobileCall::HangupWithUUI (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
1376 |
else
|
|
1377 |
INFO_PRINTF2(_L("Test %d - RMobileCall::HangupWithUUI (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
1378 |
|
|
1379 |
//test.next(_L("OK: RMobileCall's MobileCallUUI"));
|
|
1380 |
|
|
1381 |
// Test AnswerMultimediaCallAsVoice
|
|
1382 |
TName aName ;
|
|
1383 |
// asynchronous
|
|
1384 |
|
|
1385 |
mmCall.AnswerMultimediaCallAsVoice(reqStatus, mmCallParamsPckg, aName);
|
|
1386 |
User::WaitForRequest(reqStatus);
|
|
1387 |
TEST(reqStatus.Int()==KErrNone);
|
|
1388 |
TEST(aName.Compare(DMMTSY_LINE_VOICE_NAME)==0);
|
|
1389 |
|
|
1390 |
// asynchronous & cancel
|
|
1391 |
|
|
1392 |
mmCall.AnswerMultimediaCallAsVoice(reqStatus,mmCallParamsPckg,aName);
|
|
1393 |
mmCall.CancelAsyncRequest(EMobileCallAnswerMultimediaCallAsVoice);
|
|
1394 |
User::WaitForRequest(reqStatus);
|
|
1395 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
1396 |
if (reqStatus.Int()==KErrCancel)
|
|
1397 |
INFO_PRINTF2(_L("Test %d - RMobileCall::AnswerMultimediaCallAsVoice (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
1398 |
else
|
|
1399 |
INFO_PRINTF2(_L("Test %d - RMobileCall::AnswerMultimediaCallAsVoice (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
1400 |
|
|
1401 |
//test.next(_L("OK: RMobileCall's AnswerMultimediaCallAsVoice"));
|
|
1402 |
|
|
1403 |
// Test notification of audio tones
|
|
1404 |
RMobileCall::TAudioToneV3 audioToneV3;
|
|
1405 |
RMobileCall::TAudioToneV3Pckg audioToneV3Pckg(audioToneV3);
|
|
1406 |
|
|
1407 |
//asynchronous start notification
|
|
1408 |
mmCall.NotifyAudioToneEvent(reqStatus, audioToneV3Pckg);
|
|
1409 |
User::WaitForRequest(reqStatus);
|
|
1410 |
TEST(reqStatus.Int()==KErrNone);
|
|
1411 |
TEST(audioToneV3.iEvent == DMMTSY_AUDIO_START_TONE);
|
|
1412 |
TEST(audioToneV3.iTone == DMMTSY_AUDIO_CONGESTION_TONE);
|
|
1413 |
TEST(audioToneV3.iPlayedLocally = DMMTSY_AUDIO_PLAYED_LOCALLY);
|
|
1414 |
|
|
1415 |
//asynchronous stop notification
|
|
1416 |
mmCall.NotifyAudioToneEvent(reqStatus, audioToneV3Pckg);
|
|
1417 |
User::WaitForRequest(reqStatus);
|
|
1418 |
TEST(reqStatus.Int()==KErrNone);
|
|
1419 |
TEST(audioToneV3.iEvent == DMMTSY_AUDIO_STOP_TONE);
|
|
1420 |
TEST(audioToneV3.iTone == DMMTSY_AUDIO_NO_TONE);
|
|
1421 |
TEST(audioToneV3.iPlayedLocally = DMMTSY_AUDIO_PLAYED_LOCALLY);
|
|
1422 |
|
|
1423 |
//asynchronous & cancel
|
|
1424 |
mmCall.NotifyAudioToneEvent(reqStatus, audioToneV3Pckg);
|
|
1425 |
mmCall.CancelAsyncRequest(EMobileCallNotifyAudioToneEvent);
|
|
1426 |
User::WaitForRequest(reqStatus);
|
|
1427 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
1428 |
if (reqStatus.Int()==KErrCancel)
|
|
1429 |
INFO_PRINTF2(_L("Test %d - RMobileCall::EMobileCallNotifyAudioToneEvent (async & cancel (Cancelled Request)) passed"), iTestCount++);
|
|
1430 |
else
|
|
1431 |
INFO_PRINTF2(_L("Test %d - RMobileCall::EMobileCallNotifyAudioToneEvent (async & cancel (Request Not Cancelled)) passed"), iTestCount++);
|
|
1432 |
|
|
1433 |
// Close Call
|
|
1434 |
mmCall.Close();
|
|
1435 |
mmLine.Close();
|
|
1436 |
mmPhone.Close();
|
|
1437 |
INFO_PRINTF1(_L(""));
|
|
1438 |
|
|
1439 |
return TestStepResult();
|
|
1440 |
}
|
|
1441 |
|
|
1442 |
|
|
1443 |
CTestCallISV::CTestCallISV()
|
|
1444 |
/** Each test step initialises it's own name
|
|
1445 |
*/
|
|
1446 |
{
|
|
1447 |
// store the name of this test case
|
|
1448 |
// this is the name that is used by the script file
|
|
1449 |
SetTestStepName(_L("TestCall-ISV"));
|
|
1450 |
}
|
|
1451 |
|
|
1452 |
|
|
1453 |
enum TVerdict CTestCallISV::doTestStepL()
|
|
1454 |
//
|
|
1455 |
// Test Call Functions
|
|
1456 |
//
|
|
1457 |
{
|
|
1458 |
iTestCount =1;
|
|
1459 |
INFO_PRINTF1(_L(""));
|
|
1460 |
INFO_PRINTF1(_L("Test Mobile Call Functionality - ISV"));
|
|
1461 |
|
|
1462 |
// Set up parameters for the call
|
|
1463 |
RMobileCall::TEtel3rdPartyMobileCallParamsV1 callParams1;
|
|
1464 |
callParams1.iIdRestrict = DMMTSY_CALL_CLI_RESTRICT_SETTING1;
|
|
1465 |
callParams1.iAutoRedial = DMMTSY_CALL_AUTO_REDIAL_FLAG;
|
|
1466 |
RMobileCall::TEtel3rdPartyMobileCallParamsV1Pckg callParamsPckg1(callParams1);
|
|
1467 |
TBuf<RMobilePhone::KMaxMobileTelNumberSize> telNumber(DMMTSY_PHONE_TEL_NUMBER);
|
|
1468 |
|
|
1469 |
RMobilePhone mmPhone;
|
|
1470 |
TInt ret=mmPhone.Open(iTelServer,DMMTSY_PHONE_NAME);
|
|
1471 |
TEST(ret==KErrNone);
|
|
1472 |
|
|
1473 |
RMobileLine mmLine;
|
|
1474 |
ret=mmLine.Open(mmPhone,DMMTSY_LINE_VOICE_NAME);
|
|
1475 |
TEST(ret==KErrNone);
|
|
1476 |
|
|
1477 |
RMobileCall mmCall;
|
|
1478 |
TName callName;
|
|
1479 |
ret=mmCall.OpenNewCall(mmLine,callName);
|
|
1480 |
TEST(ret==KErrNone);
|
|
1481 |
|
|
1482 |
TRequestStatus reqStatus;
|
|
1483 |
|
|
1484 |
// Test Dial ISV functionality
|
|
1485 |
mmCall.DialISV(reqStatus, callParamsPckg1, telNumber);
|
|
1486 |
User::WaitForRequest(reqStatus);
|
|
1487 |
TEST(reqStatus.Int()==KErrNone);
|
|
1488 |
|
|
1489 |
if (reqStatus.Int()==KErrNone)
|
|
1490 |
{
|
|
1491 |
INFO_PRINTF2(_L("Test %d - RMobileCall::DialISV passed"), iTestCount++);
|
|
1492 |
}
|
|
1493 |
|
|
1494 |
// Test Dial ISV Cancel functionality
|
|
1495 |
mmCall.DialISV(reqStatus, callParamsPckg1, telNumber);
|
|
1496 |
// Attempt to cancel call immediately.
|
|
1497 |
mmCall.CancelAsyncRequest(EMobileCallDialISV);
|
|
1498 |
|
|
1499 |
User::WaitForRequest(reqStatus);
|
|
1500 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
1501 |
|
|
1502 |
if (reqStatus.Int()==KErrCancel)
|
|
1503 |
{
|
|
1504 |
INFO_PRINTF2(_L("Test %d - RMobileCall::DialISV Cancel Request passed"), iTestCount++);
|
|
1505 |
}
|
|
1506 |
else
|
|
1507 |
{
|
|
1508 |
if (reqStatus.Int()==KErrNone)
|
|
1509 |
{
|
|
1510 |
INFO_PRINTF2(_L("Test %d - RMobileCall::DialISV - Request Not Cancelled "), iTestCount++);
|
|
1511 |
}
|
|
1512 |
}
|
|
1513 |
|
|
1514 |
|
|
1515 |
// Answer incoming call
|
|
1516 |
mmCall.AnswerIncomingCallISV(reqStatus, callParamsPckg1);
|
|
1517 |
User::WaitForRequest(reqStatus);
|
|
1518 |
TEST(reqStatus.Int()==KErrNone);
|
|
1519 |
|
|
1520 |
if (reqStatus.Int()==KErrNone)
|
|
1521 |
{
|
|
1522 |
INFO_PRINTF2(_L("Test %d - RMobileCall::AnswerIncomingCallISV passed"), iTestCount++);
|
|
1523 |
}
|
|
1524 |
|
|
1525 |
// Test Answer Incoming ISV Cancel functionality
|
|
1526 |
mmCall.AnswerIncomingCallISV(reqStatus, callParamsPckg1);
|
|
1527 |
// Attempt to cancel call immediately.
|
|
1528 |
mmCall.CancelAsyncRequest(EMobileCallAnswerISV);
|
|
1529 |
|
|
1530 |
User::WaitForRequest(reqStatus);
|
|
1531 |
TEST(reqStatus.Int()==KErrNone || reqStatus.Int()==KErrCancel);
|
|
1532 |
|
|
1533 |
if (reqStatus.Int()==KErrCancel)
|
|
1534 |
{
|
|
1535 |
INFO_PRINTF2(_L("Test %d - RMobileCall::AnswerIncomingCallISV Cancel Request passed"), iTestCount++);
|
|
1536 |
}
|
|
1537 |
else
|
|
1538 |
{
|
|
1539 |
if (reqStatus.Int()==KErrNone)
|
|
1540 |
{
|
|
1541 |
INFO_PRINTF2(_L("Test %d - RMobileCall:: AnswerIncomingCallISV - Request Not Cancelled "), iTestCount++);
|
|
1542 |
}
|
|
1543 |
}
|
|
1544 |
|
|
1545 |
|
|
1546 |
// Close Call
|
|
1547 |
mmCall.Close();
|
|
1548 |
mmLine.Close();
|
|
1549 |
mmPhone.Close();
|
|
1550 |
INFO_PRINTF1(_L(""));
|
|
1551 |
|
|
1552 |
|
|
1553 |
return TestStepResult();
|
|
1554 |
}
|
|
1555 |
|
|
1556 |
|
|
1557 |
void CTestCallc::ValidateRemotePartyInfoChange(const RMobileCall::TMobileCallRemotePartyInfoV1 &aRemoteParty)
|
|
1558 |
{
|
|
1559 |
TEST(aRemoteParty.iRemoteIdStatus==DMMTSY_CALL_REMOTEPARTYSTATUS2);
|
|
1560 |
TEST(aRemoteParty.iRemoteNumber.iTelNumber.Compare(DMMTSY_CALL_EMPTY_STRING)==0);
|
|
1561 |
TEST(aRemoteParty.iDirection==DMMTSY_CALL_REMOTEPARTYDIRECTION2);
|
|
1562 |
TEST(aRemoteParty.iCallingName.Compare(DMMTSY_CALL_EMPTY_STRING)==0);
|
|
1563 |
}
|
|
1564 |
|
|
1565 |
void CTestCallb::ValidateMobileCallInfo(const RMobileCall::TMobileCallInfoV1 &aSyncCallInfo)
|
|
1566 |
{
|
|
1567 |
TEST(aSyncCallInfo.iCallName.Compare(DMMTSY_CALL_NAME1)==0);
|
|
1568 |
TEST(aSyncCallInfo.iLineName.Compare(DMMTSY_LINE_VOICE_NAME)==0);
|
|
1569 |
TEST(aSyncCallInfo.iService==DMMTSY_CALL_SERVICE);
|
|
1570 |
TEST(aSyncCallInfo.iStatus==DMMTSY_CALL_STATUS4);
|
|
1571 |
TEST(aSyncCallInfo.iValid==DMMTSY_CALL_VALID_FLAG);
|
|
1572 |
TEST(aSyncCallInfo.iDuration.Int()==DMMTSY_CALL_DURATION1);
|
|
1573 |
TEST(aSyncCallInfo.iCallId==DMMTSY_CALL_ID1);
|
|
1574 |
TEST(aSyncCallInfo.iRemoteParty.iRemoteIdStatus==DMMTSY_CALL_REMOTEPARTYSTATUS1);
|
|
1575 |
TEST(aSyncCallInfo.iRemoteParty.iRemoteNumber.iTelNumber.Compare(DMMTSY_CALL_REMOTEPARTYNUMBER1)==0);
|
|
1576 |
TEST(aSyncCallInfo.iRemoteParty.iDirection==DMMTSY_CALL_REMOTEPARTYDIRECTION1);
|
|
1577 |
TEST(aSyncCallInfo.iRemoteParty.iCallingName.Compare(DMMTSY_CALL_REMOTEPARTYNAME)==0);
|
|
1578 |
TEST(aSyncCallInfo.iExitCode==DMMTSY_CALL_EXIT_CODE);
|
|
1579 |
TEST(aSyncCallInfo.iEmergency==DMMTSY_CALL_EMERGENCY_FLAG);
|
|
1580 |
TEST(aSyncCallInfo.iForwarded==DMMTSY_CALL_FORWARDED_FLAG);
|
|
1581 |
TEST(aSyncCallInfo.iPrivacy==DMMTSY_CALL_PRIVACY);
|
|
1582 |
TEST(aSyncCallInfo.iTch==DMMTSY_CALL_CHANNEL);
|
|
1583 |
TEST(aSyncCallInfo.iAlternatingCall==DMMTSY_CALL_ALTERNATING);
|
|
1584 |
TEST(aSyncCallInfo.iStartTime.Year() == DMMTSY_PHONE_NWTINFO_YEAR);
|
|
1585 |
TEST(aSyncCallInfo.iStartTime.Month() == DMMTSY_PHONE_NWTINFO_MONTH);
|
|
1586 |
TEST(aSyncCallInfo.iStartTime.Day() == DMMTSY_PHONE_NWTINFO_DAY);
|
|
1587 |
TEST(aSyncCallInfo.iStartTime.Hour() == DMMTSY_PHONE_NWTINFO_HOUR);
|
|
1588 |
TEST(aSyncCallInfo.iStartTime.Minute() == DMMTSY_PHONE_NWTINFO_MINUTE);
|
|
1589 |
TEST(aSyncCallInfo.iStartTime.Second() == DMMTSY_PHONE_NWTINFO_SECOND);
|
|
1590 |
TEST(aSyncCallInfo.iStartTime.MicroSecond() == DMMTSY_PHONE_NWTINFO_MICRO);
|
|
1591 |
}
|
|
1592 |
|
|
1593 |
void CTestCall::ValidateCallDataCaps(const RMobileCall::TMobileCallDataCapsV1 &aDataCaps)
|
|
1594 |
{
|
|
1595 |
TEST(aDataCaps.iSpeedCaps == DMMTSY_CALL_DATA_CAPS_SPEED);
|
|
1596 |
TEST(aDataCaps.iProtocolCaps == DMMTSY_CALL_DATA_CAPS_CARRIER);
|
|
1597 |
TEST(aDataCaps.iServiceCaps == DMMTSY_CALL_DATA_CAPS_SERVICE);
|
|
1598 |
TEST(aDataCaps.iHscsdSupport == DMMTSY_CALL_DATA_CAPS_HSCSD);
|
|
1599 |
TEST(aDataCaps.iMClass == DMMTSY_CALL_DATA_CAPS_MCLASS);
|
|
1600 |
TEST(aDataCaps.iMaxRxTimeSlots == DMMTSY_CALL_DATA_CAPS_MAXRXTS);
|
|
1601 |
TEST(aDataCaps.iMaxTxTimeSlots == DMMTSY_CALL_DATA_CAPS_MAXTXTS);
|
|
1602 |
TEST(aDataCaps.iTotalRxTxTimeSlots == DMMTSY_CALL_DATA_CAPS_TOTRXTXTS);
|
|
1603 |
TEST(aDataCaps.iCodingCaps == DMMTSY_CALL_DATA_CAPS_CODING);
|
|
1604 |
TEST(aDataCaps.iAsymmetryCaps == DMMTSY_CALL_DATA_CAPS_ASYMETRY);
|
|
1605 |
TEST(aDataCaps.iUserInitUpgrade == DMMTSY_CALL_DATA_CAPS_USERIMI);
|
|
1606 |
}
|
|
1607 |
|
|
1608 |
void CTestCall::ValidateRLPRange(const RMobileCall::TMobileDataRLPRangesV1 &aRLPRanges)
|
|
1609 |
{
|
|
1610 |
TEST(aRLPRanges.iIWSMax == DMMTSY_CALL_DATA_RLP_WSMAX);
|
|
1611 |
TEST(aRLPRanges.iIWSMin == DMMTSY_CALL_DATA_RLP_WSMIN);
|
|
1612 |
TEST(aRLPRanges.iMWSMax == DMMTSY_CALL_DATA_RLP_MWSMAX);
|
|
1613 |
TEST(aRLPRanges.iMWSMin == DMMTSY_CALL_DATA_RLP_MWSMIN);
|
|
1614 |
TEST(aRLPRanges.iN2Max == DMMTSY_CALL_DATA_RLP_N2MAX);
|
|
1615 |
TEST(aRLPRanges.iN2Min == DMMTSY_CALL_DATA_RLP_N2MIN);
|
|
1616 |
TEST(aRLPRanges.iT1Max == DMMTSY_CALL_DATA_RLP_T1MAX);
|
|
1617 |
TEST(aRLPRanges.iT1Min == DMMTSY_CALL_DATA_RLP_T1MIN);
|
|
1618 |
TEST(aRLPRanges.iT4Max == DMMTSY_CALL_DATA_RLP_T4MAX);
|
|
1619 |
TEST(aRLPRanges.iT4Min == DMMTSY_CALL_DATA_RLP_T4MIN);
|
|
1620 |
}
|
|
1621 |
|
|
1622 |
void CTestCall::ValidateHscsdParams(const RMobileCall::TMobileHscsdCallParamsV1& aHcsdParams)
|
|
1623 |
{
|
|
1624 |
TEST(aHcsdParams.iWantedAiur == DMMTSY_CALL_HCSD_AIUR);
|
|
1625 |
TEST(aHcsdParams.iWantedRxTimeSlots == DMMTSY_CALL_HCSD_TS);
|
|
1626 |
TEST(aHcsdParams.iMaxTimeSlots == DMMTSY_CALL_HCSD_MAXTS);
|
|
1627 |
TEST(aHcsdParams.iCodings == DMMTSY_CALL_HCSD_CODING);
|
|
1628 |
TEST(aHcsdParams.iAsymmetry == DMMTSY_CALL_HCSD_ASYMMETRY);
|
|
1629 |
TEST(aHcsdParams.iUserInitUpgrade == DMMTSY_CALL_HCSD_USER_IMI);
|
|
1630 |
}
|
|
1631 |
|
|
1632 |
void CTestCall::ValidateHscsdInfo(const RMobileCall::TMobileCallHscsdInfoV1& aHcsdInfo)
|
|
1633 |
{
|
|
1634 |
TEST(aHcsdInfo.iAiur == DMMTSY_CALL_HCSD_AIUR);
|
|
1635 |
TEST(aHcsdInfo.iRxTimeSlots == DMMTSY_CALL_HCSD_TS);
|
|
1636 |
TEST(aHcsdInfo.iTxTimeSlots == DMMTSY_CALL_HCSD_TS);
|
|
1637 |
TEST(aHcsdInfo.iCodings == DMMTSY_CALL_HCSD_CODING);
|
|
1638 |
}
|
|
1639 |
|
|
1640 |
|