|
1 // Copyright (c) 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 "cctsysatfunegative.h" |
|
24 |
|
25 #include <etelmm.h> |
|
26 #include <test/tmockltsydata.h> |
|
27 #include <ctsy/ltsy/sat_defs.h> |
|
28 #include <cstktsy/ttlv.h> |
|
29 |
|
30 #include <ctsy/ltsy/mltsydispatchsatinterface.h> |
|
31 #include <ctsy/ltsy/mltsydispatchphoneinterface.h> //for KLtsyDispatchPhoneGetPhoneIdApiId |
|
32 #include <ctsy/ltsy/mltsydispatchsmsinterface.h> //for KLtsyDispatchSmsSendSatSmsApiId |
|
33 #include <ctsy/ltsy/mltsydispatchphonebookinterface.h> //for KLtsyDispatchPhonebookSmsStoreWriteEntryApiId |
|
34 #include "mockltsyindicatorids.h" |
|
35 #include "config.h" |
|
36 #include "testconstants.h" |
|
37 |
|
38 const TInt KShiftBitsToGetMSB = 8; |
|
39 |
|
40 CTestSuite* CCTsySatFUNegative::CreateSuiteL(const TDesC& aName) |
|
41 { |
|
42 SUB_SUITE; |
|
43 ADD_TEST_STEP_ISO_CPP(CCTsySatFUNegative, TestUnit0001L); |
|
44 ADD_TEST_STEP_ISO_CPP(CCTsySatFUNegative, TestUnit0002L); |
|
45 ADD_TEST_STEP_ISO_CPP(CCTsySatFUNegative, TestUnit0003L); |
|
46 ADD_TEST_STEP_ISO_CPP(CCTsySatFUNegative, TestUnit0004L); |
|
47 ADD_TEST_STEP_ISO_CPP(CCTsySatFUNegative, TestUnit0005L); |
|
48 ADD_TEST_STEP_ISO_CPP(CCTsySatFUNegative, TestUnit0006L); |
|
49 ADD_TEST_STEP_ISO_CPP(CCTsySatFUNegative, TestUnit0007L); |
|
50 ADD_TEST_STEP_ISO_CPP(CCTsySatFUNegative, TestUnit0008L); |
|
51 ADD_TEST_STEP_ISO_CPP(CCTsySatFUNegative, TestUnit0009L); |
|
52 ADD_TEST_STEP_ISO_CPP(CCTsySatFUNegative, TestUnit0010L); |
|
53 ADD_TEST_STEP_ISO_CPP(CCTsySatFUNegative, TestUnit0011L); |
|
54 ADD_TEST_STEP_ISO_CPP(CCTsySatFUNegative, TestUnit0013L); |
|
55 ADD_TEST_STEP_ISO_CPP(CCTsySatFUNegative, TestUnit0014L); |
|
56 |
|
57 END_SUITE; |
|
58 } |
|
59 |
|
60 CCTsySatFUNegative::~CCTsySatFUNegative() |
|
61 { |
|
62 iSat.Close(); |
|
63 } |
|
64 |
|
65 /** |
|
66 * @SYMTestCaseID BA-CTSYD-DIS-SAT-NEGATIVE-UN0001 |
|
67 * @SYMComponent telephony_ctsy |
|
68 * @SYMTestCaseDesc Test handing in CTSY dispatch when the MLtsyDispatchSatGetSmsControlActivated::KLtsyDispatchSatGetSmsControlActivatedApiId IPC is disabled |
|
69 * @SYMTestPriority High |
|
70 * @SYMTestActions Disable API, call API, check correct error returned |
|
71 * @SYMTestExpectedResults Pass |
|
72 * @SYMTestType CT |
|
73 */ |
|
74 void CCTsySatFUNegative::TestUnit0001L() |
|
75 { |
|
76 TConfig config; |
|
77 config.SetSupportedValue(MLtsyDispatchSatGetSmsControlActivated::KLtsyDispatchSatGetSmsControlActivatedApiId, EFalse); |
|
78 |
|
79 RBuf8 data; |
|
80 CleanupClosePushL(data); |
|
81 |
|
82 OpenEtelServerL(EUseExtendedError); |
|
83 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
84 OpenPhoneL(); |
|
85 |
|
86 TUint8 enable = KSmsMoControlEnabled | KSmsPpDownloadEnabled | KUssdEnabled; |
|
87 |
|
88 TUint8 pcmdCode = KPollInterval; |
|
89 TMockLtsyData1<TUint8> expLtsyData(pcmdCode); |
|
90 data.Close(); |
|
91 expLtsyData.SerialiseL(data); |
|
92 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
93 |
|
94 pcmdCode = KPollingOff; |
|
95 data.Close(); |
|
96 expLtsyData.SerialiseL(data); |
|
97 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
98 |
|
99 pcmdCode = KMoreTime; |
|
100 data.Close(); |
|
101 expLtsyData.SerialiseL(data); |
|
102 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
103 |
|
104 pcmdCode = KTimerManagement; |
|
105 data.Close(); |
|
106 expLtsyData.SerialiseL(data); |
|
107 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
108 |
|
109 iMockLTSY.ExpectL(MLtsyDispatchPhoneGetPhoneId::KLtsyDispatchPhoneGetPhoneIdApiId); |
|
110 |
|
111 _LIT(KSerialNumber, "12345678"); |
|
112 |
|
113 RMobilePhone::TMobilePhoneIdentityV1 phoneId; |
|
114 phoneId.iSerialNumber = KSerialNumber; |
|
115 |
|
116 TMockLtsyData1<RMobilePhone::TMobilePhoneIdentityV1> phoneIdData(phoneId); |
|
117 data.Close(); |
|
118 phoneIdData.SerialiseL(data); |
|
119 iMockLTSY.CompleteL(MLtsyDispatchPhoneGetPhoneId::KLtsyDispatchPhoneGetPhoneIdApiId, KErrNone, data); |
|
120 |
|
121 iMockLTSY.ExpectL(MLtsyDispatchSatGetDefaultBearerCapability::KLtsyDispatchSatGetDefaultBearerCapabilityApiId); |
|
122 |
|
123 TBuf8<KMaxLengthDefaultBearerData> bearerCapabilities(_L8("TEST BEARER!")); |
|
124 TDesC8* bearerCapabilitiesPtr = &bearerCapabilities; |
|
125 TMockLtsyData1<TDesC8*> bearerCapabilitiesData(bearerCapabilitiesPtr); |
|
126 data.Close(); |
|
127 bearerCapabilitiesData.SerialiseL(data); |
|
128 iMockLTSY.CompleteL(MLtsyDispatchSatGetDefaultBearerCapability::KLtsyDispatchSatGetDefaultBearerCapabilityApiId, KErrNone, data); |
|
129 |
|
130 iMockLTSY.ExpectL(MLtsyDispatchSatGetUssdControlSupported::KLtsyDispatchSatGetUssdControlSupportedApiId); |
|
131 |
|
132 TBool ussdSupported = enable & KUssdEnabled; |
|
133 TMockLtsyData1<TBool> ussdSupportedData(ussdSupported); |
|
134 data.Close(); |
|
135 ussdSupportedData.SerialiseL(data); |
|
136 iMockLTSY.CompleteL(MLtsyDispatchSatGetUssdControlSupported::KLtsyDispatchSatGetUssdControlSupportedApiId, KErrNone, data); |
|
137 iMockLTSY.CompleteL(KMockLtsyDispatchSatUssdControlSupportedChangeIndId, KErrNone, data); //do a future indicator completion as well as this could happen at some point |
|
138 |
|
139 iMockLTSY.ExpectL(MLtsyDispatchSatReady::KLtsyDispatchSatReadyApiId); |
|
140 iMockLTSY.CompleteL(MLtsyDispatchSatReady::KLtsyDispatchSatReadyApiId,KErrNone); |
|
141 |
|
142 iMockLTSY.ExpectL(MLtsyDispatchSatGetSmsPpDownloadSupported::KLtsyDispatchSatGetSmsPpDownloadSupportedApiId); |
|
143 |
|
144 TBool smsPpDdlSupported = enable & KSmsPpDownloadEnabled; |
|
145 TMockLtsyData1<TBool> smsPpData(smsPpDdlSupported); |
|
146 data.Close(); |
|
147 smsPpData.SerialiseL(data); |
|
148 iMockLTSY.CompleteL(MLtsyDispatchSatGetSmsPpDownloadSupported::KLtsyDispatchSatGetSmsPpDownloadSupportedApiId, KErrNone, data); |
|
149 |
|
150 TRequestStatus reqStatus; |
|
151 iMockLTSY.NotifyTerminated(reqStatus); |
|
152 |
|
153 RSat sat; |
|
154 TInt ret = sat.Open(iPhone); |
|
155 ASSERT_EQUALS(ret, KErrNone); |
|
156 |
|
157 User::WaitForRequest(reqStatus); |
|
158 ASSERT_EQUALS(KErrNone, reqStatus.Int()); |
|
159 |
|
160 AssertMockLtsyStatusL(); |
|
161 CleanupStack::PopAndDestroy(2, &data); |
|
162 config.Reset(); |
|
163 } |
|
164 |
|
165 /** |
|
166 * @SYMTestCaseID BA-CTSYD-DIS-SAT-NEGATIVE-UN0002 |
|
167 * @SYMComponent telephony_ctsy |
|
168 * @SYMTestCaseDesc Test handing in CTSY dispatch when the MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId IPC is disabled |
|
169 * @SYMTestPriority High |
|
170 * @SYMTestActions Disable API, call API, check correct error returned |
|
171 * @SYMTestExpectedResults Pass |
|
172 * @SYMTestType CT |
|
173 */ |
|
174 void CCTsySatFUNegative::TestUnit0002L() |
|
175 { |
|
176 TConfig config; |
|
177 config.SetSupportedValue(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, EFalse); |
|
178 |
|
179 RBuf8 data; |
|
180 CleanupClosePushL(data); |
|
181 |
|
182 OpenEtelServerL(EUseExtendedError); |
|
183 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
184 OpenPhoneL(); |
|
185 |
|
186 TUint8 enable = KSmsMoControlEnabled | KSmsPpDownloadEnabled | KUssdEnabled; |
|
187 |
|
188 iMockLTSY.ExpectL(MLtsyDispatchSatGetSmsControlActivated::KLtsyDispatchSatGetSmsControlActivatedApiId); |
|
189 |
|
190 TBool smsMoControlActivated = enable & KSmsMoControlEnabled; |
|
191 TMockLtsyData1<TBool> comLtsyData(smsMoControlActivated); |
|
192 comLtsyData.SerialiseL(data); |
|
193 iMockLTSY.CompleteL(MLtsyDispatchSatGetSmsControlActivated::KLtsyDispatchSatGetSmsControlActivatedApiId, KErrNone, data); |
|
194 |
|
195 iMockLTSY.ExpectL(MLtsyDispatchPhoneGetPhoneId::KLtsyDispatchPhoneGetPhoneIdApiId); |
|
196 |
|
197 _LIT(KSerialNumber, "12345678"); |
|
198 |
|
199 RMobilePhone::TMobilePhoneIdentityV1 phoneId; |
|
200 phoneId.iSerialNumber = KSerialNumber; |
|
201 |
|
202 TMockLtsyData1<RMobilePhone::TMobilePhoneIdentityV1> phoneIdData(phoneId); |
|
203 data.Close(); |
|
204 phoneIdData.SerialiseL(data); |
|
205 iMockLTSY.CompleteL(MLtsyDispatchPhoneGetPhoneId::KLtsyDispatchPhoneGetPhoneIdApiId, KErrNone, data); |
|
206 |
|
207 iMockLTSY.ExpectL(MLtsyDispatchSatGetDefaultBearerCapability::KLtsyDispatchSatGetDefaultBearerCapabilityApiId); |
|
208 |
|
209 TBuf8<KMaxLengthDefaultBearerData> bearerCapabilities(_L8("TEST BEARER!")); |
|
210 TDesC8* bearerCapabilitiesPtr = &bearerCapabilities; |
|
211 TMockLtsyData1<TDesC8*> bearerCapabilitiesData(bearerCapabilitiesPtr); |
|
212 data.Close(); |
|
213 bearerCapabilitiesData.SerialiseL(data); |
|
214 iMockLTSY.CompleteL(MLtsyDispatchSatGetDefaultBearerCapability::KLtsyDispatchSatGetDefaultBearerCapabilityApiId, KErrNone, data); |
|
215 |
|
216 iMockLTSY.ExpectL(MLtsyDispatchSatGetUssdControlSupported::KLtsyDispatchSatGetUssdControlSupportedApiId); |
|
217 |
|
218 TBool ussdSupported = enable & KUssdEnabled; |
|
219 TMockLtsyData1<TBool> ussdSupportedData(ussdSupported); |
|
220 data.Close(); |
|
221 ussdSupportedData.SerialiseL(data); |
|
222 iMockLTSY.CompleteL(MLtsyDispatchSatGetUssdControlSupported::KLtsyDispatchSatGetUssdControlSupportedApiId, KErrNone, data); |
|
223 iMockLTSY.CompleteL(KMockLtsyDispatchSatUssdControlSupportedChangeIndId, KErrNone, data); //do a future indicator completion as well as this could happen at some point |
|
224 |
|
225 iMockLTSY.ExpectL(MLtsyDispatchSatReady::KLtsyDispatchSatReadyApiId); |
|
226 iMockLTSY.CompleteL(MLtsyDispatchSatReady::KLtsyDispatchSatReadyApiId,KErrNone); |
|
227 |
|
228 iMockLTSY.ExpectL(MLtsyDispatchSatGetSmsPpDownloadSupported::KLtsyDispatchSatGetSmsPpDownloadSupportedApiId); |
|
229 |
|
230 TBool smsPpDdlSupported = enable & KSmsPpDownloadEnabled; |
|
231 TMockLtsyData1<TBool> smsPpData(smsPpDdlSupported); |
|
232 data.Close(); |
|
233 smsPpData.SerialiseL(data); |
|
234 iMockLTSY.CompleteL(MLtsyDispatchSatGetSmsPpDownloadSupported::KLtsyDispatchSatGetSmsPpDownloadSupportedApiId, KErrNone, data); |
|
235 |
|
236 TRequestStatus reqStatus; |
|
237 iMockLTSY.NotifyTerminated(reqStatus); |
|
238 |
|
239 RSat sat; |
|
240 TInt ret = sat.Open(iPhone); |
|
241 ASSERT_EQUALS(ret, KErrNone); |
|
242 |
|
243 User::WaitForRequest(reqStatus); |
|
244 ASSERT_EQUALS(KErrNone, reqStatus.Int()); |
|
245 |
|
246 AssertMockLtsyStatusL(); |
|
247 CleanupStack::PopAndDestroy(2, &data); |
|
248 config.Reset(); |
|
249 } |
|
250 |
|
251 /** |
|
252 * @SYMTestCaseID BA-CTSYD-DIS-SAT-NEGATIVE-UN0003 |
|
253 * @SYMComponent telephony_ctsy |
|
254 * @SYMTestCaseDesc Test handing in CTSY dispatch when the MLtsyDispatchSatGetDefaultBearerCapability::KLtsyDispatchSatGetDefaultBearerCapabilityApiId IPC is disabled |
|
255 * @SYMTestPriority High |
|
256 * @SYMTestActions Disable API, call API, check correct error returned |
|
257 * @SYMTestExpectedResults Pass |
|
258 * @SYMTestType CT |
|
259 */ |
|
260 void CCTsySatFUNegative::TestUnit0003L() |
|
261 { |
|
262 TConfig config; |
|
263 config.SetSupportedValue(MLtsyDispatchSatGetDefaultBearerCapability::KLtsyDispatchSatGetDefaultBearerCapabilityApiId, EFalse); |
|
264 |
|
265 RBuf8 data; |
|
266 CleanupClosePushL(data); |
|
267 |
|
268 OpenEtelServerL(EUseExtendedError); |
|
269 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
270 OpenPhoneL(); |
|
271 |
|
272 TUint8 enable = KSmsMoControlEnabled | KSmsPpDownloadEnabled | KUssdEnabled; |
|
273 |
|
274 iMockLTSY.ExpectL(MLtsyDispatchSatGetSmsControlActivated::KLtsyDispatchSatGetSmsControlActivatedApiId); |
|
275 |
|
276 TBool smsMoControlActivated = enable & KSmsMoControlEnabled; |
|
277 TMockLtsyData1<TBool> comLtsyData(smsMoControlActivated); |
|
278 comLtsyData.SerialiseL(data); |
|
279 iMockLTSY.CompleteL(MLtsyDispatchSatGetSmsControlActivated::KLtsyDispatchSatGetSmsControlActivatedApiId, KErrNone, data); |
|
280 |
|
281 |
|
282 TUint8 pcmdCode = KPollInterval; |
|
283 TMockLtsyData1<TUint8> expLtsyData(pcmdCode); |
|
284 data.Close(); |
|
285 expLtsyData.SerialiseL(data); |
|
286 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
287 |
|
288 pcmdCode = KPollingOff; |
|
289 data.Close(); |
|
290 expLtsyData.SerialiseL(data); |
|
291 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
292 |
|
293 pcmdCode = KMoreTime; |
|
294 data.Close(); |
|
295 expLtsyData.SerialiseL(data); |
|
296 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
297 |
|
298 pcmdCode = KTimerManagement; |
|
299 data.Close(); |
|
300 expLtsyData.SerialiseL(data); |
|
301 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
302 |
|
303 iMockLTSY.ExpectL(MLtsyDispatchPhoneGetPhoneId::KLtsyDispatchPhoneGetPhoneIdApiId); |
|
304 |
|
305 _LIT(KSerialNumber, "12345678"); |
|
306 |
|
307 RMobilePhone::TMobilePhoneIdentityV1 phoneId; |
|
308 phoneId.iSerialNumber = KSerialNumber; |
|
309 |
|
310 TMockLtsyData1<RMobilePhone::TMobilePhoneIdentityV1> phoneIdData(phoneId); |
|
311 data.Close(); |
|
312 phoneIdData.SerialiseL(data); |
|
313 iMockLTSY.CompleteL(MLtsyDispatchPhoneGetPhoneId::KLtsyDispatchPhoneGetPhoneIdApiId, KErrNone, data); |
|
314 |
|
315 iMockLTSY.ExpectL(MLtsyDispatchSatGetUssdControlSupported::KLtsyDispatchSatGetUssdControlSupportedApiId); |
|
316 |
|
317 TBool ussdSupported = enable & KUssdEnabled; |
|
318 TMockLtsyData1<TBool> ussdSupportedData(ussdSupported); |
|
319 data.Close(); |
|
320 ussdSupportedData.SerialiseL(data); |
|
321 iMockLTSY.CompleteL(MLtsyDispatchSatGetUssdControlSupported::KLtsyDispatchSatGetUssdControlSupportedApiId, KErrNone, data); |
|
322 iMockLTSY.CompleteL(KMockLtsyDispatchSatUssdControlSupportedChangeIndId, KErrNone, data); //do a future indicator completion as well as this could happen at some point |
|
323 |
|
324 iMockLTSY.ExpectL(MLtsyDispatchSatReady::KLtsyDispatchSatReadyApiId); |
|
325 iMockLTSY.CompleteL(MLtsyDispatchSatReady::KLtsyDispatchSatReadyApiId,KErrNone); |
|
326 |
|
327 iMockLTSY.ExpectL(MLtsyDispatchSatGetSmsPpDownloadSupported::KLtsyDispatchSatGetSmsPpDownloadSupportedApiId); |
|
328 |
|
329 TBool smsPpDdlSupported = enable & KSmsPpDownloadEnabled; |
|
330 TMockLtsyData1<TBool> smsPpData(smsPpDdlSupported); |
|
331 data.Close(); |
|
332 smsPpData.SerialiseL(data); |
|
333 iMockLTSY.CompleteL(MLtsyDispatchSatGetSmsPpDownloadSupported::KLtsyDispatchSatGetSmsPpDownloadSupportedApiId, KErrNone, data); |
|
334 |
|
335 TRequestStatus reqStatus; |
|
336 iMockLTSY.NotifyTerminated(reqStatus); |
|
337 |
|
338 RSat sat; |
|
339 TInt ret = sat.Open(iPhone); |
|
340 ASSERT_EQUALS(ret, KErrNone); |
|
341 |
|
342 User::WaitForRequest(reqStatus); |
|
343 ASSERT_EQUALS(KErrNone, reqStatus.Int()); |
|
344 |
|
345 AssertMockLtsyStatusL(); |
|
346 CleanupStack::PopAndDestroy(2, &data); |
|
347 config.Reset(); |
|
348 } |
|
349 |
|
350 /** |
|
351 * @SYMTestCaseID BA-CTSYD-DIS-SAT-NEGATIVE-UN0004 |
|
352 * @SYMComponent telephony_ctsy |
|
353 * @SYMTestCaseDesc Test handing in CTSY dispatch when the MLtsyDispatchSatGetUssdControlSupported::KLtsyDispatchSatGetUssdControlSupportedApiId IPC is disabled |
|
354 * @SYMTestPriority High |
|
355 * @SYMTestActions Disable API, call API, check correct error returned |
|
356 * @SYMTestExpectedResults Pass |
|
357 * @SYMTestType CT |
|
358 */ |
|
359 void CCTsySatFUNegative::TestUnit0004L() |
|
360 { |
|
361 TConfig config; |
|
362 config.SetSupportedValue(MLtsyDispatchSatGetUssdControlSupported::KLtsyDispatchSatGetUssdControlSupportedApiId, EFalse); |
|
363 |
|
364 RBuf8 data; |
|
365 CleanupClosePushL(data); |
|
366 |
|
367 OpenEtelServerL(EUseExtendedError); |
|
368 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
369 OpenPhoneL(); |
|
370 |
|
371 TUint8 enable = KSmsMoControlEnabled | KSmsPpDownloadEnabled | KUssdEnabled; |
|
372 |
|
373 iMockLTSY.ExpectL(MLtsyDispatchSatGetSmsControlActivated::KLtsyDispatchSatGetSmsControlActivatedApiId); |
|
374 |
|
375 TBool smsMoControlActivated = enable & KSmsMoControlEnabled; |
|
376 TMockLtsyData1<TBool> comLtsyData(smsMoControlActivated); |
|
377 comLtsyData.SerialiseL(data); |
|
378 iMockLTSY.CompleteL(MLtsyDispatchSatGetSmsControlActivated::KLtsyDispatchSatGetSmsControlActivatedApiId, KErrNone, data); |
|
379 |
|
380 |
|
381 TUint8 pcmdCode = KPollInterval; |
|
382 TMockLtsyData1<TUint8> expLtsyData(pcmdCode); |
|
383 data.Close(); |
|
384 expLtsyData.SerialiseL(data); |
|
385 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
386 |
|
387 pcmdCode = KPollingOff; |
|
388 data.Close(); |
|
389 expLtsyData.SerialiseL(data); |
|
390 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
391 |
|
392 pcmdCode = KMoreTime; |
|
393 data.Close(); |
|
394 expLtsyData.SerialiseL(data); |
|
395 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
396 |
|
397 pcmdCode = KTimerManagement; |
|
398 data.Close(); |
|
399 expLtsyData.SerialiseL(data); |
|
400 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
401 |
|
402 iMockLTSY.ExpectL(MLtsyDispatchPhoneGetPhoneId::KLtsyDispatchPhoneGetPhoneIdApiId); |
|
403 |
|
404 _LIT(KSerialNumber, "12345678"); |
|
405 |
|
406 RMobilePhone::TMobilePhoneIdentityV1 phoneId; |
|
407 phoneId.iSerialNumber = KSerialNumber; |
|
408 |
|
409 TMockLtsyData1<RMobilePhone::TMobilePhoneIdentityV1> phoneIdData(phoneId); |
|
410 data.Close(); |
|
411 phoneIdData.SerialiseL(data); |
|
412 iMockLTSY.CompleteL(MLtsyDispatchPhoneGetPhoneId::KLtsyDispatchPhoneGetPhoneIdApiId, KErrNone, data); |
|
413 |
|
414 iMockLTSY.ExpectL(MLtsyDispatchSatGetDefaultBearerCapability::KLtsyDispatchSatGetDefaultBearerCapabilityApiId); |
|
415 |
|
416 TBuf8<KMaxLengthDefaultBearerData> bearerCapabilities(_L8("TEST BEARER!")); |
|
417 TDesC8* bearerCapabilitiesPtr = &bearerCapabilities; |
|
418 TMockLtsyData1<TDesC8*> bearerCapabilitiesData(bearerCapabilitiesPtr); |
|
419 data.Close(); |
|
420 bearerCapabilitiesData.SerialiseL(data); |
|
421 iMockLTSY.CompleteL(MLtsyDispatchSatGetDefaultBearerCapability::KLtsyDispatchSatGetDefaultBearerCapabilityApiId, KErrNone, data); |
|
422 |
|
423 iMockLTSY.ExpectL(MLtsyDispatchSatReady::KLtsyDispatchSatReadyApiId); |
|
424 iMockLTSY.CompleteL(MLtsyDispatchSatReady::KLtsyDispatchSatReadyApiId,KErrNone); |
|
425 |
|
426 iMockLTSY.ExpectL(MLtsyDispatchSatGetSmsPpDownloadSupported::KLtsyDispatchSatGetSmsPpDownloadSupportedApiId); |
|
427 |
|
428 TBool smsPpDdlSupported = enable & KSmsPpDownloadEnabled; |
|
429 TMockLtsyData1<TBool> smsPpData(smsPpDdlSupported); |
|
430 data.Close(); |
|
431 smsPpData.SerialiseL(data); |
|
432 iMockLTSY.CompleteL(MLtsyDispatchSatGetSmsPpDownloadSupported::KLtsyDispatchSatGetSmsPpDownloadSupportedApiId, KErrNone, data); |
|
433 |
|
434 TRequestStatus reqStatus; |
|
435 iMockLTSY.NotifyTerminated(reqStatus); |
|
436 |
|
437 RSat sat; |
|
438 TInt ret = sat.Open(iPhone); |
|
439 ASSERT_EQUALS(ret, KErrNone); |
|
440 |
|
441 User::WaitForRequest(reqStatus); |
|
442 ASSERT_EQUALS(KErrNone, reqStatus.Int()); |
|
443 |
|
444 AssertMockLtsyStatusL(); |
|
445 CleanupStack::PopAndDestroy(2, &data); |
|
446 config.Reset(); |
|
447 } |
|
448 |
|
449 /** |
|
450 * @SYMTestCaseID BA-CTSYD-DIS-SAT-NEGATIVE-UN0005 |
|
451 * @SYMComponent telephony_ctsy |
|
452 * @SYMTestCaseDesc Test handing in CTSY dispatch when the MLtsyDispatchSatReady::KLtsyDispatchSatReadyApiId IPC is disabled |
|
453 * @SYMTestPriority High |
|
454 * @SYMTestActions Disable API, call API, check correct error returned |
|
455 * @SYMTestExpectedResults Pass |
|
456 * @SYMTestType CT |
|
457 */ |
|
458 void CCTsySatFUNegative::TestUnit0005L() |
|
459 { |
|
460 TConfig config; |
|
461 config.SetSupportedValue(MLtsyDispatchSatReady::KLtsyDispatchSatReadyApiId, EFalse); |
|
462 |
|
463 RBuf8 data; |
|
464 CleanupClosePushL(data); |
|
465 |
|
466 OpenEtelServerL(EUseExtendedError); |
|
467 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
468 OpenPhoneL(); |
|
469 |
|
470 TUint8 enable = KSmsMoControlEnabled | KSmsPpDownloadEnabled | KUssdEnabled; |
|
471 |
|
472 iMockLTSY.ExpectL(MLtsyDispatchSatGetSmsControlActivated::KLtsyDispatchSatGetSmsControlActivatedApiId); |
|
473 |
|
474 TBool smsMoControlActivated = enable & KSmsMoControlEnabled; |
|
475 TMockLtsyData1<TBool> comLtsyData(smsMoControlActivated); |
|
476 comLtsyData.SerialiseL(data); |
|
477 iMockLTSY.CompleteL(MLtsyDispatchSatGetSmsControlActivated::KLtsyDispatchSatGetSmsControlActivatedApiId, KErrNone, data); |
|
478 |
|
479 |
|
480 TUint8 pcmdCode = KPollInterval; |
|
481 TMockLtsyData1<TUint8> expLtsyData(pcmdCode); |
|
482 data.Close(); |
|
483 expLtsyData.SerialiseL(data); |
|
484 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
485 |
|
486 pcmdCode = KPollingOff; |
|
487 data.Close(); |
|
488 expLtsyData.SerialiseL(data); |
|
489 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
490 |
|
491 pcmdCode = KMoreTime; |
|
492 data.Close(); |
|
493 expLtsyData.SerialiseL(data); |
|
494 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
495 |
|
496 pcmdCode = KTimerManagement; |
|
497 data.Close(); |
|
498 expLtsyData.SerialiseL(data); |
|
499 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
500 |
|
501 iMockLTSY.ExpectL(MLtsyDispatchPhoneGetPhoneId::KLtsyDispatchPhoneGetPhoneIdApiId); |
|
502 |
|
503 _LIT(KSerialNumber, "12345678"); |
|
504 |
|
505 RMobilePhone::TMobilePhoneIdentityV1 phoneId; |
|
506 phoneId.iSerialNumber = KSerialNumber; |
|
507 |
|
508 TMockLtsyData1<RMobilePhone::TMobilePhoneIdentityV1> phoneIdData(phoneId); |
|
509 data.Close(); |
|
510 phoneIdData.SerialiseL(data); |
|
511 iMockLTSY.CompleteL(MLtsyDispatchPhoneGetPhoneId::KLtsyDispatchPhoneGetPhoneIdApiId, KErrNone, data); |
|
512 |
|
513 iMockLTSY.ExpectL(MLtsyDispatchSatGetDefaultBearerCapability::KLtsyDispatchSatGetDefaultBearerCapabilityApiId); |
|
514 |
|
515 TBuf8<KMaxLengthDefaultBearerData> bearerCapabilities(_L8("TEST BEARER!")); |
|
516 TDesC8* bearerCapabilitiesPtr = &bearerCapabilities; |
|
517 TMockLtsyData1<TDesC8*> bearerCapabilitiesData(bearerCapabilitiesPtr); |
|
518 data.Close(); |
|
519 bearerCapabilitiesData.SerialiseL(data); |
|
520 iMockLTSY.CompleteL(MLtsyDispatchSatGetDefaultBearerCapability::KLtsyDispatchSatGetDefaultBearerCapabilityApiId, KErrNone, data); |
|
521 |
|
522 iMockLTSY.ExpectL(MLtsyDispatchSatGetUssdControlSupported::KLtsyDispatchSatGetUssdControlSupportedApiId); |
|
523 |
|
524 TBool ussdSupported = enable & KUssdEnabled; |
|
525 TMockLtsyData1<TBool> ussdSupportedData(ussdSupported); |
|
526 data.Close(); |
|
527 ussdSupportedData.SerialiseL(data); |
|
528 iMockLTSY.CompleteL(MLtsyDispatchSatGetUssdControlSupported::KLtsyDispatchSatGetUssdControlSupportedApiId, KErrNone, data); |
|
529 iMockLTSY.CompleteL(KMockLtsyDispatchSatUssdControlSupportedChangeIndId, KErrNone, data); //do a future indicator completion as well as this could happen at some point |
|
530 |
|
531 iMockLTSY.ExpectL(MLtsyDispatchSatGetSmsPpDownloadSupported::KLtsyDispatchSatGetSmsPpDownloadSupportedApiId); |
|
532 |
|
533 TBool smsPpDdlSupported = enable & KSmsPpDownloadEnabled; |
|
534 TMockLtsyData1<TBool> smsPpData(smsPpDdlSupported); |
|
535 data.Close(); |
|
536 smsPpData.SerialiseL(data); |
|
537 iMockLTSY.CompleteL(MLtsyDispatchSatGetSmsPpDownloadSupported::KLtsyDispatchSatGetSmsPpDownloadSupportedApiId, KErrNone, data); |
|
538 |
|
539 TRequestStatus reqStatus; |
|
540 iMockLTSY.NotifyTerminated(reqStatus); |
|
541 |
|
542 RSat sat; |
|
543 TInt ret = sat.Open(iPhone); |
|
544 ASSERT_EQUALS(ret, KErrNone); |
|
545 |
|
546 User::WaitForRequest(reqStatus); |
|
547 ASSERT_EQUALS(KErrNone, reqStatus.Int()); |
|
548 |
|
549 AssertMockLtsyStatusL(); |
|
550 CleanupStack::PopAndDestroy(2, &data); |
|
551 config.Reset(); |
|
552 } |
|
553 |
|
554 /** |
|
555 * @SYMTestCaseID BA-CTSYD-DIS-SAT-NEGATIVE-UN0006 |
|
556 * @SYMComponent telephony_ctsy |
|
557 * @SYMTestCaseDesc Test handing in CTSY dispatch when the MLtsyDispatchSatGetSmsPpDownloadSupported::KLtsyDispatchSatGetSmsPpDownloadSupportedApiId IPC is disabled |
|
558 * @SYMTestPriority High |
|
559 * @SYMTestActions Disable API, call API, check correct error returned |
|
560 * @SYMTestExpectedResults Pass |
|
561 * @SYMTestType CT |
|
562 */ |
|
563 void CCTsySatFUNegative::TestUnit0006L() |
|
564 { |
|
565 TConfig config; |
|
566 config.SetSupportedValue(MLtsyDispatchSatGetSmsPpDownloadSupported::KLtsyDispatchSatGetSmsPpDownloadSupportedApiId, EFalse); |
|
567 |
|
568 RBuf8 data; |
|
569 CleanupClosePushL(data); |
|
570 |
|
571 OpenEtelServerL(EUseExtendedError); |
|
572 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
573 OpenPhoneL(); |
|
574 |
|
575 TUint8 enable = KSmsMoControlEnabled | KSmsPpDownloadEnabled | KUssdEnabled; |
|
576 |
|
577 iMockLTSY.ExpectL(MLtsyDispatchSatGetSmsControlActivated::KLtsyDispatchSatGetSmsControlActivatedApiId); |
|
578 |
|
579 TBool smsMoControlActivated = enable & KSmsMoControlEnabled; |
|
580 TMockLtsyData1<TBool> comLtsyData(smsMoControlActivated); |
|
581 comLtsyData.SerialiseL(data); |
|
582 iMockLTSY.CompleteL(MLtsyDispatchSatGetSmsControlActivated::KLtsyDispatchSatGetSmsControlActivatedApiId, KErrNone, data); |
|
583 |
|
584 |
|
585 TUint8 pcmdCode = KPollInterval; |
|
586 TMockLtsyData1<TUint8> expLtsyData(pcmdCode); |
|
587 data.Close(); |
|
588 expLtsyData.SerialiseL(data); |
|
589 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
590 |
|
591 pcmdCode = KPollingOff; |
|
592 data.Close(); |
|
593 expLtsyData.SerialiseL(data); |
|
594 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
595 |
|
596 pcmdCode = KMoreTime; |
|
597 data.Close(); |
|
598 expLtsyData.SerialiseL(data); |
|
599 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
600 |
|
601 pcmdCode = KTimerManagement; |
|
602 data.Close(); |
|
603 expLtsyData.SerialiseL(data); |
|
604 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
605 |
|
606 iMockLTSY.ExpectL(MLtsyDispatchPhoneGetPhoneId::KLtsyDispatchPhoneGetPhoneIdApiId); |
|
607 |
|
608 _LIT(KSerialNumber, "12345678"); |
|
609 |
|
610 RMobilePhone::TMobilePhoneIdentityV1 phoneId; |
|
611 phoneId.iSerialNumber = KSerialNumber; |
|
612 |
|
613 TMockLtsyData1<RMobilePhone::TMobilePhoneIdentityV1> phoneIdData(phoneId); |
|
614 data.Close(); |
|
615 phoneIdData.SerialiseL(data); |
|
616 iMockLTSY.CompleteL(MLtsyDispatchPhoneGetPhoneId::KLtsyDispatchPhoneGetPhoneIdApiId, KErrNone, data); |
|
617 |
|
618 iMockLTSY.ExpectL(MLtsyDispatchSatGetDefaultBearerCapability::KLtsyDispatchSatGetDefaultBearerCapabilityApiId); |
|
619 |
|
620 TBuf8<KMaxLengthDefaultBearerData> bearerCapabilities(_L8("TEST BEARER!")); |
|
621 TDesC8* bearerCapabilitiesPtr = &bearerCapabilities; |
|
622 TMockLtsyData1<TDesC8*> bearerCapabilitiesData(bearerCapabilitiesPtr); |
|
623 data.Close(); |
|
624 bearerCapabilitiesData.SerialiseL(data); |
|
625 iMockLTSY.CompleteL(MLtsyDispatchSatGetDefaultBearerCapability::KLtsyDispatchSatGetDefaultBearerCapabilityApiId, KErrNone, data); |
|
626 |
|
627 iMockLTSY.ExpectL(MLtsyDispatchSatGetUssdControlSupported::KLtsyDispatchSatGetUssdControlSupportedApiId); |
|
628 |
|
629 TBool ussdSupported = enable & KUssdEnabled; |
|
630 TMockLtsyData1<TBool> ussdSupportedData(ussdSupported); |
|
631 data.Close(); |
|
632 ussdSupportedData.SerialiseL(data); |
|
633 iMockLTSY.CompleteL(MLtsyDispatchSatGetUssdControlSupported::KLtsyDispatchSatGetUssdControlSupportedApiId, KErrNone, data); |
|
634 iMockLTSY.CompleteL(KMockLtsyDispatchSatUssdControlSupportedChangeIndId, KErrNone, data); //do a future indicator completion as well as this could happen at some point |
|
635 |
|
636 iMockLTSY.ExpectL(MLtsyDispatchSatReady::KLtsyDispatchSatReadyApiId); |
|
637 iMockLTSY.CompleteL(MLtsyDispatchSatReady::KLtsyDispatchSatReadyApiId,KErrNone); |
|
638 |
|
639 TRequestStatus reqStatus; |
|
640 iMockLTSY.NotifyTerminated(reqStatus); |
|
641 |
|
642 RSat sat; |
|
643 TInt ret = sat.Open(iPhone); |
|
644 ASSERT_EQUALS(ret, KErrNone); |
|
645 |
|
646 User::WaitForRequest(reqStatus); |
|
647 ASSERT_EQUALS(KErrNone, reqStatus.Int()); |
|
648 |
|
649 AssertMockLtsyStatusL(); |
|
650 CleanupStack::PopAndDestroy(2, &data); |
|
651 config.Reset(); |
|
652 } |
|
653 |
|
654 /** |
|
655 * @SYMTestCaseID BA-CTSYD-DIS-SAT-NEGATIVE-UN0007 |
|
656 * @SYMComponent telephony_ctsy |
|
657 * @SYMTestCaseDesc Test handing in CTSY dispatch when the MLtsyDispatchSatMenuSelectionEnvelope::KLtsyDispatchSatMenuSelectionEnvelopeApiId IPC is disabled |
|
658 * @SYMTestPriority High |
|
659 * @SYMTestActions Disable API, call API, check correct error returned |
|
660 * @SYMTestExpectedResults Pass |
|
661 * @SYMTestType CT |
|
662 */ |
|
663 void CCTsySatFUNegative::TestUnit0007L() |
|
664 { |
|
665 TConfig config; |
|
666 config.SetSupportedValue(MLtsyDispatchSatMenuSelectionEnvelope::KLtsyDispatchSatMenuSelectionEnvelopeApiId, EFalse); |
|
667 |
|
668 OpenEtelServerL(EUseExtendedError); |
|
669 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
670 OpenPhoneL(); |
|
671 OpenSatL(); |
|
672 |
|
673 TRequestStatus reqStatus; |
|
674 |
|
675 const TUint8 KItemIdentifier1 = 77; |
|
676 RSat::TMenuSelectionV1 menuSelection; |
|
677 RSat::TMenuSelectionV1Pckg menuSelectionPckg(menuSelection); |
|
678 menuSelection.iItemId = KItemIdentifier1; |
|
679 menuSelection.iHelp = RSat::EHelpRequested; |
|
680 |
|
681 iSat.MenuSelection(reqStatus, menuSelectionPckg); |
|
682 User::WaitForRequest(reqStatus); |
|
683 ASSERT_EQUALS(reqStatus.Int(),KErrNotSupported); |
|
684 |
|
685 AssertMockLtsyStatusL(); |
|
686 CleanupStack::PopAndDestroy(this); // data, this |
|
687 config.Reset(); |
|
688 } |
|
689 |
|
690 /** |
|
691 * @SYMTestCaseID BA-CTSYD-DIS-SAT-NEGATIVE-UN0008 |
|
692 * @SYMComponent telephony_ctsy |
|
693 * @SYMTestCaseDesc Test handing in CTSY dispatch when the MLtsyDispatchSatGetIconData::KLtsyDispatchSatGetIconDataApiId IPC is disabled |
|
694 * @SYMTestPriority High |
|
695 * @SYMTestActions Disable API, call API, check correct error returned |
|
696 * @SYMTestExpectedResults Pass |
|
697 * @SYMTestType CT |
|
698 */ |
|
699 void CCTsySatFUNegative::TestUnit0008L() |
|
700 { |
|
701 TConfig config; |
|
702 config.SetSupportedValue(MLtsyDispatchSatGetIconData::KLtsyDispatchSatGetIconDataApiId, EFalse); |
|
703 |
|
704 OpenEtelServerL(EUseExtendedError); |
|
705 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
706 OpenPhoneL(); |
|
707 OpenSatL(); |
|
708 |
|
709 |
|
710 TRequestStatus reqStatus; |
|
711 RSat::TIcon retrievedIconEfImg; |
|
712 RSat::TIconId iconId; |
|
713 iconId.iIdentifier = 1; |
|
714 |
|
715 iSat.GetIcon(reqStatus,iconId.iIdentifier,retrievedIconEfImg); |
|
716 User::WaitForRequest(reqStatus); |
|
717 ASSERT_EQUALS(reqStatus.Int(),KErrNotSupported); |
|
718 |
|
719 AssertMockLtsyStatusL(); |
|
720 CleanupStack::PopAndDestroy(this); |
|
721 config.Reset(); |
|
722 } |
|
723 |
|
724 /** |
|
725 * @SYMTestCaseID BA-CTSYD-DIS-SAT-NEGATIVE-UN0009 |
|
726 * @SYMComponent telephony_ctsy |
|
727 * @SYMTestCaseDesc Test handing in CTSY dispatch when the MLtsyDispatchSatGetImageInstance::KLtsyDispatchSatGetImageInstanceApiId IPC is disabled |
|
728 * @SYMTestPriority High |
|
729 * @SYMTestActions Disable API, call API, check correct error returned |
|
730 * @SYMTestExpectedResults Pass |
|
731 * @SYMTestType CT |
|
732 */ |
|
733 void CCTsySatFUNegative::TestUnit0009L() |
|
734 { |
|
735 TConfig config; |
|
736 config.SetSupportedValue(MLtsyDispatchSatGetImageInstance::KLtsyDispatchSatGetImageInstanceApiId, EFalse); |
|
737 |
|
738 OpenEtelServerL(EUseExtendedError); |
|
739 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
740 OpenPhoneL(); |
|
741 OpenSatL(); |
|
742 RBuf8 getData; |
|
743 CleanupClosePushL(getData); |
|
744 |
|
745 RBuf8 retData; |
|
746 CleanupClosePushL(retData); |
|
747 |
|
748 TRequestStatus reqStatus; |
|
749 |
|
750 /******************************************Get Icon*******************************************************/ |
|
751 |
|
752 //Test to get a given Icons EF(Img) record |
|
753 |
|
754 //re-create the file path |
|
755 TBuf8<KFilePathLength> simFilePath(KFilePathLength); |
|
756 simFilePath[0] = 0x3F; //MF High byte |
|
757 simFilePath[1] = 0x00; //MF Low byte |
|
758 simFilePath[2] = 0x7F; //DF(Telecom) High byte |
|
759 simFilePath[3] = 0x10; //DF(Telecom) Low byte |
|
760 simFilePath[4] = 0x5F; //DF(Graphics) High byte |
|
761 simFilePath[5] = 0x50; //DF(Graphics) Low byte |
|
762 simFilePath[6] = 0x4F; //EF(Img) High byte |
|
763 simFilePath[7] = 0x20; //EF(Img) Low byte |
|
764 |
|
765 //a EF(Img) record to get |
|
766 const TUint8 KRecordNumber = 5; |
|
767 |
|
768 //create the down expect data |
|
769 TUint8 recordNumber = KRecordNumber; |
|
770 TDesC8* simFilePathPtr = &simFilePath; |
|
771 TMockLtsyData2<TUint8,TDesC8*> getIconData(recordNumber,simFilePathPtr); |
|
772 getIconData.SerialiseL(getData); |
|
773 |
|
774 //create a EF(Img) record |
|
775 const TUint KNoImagesLength = 1; |
|
776 const TUint KEfImgRecordLength = 9; |
|
777 |
|
778 RBuf8 iconEfRecordInstance; |
|
779 CleanupClosePushL(iconEfRecordInstance); |
|
780 iconEfRecordInstance.CreateMaxL(KEfImgRecordLength); |
|
781 |
|
782 const TUint8 KNumberOfImages = 1; |
|
783 |
|
784 const TUint16 KInstanceNumber = 1; |
|
785 const TUint16 KOffset = 1; |
|
786 const TUint16 KLength = 1; |
|
787 |
|
788 const TUint8 KWidth = 40; |
|
789 const TUint8 KHeight = 40; |
|
790 |
|
791 iconEfRecordInstance[0] = KWidth; //image instance width, expressed in raster image points |
|
792 iconEfRecordInstance[1] = KHeight; //image instance height, expressed in raster image points |
|
793 iconEfRecordInstance[2] = RSat::KBasic; //image coding scheme that has been used in encoding the image instance 11-basic, 21-colour |
|
794 iconEfRecordInstance[3] = KInstanceNumber >> KShiftBitsToGetMSB; //high byte of Image Instance File Identifier |
|
795 iconEfRecordInstance[4] = KInstanceNumber & 0xFF; //low byte of Image Instance File Identifier. |
|
796 iconEfRecordInstance[5] = KOffset >> KShiftBitsToGetMSB; //high byte of offset into Image Instance File |
|
797 iconEfRecordInstance[6] = KOffset & 0xFF; //low byte of offset into Image Instance File |
|
798 iconEfRecordInstance[7] = KLength >> KShiftBitsToGetMSB; //high byte of Image Instance Data length |
|
799 iconEfRecordInstance[8] = KLength & 0xFF; //low byte of Image Instance Data length |
|
800 |
|
801 RBuf8 iconEfImgData; |
|
802 CleanupClosePushL(iconEfImgData); |
|
803 iconEfImgData.CreateL(KNoImagesLength + KEfImgRecordLength); |
|
804 iconEfImgData.Append(KNumberOfImages); |
|
805 iconEfImgData.Append(iconEfRecordInstance); |
|
806 |
|
807 |
|
808 //create the up complete data |
|
809 TDesC8* iconDataPtr = &iconEfImgData; |
|
810 TMockLtsyData1<TDesC8*> retIconData(iconDataPtr); |
|
811 retIconData.SerialiseL(retData); |
|
812 |
|
813 //queue the MockLTSY expect completes |
|
814 iMockLTSY.ExpectL(MLtsyDispatchSatGetIconData::KLtsyDispatchSatGetIconDataApiId,getData); |
|
815 iMockLTSY.CompleteL(MLtsyDispatchSatGetIconData::KLtsyDispatchSatGetIconDataApiId, KErrNone, retData); |
|
816 |
|
817 // ETel Sat Calls |
|
818 RSat::TIcon retrievedIconEfImg; |
|
819 RSat::TIconId iconId; |
|
820 iconId.iIdentifier = KRecordNumber; |
|
821 |
|
822 iSat.GetIcon(reqStatus,iconId.iIdentifier,retrievedIconEfImg); |
|
823 User::WaitForRequest(reqStatus); |
|
824 ASSERT_EQUALS(reqStatus.Int(),KErrNone); |
|
825 ASSERT_TRUE(iconEfImgData == retrievedIconEfImg); |
|
826 |
|
827 AssertMockLtsyStatusL(); |
|
828 |
|
829 getData.Close(); |
|
830 retData.Close(); |
|
831 |
|
832 CleanupStack::PopAndDestroy(&iconEfImgData); |
|
833 CleanupStack::PopAndDestroy(&iconEfRecordInstance); |
|
834 |
|
835 /*************************************************************************************************/ |
|
836 |
|
837 /******************************************Get Image Instance*******************************************************/ |
|
838 |
|
839 //this is used in the CTSY to check against the retrieved icon EF(Img) record |
|
840 RSat::TInstanceInfoV3 instanceInfo; |
|
841 instanceInfo.iInstanceNumber = KInstanceNumber; |
|
842 instanceInfo.iLength = KLength; |
|
843 instanceInfo.iOffset = KOffset; |
|
844 instanceInfo.iCoding = RSat::KBasic; |
|
845 instanceInfo.iImgWidth = KWidth; |
|
846 instanceInfo.iImgHeight = KHeight; |
|
847 instanceInfo.iFileId = 0; //not used in the CTSY |
|
848 |
|
849 RSat::TInstanceInfoV3Pckg instanceInfoPackage1(instanceInfo); |
|
850 const TUint KIconDataLength = 2; |
|
851 |
|
852 RBuf8 retrievedImageinstance; |
|
853 CleanupClosePushL(retrievedImageinstance); |
|
854 retrievedImageinstance.CreateL(KIconDataLength + (KWidth * KHeight)); //the EF(IIDF) |
|
855 |
|
856 // ETel Sat Calls |
|
857 iSat.GetImageInstance(reqStatus, instanceInfoPackage1, retrievedImageinstance); |
|
858 User::WaitForRequest(reqStatus); |
|
859 ASSERT_EQUALS(reqStatus.Int(),KErrNotSupported); |
|
860 |
|
861 AssertMockLtsyStatusL(); |
|
862 |
|
863 getData.Close(); |
|
864 retData.Close(); |
|
865 |
|
866 CleanupStack::PopAndDestroy(&retrievedImageinstance); |
|
867 |
|
868 CleanupStack::PopAndDestroy(&retData); |
|
869 CleanupStack::PopAndDestroy(&getData); |
|
870 CleanupStack::PopAndDestroy(this); |
|
871 config.Reset(); |
|
872 } |
|
873 |
|
874 /** |
|
875 * @SYMTestCaseID BA-CTSYD-DIS-SAT-NEGATIVE-UN0010 |
|
876 * @SYMComponent telephony_ctsy |
|
877 * @SYMTestCaseDesc Test handing in CTSY dispatch when the MLtsyDispatchSatGetClut::KLtsyDispatchSatGetClutApiId IPC is disabled |
|
878 * @SYMTestPriority High |
|
879 * @SYMTestActions Disable API, call API, check correct error returned |
|
880 * @SYMTestExpectedResults Pass |
|
881 * @SYMTestType CT |
|
882 */ |
|
883 void CCTsySatFUNegative::TestUnit0010L() |
|
884 { |
|
885 TConfig config; |
|
886 config.SetSupportedValue(MLtsyDispatchSatGetClut::KLtsyDispatchSatGetClutApiId, EFalse); |
|
887 |
|
888 OpenEtelServerL(EUseExtendedError); |
|
889 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
890 OpenPhoneL(); |
|
891 OpenSatL(); |
|
892 RBuf8 getData; |
|
893 CleanupClosePushL(getData); |
|
894 |
|
895 RBuf8 retData; |
|
896 CleanupClosePushL(retData); |
|
897 |
|
898 TRequestStatus reqStatus; |
|
899 |
|
900 /******************************************Get Icon*******************************************************/ |
|
901 |
|
902 //Test to get a given Icons EF(Img) record |
|
903 |
|
904 //re-create the file path |
|
905 TBuf8<KFilePathLength> simFilePath(KFilePathLength); |
|
906 simFilePath[0] = 0x3F; //MF High byte |
|
907 simFilePath[1] = 0x00; //MF Low byte |
|
908 simFilePath[2] = 0x7F; //DF(Telecom) High byte |
|
909 simFilePath[3] = 0x10; //DF(Telecom) Low byte |
|
910 simFilePath[4] = 0x5F; //DF(Graphics) High byte |
|
911 simFilePath[5] = 0x50; //DF(Graphics) Low byte |
|
912 simFilePath[6] = 0x4F; //EF(Img) High byte |
|
913 simFilePath[7] = 0x20; //EF(Img) Low byte |
|
914 |
|
915 //a EF(Img) record to get |
|
916 const TUint8 KRecordNumber = 5; |
|
917 |
|
918 //create the down expect data |
|
919 TUint8 recordNumber = KRecordNumber; |
|
920 TDesC8* simFilePathPtr = &simFilePath; |
|
921 TMockLtsyData2<TUint8,TDesC8*> getIconData(recordNumber,simFilePathPtr); |
|
922 getIconData.SerialiseL(getData); |
|
923 |
|
924 //create a EF(Img) record |
|
925 const TUint KNoImagesLength = 1; |
|
926 const TUint KEfImgRecordLength = 9; |
|
927 |
|
928 RBuf8 iconEfRecordInstance; |
|
929 CleanupClosePushL(iconEfRecordInstance); |
|
930 iconEfRecordInstance.CreateMaxL(KEfImgRecordLength); |
|
931 |
|
932 const TUint8 KNumberOfImages = 1; |
|
933 |
|
934 const TUint16 KInstanceNumber = 1; |
|
935 const TUint16 KOffset = 1; |
|
936 const TUint16 KLength = 1; |
|
937 |
|
938 const TUint8 KWidth = 40; |
|
939 const TUint8 KHeight = 40; |
|
940 |
|
941 iconEfRecordInstance[0] = KWidth; //image instance width, expressed in raster image points |
|
942 iconEfRecordInstance[1] = KHeight; //image instance height, expressed in raster image points |
|
943 iconEfRecordInstance[2] = RSat::KBasic; //image coding scheme that has been used in encoding the image instance 11-basic, 21-colour |
|
944 iconEfRecordInstance[3] = KInstanceNumber >> KShiftBitsToGetMSB; //high byte of Image Instance File Identifier |
|
945 iconEfRecordInstance[4] = KInstanceNumber & 0xFF; //low byte of Image Instance File Identifier. |
|
946 iconEfRecordInstance[5] = KOffset >> KShiftBitsToGetMSB; //high byte of offset into Image Instance File |
|
947 iconEfRecordInstance[6] = KOffset & 0xFF; //low byte of offset into Image Instance File |
|
948 iconEfRecordInstance[7] = KLength >> KShiftBitsToGetMSB; //high byte of Image Instance Data length |
|
949 iconEfRecordInstance[8] = KLength & 0xFF; //low byte of Image Instance Data length |
|
950 |
|
951 RBuf8 iconEfImgData; |
|
952 CleanupClosePushL(iconEfImgData); |
|
953 iconEfImgData.CreateL(KNoImagesLength + KEfImgRecordLength); |
|
954 iconEfImgData.Append(KNumberOfImages); |
|
955 iconEfImgData.Append(iconEfRecordInstance); |
|
956 |
|
957 |
|
958 //create the up complete data |
|
959 TDesC8* iconDataPtr = &iconEfImgData; |
|
960 TMockLtsyData1<TDesC8*> retIconData(iconDataPtr); |
|
961 retIconData.SerialiseL(retData); |
|
962 |
|
963 //queue the MockLTSY expect completes |
|
964 iMockLTSY.ExpectL(MLtsyDispatchSatGetIconData::KLtsyDispatchSatGetIconDataApiId,getData); |
|
965 iMockLTSY.CompleteL(MLtsyDispatchSatGetIconData::KLtsyDispatchSatGetIconDataApiId, KErrNone, retData); |
|
966 |
|
967 // ETel Sat Calls |
|
968 RSat::TIcon retrievedIconEfImg; |
|
969 RSat::TIconId iconId; |
|
970 iconId.iIdentifier = KRecordNumber; |
|
971 |
|
972 iSat.GetIcon(reqStatus,iconId.iIdentifier,retrievedIconEfImg); |
|
973 User::WaitForRequest(reqStatus); |
|
974 ASSERT_EQUALS(reqStatus.Int(),KErrNone); |
|
975 ASSERT_TRUE(iconEfImgData == retrievedIconEfImg); |
|
976 |
|
977 AssertMockLtsyStatusL(); |
|
978 |
|
979 getData.Close(); |
|
980 retData.Close(); |
|
981 |
|
982 CleanupStack::PopAndDestroy(&iconEfImgData); |
|
983 CleanupStack::PopAndDestroy(&iconEfRecordInstance); |
|
984 |
|
985 /*************************************************************************************************/ |
|
986 |
|
987 /******************************************Get Image Instance*******************************************************/ |
|
988 |
|
989 // Test to get a given instance of an icons EF(IIDF) |
|
990 |
|
991 // The Client should have read the icon EF before reading the image instance. |
|
992 // The contents of the icon EF indicate the size of the image instance, |
|
993 // the Client should use this information to allocate a buffer size that it requires |
|
994 // and pass a reference to is as a TDes8& |
|
995 |
|
996 //create the down expect data |
|
997 TUint8 imageInstanceNumberInRecord = KNumberOfImages - KInstanceNumber + 1; |
|
998 TMockLtsyData2<TUint8,TUint8> getImageInstanceData(recordNumber,imageInstanceNumberInRecord); |
|
999 getImageInstanceData.SerialiseL(getData); |
|
1000 |
|
1001 RBuf8 imageInstanceData; |
|
1002 CleanupClosePushL(imageInstanceData); |
|
1003 |
|
1004 RBuf8 imageInstanceBody; |
|
1005 CleanupClosePushL(imageInstanceBody); |
|
1006 |
|
1007 //A basic image data |
|
1008 const TUint KIconDataLength = 2; |
|
1009 imageInstanceData.CreateMaxL(KIconDataLength); |
|
1010 imageInstanceData[0] = retrievedIconEfImg[KNoImagesLength + 1]; //i.e. KWidth; |
|
1011 imageInstanceData[1] = retrievedIconEfImg[KNoImagesLength + 2]; //i.e. KHeight; |
|
1012 |
|
1013 //The image body |
|
1014 imageInstanceBody.CreateMaxL(KWidth * KHeight); |
|
1015 |
|
1016 //fill with any data (just for testing) |
|
1017 for(TInt i = 0; i < imageInstanceBody.Length(); ++i) |
|
1018 { |
|
1019 imageInstanceBody[i] = i; |
|
1020 } |
|
1021 |
|
1022 TDesC8* imageInstanceDataPtr = &imageInstanceData; |
|
1023 TDesC8* imageInstanceBodyPtr = &imageInstanceBody; |
|
1024 |
|
1025 TMockLtsyData2<TDesC8*,TDesC8*> retImageInstanceData(imageInstanceDataPtr,imageInstanceBodyPtr); |
|
1026 retImageInstanceData.SerialiseL(retData); |
|
1027 |
|
1028 //queue the MockLTSY expect completes |
|
1029 iMockLTSY.ExpectL(MLtsyDispatchSatGetImageInstance::KLtsyDispatchSatGetImageInstanceApiId,getData); |
|
1030 iMockLTSY.CompleteL(MLtsyDispatchSatGetImageInstance::KLtsyDispatchSatGetImageInstanceApiId, KErrNone, retData); |
|
1031 |
|
1032 //this is used in the CTSY to check against the retrieved icon EF(Img) record |
|
1033 RSat::TInstanceInfoV3 instanceInfo; |
|
1034 instanceInfo.iInstanceNumber = KInstanceNumber; |
|
1035 instanceInfo.iLength = KLength; |
|
1036 instanceInfo.iOffset = KOffset; |
|
1037 instanceInfo.iCoding = RSat::KBasic; |
|
1038 instanceInfo.iImgWidth = KWidth; |
|
1039 instanceInfo.iImgHeight = KHeight; |
|
1040 instanceInfo.iFileId = 0; //not used in the CTSY |
|
1041 |
|
1042 RSat::TInstanceInfoV3Pckg instanceInfoPackage1(instanceInfo); |
|
1043 |
|
1044 RBuf8 retrievedImageinstance; |
|
1045 CleanupClosePushL(retrievedImageinstance); |
|
1046 retrievedImageinstance.CreateL(KIconDataLength + (KWidth * KHeight)); //the EF(IIDF) |
|
1047 |
|
1048 // ETel Sat Calls |
|
1049 iSat.GetImageInstance(reqStatus, instanceInfoPackage1, retrievedImageinstance); |
|
1050 User::WaitForRequest(reqStatus); |
|
1051 ASSERT_EQUALS(reqStatus.Int(),KErrNone); |
|
1052 ASSERT_TRUE(retrievedImageinstance.Mid(0,KIconDataLength) == imageInstanceData); |
|
1053 ASSERT_TRUE(retrievedImageinstance.Mid(KIconDataLength) == imageInstanceBody); |
|
1054 |
|
1055 AssertMockLtsyStatusL(); |
|
1056 |
|
1057 getData.Close(); |
|
1058 retData.Close(); |
|
1059 |
|
1060 CleanupStack::PopAndDestroy(&retrievedImageinstance); |
|
1061 CleanupStack::PopAndDestroy(&imageInstanceBody); |
|
1062 CleanupStack::PopAndDestroy(&imageInstanceData); |
|
1063 |
|
1064 /*************************************************************************************************/ |
|
1065 |
|
1066 /******************************************Get Image Instance*************************************/ |
|
1067 |
|
1068 |
|
1069 const TUint KGetClutOffset = 0; //Unused in the CTSY |
|
1070 |
|
1071 // ETel Sat Calls |
|
1072 const TUint KClutLength = 24; |
|
1073 TBuf8<KClutLength> retrievedClut; |
|
1074 iSat.GetClut(reqStatus, KInstanceNumber, KGetClutOffset, retrievedClut); |
|
1075 User::WaitForRequest(reqStatus); |
|
1076 ASSERT_EQUALS(reqStatus.Int(),KErrNotSupported); |
|
1077 |
|
1078 AssertMockLtsyStatusL(); |
|
1079 |
|
1080 getData.Close(); |
|
1081 retData.Close(); |
|
1082 |
|
1083 /*************************************************************************************************/ |
|
1084 |
|
1085 CleanupStack::PopAndDestroy(&retData); |
|
1086 CleanupStack::PopAndDestroy(&getData); |
|
1087 CleanupStack::PopAndDestroy(this); |
|
1088 config.Reset(); |
|
1089 } |
|
1090 |
|
1091 /** |
|
1092 * @SYMTestCaseID BA-CTSYD-DIS-SAT-NEGATIVE-UN0011 |
|
1093 * @SYMComponent telephony_ctsy |
|
1094 * @SYMTestCaseDesc Test handing in CTSY dispatch when the MLtsyDispatchSatEventDownloadEnvelope::KLtsyDispatchSatEventDownloadEnvelopeApiId IPC is disabled |
|
1095 * @SYMTestPriority High |
|
1096 * @SYMTestActions Disable API, call API, check correct error returned |
|
1097 * @SYMTestExpectedResults Pass |
|
1098 * @SYMTestType CT |
|
1099 */ |
|
1100 void CCTsySatFUNegative::TestUnit0011L() |
|
1101 { |
|
1102 TConfig config; |
|
1103 config.SetSupportedValue(MLtsyDispatchSatEventDownloadEnvelope::KLtsyDispatchSatEventDownloadEnvelopeApiId, EFalse); |
|
1104 |
|
1105 OpenEtelServerL(EUseExtendedError); |
|
1106 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
1107 OpenPhoneL(); |
|
1108 OpenSatL(); |
|
1109 |
|
1110 const TUint8 KPCommandNumber = 123; |
|
1111 |
|
1112 SetupEventListL(KPCommandNumber,KEventUserActivity); |
|
1113 |
|
1114 //ETel calls event download |
|
1115 RSat::TEventDownloadBaseV2 eventDownload; |
|
1116 RSat::TEventDownloadBaseV2Pckg eventDownloadPck(eventDownload); |
|
1117 RSat::TEventList eventList = RSat::KUserActivity; |
|
1118 |
|
1119 TRequestStatus reqStatus; |
|
1120 iSat.EventDownload(reqStatus, eventList, eventDownloadPck); // No associated data |
|
1121 |
|
1122 User::WaitForRequest(reqStatus); |
|
1123 ASSERT_EQUALS(reqStatus.Int(), KErrNotSupported); |
|
1124 |
|
1125 AssertMockLtsyStatusL(); |
|
1126 CleanupStack::PopAndDestroy(this); |
|
1127 config.Reset(); |
|
1128 } |
|
1129 |
|
1130 |
|
1131 /** |
|
1132 * @SYMTestCaseID BA-CTSYD-DIS-SAT-NEGATIVE-UN0013 |
|
1133 * @SYMComponent telephony_ctsy |
|
1134 * @SYMTestCaseDesc Test handing in CTSY dispatch when the MLtsyDispatchSmsSendSatSms::KLtsyDispatchSmsSendSatSmsApiId IPC is disabled |
|
1135 * @SYMTestPriority High |
|
1136 * @SYMTestActions Disable API, call API, check correct error returned |
|
1137 * @SYMTestExpectedResults Pass |
|
1138 * @SYMTestType CT |
|
1139 */ |
|
1140 void CCTsySatFUNegative::TestUnit0013L() |
|
1141 { |
|
1142 TConfig config; |
|
1143 config.SetSupportedValue(MLtsyDispatchSmsSendSatSms::KLtsyDispatchSmsSendSatSmsApiId, EFalse); |
|
1144 |
|
1145 OpenEtelServerL(EUseExtendedError); |
|
1146 |
|
1147 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
1148 OpenPhoneL(); |
|
1149 OpenSatL(KSmsMoControlEnabled); |
|
1150 |
|
1151 //setup local info as this is appended to the MO SHORT MESSAGE CONTROL ENVELOPE |
|
1152 SetupLocalInfoL(KLocationAreaCode,KCellId,KOperatorCode,KLocationStatusNormalService); |
|
1153 |
|
1154 |
|
1155 RBuf8 data; |
|
1156 CleanupClosePushL(data); |
|
1157 |
|
1158 TRequestStatus reqStatus; |
|
1159 TRequestStatus sendMessageReqStatus; |
|
1160 TRequestStatus moSmControlRequestReqStatus; |
|
1161 |
|
1162 //send a Sm proactive command |
|
1163 TUint8 pcmdCode = KSendShortMessage; |
|
1164 TMockLtsyData1<TUint8> expPCmdNotificationLtsyData(pcmdCode); |
|
1165 expPCmdNotificationLtsyData.SerialiseL(data); |
|
1166 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
1167 expPCmdNotificationLtsyData.Close(); |
|
1168 |
|
1169 |
|
1170 const TUint8 KPCmdNumber = 123; |
|
1171 const TUint8 KCommandQualifier = 0; //0 = packing not required, 1 = SMS packing by the ME required. |
|
1172 |
|
1173 TTlv tlv; |
|
1174 tlv.Begin(KBerTlvProactiveSimCommandTag); |
|
1175 |
|
1176 tlv.AddTag(KTlvCommandDetailsTag); |
|
1177 tlv.AddByte(KPCmdNumber);//ETLV_CommandNumber |
|
1178 tlv.AddByte(KSendShortMessage); //ETLV_TypeOfCommand |
|
1179 tlv.AddByte(KCommandQualifier); // 0 = packing not required, 1 = SMS packing by the ME required. |
|
1180 |
|
1181 tlv.AddTag(KTlvDeviceIdentityTag); |
|
1182 tlv.AddByte(KSim); |
|
1183 tlv.AddByte(KMe); |
|
1184 |
|
1185 _LIT8(KAlphaId8,"Text To Display"); |
|
1186 _LIT16(KAlphaId16,"Text To Display"); |
|
1187 tlv.AddTag(KTlvAlphaIdentifierTag); |
|
1188 tlv.AddData(KAlphaId8); |
|
1189 |
|
1190 tlv.AddTag(KTlvAddressTag); |
|
1191 tlv.AddByte(0); //Ton NPI |
|
1192 tlv.AddData(_L8("Number")); |
|
1193 |
|
1194 |
|
1195 TUint8 tpduProtocolByte = 0; |
|
1196 |
|
1197 tpduProtocolByte |= 0x01 << 0;//TP Message Type Indicator, bit 0-1 - SMS SUBMIT |
|
1198 tpduProtocolByte |= 0x00 << 2;//TP Reject Duplicates, bit 2 - Instruct the SC to accept an SMS SUBMIT for an SM still held in the |
|
1199 //SC which has the same TP MR and the same TP DA as a previously submitted SM from the same OA. |
|
1200 tpduProtocolByte |= 0x00 << 3; //TP Validity Period Format, bit 3-4 - TP VP field not present |
|
1201 tpduProtocolByte |= 0x00 << 5; //TP Status Report Request, bit 5 - A status report is not requested |
|
1202 tpduProtocolByte |= 0x00 << 6; //TP User Data Header Indicator, bit 6 - The TP UD field contains only the short message |
|
1203 tpduProtocolByte |= 0x00 << 7; //TP Reply Path, bit 7- TP Reply Path parameter is not set in this SMS SUBMIT/DELIVER |
|
1204 |
|
1205 const TUint8 KProtocolIdentifier = 0x7F; //SmsTpduProtcolIdUSimDdl Parameters(1)+TP-OA(min 2)+TP-PID(1)+DCS(1)+TP-SCTS(7)+TP-UDL(2)+TP-UD(?) |
|
1206 const TUint8 KDataCodingScheme = 0x02; //TP Data Coding Scheme (TP DCS) |
|
1207 |
|
1208 TTpdu tpdu; |
|
1209 tpdu.Append(tpduProtocolByte); |
|
1210 |
|
1211 _LIT8(KOriginatingAddress,"1234567"); |
|
1212 tpdu.Append(KOriginatingAddress().Length() * 2); //Number of octets |
|
1213 tpdu.Append(0); //Type of address |
|
1214 tpdu.Append(KOriginatingAddress()); |
|
1215 tpdu.Append(KProtocolIdentifier); //TP Protocol Identifier |
|
1216 tpdu.Append(KDataCodingScheme); //TP Data Coding Scheme (TP DCS) |
|
1217 tpdu.Append(_L8("1234567")); //TP Service Centre Time Stamp |
|
1218 |
|
1219 _LIT8(KUserData,"User Data"); |
|
1220 tpdu.Append(KUserData().Length()); //TP User Data Length |
|
1221 tpdu.Append(KUserData()); //TP User Data |
|
1222 |
|
1223 tlv.AddTag(KTlvSmsTpduTag); |
|
1224 tlv.AddData(tpdu); |
|
1225 |
|
1226 TDesC8* tlvDscPtr = &const_cast<TDesC8&>(tlv.End()); |
|
1227 TMockLtsyData1<TDesC8*> tlvDscPack(tlvDscPtr); |
|
1228 tlvDscPack.SerialiseL(data); |
|
1229 iMockLTSY.CompleteL(KMockLtsyDispatchSatPcmdIndId,KErrNone,data); |
|
1230 data.Close(); |
|
1231 |
|
1232 RSat::TSendSmV1 sendSm; |
|
1233 RSat::TSendSmV1Pckg sendSmPckg(sendSm); |
|
1234 iSat.NotifySendSmPCmd(reqStatus,sendSmPckg); |
|
1235 |
|
1236 User::WaitForRequest(reqStatus); |
|
1237 ASSERT_EQUALS(reqStatus.Int(),KErrNone); |
|
1238 ASSERT_EQUALS(sendSm.PCmdNumber(),KPCmdNumber); |
|
1239 ASSERT_EQUALS(sendSm.iAlphaId.iStatus,RSat::EAlphaIdProvided); |
|
1240 ASSERT_TRUE(sendSm.iAlphaId.iAlphaId == KAlphaId16); |
|
1241 ASSERT_TRUE(sendSm.iSmsTpdu == tpdu); |
|
1242 |
|
1243 _LIT8(KServiceCentreNumber,"123456789"); |
|
1244 |
|
1245 const RSat::TTypeOfNumber KSatTon = RSat::ENetworkSpecificNumber; |
|
1246 const RSat::TNumberingPlan KSatNpi = RSat::EPrivateNumberPlan; |
|
1247 |
|
1248 RSat::TSatSmsV1 satSms; |
|
1249 RSat::TSatSmsV1Pckg satSmsPckg(satSms); |
|
1250 satSms.iBuf = sendSm.iSmsTpdu; |
|
1251 satSms.iServiceCenter.iTelNumber.Copy(KServiceCentreNumber); |
|
1252 satSms.iServiceCenter.iTypeOfNumber = KSatTon; |
|
1253 satSms.iServiceCenter.iNumberPlan = KSatNpi; |
|
1254 |
|
1255 RSat::TMoSmControlV1 moSmsControl; |
|
1256 RSat::TMoSmControlV1Pckg moSmsControlPckg(moSmsControl); |
|
1257 iSat.NotifyMoSmControlRequest(moSmControlRequestReqStatus,moSmsControlPckg); |
|
1258 |
|
1259 |
|
1260 TUint16 msgRef; |
|
1261 iSat.SendMessageNoLogging(sendMessageReqStatus,satSmsPckg,msgRef); |
|
1262 |
|
1263 User::WaitForRequest(sendMessageReqStatus); |
|
1264 ASSERT_EQUALS(sendMessageReqStatus.Int(),KErrNotSupported); |
|
1265 |
|
1266 //generate the terminal response to the send sms proactive command. |
|
1267 |
|
1268 CleanupStack::PopAndDestroy(&data); |
|
1269 CleanupStack::PopAndDestroy(this); |
|
1270 |
|
1271 |
|
1272 config.Reset(); |
|
1273 } |
|
1274 |
|
1275 /** |
|
1276 * @SYMTestCaseID BA-CTSYD-DIS-SAT-NEGATIVE-UN0014 |
|
1277 * @SYMComponent telephony_ctsy |
|
1278 * @SYMTestCaseDesc Test handing in CTSY dispatch when the MLtsyDispatchSatCallAndSmsControlEnvelope::KLtsyDispatchSatCallAndSmsControlEnvelopeApiId IPC is disabled |
|
1279 * @SYMTestPriority High |
|
1280 * @SYMTestActions Disable API, call API, check correct error returned |
|
1281 * @SYMTestExpectedResults Pass |
|
1282 * @SYMTestType CT |
|
1283 */ |
|
1284 void CCTsySatFUNegative::TestUnit0014L() |
|
1285 { |
|
1286 TConfig config; |
|
1287 config.SetSupportedValue(MLtsyDispatchSatCallAndSmsControlEnvelope::KLtsyDispatchSatCallAndSmsControlEnvelopeApiId, EFalse); |
|
1288 |
|
1289 OpenEtelServerL(EUseExtendedError); |
|
1290 |
|
1291 CleanupStack::PushL(TCleanupItem(Cleanup,this)); |
|
1292 OpenPhoneL(); |
|
1293 OpenSatL(KSmsMoControlEnabled); |
|
1294 |
|
1295 //setup local info as this is appended to the MO SHORT MESSAGE CONTROL ENVELOPE |
|
1296 SetupLocalInfoL(KLocationAreaCode,KCellId,KOperatorCode,KLocationStatusNormalService); |
|
1297 |
|
1298 |
|
1299 RBuf8 data; |
|
1300 CleanupClosePushL(data); |
|
1301 |
|
1302 TRequestStatus reqStatus; |
|
1303 TRequestStatus sendMessageReqStatus; |
|
1304 TRequestStatus moSmControlRequestReqStatus; |
|
1305 |
|
1306 //send a Sm proactive command |
|
1307 TUint8 pcmdCode = KSendShortMessage; |
|
1308 TMockLtsyData1<TUint8> expPCmdNotificationLtsyData(pcmdCode); |
|
1309 expPCmdNotificationLtsyData.SerialiseL(data); |
|
1310 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
1311 expPCmdNotificationLtsyData.Close(); |
|
1312 |
|
1313 |
|
1314 const TUint8 KPCmdNumber = 123; |
|
1315 const TUint8 KCommandQualifier = 0; //0 = packing not required, 1 = SMS packing by the ME required. |
|
1316 |
|
1317 TTlv tlv; |
|
1318 tlv.Begin(KBerTlvProactiveSimCommandTag); |
|
1319 |
|
1320 tlv.AddTag(KTlvCommandDetailsTag); |
|
1321 tlv.AddByte(KPCmdNumber);//ETLV_CommandNumber |
|
1322 tlv.AddByte(KSendShortMessage); //ETLV_TypeOfCommand |
|
1323 tlv.AddByte(KCommandQualifier); // 0 = packing not required, 1 = SMS packing by the ME required. |
|
1324 |
|
1325 tlv.AddTag(KTlvDeviceIdentityTag); |
|
1326 tlv.AddByte(KSim); |
|
1327 tlv.AddByte(KMe); |
|
1328 |
|
1329 _LIT8(KAlphaId8,"Text To Display"); |
|
1330 _LIT16(KAlphaId16,"Text To Display"); |
|
1331 tlv.AddTag(KTlvAlphaIdentifierTag); |
|
1332 tlv.AddData(KAlphaId8); |
|
1333 |
|
1334 tlv.AddTag(KTlvAddressTag); |
|
1335 tlv.AddByte(0); //Ton NPI |
|
1336 tlv.AddData(_L8("Number")); |
|
1337 |
|
1338 |
|
1339 TUint8 tpduProtocolByte = 0; |
|
1340 |
|
1341 tpduProtocolByte |= 0x01 << 0;//TP Message Type Indicator, bit 0-1 - SMS SUBMIT |
|
1342 tpduProtocolByte |= 0x00 << 2;//TP Reject Duplicates, bit 2 - Instruct the SC to accept an SMS SUBMIT for an SM still held in the |
|
1343 //SC which has the same TP MR and the same TP DA as a previously submitted SM from the same OA. |
|
1344 tpduProtocolByte |= 0x00 << 3; //TP Validity Period Format, bit 3-4 - TP VP field not present |
|
1345 tpduProtocolByte |= 0x00 << 5; //TP Status Report Request, bit 5 - A status report is not requested |
|
1346 tpduProtocolByte |= 0x00 << 6; //TP User Data Header Indicator, bit 6 - The TP UD field contains only the short message |
|
1347 tpduProtocolByte |= 0x00 << 7; //TP Reply Path, bit 7- TP Reply Path parameter is not set in this SMS SUBMIT/DELIVER |
|
1348 |
|
1349 const TUint8 KProtocolIdentifier = 0x7F; //SmsTpduProtcolIdUSimDdl Parameters(1)+TP-OA(min 2)+TP-PID(1)+DCS(1)+TP-SCTS(7)+TP-UDL(2)+TP-UD(?) |
|
1350 const TUint8 KDataCodingScheme = 0x02; //TP Data Coding Scheme (TP DCS) |
|
1351 |
|
1352 TTpdu tpdu; |
|
1353 tpdu.Append(tpduProtocolByte); |
|
1354 |
|
1355 _LIT8(KOriginatingAddress,"1234567"); |
|
1356 tpdu.Append(KOriginatingAddress().Length() * 2); //Number of octets |
|
1357 tpdu.Append(0); //Type of address |
|
1358 tpdu.Append(KOriginatingAddress()); |
|
1359 tpdu.Append(KProtocolIdentifier); //TP Protocol Identifier |
|
1360 tpdu.Append(KDataCodingScheme); //TP Data Coding Scheme (TP DCS) |
|
1361 tpdu.Append(_L8("1234567")); //TP Service Centre Time Stamp |
|
1362 |
|
1363 _LIT8(KUserData,"User Data"); |
|
1364 tpdu.Append(KUserData().Length()); //TP User Data Length |
|
1365 tpdu.Append(KUserData()); //TP User Data |
|
1366 |
|
1367 tlv.AddTag(KTlvSmsTpduTag); |
|
1368 tlv.AddData(tpdu); |
|
1369 |
|
1370 TDesC8* tlvDscPtr = &const_cast<TDesC8&>(tlv.End()); |
|
1371 TMockLtsyData1<TDesC8*> tlvDscPack(tlvDscPtr); |
|
1372 tlvDscPack.SerialiseL(data); |
|
1373 iMockLTSY.CompleteL(KMockLtsyDispatchSatPcmdIndId,KErrNone,data); |
|
1374 data.Close(); |
|
1375 |
|
1376 RSat::TSendSmV1 sendSm; |
|
1377 RSat::TSendSmV1Pckg sendSmPckg(sendSm); |
|
1378 iSat.NotifySendSmPCmd(reqStatus,sendSmPckg); |
|
1379 |
|
1380 User::WaitForRequest(reqStatus); |
|
1381 ASSERT_EQUALS(reqStatus.Int(),KErrNone); |
|
1382 ASSERT_EQUALS(sendSm.PCmdNumber(),KPCmdNumber); |
|
1383 ASSERT_EQUALS(sendSm.iAlphaId.iStatus,RSat::EAlphaIdProvided); |
|
1384 ASSERT_TRUE(sendSm.iAlphaId.iAlphaId == KAlphaId16); |
|
1385 ASSERT_TRUE(sendSm.iSmsTpdu == tpdu); |
|
1386 |
|
1387 _LIT8(KServiceCentreNumber,"123456789"); |
|
1388 |
|
1389 const RMobilePhone::TMobileTON KMobilePhoneTon = RMobilePhone::ENetworkSpecificNumber; |
|
1390 const RSat::TTypeOfNumber KSatTon = RSat::ENetworkSpecificNumber; |
|
1391 const RMobilePhone::TMobileNPI KMobilePhoneNpi = RMobilePhone::EPrivateNumberPlan; |
|
1392 const RSat::TNumberingPlan KSatNpi = RSat::EPrivateNumberPlan; |
|
1393 |
|
1394 RMobileSmsMessaging::TMobileSmsSendAttributesV1 smsSendAttributes; |
|
1395 smsSendAttributes.iFlags = (RMobileSmsMessaging::KSmsDataFormat | RMobileSmsMessaging::KGsmServiceCentre | RMobileSmsMessaging::KMoreToSend); |
|
1396 smsSendAttributes.iDataFormat = RMobileSmsMessaging::EFormatGsmTpdu; |
|
1397 smsSendAttributes.iGsmServiceCentre.iTelNumber.Copy(KServiceCentreNumber); |
|
1398 smsSendAttributes.iGsmServiceCentre.iTypeOfNumber = KMobilePhoneTon; |
|
1399 smsSendAttributes.iGsmServiceCentre.iNumberPlan = KMobilePhoneNpi; |
|
1400 smsSendAttributes.iMore = EFalse; //set False in CSatTsy::SendMessageNoLogging |
|
1401 |
|
1402 TDesC8* tpduPtr = &tpdu; |
|
1403 TMockLtsyData4< TDesC8*, |
|
1404 RMobileSmsMessaging::TMobileSmsDataFormat, |
|
1405 RMobilePhone::TMobileAddress, |
|
1406 TBool |
|
1407 > sendMessagePack(tpduPtr, smsSendAttributes.iDataFormat, smsSendAttributes.iGsmServiceCentre, smsSendAttributes.iMore); |
|
1408 sendMessagePack.SerialiseL(data); |
|
1409 iMockLTSY.ExpectL(MLtsyDispatchSmsSendSatSms::KLtsyDispatchSmsSendSatSmsApiId,data); |
|
1410 data.Close(); |
|
1411 |
|
1412 RSat::TSatSmsV1 satSms; |
|
1413 RSat::TSatSmsV1Pckg satSmsPckg(satSms); |
|
1414 satSms.iBuf = sendSm.iSmsTpdu; |
|
1415 satSms.iServiceCenter.iTelNumber.Copy(KServiceCentreNumber); |
|
1416 satSms.iServiceCenter.iTypeOfNumber = KSatTon; |
|
1417 satSms.iServiceCenter.iNumberPlan = KSatNpi; |
|
1418 |
|
1419 RSat::TMoSmControlV1 moSmsControl; |
|
1420 RSat::TMoSmControlV1Pckg moSmsControlPckg(moSmsControl); |
|
1421 iSat.NotifyMoSmControlRequest(moSmControlRequestReqStatus,moSmsControlPckg); |
|
1422 |
|
1423 |
|
1424 TUint16 msgRef; |
|
1425 iSat.SendMessageNoLogging(sendMessageReqStatus,satSmsPckg,msgRef); |
|
1426 |
|
1427 |
|
1428 //indicator up from the CTSY to create a Mo Short Message Envelope |
|
1429 //LTSY -> CTSY |
|
1430 |
|
1431 //Type of Number (TON) and numbering plan identification (NPI). |
|
1432 //MSB - 1, Type of Number - 011 (Network Specific Number), Numbering Plan - 1001 (Private numbering plan) 10111001 = B9 Hex |
|
1433 const TUint8 KTonAndNpi = TonAndNpi(RMobilePhone::ENetworkSpecificNumber,RMobilePhone::EPrivateNumberPlan); |
|
1434 |
|
1435 RBuf8 rpDestinationAddress; |
|
1436 CleanupClosePushL(rpDestinationAddress); |
|
1437 rpDestinationAddress.CreateL(KAddrMaxLength); |
|
1438 rpDestinationAddress.Append(KTonAndNpi); //TON & NPI |
|
1439 rpDestinationAddress.Append(_L8("1234567")); //dummy data not EF(ADN) encoded data |
|
1440 |
|
1441 RBuf8 tpDestinationAddress; |
|
1442 CleanupClosePushL(tpDestinationAddress); |
|
1443 tpDestinationAddress.CreateL(KAddrMaxLength); |
|
1444 tpDestinationAddress.Append(KTonAndNpi); //TON & NPI |
|
1445 tpDestinationAddress.Append(_L8("7654321")); //dummy data not EF(ADN) encoded data |
|
1446 |
|
1447 TDesC8* rpDestinationAddressPtr = &rpDestinationAddress; |
|
1448 TDesC8* tpDestinationAddressPtr = &tpDestinationAddress; |
|
1449 |
|
1450 TMockLtsyData2<TDesC8*,TDesC8*> createMoSmsControlEnvelopPack(rpDestinationAddressPtr,tpDestinationAddressPtr); |
|
1451 |
|
1452 createMoSmsControlEnvelopPack.SerialiseL(data); |
|
1453 iMockLTSY.CompleteL(KMockLtsyDispatchSatCreateMoSmControlEnvelopeIndId, KErrNone, data); |
|
1454 data.Close(); |
|
1455 |
|
1456 WaitForMockLTSYTerminated(); |
|
1457 //Response from the SIM |
|
1458 //LTSY -> CTSY |
|
1459 |
|
1460 TTlv moSmsControlResponseTlv; |
|
1461 |
|
1462 TUint8 result = KMoSmCtrlResultAllowed; |
|
1463 _LIT8(KAlphaIdData8,"Sending an SMS"); |
|
1464 _LIT16(KAlphaIdData16,"Sending an SMS"); |
|
1465 |
|
1466 moSmsControlResponseTlv.Begin(result); |
|
1467 |
|
1468 moSmsControlResponseTlv.AddTag(KTlvAddressTag); |
|
1469 moSmsControlResponseTlv.AddData(rpDestinationAddress); |
|
1470 |
|
1471 moSmsControlResponseTlv.AddTag(KTlvAddressTag); |
|
1472 moSmsControlResponseTlv.AddData(tpDestinationAddress); |
|
1473 |
|
1474 moSmsControlResponseTlv.AddTag(KTlvAlphaIdentifierTag); |
|
1475 moSmsControlResponseTlv.AddData(KAlphaIdData8); |
|
1476 |
|
1477 TDesC8* moSmsControlResponseTlvDesPtr = &const_cast<TDesC8&>( moSmsControlResponseTlv.End()); |
|
1478 |
|
1479 TMockLtsyData1<TDesC8*> moSmsControlResponsePack(moSmsControlResponseTlvDesPtr); |
|
1480 moSmsControlResponsePack.SerialiseL(data); |
|
1481 iMockLTSY.CompleteL(KMockLtsyDispatchSatMoSmControlEnvelopeResponseIndId,KErrNone,data); |
|
1482 data.Close(); |
|
1483 |
|
1484 TMockLtsyData3<TUint8,TDesC8*,TDesC8*> moSmControlResponseDataPack(result,rpDestinationAddressPtr,tpDestinationAddressPtr); |
|
1485 moSmControlResponseDataPack.SerialiseL(data); |
|
1486 iMockLTSY.ExpectL(MLtsyDispatchSatSmControlResponseData::KLtsyDispatchSatSmControlResponseDataApiId,data); |
|
1487 data.Close(); |
|
1488 |
|
1489 User::WaitForRequest(moSmControlRequestReqStatus); |
|
1490 ASSERT_EQUALS(moSmControlRequestReqStatus.Int(),KErrNone); |
|
1491 ASSERT_EQUALS(moSmsControl.iResult,RSat::EAllowedNoModification); |
|
1492 ASSERT_EQUALS(moSmsControl.iAlphaId.iStatus,RSat::EAlphaIdProvided); |
|
1493 ASSERT_TRUE(moSmsControl.iAlphaId.iAlphaId == KAlphaIdData16); |
|
1494 |
|
1495 //LTSY -> CTSY the SMS has been sent |
|
1496 iMockLTSY.CompleteL(MLtsyDispatchSmsSendSatSms::KLtsyDispatchSmsSendSatSmsApiId,KErrNone); |
|
1497 User::WaitForRequest(sendMessageReqStatus); |
|
1498 ASSERT_EQUALS(sendMessageReqStatus.Int(),KErrNone); |
|
1499 |
|
1500 //generate the terminal response to the send sms proactive command. |
|
1501 RSat::TSendSmRspV1 sendSmRsp; |
|
1502 sendSmRsp.iGeneralResult = RSat::KSuccess; |
|
1503 sendSmRsp.iInfoType = RSat::KNoAdditionalInfo; |
|
1504 sendSmRsp.SetPCmdNumber(KPCmdNumber); |
|
1505 RSat::TSendSmRspV1Pckg sendSmRspPckg(sendSmRsp); |
|
1506 |
|
1507 GenerateAndWaitForTermRspL(KPCmdNumber,KSendShortMessage,KCommandQualifier,RSat::ESendSm,RSat::KSuccess,sendSmRspPckg,KErrNone); |
|
1508 |
|
1509 CleanupStack::PopAndDestroy(&tpDestinationAddress); |
|
1510 CleanupStack::PopAndDestroy(&rpDestinationAddress); |
|
1511 |
|
1512 CleanupStack::PopAndDestroy(&data); |
|
1513 CleanupStack::PopAndDestroy(this); |
|
1514 |
|
1515 config.Reset(); |
|
1516 } |
|
1517 |
|
1518 /** |
|
1519 * Utility function which handles all the Expects/Completes generated by Opening an RSat object. |
|
1520 */ |
|
1521 void CCTsySatFUNegative::OpenSatL(TUint8 aEnabled) |
|
1522 { |
|
1523 RBuf8 data; |
|
1524 CleanupClosePushL(data); |
|
1525 |
|
1526 |
|
1527 iMockLTSY.ExpectL(MLtsyDispatchSatGetSmsControlActivated::KLtsyDispatchSatGetSmsControlActivatedApiId); |
|
1528 |
|
1529 TBool smsMoControlActivated = aEnabled & KSmsMoControlEnabled; |
|
1530 TMockLtsyData1<TBool> comLtsyData(smsMoControlActivated); |
|
1531 comLtsyData.SerialiseL(data); |
|
1532 iMockLTSY.CompleteL(MLtsyDispatchSatGetSmsControlActivated::KLtsyDispatchSatGetSmsControlActivatedApiId, KErrNone, data); |
|
1533 |
|
1534 TUint8 pcmdCode = KPollInterval; |
|
1535 TMockLtsyData1<TUint8> expLtsyData(pcmdCode); |
|
1536 data.Close(); |
|
1537 expLtsyData.SerialiseL(data); |
|
1538 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
1539 |
|
1540 pcmdCode = KPollingOff; |
|
1541 data.Close(); |
|
1542 expLtsyData.SerialiseL(data); |
|
1543 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
1544 |
|
1545 pcmdCode = KMoreTime; |
|
1546 data.Close(); |
|
1547 expLtsyData.SerialiseL(data); |
|
1548 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
1549 |
|
1550 pcmdCode = KTimerManagement; |
|
1551 data.Close(); |
|
1552 expLtsyData.SerialiseL(data); |
|
1553 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId, data ); |
|
1554 |
|
1555 iMockLTSY.ExpectL(MLtsyDispatchPhoneGetPhoneId::KLtsyDispatchPhoneGetPhoneIdApiId); |
|
1556 |
|
1557 _LIT(KSerialNumber, "12345678"); |
|
1558 |
|
1559 RMobilePhone::TMobilePhoneIdentityV1 phoneId; |
|
1560 phoneId.iSerialNumber = KSerialNumber; |
|
1561 |
|
1562 TMockLtsyData1<RMobilePhone::TMobilePhoneIdentityV1> phoneIdData(phoneId); |
|
1563 data.Close(); |
|
1564 phoneIdData.SerialiseL(data); |
|
1565 iMockLTSY.CompleteL(MLtsyDispatchPhoneGetPhoneId::KLtsyDispatchPhoneGetPhoneIdApiId, KErrNone, data); |
|
1566 |
|
1567 iMockLTSY.ExpectL(MLtsyDispatchSatGetDefaultBearerCapability::KLtsyDispatchSatGetDefaultBearerCapabilityApiId); |
|
1568 |
|
1569 TBuf8<KMaxLengthDefaultBearerData> bearerCapabilities(_L8("TEST BEARER!")); |
|
1570 TDesC8* bearerCapabilitiesPtr = &bearerCapabilities; |
|
1571 TMockLtsyData1<TDesC8*> bearerCapabilitiesData(bearerCapabilitiesPtr); |
|
1572 data.Close(); |
|
1573 bearerCapabilitiesData.SerialiseL(data); |
|
1574 iMockLTSY.CompleteL(MLtsyDispatchSatGetDefaultBearerCapability::KLtsyDispatchSatGetDefaultBearerCapabilityApiId, KErrNone, data); |
|
1575 |
|
1576 iMockLTSY.ExpectL(MLtsyDispatchSatGetUssdControlSupported::KLtsyDispatchSatGetUssdControlSupportedApiId); |
|
1577 |
|
1578 TBool ussdSupported = aEnabled & KUssdEnabled; |
|
1579 TMockLtsyData1<TBool> ussdSupportedData(ussdSupported); |
|
1580 data.Close(); |
|
1581 ussdSupportedData.SerialiseL(data); |
|
1582 iMockLTSY.CompleteL(MLtsyDispatchSatGetUssdControlSupported::KLtsyDispatchSatGetUssdControlSupportedApiId, KErrNone, data); |
|
1583 iMockLTSY.CompleteL(KMockLtsyDispatchSatUssdControlSupportedChangeIndId, KErrNone, data); //do a future indicator completion as well as this could happen at some point |
|
1584 |
|
1585 iMockLTSY.ExpectL(MLtsyDispatchSatReady::KLtsyDispatchSatReadyApiId); |
|
1586 iMockLTSY.CompleteL(MLtsyDispatchSatReady::KLtsyDispatchSatReadyApiId,KErrNone); |
|
1587 |
|
1588 iMockLTSY.ExpectL(MLtsyDispatchSatGetSmsPpDownloadSupported::KLtsyDispatchSatGetSmsPpDownloadSupportedApiId); |
|
1589 |
|
1590 TBool smsPpDdlSupported = aEnabled & KSmsPpDownloadEnabled; |
|
1591 TMockLtsyData1<TBool> smsPpData(smsPpDdlSupported); |
|
1592 data.Close(); |
|
1593 smsPpData.SerialiseL(data); |
|
1594 iMockLTSY.CompleteL(MLtsyDispatchSatGetSmsPpDownloadSupported::KLtsyDispatchSatGetSmsPpDownloadSupportedApiId, KErrNone, data); |
|
1595 |
|
1596 TRequestStatus reqStatus; |
|
1597 iMockLTSY.NotifyTerminated(reqStatus); |
|
1598 |
|
1599 |
|
1600 ASSERT_EQUALS(KErrNone, iSat.Open(iPhone)); |
|
1601 |
|
1602 User::WaitForRequest(reqStatus); |
|
1603 ASSERT_EQUALS(KErrNone, reqStatus.Int()); |
|
1604 |
|
1605 CleanupStack::PopAndDestroy(&data); |
|
1606 } |
|
1607 |
|
1608 void CCTsySatFUNegative::SetupEventListL(TUint8 aPCommandNumber, TUint8 aEvent) |
|
1609 { |
|
1610 RBuf8 data; |
|
1611 CleanupClosePushL(data); |
|
1612 |
|
1613 TRequestStatus reqStatus; |
|
1614 |
|
1615 //setup the expect for Mock LTSY from the RSat::NotifySetUpEventListPCmd call |
|
1616 //ETel -> CTSY -> LTSY |
|
1617 TUint8 pcmdCode = KSetUpEventList; |
|
1618 TMockLtsyData1<TUint8> setUpEventListPCmdExpLtsyData(pcmdCode); |
|
1619 setUpEventListPCmdExpLtsyData.SerialiseL(data); |
|
1620 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId,data); |
|
1621 data.Close(); |
|
1622 |
|
1623 //create the Mock LTSY complete TLV data (a proactive command) |
|
1624 //LTSY -> CTSY |
|
1625 TTlv proactiveCmdTlv; |
|
1626 |
|
1627 proactiveCmdTlv.Begin(KBerTlvProactiveSimCommandTag); |
|
1628 |
|
1629 proactiveCmdTlv.AddTag(KTlvCommandDetailsTag); |
|
1630 proactiveCmdTlv.AddByte(aPCommandNumber);//ETLV_CommandNumber |
|
1631 proactiveCmdTlv.AddByte(KSetUpEventList); //ETLV_TypeOfCommand |
|
1632 proactiveCmdTlv.AddByte(0); //ETLV_CommandQualifier - RFU for Set up event list |
|
1633 |
|
1634 proactiveCmdTlv.AddTag(KTlvEventListTag); |
|
1635 proactiveCmdTlv.AddByte(aEvent); //ETLV_TypeOfCommand |
|
1636 |
|
1637 proactiveCmdTlv.AddTag(KTlvDeviceIdentityTag); |
|
1638 proactiveCmdTlv.AddByte(KSim); |
|
1639 proactiveCmdTlv.AddByte(KMe); |
|
1640 |
|
1641 TDesC8* tlvDscPtr = &const_cast<TDesC8&>(proactiveCmdTlv.End()); |
|
1642 TMockLtsyData1<TDesC8*> tlvDscPack(tlvDscPtr); |
|
1643 tlvDscPack.SerialiseL(data); |
|
1644 iMockLTSY.CompleteL(KMockLtsyDispatchSatPcmdIndId,KErrNone,data); |
|
1645 data.Close(); |
|
1646 |
|
1647 //ETel Sat calls |
|
1648 RSat::TSetUpEventListV1 setUpEventList; |
|
1649 RSat::TSetUpEventListV1Pckg setUpEventListPckg(setUpEventList); |
|
1650 |
|
1651 iSat.NotifySetUpEventListPCmd(reqStatus,setUpEventListPckg); |
|
1652 User::WaitForRequest(reqStatus); |
|
1653 ASSERT_EQUALS(reqStatus.Int(),KErrNone); |
|
1654 ASSERT_EQUALS(setUpEventList.iType,RSat::EUpdateEventList); |
|
1655 //Can't be asserted (easily) as some events the TSY is completly responsible for and iEvent is not set in the CTSY |
|
1656 //ASSERT_TRUE((setUpEventList.iEvents & RSat::KUserActivity) == RSat::KUserActivity) |
|
1657 ASSERT_EQUALS(setUpEventList.PCmdNumber(),aPCommandNumber); |
|
1658 |
|
1659 AssertMockLtsyStatusL(); |
|
1660 |
|
1661 //The Terminal response |
|
1662 RSat::TSetUpEventListRspV1 resp; |
|
1663 RSat::TSetUpEventListRspV1Pckg respPck(resp); |
|
1664 |
|
1665 resp.iGeneralResult = RSat::KSuccess; |
|
1666 resp.iInfoType = RSat::KNoAdditionalInfo; |
|
1667 resp.SetPCmdNumber(aPCommandNumber); |
|
1668 |
|
1669 GenerateAndWaitForTermRspL(aPCommandNumber,KSetUpEventList,0,RSat::ESetUpEventList,RSat::KSuccess,respPck,KErrNone); |
|
1670 |
|
1671 CleanupStack::PopAndDestroy(&data); |
|
1672 } |
|
1673 |
|
1674 void CCTsySatFUNegative::SetupLocalInfoL(TUint16 aAreaCode, TUint16 aCellId, const TDesC8& aOperatorCode, TUint8 aLocationStatus) |
|
1675 { |
|
1676 RBuf8 data; |
|
1677 CleanupClosePushL(data); |
|
1678 |
|
1679 TRequestStatus reqStatus; |
|
1680 |
|
1681 ASSERT_TRUE(aOperatorCode.Length() <= KOperatorCodeLength); |
|
1682 |
|
1683 TDesC8* operatorCode = &const_cast<TDesC8&>(aOperatorCode); |
|
1684 |
|
1685 TMockLtsyData4<TUint8, TDesC8*, TUint16, TUint16 >localInfoPack(aLocationStatus,operatorCode,aAreaCode,aCellId); |
|
1686 localInfoPack.SerialiseL(data); |
|
1687 iMockLTSY.CompleteL(KMockLtsyDispatchSatLocationStatusIndId, KErrNone, data); |
|
1688 |
|
1689 WaitForMockLTSYTerminated(); |
|
1690 |
|
1691 CleanupStack::PopAndDestroy(&data); |
|
1692 } |
|
1693 |
|
1694 |
|
1695 /** |
|
1696 * Handles sending a terminal response, generating a "command completed successfully" additional info tlv |
|
1697 */ |
|
1698 void CCTsySatFUNegative::GenerateAndWaitForTermRspL( TUint8 aPCmdNumber, |
|
1699 TUint8 aTypeOfCommand, |
|
1700 TUint8 aCommandQualifier, |
|
1701 RSat::TPCmd aRSatTypeOfCommand, |
|
1702 RSat::TPCmdResult aGeneralResult, |
|
1703 const TDesC8& aRsp, |
|
1704 TInt aCompError) |
|
1705 { |
|
1706 GenerateAndWaitForTermRspL(aPCmdNumber, aTypeOfCommand, aCommandQualifier, aRSatTypeOfCommand, aGeneralResult, KNullDesC8, aRsp, KNullDesC8,aCompError); |
|
1707 } |
|
1708 |
|
1709 /** |
|
1710 * Handles sending a terminal response, and takes as an argument a descriptor containing a tlv. This is to be used when a "command completed successfully" tlv |
|
1711 * is insufficient. |
|
1712 */ |
|
1713 void CCTsySatFUNegative::GenerateAndWaitForTermRspL(TUint8 aPCmdNumber, |
|
1714 TUint8 aTypeOfCommand, |
|
1715 TUint8 aCommandQualifier, |
|
1716 RSat::TPCmd aRSatTypeOfCommand, |
|
1717 RSat::TPCmdResult aGeneralResult, |
|
1718 const TDesC8& aGeneralResultAddInfo, |
|
1719 const TDesC8& aRsp, |
|
1720 const TDesC8& aAdditionalInfo, |
|
1721 TInt aCompError) |
|
1722 { |
|
1723 RBuf8 data; |
|
1724 CleanupClosePushL(data); |
|
1725 |
|
1726 TRequestStatus reqStatus; |
|
1727 |
|
1728 RBuf8 terminalRsp; |
|
1729 CleanupClosePushL(terminalRsp); |
|
1730 terminalRsp.CreateL(KTlvMaxSize); |
|
1731 |
|
1732 GenerateTermRspTlv(terminalRsp, aPCmdNumber, aTypeOfCommand, aCommandQualifier, aGeneralResult, aGeneralResultAddInfo, aAdditionalInfo); |
|
1733 |
|
1734 TDesC8* terminalRspPtr = &terminalRsp; |
|
1735 |
|
1736 TMockLtsyData1<TDesC8*> termRespData(terminalRspPtr); |
|
1737 termRespData.SerialiseL(data); |
|
1738 |
|
1739 iMockLTSY.ExpectL(MLtsyDispatchSatTerminalRsp::KLtsyDispatchSatTerminalRspApiId, data); |
|
1740 |
|
1741 if(aRsp != KNullDesC8) |
|
1742 { |
|
1743 //ETel generated Terminal response |
|
1744 iSat.TerminalRsp(reqStatus, aRSatTypeOfCommand, aRsp); |
|
1745 } |
|
1746 else |
|
1747 { |
|
1748 //CTSY generate Terminal response |
|
1749 iMockLTSY.NotifyTerminated(reqStatus); |
|
1750 } |
|
1751 |
|
1752 User::WaitForRequest(reqStatus); |
|
1753 ASSERT_EQUALS(reqStatus.Int(),KErrNone); |
|
1754 |
|
1755 iMockLTSY.NotifyTerminated(reqStatus); |
|
1756 |
|
1757 iMockLTSY.CompleteL(MLtsyDispatchSatTerminalRsp::KLtsyDispatchSatTerminalRspApiId, aCompError); |
|
1758 |
|
1759 User::WaitForRequest(reqStatus); |
|
1760 ASSERT_EQUALS(reqStatus.Int(),KErrNone); |
|
1761 |
|
1762 CleanupStack::PopAndDestroy(&terminalRsp); |
|
1763 CleanupStack::PopAndDestroy(&data); |
|
1764 } |
|
1765 |
|
1766 void CCTsySatFUNegative::GenerateTermRspTlv( RBuf8& aBuf, |
|
1767 TUint8 aPCmdNumber, |
|
1768 TUint8 aTypeOfCommand, |
|
1769 TUint8 aCommandQualifier, |
|
1770 RSat::TPCmdResult aGeneralResult, |
|
1771 const TDesC8& aGeneralResultAddInfo, |
|
1772 const TDesC8& aAdditionalInfo) |
|
1773 { |
|
1774 TTlv tlv; |
|
1775 tlv.AddTag(KTlvCommandDetailsTag); |
|
1776 tlv.AddByte(aPCmdNumber);//ETLV_CommandNumber |
|
1777 tlv.AddByte(aTypeOfCommand); //ETLV_TypeOfCommand |
|
1778 tlv.AddByte(aCommandQualifier); //ETLV_CommandQualifier |
|
1779 |
|
1780 tlv.AddTag(KTlvDeviceIdentityTag); |
|
1781 tlv.AddByte(KMe); |
|
1782 tlv.AddByte(KSim); |
|
1783 |
|
1784 tlv.AddTag(KTlvResultTag); |
|
1785 tlv.AddByte(aGeneralResult); |
|
1786 tlv.AddData(aGeneralResultAddInfo); |
|
1787 |
|
1788 aBuf.Zero(); |
|
1789 aBuf.Append(tlv.GetDataWithoutTopLevelTag()); |
|
1790 aBuf.Append(aAdditionalInfo); |
|
1791 } |
|
1792 |
|
1793 void CCTsySatFUNegative::RefreshNoTerminalRspL(TUint8 aPCmdNumber, TUint8 aCommandQualifier, TInt aRefreshAllowedCompleteResult) |
|
1794 { |
|
1795 RBuf8 data; |
|
1796 CleanupClosePushL(data); |
|
1797 |
|
1798 //this is an example of how a other interested parties can register for NotifyRefreshPCmd, |
|
1799 //this would be any other but the main SAT engine. |
|
1800 RSat satUser; |
|
1801 CleanupClosePushL(satUser); |
|
1802 satUser.Open(iPhone); |
|
1803 |
|
1804 //Expect a MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId when both |
|
1805 //notifiers are set (thus needs to be queued before we setup the two notifiers below) |
|
1806 TUint8 pcmdCode = KRefresh; |
|
1807 TMockLtsyData1<TUint8> proactiveCmdNotificationsLtsyData(pcmdCode); |
|
1808 proactiveCmdNotificationsLtsyData.SerialiseL(data); |
|
1809 iMockLTSY.ExpectL(MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId,data); |
|
1810 data.Close(); |
|
1811 |
|
1812 //Refresh Required client side notifier |
|
1813 //ETel -> CTSY |
|
1814 RSat::TRefreshV2 refreshRequired; |
|
1815 RSat::TRefreshV2Pckg refreshRequiredPckg(refreshRequired); |
|
1816 TRequestStatus refreshRequiredReqStatus; |
|
1817 iSat.NotifyRefreshRequired(refreshRequiredReqStatus,refreshRequiredPckg); |
|
1818 |
|
1819 //Refresh Proactive Command client side notifier |
|
1820 //ETel -> CTSY |
|
1821 //Not both have been set, this will trigger a HandlePCmdNotificationReqL() down to the LTSY |
|
1822 RSat::TRefreshV2 refreshPCmd; |
|
1823 RSat::TRefreshV2Pckg refreshPCmdPckg(refreshPCmd); |
|
1824 TRequestStatus refreshPCmdReqStatus; |
|
1825 iSat.NotifyRefreshPCmd(refreshPCmdReqStatus,refreshPCmdPckg); |
|
1826 |
|
1827 RSat::TRefreshV2 refreshPCmd2; |
|
1828 RSat::TRefreshV2Pckg refreshPCmdPckg2(refreshPCmd2); |
|
1829 TRequestStatus refreshPCmdReqStatus2; |
|
1830 satUser.NotifyRefreshPCmd(refreshPCmdReqStatus2,refreshPCmdPckg2); |
|
1831 |
|
1832 //the MLtsyDispatchSatPCmdNotification::KLtsyDispatchSatPCmdNotificationApiId expect should be gone |
|
1833 //so assert the LTSY status |
|
1834 AssertMockLtsyStatusL(); |
|
1835 |
|
1836 |
|
1837 TTlv proactiveCmdTlv; |
|
1838 |
|
1839 proactiveCmdTlv.Begin(KBerTlvProactiveSimCommandTag); |
|
1840 |
|
1841 proactiveCmdTlv.AddTag(KTlvCommandDetailsTag); |
|
1842 proactiveCmdTlv.AddByte(aPCmdNumber);//ETLV_CommandNumber |
|
1843 proactiveCmdTlv.AddByte(KRefresh); //ETLV_TypeOfCommand |
|
1844 proactiveCmdTlv.AddByte(aCommandQualifier); //ETLV_CommandQualifier |
|
1845 |
|
1846 proactiveCmdTlv.AddTag(KTlvDeviceIdentityTag); |
|
1847 proactiveCmdTlv.AddByte(KSim); |
|
1848 proactiveCmdTlv.AddByte(KMe); |
|
1849 |
|
1850 TUint numberOfFiles = 1; |
|
1851 proactiveCmdTlv.AddTag(KTlvFileListTag); |
|
1852 proactiveCmdTlv.AddByte(numberOfFiles); |
|
1853 //full paths to files (first byte identifies the type of file) |
|
1854 //master file |
|
1855 |
|
1856 const TInt KFilePathLength = 4; |
|
1857 TBuf8<KFilePathLength> filePath(KFilePathLength); |
|
1858 filePath[0] = 0x3F; |
|
1859 filePath[1] = 0x00; |
|
1860 filePath[2] = 0x2F; |
|
1861 filePath[3] = 0xE2; |
|
1862 |
|
1863 proactiveCmdTlv.AddData(filePath); |
|
1864 |
|
1865 _LIT8(KAid,"AID INFO"); //not correct format, just for test check "Application identifier as defined in TS 101 220 [31]" |
|
1866 proactiveCmdTlv.AddTag(KTlvAIDTag); |
|
1867 proactiveCmdTlv.AddData(KAid); |
|
1868 |
|
1869 |
|
1870 const TUint8 KTextAttributeTag = 0xC8; |
|
1871 proactiveCmdTlv.AddTag(KTextAttributeTag); |
|
1872 //text formatting |
|
1873 proactiveCmdTlv.AddByte(0x00); |
|
1874 proactiveCmdTlv.AddByte(0x00); |
|
1875 proactiveCmdTlv.AddByte(0x00); |
|
1876 proactiveCmdTlv.AddByte(0x00); |
|
1877 |
|
1878 |
|
1879 TDesC8* tlvDscPtr = &const_cast<TDesC8&>(proactiveCmdTlv.End()); |
|
1880 TMockLtsyData1<TDesC8*> tlvDscPack(tlvDscPtr); |
|
1881 tlvDscPack.SerialiseL(data); |
|
1882 iMockLTSY.CompleteL(KMockLtsyDispatchSatPcmdIndId,KErrNone,data); |
|
1883 data.Close(); |
|
1884 |
|
1885 User::WaitForRequest(refreshRequiredReqStatus); |
|
1886 ASSERT_EQUALS(refreshRequiredReqStatus.Int(),KErrNone); |
|
1887 //ASSERT_EQUALS(refreshRequired.PCmdNumber(),aPCmdNumber); not set in the CTSY |
|
1888 ASSERT_TRUE(refreshRequired.iAid == KAid); |
|
1889 ASSERT_EQUALS(refreshRequired.iType,static_cast<RSat::TRefreshType>(aCommandQualifier + 1)); //+1 as RSat::TRefreshType 0x00 is ERefreshTypeNotSet |
|
1890 ASSERT_EQUALS(filePath[2],static_cast<TUint8>(refreshRequired.iFileList[0] >> KShiftBitsToGetMSB)); |
|
1891 ASSERT_EQUALS(filePath[3],static_cast<TUint8>(refreshRequired.iFileList[0] & 0xFF)); |
|
1892 |
|
1893 //no IPCs down to the LTSY should have occured, so we can AssertMockLtsyStatusL here. |
|
1894 AssertMockLtsyStatusL(); |
|
1895 |
|
1896 |
|
1897 //ESatTsyServiceRequest |
|
1898 TDesC8* aidPtr = const_cast<TDesC8*>(&KAid); |
|
1899 TDesC8* refreshFileListPtr = &filePath; |
|
1900 TUint16 cache = 0x01 | 0x02;//ECacheEFSST | ECacheEFCBMID; |
|
1901 TMockLtsyData3<TDesC8*, TDesC8*, TUint16> refreshAllowedPack(refreshFileListPtr,aidPtr,cache); |
|
1902 refreshAllowedPack.SerialiseL(data); |
|
1903 iMockLTSY.ExpectL(MLtsyDispatchSatRefreshAllowed::KLtsyDispatchSatRefreshAllowedApiId,data,KErrNone); |
|
1904 data.Close(); |
|
1905 |
|
1906 RSat::TRefreshRspV1 refreshAllowedRsp; |
|
1907 refreshAllowedRsp.iGeneralResult = RSat::KSuccess; |
|
1908 refreshAllowedRsp.iInfoType = RSat::KNoAdditionalInfo; |
|
1909 refreshAllowedRsp.iAdditionalInfo = KNullDesC; |
|
1910 RSat::TRefreshRspV1Pckg refreshAllowedRspPckg(refreshAllowedRsp); |
|
1911 TRequestStatus refreshAllowedReqStatus; |
|
1912 iSat.RefreshAllowed(refreshAllowedReqStatus,refreshAllowedRspPckg); |
|
1913 User::WaitForRequest(refreshAllowedReqStatus); |
|
1914 ASSERT_EQUALS(refreshAllowedReqStatus.Int(),KErrNone); |
|
1915 |
|
1916 //the MLtsyDispatchSatRefreshAllowed::KLtsyDispatchSatRefreshAllowedApiId expect should be gone |
|
1917 //so assert the LTSY status |
|
1918 AssertMockLtsyStatusL(); |
|
1919 |
|
1920 |
|
1921 |
|
1922 //ESatTsyCompleteRefresh |
|
1923 //indicator to create complete the notifier |
|
1924 const TInt KResult = aRefreshAllowedCompleteResult; |
|
1925 iMockLTSY.CompleteL(MLtsyDispatchSatRefreshAllowed::KLtsyDispatchSatRefreshAllowedApiId,KResult); |
|
1926 |
|
1927 User::WaitForRequest(refreshPCmdReqStatus); |
|
1928 ASSERT_EQUALS(refreshPCmdReqStatus.Int(),KResult); |
|
1929 //ASSERT_EQUALS(refreshPCmd.PCmdNumber(),aPCmdNumber); not set in the CTSY |
|
1930 ASSERT_TRUE(refreshPCmd.iAid == KAid); |
|
1931 ASSERT_EQUALS(refreshPCmd.iType,static_cast<RSat::TRefreshType>(aCommandQualifier + 1)); //+1 as RSat::TRefreshType 0x00 is ERefreshTypeNotSet |
|
1932 ASSERT_EQUALS(filePath[2],static_cast<TUint8>(refreshPCmd.iFileList[0] >> KShiftBitsToGetMSB)); |
|
1933 ASSERT_EQUALS(filePath[3],static_cast<TUint8>(refreshPCmd.iFileList[0] & 0xFF)); |
|
1934 |
|
1935 User::WaitForRequest(refreshPCmdReqStatus2); |
|
1936 ASSERT_EQUALS(refreshPCmdReqStatus2.Int(),KResult); |
|
1937 //ASSERT_EQUALS(refreshPCmd2.PCmdNumber(),aPCmdNumber); not set in the CTSY |
|
1938 ASSERT_TRUE(refreshPCmd2.iAid == KAid); |
|
1939 ASSERT_EQUALS(refreshPCmd2.iType,static_cast<RSat::TRefreshType>(aCommandQualifier + 1)); //+1 as RSat::TRefreshType 0x00 is ERefreshTypeNotSet |
|
1940 ASSERT_EQUALS(filePath[2],static_cast<TUint8>(refreshPCmd2.iFileList[0] >> KShiftBitsToGetMSB)); |
|
1941 ASSERT_EQUALS(filePath[3],static_cast<TUint8>(refreshPCmd2.iFileList[0] & 0xFF)); |
|
1942 |
|
1943 CleanupStack::PopAndDestroy(&satUser); |
|
1944 CleanupStack::PopAndDestroy(&data); |
|
1945 } |
|
1946 |
|
1947 TUint8 CCTsySatFUNegative::TonAndNpi(RMobilePhone::TMobileTON aTon, RMobilePhone::TMobileNPI aNpi) |
|
1948 { |
|
1949 return (0x80) | (aTon << 4) | (aNpi); |
|
1950 } |
|
1951 |
|
1952 void CCTsySatFUNegative::DoCleanup() |
|
1953 { |
|
1954 |
|
1955 delete iCallContainer; |
|
1956 iCallContainer = NULL; |
|
1957 |
|
1958 iSat.Close(); |
|
1959 CCtsyComponentTestBase::DoCleanup(); |
|
1960 } |
|
1961 |
|
1962 CCTsySatFUNegative::CCallTypeContainer::CCallTypeContainer() : |
|
1963 iCallControlPckg(iCallControl), |
|
1964 iSetUpCallPckg(iSetUpCall) |
|
1965 { |
|
1966 |
|
1967 } |
|
1968 |
|
1969 |
|
1970 |