author | mikaruus <mika.a.ruuskanen@nokia.com> |
Wed, 21 Apr 2010 14:29:55 +0300 | |
changeset 8 | 6295dc2169f3 |
parent 7 | fa67e03b87df |
child 9 | 8486d82aef45 |
permissions | -rw-r--r-- |
0 | 1 |
/* |
2 |
* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
|
6 |
* which accompanies this distribution, and is available |
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
* |
|
9 |
* Initial Contributors: |
|
10 |
* Nokia Corporation - initial contribution. |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
14 |
* Description: |
0 | 15 |
* |
16 |
*/ |
|
17 |
||
18 |
||
19 |
||
20 |
// INCLUDE FILES |
|
21 |
||
22 |
#include <ctsy/pluginapi/cmmdatapackage.h> |
|
23 |
#include <etelmm.h> |
|
24 |
#include <etelsat.h> |
|
25 |
#include <ctsy/serviceapi/gsmerror.h> |
|
26 |
#include <ctsy/serviceapi/mmgsmwcdmautils.h> // utility functions |
|
27 |
#include <mmlist.h> // list types |
|
28 |
#include <ctsy/serviceapi/mmtsy_defaults.h> // for kmaxlengthofussdmessage |
|
29 |
#include <ctsy/serviceapi/mmtsy_ipcdefs.h> |
|
30 |
#include <ss_wmisi.h> |
|
31 |
#include <tisi.h> |
|
32 |
#include <uiccisi.h> |
|
33 |
||
34 |
#include "cmmcallmesshandler.h" // utility function MapTypeOfNumberMmToIsi |
|
35 |
#include "cmmmessagerouter.h" |
|
36 |
#include "cmmphonetsender.h" |
|
37 |
#include "cmmstaticutility.h" // utility functions |
|
38 |
#include "cmmsupplservmesshandler.h" |
|
39 |
#include "tssparser.h" // for parsing service string |
|
40 |
#include "tsylogger.h" |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
41 |
#include "OstTraceDefinitions.h" |
0 | 42 |
#include "cmmuiccmesshandler.h" |
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
43 |
#include "cmmphonemesshandler.h" // for CallForwFlagsCachingCompleted |
0 | 44 |
#ifdef OST_TRACE_COMPILER_IN_USE |
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
45 |
#include "cmmsupplservmesshandlerTraces.h" |
0 | 46 |
#endif |
47 |
// logging |
|
48 |
#include <satcs.h> |
|
49 |
||
50 |
// EXTERNAL DATA STRUCTURES |
|
51 |
//None |
|
52 |
||
53 |
// EXTERNAL FUNCTION PROTOTYPES |
|
54 |
//None |
|
55 |
||
56 |
// CONSTANTS |
|
57 |
const TUint8 KSsPadding = 0x00; // Filler byte for ISI messages |
|
58 |
const TInt KIpcNoValue = 0; |
|
59 |
const TUint16 KSsCodeNoValue = 0xFFFF; |
|
60 |
const TUint8 KDataAppendToServiceReqHeaderInBytes = 7; |
|
61 |
||
62 |
_LIT(KGsmNewPasswordFiller, "0000"); |
|
63 |
_LIT(KGsmVerifiedPasswordFiller, "1111"); |
|
64 |
||
65 |
// MACROS |
|
66 |
//None |
|
67 |
||
68 |
// LOCAL CONSTANTS AND MACROS |
|
69 |
//None |
|
70 |
||
71 |
// MODULE DATA STRUCTURES |
|
72 |
//None |
|
73 |
||
74 |
// LOCAL FUNCTION PROTOTYPES |
|
75 |
//None |
|
76 |
||
77 |
// ----------------------------------------------------------------------------- |
|
78 |
// CMmSupplServMessHandler::CMmSupplServMessHandler |
|
79 |
// C++ default constructor |
|
80 |
// ----------------------------------------------------------------------------- |
|
81 |
// |
|
82 |
CMmSupplServMessHandler::CMmSupplServMessHandler |
|
83 |
( |
|
84 |
//none |
|
85 |
) |
|
86 |
{ |
|
87 |
TFLOGSTRING( "TSY: CMmSupplServMessHandler::CMmSupplServMessHandler - Start" ); |
|
88 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_CMMSUPPLSERVMESSHANDLER, "CMmSupplServMessHandler::CMmSupplServMessHandler" ); |
|
89 |
//none |
|
90 |
} |
|
91 |
||
92 |
// ----------------------------------------------------------------------------- |
|
93 |
// CMmSupplServMessHandler::NewL |
|
94 |
// Two-phased constructor. |
|
95 |
// ----------------------------------------------------------------------------- |
|
96 |
// |
|
97 |
CMmSupplServMessHandler* CMmSupplServMessHandler::NewL |
|
98 |
( |
|
99 |
CMmPhoNetSender* aPhoNetSender, //pointer to the phonet sender |
|
100 |
CMmPhoNetReceiver* aPhoNetReceiver, // pointer to the phoner receiver |
|
101 |
CMmMessageRouter* aMessageRouter, // pointer to the message router |
|
102 |
CMmUiccMessHandler* aUiccMessHandler |
|
103 |
) |
|
104 |
{ |
|
105 |
TFLOGSTRING( "TSY: CMmSupplServMessHandler::NewL" ); |
|
106 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_NEWL, "CMmSupplServMessHandler::NewL" ); |
|
107 |
||
108 |
CMmSupplServMessHandler* supplServMessHandler = |
|
109 |
new ( ELeave ) CMmSupplServMessHandler(); |
|
110 |
||
111 |
CleanupStack::PushL( supplServMessHandler ); |
|
112 |
supplServMessHandler->iPhoNetSender = aPhoNetSender; |
|
113 |
supplServMessHandler->iMessageRouter = aMessageRouter; |
|
114 |
supplServMessHandler->iMmUiccMessHandler = aUiccMessHandler; |
|
115 |
supplServMessHandler->ConstructL(); |
|
116 |
||
117 |
aPhoNetReceiver->RegisterL( |
|
118 |
supplServMessHandler, |
|
119 |
PN_SS, |
|
120 |
SS_SERVICE_COMPLETED_RESP ); |
|
121 |
||
122 |
aPhoNetReceiver->RegisterL( |
|
123 |
supplServMessHandler, |
|
124 |
PN_SS, |
|
125 |
SS_SERVICE_FAILED_RESP ); |
|
126 |
||
127 |
aPhoNetReceiver->RegisterL( |
|
128 |
supplServMessHandler, |
|
129 |
PN_SS, |
|
130 |
SS_SERVICE_NOT_SUPPORTED_RESP ); |
|
131 |
||
132 |
aPhoNetReceiver->RegisterL( |
|
133 |
supplServMessHandler, |
|
134 |
PN_SS, |
|
135 |
SS_GSM_USSD_SEND_RESP ); |
|
136 |
||
137 |
aPhoNetReceiver->RegisterL(supplServMessHandler, PN_SS, SS_STATUS_IND ); |
|
138 |
||
139 |
aPhoNetReceiver->RegisterL( |
|
140 |
supplServMessHandler, |
|
141 |
PN_SS, |
|
142 |
SS_SERVICE_COMPLETED_IND ); |
|
143 |
||
144 |
CleanupStack::Pop( supplServMessHandler ); |
|
145 |
||
146 |
return supplServMessHandler; |
|
147 |
} |
|
148 |
||
149 |
// ----------------------------------------------------------------------------- |
|
150 |
// CMmSupplServMessHandler::ConstructL |
|
151 |
// Symbian 2nd phase constructor. Initialises internal attributes. |
|
152 |
// ----------------------------------------------------------------------------- |
|
153 |
// |
|
154 |
void CMmSupplServMessHandler::ConstructL |
|
155 |
( |
|
156 |
//none |
|
157 |
) |
|
158 |
{ |
|
159 |
TFLOGSTRING( "TSY: CMmSupplServMessHandler::ConstructL" ); |
|
160 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_CONSTRUCTL, "CMmSupplServMessHandler::ConstructL" ); |
|
161 |
||
162 |
iVoiceServiceMappedToTelephony = EFalse; |
|
163 |
iCircuitServiceMappedToAllBearer = EFalse; |
|
164 |
iGetCallForwardingNumber = EFalse; |
|
165 |
iAlsLine = RMobilePhone::EAlternateLineUnknown; |
|
166 |
//initialize IPC and SsCode |
|
167 |
iIpc = KIpcNoValue; |
|
168 |
iSsCode = KSsCodeNoValue; |
|
169 |
iMsgFlagType = EMsgFlagTypeRel4; |
|
170 |
iGetIccCallForwardingStatus = EFalse; |
|
171 |
iCheckInfoSubblock = EFalse; |
|
172 |
iFdnCheck = EFalse; |
|
173 |
iResourceControlSuppress = EFalse; |
|
174 |
} |
|
175 |
||
176 |
||
177 |
// ----------------------------------------------------------------------------- |
|
178 |
// CMmSupplServMessHandler::~CMmSupplServMessHandler |
|
179 |
// Destructor |
|
180 |
// ----------------------------------------------------------------------------- |
|
181 |
// |
|
182 |
CMmSupplServMessHandler::~CMmSupplServMessHandler |
|
183 |
( |
|
184 |
//none |
|
185 |
) |
|
186 |
{ |
|
187 |
TFLOGSTRING( "TSY: CMmSupplServMessHandler::~CMmSupplServMessHandler" ); |
|
188 |
OstTrace0( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_CMMSUPPLSERVMESSHANDLER, "CMmSupplServMessHandler::~CMmSupplServMessHandler" ); |
|
189 |
||
190 |
delete iCFResults; |
|
191 |
delete iCBResults; |
|
192 |
delete iCWResults; |
|
193 |
} |
|
194 |
||
195 |
// ----------------------------------------------------------------------------- |
|
196 |
// CMmSupplServMessHandler::ExtFuncL |
|
197 |
// Forwards requests coming from the Symbian OS layer to the |
|
198 |
// specific method. |
|
199 |
// ----------------------------------------------------------------------------- |
|
200 |
// |
|
201 |
TInt CMmSupplServMessHandler::ExtFuncL |
|
202 |
( |
|
203 |
TInt aIpc, |
|
204 |
const CMmDataPackage* aDataPackage |
|
205 |
) |
|
206 |
{ |
|
207 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::ExtFuncL: IPC: %d", aIpc); |
|
208 |
OstTrace1( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_EXTFUNCL, "CMmSupplServMessHandler::ExtFuncL;aIpc=%d", aIpc ); |
|
209 |
||
210 |
//*************************************************************// |
|
211 |
// NOTE |
|
212 |
// |
|
213 |
// LICENSEE SPECIFIC MESSAGE HANDLER IMPLEMENTATION STARTS HERE |
|
214 |
// |
|
215 |
//*************************************************************// |
|
216 |
||
217 |
TInt ret( KErrNone ); |
|
218 |
||
219 |
// Note: all SS requests use one of the values in |
|
220 |
// TSSOperationType as their transaction ID. This is needed in order |
|
221 |
// to route failed responses to the correct completion method (the |
|
222 |
// response messages for failed and not supported cases don't contain |
|
223 |
// the SS code). |
|
224 |
||
225 |
//save IPC, |
|
226 |
//in case call control changes SS request we can complete right request |
|
227 |
iIpc = aIpc; |
|
228 |
||
229 |
switch ( aIpc ) |
|
230 |
{ |
|
231 |
case EMobilePhoneGetCallForwardingStatusPhase1: |
|
232 |
{ |
|
233 |
//unpack parameters: forwarding condition and service group |
|
234 |
RMobilePhone::TMobilePhoneCFCondition conditionETel = |
|
235 |
RMobilePhone::ECallForwardingUnspecified; |
|
236 |
RMobilePhone::TMobileService serviceGroup = |
|
237 |
RMobilePhone::EServiceUnspecified; |
|
238 |
||
239 |
aDataPackage->UnPackData ( conditionETel, serviceGroup ); |
|
240 |
||
241 |
TUint8 operation( SS_INTERROGATION ); |
|
242 |
TUint8 basicServiceCode( SS_ALL_TELE_AND_BEARER ); |
|
243 |
||
244 |
// Map MM API condition to SS server condition |
|
245 |
ret = MapCFConditionMmToIsi( conditionETel, &iSsCode ); |
|
246 |
||
247 |
User::LeaveIfError( ret ); |
|
248 |
||
249 |
// If user wishes to get some specific group, then send |
|
250 |
// a different SS request. |
|
251 |
if ( RMobilePhone::EAllServices != serviceGroup && |
|
252 |
RMobilePhone::EServiceUnspecified != serviceGroup ) |
|
253 |
{ |
|
254 |
// Map MM API enum to SS server constant |
|
255 |
ret = MapMobileServiceToBasicServiceCodeIsi( |
|
256 |
serviceGroup, &basicServiceCode ); |
|
257 |
User::LeaveIfError( ret ); |
|
258 |
} |
|
259 |
ret = SsCallForwServiceReq( |
|
260 |
ESSOperationTypeGetCallForwardingStatus, |
|
261 |
operation, |
|
262 |
iSsCode, |
|
263 |
0, |
|
264 |
0, |
|
265 |
&KNullDesC, |
|
266 |
basicServiceCode ); |
|
267 |
||
268 |
break; |
|
269 |
} |
|
270 |
||
271 |
case EMobilePhoneSetCallForwardingStatus: |
|
272 |
{ |
|
273 |
//unpack parameters: TMobilePhoneCFCondition and TMobilePhoneCFChangeV1 |
|
274 |
RMobilePhone::TMobilePhoneCFCondition conditionETel = |
|
275 |
RMobilePhone::ECallForwardingUnspecified; |
|
276 |
RMobilePhone::TMobilePhoneCFChangeV1* changeInfo; |
|
277 |
||
278 |
aDataPackage->UnPackData ( conditionETel, changeInfo ); |
|
279 |
||
280 |
TUint8 operation( 0 ); |
|
281 |
TUint8 typeOfNumber( 0 ); |
|
282 |
TInt noReplyTime( 0 ); |
|
283 |
TUint8 mmiBasicServiceCode( SS_UNKNOWN_SERVICE ); |
|
284 |
||
285 |
iMmCFCondition = conditionETel; |
|
286 |
iMobileService = changeInfo->iServiceGroup; |
|
287 |
iCFAddress = changeInfo->iNumber; |
|
288 |
||
289 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::ExtFuncL - EMobilePhoneSetCallForwardingStatus - Number: %S", &iCFAddress.iTelNumber); |
|
290 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_EXTFUNCL, "CMmSupplServMessHandler::ExtFuncL;EMobilePhoneSetCallForwardingStatus iCFTelNumber=%S", iCFAddress.iTelNumber ); |
|
291 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::ExtFuncL - EMobilePhoneSetCallForwardingStatus - MobileService: %d", iMobileService); |
|
292 |
OstTrace1( TRACE_NORMAL, DUP2_CMMSUPPLSERVMESSHANDLER_EXTFUNCL, "CMmSupplServMessHandler::ExtFuncL;EMobilePhoneSetCallForwardingStatus iMobileService=%d", iMobileService ); |
|
293 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::ExtFuncL - EMobilePhoneSetCallForwardingStatus - Condition: %d", iMmCFCondition); |
|
294 |
OstTrace1( TRACE_NORMAL, DUP3_CMMSUPPLSERVMESSHANDLER_EXTFUNCL, "CMmSupplServMessHandler::ExtFuncL;EMobilePhoneSetCallForwardingStatus iMmCFCondition=%d", iMmCFCondition ); |
|
295 |
||
296 |
//map operation |
|
297 |
ret = MapOperationMmToIsi( changeInfo->iAction, &operation ); |
|
298 |
||
299 |
if ( KErrNone == ret ) |
|
300 |
{ |
|
301 |
//map condition |
|
302 |
ret = MapCFConditionMmToIsi( conditionETel, &iSsCode ); |
|
303 |
if ( KErrNone == ret ) |
|
304 |
{ |
|
305 |
//map type of number |
|
306 |
MapTypeOfNumberMmToIsi( |
|
307 |
iCFAddress.iTypeOfNumber, |
|
308 |
iCFAddress.iNumberPlan, |
|
309 |
typeOfNumber ); |
|
310 |
||
311 |
//map basic service code |
|
312 |
ret = MapMobileServiceToBasicServiceCodeIsi( |
|
313 |
changeInfo->iServiceGroup, |
|
314 |
&mmiBasicServiceCode ); |
|
315 |
||
316 |
if ( KErrNone == ret ) |
|
317 |
{ |
|
318 |
//map the reply time |
|
319 |
// -1 is defined in Etel MM API as undefined timeout |
|
320 |
if ( -1 == changeInfo->iTimeout ) |
|
321 |
{ |
|
322 |
noReplyTime = SS_UNDEFINED_TIME; |
|
323 |
} |
|
324 |
else |
|
325 |
{ |
|
326 |
noReplyTime = changeInfo->iTimeout; |
|
327 |
} |
|
328 |
//make a pointer to the phone number |
|
329 |
//call the method |
|
330 |
ret = SsCallForwServiceReq( |
|
331 |
ESSOperationTypeSetCallForwardingStatus, |
|
332 |
operation, |
|
333 |
iSsCode, |
|
334 |
typeOfNumber, |
|
335 |
noReplyTime, |
|
336 |
&( iCFAddress.iTelNumber ), |
|
337 |
mmiBasicServiceCode ); |
|
338 |
} |
|
339 |
} |
|
340 |
} |
|
341 |
break; |
|
342 |
} |
|
343 |
||
344 |
case EMobilePhoneGetBarringStatusPhase1: |
|
345 |
{ |
|
346 |
//unpack parameter: barring condition |
|
347 |
RMobilePhone::TMobilePhoneCBCondition conditionETel = |
|
348 |
RMobilePhone::EBarUnspecified; |
|
349 |
aDataPackage->UnPackData ( conditionETel ); |
|
350 |
||
351 |
//map condition |
|
352 |
ret = MapCBConditionMmToIsi( conditionETel, &iSsCode ); |
|
353 |
if ( KErrNone == ret ) |
|
354 |
{ |
|
355 |
// password subblock is not added to the ISI |
|
356 |
// message, because all passwords are empty |
|
357 |
ret = SsGsmBarringReq( |
|
358 |
ESSOperationTypeGetCallBarringStatus, |
|
359 |
SS_INTERROGATION, |
|
360 |
iSsCode, |
|
361 |
&KNullDesC, |
|
362 |
KNullDesC, |
|
363 |
KNullDesC , |
|
364 |
SS_ALL_TELE_AND_BEARER ); |
|
365 |
} |
|
366 |
break; |
|
367 |
} |
|
368 |
||
369 |
case EMobilePhoneSetCallBarringStatus: |
|
370 |
{ |
|
371 |
//unpack parameters: TMobilePhoneCBCondition and TMobilePhoneCBChangeV1 |
|
372 |
RMobilePhone::TMobilePhoneCBCondition conditionETel = |
|
373 |
RMobilePhone::EBarUnspecified; |
|
374 |
RMobilePhone::TMobilePhoneCBChangeV1* changeInfo; |
|
375 |
||
376 |
aDataPackage->UnPackData ( conditionETel, changeInfo ); |
|
377 |
||
378 |
TUint8 operation( 0 ); |
|
379 |
TUint8 mmiBasicServiceCode( SS_UNKNOWN_SERVICE ); |
|
380 |
||
381 |
//map operation |
|
382 |
ret = MapOperationMmToIsi( changeInfo->iAction, &operation ); |
|
383 |
||
384 |
if ( KErrNone == ret ) |
|
385 |
{ |
|
386 |
//map call barring condition |
|
387 |
ret = MapCBConditionMmToIsi( conditionETel, &iSsCode ); |
|
388 |
if ( KErrNone == ret ) |
|
389 |
{ |
|
390 |
//map basic service code |
|
391 |
ret = MapMobileServiceToBasicServiceCodeIsi( |
|
392 |
changeInfo->iServiceGroup, |
|
393 |
&mmiBasicServiceCode ); |
|
394 |
if ( KErrNone == ret ) |
|
395 |
{ |
|
396 |
//send ss call barring service request |
|
397 |
// fillers are used to send "bad" SS_GSM_PASSWORD |
|
398 |
// subblock to SS server in case password is omitted |
|
399 |
ret = SsGsmBarringReq( |
|
400 |
ESSOperationTypeSetCallBarringStatus, |
|
401 |
operation, |
|
402 |
iSsCode, |
|
403 |
&( changeInfo->iPassword ), |
|
404 |
KGsmNewPasswordFiller, |
|
405 |
KGsmVerifiedPasswordFiller, |
|
406 |
mmiBasicServiceCode ); |
|
407 |
} |
|
408 |
} |
|
409 |
} |
|
410 |
break; |
|
411 |
} |
|
412 |
||
413 |
case EMobilePhoneSetSSPassword: |
|
414 |
{ |
|
415 |
//unpack parameter: TMobilePhonePasswordChangeV2 and TUint16 |
|
416 |
RMobilePhone::TMobilePhonePasswordChangeV2 passwd; |
|
417 |
aDataPackage->UnPackData ( passwd, iSsCode ); |
|
418 |
||
419 |
// password change affects all services |
|
420 |
TUint8 mmiBasicServiceCode = SS_ALL_TELE_AND_BEARER; |
|
421 |
||
422 |
// client is fully responsible for making |
|
423 |
// "bad" password subblock |
|
424 |
ret = SsGsmBarringReq( |
|
425 |
ESSOperationTypeSetSSPassword, |
|
426 |
SS_GSM_PASSWORD_REGISTRATION, |
|
427 |
iSsCode, |
|
428 |
&passwd.iOldPassword, |
|
429 |
passwd.iNewPassword, |
|
430 |
passwd.iVerifiedPassword, |
|
431 |
mmiBasicServiceCode ); |
|
432 |
break; |
|
433 |
} |
|
434 |
||
435 |
case EMobilePhoneGetWaitingStatusPhase1: |
|
436 |
{ |
|
437 |
// no packed parameters |
|
438 |
// send ss call waiting service request |
|
439 |
ret = SsGsmWaitingReq( |
|
440 |
ESSOperationTypeGetCallWaitingStatus, |
|
441 |
SS_INTERROGATION, |
|
442 |
SS_GSM_CALL_WAITING, |
|
443 |
SS_ALL_TELE_AND_BEARER ); |
|
444 |
||
445 |
iSsCode = SS_GSM_CALL_WAITING; |
|
446 |
break; |
|
447 |
} |
|
448 |
||
449 |
case EMobilePhoneSetCallWaitingStatus: |
|
450 |
{ |
|
451 |
//unpack parameters: TMobileService and TMobilePhoneServiceAction |
|
452 |
RMobilePhone::TMobileService serviceGroup = |
|
453 |
RMobilePhone::EServiceUnspecified; |
|
454 |
RMobilePhone::TMobilePhoneServiceAction action; |
|
455 |
||
456 |
aDataPackage->UnPackData ( serviceGroup, action ); |
|
457 |
||
458 |
TUint8 operation( 0 ); |
|
459 |
TUint8 mmiBasicServiceCode( SS_UNKNOWN_SERVICE ); |
|
460 |
||
461 |
//map operation |
|
462 |
ret = MapOperationMmToIsi( action, &operation ); |
|
463 |
if ( KErrNone == ret ) |
|
464 |
{ |
|
465 |
//map basic service code |
|
466 |
ret = MapMobileServiceToBasicServiceCodeIsi( |
|
467 |
serviceGroup, |
|
468 |
&mmiBasicServiceCode ); |
|
469 |
||
470 |
if ( KErrNone == ret ) |
|
471 |
{ |
|
472 |
// send call waiting service request |
|
473 |
ret = SsGsmWaitingReq( |
|
474 |
ESSOperationTypeSetCallWaitingStatus, |
|
475 |
operation, |
|
476 |
SS_GSM_CALL_WAITING, |
|
477 |
mmiBasicServiceCode ); |
|
478 |
||
479 |
iSsCode = SS_GSM_CALL_WAITING; |
|
480 |
} |
|
481 |
} |
|
482 |
break; |
|
483 |
} |
|
484 |
||
485 |
case EMobilePhoneGetIdentityServiceStatus: |
|
486 |
{ |
|
487 |
// packed parameter: TMobilePhoneIdService (service code) |
|
488 |
RMobilePhone::TMobilePhoneIdService serviceETel; |
|
489 |
aDataPackage->UnPackData ( serviceETel ); |
|
490 |
||
491 |
MapIdentityServiceMmToIsi( serviceETel, &iSsCode ); |
|
492 |
// send ss identity service request |
|
493 |
ret = SsIdentityServiceReq( |
|
494 |
ESSOperationTypeGetIdentityServiceStatus, |
|
495 |
iSsCode ); |
|
496 |
break; |
|
497 |
} |
|
498 |
case EMobilePhoneSendNetworkServiceRequest: |
|
499 |
case EMobilePhoneSendNetworkServiceRequestNoFdnCheck: |
|
500 |
{ |
|
501 |
// These IPCs are received in case of SAT originated SS request. |
|
502 |
// In that case SS_GSM_SIM_ATK_INFO subblock must be inserted to |
|
503 |
// SS_SERVICE_NO_SIMATK_REQ to indicate if FDN check should be |
|
504 |
// done or not |
|
505 |
TUint8 trId( ESSOperationTypeSendNetworkServiceRequestNoFdnCheck ); |
|
506 |
TUint8 operation( SS_OPERATION_UNDEFINED ); |
|
507 |
TUint16 serviceCode( SS_CODE_UNDEFINED ); |
|
508 |
TPtrC ssInfoA; |
|
509 |
TPtrC ssInfoB; |
|
510 |
TPtrC ssInfoC; |
|
511 |
TPtrC* serviceString; |
|
512 |
TSsParser ssParser; |
|
513 |
||
514 |
// indicates that SS_GSM_SIMATK_INFO subblock must be added |
|
515 |
iCheckInfoSubblock = ETrue; |
|
516 |
||
517 |
// depending on ipc, FDN check must be done or not |
|
518 |
if ( EMobilePhoneSendNetworkServiceRequest == aIpc ) |
|
519 |
{ |
|
520 |
trId = ESSOperationTypeSendNetworkServiceRequest; |
|
521 |
iFdnCheck = ETrue; |
|
522 |
} |
|
523 |
||
524 |
// packed parameter: TPtrC* (service string) |
|
525 |
aDataPackage->UnPackData( serviceString ); |
|
526 |
||
527 |
// parse the service string: operation type, SS code and |
|
528 |
// supplementary info |
|
529 |
ret = ssParser.Parse( *serviceString ); |
|
530 |
||
531 |
// if parsing was successful, continue with creating a request |
|
532 |
if ( KErrNone == ret ) |
|
533 |
{ |
|
534 |
ssParser.GetSsOperation( operation ); |
|
535 |
ssParser.GetServiceCode( serviceCode); |
|
536 |
ssParser.GetServiceInfo( ssInfoA, ssInfoB, ssInfoC ); |
|
537 |
||
538 |
// set ss code |
|
539 |
iSsCode = serviceCode; |
|
540 |
||
541 |
ret = SsServiceReqSatOriginated( |
|
542 |
trId, |
|
543 |
operation, |
|
544 |
serviceCode, |
|
545 |
ssInfoA, |
|
546 |
ssInfoB, |
|
547 |
ssInfoC ); |
|
548 |
} |
|
549 |
else |
|
550 |
{ |
|
551 |
TFLOGSTRING( "TSY: CMmSupplServMessHandler::ExtFuncL: parsing of \ |
|
552 |
service string failed!" ); |
|
553 |
OstTrace0( TRACE_NORMAL, DUP4_CMMSUPPLSERVMESSHANDLER_EXTFUNCL, "CMmSupplServMessHandler::ExtFuncL, parsing of service string failed!" ); |
|
554 |
ret = KErrArgument; |
|
555 |
} |
|
556 |
||
557 |
// initialize flags back to "normal" state |
|
558 |
iFdnCheck = EFalse; |
|
559 |
iCheckInfoSubblock = EFalse; |
|
560 |
break; |
|
561 |
} |
|
562 |
case EMmTsyGetCallForwardingNumberIPC: |
|
563 |
{ |
|
564 |
iGetCallForwardingNumber = ETrue; |
|
565 |
ret = UiccReadCallFwdFlagsRel4Req(); |
|
566 |
break; |
|
567 |
} |
|
568 |
case EMobilePhoneGetIccMessageWaitingIndicators: |
|
569 |
{ |
|
570 |
UiccReadVoiceMsgFlagsRel4Req(); |
|
571 |
break; |
|
572 |
} |
|
573 |
case EMobilePhoneSetIccMessageWaitingIndicators: |
|
574 |
{ |
|
575 |
//unpack parameter: TMobilePhoneMessageWaitingV1 |
|
576 |
RMobilePhone::TMobilePhoneMessageWaitingV1* msgWaiting = NULL; |
|
577 |
aDataPackage->UnPackData ( &msgWaiting ); |
|
578 |
||
579 |
if( EMsgFlagTypeRel4 == iMsgFlagType ) |
|
580 |
{ |
|
581 |
UiccWriteVoiceMsgFlagsRel4Req( *msgWaiting ); |
|
582 |
} |
|
583 |
else |
|
584 |
{ |
|
585 |
UiccWriteVoiceMsgFlagsCPHSReq( *msgWaiting ); |
|
586 |
} |
|
587 |
break; |
|
588 |
} |
|
589 |
case ECustomGetIccCallForwardingStatusIPC: |
|
590 |
{ |
|
591 |
iGetIccCallForwardingStatus = ETrue; |
|
592 |
UiccReadCallFwdFlagsRel4Req(); |
|
593 |
break; |
|
594 |
} |
|
595 |
case ECustomNotifyIccCallForwardingStatusChangeIPC: |
|
596 |
{ |
|
597 |
iNotifyIccCallForwardingStatus = ETrue; |
|
598 |
UiccReadCallFwdFlagsRel4Req(); |
|
599 |
break; |
|
600 |
} |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
601 |
case ESatNotifySendSsPCmd: |
0 | 602 |
{ |
603 |
// SIM ATK TSY has informed that next SS request coming from |
|
604 |
// Etel is SAT originated and FDN check should not be done. |
|
605 |
iCheckInfoSubblock = ETrue; |
|
606 |
||
607 |
// FDN check should not be done for SAT originated requests |
|
608 |
iFdnCheck = EFalse; |
|
609 |
||
7
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
610 |
// Let's check is resource control suppress needed. This info is set |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
611 |
// by simatktsy when extFuncL is called with IPC ESatNotifySendSsPCmd |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
612 |
aDataPackage->UnPackData ( iResourceControlSuppress ); |
0 | 613 |
|
614 |
break; |
|
615 |
} |
|
616 |
default: |
|
617 |
{ |
|
618 |
// this method should only be called for SS cases |
|
619 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::ExtFuncL - Unknown IPC: %d", |
|
620 |
aIpc); |
|
621 |
OstTrace1( TRACE_NORMAL, DUP5_CMMSUPPLSERVMESSHANDLER_EXTFUNCL, "CMmSupplServMessHandler::ExtFuncL;Unknown aIpc=%d", aIpc ); |
|
622 |
ret = KErrArgument; |
|
623 |
break; |
|
624 |
} |
|
625 |
} |
|
626 |
||
627 |
return ret; |
|
628 |
} |
|
629 |
||
630 |
// ----------------------------------------------------------------------------- |
|
631 |
// CMmSupplServMessHandler::ProcessUiccMsg |
|
632 |
// Handles UICC messages |
|
633 |
// ----------------------------------------------------------------------------- |
|
634 |
// |
|
635 |
TInt CMmSupplServMessHandler::ProcessUiccMsg( |
|
636 |
TInt aTraId, |
|
637 |
TInt aStatus, |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
638 |
TUint8 /*aDetails*/, |
0 | 639 |
const TDesC8& aFileData ) |
640 |
{ |
|
641 |
TFLOGSTRING3("TSY: CMmSupplServMessHandler::ProcessUiccMsg, transaction ID: %d, status: %d", aTraId, aStatus ); |
|
642 |
OstTraceExt2( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_PROCESSUICCMSG, "CMmSupplServMessHandler::ProcessUiccMsg;aTraId=%d;aStatus=%d", aTraId, aStatus ); |
|
643 |
||
644 |
switch( aTraId ) |
|
645 |
{ |
|
646 |
case ETrIdReadCallFwdFlagsRel4: |
|
647 |
{ |
|
648 |
if ( UICC_STATUS_OK == aStatus ) |
|
649 |
{ |
|
650 |
// Flags were successfully read |
|
651 |
UiccHandleCallFwdFlagsResp( aStatus, aTraId, aFileData ); |
|
652 |
} |
|
653 |
else |
|
654 |
{ |
|
655 |
// Reading from rel4 didn't succeed, try to read CPHS |
|
656 |
UiccReadCallFwdFlagsCphsReq(); |
|
657 |
} |
|
658 |
break; |
|
659 |
} |
|
660 |
case ETrIdReadCallFwdFlagsCphs: |
|
661 |
{ |
|
662 |
UiccHandleCallFwdFlagsResp( aStatus, aTraId, aFileData ); |
|
663 |
break; |
|
664 |
} |
|
665 |
case ETrIdWriteCallFwdFlagsRel4: |
|
666 |
case ETrIdWriteCallFwdFlagsCphs: |
|
667 |
{ |
|
668 |
// Complete the SetCallForwardingStatus to SOS layer |
|
669 |
// always with KErrNone regardless of writing to SIM failed |
|
670 |
// or succeed |
|
671 |
iMessageRouter->Complete( |
|
672 |
EMobilePhoneSetCallForwardingStatus, |
|
673 |
KErrNone ); |
|
674 |
||
675 |
// This package is used at the completion of IPCs: |
|
676 |
// ECustomGetIccCallForwardingStatusIPC and |
|
677 |
// ECustomNotifyIccCallForwardingStatusChangeIPC |
|
678 |
CMmDataPackage customDataPackage; |
|
679 |
customDataPackage.PackData( &iTCFIndicators ); |
|
680 |
||
681 |
iMessageRouter->Complete( |
|
682 |
ECustomNotifyIccCallForwardingStatusChangeIPC, |
|
683 |
&customDataPackage, |
|
684 |
KErrNone ); |
|
685 |
break; |
|
686 |
} |
|
687 |
case ETrIdReadVoiceMsgFlagsRel4: |
|
688 |
{ |
|
689 |
if ( UICC_STATUS_OK == aStatus ) |
|
690 |
{ |
|
691 |
// Flags were successfully read |
|
692 |
UiccReadVoiceMsgFlagsResp( aTraId, aFileData ); |
|
693 |
} |
|
694 |
else |
|
695 |
{ |
|
696 |
// Reading from rel4 didn't succeed, try to read CPHS |
|
697 |
UiccReadVoiceMsgFlagsCphsReq(); |
|
698 |
} |
|
699 |
break; |
|
700 |
} |
|
701 |
case ETrIdReadVoiceMsgFlagsCphs: |
|
702 |
{ |
|
703 |
if ( UICC_STATUS_OK == aStatus ) |
|
704 |
{ |
|
705 |
UiccReadVoiceMsgFlagsResp( aTraId, aFileData ); |
|
706 |
} |
|
707 |
else // Complete error value |
|
708 |
{ |
|
709 |
iMessageRouter->Complete( |
|
710 |
EMobilePhoneGetIccMessageWaitingIndicators, |
|
711 |
KErrNotFound ); |
|
712 |
} |
|
713 |
break; |
|
714 |
} |
|
715 |
case ETrIdWriteVoiceMsgFlagsRel4: |
|
716 |
case ETrIdWriteVoiceMsgFlagsCphs: |
|
717 |
{ |
|
718 |
if ( UICC_STATUS_OK == aStatus ) |
|
719 |
{ |
|
720 |
aStatus = KErrNone; |
|
721 |
} |
|
722 |
else |
|
723 |
{ |
|
724 |
aStatus = KErrNotFound; |
|
725 |
} |
|
726 |
iMessageRouter->Complete( |
|
727 |
EMobilePhoneSetIccMessageWaitingIndicators, |
|
728 |
aStatus ); |
|
729 |
||
730 |
CMmDataPackage dataPackage; |
|
731 |
dataPackage.PackData( &iVMIndicators ); |
|
732 |
iMessageRouter->Complete( |
|
733 |
EMobilePhoneNotifyIccMessageWaitingIndicatorsChange, |
|
734 |
&dataPackage, |
|
735 |
aStatus ); |
|
736 |
break; |
|
737 |
} |
|
738 |
default: |
|
739 |
{ |
|
740 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::ProcessUiccMsg - unknown transaction ID" ); |
|
741 |
OstTrace0( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_PROCESSUICCMSG, "CMmSupplServMessHandler::ProcessUiccMsg - unknown transaction ID" ); |
|
742 |
break; |
|
743 |
} |
|
744 |
} |
|
745 |
return KErrNone; |
|
746 |
} |
|
747 |
||
748 |
// ----------------------------------------------------------------------------- |
|
749 |
// CMmSupplServMessHandler::ReceiveMessageL |
|
750 |
// Called when an ISI message has been received. |
|
751 |
// ----------------------------------------------------------------------------- |
|
752 |
// |
|
753 |
void CMmSupplServMessHandler::ReceiveMessageL |
|
754 |
( |
|
755 |
const TIsiReceiveC &aIsiMessage //received ISI message |
|
756 |
) |
|
757 |
{ |
|
758 |
TInt resource (aIsiMessage.Get8bit(ISI_HEADER_OFFSET_RESOURCEID) ); |
|
759 |
TInt messageId (aIsiMessage.Get8bit(ISI_HEADER_OFFSET_MESSAGEID) ); |
|
760 |
||
761 |
TFLOGSTRING3("TSY: CMmSupplServMessHandler::ReceiveMessageL - resource: %d, \ |
|
762 |
messageId: %d", resource, messageId); |
|
763 |
OstTraceExt2( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_RECEIVEMESSAGEL, "CMmSupplServMessHandler::ReceiveMessageL;resource=%d;messageId=%d", resource, messageId ); |
|
764 |
||
765 |
switch ( resource ) |
|
766 |
{ |
|
767 |
case PN_SS: |
|
768 |
{ |
|
769 |
switch( messageId ) |
|
770 |
{ |
|
771 |
case SS_SERVICE_COMPLETED_RESP: |
|
772 |
{ |
|
773 |
SsServiceCompletedRespL( aIsiMessage ); |
|
774 |
break; |
|
775 |
} |
|
776 |
case SS_SERVICE_FAILED_RESP: |
|
777 |
{ |
|
778 |
SsServiceFailedResp( aIsiMessage ); |
|
779 |
break; |
|
780 |
} |
|
781 |
case SS_SERVICE_NOT_SUPPORTED_RESP: |
|
782 |
{ |
|
783 |
SsServiceNotSupportedResp( aIsiMessage ); |
|
784 |
break; |
|
785 |
} |
|
786 |
case SS_GSM_USSD_SEND_RESP: |
|
787 |
{ |
|
788 |
SsGsmUssdSendResp( aIsiMessage ); |
|
789 |
break; |
|
790 |
} |
|
791 |
case SS_STATUS_IND: |
|
792 |
{ |
|
793 |
SsStatusInd( aIsiMessage ); |
|
794 |
break; |
|
795 |
} |
|
796 |
case SS_SERVICE_COMPLETED_IND: |
|
797 |
{ |
|
798 |
SsCompleteInd( aIsiMessage ); |
|
799 |
break; |
|
800 |
} |
|
801 |
default: |
|
802 |
{ |
|
803 |
TFLOGSTRING2( "TSY: CMmSupplServMessHandler::ReceiveMessageL - \ |
|
804 |
PN_SS - unknown msgId: %d", messageId ); |
|
805 |
OstTrace1( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_RECEIVEMESSAGEL, "CMmSupplServMessHandler::ReceiveMessageL;PN_SS - unknown msgId=%d", messageId ); |
|
806 |
break; |
|
807 |
} |
|
808 |
} // switch( messageId ) |
|
809 |
break; |
|
810 |
} |
|
811 |
default: |
|
812 |
{ |
|
813 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::ReceiveMessageL - unknown \ |
|
814 |
resource: %d", resource); |
|
815 |
OstTrace1( TRACE_NORMAL, DUP3_CMMSUPPLSERVMESSHANDLER_RECEIVEMESSAGEL, "CMmSupplServMessHandler::ReceiveMessageL;unknown resource=%d", resource ); |
|
816 |
break; |
|
817 |
} |
|
818 |
} // switch( resource ) |
|
819 |
} |
|
820 |
||
821 |
||
822 |
// ----------------------------------------------------------------------------- |
|
823 |
// CMmSupplServMessHandler::SsServiceReqSatOriginated |
|
824 |
// Calls appropiate function for creating SS_SERVICE_NO_SIMATK_REQ message |
|
825 |
// Returns KErrNone or error code |
|
826 |
// ----------------------------------------------------------------------------- |
|
827 |
// |
|
828 |
TInt CMmSupplServMessHandler::SsServiceReqSatOriginated( |
|
829 |
const TUint8 aTrId, // transaction ID |
|
830 |
const TUint8 aOperation, // operation type |
|
831 |
const TUint16 aServiceCode, // SS code |
|
832 |
const TDesC& ssInfoA, // SS info A |
|
833 |
const TDesC& ssInfoB, // SS info B |
|
834 |
const TDesC& ssInfoC ) // SS info C |
|
835 |
{ |
|
836 |
TFLOGSTRING( "TSY: CMmSupplServMessHandler::SsServiceReqSatOriginated" ); |
|
837 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_SSSERVICEREQSATORIGINATED, "CMmSupplServMessHandler::SsServiceReqSatOriginated" ); |
|
838 |
||
839 |
TInt ret( KErrNone ); |
|
840 |
TUint8 basicServiceCode( SS_ALL_TELE_AND_BEARER ); |
|
841 |
TSsParser parser; |
|
842 |
||
843 |
// find out the basic service code and other information |
|
844 |
switch ( aServiceCode ) |
|
845 |
{ |
|
846 |
case SS_GSM_ALL_FORWARDINGS: |
|
847 |
case SS_GSM_ALL_COND_FORWARDINGS: |
|
848 |
case SS_GSM_FORW_UNCONDITIONAL: |
|
849 |
case SS_GSM_FORW_BUSY: |
|
850 |
case SS_GSM_FORW_NO_REPLY: |
|
851 |
case SS_GSM_FORW_NO_REACH: |
|
852 |
{ |
|
853 |
TFLOGSTRING( "TSY: CMmSupplServMessHandler::SsServiceReqSatOriginated, \ |
|
854 |
call forwarding" ); |
|
855 |
OstTrace0( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_SSSERVICEREQSATORIGINATED, "CMmSupplServMessHandler::SsServiceReqSatOriginated, call forwarding" ); |
|
856 |
||
857 |
TUint8 numberType ( SS_NBR_TYPE_UNKNOWN ); |
|
858 |
TUint8 numberPlan ( SS_NBR_PLAN_ISDN_TELEPHONY ); |
|
859 |
TInt noReplyTime ( SS_UNDEFINED_TIME ); |
|
860 |
||
861 |
// forwarding number is in ssInfoA |
|
862 |
if ( 0 < ssInfoA.Length( ) ) |
|
863 |
{ |
|
864 |
TInt index( 0 ); |
|
865 |
||
866 |
// check number type |
|
867 |
if ( '+' == ssInfoA.operator[]( 0 ) ) |
|
868 |
{ |
|
869 |
numberType = SS_NBR_TYPE_INTERNATIONAL; |
|
870 |
index = 1; // ignore '+' in next for loop |
|
871 |
} |
|
872 |
||
873 |
// check number plan, loop all numbers |
|
874 |
for ( TInt i( index ); i < ssInfoA.Length( ); i++ ) |
|
875 |
{ |
|
876 |
if ( ( ssInfoA.operator[](i) < '0' ) || |
|
877 |
( ssInfoA.operator[](i) > '9' ) ) |
|
878 |
{ |
|
879 |
numberPlan = SS_NBR_PLAN_UNKNOWN; |
|
880 |
break; |
|
881 |
} |
|
882 |
} |
|
883 |
// number type: 4 MSB, number plan: 4 LSB |
|
884 |
numberType = ( ( numberType << 4 ) | numberPlan ); |
|
885 |
} |
|
886 |
||
887 |
// basic service code is in ssInfoB, must be converted to TUint8 |
|
888 |
basicServiceCode = ( TUint8 )parser.GetInt( ssInfoB ); |
|
889 |
||
890 |
// no reply condition timer (if exists) is in ssInfoC, |
|
891 |
// must be converted to TInt |
|
892 |
if ( 0 < ssInfoC.Length( ) ) |
|
893 |
{ |
|
894 |
noReplyTime = parser.GetInt( ssInfoC ); |
|
895 |
} |
|
896 |
||
897 |
ret = SsCallForwServiceReq( |
|
898 |
aTrId, |
|
899 |
aOperation, |
|
900 |
aServiceCode, |
|
901 |
numberType, |
|
902 |
noReplyTime, |
|
903 |
&ssInfoA, |
|
904 |
basicServiceCode ); |
|
905 |
||
906 |
break; |
|
907 |
} |
|
908 |
||
909 |
case SS_GSM_ALL_BARRINGS: |
|
910 |
case SS_GSM_BARR_ALL_OUT: |
|
911 |
case SS_GSM_BARR_OUT_INTER: |
|
912 |
case SS_GSM_BARR_OUT_INTER_EXC_HOME: |
|
913 |
case SS_GSM_BARR_ALL_IN: |
|
914 |
case SS_GSM_BARR_ALL_IN_ROAM: |
|
915 |
case SS_GSM_OUTGOING_BARR_SERV: |
|
916 |
case SS_GSM_INCOMING_BARR_SERV: |
|
917 |
{ |
|
918 |
TFLOGSTRING( "TSY: CMmSupplServMessHandler::SsServiceReqSatOriginated, \ |
|
919 |
call barring" ); |
|
920 |
OstTrace0( TRACE_NORMAL, DUP2_CMMSUPPLSERVMESSHANDLER_SSSERVICEREQSATORIGINATED, "CMmSupplServMessHandler::SsServiceReqSatOriginated, call barring" ); |
|
921 |
||
922 |
// basic service code is in ssInfoB, must be converted to TUint8 |
|
923 |
basicServiceCode = ( TUint8 )parser.GetInt( ssInfoB ); |
|
924 |
||
925 |
// if ssInfoA is empty - no password subblock is added |
|
926 |
// if ssInfoA has some data - subblock added with fillers |
|
927 |
ret = SsGsmBarringReq( |
|
928 |
aTrId, |
|
929 |
aOperation, |
|
930 |
aServiceCode, |
|
931 |
&ssInfoA, |
|
932 |
ssInfoA.Length() ? KGsmNewPasswordFiller() : KNullDesC(), |
|
933 |
ssInfoA.Length() ? KGsmVerifiedPasswordFiller() : KNullDesC(), |
|
934 |
basicServiceCode ); |
|
935 |
||
936 |
break; |
|
937 |
} |
|
938 |
||
939 |
case SS_GSM_CALL_WAITING: |
|
940 |
{ |
|
941 |
TFLOGSTRING( "TSY: CMmSupplServMessHandler::SsServiceReqSatOriginated, \ |
|
942 |
call waiting" ); |
|
943 |
OstTrace0( TRACE_NORMAL, DUP3_CMMSUPPLSERVMESSHANDLER_SSSERVICEREQSATORIGINATED, "CMmSupplServMessHandler::SsServiceReqSatOriginated, call waiting" ); |
|
944 |
// basic service code is in ssInfoA, must be converted to TUint8 |
|
945 |
basicServiceCode = ( TUint8 )parser.GetInt( ssInfoA ); |
|
946 |
ret = CreateServiceReqWithCheckInfo( |
|
947 |
aTrId, |
|
948 |
aOperation, |
|
949 |
aServiceCode, |
|
950 |
basicServiceCode ); |
|
951 |
||
952 |
break; |
|
953 |
} |
|
954 |
||
955 |
case SS_GSM_CLIP: |
|
956 |
case SS_GSM_CLIR: |
|
957 |
case SS_GSM_COLP: |
|
958 |
case SS_GSM_COLR: |
|
959 |
case SS_GSM_ECT: |
|
960 |
case SS_GSM_CNAP: |
|
961 |
{ |
|
962 |
TFLOGSTRING( "TSY: CMmSupplServMessHandler::SsServiceReqSatOriginated, \ |
|
963 |
other ss codes" ); |
|
964 |
OstTrace0( TRACE_NORMAL, DUP6_CMMSUPPLSERVMESSHANDLER_SSSERVICEREQSATORIGINATED, "CMmSupplServMessHandler::SsServiceReqSatOriginated, other ss codes" ); |
|
965 |
ret = CreateServiceReqWithCheckInfo( |
|
966 |
aTrId, |
|
967 |
aOperation, |
|
968 |
aServiceCode, |
|
969 |
basicServiceCode ); |
|
970 |
||
971 |
break; |
|
972 |
} |
|
973 |
||
974 |
default: |
|
975 |
{ |
|
976 |
TFLOGSTRING2( "TSY: CMmSupplServMessHandler::SsServiceReqSatOriginated, \ |
|
977 |
error: unknown ss service: %d", aServiceCode ); |
|
978 |
OstTraceExt1( TRACE_NORMAL, DUP7_CMMSUPPLSERVMESSHANDLER_SSSERVICEREQSATORIGINATED, "CMmSupplServMessHandler::SsServiceReqSatOriginated;ERROR: unknown ss service=%hu", aServiceCode ); |
|
979 |
ret = KErrArgument; |
|
980 |
break; |
|
981 |
} |
|
982 |
} |
|
983 |
return ret; |
|
984 |
} |
|
985 |
||
986 |
||
987 |
// ----------------------------------------------------------------------------- |
|
988 |
// CMmSupplServMessHandler::CreateServiceReqWithSimAtkInfo |
|
989 |
// Constructs a SS_SERVICE_NO_SIMATK_REQ ISI message with SIM ATK info |
|
990 |
// sub block. |
|
991 |
// Returns KErrNone or error code |
|
992 |
// ----------------------------------------------------------------------------- |
|
993 |
// |
|
994 |
TInt CMmSupplServMessHandler::CreateServiceReqWithCheckInfo( |
|
995 |
const TUint8 aTrId, |
|
996 |
const TUint8 aOperation, |
|
997 |
const TUint16 aServiceCode, |
|
998 |
const TUint8 aBasicServiceCode ) |
|
999 |
{ |
|
1000 |
TFLOGSTRING( "TSY: CMmSupplServMessHandler::CreateServiceReqWithCheckInfo" ); |
|
1001 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_CREATESERVICEREQWITHCHECKINFO, "CMmSupplServMessHandler::CreateServiceReqWithCheckInfo" ); |
|
1002 |
TInt ret( KErrNone ); |
|
1003 |
TUint8 numOfSubblocks( 1 ); |
|
1004 |
||
1005 |
// create ss service request message and set it to point send buffer |
|
1006 |
TIsiSend isimsg( iPhoNetSender->SendBufferDes( ) ); |
|
1007 |
||
1008 |
TBuf8<KDataAppendToServiceReqHeaderInBytes> data; |
|
1009 |
// transaction ID ( 1 byte) |
|
1010 |
data.Append( aTrId ); |
|
1011 |
// message ID ( 1 byte) |
|
1012 |
data.Append( SS_SERVICE_REQ ); |
|
1013 |
// operation type |
|
1014 |
data.Append( aOperation ); |
|
1015 |
// basic service code |
|
1016 |
data.Append( aBasicServiceCode ); |
|
1017 |
// SS code |
|
1018 |
data.Append( ( aServiceCode & 0xFF00 ) >> 8 );// first byte |
|
1019 |
data.Append( ( aServiceCode & 0xFF ) ); // second byte |
|
1020 |
// response data to send |
|
1021 |
data.Append( SS_SEND_ADDITIONAL_INFO ); |
|
1022 |
||
1023 |
isimsg.Set8bit( ISI_HEADER_OFFSET_RESOURCEID, PN_SS ); |
|
1024 |
isimsg.CopyData( ISI_HEADER_SIZE, data ); |
|
1025 |
||
1026 |
// create subblock SS_GSM_SIMATK_INFO |
|
1027 |
TBuf8<SIZE_SS_SB_CHECK_INFO>sbData( 0 ); |
|
1028 |
TIsiSubBlock ssCheckInfoSb( |
|
1029 |
sbData, |
|
1030 |
SS_SB_CHECK_INFO, |
|
1031 |
EIsiSubBlockTypeId8Len8 ); |
|
1032 |
||
1033 |
if ( iFdnCheck ) |
|
1034 |
{ |
|
1035 |
sbData.Append( SS_NO_FDN_CHECK_SUPPRESS ); |
|
1036 |
} |
|
1037 |
else |
|
1038 |
{ |
|
1039 |
sbData.Append( SS_FDN_CHECK_SUPPRESS ); |
|
1040 |
} |
|
1041 |
||
1042 |
if ( iResourceControlSuppress ) |
|
1043 |
{ |
|
1044 |
sbData.Append( SS_RESOURCE_CONTROL_SUPPRESS ); |
|
1045 |
} |
|
1046 |
else |
|
1047 |
{ |
|
1048 |
sbData.Append( SS_NO_RESOURCE_CONTROL_SUPPRESS ); |
|
1049 |
} |
|
1050 |
iResourceControlSuppress = EFalse; |
|
1051 |
||
1052 |
// add the SS_SB_CHECK_INFO subblock to service req |
|
1053 |
isimsg.CopyData( |
|
1054 |
ISI_HEADER_SIZE + |
|
1055 |
SIZE_SS_SERVICE_REQ, |
|
1056 |
ssCheckInfoSb.CompleteSubBlock( ) ); |
|
1057 |
||
1058 |
isimsg.Set8bit( |
|
1059 |
ISI_HEADER_SIZE + SS_SERVICE_REQ_OFFSET_SUBBLOCKCOUNT, |
|
1060 |
numOfSubblocks ); |
|
1061 |
||
1062 |
ret = iPhoNetSender->Send( isimsg.Complete( ) ); |
|
1063 |
||
1064 |
return ret; |
|
1065 |
} |
|
1066 |
||
1067 |
// ----------------------------------------------------------------------------- |
|
1068 |
// CMmSupplServMessHandler::SsCallForwServiceReq |
|
1069 |
// Constructs a SS_SERVICE_REQ ISI message with ss forwarding |
|
1070 |
// sub block. |
|
1071 |
// Returns KErrNone or error code |
|
1072 |
// ----------------------------------------------------------------------------- |
|
1073 |
// |
|
1074 |
TInt CMmSupplServMessHandler::SsCallForwServiceReq |
|
1075 |
( |
|
1076 |
TUint8 aTransactionId, //transaction id |
|
1077 |
TUint8 aOperation, //operation |
|
1078 |
TUint16 aMmiSsCode, //mmi ss code |
|
1079 |
TUint8 aTypeOfNumber, //type of number |
|
1080 |
TInt aNoReplyTime, //no reply time |
|
1081 |
TDesC16 const* aForwToNumber, //forwarded to number |
|
1082 |
TUint8 aMmiBasicServiceCode //MMI basic service code |
|
1083 |
) |
|
1084 |
{ |
|
1085 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::SsCallForwServiceReq"); |
|
1086 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_SSCALLFORWSERVICEREQ, "CMmSupplServMessHandler::SsCallForwServiceReq" ); |
|
1087 |
||
1088 |
TUint8 numOfSubblocks( 0 ); |
|
1089 |
TBuf<RMobilePhone::KMaxMobileTelNumberSize> number( 0 ); |
|
1090 |
//number can contain character '+' |
|
1091 |
if ( 0 < aForwToNumber->Length() ) |
|
1092 |
{ |
|
1093 |
if ( '+' == aForwToNumber->operator[]( 0 ) ) |
|
1094 |
{ |
|
1095 |
number.Copy( aForwToNumber->Mid( 1, aForwToNumber->Length() - 1 ) ); |
|
1096 |
} |
|
1097 |
else |
|
1098 |
{ |
|
1099 |
number.Copy( aForwToNumber->Left( aForwToNumber->Length() ) ); |
|
1100 |
} |
|
1101 |
} |
|
1102 |
||
1103 |
//create ss service request message and set it to point send buffer |
|
1104 |
TIsiSend ssServiceReq( iPhoNetSender->SendBufferDes( ) ); |
|
1105 |
||
1106 |
//create ss service request |
|
1107 |
TBuf8<KDataAppendToServiceReqHeaderInBytes> data; |
|
1108 |
data.Append( aTransactionId ); // transaction id |
|
1109 |
// Message id needs to be SS_SERVICE_REQ until |
|
1110 |
// SAT: ETEL Multimode API usage for SAT has been |
|
1111 |
// implemented by S60 |
|
1112 |
data.Append( SS_SERVICE_REQ ); |
|
1113 |
||
1114 |
data.Append( aOperation ); // operation |
|
1115 |
data.Append( aMmiBasicServiceCode ); // mmi basic service code |
|
1116 |
||
1117 |
//split aMmiSsCode to two TBuf8 ( data ) |
|
1118 |
data.Append( ( aMmiSsCode & 0xFF00 ) >> 8 );// first byte |
|
1119 |
data.Append( ( aMmiSsCode & 0xFF ) ); // second byte |
|
1120 |
||
1121 |
||
1122 |
// Custom Tsy's SsAdditionalInfoNotification needs this |
|
1123 |
data.Append( SS_SEND_ADDITIONAL_INFO ); |
|
1124 |
ssServiceReq.Set8bit( ISI_HEADER_OFFSET_RESOURCEID, PN_SS ); |
|
1125 |
ssServiceReq.CopyData( ISI_HEADER_SIZE, data ); |
|
1126 |
||
1127 |
// SS_GSM_SIMATK_INFO must be added to indicate SS server that |
|
1128 |
// FDN check must not be done |
|
1129 |
if ( iCheckInfoSubblock ) |
|
1130 |
{ |
|
1131 |
numOfSubblocks++; |
|
1132 |
||
1133 |
// create subblock SS_SB_CHECK_INFO |
|
1134 |
TBuf8<SIZE_SS_SB_CHECK_INFO>sbData( 0 ); |
|
1135 |
TIsiSubBlock ssCheckInfoSb( |
|
1136 |
sbData, |
|
1137 |
SS_SB_CHECK_INFO, |
|
1138 |
EIsiSubBlockTypeId8Len8 ); |
|
1139 |
||
1140 |
if ( iFdnCheck ) |
|
1141 |
{ |
|
1142 |
sbData.Append( SS_NO_FDN_CHECK_SUPPRESS ); |
|
1143 |
} |
|
1144 |
else |
|
1145 |
{ |
|
1146 |
sbData.Append( SS_FDN_CHECK_SUPPRESS ); |
|
1147 |
} |
|
1148 |
||
1149 |
if ( iResourceControlSuppress ) |
|
1150 |
{ |
|
1151 |
sbData.Append( SS_RESOURCE_CONTROL_SUPPRESS ); |
|
1152 |
} |
|
1153 |
else |
|
1154 |
{ |
|
1155 |
sbData.Append( SS_NO_RESOURCE_CONTROL_SUPPRESS ); |
|
1156 |
} |
|
1157 |
iResourceControlSuppress = EFalse; |
|
1158 |
||
1159 |
// add the subblock |
|
1160 |
ssServiceReq.CopyData( |
|
1161 |
ISI_HEADER_SIZE + SIZE_SS_SERVICE_REQ, |
|
1162 |
ssCheckInfoSb.CompleteSubBlock() ); |
|
1163 |
} |
|
1164 |
// SS Server expects that the phone number is present if the SS_FORWARDING |
|
1165 |
// sub block is sent. |
|
1166 |
if ( number.Length() ) |
|
1167 |
{ |
|
1168 |
numOfSubblocks++; |
|
1169 |
// create Ss Forwarding sub block |
|
1170 |
// allocate enough memory for forwading data |
|
1171 |
TBuf8< SIZE_SS_FORWARDING + RMobilePhone::KMaxMobileTelNumberSize * 2 > |
|
1172 |
dataForwarding( 0 ); |
|
1173 |
TIsiSubBlock forwardingSb( |
|
1174 |
dataForwarding, |
|
1175 |
SS_FORWARDING, |
|
1176 |
EIsiSubBlockTypeId8Len8 ) ; |
|
1177 |
dataForwarding.Append( aTypeOfNumber ); |
|
1178 |
||
1179 |
//if reply time is not defined set to SS_UNDEFINED_TIME |
|
1180 |
if ( 0 > aNoReplyTime ) |
|
1181 |
{ |
|
1182 |
aNoReplyTime = SS_UNDEFINED_TIME; |
|
1183 |
} |
|
1184 |
||
1185 |
dataForwarding.Append( aNoReplyTime ); |
|
1186 |
dataForwarding.Append( number.Length() ); |
|
1187 |
dataForwarding.Append( 0x00 ); // Subaddress length |
|
1188 |
// Copy 16 to 8 |
|
1189 |
TIsiUtility::CopyToBigEndian( number, dataForwarding ); |
|
1190 |
||
1191 |
if ( ! iCheckInfoSubblock ) |
|
1192 |
{ |
|
1193 |
ssServiceReq.CopyData( |
|
1194 |
ISI_HEADER_SIZE + SIZE_SS_SERVICE_REQ, |
|
1195 |
forwardingSb.CompleteSubBlock( ) ); |
|
1196 |
} |
|
1197 |
else |
|
1198 |
{ |
|
1199 |
ssServiceReq.CopyData( |
|
1200 |
ISI_HEADER_SIZE + SIZE_SS_SERVICE_REQ + SIZE_SS_SB_CHECK_INFO, |
|
1201 |
forwardingSb.CompleteSubBlock( ) ); |
|
1202 |
} |
|
1203 |
} |
|
1204 |
||
1205 |
// Set number of subblocks |
|
1206 |
ssServiceReq.Set8bit( |
|
1207 |
ISI_HEADER_SIZE + SS_SERVICE_REQ_OFFSET_SUBBLOCKCOUNT, |
|
1208 |
numOfSubblocks ); |
|
1209 |
iCheckInfoSubblock = EFalse; |
|
1210 |
||
1211 |
//send message via phonet |
|
1212 |
return iPhoNetSender->Send( ssServiceReq.Complete() ); |
|
1213 |
} |
|
1214 |
||
1215 |
// ----------------------------------------------------------------------------- |
|
1216 |
// CMmSupplServMessHandler::SsServiceCompletedRespL |
|
1217 |
// Called when an SS_SERVICE_COMPLETED_RESP message has been received. |
|
1218 |
// This function is called in case of successful service response, which is |
|
1219 |
// completed with KErrNone ( unless original SS request was changed |
|
1220 |
// or initiated by Call Control ) |
|
1221 |
// |
|
1222 |
// First check if this is a response to a password registration request. |
|
1223 |
// If not, the SS code defines which service (call forwarding, call barring, |
|
1224 |
// call waiting, identity service) is affected. The operation code defines if |
|
1225 |
// this is a response to a status interrogation or an action that sets the |
|
1226 |
// status. |
|
1227 |
// |
|
1228 |
// Some details on the response message structure for interrogations: |
|
1229 |
// |
|
1230 |
// The response to a Call Forwarding status interrogation (SS codes |
|
1231 |
// 2, 4, 21, 61, 62, 67) may contain a SS_GSM_FORWARDING_INFO sub block. If |
|
1232 |
// the sub block exists, it always contains SS_GSM_FORWARDING_FEATURE sub |
|
1233 |
// blocks. If the sub block does not exist, the result of a SS_STATUS_RESULT |
|
1234 |
// sub block is read. If also this does not exist, it means "Service Not Active" |
|
1235 |
// for the requested condition. |
|
1236 |
// |
|
1237 |
// The response to a Call Barring status interrogation (SS codes 33, 35, 330, |
|
1238 |
// 331, 332, 333, 353) may contain a SS_GSM_BSC_INFO sub block. If the sub block |
|
1239 |
// does not exist, the result of a SS_STATUS_RESULT sub block is read. If also this |
|
1240 |
// does not exist, it means "Service Not Active" for the requested condition. |
|
1241 |
// |
|
1242 |
// The response to a Call Waiting status interrogation (SS code 43) may contain |
|
1243 |
// a SS_GSM_BSC_INFO sub block. If the sub block does not exist, the result |
|
1244 |
// of a SS_STATUS_RESULT sub block is read. If also this does not exist, it means |
|
1245 |
// "Service Not Active". |
|
1246 |
// |
|
1247 |
// The response to a status interrogation of one of the Identity Services CLIP, |
|
1248 |
// COLP, COLR, CNAP (SS codes 30, 76, 77, 300) always contains a |
|
1249 |
// SS_STATUS_RESULT sub block. |
|
1250 |
// |
|
1251 |
// The response to a status interrogation of the Identity Service CLIR (SS |
|
1252 |
// code 31) may contain a SS_GSM_GENERIC_SERVICE_INFO sub block, which |
|
1253 |
// in turn always contains a SS_GSM_CLIR_INFO sub block. If the sub block |
|
1254 |
// does not exist, the result of a SS_STATUS_RESULT sub block is read. |
|
1255 |
// |
|
1256 |
// ----------------------------------------------------------------------------- |
|
1257 |
// |
|
1258 |
void CMmSupplServMessHandler::SsServiceCompletedRespL |
|
1259 |
( |
|
1260 |
const TIsiReceiveC &aIsiMessage //received isi message |
|
1261 |
) |
|
1262 |
{ |
|
1263 |
||
1264 |
// read some commonly used values from response message: |
|
1265 |
TPreprocessedSsServiceCompleteResponse response( aIsiMessage ); |
|
1266 |
// transaction id |
|
1267 |
response.iTraId = aIsiMessage.Get8bit( |
|
1268 |
ISI_HEADER_SIZE + SS_SERVICE_COMPLETED_RESP_OFFSET_TRANSID ); |
|
1269 |
||
1270 |
// number of included sub blocks |
|
1271 |
response.iNumSubBlocks = aIsiMessage.Get8bit( |
|
1272 |
ISI_HEADER_SIZE + SS_SERVICE_COMPLETED_RESP_OFFSET_SUBBLOCKCOUNT ); |
|
1273 |
// operation |
|
1274 |
response.iOperation = aIsiMessage.Get8bit( |
|
1275 |
ISI_HEADER_SIZE + SS_SERVICE_COMPLETED_RESP_OFFSET_OPERATION ); |
|
1276 |
// ss code |
|
1277 |
response.iSsCode = aIsiMessage.Get16bit( |
|
1278 |
ISI_HEADER_SIZE + SS_SERVICE_COMPLETED_RESP_OFFSET_SSCODE ); |
|
1279 |
// basic service |
|
1280 |
response.iBasicService = aIsiMessage.Get8bit( |
|
1281 |
ISI_HEADER_SIZE + SS_SERVICE_COMPLETED_RESP_OFFSET_BASICSERVICECODE ); |
|
1282 |
||
1283 |
TFLOGSTRING3("TSY: CMmSupplServMessHandler::SsServiceCompletedRespL number \ |
|
1284 |
of sub blocks: %d, operation: %d", response.iNumSubBlocks, response.iOperation ); |
|
1285 |
OstTraceExt2( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_SSSERVICECOMPLETEDRESPL, "CMmSupplServMessHandler::SsServiceCompletedRespL;numSubBlocks=%hhu;operation=%hhu", response.iNumSubBlocks, response.iOperation ); |
|
1286 |
TFLOGSTRING3("TSY: CMmSupplServMessHandler::SsServiceCompletedRespL ssCode: \ |
|
1287 |
%d, basicService: %d", response.iSsCode, response.iBasicService ); |
|
1288 |
OstTraceExt2( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_SSSERVICECOMPLETEDRESPL, "CMmSupplServMessHandler::SsServiceCompletedRespL;ssCode=%hu;basicService=%hhu", response.iSsCode, response.iBasicService ); |
|
1289 |
||
1290 |
if ( |
|
1291 |
ProcessIfSsRequestChanged( response ) || // original SS request is changed, or initiated by Call Control |
|
1292 |
ProcessSsGsmPasswordRegistration( response ) || // password changed successfully |
|
1293 |
ProcessIfSimpleCompletionPossible( response ) || |
|
1294 |
ProcessIfCallForwardingL( response ) || // call forwarding cases |
|
1295 |
ProcessIfCallBarringL( response ) || // call barring cases |
|
1296 |
ProcessIfCallWaitingL( response ) || // call waiting cases |
|
1297 |
ProcessIfIdentityServices( response ) // identity services |
|
1298 |
) |
|
1299 |
{ |
|
1300 |
// response to SS request was expected and completed, reset iSsCode |
|
1301 |
iSsCode = KSsCodeNoValue; |
|
1302 |
} |
|
1303 |
else |
|
1304 |
{ |
|
1305 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::SsServiceCompletedRespL \ |
|
1306 |
- unknown ssCode: %d", response.iSsCode ); |
|
1307 |
OstTraceExt1( TRACE_NORMAL, DUP5_CMMSUPPLSERVMESSHANDLER_SSSERVICECOMPLETEDRESPL, "CMmSupplServMessHandler::SsServiceCompletedRespL;ssCode=%hu", response.iSsCode ); |
|
1308 |
} |
|
1309 |
} |
|
1310 |
||
1311 |
// ----------------------------------------------------------------------------- |
|
1312 |
// CMmSupplServMessHandler::HandleSsGsmForwardingSubBlockL |
|
1313 |
// Reads a SS_GSM_FORWARDING_INFO sub block and saves results in iCFList |
|
1314 |
// ----------------------------------------------------------------------------- |
|
1315 |
// |
|
1316 |
void CMmSupplServMessHandler::HandleSsGsmForwardingSubBlockL |
|
1317 |
( |
|
1318 |
const TIsiReceiveC& aIsiMessage, //received isi message |
|
1319 |
TUint aSbStartOffset, //Ss Gsm Forwarding info sub block offset |
|
1320 |
TUint16 aSsCode //SS condition |
|
1321 |
) |
|
1322 |
{ |
|
1323 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::HandleSsGsmForwardingSubBlockL - \ |
|
1324 |
SS condition: %d", aSsCode); |
|
1325 |
OstTraceExt1( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_HANDLESSGSMFORWARDINGSUBBLOCKL, "CMmSupplServMessHandler::HandleSsGsmForwardingSubBlockL;aSsCode=%hu", aSsCode ); |
|
1326 |
||
1327 |
TUint sbStartOffset( aSbStartOffset ); |
|
1328 |
||
1329 |
// get number of SS_GSM_FORWARDING_FEATURE sub blocks in this |
|
1330 |
// SS_GSM_FORWARDING_INFO sub block |
|
1331 |
TUint8 numSubBlocks( aIsiMessage.Get8bit( |
|
1332 |
aSbStartOffset + SS_GSM_FORWARDING_INFO_OFFSET_SUBBLOCKCOUNT ) ); |
|
1333 |
||
1334 |
// As there can be several sub blocks, we cannot use |
|
1335 |
// FindSubBlockOffsetById. Using FindSubBlockOffsetByIndex instead. |
|
1336 |
TInt subIndex = 1; |
|
1337 |
||
1338 |
// check all sublocks |
|
1339 |
while ( subIndex <= numSubBlocks && |
|
1340 |
KErrNone == aIsiMessage.FindSubBlockOffsetByIndex( |
|
1341 |
aSbStartOffset + SIZE_SS_GSM_FORWARDING_INFO, |
|
1342 |
subIndex, |
|
1343 |
EIsiSubBlockTypeId8Len8, |
|
1344 |
sbStartOffset ) ) |
|
1345 |
{ |
|
1346 |
// get subblock ID |
|
1347 |
TUint8 sbId = aIsiMessage.Get8bit( sbStartOffset ); |
|
1348 |
||
1349 |
// if SS_GSM_FORWARDING_FEATURE |
|
1350 |
if ( SS_GSM_FORWARDING_FEATURE == sbId ) |
|
1351 |
{ |
|
1352 |
||
1353 |
// Extract ISI values from subblock |
|
1354 |
TUint8 mmiBsc = aIsiMessage.Get8bit( |
|
1355 |
sbStartOffset + SS_GSM_FORWARDING_FEATURE_OFFSET_BASICSERVICECODE ); |
|
1356 |
||
1357 |
TUint8 ssStatus = aIsiMessage.Get8bit( |
|
1358 |
sbStartOffset + SS_GSM_FORWARDING_FEATURE_OFFSET_SSSTATUS ); |
|
1359 |
||
1360 |
TUint8 typeOfNumber = aIsiMessage.Get8bit( |
|
1361 |
sbStartOffset + SS_GSM_FORWARDING_FEATURE_OFFSET_TYPEOFNUMBER ); |
|
1362 |
||
1363 |
TUint8 noReplyTime = aIsiMessage.Get8bit( |
|
1364 |
sbStartOffset + SS_GSM_FORWARDING_FEATURE_OFFSET_NOREPLYTIME ); |
|
1365 |
||
1366 |
TUint8 offsetNumberLength( aIsiMessage.Get8bit( |
|
1367 |
sbStartOffset + SS_GSM_FORWARDING_FEATURE_OFFSET_NUMBERLENGTH ) ); |
|
1368 |
||
1369 |
//numberlength is unicode -> multiplicand by 2 |
|
1370 |
TPtrC8 number ( aIsiMessage.GetData( |
|
1371 |
sbStartOffset + SS_GSM_FORWARDING_FEATURE_OFFSET_NUMBER, |
|
1372 |
offsetNumberLength * 2 ) ); |
|
1373 |
||
1374 |
// Convert ISI values to ETel values |
|
1375 |
RMobilePhone::TMobilePhoneCFInfoEntryV1 infoEntry; |
|
1376 |
||
1377 |
//Condition is got from the main message structure |
|
1378 |
MapCFConditionIsiToMm( aSsCode, &infoEntry.iCondition ); |
|
1379 |
MapBasicServiceCodeIsiToMm( mmiBsc, &infoEntry.iServiceGroup ); |
|
1380 |
MapCFStatusIsiToMm( ssStatus, &infoEntry.iStatus ); |
|
1381 |
MapTypeOfNumberIsiToMm( |
|
1382 |
typeOfNumber, |
|
1383 |
&infoEntry.iNumber.iTypeOfNumber, |
|
1384 |
&infoEntry.iNumber.iNumberPlan ); |
|
1385 |
||
1386 |
TBuf8<RMobilePhone::KMaxMobileTelNumberSize> number2( 0 ); |
|
1387 |
// Check if number is international number and numberLength is |
|
1388 |
// bigger than zero. The length of the string does not have to be checked |
|
1389 |
// since the original max length was 100. When the string was sent to ISA |
|
1390 |
// side the '+' character was cut off and now we just put it back. |
|
1391 |
if ( ( RMobilePhone::EInternationalNumber == infoEntry.iNumber.iTypeOfNumber ) |
|
1392 |
&& ( 0x00 != number.Length() ) ) |
|
1393 |
{ |
|
1394 |
// add '+' character back to the string |
|
1395 |
number2.Append( 0x00 ); |
|
1396 |
number2.Append( '+' ); |
|
1397 |
} |
|
1398 |
//append tel number to number2 |
|
1399 |
number2.Append( number ); |
|
1400 |
||
1401 |
TIsiUtility::CopyFromBigEndian( number2, infoEntry.iNumber.iTelNumber ); |
|
1402 |
MapTimeoutIsiToMm( noReplyTime, &infoEntry.iTimeout ); |
|
1403 |
||
1404 |
// Save this entry |
|
1405 |
iCFResults->AddEntryL( infoEntry ); |
|
1406 |
||
1407 |
}//if SS_GSM_FORWARDING_FEATURE |
|
1408 |
||
1409 |
// uppdate indexcount |
|
1410 |
subIndex++; |
|
1411 |
||
1412 |
} // while |
|
1413 |
||
1414 |
return; |
|
1415 |
} |
|
1416 |
||
1417 |
// ----------------------------------------------------------------------------- |
|
1418 |
// CMmSupplServMessHandler::HandleBarringSsGsmBscInfoSubBlockL |
|
1419 |
// Reads a SS_GSM_BSC_INFO sub block (coming with response for a |
|
1420 |
// call barring status request) and saves results in iCBList |
|
1421 |
// ----------------------------------------------------------------------------- |
|
1422 |
// |
|
1423 |
void CMmSupplServMessHandler::HandleBarringSsGsmBscInfoSubBlockL |
|
1424 |
( |
|
1425 |
const TIsiReceiveC &aIsiMessage, //received isi message |
|
1426 |
TUint aSbStartOffset, //Ss Gsm Bsc info sub block offset |
|
1427 |
TUint16 aSsCode // service code (barring condition) |
|
1428 |
) |
|
1429 |
{ |
|
1430 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::HandleBarringSsGsmBscInfoSubBlockL \ |
|
1431 |
- service code: %d", aSsCode); |
|
1432 |
OstTraceExt1( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_HANDLEBARRINGSSGSMBSCINFOSUBBLOCKL, "CMmSupplServMessHandler::HandleBarringSsGsmBscInfoSubBlockL;aSsCode=%hu", aSsCode ); |
|
1433 |
||
1434 |
//get number of basic service codes in this SS_GSM_BSC_INFO sub block |
|
1435 |
TUint8 numBsc( aIsiMessage.Get8bit( |
|
1436 |
aSbStartOffset + SS_GSM_BSC_INFO_OFFSET_NUMBEROFBSC )); |
|
1437 |
||
1438 |
if( 0 < numBsc ) |
|
1439 |
{ |
|
1440 |
// there's no other way to get the BSCs than to extract |
|
1441 |
// them directly from this array of 8-Bit unsigned integers |
|
1442 |
||
1443 |
// get the address and reserve the memory |
|
1444 |
HBufC8* allBscs = aIsiMessage.GetData( |
|
1445 |
aSbStartOffset + SS_GSM_BSC_INFO_OFFSET_BASICSERVICECODE, |
|
1446 |
numBsc ).AllocL(); |
|
1447 |
||
1448 |
for ( TInt i = 0; i < numBsc; i++ ) |
|
1449 |
{ |
|
1450 |
// Extract ISI values from subblock |
|
1451 |
TUint8 bsc = ( *allBscs )[i]; |
|
1452 |
||
1453 |
// Convert ISI values to ETel values |
|
1454 |
RMobilePhone::TMobilePhoneCBInfoEntryV1 infoEntry; |
|
1455 |
||
1456 |
// this BSC info comes only for those service groups |
|
1457 |
// for which barring is active |
|
1458 |
infoEntry.iStatus = RMobilePhone::ECallBarringStatusActive; |
|
1459 |
MapCBConditionIsiToMm( aSsCode, &infoEntry.iCondition ); |
|
1460 |
TInt ret = MapBasicServiceCodeIsiToMm( bsc, &infoEntry.iServiceGroup ); |
|
1461 |
if ( KErrNone != ret ) |
|
1462 |
{ |
|
1463 |
TFLOGSTRING2( "TSY: CMmSupplServMessHandler::HandleSsGsmBscInfoSubBlockL: \ |
|
1464 |
Unknown Basic Service Group = %d received. Skipping this entry.", bsc ); |
|
1465 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_HANDLEBARRINGSSGSMBSCINFOSUBBLOCKL, "CMmSupplServMessHandler::HandleBarringSsGsmBscInfoSubBlockL;Unknown Basic Service Group=%hhu", bsc ); |
|
1466 |
continue; // ignore this entry and go to the next one |
|
1467 |
} |
|
1468 |
||
1469 |
// Save this entry |
|
1470 |
iCBResults->AddEntryL( infoEntry ); |
|
1471 |
} |
|
1472 |
||
1473 |
// release memory |
|
1474 |
delete allBscs; |
|
1475 |
allBscs = NULL; |
|
1476 |
} |
|
1477 |
} |
|
1478 |
||
1479 |
// ----------------------------------------------------------------------------- |
|
1480 |
// CMmSupplServMessHandler::HandleWaitingSsGsmBscInfoSubBlockL |
|
1481 |
// Reads a SS_GSM_BSC_INFO sub block (coming with response for a |
|
1482 |
// call waiting status request) and saves results in iCWList |
|
1483 |
// ----------------------------------------------------------------------------- |
|
1484 |
// |
|
1485 |
void CMmSupplServMessHandler::HandleWaitingSsGsmBscInfoSubBlockL |
|
1486 |
( |
|
1487 |
const TIsiReceiveC &aIsiMessage, //received isi message |
|
1488 |
TUint aSbStartOffset //Ss Gsm Bsc info sub block offset |
|
1489 |
) |
|
1490 |
{ |
|
1491 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::HandleWaitingSsGsmBscInfoSubBlockL"); |
|
1492 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_HANDLEWAITINGSSGSMBSCINFOSUBBLOCKL, "CMmSupplServMessHandler::HandleWaitingSsGsmBscInfoSubBlockL" ); |
|
1493 |
||
1494 |
//get number of basic service codes in this SS_GSM_BSC_INFO sub block |
|
1495 |
TUint8 numBsc( aIsiMessage.Get8bit( |
|
1496 |
aSbStartOffset + SS_GSM_BSC_INFO_OFFSET_NUMBEROFBSC )); |
|
1497 |
||
1498 |
if( 0 < numBsc ) |
|
1499 |
{ |
|
1500 |
// there's no other way to get the BSCs than to extract |
|
1501 |
// them directly from this array of 8-Bit values |
|
1502 |
||
1503 |
// get the address and reserve the memory |
|
1504 |
HBufC8* allBscs = aIsiMessage.GetData( |
|
1505 |
aSbStartOffset + SS_GSM_BSC_INFO_OFFSET_BASICSERVICECODE, |
|
1506 |
numBsc ).AllocL(); |
|
1507 |
||
1508 |
for ( TInt i = 0; i < numBsc; i++ ) |
|
1509 |
{ |
|
1510 |
// Extract ISI values from subblock |
|
1511 |
TUint8 bsc = ( *allBscs )[i]; |
|
1512 |
||
1513 |
// Convert ISI values to ETel values |
|
1514 |
RMobilePhone::TMobilePhoneCWInfoEntryV1 infoEntry; |
|
1515 |
||
1516 |
// this BSC info comes only for those service groups |
|
1517 |
// for which waiting is active |
|
1518 |
infoEntry.iStatus = RMobilePhone::ECallWaitingStatusActive; |
|
1519 |
TInt ret = MapBasicServiceCodeIsiToMm( bsc, &infoEntry.iServiceGroup ); |
|
1520 |
if ( KErrNone != ret ) |
|
1521 |
{ |
|
1522 |
TFLOGSTRING2( "TSY: CMmSupplServMessHandler::HandleSsGsmDataSubBlockL: \ |
|
1523 |
Unknown Basic Service Group = %d received. Skipping this entry.", bsc ); |
|
1524 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_HANDLEWAITINGSSGSMBSCINFOSUBBLOCKL, "CMmSupplServMessHandler::HandleWaitingSsGsmBscInfoSubBlockL;Unknown Basic Service Group=%hhu", bsc ); |
|
1525 |
continue; // ignore this entry and go to the next one |
|
1526 |
} |
|
1527 |
// Save this entry |
|
1528 |
iCWResults->AddEntryL( infoEntry ); |
|
1529 |
} |
|
1530 |
||
1531 |
// release memory |
|
1532 |
delete allBscs; |
|
1533 |
allBscs = NULL; |
|
1534 |
} |
|
1535 |
} |
|
1536 |
||
1537 |
// ----------------------------------------------------------------------------- |
|
1538 |
// CMmSupplServMessHandler::SsServiceFailedResp |
|
1539 |
// Reads a SS_SERVICE_FAILED_RESP and completes to client |
|
1540 |
// ----------------------------------------------------------------------------- |
|
1541 |
// |
|
1542 |
void CMmSupplServMessHandler::SsServiceFailedResp |
|
1543 |
( |
|
1544 |
const TIsiReceiveC &aIsiMessage //received isi message |
|
1545 |
) |
|
1546 |
{ |
|
1547 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::SsServiceFailedResp"); |
|
1548 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_SSSERVICEFAILEDRESP, "CMmSupplServMessHandler::SsServiceFailedResp" ); |
|
1549 |
||
1550 |
TInt errorToClient( KErrGeneral ); |
|
1551 |
||
1552 |
//sub block start offset |
|
1553 |
TUint sbStartOffset( 0 ); |
|
1554 |
||
1555 |
//if sub block exists |
|
1556 |
if ( KErrNone == aIsiMessage.FindSubBlockOffsetByIndex( |
|
1557 |
ISI_HEADER_SIZE + SIZE_SS_SERVICE_FAILED_RESP, |
|
1558 |
1, |
|
1559 |
EIsiSubBlockTypeId8Len8, |
|
1560 |
sbStartOffset ) ) |
|
1561 |
{ |
|
1562 |
TUint8 subBlockId = aIsiMessage.Get8bit( sbStartOffset ); |
|
1563 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::SsServiceFailedResp - \ |
|
1564 |
sub block Id: %d", subBlockId); |
|
1565 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_SSSERVICEFAILEDRESP, "CMmSupplServMessHandler::SsServiceFailedResp;subBlockId=%hhu", subBlockId ); |
|
1566 |
switch ( subBlockId ) |
|
1567 |
{ |
|
1568 |
case SS_GSM_INDICATE_PASSWORD_ERROR: |
|
1569 |
{ |
|
1570 |
errorToClient = CMmStaticUtility::CSCauseToEpocError( |
|
1571 |
PN_SS, |
|
1572 |
subBlockId, |
|
1573 |
aIsiMessage.Get8bit( sbStartOffset + |
|
1574 |
SS_GSM_INDICATE_PASSWORD_ERROR_OFFSET_GUIDANCEINFO ) ); |
|
1575 |
break; |
|
1576 |
} |
|
1577 |
case SS_GSM_INDICATE_ERROR: |
|
1578 |
{ |
|
1579 |
errorToClient = CMmStaticUtility::CSCauseToEpocError( |
|
1580 |
PN_SS, |
|
1581 |
subBlockId, |
|
1582 |
aIsiMessage.Get8bit( sbStartOffset + |
|
1583 |
SS_GSM_INDICATE_ERROR_OFFSET_ERRORCODE ) ); |
|
1584 |
break; |
|
1585 |
} |
|
1586 |
case SS_GSM_INDICATE_PROBLEM: |
|
1587 |
{ |
|
1588 |
errorToClient = CMmStaticUtility::CSCauseToEpocError( |
|
1589 |
PN_SS, |
|
1590 |
aIsiMessage.Get8bit( sbStartOffset + |
|
1591 |
SS_GSM_INDICATE_PROBLEM_OFFSET_PROBLEMTYPE ), |
|
1592 |
aIsiMessage.Get8bit( sbStartOffset + |
|
1593 |
SS_GSM_INDICATE_PROBLEM_OFFSET_PROBLEMCODE ) ); |
|
1594 |
break; |
|
1595 |
} |
|
1596 |
case SS_GSM_INDICATE_MSG_ERROR: |
|
1597 |
{ |
|
1598 |
errorToClient = CMmStaticUtility::CSCauseToEpocError( |
|
1599 |
PN_SS, |
|
1600 |
subBlockId, |
|
1601 |
aIsiMessage.Get8bit( sbStartOffset + |
|
1602 |
SS_GSM_INDICATE_MSG_ERROR_OFFSET_MESSAGEERRORCODE ) ); |
|
1603 |
break; |
|
1604 |
} |
|
1605 |
case SS_OTHER_ERROR: |
|
1606 |
{ |
|
1607 |
//If cause value is KSsGsmSsNotAvailable (comes in SS_OTHER_ERROR sub block) |
|
1608 |
//this indicates that there is not network coverage. |
|
7
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1609 |
TUint8 errorCode( aIsiMessage.Get8bit( |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1610 |
sbStartOffset + SS_OTHER_ERROR_OFFSET_ERRORCODE ) ); |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1611 |
|
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1612 |
if( SS_GSM_SS_NOT_AVAILABLE == errorCode ) |
0 | 1613 |
{ |
1614 |
errorToClient = CMmStaticUtility::EpocErrorCode( |
|
1615 |
KErrCouldNotConnect, |
|
1616 |
KErrGsmSMSNoNetworkService ); |
|
1617 |
TFLOGSTRING("CMmSupplServMessHandler::SsServiceFailedRespL. \ |
|
1618 |
Cause: KSsGsmSsNotAvailable => No network coverage." ); |
|
1619 |
OstTrace0( TRACE_NORMAL, DUP2_CMMSUPPLSERVMESSHANDLER_SSSERVICEFAILEDRESP, "CMmSupplServMessHandler::SsServiceFailedResp, Cause: KSsGsmSsNotAvailable => No network coverage" ); |
|
1620 |
} |
|
7
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1621 |
else if( SS_RESOURCE_CONTROL_DENIED == errorCode ) |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1622 |
{ |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1623 |
if ( KErrNone == aIsiMessage.FindSubBlockOffsetById( |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1624 |
ISI_HEADER_SIZE + SIZE_SS_SERVICE_FAILED_RESP, |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1625 |
SS_SB_RESOURCE_CONTROL_INFO, |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1626 |
EIsiSubBlockTypeId8Len8, |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1627 |
sbStartOffset ) ) |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1628 |
{ |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1629 |
TUint8 dataLen( aIsiMessage.Get8bit( |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1630 |
sbStartOffset + SS_SB_RESOURCE_CONTROL_INFO_OFFSET_DATALENGTH ) ); |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1631 |
|
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1632 |
TPtrC8 data( aIsiMessage.GetData( |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1633 |
sbStartOffset + SS_SB_RESOURCE_CONTROL_INFO_OFFSET_DATA, |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1634 |
dataLen ) ); |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1635 |
// sw1, sw2 and result is inserted to SS_SB_RESOURCE_CONTROL_INFO |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1636 |
// by simatktsy and ther order from first byte is: sw1, sw2 and result |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1637 |
TUint8 sw1 = data[KSw1Index]; |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1638 |
TUint8 sw2 = data[KSw2Index]; |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1639 |
TUint8 result = data[KResultIndex]; |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1640 |
errorToClient = CMmStaticUtility::MapSw1Sw2ToEpocError( |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1641 |
sw1, |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1642 |
sw2, |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1643 |
result ); |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1644 |
} |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1645 |
else |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1646 |
{ |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1647 |
errorToClient = CMmStaticUtility::CSCauseToEpocError( |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1648 |
PN_SS, |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1649 |
subBlockId, |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1650 |
errorCode ); |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1651 |
} |
fa67e03b87df
New release based on our 2010wk08 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
5
diff
changeset
|
1652 |
} |
0 | 1653 |
else |
1654 |
{ |
|
1655 |
// Translate error to epoc world |
|
1656 |
errorToClient = CMmStaticUtility::CSCauseToEpocError( |
|
1657 |
PN_SS, |
|
1658 |
subBlockId, |
|
1659 |
aIsiMessage.Get8bit( |
|
1660 |
sbStartOffset +SS_OTHER_ERROR_OFFSET_ERRORCODE ) ); |
|
1661 |
} |
|
1662 |
break; |
|
1663 |
} |
|
1664 |
default: |
|
1665 |
{ |
|
1666 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::SsServiceFailedResp \ |
|
1667 |
- unknown sub block Id: %d", subBlockId); |
|
1668 |
OstTraceExt1( TRACE_NORMAL, DUP3_CMMSUPPLSERVMESSHANDLER_SSSERVICEFAILEDRESP, "CMmSupplServMessHandler::SsServiceFailedResp;unknown subBlockId=%hhu", subBlockId ); |
|
1669 |
// unknown error sub block |
|
1670 |
errorToClient = KErrGeneral; |
|
1671 |
break; |
|
1672 |
} |
|
1673 |
} |
|
1674 |
} |
|
1675 |
||
1676 |
// complete to SOS layer |
|
1677 |
CompleteFailedSSRequest( aIsiMessage.Get8bit( |
|
1678 |
ISI_HEADER_SIZE + SS_SERVICE_FAILED_RESP_OFFSET_TRANSID ), |
|
1679 |
errorToClient ); |
|
1680 |
} |
|
1681 |
||
1682 |
// ----------------------------------------------------------------------------- |
|
1683 |
// CMmSupplServMessHandler::SsServiceNotSupportedResp |
|
1684 |
// Reads a SS_SERVICE_NOT_SUPPORTED_RESP and completes to client |
|
1685 |
// ----------------------------------------------------------------------------- |
|
1686 |
// |
|
1687 |
void CMmSupplServMessHandler::SsServiceNotSupportedResp |
|
1688 |
( |
|
1689 |
const TIsiReceiveC &aIsiMessage //received isi message |
|
1690 |
) |
|
1691 |
{ |
|
1692 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::SsServiceNotSupportedResp"); |
|
1693 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_SSSERVICENOTSUPPORTEDRESP, "CMmSupplServMessHandler::SsServiceNotSupportedResp" ); |
|
1694 |
||
1695 |
//create ss service not supported response message |
|
1696 |
// complete to SOS layer |
|
1697 |
CompleteFailedSSRequest( aIsiMessage.Get8bit( |
|
1698 |
ISI_HEADER_SIZE + SS_SERVICE_NOT_SUPPORTED_RESP_OFFSET_TRANSID ), |
|
1699 |
KErrNotSupported ); |
|
1700 |
||
1701 |
} |
|
1702 |
||
1703 |
// ----------------------------------------------------------------------------- |
|
1704 |
// CMmSupplServMessHandler::CompleteFailedSSRequest |
|
1705 |
// Completes a failed request to SOS layer. The decision which request(s) |
|
1706 |
// to complete is based on the response message's transaction ID. |
|
1707 |
// ----------------------------------------------------------------------------- |
|
1708 |
// |
|
1709 |
void CMmSupplServMessHandler::CompleteFailedSSRequest |
|
1710 |
( |
|
1711 |
TUint8 aTransactionId, // the response's transaction ID |
|
1712 |
TInt aError // Symbian error code |
|
1713 |
) |
|
1714 |
{ |
|
1715 |
TFLOGSTRING3("TSY: CMmSupplServMessHandler::CompleteFailedSSRequest - \ |
|
1716 |
traId: %d, error code: %d", aTransactionId, aError); |
|
1717 |
OstTraceExt2( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_COMPLETEFAILEDSSREQUEST, "CMmSupplServMessHandler::CompleteFailedSSRequest;aTransactionId=%hhu;aError=%d", aTransactionId, aError ); |
|
1718 |
||
1719 |
TBool isExpectedMessage = ETrue; |
|
1720 |
switch ( aTransactionId ) |
|
1721 |
{ |
|
1722 |
case ESSOperationTypeGetCallForwardingStatus: |
|
1723 |
{ |
|
1724 |
iMessageRouter->Complete( |
|
1725 |
EMobilePhoneGetCallForwardingStatusPhase1, |
|
1726 |
aError ); |
|
1727 |
break; |
|
1728 |
} |
|
1729 |
case ESSOperationTypeSetCallForwardingStatus: |
|
1730 |
{ |
|
1731 |
iMessageRouter->Complete( |
|
1732 |
EMobilePhoneSetCallForwardingStatus, |
|
1733 |
aError ); |
|
1734 |
break; |
|
1735 |
} |
|
1736 |
case ESSOperationTypeGetCallBarringStatus: |
|
1737 |
{ |
|
1738 |
iMessageRouter->Complete( |
|
1739 |
EMobilePhoneGetBarringStatusPhase1, |
|
1740 |
aError ); |
|
1741 |
break; |
|
1742 |
} |
|
1743 |
case ESSOperationTypeSetCallBarringStatus: |
|
1744 |
{ |
|
1745 |
iMessageRouter->Complete( |
|
1746 |
EMobilePhoneSetCallBarringStatus, |
|
1747 |
aError ); |
|
1748 |
break; |
|
1749 |
} |
|
1750 |
case ESSOperationTypeGetCallWaitingStatus: |
|
1751 |
{ |
|
1752 |
iMessageRouter->Complete( |
|
1753 |
EMobilePhoneGetWaitingStatusPhase1, |
|
1754 |
aError ); |
|
1755 |
break; |
|
1756 |
} |
|
1757 |
case ESSOperationTypeSetCallWaitingStatus: |
|
1758 |
{ |
|
1759 |
iMessageRouter->Complete( |
|
1760 |
EMobilePhoneSetCallWaitingStatus, |
|
1761 |
aError ); |
|
1762 |
break; |
|
1763 |
} |
|
1764 |
case ESSOperationTypeSetSSPassword: |
|
1765 |
{ |
|
1766 |
iMessageRouter->Complete( |
|
1767 |
EMobilePhoneSetSSPassword, |
|
1768 |
aError ); |
|
1769 |
break; |
|
1770 |
} |
|
1771 |
case ESSOperationTypeGetIdentityServiceStatus: |
|
1772 |
{ |
|
1773 |
iMessageRouter->Complete( |
|
1774 |
EMobilePhoneGetIdentityServiceStatus, |
|
1775 |
aError ); |
|
1776 |
break; |
|
1777 |
} |
|
1778 |
case ESSOperationTypeSendNetworkServiceRequest: |
|
1779 |
{ |
|
1780 |
iMessageRouter->Complete( |
|
1781 |
EMobilePhoneSendNetworkServiceRequest, |
|
1782 |
aError ); |
|
1783 |
break; |
|
1784 |
} |
|
1785 |
case ESSOperationTypeSendNetworkServiceRequestNoFdnCheck: |
|
1786 |
{ |
|
1787 |
iMessageRouter->Complete( |
|
1788 |
EMobilePhoneSendNetworkServiceRequestNoFdnCheck, |
|
1789 |
aError ); |
|
1790 |
break; |
|
1791 |
} |
|
1792 |
default: |
|
1793 |
{ |
|
1794 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::CompleteFailedSSRequest \ |
|
1795 |
- unknown traId: %d", aTransactionId ); |
|
1796 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_COMPLETEFAILEDSSREQUEST, "CMmSupplServMessHandler::CompleteFailedSSRequest;aTransactionId=%hhu", aTransactionId ); |
|
1797 |
// ignore unknown response; do nothing |
|
1798 |
isExpectedMessage = EFalse; |
|
1799 |
break; |
|
1800 |
} |
|
1801 |
} |
|
1802 |
if ( isExpectedMessage ) |
|
1803 |
{ |
|
1804 |
// response was expected and completed, reset iSsCode |
|
1805 |
iSsCode = KSsCodeNoValue; |
|
1806 |
} |
|
1807 |
} |
|
1808 |
||
1809 |
// ----------------------------------------------------------------------------- |
|
1810 |
// CMmSupplServMessHandler::SsGsmBarringReq |
|
1811 |
// Constructs a SS_SERVICE_REQ ISI message for a call barring request. Always |
|
1812 |
// includes gsm call barring password. |
|
1813 |
// ----------------------------------------------------------------------------- |
|
1814 |
// |
|
1815 |
TInt CMmSupplServMessHandler::SsGsmBarringReq |
|
1816 |
( |
|
1817 |
TUint8 aTransactionId, //transaction id |
|
1818 |
TUint8 aOperation, //operation |
|
1819 |
TUint16 aMmiSsCode, //MMI ss code |
|
1820 |
TDesC16 const* aOldPassword, //old password |
|
1821 |
TDesC16 const& aNewPassword, //new password |
|
1822 |
TDesC16 const& aVerifyPassword, //new password for verification |
|
1823 |
TUint8 aMmiBasicServiceCode //MMI basic service code |
|
1824 |
) |
|
1825 |
{ |
|
1826 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::SsGsmBarringReq"); |
|
1827 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_SSGSMBARRINGREQ, "CMmSupplServMessHandler::SsGsmBarringReq" ); |
|
1828 |
||
1829 |
TUint8 numOfSubblocks( 0 ); |
|
1830 |
TInt subblockStart = ISI_HEADER_SIZE + SIZE_SS_SERVICE_REQ; |
|
1831 |
||
1832 |
//create ss service request message and set it to point send buffer |
|
1833 |
TIsiSend isimsg( iPhoNetSender->SendBufferDes() ); |
|
1834 |
||
1835 |
if ( aOldPassword->Length() |
|
1836 |
|| aNewPassword.Length() |
|
1837 |
|| aVerifyPassword.Length() ) |
|
1838 |
{ |
|
1839 |
numOfSubblocks++; |
|
1840 |
||
1841 |
/* |
|
1842 |
password string handling: |
|
1843 |
||
1844 |
create buffer for password data |
|
1845 |
if there is old password |
|
1846 |
append old password to password data buffer |
|
1847 |
else |
|
1848 |
append eight zeroes to password data buffer |
|
1849 |
||
1850 |
if there is new password |
|
1851 |
append new password to password buffer |
|
1852 |
else |
|
1853 |
append eight zeroes to password data buffer |
|
1854 |
||
1855 |
if there is new password2 |
|
1856 |
append new password2 to password buffer |
|
1857 |
else |
|
1858 |
append eight zeroes to password data buffer |
|
1859 |
||
1860 |
add Ss Gsm Password sub block to the send buffer |
|
1861 |
*/ |
|
1862 |
||
1863 |
TBuf8<SIZE_SS_GSM_PASSWORD> dataPasswords( 0 ); |
|
1864 |
||
1865 |
TIsiSubBlock passwordsSb( |
|
1866 |
dataPasswords, |
|
1867 |
SS_GSM_PASSWORD, |
|
1868 |
EIsiSubBlockTypeId8Len8 ); |
|
1869 |
||
1870 |
if ( 0 < aOldPassword->Length() ) |
|
1871 |
{ |
|
1872 |
// Copy 16 to 8 |
|
1873 |
TIsiUtility::CopyToBigEndian( *aOldPassword, dataPasswords ); |
|
1874 |
} |
|
1875 |
else |
|
1876 |
{ |
|
1877 |
dataPasswords.AppendFill( 0x00, 8 ); |
|
1878 |
} |
|
1879 |
||
1880 |
if ( 0 < aNewPassword.Length() ) |
|
1881 |
{ |
|
1882 |
// Copy 16 to 8 |
|
1883 |
TIsiUtility::CopyToBigEndian( aNewPassword, dataPasswords ); |
|
1884 |
} |
|
1885 |
else |
|
1886 |
{ |
|
1887 |
dataPasswords.AppendFill( 0x00, 8 ); |
|
1888 |
} |
|
1889 |
||
1890 |
if ( 0 < aVerifyPassword.Length() ) |
|
1891 |
{ |
|
1892 |
// Copy 16 to 8 |
|
1893 |
TIsiUtility::CopyToBigEndian( aVerifyPassword, dataPasswords ); |
|
1894 |
} |
|
1895 |
else |
|
1896 |
{ |
|
1897 |
dataPasswords.AppendFill( 0x00, 8 ); |
|
1898 |
} |
|
1899 |
||
1900 |
//add password subblock to isi message |
|
1901 |
isimsg.CopyData( subblockStart, passwordsSb.CompleteSubBlock() ); |
|
1902 |
subblockStart += SIZE_SS_GSM_PASSWORD; |
|
1903 |
} |
|
1904 |
||
1905 |
//create ss service request message |
|
1906 |
TBuf8<KDataAppendToServiceReqHeaderInBytes> data( 0 ); |
|
1907 |
data.Append( aTransactionId ); //transaction id |
|
1908 |
||
1909 |
// SAT: ETEL Multimode API usage for SAT has been |
|
1910 |
// implemented by S60 |
|
1911 |
data.Append( SS_SERVICE_REQ ); |
|
1912 |
||
1913 |
data.Append( aOperation ); //operation |
|
1914 |
data.Append( aMmiBasicServiceCode ); //mmi basic service code |
|
1915 |
||
1916 |
//split aMmiSsCode to two TBuf8 ( data ) |
|
1917 |
data.Append( ( aMmiSsCode & 0xFF00 ) >> 8 );// first byte |
|
1918 |
data.Append( ( aMmiSsCode & 0xFF ) ); // second byte |
|
1919 |
||
1920 |
// Custom Tsy's SsAdditionalInfoNotification needs this |
|
1921 |
data.Append( SS_SEND_ADDITIONAL_INFO ); |
|
1922 |
||
1923 |
isimsg.Set8bit( ISI_HEADER_OFFSET_RESOURCEID, PN_SS ); |
|
1924 |
isimsg.CopyData( ISI_HEADER_SIZE, data ); |
|
1925 |
||
1926 |
// SS_GSM_SIMATK_INFO must be added to indicate SS server |
|
1927 |
// if FDN check must not be done |
|
1928 |
if ( iCheckInfoSubblock ) |
|
1929 |
{ |
|
1930 |
numOfSubblocks++; |
|
1931 |
||
1932 |
// create subblock SS_SB_CHECK_INFO |
|
1933 |
TBuf8<SIZE_SS_SB_CHECK_INFO>sbData( 0 ); |
|
1934 |
TIsiSubBlock ssCheckInfoSb( |
|
1935 |
sbData, |
|
1936 |
SS_SB_CHECK_INFO, |
|
1937 |
EIsiSubBlockTypeId8Len8 ); |
|
1938 |
||
1939 |
if ( iFdnCheck ) |
|
1940 |
{ |
|
1941 |
sbData.Append( SS_NO_FDN_CHECK_SUPPRESS ); |
|
1942 |
} |
|
1943 |
else |
|
1944 |
{ |
|
1945 |
sbData.Append( SS_FDN_CHECK_SUPPRESS ); |
|
1946 |
} |
|
1947 |
||
1948 |
if ( iResourceControlSuppress ) |
|
1949 |
{ |
|
1950 |
sbData.Append( SS_RESOURCE_CONTROL_SUPPRESS ); |
|
1951 |
} |
|
1952 |
else |
|
1953 |
{ |
|
1954 |
sbData.Append( SS_NO_RESOURCE_CONTROL_SUPPRESS ); |
|
1955 |
} |
|
1956 |
iResourceControlSuppress = EFalse; |
|
1957 |
||
1958 |
// add the subblock |
|
1959 |
isimsg.CopyData( subblockStart, ssCheckInfoSb.CompleteSubBlock( ) ); |
|
1960 |
||
1961 |
iCheckInfoSubblock = EFalse; |
|
1962 |
} |
|
1963 |
||
1964 |
isimsg.Set8bit( |
|
1965 |
ISI_HEADER_SIZE + SS_SERVICE_REQ_OFFSET_SUBBLOCKCOUNT, |
|
1966 |
numOfSubblocks ); |
|
1967 |
//send message via phonet |
|
1968 |
return iPhoNetSender->Send( isimsg.Complete( ) ); |
|
1969 |
} |
|
1970 |
||
1971 |
// ----------------------------------------------------------------------------- |
|
1972 |
// CMmSupplServMessHandler::SsGsmWaitingReq |
|
1973 |
// Constructs a SS_SERVICE_REQ ISI message for Call Waiting request. |
|
1974 |
// ----------------------------------------------------------------------------- |
|
1975 |
// |
|
1976 |
TInt CMmSupplServMessHandler::SsGsmWaitingReq |
|
1977 |
( |
|
1978 |
TUint8 aTransactionId, //transaction id |
|
1979 |
TUint8 aOperation, //operation |
|
1980 |
TUint16 aMmiSsCode, //MMI ss code |
|
1981 |
TUint8 aMmiBasicServiceCode //MMI basic service code |
|
1982 |
) |
|
1983 |
{ |
|
1984 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::SsGsmWaitingReq"); |
|
1985 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_SSGSMWAITINGREQ, "CMmSupplServMessHandler::SsGsmWaitingReq" ); |
|
1986 |
||
1987 |
TUint8 numOfSubblocks( 0 ); |
|
1988 |
TBuf8<8> data( 0 ); |
|
1989 |
data.Append( aTransactionId ); |
|
1990 |
data.Append( SS_SERVICE_REQ ); |
|
1991 |
data.Append( aOperation ); |
|
1992 |
data.Append( aMmiBasicServiceCode ); |
|
1993 |
||
1994 |
//split aMmiSsCode to two TBuf8 ( data ) |
|
1995 |
data.Append( ( aMmiSsCode & 0xFF00 ) >> 8 );// first byte of aMmiSsCode |
|
1996 |
data.Append( ( aMmiSsCode & 0xFF ) ); // second byte of aMmiSsCode |
|
1997 |
||
1998 |
// Custom Tsy's SsAdditionalInfoNotification needs this |
|
1999 |
data.Append( SS_SEND_ADDITIONAL_INFO ); |
|
2000 |
||
2001 |
// Number of sub blocks |
|
2002 |
data.Append( KSsPadding ); |
|
2003 |
||
2004 |
TIsiSend isimsg( iPhoNetSender->SendBufferDes() ); |
|
2005 |
isimsg.Set8bit( ISI_HEADER_OFFSET_RESOURCEID, PN_SS ); |
|
2006 |
isimsg.CopyData( ISI_HEADER_SIZE, data ); |
|
2007 |
// SS_GSM_SIMATK_INFO must be added to indicate SS server |
|
2008 |
// if FDN check must not be done |
|
2009 |
if ( iCheckInfoSubblock ) |
|
2010 |
{ |
|
2011 |
numOfSubblocks++; |
|
2012 |
||
2013 |
// create subblock SS_SB_CHECK_INFO |
|
2014 |
TBuf8<SIZE_SS_SB_CHECK_INFO>sbData( 0 ); |
|
2015 |
TIsiSubBlock ssCheckInfoSb( |
|
2016 |
sbData, |
|
2017 |
SS_SB_CHECK_INFO, |
|
2018 |
EIsiSubBlockTypeId8Len8 ); |
|
2019 |
||
2020 |
if ( iFdnCheck ) |
|
2021 |
{ |
|
2022 |
sbData.Append( SS_NO_FDN_CHECK_SUPPRESS ); |
|
2023 |
} |
|
2024 |
else |
|
2025 |
{ |
|
2026 |
sbData.Append( SS_FDN_CHECK_SUPPRESS ); |
|
2027 |
} |
|
2028 |
||
2029 |
if ( iResourceControlSuppress ) |
|
2030 |
{ |
|
2031 |
sbData.Append( SS_RESOURCE_CONTROL_SUPPRESS ); |
|
2032 |
} |
|
2033 |
else |
|
2034 |
{ |
|
2035 |
sbData.Append( SS_NO_RESOURCE_CONTROL_SUPPRESS ); |
|
2036 |
} |
|
2037 |
iResourceControlSuppress = EFalse; |
|
2038 |
||
2039 |
// add the subblock |
|
2040 |
isimsg.CopyData( |
|
2041 |
ISI_HEADER_SIZE + SIZE_SS_SERVICE_REQ, |
|
2042 |
ssCheckInfoSb.CompleteSubBlock( ) ); |
|
2043 |
||
2044 |
iCheckInfoSubblock = EFalse; |
|
2045 |
} |
|
2046 |
||
2047 |
isimsg.Set8bit( |
|
2048 |
ISI_HEADER_SIZE + SS_SERVICE_REQ_OFFSET_SUBBLOCKCOUNT, |
|
2049 |
numOfSubblocks ); |
|
2050 |
return iPhoNetSender->Send( isimsg.Complete() ); |
|
2051 |
||
2052 |
} |
|
2053 |
||
2054 |
// ----------------------------------------------------------------------------- |
|
2055 |
// CMmSupplServMessHandler::SsIdentityServiceReq |
|
2056 |
// Constructs a SS_SERVICE_REQ ISI message for Caller Identify (CLIP and CLIR), |
|
2057 |
// Connected Line Identify (COLP and COLR) and Caller Name Presentation (CNAP). |
|
2058 |
// ----------------------------------------------------------------------------- |
|
2059 |
// |
|
2060 |
TInt CMmSupplServMessHandler::SsIdentityServiceReq |
|
2061 |
( |
|
2062 |
TUint8 aTransactionId, //transaction id |
|
2063 |
TUint16 aMmiSsCode //MMI ss code |
|
2064 |
) |
|
2065 |
{ |
|
2066 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::SsIdentityServiceReq"); |
|
2067 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_SSIDENTITYSERVICEREQ, "CMmSupplServMessHandler::SsIdentityServiceReq" ); |
|
2068 |
||
2069 |
//create ss service request message and set it to point send buffer |
|
2070 |
TIsiSend isimsg( iPhoNetSender->SendBufferDes() ); |
|
2071 |
||
2072 |
TUint8 numOfSubblocks( 0 ); |
|
2073 |
//create ss service request message. Need only 5 bytes for data. |
|
2074 |
TBuf8<8> data( 0 ); |
|
2075 |
//operation |
|
2076 |
data.Append( aTransactionId); |
|
2077 |
data.Append( SS_SERVICE_REQ ); |
|
2078 |
data.Append( SS_INTERROGATION ); |
|
2079 |
data.Append( SS_ALL_TELE_AND_BEARER ); //mmi basic service code |
|
2080 |
||
2081 |
//split aMmiSsCode to two TBuf8 ( data ) |
|
2082 |
data.Append( ( aMmiSsCode & 0xFF00 ) >> 8 );// first byte |
|
2083 |
data.Append( ( aMmiSsCode & 0xFF ) ); // second byte |
|
2084 |
||
2085 |
// Custom Tsy's SsAdditionalInfoNotification needs this |
|
2086 |
data.Append( SS_SEND_ADDITIONAL_INFO ); |
|
2087 |
||
2088 |
//number of sub blocks |
|
2089 |
data.Append( KSsPadding ); |
|
2090 |
||
2091 |
//create the ISI message |
|
2092 |
isimsg.Set8bit( ISI_HEADER_OFFSET_RESOURCEID, PN_SS ); |
|
2093 |
isimsg.CopyData( ISI_HEADER_SIZE, data ); |
|
2094 |
||
2095 |
// SS_GSM_SIMATK_INFO must be added to indicate SS server |
|
2096 |
// if FDN check must not be done |
|
2097 |
if ( iCheckInfoSubblock ) |
|
2098 |
{ |
|
2099 |
numOfSubblocks++; |
|
2100 |
||
2101 |
// create subblock SS_SB_CHECK_INFO |
|
2102 |
TBuf8<SIZE_SS_SB_CHECK_INFO>sbData( 0 ); |
|
2103 |
TIsiSubBlock ssCheckInfoSb( |
|
2104 |
sbData, |
|
2105 |
SS_SB_CHECK_INFO, |
|
2106 |
EIsiSubBlockTypeId8Len8 ); |
|
2107 |
||
2108 |
if ( iFdnCheck ) |
|
2109 |
{ |
|
2110 |
sbData.Append( SS_NO_FDN_CHECK_SUPPRESS ); |
|
2111 |
} |
|
2112 |
else |
|
2113 |
{ |
|
2114 |
sbData.Append( SS_FDN_CHECK_SUPPRESS ); |
|
2115 |
} |
|
2116 |
||
2117 |
if ( iResourceControlSuppress ) |
|
2118 |
{ |
|
2119 |
sbData.Append( SS_RESOURCE_CONTROL_SUPPRESS ); |
|
2120 |
} |
|
2121 |
else |
|
2122 |
{ |
|
2123 |
sbData.Append( SS_NO_RESOURCE_CONTROL_SUPPRESS ); |
|
2124 |
} |
|
2125 |
iResourceControlSuppress = EFalse; |
|
2126 |
||
2127 |
// add the subblock |
|
2128 |
isimsg.CopyData( |
|
2129 |
ISI_HEADER_SIZE + SIZE_SS_SERVICE_REQ, |
|
2130 |
ssCheckInfoSb.CompleteSubBlock( ) ); |
|
2131 |
||
2132 |
iCheckInfoSubblock = EFalse; |
|
2133 |
} |
|
2134 |
||
2135 |
isimsg.Set8bit( |
|
2136 |
ISI_HEADER_SIZE + SS_SERVICE_REQ_OFFSET_SUBBLOCKCOUNT, |
|
2137 |
numOfSubblocks ); |
|
2138 |
//send the SS_REQUEST ISI message via phonet |
|
2139 |
return iPhoNetSender->Send( isimsg.Complete() ); |
|
2140 |
} |
|
2141 |
||
2142 |
// ----------------------------------------------------------------------------- |
|
2143 |
// CMmSupplServMessHandler::SsGsmUssdSendReq |
|
2144 |
// Construct a SS_GSM_USSD_SEND_REQ ISI message. |
|
2145 |
// ----------------------------------------------------------------------------- |
|
2146 |
// |
|
2147 |
TInt CMmSupplServMessHandler::SsGsmUssdSendReq |
|
2148 |
( |
|
2149 |
TUint8 aTransactionId, //transaction id |
|
2150 |
TDesC8* aString //USSD string |
|
2151 |
) |
|
2152 |
{ |
|
2153 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::SsGsmUssdSendReq"); |
|
2154 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_SSGSMUSSDSENDREQ, "CMmSupplServMessHandler::SsGsmUssdSendReq" ); |
|
2155 |
||
2156 |
//create ss service request message |
|
2157 |
TBuf8<4> data( 0 ); //allocate memory for data |
|
2158 |
data.Append( aTransactionId ); |
|
2159 |
||
2160 |
data.Append( SS_GSM_USSD_SEND_REQ ); |
|
2161 |
||
2162 |
data.Append( SS_GSM_USSD_COMMAND ); |
|
2163 |
// Number of Subblocks |
|
2164 |
data.Append( 1 ); |
|
2165 |
||
2166 |
//create the buffer for SB_PP subblock |
|
2167 |
TBuf8<SIZE_SS_GSM_USSD_STRING + KMaxLengthOfUssdMessage> |
|
2168 |
ssGsmStringBuf( 0 ); |
|
2169 |
TIsiSubBlock ssGsmStringSb( |
|
2170 |
ssGsmStringBuf, |
|
2171 |
SS_GSM_USSD_STRING, |
|
2172 |
EIsiSubBlockTypeId8Len8 ); |
|
2173 |
||
2174 |
// Coding info is always "Language unspecified = 0x0F" |
|
2175 |
ssGsmStringBuf.Append( 0x0F ); |
|
2176 |
ssGsmStringBuf.Append( ( TUint8 )aString->Length() ); |
|
2177 |
ssGsmStringBuf.Append( *aString ); |
|
2178 |
||
2179 |
TIsiSend isimsg ( iPhoNetSender->SendBufferDes() ); |
|
2180 |
isimsg.Set8bit( ISI_HEADER_OFFSET_RESOURCEID, PN_SS ); |
|
2181 |
isimsg.CopyData( ISI_HEADER_SIZE, data ); |
|
2182 |
||
2183 |
//add subblock to the message |
|
2184 |
isimsg.CopyData( |
|
2185 |
ISI_HEADER_SIZE + SIZE_SS_GSM_USSD_SEND_REQ, |
|
2186 |
ssGsmStringSb.CompleteSubBlock() ); |
|
2187 |
||
2188 |
//send message via phonet |
|
2189 |
return iPhoNetSender->Send( isimsg.Complete() ); |
|
2190 |
} |
|
2191 |
||
2192 |
||
2193 |
// ----------------------------------------------------------------------------- |
|
2194 |
// CMmSupplServMessHandler::SsGsmUssdSendResp |
|
2195 |
// Breaks a SS_GSM_USSD_SEND_RESP ISI message. Completes Send Network Service |
|
2196 |
// Request. |
|
2197 |
// ----------------------------------------------------------------------------- |
|
2198 |
// |
|
2199 |
void CMmSupplServMessHandler::SsGsmUssdSendResp |
|
2200 |
( |
|
2201 |
const TIsiReceiveC &aIsiMessage //received isi message |
|
2202 |
) |
|
2203 |
{ |
|
2204 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::SsGsmUssdSendResp"); |
|
2205 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_SSGSMUSSDSENDRESP, "CMmSupplServMessHandler::SsGsmUssdSendResp" ); |
|
2206 |
||
2207 |
if ( ESSOperationTypeSendNetworkServiceRequest == aIsiMessage.Get8bit( |
|
2208 |
ISI_HEADER_SIZE + SS_GSM_USSD_SEND_RESP_OFFSET_TRANSID ) ) |
|
2209 |
{ |
|
2210 |
// complete (no packed parameter) |
|
2211 |
iMessageRouter->Complete( |
|
2212 |
EMobilePhoneSendNetworkServiceRequest, |
|
2213 |
KErrNone ); |
|
2214 |
} |
|
2215 |
||
2216 |
} |
|
2217 |
||
2218 |
// ----------------------------------------------------------------------------- |
|
2219 |
// CMmSupplServMessHandler::SsStatusInd |
|
2220 |
// Breaks a SS_STATUS_IND ISI message. Completes Send Network Service |
|
2221 |
// Request. |
|
2222 |
// ----------------------------------------------------------------------------- |
|
2223 |
// |
|
2224 |
void CMmSupplServMessHandler::SsStatusInd |
|
2225 |
( |
|
2226 |
const TIsiReceiveC &aIsiMessage //received isi message |
|
2227 |
) |
|
2228 |
{ |
|
2229 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::SsStatusInd"); |
|
2230 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_SSSTATUSIND, "CMmSupplServMessHandler::SsStatusInd" ); |
|
2231 |
||
2232 |
// Get number of subblocks |
|
2233 |
TInt numOfSubBlocks( 0 ); |
|
2234 |
numOfSubBlocks = aIsiMessage.Get8bit( |
|
2235 |
ISI_HEADER_SIZE + SS_STATUS_IND_OFFSET_SUBBLOCKCOUNT ); |
|
2236 |
||
2237 |
if( numOfSubBlocks > 0 ) |
|
2238 |
{ |
|
2239 |
TUint sbStartOffSet( 0 ); |
|
2240 |
RMobilePhone::TMobilePhoneSendSSRequestV3 returnResult; |
|
2241 |
||
2242 |
returnResult.iOpCode = KErrNone; |
|
2243 |
returnResult.iAdditionalInfo.Zero(); |
|
2244 |
RMobilePhone::TMobilePhoneNotifySendSSOperation operation; |
|
2245 |
||
2246 |
TBool error( EFalse ); |
|
2247 |
||
2248 |
// SS Return Error |
|
2249 |
if ( KErrNone == aIsiMessage.FindSubBlockOffsetById( |
|
2250 |
ISI_HEADER_SIZE + SIZE_SS_STATUS_IND, |
|
2251 |
SS_GSM_INDICATE_ERROR, |
|
2252 |
EIsiSubBlockTypeId8Len8, |
|
2253 |
sbStartOffSet ) ) |
|
2254 |
{ |
|
2255 |
// get data |
|
2256 |
TUint8 opCode( aIsiMessage.Get8bit( |
|
2257 |
sbStartOffSet + SS_GSM_INDICATE_ERROR_OFFSET_ERRORCODE ) ); |
|
2258 |
||
2259 |
returnResult.iOpCode = opCode; |
|
2260 |
||
2261 |
TUint8 additionalInfo( aIsiMessage.Get8bit( |
|
2262 |
sbStartOffSet + |
|
2263 |
SS_GSM_INDICATE_ERROR_OFFSET_ADDITIONALINDICATION ) ); |
|
2264 |
||
2265 |
returnResult.iAdditionalInfo.Append( additionalInfo ); |
|
2266 |
||
2267 |
operation = RMobilePhone::ESendSSReturnError; |
|
2268 |
error = ETrue; |
|
2269 |
} |
|
2270 |
||
2271 |
// SS Return Error |
|
2272 |
else if ( KErrNone == aIsiMessage.FindSubBlockOffsetById( |
|
2273 |
ISI_HEADER_SIZE + SIZE_SS_STATUS_IND, |
|
2274 |
SS_GSM_INDICATE_PROBLEM, |
|
2275 |
EIsiSubBlockTypeId8Len8, |
|
2276 |
sbStartOffSet ) ) |
|
2277 |
{ |
|
2278 |
// get data |
|
2279 |
TUint8 problemType( aIsiMessage.Get8bit( |
|
2280 |
sbStartOffSet + SS_GSM_INDICATE_PROBLEM_OFFSET_PROBLEMTYPE ) ); |
|
2281 |
returnResult.iOpCode = problemType; |
|
2282 |
operation = RMobilePhone::ESendSSReturnError; |
|
2283 |
||
2284 |
TUint8 problemCode( aIsiMessage.Get8bit( |
|
2285 |
sbStartOffSet + SS_GSM_INDICATE_PROBLEM_OFFSET_PROBLEMCODE ) ); |
|
2286 |
||
2287 |
returnResult.iAdditionalInfo.Append( problemCode ); |
|
2288 |
operation = RMobilePhone::ESendSSReturnError; |
|
2289 |
error = ETrue; |
|
2290 |
} |
|
2291 |
||
2292 |
// SS reject |
|
2293 |
else if ( KErrNone == aIsiMessage.FindSubBlockOffsetById( |
|
2294 |
ISI_HEADER_SIZE + SIZE_SS_STATUS_IND, |
|
2295 |
SS_OTHER_ERROR, |
|
2296 |
EIsiSubBlockTypeId8Len8, |
|
2297 |
sbStartOffSet ) ) |
|
2298 |
{ |
|
2299 |
// get data |
|
2300 |
TUint8 misc( aIsiMessage.Get8bit( |
|
2301 |
sbStartOffSet + SS_OTHER_ERROR_OFFSET_ERRORCODE ) ); |
|
2302 |
||
2303 |
returnResult.iOpCode = misc; |
|
2304 |
||
2305 |
operation = RMobilePhone::ESendSSReject; |
|
2306 |
error = ETrue; |
|
2307 |
} |
|
2308 |
||
2309 |
// SS Return Error |
|
2310 |
if ( KErrNone == aIsiMessage.FindSubBlockOffsetById( |
|
2311 |
ISI_HEADER_SIZE + SIZE_SS_STATUS_IND, |
|
2312 |
SS_GSM_MM_RELEASED, |
|
2313 |
EIsiSubBlockTypeId8Len8, |
|
2314 |
sbStartOffSet ) ) |
|
2315 |
{ |
|
2316 |
// get data |
|
2317 |
TUint8 cause( aIsiMessage.Get8bit( |
|
2318 |
sbStartOffSet + SS_GSM_MM_RELEASED_OFFSET_CAUSE ) ); |
|
2319 |
returnResult.iAdditionalInfo.Append( cause ); |
|
2320 |
||
2321 |
operation = RMobilePhone::ESendSSReturnError; |
|
2322 |
error = ETrue; |
|
2323 |
} |
|
2324 |
||
2325 |
// No need to complete notification without subblock |
|
2326 |
if ( error ) |
|
2327 |
{ |
|
2328 |
//create package. |
|
2329 |
CMmDataPackage package; |
|
2330 |
||
2331 |
//pack the data |
|
2332 |
package.PackData( &returnResult, &operation ); |
|
2333 |
//complete the request |
|
2334 |
#if ( NCP_COMMON_S60_VERSION_SUPPORT == S60_VERSION_32 ) |
|
2335 |
iMessageRouter->Complete( |
|
2336 |
EMobilePhoneNotifySendNetworkServiceRequest, |
|
2337 |
&package, |
|
2338 |
KErrNone ); |
|
2339 |
#else |
|
2340 |
iMessageRouter->Complete( |
|
2341 |
EMobilePhoneNotifyAllSendNetworkServiceRequest, |
|
2342 |
&package, |
|
2343 |
KErrNone ); |
|
2344 |
#endif // NCP_COMMON_S60_VERSION_SUPPORT == S60_VERSION_32 |
|
2345 |
||
2346 |
} |
|
2347 |
} |
|
2348 |
} |
|
2349 |
||
2350 |
// ----------------------------------------------------------------------------- |
|
2351 |
// CMmSupplServMessHandler::SsCompleteInd |
|
2352 |
// Breaks a SS_SERVICE_COMPLETED_IND ISI message. Completes Send Network |
|
2353 |
// Service Request. |
|
2354 |
// ----------------------------------------------------------------------------- |
|
2355 |
// |
|
2356 |
void CMmSupplServMessHandler::SsCompleteInd |
|
2357 |
( |
|
2358 |
const TIsiReceiveC &aIsiMessage //received isi message |
|
2359 |
) |
|
2360 |
{ |
|
2361 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::SsCompleteInd"); |
|
2362 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_SSCOMPLETEIND, "CMmSupplServMessHandler::SsCompleteInd" ); |
|
2363 |
||
2364 |
TUint sbStartOffSet( 0 ); |
|
2365 |
RMobilePhone::TMobilePhoneSendSSRequestV3 returnResult; |
|
2366 |
||
2367 |
returnResult.iOpCode = KErrNone; |
|
2368 |
returnResult.iAdditionalInfo.Zero(); |
|
2369 |
||
2370 |
RMobilePhone::TMobilePhoneNotifySendSSOperation operation; |
|
2371 |
||
2372 |
// Get ss operation |
|
2373 |
TInt ssOperation( aIsiMessage.Get8bit( |
|
2374 |
ISI_HEADER_SIZE + SS_SERVICE_COMPLETED_IND_OFFSET_OPERATION ) ); |
|
2375 |
returnResult.iOpCode = ssOperation; |
|
2376 |
||
2377 |
// Send SS Return result |
|
2378 |
if ( KErrNone == aIsiMessage.FindSubBlockOffsetById( |
|
2379 |
ISI_HEADER_SIZE + SIZE_SS_SERVICE_COMPLETED_IND, |
|
2380 |
SS_GSM_ADDITIONAL_INFO, |
|
2381 |
EIsiSubBlockTypeId8Len8, |
|
2382 |
sbStartOffSet ) ) |
|
2383 |
{ |
|
2384 |
// Get length of the data |
|
2385 |
TUint8 len( aIsiMessage.Get8bit( |
|
2386 |
sbStartOffSet + SS_GSM_ADDITIONAL_INFO_OFFSET_RETURNRESULTLEN ) ); |
|
2387 |
||
2388 |
// Get data |
|
2389 |
returnResult.iAdditionalInfo.Copy(aIsiMessage.GetData( |
|
2390 |
sbStartOffSet + SS_GSM_ADDITIONAL_INFO_OFFSET_RETURNRESULT, |
|
2391 |
static_cast<TInt> ( len ) ) ); |
|
2392 |
||
2393 |
operation = RMobilePhone::ESendSSReturnResult; |
|
2394 |
} |
|
2395 |
||
2396 |
//create package. |
|
2397 |
CMmDataPackage package; |
|
2398 |
||
2399 |
//pack the data |
|
2400 |
package.PackData( &returnResult, &operation ); |
|
2401 |
||
2402 |
//complete the request |
|
2403 |
#if ( NCP_COMMON_S60_VERSION_SUPPORT == S60_VERSION_32 ) |
|
2404 |
iMessageRouter->Complete( |
|
2405 |
EMobilePhoneNotifySendNetworkServiceRequest, |
|
2406 |
&package, |
|
2407 |
KErrNone ); |
|
2408 |
#else |
|
2409 |
iMessageRouter->Complete( |
|
2410 |
EMobilePhoneNotifyAllSendNetworkServiceRequest, |
|
2411 |
&package, |
|
2412 |
KErrNone ); |
|
2413 |
#endif // NCP_COMMON_S60_VERSION_SUPPORT == S60_VERSION_32 |
|
2414 |
} |
|
2415 |
||
2416 |
||
2417 |
// ############ static utility functions ############### |
|
2418 |
||
2419 |
// ----------------------------------------------------------------------------- |
|
2420 |
// CMmSupplServMessHandler::MapMobileServiceToBasicServiceCodeIsi |
|
2421 |
// Map multimode api mobile service to isi basic service code. |
|
2422 |
// |
|
2423 |
// Most ETel <=> ISI mappings are 1:1, but this method contains two exceptions: |
|
2424 |
// (EVoiceService,ETelephony) <=> KSsGsmTelephony |
|
2425 |
// (ECircuitDataService,EAllBearer) <=> KSsGsmAllBearer |
|
2426 |
// |
|
2427 |
// Returns KErrNone, KErrNotSupported or KErrArgument |
|
2428 |
// ----------------------------------------------------------------------------- |
|
2429 |
// |
|
2430 |
TInt CMmSupplServMessHandler::MapMobileServiceToBasicServiceCodeIsi |
|
2431 |
( |
|
2432 |
RMobilePhone::TMobileService aMobileService, |
|
2433 |
// multimode API mobile service |
|
2434 |
TUint8* aIsiBasicServiceCode // isi basic service code |
|
2435 |
) |
|
2436 |
{ |
|
2437 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapMobileServiceToBasicServiceCodeIsi \ |
|
2438 |
- basic service code: %d", aIsiBasicServiceCode); |
|
2439 |
OstTraceExt1( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_MAPMOBILESERVICETOBASICSERVICECODEISI, "CMmSupplServMessHandler::MapMobileServiceToBasicServiceCodeIsi;aIsiBasicServiceCode=%hhu", *aIsiBasicServiceCode ); |
|
2440 |
||
2441 |
TInt ret ( KErrNone ); |
|
2442 |
//get the right mobile service |
|
2443 |
switch ( aMobileService ) |
|
2444 |
{ |
|
2445 |
case RMobilePhone::EAllServices: |
|
2446 |
*aIsiBasicServiceCode = SS_ALL_TELE_AND_BEARER; |
|
2447 |
break; |
|
2448 |
case RMobilePhone::EAllTele: |
|
2449 |
*aIsiBasicServiceCode = SS_GSM_ALL_TELE; |
|
2450 |
break; |
|
2451 |
case RMobilePhone::ETelephony: |
|
2452 |
iVoiceServiceMappedToTelephony = EFalse; |
|
2453 |
*aIsiBasicServiceCode = SS_GSM_TELEPHONY; |
|
2454 |
break; |
|
2455 |
case RMobilePhone::EVoiceService: |
|
2456 |
iVoiceServiceMappedToTelephony = ETrue; |
|
2457 |
*aIsiBasicServiceCode = SS_GSM_TELEPHONY; |
|
2458 |
break; |
|
2459 |
case RMobilePhone::EAllDataTele: |
|
2460 |
*aIsiBasicServiceCode = SS_GSM_ALL_DATA_TELE; |
|
2461 |
break; |
|
2462 |
case RMobilePhone::EFaxService: |
|
2463 |
*aIsiBasicServiceCode = SS_GSM_FACSIMILE; |
|
2464 |
break; |
|
2465 |
case RMobilePhone::EShortMessageService: |
|
2466 |
*aIsiBasicServiceCode = SS_GSM_SMS; |
|
2467 |
break; |
|
2468 |
case RMobilePhone::EVoiceGroupCall: |
|
2469 |
*aIsiBasicServiceCode = SS_GSM_VOICE_GROUP; |
|
2470 |
break; |
|
2471 |
case RMobilePhone::EAllTeleExcSms: |
|
2472 |
*aIsiBasicServiceCode = SS_GSM_ALL_TELE_EXC_SMS; |
|
2473 |
break; |
|
2474 |
case RMobilePhone::EAllPlmnTele: |
|
2475 |
*aIsiBasicServiceCode = SS_GSM_ALL_PLMN_SPEC_TELE_SERV; |
|
2476 |
break; |
|
2477 |
case RMobilePhone::EPlmnTele1: |
|
2478 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_TELE_SERV_1; |
|
2479 |
break; |
|
2480 |
case RMobilePhone::EPlmnTele2: |
|
2481 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_TELE_SERV_2; |
|
2482 |
break; |
|
2483 |
case RMobilePhone::EPlmnTele3: |
|
2484 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_TELE_SERV_3; |
|
2485 |
break; |
|
2486 |
case RMobilePhone::EPlmnTele4: |
|
2487 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_TELE_SERV_4; |
|
2488 |
break; |
|
2489 |
case RMobilePhone::EPlmnTele5: |
|
2490 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_TELE_SERV_5; |
|
2491 |
break; |
|
2492 |
case RMobilePhone::EPlmnTele6: |
|
2493 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_TELE_SERV_6; |
|
2494 |
break; |
|
2495 |
case RMobilePhone::EPlmnTele7: |
|
2496 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_TELE_SERV_7; |
|
2497 |
break; |
|
2498 |
case RMobilePhone::EPlmnTele8: |
|
2499 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_TELE_SERV_8; |
|
2500 |
break; |
|
2501 |
case RMobilePhone::EPlmnTele9: |
|
2502 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_TELE_SERV_9; |
|
2503 |
break; |
|
2504 |
case RMobilePhone::EPlmnTeleA: |
|
2505 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_TELE_SERV_A; |
|
2506 |
break; |
|
2507 |
case RMobilePhone::EPlmnTeleB: |
|
2508 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_TELE_SERV_B; |
|
2509 |
break; |
|
2510 |
case RMobilePhone::EPlmnTeleC: |
|
2511 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_TELE_SERV_C; |
|
2512 |
break; |
|
2513 |
case RMobilePhone::EPlmnTeleD: |
|
2514 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_TELE_SERV_D; |
|
2515 |
break; |
|
2516 |
case RMobilePhone::EPlmnTeleE: |
|
2517 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_TELE_SERV_E; |
|
2518 |
break; |
|
2519 |
case RMobilePhone::EPlmnTeleF: |
|
2520 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_TELE_SERV_F; |
|
2521 |
break; |
|
2522 |
case RMobilePhone::EAllBearer: |
|
2523 |
iCircuitServiceMappedToAllBearer = EFalse; |
|
2524 |
*aIsiBasicServiceCode = SS_GSM_ALL_BEARER; |
|
2525 |
break; |
|
2526 |
case RMobilePhone::ECircuitDataService: |
|
2527 |
iCircuitServiceMappedToAllBearer = ETrue; |
|
2528 |
*aIsiBasicServiceCode = SS_GSM_ALL_BEARER; |
|
2529 |
break; |
|
2530 |
case RMobilePhone::EAllAsync: |
|
2531 |
*aIsiBasicServiceCode = SS_GSM_ALL_ASYNC; |
|
2532 |
break; |
|
2533 |
case RMobilePhone::EAllSync: |
|
2534 |
*aIsiBasicServiceCode = SS_GSM_ALL_SYNC; |
|
2535 |
break; |
|
2536 |
case RMobilePhone::ESyncData: |
|
2537 |
*aIsiBasicServiceCode = SS_GSM_ALL_DATA_CIRCUIT_SYNC; |
|
2538 |
break; |
|
2539 |
case RMobilePhone::EAsyncData: |
|
2540 |
*aIsiBasicServiceCode = SS_GSM_ALL_DATA_CIRCUIT_ASYNC; |
|
2541 |
break; |
|
2542 |
case RMobilePhone::EPadAccess: |
|
2543 |
*aIsiBasicServiceCode = SS_GSM_ALL_PAD_ACCESS; |
|
2544 |
break; |
|
2545 |
case RMobilePhone::EAllPlmnBearer: |
|
2546 |
*aIsiBasicServiceCode = SS_GSM_ALL_PLMN_SPEC_BEAR_SERV; |
|
2547 |
break; |
|
2548 |
case RMobilePhone::EPlmnBearerServ1: |
|
2549 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_BEAR_SERV_1; |
|
2550 |
break; |
|
2551 |
case RMobilePhone::EPlmnBearerServ2: |
|
2552 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_BEAR_SERV_2; |
|
2553 |
break; |
|
2554 |
case RMobilePhone::EPlmnBearerServ3: |
|
2555 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_BEAR_SERV_3; |
|
2556 |
break; |
|
2557 |
case RMobilePhone::EPlmnBearerServ4: |
|
2558 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_BEAR_SERV_4; |
|
2559 |
break; |
|
2560 |
case RMobilePhone::EPlmnBearerServ5: |
|
2561 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_BEAR_SERV_5; |
|
2562 |
break; |
|
2563 |
case RMobilePhone::EPlmnBearerServ6: |
|
2564 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_BEAR_SERV_6; |
|
2565 |
break; |
|
2566 |
case RMobilePhone::EPlmnBearerServ7: |
|
2567 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_BEAR_SERV_7; |
|
2568 |
break; |
|
2569 |
case RMobilePhone::EPlmnBearerServ8: |
|
2570 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_BEAR_SERV_8; |
|
2571 |
break; |
|
2572 |
case RMobilePhone::EPlmnBearerServ9: |
|
2573 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_BEAR_SERV_9; |
|
2574 |
break; |
|
2575 |
case RMobilePhone::EPlmnBearerServA: |
|
2576 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_BEAR_SERV_A; |
|
2577 |
break; |
|
2578 |
case RMobilePhone::EPlmnBearerServB: |
|
2579 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_BEAR_SERV_B; |
|
2580 |
break; |
|
2581 |
case RMobilePhone::EPlmnBearerServC: |
|
2582 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_BEAR_SERV_C; |
|
2583 |
break; |
|
2584 |
case RMobilePhone::EPlmnBearerServD: |
|
2585 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_BEAR_SERV_D; |
|
2586 |
break; |
|
2587 |
case RMobilePhone::EPlmnBearerServE: |
|
2588 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_BEAR_SERV_E; |
|
2589 |
break; |
|
2590 |
case RMobilePhone::EPlmnBearerServF: |
|
2591 |
*aIsiBasicServiceCode = SS_GSM_PLMN_SPEC_BEAR_SERV_F; |
|
2592 |
break; |
|
2593 |
case RMobilePhone::EServiceUnspecified: |
|
2594 |
*aIsiBasicServiceCode = SS_UNKNOWN_SERVICE; |
|
2595 |
break; |
|
2596 |
case RMobilePhone::EAuxVoiceService: |
|
2597 |
*aIsiBasicServiceCode = SS_GSM_AUX_TELEPHONY; |
|
2598 |
break; |
|
2599 |
case RMobilePhone::EPacketDataService: |
|
2600 |
*aIsiBasicServiceCode = SS_GSM_ALL_DATA_PACKET_SYNC; |
|
2601 |
break; |
|
2602 |
//following values are not supported in tsy as they are |
|
2603 |
//duplicated. |
|
2604 |
case RMobilePhone::EAltTele: //use EAuxVoiceService |
|
2605 |
case RMobilePhone::EPacketData: //use EPacketDataService |
|
2606 |
case RMobilePhone::EVoiceBroadcast: |
|
2607 |
case RMobilePhone::EAllGprsBearer: |
|
2608 |
case RMobilePhone::EAllDataExSms: |
|
2609 |
ret = KErrNotSupported; |
|
2610 |
break; |
|
2611 |
default: |
|
2612 |
// not expected. |
|
2613 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapMobileServiceToBasicServiceCodeIsi \ |
|
2614 |
- unknown mobile service: %d", aMobileService); |
|
2615 |
OstTrace1( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_MAPMOBILESERVICETOBASICSERVICECODEISI, "CMmSupplServMessHandler::MapMobileServiceToBasicServiceCodeIsi;aMobileService=%d", aMobileService ); |
|
2616 |
ret = KErrArgument; |
|
2617 |
break; |
|
2618 |
} |
|
2619 |
||
2620 |
return ret; |
|
2621 |
} |
|
2622 |
||
2623 |
// ----------------------------------------------------------------------------- |
|
2624 |
// CMmSupplServMessHandler::MapCFConditionMmToIsi |
|
2625 |
// Map multimode api call forwarding condition to isi call forwarding condition. |
|
2626 |
// Returns KErrNone or KErrNotSupported |
|
2627 |
// ----------------------------------------------------------------------------- |
|
2628 |
// |
|
2629 |
TInt CMmSupplServMessHandler::MapCFConditionMmToIsi |
|
2630 |
( |
|
2631 |
RMobilePhone::TMobilePhoneCFCondition aMmCFCondition, |
|
2632 |
// multimode api call forw. condition |
|
2633 |
TUint16* aCFCondition // isi call forw. condition |
|
2634 |
) |
|
2635 |
{ |
|
2636 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::MapCFConditionMmToIsi"); |
|
2637 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_MAPCFCONDITIONMMTOISI, "CMmSupplServMessHandler::MapCFConditionMmToIsi" ); |
|
2638 |
TInt retVal( KErrNone ); |
|
2639 |
||
2640 |
switch ( aMmCFCondition ) |
|
2641 |
{ |
|
2642 |
case RMobilePhone::ECallForwardingUnconditional: |
|
2643 |
*aCFCondition = SS_GSM_FORW_UNCONDITIONAL; |
|
2644 |
break; |
|
2645 |
case RMobilePhone::ECallForwardingAllCases: |
|
2646 |
*aCFCondition = SS_GSM_ALL_FORWARDINGS; |
|
2647 |
break; |
|
2648 |
case RMobilePhone::ECallForwardingAllConditionalCases: |
|
2649 |
*aCFCondition = SS_GSM_ALL_COND_FORWARDINGS; |
|
2650 |
break; |
|
2651 |
case RMobilePhone::ECallForwardingBusy: |
|
2652 |
*aCFCondition = SS_GSM_FORW_BUSY; |
|
2653 |
break; |
|
2654 |
case RMobilePhone::ECallForwardingNoReply: |
|
2655 |
*aCFCondition = SS_GSM_FORW_NO_REPLY; |
|
2656 |
break; |
|
2657 |
case RMobilePhone::ECallForwardingNotReachable: |
|
2658 |
*aCFCondition = SS_GSM_FORW_NO_REACH; |
|
2659 |
break; |
|
2660 |
case RMobilePhone::ECallForwardingUnspecified: |
|
2661 |
default: |
|
2662 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapCFConditionMmToIsi - \ |
|
2663 |
unknown call forward condition: %d", aCFCondition); |
|
2664 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_MAPCFCONDITIONMMTOISI, "CMmSupplServMessHandler::MapCFConditionMmToIsi;aCFCondition=%hu", *aCFCondition ); |
|
2665 |
retVal = KErrNotSupported; |
|
2666 |
break; |
|
2667 |
} |
|
2668 |
||
2669 |
return retVal; |
|
2670 |
} |
|
2671 |
||
2672 |
// ----------------------------------------------------------------------------- |
|
2673 |
// CMmSupplServMessHandler::MapTypeOfNumberIsiToMm |
|
2674 |
// Map isi type of number to multimode api type of number. |
|
2675 |
// Returns KErrNone or KErrArgument |
|
2676 |
// ----------------------------------------------------------------------------- |
|
2677 |
// |
|
2678 |
TInt CMmSupplServMessHandler::MapTypeOfNumberIsiToMm |
|
2679 |
( |
|
2680 |
TUint8 aIsiTypeOfNumber, // isi number type |
|
2681 |
RMobilePhone::TMobileTON* aMmTypeOfNumber, // number type |
|
2682 |
RMobilePhone::TMobileNPI* aMmNumberingPlan // numbering plan |
|
2683 |
) |
|
2684 |
{ |
|
2685 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::MapTypeOfNumberIsiToMm"); |
|
2686 |
OstTrace0( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_MAPTYPEOFNUMBERISITOMM, "CMmSupplServMessHandler::MapTypeOfNumberIsiToMm" ); |
|
2687 |
||
2688 |
TInt retVal( KErrNone ); |
|
2689 |
//get the right numbering plan |
|
2690 |
switch ( aIsiTypeOfNumber & 0xF ) |
|
2691 |
// 0xF = 1111, above switch case checks four least significant bits |
|
2692 |
{ |
|
2693 |
case SS_NBR_PLAN_UNKNOWN: |
|
2694 |
*aMmNumberingPlan = RMobilePhone::EUnknownNumberingPlan; |
|
2695 |
break; |
|
2696 |
case SS_NBR_PLAN_ISDN_TELEPHONY: |
|
2697 |
*aMmNumberingPlan = RMobilePhone::EIsdnNumberPlan; |
|
2698 |
break; |
|
2699 |
case SS_NBR_PLAN_DATA: |
|
2700 |
*aMmNumberingPlan = RMobilePhone::EDataNumberPlan; |
|
2701 |
break; |
|
2702 |
case SS_NBR_PLAN_TELEX: |
|
2703 |
*aMmNumberingPlan = RMobilePhone::ETelexNumberPlan; |
|
2704 |
break; |
|
2705 |
case SS_NBR_PLAN_NATIONAL: |
|
2706 |
*aMmNumberingPlan = RMobilePhone::ENationalNumberPlan; |
|
2707 |
break; |
|
2708 |
case SS_NBR_PLAN_PRIVATE: |
|
2709 |
*aMmNumberingPlan = RMobilePhone::EPrivateNumberPlan; |
|
2710 |
break; |
|
2711 |
default: |
|
2712 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapTypeOfNumberIsiToMm - \ |
|
2713 |
unknown number plan: %d", ( aIsiTypeOfNumber & 0xF ) ); |
|
2714 |
#ifdef OST_TRACE_COMPILER_IN_USE // following lines flagged out just get rid of |
|
2715 |
// compiler warning when trace compiler is not |
|
2716 |
// in use. |
|
2717 |
TUint8 tOn = aIsiTypeOfNumber & 0x0F; // parameter made just for tracing. |
|
2718 |
OstTraceExt1( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_MAPTYPEOFNUMBERISITOMM, "CMmSupplServMessHandler::MapTypeOfNumberIsiToMm;aIsiTypeOfNumber=%hhu", tOn ); |
|
2719 |
#endif |
|
2720 |
retVal = KErrArgument; |
|
2721 |
break; |
|
2722 |
} |
|
2723 |
||
2724 |
//Get the right type of number. |
|
2725 |
//Masked with 0x70 as different highest bit (8th bit) is always 1. |
|
2726 |
switch ( ( aIsiTypeOfNumber & 0x70 ) >> 4 ) |
|
2727 |
{ |
|
2728 |
case SS_NBR_TYPE_UNKNOWN: |
|
2729 |
*aMmTypeOfNumber = RMobilePhone::EUnknownNumber; |
|
2730 |
break; |
|
2731 |
case SS_NBR_TYPE_INTERNATIONAL: |
|
2732 |
*aMmTypeOfNumber = RMobilePhone::EInternationalNumber; |
|
2733 |
break; |
|
2734 |
case SS_NBR_TYPE_NATIONAL: |
|
2735 |
*aMmTypeOfNumber = RMobilePhone::ENationalNumber; |
|
2736 |
break; |
|
2737 |
case SS_NBR_TYPE_NETWORK_SPECIFIC: |
|
2738 |
*aMmTypeOfNumber = RMobilePhone::ENetworkSpecificNumber; |
|
2739 |
break; |
|
2740 |
case SS_NBR_TYPE_SUBSCRIBER: |
|
2741 |
*aMmTypeOfNumber = RMobilePhone::ESubscriberNumber; |
|
2742 |
break; |
|
2743 |
case SS_NBR_TYPE_ALPHANUMERIC: |
|
2744 |
*aMmTypeOfNumber = RMobilePhone::EAlphanumericNumber; |
|
2745 |
break; |
|
2746 |
case SS_NBR_TYPE_ABBREVIATED: |
|
2747 |
*aMmTypeOfNumber = RMobilePhone::EAbbreviatedNumber; |
|
2748 |
break; |
|
2749 |
default: |
|
2750 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapTypeOfNumberIsiToMm - \ |
|
2751 |
unknown number type: %d", ( ( aIsiTypeOfNumber & 0x70 ) >> 4 ) ); |
|
2752 |
#ifdef OST_TRACE_COMPILER_IN_USE // following lines flagged out just get rid of |
|
2753 |
// compiler warning when trace compiler is not |
|
2754 |
// in use. |
|
2755 |
TUint8 tOn = ( ( aIsiTypeOfNumber & 0x70 ) >> 4 ); // Parameter just for tracing. |
|
2756 |
OstTraceExt1( TRACE_NORMAL, DUP2_CMMSUPPLSERVMESSHANDLER_MAPTYPEOFNUMBERISITOMM, "CMmSupplServMessHandler::MapTypeOfNumberIsiToMm;tOn=%hhu", tOn ); |
|
2757 |
#endif |
|
2758 |
retVal = KErrArgument; |
|
2759 |
break; |
|
2760 |
} |
|
2761 |
||
2762 |
return retVal; |
|
2763 |
} |
|
2764 |
||
2765 |
// ----------------------------------------------------------------------------- |
|
2766 |
// CMmSupplServMessHandler::MapCFStatusIsiToMm |
|
2767 |
// Map call forwarding isi status to multimode api status. |
|
2768 |
// ----------------------------------------------------------------------------- |
|
2769 |
// |
|
2770 |
void CMmSupplServMessHandler::MapCFStatusIsiToMm |
|
2771 |
( |
|
2772 |
TUint8 aIsiSsStatus, // SS Status |
|
2773 |
RMobilePhone::TMobilePhoneCFStatus* aMmCFStatus // call forw. status |
|
2774 |
) |
|
2775 |
{ |
|
2776 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapCFStatusIsiToMm - SS status: %d", |
|
2777 |
aIsiSsStatus); |
|
2778 |
OstTraceExt1( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_MAPCFSTATUSISITOMM, "CMmSupplServMessHandler::MapCFStatusIsiToMm;aIsiSsStatus=%hhu", aIsiSsStatus ); |
|
2779 |
||
2780 |
if ( ( 0 == ( aIsiSsStatus & ( SS_GSM_ACTIVE + SS_GSM_REGISTERED + |
|
2781 |
SS_GSM_PROVISIONED + SS_GSM_QUIESCENT ) ) ) && |
|
2782 |
( 0 < aIsiSsStatus ) ) |
|
2783 |
// no valid status code found |
|
2784 |
{ |
|
2785 |
*aMmCFStatus = RMobilePhone::ECallForwardingStatusUnknown; |
|
2786 |
} |
|
2787 |
else if ( 0 == ( aIsiSsStatus & SS_GSM_PROVISIONED ) ) |
|
2788 |
//not SS_GSM_PROVISIONED |
|
2789 |
{ |
|
2790 |
*aMmCFStatus = RMobilePhone::ECallForwardingStatusNotProvisioned; |
|
2791 |
} |
|
2792 |
else if ( 0 == ( aIsiSsStatus & SS_GSM_REGISTERED ) ) |
|
2793 |
//not SS_GSM_REGISTERED |
|
2794 |
{ |
|
2795 |
*aMmCFStatus = RMobilePhone::ECallForwardingStatusNotRegistered; |
|
2796 |
} |
|
2797 |
else if ( (0 == (aIsiSsStatus & SS_GSM_ACTIVE )) || |
|
2798 |
(aIsiSsStatus & SS_GSM_QUIESCENT ) ) |
|
2799 |
// not SS_GSM_ACTIVE or SS_GSM_QUIESCENT |
|
2800 |
{ |
|
2801 |
*aMmCFStatus = RMobilePhone::ECallForwardingStatusNotActive; |
|
2802 |
} |
|
2803 |
else if ( aIsiSsStatus & SS_GSM_ACTIVE ) |
|
2804 |
// SS_GSM_ACTIVE |
|
2805 |
{ |
|
2806 |
*aMmCFStatus = RMobilePhone::ECallForwardingStatusActive; |
|
2807 |
} |
|
2808 |
} |
|
2809 |
||
2810 |
// ----------------------------------------------------------------------------- |
|
2811 |
// CMmSupplServMessHandler::MapCWStatusIsiToMm |
|
2812 |
// Map call waiting isi status to multimode api status. |
|
2813 |
// ----------------------------------------------------------------------------- |
|
2814 |
// |
|
2815 |
void CMmSupplServMessHandler::MapCWStatusIsiToMm |
|
2816 |
( |
|
2817 |
TUint8 aIsiSsStatus, // SS Status |
|
2818 |
RMobilePhone::TMobilePhoneCWStatus* aMmCWStatus // call waiting status |
|
2819 |
) |
|
2820 |
{ |
|
2821 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::MapCWStatusIsiToMm"); |
|
2822 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_MAPCWSTATUSISITOMM, "CMmSupplServMessHandler::MapCWStatusIsiToMm" ); |
|
2823 |
||
2824 |
if ( ( 0 == ( aIsiSsStatus & ( SS_GSM_ACTIVE + SS_GSM_REGISTERED + |
|
2825 |
SS_GSM_PROVISIONED + SS_GSM_QUIESCENT ) ) ) && |
|
2826 |
( 0 < aIsiSsStatus ) ) |
|
2827 |
// no valid status code found |
|
2828 |
{ |
|
2829 |
*aMmCWStatus = RMobilePhone::ECallWaitingStatusUnknown; |
|
2830 |
} |
|
2831 |
else if ( 0 == ( aIsiSsStatus & SS_GSM_PROVISIONED ) ) |
|
2832 |
//not SS_GSM_PROVISIONED |
|
2833 |
{ |
|
2834 |
*aMmCWStatus = RMobilePhone::ECallWaitingStatusNotProvisioned; |
|
2835 |
} |
|
2836 |
else if ( (0 == (aIsiSsStatus & SS_GSM_ACTIVE )) || |
|
2837 |
(aIsiSsStatus & SS_GSM_QUIESCENT ) ) |
|
2838 |
// not SS_GSM_ACTIVE or SS_GSM_QUIESCENT |
|
2839 |
{ |
|
2840 |
*aMmCWStatus = RMobilePhone::ECallWaitingStatusNotActive; |
|
2841 |
} |
|
2842 |
else if ( aIsiSsStatus & SS_GSM_ACTIVE ) |
|
2843 |
// SS_GSM_ACTIVE |
|
2844 |
{ |
|
2845 |
*aMmCWStatus = RMobilePhone::ECallWaitingStatusActive; |
|
2846 |
} |
|
2847 |
} |
|
2848 |
||
2849 |
// ---------------------------------------------------------------------------- |
|
2850 |
// CMmSupplServMessHandler::MapBasicServiceCodeIsiToMm |
|
2851 |
// Map isi basic service code to multimode api basic service code. |
|
2852 |
// |
|
2853 |
// Most ETel <=> ISI mappings are 1:1, but this method contains two exceptions: |
|
2854 |
// (EVoiceService,ETelephony) <=> KSsGsmTelephony |
|
2855 |
// (ECircuitDataService,EAllBearer) <=> KSsGsmAllBearer |
|
2856 |
// |
|
2857 |
// Returns KErrNone or KErrGeneral |
|
2858 |
// ----------------------------------------------------------------------------- |
|
2859 |
// |
|
2860 |
TInt CMmSupplServMessHandler::MapBasicServiceCodeIsiToMm |
|
2861 |
( |
|
2862 |
TUint8 aIsiBasicServiceCode, // isi basic service code |
|
2863 |
RMobilePhone::TMobileService* aMmBasicServiceCode |
|
2864 |
// multimode api basic service code |
|
2865 |
) |
|
2866 |
{ |
|
2867 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapBasicServiceCodeIsiToMm - \ |
|
2868 |
isi basic service code: %d", aIsiBasicServiceCode); |
|
2869 |
OstTraceExt1( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_MAPBASICSERVICECODEISITOMM, "CMmSupplServMessHandler::MapBasicServiceCodeIsiToMm;aIsiBasicServiceCode=%hhu", aIsiBasicServiceCode ); |
|
2870 |
||
2871 |
TInt ret( KErrNone ); |
|
2872 |
||
2873 |
switch ( aIsiBasicServiceCode ) |
|
2874 |
{ |
|
2875 |
case SS_ALL_TELE_AND_BEARER: |
|
2876 |
*aMmBasicServiceCode = RMobilePhone::EAllServices; |
|
2877 |
break; |
|
2878 |
case SS_GSM_ALL_TELE: |
|
2879 |
*aMmBasicServiceCode = RMobilePhone::EAllTele; |
|
2880 |
break; |
|
2881 |
case SS_GSM_TELEPHONY: |
|
2882 |
if ( iVoiceServiceMappedToTelephony ) |
|
2883 |
{ |
|
2884 |
*aMmBasicServiceCode = RMobilePhone::EVoiceService; |
|
2885 |
iVoiceServiceMappedToTelephony = EFalse; |
|
2886 |
} |
|
2887 |
else |
|
2888 |
{ |
|
2889 |
*aMmBasicServiceCode = RMobilePhone::ETelephony; |
|
2890 |
} |
|
2891 |
break; |
|
2892 |
case SS_GSM_ALL_DATA_TELE: |
|
2893 |
*aMmBasicServiceCode = RMobilePhone::EAllDataTele; |
|
2894 |
break; |
|
2895 |
case SS_GSM_FACSIMILE: |
|
2896 |
*aMmBasicServiceCode = RMobilePhone::EFaxService; |
|
2897 |
break; |
|
2898 |
case SS_GSM_SMS: |
|
2899 |
*aMmBasicServiceCode = RMobilePhone::EShortMessageService; |
|
2900 |
break; |
|
2901 |
case SS_GSM_VOICE_GROUP: |
|
2902 |
*aMmBasicServiceCode = RMobilePhone::EVoiceGroupCall; |
|
2903 |
break; |
|
2904 |
case SS_GSM_ALL_TELE_EXC_SMS: |
|
2905 |
*aMmBasicServiceCode = RMobilePhone::EAllTeleExcSms; |
|
2906 |
break; |
|
2907 |
case SS_GSM_ALL_PLMN_SPEC_TELE_SERV: |
|
2908 |
*aMmBasicServiceCode = RMobilePhone::EAllPlmnTele; |
|
2909 |
break; |
|
2910 |
case SS_GSM_PLMN_SPEC_TELE_SERV_1: |
|
2911 |
*aMmBasicServiceCode = RMobilePhone::EPlmnTele1; |
|
2912 |
break; |
|
2913 |
case SS_GSM_PLMN_SPEC_TELE_SERV_2: |
|
2914 |
*aMmBasicServiceCode = RMobilePhone::EPlmnTele2; |
|
2915 |
break; |
|
2916 |
case SS_GSM_PLMN_SPEC_TELE_SERV_3: |
|
2917 |
*aMmBasicServiceCode = RMobilePhone::EPlmnTele3; |
|
2918 |
break; |
|
2919 |
case SS_GSM_PLMN_SPEC_TELE_SERV_4: |
|
2920 |
*aMmBasicServiceCode = RMobilePhone::EPlmnTele4; |
|
2921 |
break; |
|
2922 |
case SS_GSM_PLMN_SPEC_TELE_SERV_5: |
|
2923 |
*aMmBasicServiceCode = RMobilePhone::EPlmnTele5; |
|
2924 |
break; |
|
2925 |
case SS_GSM_PLMN_SPEC_TELE_SERV_6: |
|
2926 |
*aMmBasicServiceCode = RMobilePhone::EPlmnTele6; |
|
2927 |
break; |
|
2928 |
case SS_GSM_PLMN_SPEC_TELE_SERV_7: |
|
2929 |
*aMmBasicServiceCode = RMobilePhone::EPlmnTele7; |
|
2930 |
break; |
|
2931 |
case SS_GSM_PLMN_SPEC_TELE_SERV_8: |
|
2932 |
*aMmBasicServiceCode = RMobilePhone::EPlmnTele8; |
|
2933 |
break; |
|
2934 |
case SS_GSM_PLMN_SPEC_TELE_SERV_9: |
|
2935 |
*aMmBasicServiceCode = RMobilePhone::EPlmnTele9; |
|
2936 |
break; |
|
2937 |
case SS_GSM_PLMN_SPEC_TELE_SERV_A: |
|
2938 |
*aMmBasicServiceCode = RMobilePhone::EPlmnTeleA; |
|
2939 |
break; |
|
2940 |
case SS_GSM_PLMN_SPEC_TELE_SERV_B: |
|
2941 |
*aMmBasicServiceCode = RMobilePhone::EPlmnTeleB; |
|
2942 |
break; |
|
2943 |
case SS_GSM_PLMN_SPEC_TELE_SERV_C: |
|
2944 |
*aMmBasicServiceCode = RMobilePhone::EPlmnTeleC; |
|
2945 |
break; |
|
2946 |
case SS_GSM_PLMN_SPEC_TELE_SERV_D: |
|
2947 |
*aMmBasicServiceCode = RMobilePhone::EPlmnTeleD; |
|
2948 |
break; |
|
2949 |
case SS_GSM_PLMN_SPEC_TELE_SERV_E: |
|
2950 |
*aMmBasicServiceCode = RMobilePhone::EPlmnTeleE; |
|
2951 |
break; |
|
2952 |
case SS_GSM_PLMN_SPEC_TELE_SERV_F: |
|
2953 |
*aMmBasicServiceCode = RMobilePhone::EPlmnTeleF; |
|
2954 |
break; |
|
2955 |
case SS_GSM_AUX_TELEPHONY: |
|
2956 |
*aMmBasicServiceCode = RMobilePhone::EAuxVoiceService; |
|
2957 |
break; |
|
2958 |
case SS_GSM_ALL_BEARER: |
|
2959 |
if ( iCircuitServiceMappedToAllBearer ) |
|
2960 |
{ |
|
2961 |
*aMmBasicServiceCode = RMobilePhone::ECircuitDataService; |
|
2962 |
iCircuitServiceMappedToAllBearer = EFalse; |
|
2963 |
} |
|
2964 |
else |
|
2965 |
{ |
|
2966 |
*aMmBasicServiceCode = RMobilePhone::EAllBearer; |
|
2967 |
} |
|
2968 |
break; |
|
2969 |
case SS_GSM_ALL_ASYNC: |
|
2970 |
*aMmBasicServiceCode = RMobilePhone::EAllAsync; |
|
2971 |
break; |
|
2972 |
case SS_GSM_ALL_SYNC: |
|
2973 |
*aMmBasicServiceCode = RMobilePhone::EAllSync; |
|
2974 |
break; |
|
2975 |
case SS_GSM_ALL_DATA_CIRCUIT_SYNC: |
|
2976 |
*aMmBasicServiceCode = RMobilePhone::ESyncData; |
|
2977 |
break; |
|
2978 |
case SS_GSM_ALL_DATA_CIRCUIT_ASYNC: |
|
2979 |
*aMmBasicServiceCode = RMobilePhone::EAsyncData; |
|
2980 |
break; |
|
2981 |
case SS_GSM_ALL_DATA_PACKET_SYNC: |
|
2982 |
*aMmBasicServiceCode = RMobilePhone::EPacketDataService; |
|
2983 |
break; |
|
2984 |
case SS_GSM_ALL_PAD_ACCESS: |
|
2985 |
*aMmBasicServiceCode = RMobilePhone::EPadAccess; |
|
2986 |
break; |
|
2987 |
case SS_GSM_ALL_PLMN_SPEC_BEAR_SERV: |
|
2988 |
*aMmBasicServiceCode = RMobilePhone::EAllPlmnBearer; |
|
2989 |
break; |
|
2990 |
case SS_GSM_PLMN_SPEC_BEAR_SERV_1: |
|
2991 |
*aMmBasicServiceCode = RMobilePhone::EPlmnBearerServ1; |
|
2992 |
break; |
|
2993 |
case SS_GSM_PLMN_SPEC_BEAR_SERV_2: |
|
2994 |
*aMmBasicServiceCode = RMobilePhone::EPlmnBearerServ2; |
|
2995 |
break; |
|
2996 |
case SS_GSM_PLMN_SPEC_BEAR_SERV_3: |
|
2997 |
*aMmBasicServiceCode = RMobilePhone::EPlmnBearerServ3; |
|
2998 |
break; |
|
2999 |
case SS_GSM_PLMN_SPEC_BEAR_SERV_4: |
|
3000 |
*aMmBasicServiceCode = RMobilePhone::EPlmnBearerServ4; |
|
3001 |
break; |
|
3002 |
case SS_GSM_PLMN_SPEC_BEAR_SERV_5: |
|
3003 |
*aMmBasicServiceCode = RMobilePhone::EPlmnBearerServ5; |
|
3004 |
break; |
|
3005 |
case SS_GSM_PLMN_SPEC_BEAR_SERV_6: |
|
3006 |
*aMmBasicServiceCode = RMobilePhone::EPlmnBearerServ6; |
|
3007 |
break; |
|
3008 |
case SS_GSM_PLMN_SPEC_BEAR_SERV_7: |
|
3009 |
*aMmBasicServiceCode = RMobilePhone::EPlmnBearerServ7; |
|
3010 |
break; |
|
3011 |
case SS_GSM_PLMN_SPEC_BEAR_SERV_8: |
|
3012 |
*aMmBasicServiceCode = RMobilePhone::EPlmnBearerServ8; |
|
3013 |
break; |
|
3014 |
case SS_GSM_PLMN_SPEC_BEAR_SERV_9: |
|
3015 |
*aMmBasicServiceCode = RMobilePhone::EPlmnBearerServ9; |
|
3016 |
break; |
|
3017 |
case SS_GSM_PLMN_SPEC_BEAR_SERV_A: |
|
3018 |
*aMmBasicServiceCode = RMobilePhone::EPlmnBearerServA; |
|
3019 |
break; |
|
3020 |
case SS_GSM_PLMN_SPEC_BEAR_SERV_B: |
|
3021 |
*aMmBasicServiceCode = RMobilePhone::EPlmnBearerServB; |
|
3022 |
break; |
|
3023 |
case SS_GSM_PLMN_SPEC_BEAR_SERV_C: |
|
3024 |
*aMmBasicServiceCode = RMobilePhone::EPlmnBearerServC; |
|
3025 |
break; |
|
3026 |
case SS_GSM_PLMN_SPEC_BEAR_SERV_D: |
|
3027 |
*aMmBasicServiceCode = RMobilePhone::EPlmnBearerServD; |
|
3028 |
break; |
|
3029 |
case SS_GSM_PLMN_SPEC_BEAR_SERV_E: |
|
3030 |
*aMmBasicServiceCode = RMobilePhone::EPlmnBearerServE; |
|
3031 |
break; |
|
3032 |
case SS_GSM_PLMN_SPEC_BEAR_SERV_F: |
|
3033 |
*aMmBasicServiceCode = RMobilePhone::EPlmnBearerServF; |
|
3034 |
break; |
|
3035 |
case SS_UNKNOWN_SERVICE: |
|
3036 |
*aMmBasicServiceCode = RMobilePhone::EServiceUnspecified; |
|
3037 |
break; |
|
3038 |
default: |
|
3039 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapBasicServiceCodeIsiToMm \ |
|
3040 |
- unknown isi basic service code: %d", aIsiBasicServiceCode); |
|
3041 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_MAPBASICSERVICECODEISITOMM, "CMmSupplServMessHandler::MapBasicServiceCodeIsiToMm;unknown isi basic service code=%hhu", aIsiBasicServiceCode ); |
|
3042 |
ret = KErrGeneral; // this can't be KErrArgument because basic |
|
3043 |
// service code isn't usually given as argument |
|
3044 |
break; |
|
3045 |
} |
|
3046 |
return ret; |
|
3047 |
} |
|
3048 |
||
3049 |
// ---------------------------------------------------------------------------- |
|
3050 |
// CMmSupplServMessHandler::MapCFConditionIsiToMm |
|
3051 |
// Map isi call forwarding condition to multimode api call forwarding condition |
|
3052 |
// ----------------------------------------------------------------------------- |
|
3053 |
// |
|
3054 |
void CMmSupplServMessHandler::MapCFConditionIsiToMm |
|
3055 |
( |
|
3056 |
TUint16 aCFCondition, // isi call forw. condition |
|
3057 |
RMobilePhone::TMobilePhoneCFCondition* aMmCFCondition |
|
3058 |
// multimode api call forw. condition |
|
3059 |
) |
|
3060 |
{ |
|
3061 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapCFConditionIsiToMm - isi call \ |
|
3062 |
forward condition: %d", aCFCondition); |
|
3063 |
OstTraceExt1( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_MAPCFCONDITIONISITOMM, "CMmSupplServMessHandler::MapCFConditionIsiToMm;aCFCondition=%hu", aCFCondition ); |
|
3064 |
||
3065 |
//get the right condition code |
|
3066 |
switch ( aCFCondition ) |
|
3067 |
{ |
|
3068 |
case SS_GSM_FORW_UNCONDITIONAL: |
|
3069 |
*aMmCFCondition = RMobilePhone::ECallForwardingUnconditional; |
|
3070 |
break; |
|
3071 |
case SS_GSM_FORW_BUSY: |
|
3072 |
*aMmCFCondition = RMobilePhone::ECallForwardingBusy; |
|
3073 |
break; |
|
3074 |
case SS_GSM_FORW_NO_REPLY: |
|
3075 |
*aMmCFCondition = RMobilePhone::ECallForwardingNoReply; |
|
3076 |
break; |
|
3077 |
case SS_GSM_FORW_NO_REACH: |
|
3078 |
*aMmCFCondition = RMobilePhone::ECallForwardingNotReachable; |
|
3079 |
break; |
|
3080 |
case SS_GSM_ALL_COND_FORWARDINGS: |
|
3081 |
*aMmCFCondition = RMobilePhone::ECallForwardingAllConditionalCases; |
|
3082 |
break; |
|
3083 |
case SS_GSM_ALL_FORWARDINGS: |
|
3084 |
*aMmCFCondition = RMobilePhone::ECallForwardingAllCases; |
|
3085 |
break; |
|
3086 |
default: |
|
3087 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapCFConditionIsiToMm - unknown isi call forward condition: %d", aCFCondition); |
|
3088 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_MAPCFCONDITIONISITOMM, "CMmSupplServMessHandler::MapCFConditionIsiToMm;unknown isi call forward condition=%hu", aCFCondition ); |
|
3089 |
*aMmCFCondition = RMobilePhone::ECallForwardingUnspecified; |
|
3090 |
break; |
|
3091 |
} |
|
3092 |
} |
|
3093 |
||
3094 |
// ---------------------------------------------------------------------------- |
|
3095 |
// CMmSupplServMessHandler::MapTypeOfNumberMmToIsi |
|
3096 |
// Map isi timeout value to ETel timeout value |
|
3097 |
// ----------------------------------------------------------------------------- |
|
3098 |
// |
|
3099 |
void CMmSupplServMessHandler::MapTimeoutIsiToMm |
|
3100 |
( |
|
3101 |
TUint8 aISITimeout, // isi timeout |
|
3102 |
TInt* aMmTimeout // multimode api timeout |
|
3103 |
) |
|
3104 |
{ |
|
3105 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapTimeoutIsiToMm - isi timeout: %d", |
|
3106 |
aISITimeout); |
|
3107 |
OstTraceExt1( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_MAPTIMEOUTISITOMM, "CMmSupplServMessHandler::MapTimeoutIsiToMm;aISITimeout=%hhu", aISITimeout ); |
|
3108 |
||
3109 |
if ( SS_UNDEFINED_TIME == aISITimeout ) |
|
3110 |
{ |
|
3111 |
*aMmTimeout = -1; |
|
3112 |
} |
|
3113 |
else |
|
3114 |
{ |
|
3115 |
*aMmTimeout = aISITimeout; |
|
3116 |
} |
|
3117 |
} |
|
3118 |
||
3119 |
// ---------------------------------------------------------------------------- |
|
3120 |
// CMmSupplServMessHandler::MapOperationMmToIsi |
|
3121 |
// Map multimode api operation to isi operation. |
|
3122 |
// Returns KErrNone or KErrArgument |
|
3123 |
// ----------------------------------------------------------------------------- |
|
3124 |
// |
|
3125 |
TInt CMmSupplServMessHandler::MapOperationMmToIsi |
|
3126 |
( |
|
3127 |
RMobilePhone::TMobilePhoneServiceAction aMmOperation, |
|
3128 |
// multimode api service action |
|
3129 |
TUint8* aIsiOperation // isi operation |
|
3130 |
) |
|
3131 |
{ |
|
3132 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapOperationMmToIsi - multimode \ |
|
3133 |
api service action: %d", aMmOperation); |
|
3134 |
OstTrace1( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_MAPOPERATIONMMTOISI, "CMmSupplServMessHandler::MapOperationMmToIsi;aMmOperation=%d", aMmOperation ); |
|
3135 |
||
3136 |
TInt ret( KErrNone ); |
|
3137 |
||
3138 |
//get the right operation code |
|
3139 |
switch ( aMmOperation ) |
|
3140 |
{ |
|
3141 |
case RMobilePhone::EServiceActionActivate: |
|
3142 |
*aIsiOperation = SS_ACTIVATION; |
|
3143 |
break; |
|
3144 |
case RMobilePhone::EServiceActionDeactivate: |
|
3145 |
*aIsiOperation = SS_DEACTIVATION; |
|
3146 |
break; |
|
3147 |
case RMobilePhone::EServiceActionRegister: |
|
3148 |
*aIsiOperation = SS_REGISTRATION; |
|
3149 |
break; |
|
3150 |
case RMobilePhone::EServiceActionErase: |
|
3151 |
*aIsiOperation = SS_ERASURE; |
|
3152 |
break; |
|
3153 |
case RMobilePhone::EServiceActionUnspecified: |
|
3154 |
case RMobilePhone::EServiceActionInvoke: |
|
3155 |
default: |
|
3156 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapOperationMmToIsi - \ |
|
3157 |
unknown multimode api service action: %d", aMmOperation); |
|
3158 |
OstTrace1( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_MAPOPERATIONMMTOISI, "CMmSupplServMessHandler::MapOperationMmToIsi;unknown multimode api service action=%d", aMmOperation ); |
|
3159 |
ret = KErrArgument; |
|
3160 |
break; |
|
3161 |
} |
|
3162 |
return ret; |
|
3163 |
} |
|
3164 |
||
3165 |
// ---------------------------------------------------------------------------- |
|
3166 |
// CMmSupplServMessHandler::MapCBConditionIsiToMm |
|
3167 |
// Map isi call barring condition to multimode api call barring condition. |
|
3168 |
// ----------------------------------------------------------------------------- |
|
3169 |
// |
|
3170 |
void CMmSupplServMessHandler::MapCBConditionIsiToMm |
|
3171 |
( |
|
3172 |
TUint16 aCBCondition, // isi call barring condition |
|
3173 |
RMobilePhone::TMobilePhoneCBCondition* aMmCBCondition |
|
3174 |
// multimode api call barring condition |
|
3175 |
) |
|
3176 |
{ |
|
3177 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapCBConditionIsiToMm - isi call \ |
|
3178 |
barring condition: %d", aCBCondition); |
|
3179 |
OstTraceExt1( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_MAPCBCONDITIONISITOMM, "CMmSupplServMessHandler::MapCBConditionIsiToMm;aCBCondition=%hu", aCBCondition ); |
|
3180 |
||
3181 |
//get the right condition code |
|
3182 |
switch ( aCBCondition ) |
|
3183 |
{ |
|
3184 |
case SS_GSM_BARR_ALL_IN: |
|
3185 |
*aMmCBCondition = RMobilePhone::EBarAllIncoming; |
|
3186 |
break; |
|
3187 |
case SS_GSM_BARR_ALL_IN_ROAM: |
|
3188 |
*aMmCBCondition = RMobilePhone::EBarIncomingRoaming; |
|
3189 |
break; |
|
3190 |
case SS_GSM_BARR_ALL_OUT: |
|
3191 |
*aMmCBCondition = RMobilePhone::EBarAllOutgoing; |
|
3192 |
break; |
|
3193 |
case SS_GSM_BARR_OUT_INTER: |
|
3194 |
*aMmCBCondition = RMobilePhone::EBarOutgoingInternational; |
|
3195 |
break; |
|
3196 |
case SS_GSM_BARR_OUT_INTER_EXC_HOME: |
|
3197 |
*aMmCBCondition = RMobilePhone::EBarOutgoingInternationalExHC; |
|
3198 |
break; |
|
3199 |
case SS_GSM_ALL_BARRINGS: |
|
3200 |
*aMmCBCondition = RMobilePhone::EBarAllCases; |
|
3201 |
break; |
|
3202 |
case SS_GSM_OUTGOING_BARR_SERV: |
|
3203 |
*aMmCBCondition = RMobilePhone::EBarAllOutgoingServices; |
|
3204 |
break; |
|
3205 |
case SS_GSM_INCOMING_BARR_SERV: |
|
3206 |
*aMmCBCondition = RMobilePhone::EBarAllIncomingServices; |
|
3207 |
break; |
|
3208 |
default: |
|
3209 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapCBConditionIsiToMm - unknown isi call barring condition: %d", aCBCondition); |
|
3210 |
OstTraceExt1( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_MAPCBCONDITIONISITOMM, "CMmSupplServMessHandler::MapCBConditionIsiToMm;unknown isi call barring condition=%hu", aCBCondition ); |
|
3211 |
*aMmCBCondition = RMobilePhone::EBarUnspecified; |
|
3212 |
break; |
|
3213 |
} |
|
3214 |
} |
|
3215 |
||
3216 |
// ---------------------------------------------------------------------------- |
|
3217 |
// CMmSupplServMessHandler::MapCBConditionMmToIsi |
|
3218 |
// Map multimode api call barring condition to isi call barring condition. |
|
3219 |
// Returns KErrNone or KErrNotSupported |
|
3220 |
// ----------------------------------------------------------------------------- |
|
3221 |
// |
|
3222 |
TInt CMmSupplServMessHandler::MapCBConditionMmToIsi |
|
3223 |
( |
|
3224 |
RMobilePhone::TMobilePhoneCBCondition aMmCBCondition, |
|
3225 |
// multimode api call barring condition |
|
3226 |
TUint16* aCBCondition // isi call barring condition |
|
3227 |
) |
|
3228 |
{ |
|
3229 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapCBConditionMmToIsi - multimode \ |
|
3230 |
api call barring condition: %d", aMmCBCondition); |
|
3231 |
OstTrace1( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_MAPCBCONDITIONMMTOISI, "CMmSupplServMessHandler::MapCBConditionMmToIsi;aMmCBCondition=%d", aMmCBCondition ); |
|
3232 |
||
3233 |
TInt ret( KErrNone ); |
|
3234 |
||
3235 |
switch ( aMmCBCondition ) |
|
3236 |
{ |
|
3237 |
case RMobilePhone::EBarAllIncoming: |
|
3238 |
*aCBCondition = SS_GSM_BARR_ALL_IN; |
|
3239 |
break; |
|
3240 |
case RMobilePhone::EBarIncomingRoaming: |
|
3241 |
*aCBCondition = SS_GSM_BARR_ALL_IN_ROAM; |
|
3242 |
break; |
|
3243 |
case RMobilePhone::EBarAllOutgoing: |
|
3244 |
*aCBCondition = SS_GSM_BARR_ALL_OUT; |
|
3245 |
break; |
|
3246 |
case RMobilePhone::EBarOutgoingInternational: |
|
3247 |
*aCBCondition = SS_GSM_BARR_OUT_INTER; |
|
3248 |
break; |
|
3249 |
case RMobilePhone::EBarOutgoingInternationalExHC: |
|
3250 |
*aCBCondition = SS_GSM_BARR_OUT_INTER_EXC_HOME; |
|
3251 |
break; |
|
3252 |
case RMobilePhone::EBarAllCases: |
|
3253 |
*aCBCondition = SS_GSM_ALL_BARRINGS; |
|
3254 |
break; |
|
3255 |
case RMobilePhone::EBarAllOutgoingServices: |
|
3256 |
*aCBCondition = SS_GSM_OUTGOING_BARR_SERV; |
|
3257 |
break; |
|
3258 |
case RMobilePhone::EBarAllIncomingServices: |
|
3259 |
*aCBCondition = SS_GSM_INCOMING_BARR_SERV; |
|
3260 |
break; |
|
3261 |
case RMobilePhone::EBarUnspecified: |
|
3262 |
default: |
|
3263 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapCBConditionMmToIsi - \ |
|
3264 |
unknown multimode api call barring condition: %d", aMmCBCondition); |
|
3265 |
OstTrace1( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_MAPCBCONDITIONMMTOISI, "CMmSupplServMessHandler::MapCBConditionMmToIsi;unknown multimode api call barring condition=%d", aMmCBCondition ); |
|
3266 |
ret = KErrNotSupported; |
|
3267 |
break; |
|
3268 |
} |
|
3269 |
return ret; |
|
3270 |
} |
|
3271 |
||
3272 |
// ---------------------------------------------------------------------------- |
|
3273 |
// CMmSupplServMessHandler::MapCBStatusIsiToMm |
|
3274 |
// Map isi call barring status to multimode api call barring status. |
|
3275 |
// ----------------------------------------------------------------------------- |
|
3276 |
// |
|
3277 |
void CMmSupplServMessHandler::MapCBStatusIsiToMm |
|
3278 |
( |
|
3279 |
TUint8 aIsiSsStatus, // isi status |
|
3280 |
RMobilePhone::TMobilePhoneCBStatus* aMmCBStatus // multimode api status |
|
3281 |
) |
|
3282 |
{ |
|
3283 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapCBStatusIsiToMm - isi status: %d", |
|
3284 |
aIsiSsStatus); |
|
3285 |
OstTraceExt1( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_MAPCBSTATUSISITOMM, "CMmSupplServMessHandler::MapCBStatusIsiToMm;aIsiSsStatus=%hhu", aIsiSsStatus ); |
|
3286 |
||
3287 |
//get the right status code |
|
3288 |
if ( ( 0 == ( aIsiSsStatus & ( SS_GSM_ACTIVE + SS_GSM_REGISTERED + |
|
3289 |
SS_GSM_PROVISIONED + SS_GSM_QUIESCENT ) ) ) && |
|
3290 |
( 0 < aIsiSsStatus ) ) |
|
3291 |
// no valid status code found |
|
3292 |
{ |
|
3293 |
*aMmCBStatus = RMobilePhone::ECallBarringStatusUnknown; |
|
3294 |
} |
|
3295 |
else if ( 0 == ( aIsiSsStatus & SS_GSM_PROVISIONED ) ) |
|
3296 |
//not SS_GSM_PROVISIONED |
|
3297 |
{ |
|
3298 |
*aMmCBStatus = RMobilePhone::ECallBarringStatusNotProvisioned; |
|
3299 |
} |
|
3300 |
else if ( ( 0 == ( aIsiSsStatus & SS_GSM_ACTIVE ) ) || |
|
3301 |
(aIsiSsStatus & SS_GSM_QUIESCENT ) ) |
|
3302 |
// not SS_GSM_ACTIVE or SS_GSM_QUIESCENT |
|
3303 |
{ |
|
3304 |
*aMmCBStatus = RMobilePhone::ECallBarringStatusNotActive; |
|
3305 |
} |
|
3306 |
else if ( aIsiSsStatus & SS_GSM_ACTIVE ) |
|
3307 |
// SS_GSM_ACTIVE |
|
3308 |
{ |
|
3309 |
*aMmCBStatus = RMobilePhone::ECallBarringStatusActive; |
|
3310 |
} |
|
3311 |
} |
|
3312 |
||
3313 |
// ---------------------------------------------------------------------------- |
|
3314 |
// CMmSupplServMessHandler::MapIdentityServiceMmToIsi |
|
3315 |
// Map multimode api identity service to isi identity service. |
|
3316 |
// Returns KErrNone or KErrNotSupported |
|
3317 |
// ----------------------------------------------------------------------------- |
|
3318 |
// |
|
3319 |
TInt CMmSupplServMessHandler::MapIdentityServiceMmToIsi |
|
3320 |
( |
|
3321 |
RMobilePhone::TMobilePhoneIdService aService, |
|
3322 |
// multimode api identity service |
|
3323 |
TUint16* aIdentityService // isi identity service |
|
3324 |
) |
|
3325 |
{ |
|
3326 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapIdentityServiceMmToIsi - \ |
|
3327 |
multimode api identity service: %d", aService); |
|
3328 |
OstTrace1( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_MAPIDENTITYSERVICEMMTOISI, "CMmSupplServMessHandler::MapIdentityServiceMmToIsi;aService=%d", aService ); |
|
3329 |
||
3330 |
TInt ret( KErrNone ); |
|
3331 |
||
3332 |
//get the right operation code |
|
3333 |
switch ( aService ) |
|
3334 |
{ |
|
3335 |
case RMobilePhone::EIdServiceCallerPresentation: |
|
3336 |
*aIdentityService = SS_GSM_CLIP; |
|
3337 |
break; |
|
3338 |
case RMobilePhone::EIdServiceCallerRestriction: |
|
3339 |
*aIdentityService = SS_GSM_CLIR; |
|
3340 |
break; |
|
3341 |
case RMobilePhone::EIdServiceConnectedPresentation: |
|
3342 |
*aIdentityService = SS_GSM_COLP; |
|
3343 |
break; |
|
3344 |
case RMobilePhone::EIdServiceConnectedRestriction: |
|
3345 |
*aIdentityService = SS_GSM_COLR; |
|
3346 |
break; |
|
3347 |
case RMobilePhone::EIdServiceCallerName: |
|
3348 |
*aIdentityService = SS_GSM_CNAP; |
|
3349 |
break; |
|
3350 |
case RMobilePhone::EIdServiceUnspecified: |
|
3351 |
case RMobilePhone::EIdServiceCalledPresentation: |
|
3352 |
default: |
|
3353 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::MapIdentityServiceMmToIsi \ |
|
3354 |
- unknown multimode api identity service: %d", aService); |
|
3355 |
OstTrace1( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_MAPIDENTITYSERVICEMMTOISI, "CMmSupplServMessHandler::MapIdentityServiceMmToIsi;unknown multimode api identity service=%d", aService ); |
|
3356 |
ret = KErrNotSupported; |
|
3357 |
break; |
|
3358 |
} |
|
3359 |
return ret; |
|
3360 |
} |
|
3361 |
||
3362 |
||
3363 |
// ---------------------------------------------------------------------------- |
|
3364 |
// CMmSupplServMessHandler::MapIdentityServiceStatusIsiToMm |
|
3365 |
// Map identity service isi status to multimode status. |
|
3366 |
// ----------------------------------------------------------------------------- |
|
3367 |
// |
|
3368 |
void CMmSupplServMessHandler::MapIdentityServiceStatusIsiToMm |
|
3369 |
( |
|
3370 |
TUint8 aIsiIdentityServiceStatus, |
|
3371 |
// isi identity service status |
|
3372 |
TUint8 aIsiClirOption, |
|
3373 |
// isi clir option |
|
3374 |
RMobilePhone::TMobilePhoneIdServiceStatus* aMmIdentityServiceStatus |
|
3375 |
// multimode api identity service status |
|
3376 |
) |
|
3377 |
{ |
|
3378 |
TFLOGSTRING3("TSY: CMmSupplServMessHandler::MapIdentityServiceStatusIsiToMm \ |
|
3379 |
- isi id service status: %d, isi clir operation: %d", |
|
3380 |
aIsiIdentityServiceStatus, aIsiClirOption); |
|
3381 |
OstTraceExt2( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_MAPIDENTITYSERVICESTATUSISITOMM, "CMmSupplServMessHandler::MapIdentityServiceStatusIsiToMm;aIsiIdentityServiceStatus=%hhu;aIsiClirOption=%hhu", aIsiIdentityServiceStatus, aIsiClirOption ); |
|
3382 |
||
3383 |
if ( 0 == ( aIsiIdentityServiceStatus & SS_GSM_PROVISIONED ) ) |
|
3384 |
{ |
|
3385 |
// service not provisioned |
|
3386 |
*aMmIdentityServiceStatus = RMobilePhone::EIdServiceNotProvisioned; |
|
3387 |
} |
|
3388 |
else if ( ( 0 == ( aIsiIdentityServiceStatus & |
|
3389 |
( SS_GSM_ACTIVE + SS_GSM_REGISTERED + SS_GSM_PROVISIONED + |
|
3390 |
SS_GSM_QUIESCENT ) ) ) && ( 0 < aIsiIdentityServiceStatus ) ) |
|
3391 |
{ |
|
3392 |
// id service is unknown if all above status bit operations equal zero |
|
3393 |
// and statusvalue is above zero |
|
3394 |
*aMmIdentityServiceStatus = RMobilePhone::EIdServiceUnknown; |
|
3395 |
} |
|
3396 |
else |
|
3397 |
{ |
|
3398 |
// identity service is an exception to other ss services: |
|
3399 |
// if it is provisioned then it's also active |
|
3400 |
switch ( aIsiClirOption ) |
|
3401 |
{ |
|
3402 |
case SS_GSM_CLI_PERMANENT: |
|
3403 |
*aMmIdentityServiceStatus = RMobilePhone:: |
|
3404 |
EIdServiceActivePermanent; |
|
3405 |
break; |
|
3406 |
case SS_GSM_DEFAULT_RESTRICTED: |
|
3407 |
*aMmIdentityServiceStatus = RMobilePhone:: |
|
3408 |
EIdServiceActiveDefaultRestricted; |
|
3409 |
break; |
|
3410 |
case SS_GSM_CLI_DEFAULT_ALLOWED: |
|
3411 |
*aMmIdentityServiceStatus = RMobilePhone:: |
|
3412 |
EIdServiceActiveDefaultAllowed; |
|
3413 |
break; |
|
3414 |
default: |
|
3415 |
*aMmIdentityServiceStatus = RMobilePhone::EIdServiceUnknown; |
|
3416 |
break; |
|
3417 |
} |
|
3418 |
} |
|
3419 |
} |
|
3420 |
||
3421 |
// ---------------------------------------------------------------------------- |
|
3422 |
// CMmSupplServMessHandler::MapIdentityServiceStatusIsiToMm |
|
3423 |
// This method packs a given text string consisting of 7-bit characters into |
|
3424 |
// 8 bit bytes in such a way that a 160-character message takes only 140 bytes |
|
3425 |
// of memory after the compression. |
|
3426 |
// Returns length of packed message in bytes. |
|
3427 |
// ----------------------------------------------------------------------------- |
|
3428 |
// |
|
3429 |
TUint16 CMmSupplServMessHandler::GsmLibSmsPackMessage |
|
3430 |
( |
|
3431 |
TDes8& dest, // packed message |
|
3432 |
TDes8& src, // unpacked message |
|
3433 |
TUint byte_count // the number of bytes in source |
|
3434 |
) |
|
3435 |
{ |
|
3436 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::GsmLibSmsPackMessage"); |
|
3437 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_GSMLIBSMSPACKMESSAGE, "CMmSupplServMessHandler::GsmLibSmsPackMessage" ); |
|
3438 |
||
3439 |
TUint16 si( 0 ); |
|
3440 |
TUint16 di( 0 ); // Indexes |
|
3441 |
TInt tmp_modulo; // Temporary; to improve efficiency |
|
3442 |
||
3443 |
tmp_modulo = di % 7; |
|
3444 |
||
3445 |
while( si < byte_count ) |
|
3446 |
{ |
|
3447 |
// Is this the last character of the message |
|
3448 |
// If it is, just shift it to the right. Otherwise, |
|
3449 |
// fill the rest of the byte with the bits of the next source character. |
|
3450 |
if( ( byte_count - 1 ) == si ) |
|
3451 |
{ |
|
3452 |
TUint num2 = ( src[si] >> tmp_modulo ); |
|
3453 |
dest.Append( num2 ); |
|
3454 |
} |
|
3455 |
else |
|
3456 |
{ |
|
3457 |
TUint num2 = ( src[si] >> tmp_modulo ) | |
|
3458 |
( src[si + 1] << (7 - tmp_modulo ) ); |
|
3459 |
dest.Append( num2 ); |
|
3460 |
} |
|
3461 |
di++; |
|
3462 |
tmp_modulo = di % 7; |
|
3463 |
||
3464 |
// Check if the destination byte could take the entire source character. |
|
3465 |
// In that case, the source character does not have to be divided and |
|
3466 |
// the next source character can be taken. |
|
3467 |
if( 0 == tmp_modulo ) |
|
3468 |
{ |
|
3469 |
si += 2; |
|
3470 |
} |
|
3471 |
else |
|
3472 |
{ |
|
3473 |
si++; |
|
3474 |
} |
|
3475 |
} |
|
3476 |
||
3477 |
// Return the length of the coded message. |
|
3478 |
return di; |
|
3479 |
} |
|
3480 |
||
3481 |
// ---------------------------------------------------------------------------- |
|
3482 |
// CMmSupplServMessHandler::HandleError |
|
3483 |
// Handles CMmSupplServMessHandler's errors that comes via PhoNetReceiver |
|
3484 |
// RunError method. |
|
3485 |
// ----------------------------------------------------------------------------- |
|
3486 |
// |
|
3487 |
void CMmSupplServMessHandler::HandleError |
|
3488 |
( |
|
3489 |
const TIsiReceiveC& /*aIsiMsg*/, // Isi message |
|
3490 |
TInt /*aError*/ // Error code |
|
3491 |
) |
|
3492 |
{ |
|
3493 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::HandleError"); |
|
3494 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_HANDLEERROR, "CMmSupplServMessHandler::HandleError" ); |
|
3495 |
//none |
|
3496 |
} |
|
3497 |
||
3498 |
// ---------------------------------------------------------------------------- |
|
3499 |
// CMmSupplServMessHandler::UiccWriteCallFwdFlagsRel4Req |
|
3500 |
// Write call forwarding flags REL4 to UICC |
|
3501 |
// ----------------------------------------------------------------------------- |
|
3502 |
// |
|
3503 |
TInt CMmSupplServMessHandler::UiccWriteCallFwdFlagsRel4Req() |
|
3504 |
{ |
|
3505 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::UiccWriteCallFwdFlagsRel4Req"); |
|
3506 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_UICCWRITECALLFWDFLAGSREL4REQ, "CMmSupplServMessHandler::UiccWriteCallFwdFlagsRel4Req" ); |
|
3507 |
||
3508 |
TBuf<RMobilePhone::KMaxMobileTelNumberSize> telNumber( 0 ); |
|
3509 |
||
3510 |
TUint8 voiceStatus( iVoiceStatus ); |
|
3511 |
TUint8 faxStatus( iFaxStatus ); |
|
3512 |
TUint8 dataStatus( iDataStatus ); |
|
3513 |
TUint8 numberLength( iCFAddress.iTelNumber.Length() ); |
|
3514 |
TUint8 status( 0 ); |
|
3515 |
||
3516 |
if ( 0 < numberLength ) |
|
3517 |
{ |
|
3518 |
status = 1; // Set divert |
|
3519 |
} |
|
3520 |
else |
|
3521 |
{ |
|
3522 |
status = 0; // Cancel divert |
|
3523 |
} |
|
3524 |
||
3525 |
switch ( iMobileService ) |
|
3526 |
{ |
|
3527 |
case RMobilePhone::EAllTele: |
|
3528 |
{ |
|
3529 |
if ( RMobilePhone::ECallForwardingUnconditional == iMmCFCondition ) |
|
3530 |
{ |
|
3531 |
telNumber.Copy( iCFAddress.iTelNumber ); |
|
3532 |
voiceStatus = status; |
|
3533 |
faxStatus = status; |
|
3534 |
} |
|
3535 |
break; |
|
3536 |
} |
|
3537 |
case RMobilePhone::ETelephony: |
|
3538 |
{ |
|
3539 |
if ( RMobilePhone::ECallForwardingUnconditional == iMmCFCondition ) |
|
3540 |
{ |
|
3541 |
telNumber.Copy( iCFAddress.iTelNumber ); |
|
3542 |
voiceStatus = status; |
|
3543 |
} |
|
3544 |
else |
|
3545 |
{ |
|
3546 |
telNumber.Copy( iCFTelNumberFromSim ); |
|
3547 |
numberLength = iCFTelNumberFromSim.Length(); |
|
3548 |
} |
|
3549 |
break; |
|
3550 |
} |
|
3551 |
case RMobilePhone::EAllBearer: |
|
3552 |
{ |
|
3553 |
telNumber.Copy( iCFTelNumberFromSim ); |
|
3554 |
numberLength = iCFTelNumberFromSim.Length(); |
|
3555 |
||
3556 |
if ( RMobilePhone::ECallForwardingUnconditional == iMmCFCondition ) |
|
3557 |
{ |
|
3558 |
dataStatus = status; |
|
3559 |
} |
|
3560 |
||
3561 |
break; |
|
3562 |
} |
|
3563 |
case RMobilePhone::EFaxService: |
|
3564 |
{ |
|
3565 |
telNumber.Copy( iCFTelNumberFromSim ); |
|
3566 |
numberLength = iCFTelNumberFromSim.Length(); |
|
3567 |
||
3568 |
if ( RMobilePhone::ECallForwardingUnconditional == iMmCFCondition ) |
|
3569 |
{ |
|
3570 |
faxStatus = status; |
|
3571 |
} |
|
3572 |
break; |
|
3573 |
} |
|
3574 |
case RMobilePhone::EAllServices: //cancel all diverts |
|
3575 |
{ |
|
3576 |
if ( RMobilePhone::ECallForwardingAllCases == iMmCFCondition || |
|
3577 |
RMobilePhone::ECallForwardingUnconditional == iMmCFCondition ) |
|
3578 |
{ |
|
3579 |
telNumber.Copy( iCFAddress.iTelNumber ); |
|
3580 |
voiceStatus = status; |
|
3581 |
dataStatus = status; |
|
3582 |
faxStatus = status; |
|
3583 |
} |
|
3584 |
break; |
|
3585 |
} |
|
3586 |
case RMobilePhone::EAllSync: |
|
3587 |
{ |
|
3588 |
if ( RMobilePhone::ECallForwardingUnconditional == iMmCFCondition ) |
|
3589 |
{ |
|
3590 |
telNumber.Copy( iCFAddress.iTelNumber ); |
|
3591 |
dataStatus = status; |
|
3592 |
} |
|
3593 |
break; |
|
3594 |
} |
|
3595 |
case RMobilePhone::ESyncData: |
|
3596 |
{ |
|
3597 |
if ( RMobilePhone::ECallForwardingUnconditional == iMmCFCondition ) |
|
3598 |
{ |
|
3599 |
telNumber.Copy( iCFAddress.iTelNumber ); |
|
3600 |
dataStatus = status; |
|
3601 |
} |
|
3602 |
break; |
|
3603 |
} |
|
3604 |
default: |
|
3605 |
{ |
|
3606 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::UiccWriteCallFwdFlagsRel4Req - unknown call service: %d", iMobileService); |
|
3607 |
OstTrace1( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_UICCWRITECALLFWDFLAGSREL4REQ, "CMmSupplServMessHandler::UiccWriteCallFwdFlagsRel4Req;iMobileService=%d", iMobileService ); |
|
3608 |
break; |
|
3609 |
} |
|
3610 |
} |
|
3611 |
||
3612 |
TFLOGSTRING3("TSY: CMmSupplServMessHandler::UiccWriteCallFwdFlagsRel4Req - Number: %S, length: %d", &telNumber, numberLength); |
|
3613 |
TFLOGSTRING4("TSY: CMmSupplServMessHandler::UiccWriteCallFwdFlagsRel4Req - VoiceStatus: %d, FaxStatus: %d, DataStatus: %d", voiceStatus, faxStatus, dataStatus); |
|
3614 |
OstTraceExt5( TRACE_NORMAL, DUP2_CMMSUPPLSERVMESSHANDLER_UICCWRITECALLFWDFLAGSREL4REQ, "CMmSupplServMessHandler::UiccWriteCallFwdFlagsRel4Req;telNumber=%S;numberLength=%hhu;voiceStatus=%hhu;faxStatus=%hhu;dataStatus=%hhu", telNumber, numberLength, voiceStatus, faxStatus, dataStatus ); |
|
3615 |
||
3616 |
// Status of the call forward unconditional indicator |
|
3617 |
TUint8 cfuIndicatorStatus( 0 ); |
|
3618 |
cfuIndicatorStatus = voiceStatus; // 1st bit is for voice |
|
3619 |
// 2nd bit is for fax |
|
3620 |
cfuIndicatorStatus = cfuIndicatorStatus | ( faxStatus << 1 ); |
|
3621 |
// 3rd bit is for data |
|
3622 |
cfuIndicatorStatus = cfuIndicatorStatus | ( dataStatus << 2 ); |
|
3623 |
||
3624 |
// Convert number to BCD format |
|
3625 |
TBuf8<RMobilePhone::KMaxMobileTelNumberSize> bcdNumberToSim( 0 ); |
|
3626 |
TUint8 length( telNumber.Length() ); |
|
3627 |
// Two byte are combined to on bytes, divide by 2 |
|
3628 |
TUint numOfBytes( length >> 1 ); |
|
3629 |
TUint8 i( 0 ); |
|
3630 |
TUint8 j( 0 ); |
|
3631 |
// Loop all the numbers and convert to semi-octets |
|
3632 |
for ( i = 0; i < numOfBytes; i++, j+= 2 ) |
|
3633 |
{ |
|
3634 |
TUint8 lsb( telNumber[j] & 0x0F ); |
|
3635 |
TUint8 msb( telNumber[j+1] & 0x0F ); |
|
3636 |
bcdNumberToSim.Append( ( ( msb << 4 ) | lsb ) ); |
|
3637 |
} |
|
3638 |
||
3639 |
// If length is odd, add last byte |
|
3640 |
if ( length % 2 ) |
|
3641 |
{ |
|
3642 |
bcdNumberToSim.Append( ( 0x0F << 4 )| ( telNumber[j] & 0x0F ) ); |
|
3643 |
} |
|
3644 |
// TON & NPI |
|
3645 |
TUint8 tonAndNpi( 0x80 ); // 1st bit is 1 |
|
3646 |
// Bits 5-7 are for TON |
|
3647 |
tonAndNpi = tonAndNpi | ( ( iCFAddress.iTypeOfNumber & 0x07 ) << 4 ); |
|
3648 |
// Bits 1-4 are for NPI |
|
3649 |
tonAndNpi = tonAndNpi | ( iCFAddress.iNumberPlan & 0x0F ); |
|
3650 |
||
3651 |
// Set parameters for UICC_APPL_CMD_REQ message |
|
3652 |
TUiccWriteLinearFixed params; |
|
3653 |
params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
|
3654 |
params.trId = ETrIdWriteCallFwdFlagsRel4; |
|
3655 |
// Update CFU indicator status, length of BCD number, TON and NPI, |
|
3656 |
// dialling number |
|
3657 |
params.dataOffset = 1; |
|
3658 |
params.record = 1; |
|
3659 |
params.fileId = KElemFileCallFwdIndicationStatus; |
|
3660 |
params.fileIdSfi = UICC_SFI_NOT_PRESENT; |
|
3661 |
params.serviceType = UICC_APPL_UPDATE_LINEAR_FIXED; |
|
3662 |
||
3663 |
// File id path |
|
3664 |
params.filePath.Append( KMasterFileId >> 8 ); |
|
3665 |
params.filePath.Append( KMasterFileId ); |
|
3666 |
params.filePath.Append( iMmUiccMessHandler->GetApplicationFileId() ); |
|
3667 |
||
3668 |
// File data to be updated. |
|
3669 |
TBuf8<KFileDataLength> fileDataBuf; |
|
3670 |
// CFU indicator status |
|
3671 |
fileDataBuf.Append( cfuIndicatorStatus ); |
|
3672 |
// Length of bytes of the following two data items |
|
3673 |
length = bcdNumberToSim.Length() + 1; |
|
3674 |
fileDataBuf.Append( length ); |
|
3675 |
// TON & NPI |
|
3676 |
fileDataBuf.Append( tonAndNpi ); |
|
3677 |
// CFU indicator status |
|
3678 |
fileDataBuf.Append( bcdNumberToSim ); |
|
3679 |
params.fileData.Append( fileDataBuf ); |
|
3680 |
||
3681 |
return iMmUiccMessHandler->CreateUiccApplCmdReq( params ); |
|
3682 |
} |
|
3683 |
||
3684 |
// ---------------------------------------------------------------------------- |
|
3685 |
// CMmSupplServMessHandler::UiccWriteCallFwdFlagsCPHSReq |
|
3686 |
// Write call forwarding flags CPHS to UICC |
|
3687 |
// ----------------------------------------------------------------------------- |
|
3688 |
// |
|
3689 |
TInt CMmSupplServMessHandler::UiccWriteCallFwdFlagsCPHSReq() |
|
3690 |
{ |
|
3691 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::UiccWriteCallFwdFlagsCPHSReq"); |
|
3692 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_UICCWRITECALLFWDFLAGSCPHSREQ, "CMmSupplServMessHandler::UiccWriteCallFwdFlagsCPHSReq" ); |
|
3693 |
||
3694 |
TUint8 voiceLine1( iVoiceLine1 ); |
|
3695 |
TUint8 voiceLine2( iVoiceLine2 ); |
|
3696 |
TUint8 faxFlag( iFax ); |
|
3697 |
TUint8 dataFlag( iData ); |
|
3698 |
||
3699 |
TUint8 numberLength = iCFAddress.iTelNumber.Length(); |
|
3700 |
TUint8 status( 0 ); |
|
3701 |
||
3702 |
if ( 0 < numberLength ) |
|
3703 |
{ |
|
3704 |
status = 0x0A; // set divert |
|
3705 |
} |
|
3706 |
else |
|
3707 |
{ |
|
3708 |
status = 0x05; // cancel divert |
|
3709 |
} |
|
3710 |
||
3711 |
switch ( iMobileService ) |
|
3712 |
{ |
|
3713 |
case RMobilePhone::ETelephony: |
|
3714 |
{ |
|
3715 |
if ( RMobilePhone::ECallForwardingUnconditional == iMmCFCondition ) |
|
3716 |
{ |
|
3717 |
voiceLine1 = status; |
|
3718 |
} |
|
3719 |
break; |
|
3720 |
} |
|
3721 |
case RMobilePhone::EAllBearer: |
|
3722 |
{ |
|
3723 |
if ( RMobilePhone::ECallForwardingUnconditional == iMmCFCondition ) |
|
3724 |
{ |
|
3725 |
dataFlag = status; |
|
3726 |
} |
|
3727 |
break; |
|
3728 |
} |
|
3729 |
case RMobilePhone::EFaxService: |
|
3730 |
{ |
|
3731 |
if ( RMobilePhone::ECallForwardingUnconditional == iMmCFCondition ) |
|
3732 |
{ |
|
3733 |
faxFlag = status; |
|
3734 |
} |
|
3735 |
break; |
|
3736 |
} |
|
3737 |
case RMobilePhone::EAllServices: |
|
3738 |
{ |
|
3739 |
if ( RMobilePhone::ECallForwardingAllCases == iMmCFCondition || |
|
3740 |
RMobilePhone::ECallForwardingUnconditional == iMmCFCondition ) |
|
3741 |
{ |
|
3742 |
voiceLine1 = status; |
|
3743 |
dataFlag = status; |
|
3744 |
faxFlag = status; |
|
3745 |
} |
|
3746 |
break; |
|
3747 |
} |
|
3748 |
case RMobilePhone::EAuxVoiceService: |
|
3749 |
{ |
|
3750 |
if ( RMobilePhone::ECallForwardingUnconditional == iMmCFCondition ) |
|
3751 |
{ |
|
3752 |
voiceLine2 = status; |
|
3753 |
} |
|
3754 |
else if ( RMobilePhone::ECallForwardingAllCases == iMmCFCondition ) |
|
3755 |
{ |
|
3756 |
voiceLine2 = status; |
|
3757 |
dataFlag = status; |
|
3758 |
faxFlag = status; |
|
3759 |
} |
|
3760 |
break; |
|
3761 |
} |
|
3762 |
default: |
|
3763 |
{ |
|
3764 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::UiccWriteCallFwdFlagsCPHSReq - unknown call service: %d", iMobileService); |
|
3765 |
OstTrace1( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_UICCWRITECALLFWDFLAGSCPHSREQ, "CMmSupplServMessHandler::UiccWriteCallFwdFlagsCPHSReq;iMobileService=%d", iMobileService ); |
|
3766 |
break; |
|
3767 |
} |
|
3768 |
} |
|
3769 |
||
3770 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::UiccWriteCallFwdFlagsCPHSReq - VoiceLine1: %d", voiceLine1); |
|
3771 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::UiccWriteCallFwdFlagsCPHSReq - VoiceLine2: %d", voiceLine2); |
|
3772 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::UiccWriteCallFwdFlagsCPHSReq - Fax: %d", faxFlag); |
|
3773 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::UiccWriteCallFwdFlagsCPHSReq - Data: %d", dataFlag); |
|
3774 |
OstTraceExt4( TRACE_NORMAL, DUP2_CMMSUPPLSERVMESSHANDLER_UICCWRITECALLFWDFLAGSCPHSREQ, "CMmSupplServMessHandler::UiccWriteCallFwdFlagsCPHSReq;voiceLine1=%hhu;voiceLine2=%hhu;faxFlag=%hhu;dataFlag=%hhu", voiceLine1, voiceLine2, faxFlag, dataFlag ); |
|
3775 |
||
3776 |
// Stores CPHS indicator values to be used in notify |
|
3777 |
// ECustomNotifyIccCallForwardingStatusChangeIPC |
|
3778 |
// Stores CAPI CF indicator values |
|
3779 |
iTCFIndicators.iMultipleSubscriberProfileID = RMmCustomAPI::KProfileIdentityOne; |
|
3780 |
iTCFIndicators.iIndicator = |
|
3781 |
( voiceLine1 == 0x0A ? RMobilePhone::KCFUIndicatorVoice: |
|
3782 |
RMobilePhone::KCFUIndicatorUnknown ); |
|
3783 |
||
3784 |
iTCFIndicators.iIndicator |= |
|
3785 |
( voiceLine2 == 0x0A ? RMobilePhone::KCFUIndicatorAuxVoice: |
|
3786 |
RMobilePhone::KCFUIndicatorUnknown ); |
|
3787 |
||
3788 |
iTCFIndicators.iIndicator |= |
|
3789 |
( faxFlag == 0x0A ? RMobilePhone::KCFUIndicatorFax: |
|
3790 |
RMobilePhone::KCFUIndicatorUnknown ); |
|
3791 |
||
3792 |
iTCFIndicators.iIndicator |= |
|
3793 |
( dataFlag == 0x0A ? RMobilePhone::KCFUIndicatorData: |
|
3794 |
RMobilePhone::KCFUIndicatorUnknown ); |
|
3795 |
||
3796 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::UiccWriteCallFwdFlagsCPHSReq - Indicator: 0x%x", iTCFIndicators.iIndicator ); |
|
3797 |
OstTrace1( TRACE_NORMAL, DUP3_CMMSUPPLSERVMESSHANDLER_UICCWRITECALLFWDFLAGSCPHSREQ, "CMmSupplServMessHandler::UiccWriteCallFwdFlagsCPHSReq;iTCFIndicators.iIndicator=%x", iTCFIndicators.iIndicator ); |
|
3798 |
||
3799 |
iTCFIndicators.iCFNumber.iTelNumber.Zero(); |
|
3800 |
||
3801 |
// Set parameters for UICC_APPL_CMD_REQ message |
|
3802 |
TUiccWriteTransparent params; |
|
3803 |
params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
|
3804 |
params.trId = ETrIdWriteCallFwdFlagsCphs; |
|
3805 |
// We are updating voice Call forward unconditional flags ( byte = 1 ) |
|
3806 |
// and data/fax call forward unconditional flags ( byte = 2 ) |
|
3807 |
params.dataOffset = 0; |
|
3808 |
params.fileId = KElemFileCallFwdFlagsCphs; |
|
3809 |
params.fileIdSfi = UICC_SFI_NOT_PRESENT; |
|
3810 |
params.serviceType = UICC_APPL_UPDATE_TRANSPARENT; |
|
3811 |
||
3812 |
// File id path |
|
3813 |
params.filePath.Append( KMasterFileId >> 8 ); |
|
3814 |
params.filePath.Append( KMasterFileId ); |
|
3815 |
params.filePath.Append( iMmUiccMessHandler->GetApplicationFileId() ); |
|
3816 |
||
3817 |
// File data tu be updated. |
|
3818 |
TBuf8<2> fileDataBuf; |
|
3819 |
// Byte 1: Voice line 2 (bits 4-7) and Voice line 1 (bits 0-3) |
|
3820 |
fileDataBuf.Append( ( voiceLine2 << 4 ) | ( voiceLine1 ) ); |
|
3821 |
// Byte 2: Data calls (bits 4-7) and Fax calls (bits 0-3) |
|
3822 |
fileDataBuf.Append( ( dataFlag << 4 ) | ( faxFlag ) ); |
|
3823 |
||
3824 |
params.fileData.Append( fileDataBuf ); |
|
3825 |
||
3826 |
return iMmUiccMessHandler->CreateUiccApplCmdReq( params ); |
|
3827 |
} |
|
3828 |
||
3829 |
// ---------------------------------------------------------------------------- |
|
3830 |
// CMmSupplServMessHandler::UiccReadCallFwdFlagsRel4Req |
|
3831 |
// Read call forwarding flags REL 4 |
|
3832 |
// ----------------------------------------------------------------------------- |
|
3833 |
// |
|
3834 |
TInt CMmSupplServMessHandler::UiccReadCallFwdFlagsRel4Req() |
|
3835 |
{ |
|
3836 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::UiccReadCallFwdFlagsRel4Req"); |
|
3837 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_UICCREADCALLFWDFLAGSREL4REQ, "CMmSupplServMessHandler::UiccReadCallFwdFlagsRel4Req" ); |
|
3838 |
||
3839 |
// At first try to read rel4 EF ( 6FCB ) |
|
3840 |
// If reading is not successful, then we try CPHS file ( 6F13 ) |
|
3841 |
// Set parameters for UICC_APPL_CMD_REQ message |
|
3842 |
TUiccReadLinearFixed params; |
|
3843 |
params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
|
3844 |
params.trId = ETrIdReadCallFwdFlagsRel4; |
|
3845 |
params.dataOffset = 0; |
|
3846 |
params.fileId = KElemFileCallFwdIndicationStatus; |
|
3847 |
params.fileIdSfi = UICC_SFI_NOT_PRESENT; |
|
3848 |
params.serviceType = UICC_APPL_READ_LINEAR_FIXED; |
|
3849 |
params.record = 1; |
|
3850 |
||
3851 |
// File id path |
|
3852 |
params.filePath.Append( KMasterFileId >> 8 ); |
|
3853 |
params.filePath.Append( KMasterFileId ); |
|
3854 |
params.filePath.Append( iMmUiccMessHandler->GetApplicationFileId() ); |
|
3855 |
||
3856 |
return iMmUiccMessHandler->CreateUiccApplCmdReq( params ); |
|
3857 |
} |
|
3858 |
||
3859 |
// ---------------------------------------------------------------------------- |
|
3860 |
// CMmSupplServMessHandler::UiccReadCallFwdFlagsCphsReq |
|
3861 |
// Read call forwarding flags CPHS |
|
3862 |
// ----------------------------------------------------------------------------- |
|
3863 |
// |
|
3864 |
TInt CMmSupplServMessHandler::UiccReadCallFwdFlagsCphsReq() |
|
3865 |
{ |
|
3866 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::UiccReadCallFwdFlagsCphsReq"); |
|
3867 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_UICCREADCALLFWDFLAGSCPHSREQ, "CMmSupplServMessHandler::UiccReadCallFwdFlagsCphsReq" ); |
|
3868 |
||
3869 |
// Set parameters for UICC_APPL_CMD_REQ message |
|
3870 |
TUiccReadTransparent params; |
|
3871 |
params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
|
3872 |
params.trId = ETrIdReadCallFwdFlagsCphs; |
|
3873 |
params.dataOffset = 0; |
|
3874 |
params.dataAmount = 2; |
|
3875 |
params.fileId = KElemFileCallFwdFlagsCphs; |
|
3876 |
params.fileIdSfi = UICC_SFI_NOT_PRESENT; |
|
3877 |
params.serviceType = UICC_APPL_READ_TRANSPARENT; |
|
3878 |
||
3879 |
// File id path |
|
3880 |
params.filePath.Append( KMasterFileId >> 8 ); |
|
3881 |
params.filePath.Append( KMasterFileId ); |
|
3882 |
params.filePath.Append( iMmUiccMessHandler->GetApplicationFileId() ); |
|
3883 |
||
3884 |
return iMmUiccMessHandler->CreateUiccApplCmdReq( params ); |
|
3885 |
} |
|
3886 |
||
3887 |
// ---------------------------------------------------------------------------- |
|
3888 |
// CMmSupplServMessHandler::UiccHandleCallFwdFlagsResp |
|
3889 |
// Complete call forwarding flags |
|
3890 |
// ----------------------------------------------------------------------------- |
|
3891 |
// |
|
3892 |
void CMmSupplServMessHandler::UiccHandleCallFwdFlagsResp( |
|
3893 |
TInt aStatus, |
|
3894 |
TInt aTrId, |
|
3895 |
const TDesC8& aFileData ) |
|
3896 |
{ |
|
3897 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::UiccHandleCallFwdFlagsResp"); |
|
3898 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_UICCHANDLECALLFWDFLAGSRESP, "CMmSupplServMessHandler::UiccHandleCallFwdFlagsResp" ); |
|
3899 |
||
3900 |
CMmDataPackage dataPackage; |
|
3901 |
CMmDataPackage customDataPackage; |
|
3902 |
TBool rel4Exists( EFalse ); |
|
3903 |
TBool cphsExists( EFalse ); |
|
3904 |
||
3905 |
// Read file data only if UICC status is OK |
|
3906 |
if ( UICC_STATUS_OK == aStatus ) |
|
3907 |
{ |
|
3908 |
if ( ETrIdReadCallFwdFlagsRel4 == aTrId ) |
|
3909 |
{ |
|
3910 |
rel4Exists = ETrue; |
|
3911 |
iVoiceStatus = aFileData[1] & 0x01; |
|
3912 |
iFaxStatus = ( ( aFileData[1] & 0x02 ) >> 1 ); |
|
3913 |
iDataStatus = ( ( aFileData[1] & 0x04 ) >> 2 ); |
|
3914 |
||
3915 |
// In case of inactive flags, remaining bytes may be set to 0xFF in SIM |
|
3916 |
// Check the byte 3 for avoiding crash in that case. |
|
3917 |
if ( iVoiceStatus || iFaxStatus || iDataStatus && |
|
3918 |
0xFF != aFileData[2] ) |
|
3919 |
{ |
|
3920 |
TUint8 numberLen( aFileData[2] ); |
|
3921 |
numberLen--; // decrease by one because of TON&NPI |
|
3922 |
TBuf<20> tempNumber; |
|
3923 |
tempNumber.Copy( aFileData.Mid( 4, numberLen ) ); |
|
3924 |
||
3925 |
// Convert and copy to 8-bit format |
|
3926 |
for ( TUint8 i( 0 ); i < numberLen; i++ ) |
|
3927 |
{ |
|
3928 |
iCFTelNumberFromSim.Append( tempNumber[i] & 0x0F ); |
|
3929 |
iCFTelNumberFromSim.Append( ( tempNumber[i] & 0xF0 ) >> 4 ); |
|
3930 |
} |
|
3931 |
// Check if last byte is 0xF, in that case ignore it |
|
3932 |
TUint8 index( iCFTelNumberFromSim.Length() ); |
|
3933 |
if ( 0x0F == iCFTelNumberFromSim[--index] ) |
|
3934 |
{ |
|
3935 |
iCFTelNumberFromSim.SetLength( index ); |
|
3936 |
} |
|
3937 |
} |
|
3938 |
} |
|
3939 |
else // CPHS case |
|
3940 |
{ |
|
3941 |
iVoiceLine1 = aFileData[0] & 0x0F; |
|
3942 |
iVoiceLine2 = ( aFileData[0] & 0xF0 ) >> 4; |
|
3943 |
iFax = aFileData[1] & 0x0F; |
|
3944 |
iData = ( aFileData[1] & 0xF0 ) >> 4; |
|
3945 |
cphsExists = ETrue; |
|
3946 |
} |
|
3947 |
} // End of if ( UICC_STATUS_OK == aStatus ) |
|
3948 |
||
3949 |
iTCFIndicators.iIndicator = RMobilePhone::KCFUIndicatorUnknown; |
|
3950 |
iTCFIndicators.iCFNumber.iTelNumber.Zero(); |
|
3951 |
// Stores CAPI CF indicator values |
|
3952 |
iTCFIndicators.iMultipleSubscriberProfileID = |
|
3953 |
RMmCustomAPI::KProfileIdentityOne; |
|
3954 |
||
3955 |
if ( rel4Exists ) |
|
3956 |
{ |
|
3957 |
iTCFIndicators.iIndicator = |
|
3958 |
( iVoiceStatus ? RMobilePhone::KCFUIndicatorVoice: |
|
3959 |
RMobilePhone::KCFUIndicatorUnknown ); |
|
3960 |
iTCFIndicators.iIndicator |= |
|
3961 |
( iFaxStatus ? RMobilePhone::KCFUIndicatorFax: |
|
3962 |
RMobilePhone::KCFUIndicatorUnknown ); |
|
3963 |
iTCFIndicators.iIndicator |= |
|
3964 |
( iDataStatus ? RMobilePhone::KCFUIndicatorData: |
|
3965 |
RMobilePhone::KCFUIndicatorUnknown ); |
|
3966 |
||
3967 |
iTCFIndicators.iCFNumber.iTelNumber.Copy( iCFTelNumberFromSim ); |
|
3968 |
} |
|
3969 |
else if ( cphsExists ) // CPHS |
|
3970 |
{ |
|
3971 |
iTCFIndicators.iIndicator = |
|
3972 |
( iVoiceLine1 == 0x0A ? RMobilePhone::KCFUIndicatorVoice: |
|
3973 |
RMobilePhone::KCFUIndicatorUnknown ); |
|
3974 |
||
3975 |
iTCFIndicators.iIndicator |= |
|
3976 |
( iVoiceLine2 == 0x0A ? RMobilePhone::KCFUIndicatorAuxVoice: |
|
3977 |
RMobilePhone::KCFUIndicatorUnknown ); |
|
3978 |
||
3979 |
iTCFIndicators.iIndicator |= |
|
3980 |
( iFax == 0x0A ? RMobilePhone::KCFUIndicatorFax: |
|
3981 |
RMobilePhone::KCFUIndicatorUnknown ); |
|
3982 |
iTCFIndicators.iIndicator |= |
|
3983 |
( iData == 0x0A ? RMobilePhone::KCFUIndicatorData: |
|
3984 |
RMobilePhone::KCFUIndicatorUnknown ); |
|
3985 |
} |
|
3986 |
||
3987 |
if ( iGetIccCallForwardingStatus ) // ECustomGetIccCallForwardingStatusIPC |
|
3988 |
{ |
|
3989 |
iGetIccCallForwardingStatus = EFalse; |
|
3990 |
||
3991 |
// This package is used at the completion of IPCs: |
|
3992 |
// ECustomGetIccCallForwardingStatusIPC and |
|
3993 |
// ECustomNotifyIccCallForwardingStatusChangeIPC |
|
3994 |
customDataPackage.PackData( &iTCFIndicators ); |
|
3995 |
||
3996 |
// ICC Call forwarding status successfully read from the SIM |
|
3997 |
// Complete the ECustomGetIccCallForwardingStatusIPC to SOS layer |
|
3998 |
iMessageRouter->Complete( |
|
3999 |
ECustomGetIccCallForwardingStatusIPC, |
|
4000 |
&customDataPackage, |
|
4001 |
KErrNone ); |
|
4002 |
} |
|
4003 |
else if ( iNotifyIccCallForwardingStatus ) |
|
4004 |
{ |
|
4005 |
iNotifyIccCallForwardingStatus = EFalse; |
|
4006 |
customDataPackage.PackData( &iTCFIndicators ); |
|
4007 |
||
4008 |
iMessageRouter->Complete( |
|
4009 |
ECustomNotifyIccCallForwardingStatusChangeIPC, |
|
4010 |
&customDataPackage, |
|
4011 |
KErrNone ); |
|
4012 |
||
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
4013 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::SimCallFwdRespL - Check possible refresh status"); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
4014 |
OstTrace0( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_UICCHANDLECALLFWDFLAGSRESP, "CMmSupplServMessHandler::UiccHandleCallFwdFlagsResp - Check possible refresh status" ); |
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
4015 |
iMessageRouter->GetPhoneMessHandler()->CallForwFlagsCachingCompleted( aStatus ); |
0 | 4016 |
} |
4017 |
else if ( !iGetCallForwardingNumber ) // EMobilePhoneSetCallForwardingStatus |
|
4018 |
{ |
|
4019 |
if ( rel4Exists ) |
|
4020 |
{ |
|
4021 |
// Call forwarding status successfully read from the SIM |
|
4022 |
// Write call forwarding number and indicator status |
|
4023 |
// to the SIM |
|
4024 |
UiccWriteCallFwdFlagsRel4Req(); |
|
4025 |
} |
|
4026 |
else if ( cphsExists ) |
|
4027 |
{ |
|
4028 |
// Call forwarding status successfully read from the SIM |
|
4029 |
// Write call forwarding number and indicator status |
|
4030 |
// to the SIM |
|
4031 |
UiccWriteCallFwdFlagsCPHSReq(); |
|
4032 |
} |
|
4033 |
else |
|
4034 |
{ |
|
4035 |
// Call forwarding status can't be read from the SIM |
|
4036 |
// probably due to missing EF-CFIS file on the SIM. |
|
4037 |
// Complete the SetCallForwardingStatus to SOS layer |
|
4038 |
// always with KErrNone regardless of writing to SIM |
|
4039 |
// failed or succeed |
|
4040 |
iMessageRouter->Complete( |
|
4041 |
EMobilePhoneSetCallForwardingStatus, |
|
4042 |
KErrNone ); |
|
4043 |
} |
|
4044 |
} |
|
4045 |
else // EMmTsyGetCallForwardingNumberIPC |
|
4046 |
{ |
|
4047 |
iGetCallForwardingNumber = EFalse; |
|
4048 |
dataPackage.PackData( &iCFTelNumberFromSim ); |
|
4049 |
||
4050 |
if ( rel4Exists ) |
|
4051 |
{ |
|
4052 |
// Call forwarding number successfully read from the SIM |
|
4053 |
// Complete the GetCallForwardingNumber to SOS layer |
|
4054 |
iMessageRouter->Complete( |
|
4055 |
EMmTsyGetCallForwardingNumberIPC, |
|
4056 |
&dataPackage, |
|
4057 |
KErrNone ); |
|
4058 |
} |
|
4059 |
else |
|
4060 |
{ |
|
4061 |
// Error reading call forwarding number from the SIM |
|
4062 |
// probably because the SIM doesn't include EF-CFIS file. |
|
4063 |
// Complete the GetCallForwardingNumber to SOS layer with |
|
4064 |
// an error KErrGeneral |
|
4065 |
iMessageRouter->Complete( |
|
4066 |
EMmTsyGetCallForwardingNumberIPC, |
|
4067 |
&dataPackage, |
|
4068 |
KErrGeneral ); |
|
4069 |
} |
|
4070 |
} |
|
4071 |
} |
|
4072 |
||
4073 |
// ---------------------------------------------------------------------------- |
|
4074 |
// CMmSupplServMessHandler::UiccReadVoiceMsgFlagsRel4Req |
|
4075 |
// Read voice message flags REL4 |
|
4076 |
// ----------------------------------------------------------------------------- |
|
4077 |
// |
|
4078 |
TInt CMmSupplServMessHandler::UiccReadVoiceMsgFlagsRel4Req() |
|
4079 |
{ |
|
4080 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::UiccReadVoiceMsgFlagsRel4Req"); |
|
4081 |
OstTrace0( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_UICCREADVOICEMSGFLAGSREL4REQ, "CMmSupplServMessHandler::UiccReadVoiceMsgFlagsRel4Req" ); |
|
4082 |
||
4083 |
// At first try to read rel4 EF ( 6FCA ) |
|
4084 |
// If reading is not successful, then we try CPHS file ( 6F11 ) |
|
4085 |
// Set parameters for UICC_APPL_CMD_REQ message |
|
4086 |
TUiccReadLinearFixed params; |
|
4087 |
params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
|
4088 |
params.trId = ETrIdReadVoiceMsgFlagsRel4; |
|
4089 |
params.dataOffset = 0; |
|
4090 |
params.fileId = KElemFileMessageWaitingIndStatus; // EF MWIS |
|
4091 |
params.fileIdSfi = UICC_SFI_NOT_PRESENT; |
|
4092 |
params.serviceType = UICC_APPL_READ_LINEAR_FIXED; |
|
4093 |
params.record = 1; |
|
4094 |
||
4095 |
// File id path |
|
4096 |
params.filePath.Append( KMasterFileId >> 8 ); |
|
4097 |
params.filePath.Append( KMasterFileId ); |
|
4098 |
params.filePath.Append( iMmUiccMessHandler->GetApplicationFileId() ); |
|
4099 |
||
4100 |
return iMmUiccMessHandler->CreateUiccApplCmdReq( params ); |
|
4101 |
} |
|
4102 |
||
4103 |
// ---------------------------------------------------------------------------- |
|
4104 |
// CMmSupplServMessHandler::UiccReadVoiceMsgFlagsResp |
|
4105 |
// Complete voice message flags |
|
4106 |
// ----------------------------------------------------------------------------- |
|
4107 |
// |
|
4108 |
void CMmSupplServMessHandler::UiccReadVoiceMsgFlagsResp( |
|
4109 |
TInt aTrId, |
|
4110 |
const TDesC8& aFileData ) |
|
4111 |
{ |
|
4112 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::UiccReadVoiceMsgFlagsResp"); |
|
4113 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_UICCREADVOICEMSGFLAGSRESP, "CMmSupplServMessHandler::UiccReadVoiceMsgFlagsResp" ); |
|
4114 |
||
4115 |
TInt ret( KErrNone ); |
|
4116 |
CMmDataPackage dataPackage; |
|
4117 |
||
4118 |
if ( ETrIdReadVoiceMsgFlagsRel4 == aTrId ) |
|
4119 |
{ |
|
4120 |
iVMIndicators.iDisplayStatus = aFileData[0]; |
|
4121 |
iVMIndicators.iVoiceMsgs = aFileData[1]; |
|
4122 |
iVMIndicators.iFaxMsgs = aFileData[2]; |
|
4123 |
iVMIndicators.iEmailMsgs = aFileData[3]; |
|
4124 |
iVMIndicators.iOtherMsgs = aFileData[4]; |
|
4125 |
||
4126 |
iMsgFlagType = EMsgFlagTypeRel4; |
|
4127 |
} |
|
4128 |
else // CPHS |
|
4129 |
{ |
|
4130 |
// "0x0A" means active and "0x05" means inactive. |
|
4131 |
iVMIndicators.iDisplayStatus = |
|
4132 |
( ( ( aFileData[0] & 0x0F ) == 0x0A ) ? |
|
4133 |
RMobilePhone::KDisplayVoicemailActive : 0 ); |
|
4134 |
iVMIndicators.iDisplayStatus |= |
|
4135 |
( ( ( aFileData[0] >> 4 ) == 0x0A ) ? |
|
4136 |
RMobilePhone::KDisplayAuxVoicemailActive : 0 ); |
|
4137 |
||
4138 |
// Fax and data are optional, if exist file data is 2 bytes |
|
4139 |
if ( 1 < aFileData.Length() ) |
|
4140 |
{ |
|
4141 |
iVMIndicators.iDisplayStatus |= |
|
4142 |
( ( ( aFileData[1] & 0x0F ) == 0x0A ) ? |
|
4143 |
RMobilePhone::KDisplayFaxActive : 0 ); |
|
4144 |
||
4145 |
iVMIndicators.iDisplayStatus |= |
|
4146 |
( ( ( aFileData[1] >> 4 ) == 0x0A ) ? |
|
4147 |
RMobilePhone::KDisplayDataActive : 0 ); |
|
4148 |
} |
|
4149 |
// unable to determine message number in CPHS |
|
4150 |
iVMIndicators.iVoiceMsgs = 0; |
|
4151 |
iVMIndicators.iFaxMsgs = 0; |
|
4152 |
iVMIndicators.iEmailMsgs = 0; |
|
4153 |
iVMIndicators.iOtherMsgs = 0; |
|
4154 |
||
4155 |
iMsgFlagType = EMsgFlagTypeCphs; |
|
4156 |
||
4157 |
// Because not possible to determine amount of messages, |
|
4158 |
// complete with error. |
|
4159 |
ret = KErrCPHSInUseBySIM; |
|
4160 |
} |
|
4161 |
||
4162 |
dataPackage.PackData( &iVMIndicators ); |
|
4163 |
iMessageRouter->Complete( |
|
4164 |
EMobilePhoneGetIccMessageWaitingIndicators, |
|
4165 |
&dataPackage, |
|
4166 |
ret ); |
|
4167 |
} |
|
4168 |
||
4169 |
// ---------------------------------------------------------------------------- |
|
4170 |
// CMmSupplServMessHandler::UiccReadVoiceMsgFlagsCphsReq |
|
4171 |
// Read voice message flags CPHS |
|
4172 |
// ----------------------------------------------------------------------------- |
|
4173 |
// |
|
4174 |
TInt CMmSupplServMessHandler::UiccReadVoiceMsgFlagsCphsReq() |
|
4175 |
{ |
|
4176 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::UiccHandleCallFwdFlagsResp"); |
|
4177 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_UICCREADVOICEMSGFLAGSCPHSREQ, "CMmSupplServMessHandler::UiccReadVoiceMsgFlagsCphsReq" ); |
|
4178 |
||
4179 |
// Reading of rel4 was not successful, we try CPHS file ( 6F11 ) |
|
4180 |
// Set parameters for UICC_APPL_CMD_REQ message |
|
4181 |
TUiccReadTransparent params; |
|
4182 |
params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
|
4183 |
params.trId = ETrIdReadVoiceMsgFlagsCphs; |
|
4184 |
params.dataOffset = 0; |
|
4185 |
params.fileId = KElemFileVoiceMsgWaitingFlagsCphs; |
|
4186 |
params.fileIdSfi = UICC_SFI_NOT_PRESENT; |
|
4187 |
params.serviceType = UICC_APPL_READ_TRANSPARENT; |
|
4188 |
||
4189 |
// File id path |
|
4190 |
params.filePath.Append( KMasterFileId >> 8 ); |
|
4191 |
params.filePath.Append( KMasterFileId ); |
|
4192 |
params.filePath.Append( iMmUiccMessHandler->GetApplicationFileId() ); |
|
4193 |
||
4194 |
return iMmUiccMessHandler->CreateUiccApplCmdReq( params ); |
|
4195 |
} |
|
4196 |
||
4197 |
// ---------------------------------------------------------------------------- |
|
4198 |
// CMmSupplServMessHandler::UiccWriteVoiceMsgFlagsCPHSReq |
|
4199 |
// Write voice message flags CPHS |
|
4200 |
// ----------------------------------------------------------------------------- |
|
4201 |
// |
|
4202 |
TInt CMmSupplServMessHandler::UiccWriteVoiceMsgFlagsCPHSReq( |
|
4203 |
const RMobilePhone::TMobilePhoneMessageWaitingV1& aMsgWaiting ) |
|
4204 |
{ |
|
4205 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::UiccWriteVoiceMsgFlagsCPHSReq"); |
|
4206 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_UICCWRITEVOICEMSGFLAGSCPHSREQ, "CMmSupplServMessHandler::UiccWriteVoiceMsgFlagsCPHSReq" ); |
|
4207 |
||
4208 |
// Set parameters for UICC_APPL_CMD_REQ message |
|
4209 |
TUiccWriteTransparent params; |
|
4210 |
params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
|
4211 |
params.trId = ETrIdWriteVoiceMsgFlagsCphs; |
|
4212 |
params.dataOffset = 0; |
|
4213 |
params.fileId = KElemFileVoiceMsgWaitingFlagsCphs; |
|
4214 |
params.fileIdSfi = UICC_SFI_NOT_PRESENT; |
|
4215 |
params.serviceType = UICC_APPL_UPDATE_TRANSPARENT; |
|
4216 |
||
4217 |
// File id path |
|
4218 |
params.filePath.Append( KMasterFileId >> 8 ); |
|
4219 |
params.filePath.Append( KMasterFileId ); |
|
4220 |
params.filePath.Append( iMmUiccMessHandler->GetApplicationFileId() ); |
|
4221 |
||
4222 |
// In CPHS flag fields are coded as "0x0A" means active and "0x05" means |
|
4223 |
// inactive. |
|
4224 |
// Voice line 1 message waiting flag |
|
4225 |
TUint8 voiceLine1( ( aMsgWaiting.iDisplayStatus & |
|
4226 |
RMobilePhone::KDisplayVoicemailActive ) ? 0x0A : 0x05 ); |
|
4227 |
||
4228 |
// Voice line 2 message waiting flag |
|
4229 |
TUint8 voiceLine2( ( aMsgWaiting.iDisplayStatus & |
|
4230 |
RMobilePhone::KDisplayAuxVoicemailActive ) ? 0x0A : 0x05 ); |
|
4231 |
||
4232 |
// Fax message waiting flag |
|
4233 |
TUint8 faxFlag( ( aMsgWaiting.iDisplayStatus & |
|
4234 |
RMobilePhone::KDisplayFaxActive ) ? 0x0A : 0x05 ); |
|
4235 |
||
4236 |
// Data message waiting flag |
|
4237 |
TUint8 dataFlag( ( aMsgWaiting.iDisplayStatus & |
|
4238 |
RMobilePhone::KDisplayDataActive ) ? 0x0A : 0x05 ); |
|
4239 |
||
4240 |
// File data to be updated. |
|
4241 |
TBuf8<2> fileDataBuf; |
|
4242 |
// Byte 1: Voice line 2 (bits 4-7) and Voice line 1 (bits 0-3) |
|
4243 |
fileDataBuf.Append( ( voiceLine2 << 4 ) | ( voiceLine1 & 0x0F ) ); |
|
4244 |
// Byte 2: Data calls (bits 4-7) and Fax calls (bits 0-3) |
|
4245 |
fileDataBuf.Append( ( dataFlag << 4 ) | ( faxFlag & 0x0F ) ); |
|
4246 |
params.fileData.Append( fileDataBuf ); |
|
4247 |
||
4248 |
iVMIndicators = aMsgWaiting; |
|
4249 |
return iMmUiccMessHandler->CreateUiccApplCmdReq( params ); |
|
4250 |
} |
|
4251 |
||
4252 |
// ---------------------------------------------------------------------------- |
|
4253 |
// CMmSupplServMessHandler::UiccWriteVoiceMsgFlagsRel4Req |
|
4254 |
// Write voice message flags REL4 |
|
4255 |
// ----------------------------------------------------------------------------- |
|
4256 |
// |
|
4257 |
TInt CMmSupplServMessHandler::UiccWriteVoiceMsgFlagsRel4Req( |
|
4258 |
const RMobilePhone::TMobilePhoneMessageWaitingV1& aMsgWaiting ) |
|
4259 |
{ |
|
4260 |
TFLOGSTRING("TSY: CMmSupplServMessHandler::UiccHandleCallFwdFlagsResp"); |
|
4261 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_UICCWRITEVOICEMSGFLAGSREL4REQ, "CMmSupplServMessHandler::UiccWriteVoiceMsgFlagsRel4Req" ); |
|
4262 |
||
4263 |
// Set parameters for UICC_APPL_CMD_REQ message |
|
4264 |
TUiccWriteLinearFixed params; |
|
4265 |
params.messHandlerPtr = static_cast<MUiccOperationBase*>( this ); |
|
4266 |
params.trId = ETrIdWriteVoiceMsgFlagsRel4; |
|
4267 |
params.record = 1; |
|
4268 |
params.fileId = KElemFileMessageWaitingIndStatus; |
|
4269 |
params.fileIdSfi = UICC_SFI_NOT_PRESENT; |
|
4270 |
params.serviceType = UICC_APPL_UPDATE_LINEAR_FIXED; |
|
4271 |
||
4272 |
// File ID path |
|
4273 |
params.filePath.Append( KMasterFileId >> 8 ); |
|
4274 |
params.filePath.Append( KMasterFileId ); |
|
4275 |
params.filePath.Append( iMmUiccMessHandler->GetApplicationFileId() ); |
|
4276 |
||
4277 |
// File data to be updated. |
|
4278 |
TBuf8<5> fileDataBuf; |
|
4279 |
// CFU indicator status |
|
4280 |
fileDataBuf.Append( aMsgWaiting.iDisplayStatus ); |
|
4281 |
fileDataBuf.Append( aMsgWaiting.iVoiceMsgs); |
|
4282 |
fileDataBuf.Append( aMsgWaiting.iFaxMsgs ); |
|
4283 |
fileDataBuf.Append( aMsgWaiting.iEmailMsgs ); |
|
4284 |
fileDataBuf.Append( aMsgWaiting.iOtherMsgs ); |
|
4285 |
params.fileData.Append( fileDataBuf ); |
|
4286 |
||
4287 |
iVMIndicators = aMsgWaiting; |
|
4288 |
return iMmUiccMessHandler->CreateUiccApplCmdReq( params ); |
|
4289 |
} |
|
4290 |
||
4291 |
// ----------------------------------------------------------------------------- |
|
4292 |
// CMmSupplServMessHandler::MapTypeOfNumberMmToIsi |
|
4293 |
// This method maps Symbian OS number type to Domestic OS number type. |
|
4294 |
// (other items were commented in a header). |
|
4295 |
// ----------------------------------------------------------------------------- |
|
4296 |
// |
|
4297 |
void CMmSupplServMessHandler::MapTypeOfNumberMmToIsi( |
|
4298 |
RMobilePhone::TMobileTON aMmTypeOfNumber, |
|
4299 |
RMobilePhone::TMobileNPI aMmNumberingPlan, |
|
4300 |
TUint8& aIsiTypeOfNumber ) |
|
4301 |
{ |
|
4302 |
TFLOGSTRING("TSY: CMmCallMessHandler::MapTypeOfNumberMmToIsi"); |
|
4303 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_MAPTYPEOFNUMBERMMTOISI, "CMmSupplServMessHandler::MapTypeOfNumberMmToIsi" ); |
|
4304 |
||
4305 |
//get the right numbering plan |
|
4306 |
switch ( aMmNumberingPlan ) |
|
4307 |
// isi numbering plan is included in bits 1-4 (lsb) |
|
4308 |
{ |
|
4309 |
case RMobilePhone::EUnknownNumberingPlan: |
|
4310 |
{ |
|
4311 |
aIsiTypeOfNumber = SS_NBR_PLAN_UNKNOWN; |
|
4312 |
break; |
|
4313 |
} |
|
4314 |
case RMobilePhone::EIsdnNumberPlan: |
|
4315 |
{ |
|
4316 |
aIsiTypeOfNumber = SS_NBR_PLAN_ISDN_TELEPHONY; |
|
4317 |
break; |
|
4318 |
} |
|
4319 |
case RMobilePhone::EDataNumberPlan: |
|
4320 |
{ |
|
4321 |
aIsiTypeOfNumber = SS_NBR_PLAN_DATA; |
|
4322 |
break; |
|
4323 |
} |
|
4324 |
case RMobilePhone::ETelexNumberPlan: |
|
4325 |
{ |
|
4326 |
aIsiTypeOfNumber = SS_NBR_PLAN_TELEX; |
|
4327 |
break; |
|
4328 |
} |
|
4329 |
case RMobilePhone::ENationalNumberPlan: |
|
4330 |
{ |
|
4331 |
aIsiTypeOfNumber = SS_NBR_PLAN_NATIONAL; |
|
4332 |
break; |
|
4333 |
} |
|
4334 |
case RMobilePhone::EPrivateNumberPlan: |
|
4335 |
{ |
|
4336 |
aIsiTypeOfNumber = SS_NBR_PLAN_PRIVATE; |
|
4337 |
break; |
|
4338 |
} |
|
4339 |
case RMobilePhone::EServiceCentreSpecificPlan1: |
|
4340 |
case RMobilePhone::EServiceCentreSpecificPlan2: |
|
4341 |
case RMobilePhone::EERMESNumberPlan: |
|
4342 |
default: |
|
4343 |
{ |
|
4344 |
TFLOGSTRING2("TSY: CMmCallMessHandler::MapTypeOfNumberMmToIsi -\ |
|
4345 |
Not supported numbering plan: %d", aMmNumberingPlan); |
|
4346 |
OstTrace1( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_MAPTYPEOFNUMBERMMTOISI, "CMmSupplServMessHandler::MapTypeOfNumberMmToIsi;aMmNumberingPlan=%d", aMmNumberingPlan ); |
|
4347 |
break; |
|
4348 |
} |
|
4349 |
} |
|
4350 |
||
4351 |
//get the right type of number |
|
4352 |
switch ( aMmTypeOfNumber ) |
|
4353 |
{ |
|
4354 |
// isi numbering type is included in bits 5-7 |
|
4355 |
case RMobilePhone::EUnknownNumber: |
|
4356 |
{ |
|
4357 |
aIsiTypeOfNumber = static_cast<TUint8>( aIsiTypeOfNumber | |
|
4358 |
( static_cast<TUint8>( SS_NBR_TYPE_UNKNOWN << 4 ) ) ); |
|
4359 |
} |
|
4360 |
break; |
|
4361 |
case RMobilePhone::EInternationalNumber: |
|
4362 |
{ |
|
4363 |
aIsiTypeOfNumber = static_cast<TUint8>( aIsiTypeOfNumber | |
|
4364 |
( static_cast<TUint8>( SS_NBR_TYPE_INTERNATIONAL << 4 ) ) ); |
|
4365 |
break; |
|
4366 |
} |
|
4367 |
case RMobilePhone::ENationalNumber: |
|
4368 |
{ |
|
4369 |
aIsiTypeOfNumber = static_cast<TUint8>( aIsiTypeOfNumber | |
|
4370 |
( static_cast<TUint8>( SS_NBR_TYPE_NATIONAL << 4 ) ) ); |
|
4371 |
break; |
|
4372 |
} |
|
4373 |
case RMobilePhone::ENetworkSpecificNumber: |
|
4374 |
{ |
|
4375 |
aIsiTypeOfNumber = static_cast<TUint8>( aIsiTypeOfNumber | |
|
4376 |
( static_cast<TUint8>( SS_NBR_TYPE_NETWORK_SPECIFIC << 4 ) ) ); |
|
4377 |
break; |
|
4378 |
} |
|
4379 |
case RMobilePhone::ESubscriberNumber: |
|
4380 |
{ |
|
4381 |
aIsiTypeOfNumber = static_cast<TUint8>( aIsiTypeOfNumber | |
|
4382 |
( static_cast<TUint8>( SS_NBR_TYPE_SUBSCRIBER << 4 ) ) ); |
|
4383 |
break; |
|
4384 |
} |
|
4385 |
case RMobilePhone::EAlphanumericNumber: |
|
4386 |
{ |
|
4387 |
aIsiTypeOfNumber = static_cast<TUint8>( aIsiTypeOfNumber | |
|
4388 |
( static_cast<TUint8>( SS_NBR_TYPE_ALPHANUMERIC ) ) ); |
|
4389 |
break; |
|
4390 |
} |
|
4391 |
case RMobilePhone::EAbbreviatedNumber: |
|
4392 |
{ |
|
4393 |
aIsiTypeOfNumber = static_cast<TUint8>( aIsiTypeOfNumber | |
|
4394 |
( static_cast<TUint8>( SS_NBR_TYPE_ABBREVIATED << 4 ) ) ); |
|
4395 |
break; |
|
4396 |
} |
|
4397 |
default: |
|
4398 |
{ |
|
4399 |
TFLOGSTRING2("TSY: CMmCallMessHandler::MapTypeOfNumberMmToIsi -\ |
|
4400 |
Not supported number type: %d", aMmTypeOfNumber); |
|
4401 |
OstTrace1( TRACE_NORMAL, DUP2_CMMSUPPLSERVMESSHANDLER_MAPTYPEOFNUMBERMMTOISI, "CMmSupplServMessHandler::MapTypeOfNumberMmToIsi;aMmTypeOfNumber=%d", aMmTypeOfNumber ); |
|
4402 |
break; |
|
4403 |
} |
|
4404 |
} |
|
4405 |
} |
|
4406 |
||
4407 |
// ---------------------------------------------------------------------------- |
|
4408 |
// CMmSupplServMessHandler::SetVoiceCallForwardLine |
|
4409 |
// Updates internal variable that keeps track of which ALS line is used |
|
4410 |
// ----------------------------------------------------------------------------- |
|
4411 |
// |
|
4412 |
void CMmSupplServMessHandler::SetVoiceCallForwardLine |
|
4413 |
( |
|
4414 |
RMobilePhone::TMobilePhoneALSLine& aAlsLine |
|
4415 |
) |
|
4416 |
{ |
|
4417 |
TFLOGSTRING2("TSY: CMmSupplServMessHandler::SetVoiceCallForwardLine: %d", |
|
4418 |
aAlsLine); |
|
4419 |
OstTrace1( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_SETVOICECALLFORWARDLINE, "CMmSupplServMessHandler::SetVoiceCallForwardLine;aAlsLine=%d", aAlsLine ); |
|
4420 |
iAlsLine = aAlsLine; |
|
4421 |
} |
|
4422 |
||
4423 |
// ---------------------------------------------------------------------------- |
|
4424 |
// CMmSupplServMessHandler::ProcessIfSsRequestChanged |
|
4425 |
// Checks if original SS request is changed or initiated by Call Control |
|
4426 |
// ----------------------------------------------------------------------------- |
|
4427 |
// |
|
4428 |
TBool CMmSupplServMessHandler::ProcessIfSsRequestChanged( |
|
4429 |
const TPreprocessedSsServiceCompleteResponse& aResponse) |
|
4430 |
{ |
|
4431 |
TFLOGSTRING("TSY:CMmSupplServMessHandler::ProcessIfSsRequestChanged"); |
|
4432 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_PROCESSIFSSREQUESTCHANGED, "CMmSupplServMessHandler::ProcessIfSsRequestChanged" ); |
|
4433 |
TBool ret( EFalse ); |
|
4434 |
||
4435 |
// original SS request is changed, or initiated by Call Control |
|
4436 |
if ( ESSOperationTypeUnknown == aResponse.iTraId && iSsCode != aResponse.iSsCode ) |
|
4437 |
{ |
|
4438 |
ret = ETrue; |
|
4439 |
if ( KSsCodeNoValue != iSsCode ) |
|
4440 |
{ |
|
4441 |
TFLOGSTRING("TSY: call control has changed SS request -> complete with error"); |
|
4442 |
OstTrace0( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_PROCESSIFSSREQUESTCHANGED, "CMmSupplServMessHandler::ProcessIfSsRequestChanged, call control has changed SS request -> complete with error" ); |
|
4443 |
//call control has changed SS request -> complete with error |
|
4444 |
iMessageRouter->Complete( |
|
4445 |
iIpc, |
|
4446 |
CMmStaticUtility::EpocErrorCode( |
|
4447 |
KErrAccessDenied, |
|
4448 |
KErrSatControl ) ); |
|
4449 |
} |
|
4450 |
else |
|
4451 |
{ |
|
4452 |
TFLOGSTRING("TSY: call control has changed call request to SS request -> ignored"); |
|
4453 |
OstTrace0( TRACE_NORMAL, DUP2_CMMSUPPLSERVMESSHANDLER_PROCESSIFSSREQUESTCHANGED, "CMmSupplServMessHandler::ProcessIfSsRequestChanged,call control has changed call request to SS request -> ignored" ); |
|
4454 |
// call control has changed call request to SS request. |
|
4455 |
// CTSY doesn't expect the completion, ignore this (error EXTL-6XJ9KC) |
|
4456 |
} |
|
4457 |
} |
|
4458 |
return ret; |
|
4459 |
} |
|
4460 |
||
4461 |
// ---------------------------------------------------------------------------- |
|
4462 |
// CMmSupplServMessHandler::SetVoiceCallForwardLine |
|
4463 |
// Checks if IPC requested allows simple completion |
|
4464 |
// ----------------------------------------------------------------------------- |
|
4465 |
// |
|
4466 |
TBool CMmSupplServMessHandler::ProcessIfSimpleCompletionPossible( |
|
4467 |
const TPreprocessedSsServiceCompleteResponse& /*aResponse*/) |
|
4468 |
{ |
|
4469 |
TFLOGSTRING("TSY:CMmSupplServMessHandler::ProcessIfSimpleCompletionPossible"); |
|
4470 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_PROCESSIFSIMPLECOMPLETIONPOSSIBLE, "CMmSupplServMessHandler::ProcessIfSimpleCompletionPossible" ); |
|
4471 |
TBool ret( EFalse ); |
|
4472 |
||
4473 |
if ( EMobilePhoneSendNetworkServiceRequestNoFdnCheck == iIpc || |
|
4474 |
EMobilePhoneSendNetworkServiceRequest == iIpc ) |
|
4475 |
{ |
|
4476 |
ret = ETrue; |
|
4477 |
iMessageRouter->Complete( iIpc, KErrNone ); |
|
4478 |
} |
|
4479 |
||
4480 |
return ret; |
|
4481 |
} |
|
4482 |
||
4483 |
// ---------------------------------------------------------------------------- |
|
4484 |
// CMmSupplServMessHandler::ProcessSsGsmPasswordRegistration |
|
4485 |
// Processes SS_GSM_PASSWORD_REGISTRATION response |
|
4486 |
// ----------------------------------------------------------------------------- |
|
4487 |
// |
|
4488 |
TBool CMmSupplServMessHandler::ProcessSsGsmPasswordRegistration( |
|
4489 |
const TPreprocessedSsServiceCompleteResponse& aResponse) |
|
4490 |
{ |
|
4491 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_PROCESSSSGSMPASSWORDREGISTRATION, "CMmSupplServMessHandler::ProcessSsGsmPasswordRegistration" ); |
|
4492 |
TFLOGSTRING("TSY:CMmSupplServMessHandler::ProcessSsGsmPasswordRegistration"); |
|
4493 |
TBool ret( EFalse ); |
|
4494 |
||
4495 |
if ( SS_GSM_PASSWORD_REGISTRATION == aResponse.iOperation ) |
|
4496 |
{ |
|
4497 |
ret = ETrue; |
|
4498 |
// password changed successfully |
|
4499 |
iMessageRouter->Complete( EMobilePhoneSetSSPassword, KErrNone ); |
|
4500 |
} |
|
4501 |
||
4502 |
return ret; |
|
4503 |
} |
|
4504 |
||
4505 |
// ---------------------------------------------------------------------------- |
|
4506 |
// CMmSupplServMessHandler::ProcessIfCallForwarding |
|
4507 |
// Checks if this is related to call forwarding |
|
4508 |
// ----------------------------------------------------------------------------- |
|
4509 |
// |
|
4510 |
TBool CMmSupplServMessHandler::ProcessIfCallForwardingL( |
|
4511 |
const TPreprocessedSsServiceCompleteResponse& aResponse) |
|
4512 |
{ |
|
4513 |
TFLOGSTRING("TSY:CMmSupplServMessHandler::ProcessIfCallForwardingL"); |
|
4514 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_PROCESSIFCALLFORWARDINGL, "CMmSupplServMessHandler::ProcessIfCallForwardingL" ); |
|
4515 |
TBool ret( EFalse ); |
|
4516 |
// offset where the subblock starts |
|
4517 |
TUint sbStartOffset( 0 ); |
|
4518 |
||
4519 |
switch ( aResponse.iSsCode ) |
|
4520 |
{ |
|
4521 |
// call forwarding cases |
|
4522 |
case SS_GSM_ALL_FORWARDINGS: |
|
4523 |
case SS_GSM_ALL_COND_FORWARDINGS: |
|
4524 |
case SS_GSM_FORW_UNCONDITIONAL: |
|
4525 |
case SS_GSM_FORW_BUSY: |
|
4526 |
case SS_GSM_FORW_NO_REPLY: |
|
4527 |
case SS_GSM_FORW_NO_REACH: |
|
4528 |
{ |
|
4529 |
ret = ETrue; |
|
4530 |
if ( SS_INTERROGATION == aResponse.iOperation ) |
|
4531 |
{ |
|
4532 |
// this is the response to a call forwarding interrogation |
|
4533 |
// (ETel API method GetCallForwardingStatus) |
|
4534 |
// the results will be saved in this list |
|
4535 |
delete iCFResults; |
|
4536 |
iCFResults = NULL; |
|
4537 |
iCFResults = CMobilePhoneCFList::NewL(); |
|
4538 |
||
4539 |
// Check sub blocks in ISA message: |
|
4540 |
// - Try to find and interpret FORWARDING_INFO sub block |
|
4541 |
// - If not present, try to find and interpret STATUS_RESULT sub block |
|
4542 |
// - If also this is not present, Call Forwarding is not active. |
|
4543 |
||
4544 |
if ( ( 0 != aResponse.iNumSubBlocks ) |
|
4545 |
&& ( KErrNone == aResponse.iIsiMessage.FindSubBlockOffsetById( |
|
4546 |
ISI_HEADER_SIZE + SIZE_SS_SERVICE_COMPLETED_RESP, |
|
4547 |
SS_GSM_FORWARDING_INFO, |
|
4548 |
EIsiSubBlockTypeId8Len8, |
|
4549 |
sbStartOffset ) ) ) |
|
4550 |
{ |
|
4551 |
// get data from ss gsm forwarding sub block, result |
|
4552 |
// will be saved in iCFResults |
|
4553 |
HandleSsGsmForwardingSubBlockL( |
|
4554 |
aResponse.iIsiMessage, |
|
4555 |
sbStartOffset, |
|
4556 |
aResponse.iSsCode ); |
|
4557 |
} |
|
4558 |
else if ( ( 0 != aResponse.iNumSubBlocks ) |
|
4559 |
&& ( KErrNone == aResponse.iIsiMessage.FindSubBlockOffsetById( |
|
4560 |
ISI_HEADER_SIZE + SIZE_SS_SERVICE_COMPLETED_RESP, |
|
4561 |
SS_STATUS_RESULT, |
|
4562 |
EIsiSubBlockTypeId8Len8, |
|
4563 |
sbStartOffset ) ) ) |
|
4564 |
{ |
|
4565 |
// get data from ss status sub block |
|
4566 |
RMobilePhone::TMobilePhoneCFInfoEntryV1 entry; |
|
4567 |
entry.iStatus = RMobilePhone::ECallForwardingStatusUnknown; |
|
4568 |
TUint8 statusIsi = aResponse.iIsiMessage.Get8bit( |
|
4569 |
sbStartOffset + SS_STATUS_RESULT_OFFSET_SSSTATUS ); |
|
4570 |
MapCFStatusIsiToMm( statusIsi, &entry.iStatus ); |
|
4571 |
MapCFConditionIsiToMm( aResponse.iSsCode, &entry.iCondition ); |
|
4572 |
MapBasicServiceCodeIsiToMm( |
|
4573 |
aResponse.iBasicService, |
|
4574 |
&entry.iServiceGroup ); |
|
4575 |
// save result to iCFResults |
|
4576 |
iCFResults->AddEntryL( entry ); |
|
4577 |
} |
|
4578 |
else |
|
4579 |
{ |
|
4580 |
// if this was an interrogation, and no SsGsmForwardingInfo |
|
4581 |
// or SsStatus sub block was found, the requested divert |
|
4582 |
// is not active. We have to build an entry for the |
|
4583 |
// 'Divert Not Active' case ourselves. |
|
4584 |
RMobilePhone::TMobilePhoneCFInfoEntryV1 entry; |
|
4585 |
entry.iStatus = |
|
4586 |
RMobilePhone::ECallForwardingStatusNotRegistered; |
|
4587 |
MapCFConditionIsiToMm( aResponse.iSsCode, &entry.iCondition ); |
|
4588 |
MapBasicServiceCodeIsiToMm( |
|
4589 |
aResponse.iBasicService, |
|
4590 |
&entry.iServiceGroup ); |
|
4591 |
// save result to iCFResults |
|
4592 |
iCFResults->AddEntryL( entry ); |
|
4593 |
} |
|
4594 |
||
4595 |
// send result to SOS layer |
|
4596 |
CMmDataPackage dataPackage; |
|
4597 |
dataPackage.PackData( iCFResults ); |
|
4598 |
iMessageRouter->Complete( |
|
4599 |
EMobilePhoneGetCallForwardingStatusPhase1, |
|
4600 |
&dataPackage, |
|
4601 |
KErrNone ); |
|
4602 |
||
4603 |
delete iCFResults; |
|
4604 |
iCFResults = NULL; |
|
4605 |
} |
|
4606 |
else |
|
4607 |
{ |
|
4608 |
// this is the response to a call forwarding action |
|
4609 |
// (ETel API method SetCallForwardingStatus) |
|
4610 |
||
4611 |
// we know that the request was successful: In the case of a |
|
4612 |
// failure, a SS_SERVICE_FAILED_RESP is received instead |
|
4613 |
||
4614 |
// complete CF status changed notification to SOS layer |
|
4615 |
// as we have no cached values of the statuses, |
|
4616 |
// we _always_ trigger the changed notification (although we |
|
4617 |
// don't know if something has actually changed) |
|
4618 |
RMobilePhone::TMobilePhoneCFCondition cfCondition; |
|
4619 |
MapCFConditionIsiToMm( aResponse.iSsCode, &cfCondition ); |
|
4620 |
// packed parameter: a RMobilePhone::TMobilePhoneCFCondition |
|
4621 |
CMmDataPackage dataPackage; |
|
4622 |
dataPackage.PackData( &cfCondition ); |
|
4623 |
iMessageRouter->Complete( |
|
4624 |
EMobilePhoneNotifyCallForwardingStatusChange, |
|
4625 |
&dataPackage, |
|
4626 |
KErrNone ); |
|
4627 |
||
4628 |
// SS request was successfull, write CallForwarding flags |
|
4629 |
// to the SIM. |
|
4630 |
// IPC EMobilePhoneSetCallForwardingStatus will be |
|
4631 |
// completed from UiccHandleCallFwdFlagsResp. |
|
4632 |
UiccReadCallFwdFlagsRel4Req(); |
|
4633 |
} |
|
4634 |
break; |
|
4635 |
} // call forwarding cases |
|
4636 |
} |
|
4637 |
||
4638 |
return ret; |
|
4639 |
} |
|
4640 |
||
4641 |
// ---------------------------------------------------------------------------- |
|
4642 |
// CMmSupplServMessHandler::ProcessIfCallBarring |
|
4643 |
// Checks if this is related to call barring |
|
4644 |
// ----------------------------------------------------------------------------- |
|
4645 |
// |
|
4646 |
TBool CMmSupplServMessHandler::ProcessIfCallBarringL( |
|
4647 |
const TPreprocessedSsServiceCompleteResponse& aResponse) |
|
4648 |
{ |
|
4649 |
TFLOGSTRING("TSY:CMmSupplServMessHandler::ProcessIfCallBarringL"); |
|
4650 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_PROCESSIFCALLBARRINGL, "CMmSupplServMessHandler::ProcessIfCallBarringL" ); |
|
4651 |
TBool ret( EFalse ); |
|
4652 |
// offset where the subblock starts |
|
4653 |
TUint sbStartOffset( 0 ); |
|
4654 |
||
4655 |
switch ( aResponse.iSsCode ) |
|
4656 |
{ |
|
4657 |
// call barring cases |
|
4658 |
case SS_GSM_ALL_BARRINGS: |
|
4659 |
case SS_GSM_BARR_ALL_OUT: |
|
4660 |
case SS_GSM_BARR_OUT_INTER: |
|
4661 |
case SS_GSM_BARR_OUT_INTER_EXC_HOME: |
|
4662 |
case SS_GSM_BARR_ALL_IN: |
|
4663 |
case SS_GSM_BARR_ALL_IN_ROAM: |
|
4664 |
case SS_GSM_OUTGOING_BARR_SERV: |
|
4665 |
case SS_GSM_INCOMING_BARR_SERV: |
|
4666 |
{ |
|
4667 |
ret = ETrue; |
|
4668 |
} |
|
4669 |
if ( SS_INTERROGATION == aResponse.iOperation ) |
|
4670 |
{ |
|
4671 |
// this is the response to a call barring interrogation |
|
4672 |
// (ETel API method GetCallBarringStatus) |
|
4673 |
||
4674 |
// the results will be saved in this list |
|
4675 |
delete iCBResults; |
|
4676 |
iCBResults = NULL; |
|
4677 |
iCBResults = CMobilePhoneCBList::NewL(); |
|
4678 |
||
4679 |
// Check sub blocks in ISA message: |
|
4680 |
// - Try to find and interpret BSC_INFO sub block |
|
4681 |
// - If not present, try to find and interpret STATUS_RESULT sub block |
|
4682 |
// - If also this is not present, Call Barring is not active. |
|
4683 |
||
4684 |
if ( ( 0 != aResponse.iNumSubBlocks ) |
|
4685 |
&& ( KErrNone == aResponse.iIsiMessage.FindSubBlockOffsetById( |
|
4686 |
ISI_HEADER_SIZE + SIZE_SS_SERVICE_COMPLETED_RESP, |
|
4687 |
SS_GSM_BSC_INFO, |
|
4688 |
EIsiSubBlockTypeId8Len8, |
|
4689 |
sbStartOffset ) ) ) |
|
4690 |
{ |
|
4691 |
// get data from ss bsc info sub block, result |
|
4692 |
// will be saved in iCBResults |
|
4693 |
HandleBarringSsGsmBscInfoSubBlockL( |
|
4694 |
aResponse.iIsiMessage, |
|
4695 |
sbStartOffset, |
|
4696 |
aResponse.iSsCode ); |
|
4697 |
} |
|
4698 |
else if ( ( 0 != aResponse.iNumSubBlocks ) |
|
4699 |
&& ( KErrNone == aResponse.iIsiMessage.FindSubBlockOffsetById( |
|
4700 |
ISI_HEADER_SIZE + SIZE_SS_SERVICE_COMPLETED_RESP, |
|
4701 |
SS_STATUS_RESULT, |
|
4702 |
EIsiSubBlockTypeId8Len8, |
|
4703 |
sbStartOffset ) ) ) |
|
4704 |
{ |
|
4705 |
// get data from ss status sub block |
|
4706 |
RMobilePhone::TMobilePhoneCBInfoEntryV1 entry; |
|
4707 |
entry.iStatus = RMobilePhone::ECallBarringStatusUnknown; |
|
4708 |
TUint8 statusIsi = aResponse.iIsiMessage.Get8bit( |
|
4709 |
sbStartOffset + SS_STATUS_RESULT_OFFSET_SSSTATUS ); |
|
4710 |
MapCBStatusIsiToMm( statusIsi, &entry.iStatus ); |
|
4711 |
MapCBConditionIsiToMm( aResponse.iSsCode, &entry.iCondition ); |
|
4712 |
MapBasicServiceCodeIsiToMm( |
|
4713 |
aResponse.iBasicService, |
|
4714 |
&entry.iServiceGroup ); |
|
4715 |
// save result to iCBResults |
|
4716 |
iCBResults->AddEntryL( entry ); |
|
4717 |
} |
|
4718 |
else |
|
4719 |
{ |
|
4720 |
// if this was an interrogation, and no SsGsmBscInfo or SsStatus |
|
4721 |
// sub block was found, the requested barring is not active. |
|
4722 |
// We have to build an entry for the 'Barring Not Active' |
|
4723 |
// case ourselves. |
|
4724 |
RMobilePhone::TMobilePhoneCBInfoEntryV1 entry; |
|
4725 |
entry.iStatus = |
|
4726 |
RMobilePhone::ECallBarringStatusNotActive; |
|
4727 |
MapCBConditionIsiToMm( aResponse.iSsCode, &entry.iCondition ); |
|
4728 |
MapBasicServiceCodeIsiToMm( |
|
4729 |
aResponse.iBasicService, |
|
4730 |
&entry.iServiceGroup ); |
|
4731 |
// save result to iCBResults |
|
4732 |
iCBResults->AddEntryL( entry ); |
|
4733 |
} |
|
4734 |
||
4735 |
// send result to SOS layer |
|
4736 |
CMmDataPackage dataPackage; |
|
4737 |
dataPackage.PackData( iCBResults ); |
|
4738 |
iMessageRouter->Complete( |
|
4739 |
EMobilePhoneGetBarringStatusPhase1, |
|
4740 |
&dataPackage, |
|
4741 |
KErrNone ); |
|
4742 |
delete iCBResults; |
|
4743 |
iCBResults = NULL; |
|
4744 |
} |
|
4745 |
else |
|
4746 |
{ |
|
4747 |
// this is the response to a call barring action |
|
4748 |
// (ETel API method SetCallBarringStatus) |
|
4749 |
||
4750 |
// we know that the request was successful: In the case of a |
|
4751 |
// failure, a SS_SERVICE_FAILED_RESP is received instead |
|
4752 |
||
4753 |
// complete CB status changed notification to SOS layer |
|
4754 |
// as we have no cached values of the statuses, |
|
4755 |
// we _always_ trigger the changed notification (although |
|
4756 |
// we don't know if something has actually changed) |
|
4757 |
RMobilePhone::TMobilePhoneCBCondition cbCondition; |
|
4758 |
MapCBConditionIsiToMm( aResponse.iSsCode, &cbCondition ); |
|
4759 |
// packed parameter: a RMobilePhone::TMobilePhoneCBCondition |
|
4760 |
CMmDataPackage dataPackage; |
|
4761 |
dataPackage.PackData( &cbCondition ); |
|
4762 |
iMessageRouter->Complete( |
|
4763 |
EMobilePhoneNotifyCallBarringStatusChange, |
|
4764 |
&dataPackage, |
|
4765 |
KErrNone ); |
|
4766 |
||
4767 |
// complete the SetCallBarringStatus to SOS layer |
|
4768 |
iMessageRouter->Complete( |
|
4769 |
EMobilePhoneSetCallBarringStatus, |
|
4770 |
KErrNone ); |
|
4771 |
} |
|
4772 |
break; |
|
4773 |
} |
|
4774 |
||
4775 |
return ret; |
|
4776 |
} |
|
4777 |
||
4778 |
// ---------------------------------------------------------------------------- |
|
4779 |
// CMmSupplServMessHandler::ProcessIfCallWaiting |
|
4780 |
// Checks if this is related to call waiting |
|
4781 |
// ----------------------------------------------------------------------------- |
|
4782 |
// |
|
4783 |
TBool CMmSupplServMessHandler::ProcessIfCallWaitingL( |
|
4784 |
const TPreprocessedSsServiceCompleteResponse& aResponse) |
|
4785 |
{ |
|
4786 |
TFLOGSTRING("TSY:CMmSupplServMessHandler::ProcessIfCallWaitingL"); |
|
4787 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_PROCESSIFCALLWAITINGL, "CMmSupplServMessHandler::ProcessIfCallWaitingL" ); |
|
4788 |
TBool ret( EFalse ); |
|
4789 |
// offset where the subblock starts |
|
4790 |
TUint sbStartOffset( 0 ); |
|
4791 |
||
4792 |
switch ( aResponse.iSsCode ) |
|
4793 |
{ |
|
4794 |
// call waiting cases |
|
4795 |
case SS_GSM_CALL_WAITING: |
|
4796 |
{ |
|
4797 |
ret = ETrue; |
|
4798 |
if ( SS_INTERROGATION == aResponse.iOperation ) |
|
4799 |
{ |
|
4800 |
// this is the response to a call waiting interrogation |
|
4801 |
// (ETel API method GetCallWaitingStatus) |
|
4802 |
// the results will be saved in this list |
|
4803 |
delete iCWResults; |
|
4804 |
iCWResults = NULL; |
|
4805 |
iCWResults = CMobilePhoneCWList::NewL(); |
|
4806 |
||
4807 |
// Check sub blocks in ISA message: |
|
4808 |
// - Try to find and interpret BSC_INFO sub block |
|
4809 |
// - If not present, try to find and interpret STATUS_RESULT sub block |
|
4810 |
// - If also this is not present, Call Waiting is not active. |
|
4811 |
||
4812 |
if ( ( 0 != aResponse.iNumSubBlocks ) |
|
4813 |
&& ( KErrNone == aResponse.iIsiMessage.FindSubBlockOffsetById( |
|
4814 |
ISI_HEADER_SIZE + SIZE_SS_SERVICE_COMPLETED_RESP, |
|
4815 |
SS_GSM_BSC_INFO, |
|
4816 |
EIsiSubBlockTypeId8Len8, |
|
4817 |
sbStartOffset ) ) ) |
|
4818 |
{ |
|
4819 |
// get data from ss bsc info sub block, result |
|
4820 |
// will be saved in iCWResults |
|
4821 |
HandleWaitingSsGsmBscInfoSubBlockL( |
|
4822 |
aResponse.iIsiMessage, |
|
4823 |
sbStartOffset ); |
|
4824 |
} |
|
4825 |
else if ( ( 0 != aResponse.iNumSubBlocks ) |
|
4826 |
&& ( KErrNone == aResponse.iIsiMessage.FindSubBlockOffsetById( |
|
4827 |
ISI_HEADER_SIZE + SIZE_SS_SERVICE_COMPLETED_RESP, |
|
4828 |
SS_STATUS_RESULT, |
|
4829 |
EIsiSubBlockTypeId8Len8, |
|
4830 |
sbStartOffset ) ) ) |
|
4831 |
{ |
|
4832 |
// get data from ss status sub block |
|
4833 |
RMobilePhone::TMobilePhoneCWInfoEntryV1 entry; |
|
4834 |
entry.iStatus = RMobilePhone::ECallWaitingStatusUnknown; |
|
4835 |
TUint8 statusIsi = aResponse.iIsiMessage.Get8bit( |
|
4836 |
sbStartOffset + SS_STATUS_RESULT_OFFSET_SSSTATUS ); |
|
4837 |
MapCWStatusIsiToMm( statusIsi, &entry.iStatus ); |
|
4838 |
MapBasicServiceCodeIsiToMm( |
|
4839 |
aResponse.iBasicService, |
|
4840 |
&entry.iServiceGroup ); |
|
4841 |
// save result to iCWResults |
|
4842 |
iCWResults->AddEntryL( entry ); |
|
4843 |
} |
|
4844 |
else |
|
4845 |
{ |
|
4846 |
// if this was an interrogation, and no SsGsmBscInfo or |
|
4847 |
// SsStatus sub block was found, waiting is not active. |
|
4848 |
// We have to build an entry for the 'Waiting Not Active' |
|
4849 |
// case ourselves. |
|
4850 |
RMobilePhone::TMobilePhoneCWInfoEntryV1 entry; |
|
4851 |
entry.iStatus = RMobilePhone::ECallWaitingStatusNotActive; |
|
4852 |
MapBasicServiceCodeIsiToMm( |
|
4853 |
aResponse.iBasicService, |
|
4854 |
&entry.iServiceGroup ); |
|
4855 |
// save result to iCWResults |
|
4856 |
iCWResults->AddEntryL( entry ); |
|
4857 |
} |
|
4858 |
||
4859 |
// send result to SOS layer |
|
4860 |
CMmDataPackage dataPackage; |
|
4861 |
dataPackage.PackData( iCWResults ); |
|
4862 |
iMessageRouter->Complete( |
|
4863 |
EMobilePhoneGetWaitingStatusPhase1, |
|
4864 |
&dataPackage, |
|
4865 |
KErrNone ); |
|
4866 |
||
4867 |
delete iCWResults; |
|
4868 |
iCWResults = NULL; |
|
4869 |
} |
|
4870 |
else |
|
4871 |
{ |
|
4872 |
// this is the response to a call waiting action |
|
4873 |
// (ETel API method SetCallWaitingStatus) |
|
4874 |
||
4875 |
// we know that the request was successful: In the case of a |
|
4876 |
// failure, a SS_SERVICE_FAILED_RESP is received instead |
|
4877 |
||
4878 |
// complete CW status changed notification to SOS layer |
|
4879 |
// as we have no cached values of the statuses, |
|
4880 |
// we _always_ trigger the changed notification (although we |
|
4881 |
// don't know if something has actually changed) |
|
4882 |
RMobilePhone::TMobilePhoneCWInfoEntryV1 cwInfo; |
|
4883 |
MapBasicServiceCodeIsiToMm( aResponse.iBasicService, |
|
4884 |
&cwInfo.iServiceGroup ); |
|
4885 |
// maybe this can be solved in a different way |
|
4886 |
if ( SS_ACTIVATION == aResponse.iOperation ) |
|
4887 |
{ |
|
4888 |
cwInfo.iStatus = RMobilePhone::ECallWaitingStatusActive; |
|
4889 |
} |
|
4890 |
else if ( SS_DEACTIVATION == aResponse.iOperation ) |
|
4891 |
{ |
|
4892 |
cwInfo.iStatus = RMobilePhone::ECallWaitingStatusNotActive; |
|
4893 |
} |
|
4894 |
else |
|
4895 |
{ |
|
4896 |
// interrogation is already handled above; the other |
|
4897 |
// operations are not allowed for call waiting |
|
4898 |
cwInfo.iStatus = RMobilePhone::ECallWaitingStatusUnknown; |
|
4899 |
} |
|
4900 |
||
4901 |
// packed parameter: a RMobilePhone::TMobilePhoneCWInfoEntryV1 |
|
4902 |
CMmDataPackage dataPackage; |
|
4903 |
dataPackage.PackData( &cwInfo ); |
|
4904 |
iMessageRouter->Complete( |
|
4905 |
EMobilePhoneNotifyCallWaitingStatusChange, |
|
4906 |
&dataPackage, |
|
4907 |
KErrNone ); |
|
4908 |
||
4909 |
// complete the SetCallWaitingStatus to SOS layer |
|
4910 |
iMessageRouter->Complete( |
|
4911 |
EMobilePhoneSetCallWaitingStatus, |
|
4912 |
KErrNone ); |
|
4913 |
} |
|
4914 |
break; |
|
4915 |
} // call waiting cases |
|
4916 |
} |
|
4917 |
||
4918 |
return ret; |
|
4919 |
} |
|
4920 |
||
4921 |
// ---------------------------------------------------------------------------- |
|
4922 |
// CMmSupplServMessHandler::ProcessIfIdentityServices |
|
4923 |
// Checks if this is related to identity services |
|
4924 |
// ----------------------------------------------------------------------------- |
|
4925 |
// |
|
4926 |
TBool CMmSupplServMessHandler::ProcessIfIdentityServices( |
|
4927 |
const TPreprocessedSsServiceCompleteResponse& aResponse) |
|
4928 |
{ |
|
4929 |
TFLOGSTRING("TSY:CMmSupplServMessHandler::ProcessIfIdentityServices"); |
|
4930 |
OstTrace0( TRACE_NORMAL, CMMSUPPLSERVMESSHANDLER_PROCESSIFIDENTITYSERVICES, "CMmSupplServMessHandler::ProcessIfIdentityServices" ); |
|
4931 |
TBool ret( EFalse ); |
|
4932 |
// offset where the subblock starts |
|
4933 |
TUint sbStartOffset( 0 ); |
|
4934 |
||
4935 |
switch ( aResponse.iSsCode ) |
|
4936 |
{ |
|
4937 |
// identity services cases |
|
4938 |
case SS_GSM_CLIP: |
|
4939 |
case SS_GSM_CLIR: |
|
4940 |
case SS_GSM_COLP: |
|
4941 |
case SS_GSM_COLR: |
|
4942 |
case SS_GSM_CNAP: |
|
4943 |
{ |
|
4944 |
ret = ETrue; |
|
4945 |
if ( SS_INTERROGATION == aResponse.iOperation ) |
|
4946 |
{ |
|
4947 |
// this is the response to a identity services interrogation |
|
4948 |
// (ETel API method GetIdentityServiceStatus). |
|
4949 |
// (Setting the status through ETel API method |
|
4950 |
// SetIdentityServiceStatus is not supported). |
|
4951 |
||
4952 |
RMobilePhone::TMobilePhoneIdServiceStatus statusETel = |
|
4953 |
RMobilePhone::EIdServiceUnknown; |
|
4954 |
||
4955 |
// yet another special case: CLIR response may include a more |
|
4956 |
// detailed SsGsmGenericServiceInfo sub block instead of the |
|
4957 |
// SsStatusResult sub block. |
|
4958 |
TBool clirInfoFound = EFalse; |
|
4959 |
if ( SS_GSM_CLIR == aResponse.iSsCode ) |
|
4960 |
{ |
|
4961 |
TUint8 clirOption = 0xFF; // initialise with illegal value |
|
4962 |
if ( ( 0 != aResponse.iNumSubBlocks ) |
|
4963 |
&& ( KErrNone == aResponse.iIsiMessage.FindSubBlockOffsetById( |
|
4964 |
ISI_HEADER_SIZE + SIZE_SS_SERVICE_COMPLETED_RESP, |
|
4965 |
SS_GSM_GENERIC_SERVICE_INFO, |
|
4966 |
EIsiSubBlockTypeId8Len8, |
|
4967 |
sbStartOffset ) ) ) |
|
4968 |
{ |
|
4969 |
TFLOGSTRING("TSY:CMmSupplServMessHandler::ProcessIfIdentityServices: KSsGsmGenericServiceInfo found"); |
|
4970 |
OstTrace0( TRACE_NORMAL, DUP1_CMMSUPPLSERVMESSHANDLER_PROCESSIFIDENTITYSERVICES, "CMmSupplServMessHandler::ProcessIfIdentityServices, KSsGsmGenericServiceInfo found" ); |
|
4971 |
clirInfoFound = ETrue; |
|
4972 |
// get status |
|
4973 |
TUint8 statusIsi = aResponse.iIsiMessage.Get8bit( |
|
4974 |
sbStartOffset + |
|
4975 |
SS_GSM_GENERIC_SERVICE_INFO_OFFSET_SSSTATUS ); |
|
4976 |
||
4977 |
// get GSM_CLIR_INFO if available |
|
4978 |
||
4979 |
if ( KErrNone == aResponse.iIsiMessage.FindSubBlockOffsetById( |
|
4980 |
ISI_HEADER_SIZE + SIZE_SS_SERVICE_COMPLETED_RESP + |
|
4981 |
SIZE_SS_GSM_GENERIC_SERVICE_INFO, |
|
4982 |
SS_GSM_CLIR_INFO, |
|
4983 |
EIsiSubBlockTypeId8Len8, |
|
4984 |
sbStartOffset ) ) |
|
4985 |
{ |
|
4986 |
clirOption = aResponse.iIsiMessage.Get8bit( |
|
4987 |
sbStartOffset + |
|
4988 |
SS_GSM_CLIR_INFO_OFFSET_CLIRESTRICTIONOPTION ); |
|
4989 |
} |
|
4990 |
MapIdentityServiceStatusIsiToMm( |
|
4991 |
statusIsi, |
|
4992 |
clirOption, |
|
4993 |
&statusETel ); |
|
4994 |
} |
|
4995 |
} |
|
4996 |
||
4997 |
if ( !clirInfoFound ) |
|
4998 |
{ |
|
4999 |
// no extra CLIR info ==> handle SsStatusResult sub block. |
|
5000 |
if ( ( 0 != aResponse.iNumSubBlocks ) |
|
5001 |
&& ( KErrNone == aResponse.iIsiMessage.FindSubBlockOffsetById( |
|
5002 |
ISI_HEADER_SIZE + SIZE_SS_SERVICE_COMPLETED_RESP, |
|
5003 |
SS_STATUS_RESULT, |
|
5004 |
EIsiSubBlockTypeId8Len8, |
|
5005 |
sbStartOffset ) ) ) |
|
5006 |
{ |
|
5007 |
TUint8 statusIsi = aResponse.iIsiMessage.Get8bit( |
|
5008 |
sbStartOffset + SS_STATUS_RESULT_OFFSET_SSSTATUS ); |
|
5009 |
||
5010 |
MapIdentityServiceStatusIsiToMm( |
|
5011 |
statusIsi, |
|
5012 |
SS_GSM_CLI_PERMANENT, |
|
5013 |
&statusETel ); |
|
5014 |
} |
|
5015 |
} |
|
5016 |
||
5017 |
// send result to SOS layer |
|
5018 |
// packed parameter: a RMobilePhone::TMobilePhoneIdServiceStatus |
|
5019 |
CMmDataPackage dataPackage; |
|
5020 |
dataPackage.PackData( &statusETel ); |
|
5021 |
iMessageRouter->Complete( |
|
5022 |
EMobilePhoneGetIdentityServiceStatus, |
|
5023 |
&dataPackage, |
|
5024 |
KErrNone ); |
|
5025 |
} |
|
5026 |
break; |
|
5027 |
} // identity services cases |
|
5028 |
} |
|
5029 |
||
5030 |
return ret; |
|
5031 |
} |
|
5032 |
||
5033 |
// End of File |