author | hgs |
Fri, 03 Sep 2010 13:33:36 +0300 | |
changeset 65 | 2a5d4ab426d3 |
parent 46 | bc5a64e5bc3c |
child 78 | baacf668fe89 |
permissions | -rw-r--r-- |
37 | 1 |
/* |
2 |
* Copyright (c) 2002-2007 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 "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 |
* |
|
14 |
* Description: This module contains the implementation of |
|
15 |
* CPEParserSSHandler class |
|
16 |
* |
|
17 |
*/ |
|
18 |
||
19 |
||
20 |
||
21 |
// INCLUDE FILES |
|
22 |
#include "cpemessagehandler.h" |
|
23 |
#include "cpeparsersshandler.h" |
|
24 |
#include "mpephonemodelinternal.h" |
|
25 |
#include "pepanic.pan" |
|
26 |
#include <bldvariant.hrh> |
|
27 |
#include <etelmm.h> |
|
28 |
#include <featmgr.h> |
|
29 |
#include <mpedatastore.h> |
|
30 |
#include <nwdefs.h> |
|
31 |
#include <psetcallbarring.h> |
|
32 |
#include <psetcalldiverting.h> |
|
33 |
#include <psetcallwaiting.h> |
|
34 |
#include <psetcli.h> |
|
35 |
#include <psetcontainer.h> |
|
36 |
#include <talogger.h> |
|
37 |
||
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
38 |
#include <psetwrapper.h> |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
39 |
#include <psuidivertnotehandler.h> |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
40 |
#include <psetcalldivertingwrapper.h> |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
41 |
#include <psuiwaitingnotehandler.h> |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
42 |
#include <psetcallwaitingwrapper.h> |
37 | 43 |
|
44 |
// CONSTANTS |
|
45 |
const TInt KPEDefinedBasicServiceGroup = 99; |
|
46 |
||
47 |
||
48 |
// ============================ MEMBER FUNCTIONS =============================== |
|
49 |
||
50 |
// ----------------------------------------------------------------------------- |
|
51 |
// CPEParserSSHandler::CPEParserSSHandler |
|
52 |
// C++ default constructor can NOT contain any code, that |
|
53 |
// might leave. |
|
54 |
// ----------------------------------------------------------------------------- |
|
55 |
// |
|
56 |
CPEParserSSHandler::CPEParserSSHandler( |
|
57 |
CPEMessageHandler& aOwner, // The owner of this object. |
|
58 |
MPEPhoneModelInternal& aModel // The reference parameter of the |
|
59 |
) : iOwner( aOwner ), // phone model object which is used |
|
60 |
iModel( aModel ) // to send message to the phone app. |
|
61 |
||
62 |
{ |
|
63 |
iSupplementaryServicesCommandInfo.action = EPESSActionUnspecified; |
|
64 |
iSupplementaryServicesCommandInfo.type = EPESSTypeUnspecified; |
|
65 |
iSupplementaryServicesCommandInfo.group = RMobilePhone::EServiceUnspecified; |
|
66 |
TEFLOGSTRING( KTAOBJECT, "CPEParserSSHandler::CPEParserSSHandler" ); |
|
67 |
} |
|
68 |
||
69 |
// ----------------------------------------------------------------------------- |
|
70 |
// CPEParserSSHandler::NewL |
|
71 |
// Two-phased constructor. |
|
72 |
// ----------------------------------------------------------------------------- |
|
73 |
// |
|
74 |
CPEParserSSHandler* CPEParserSSHandler::NewL( |
|
75 |
CPEMessageHandler& aOwner, // The owner of this object. |
|
76 |
MPEPhoneModelInternal& aModel ) // The reference parameter of the phone |
|
77 |
// model object which is used to send |
|
78 |
// message to the phone application |
|
79 |
{ |
|
80 |
CPEParserSSHandler* self = new ( ELeave ) CPEParserSSHandler( aOwner, aModel ); |
|
81 |
||
82 |
TEFLOGSTRING( KTAOBJECT, "CPEParserSSHandler::NewL" ); |
|
83 |
||
84 |
return self; |
|
85 |
} //NewL |
|
86 |
||
87 |
// Destructor |
|
88 |
CPEParserSSHandler::~CPEParserSSHandler() |
|
89 |
{ |
|
90 |
delete iCli; |
|
91 |
delete iBarring; |
|
92 |
delete iWaiting; |
|
93 |
delete iSettings; |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
94 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
95 |
delete iCallDivertingHandler; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
96 |
delete iPsetWrapper; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
97 |
|
37 | 98 |
|
99 |
TEFLOGSTRING( KTAOBJECT, "CPEParserSSHandler::~CPEParserSSHandler" ); |
|
100 |
} |
|
101 |
||
102 |
// ----------------------------------------------------------------------------- |
|
103 |
// CPEParserSSHandler::GetBasicService. |
|
104 |
// Returns RMobilePhone::TMobileService type of basic service value. |
|
105 |
// ----------------------------------------------------------------------------- |
|
106 |
// |
|
107 |
RMobilePhone::TMobileService CPEParserSSHandler::BasicService( |
|
108 |
const TDesC& aBasicCode ) // It is basic service code. |
|
109 |
{ |
|
110 |
RMobilePhone::TMobileService serviceGroup( RMobilePhone::EServiceUnspecified ); |
|
111 |
||
112 |
if ( aBasicCode == KPENoServiceCode ) |
|
113 |
{ |
|
114 |
serviceGroup = RMobilePhone::EAllServices; |
|
115 |
} |
|
116 |
else if ( aBasicCode == KPEAllTeleservices ) |
|
117 |
{ |
|
118 |
serviceGroup = RMobilePhone::EAllTele; |
|
119 |
} |
|
120 |
else if ( aBasicCode == KPETelephony ) |
|
121 |
{ |
|
122 |
serviceGroup = RMobilePhone::ETelephony; |
|
123 |
} |
|
124 |
else if ( aBasicCode == KPEAllDataServices ) |
|
125 |
{ |
|
126 |
serviceGroup = RMobilePhone::EAllDataTele; |
|
127 |
} |
|
128 |
else if ( aBasicCode == KPEFacsimileServices ) |
|
129 |
{ |
|
130 |
serviceGroup = RMobilePhone::EFaxService; |
|
131 |
} |
|
132 |
else if ( aBasicCode == KPEShortMessageServices ) |
|
133 |
{ |
|
134 |
serviceGroup = RMobilePhone::EShortMessageService; |
|
135 |
} |
|
136 |
else if ( aBasicCode == KPEVoiceGroupCallService ) |
|
137 |
{ |
|
138 |
serviceGroup = RMobilePhone::EVoiceGroupCall; |
|
139 |
} |
|
140 |
else if ( aBasicCode == KPEVoiceBroadcastService ) |
|
141 |
{ |
|
142 |
serviceGroup = RMobilePhone::EVoiceBroadcast; |
|
143 |
} |
|
144 |
else if ( aBasicCode == KPEAllTeleservicesExceptSMS ) |
|
145 |
{ |
|
146 |
serviceGroup = RMobilePhone::EAllTeleExcSms; |
|
147 |
} |
|
148 |
else if ( aBasicCode == KPEAllBearerServices ) |
|
149 |
{ |
|
150 |
serviceGroup = RMobilePhone::EAllBearer; |
|
151 |
} |
|
152 |
else if ( aBasicCode == KPEAllAsyncServices ) |
|
153 |
{ |
|
154 |
serviceGroup = RMobilePhone::EAllAsync; |
|
155 |
} |
|
156 |
else if ( aBasicCode == KPEAllSyncServices ) |
|
157 |
{ |
|
158 |
serviceGroup = RMobilePhone::EAllSync; |
|
159 |
} |
|
160 |
else if ( aBasicCode == KPEAllDataCircuitSync ) |
|
161 |
{ |
|
162 |
serviceGroup = RMobilePhone::ESyncData; |
|
163 |
} |
|
164 |
else if ( aBasicCode == KPEAllDataCircuitAsync ) |
|
165 |
{ |
|
166 |
serviceGroup = RMobilePhone::EAsyncData; |
|
167 |
} |
|
168 |
// Not supported in MM ETel API, CR maded to Symbian. |
|
169 |
/* |
|
170 |
else if ( aBasicCode == KPEAllDedicatedPacketAccess ) |
|
171 |
{ |
|
172 |
serviceGroup = EPE???; |
|
173 |
} |
|
174 |
*/ |
|
175 |
else if ( aBasicCode == KPEAllDedicatedPadAccess ) |
|
176 |
{ |
|
177 |
serviceGroup = RMobilePhone::EPadAccess; |
|
178 |
} |
|
179 |
else if ( aBasicCode == KPEAllGprsBearerServices ) |
|
180 |
{ |
|
181 |
serviceGroup = RMobilePhone::EAllGprsBearer; |
|
182 |
} |
|
183 |
else if ( aBasicCode == KPEAllPlmnSpecificTeleservices ) |
|
184 |
{ |
|
185 |
serviceGroup = RMobilePhone::EAllPlmnTele; |
|
186 |
} |
|
187 |
else if ( aBasicCode == KPEPlmnSpecificTeleservice1 ) |
|
188 |
{ |
|
189 |
serviceGroup = RMobilePhone::EPlmnTele1; |
|
190 |
} |
|
191 |
else if ( aBasicCode == KPEPlmnSpecificTeleservice2 ) |
|
192 |
{ |
|
193 |
serviceGroup = RMobilePhone::EPlmnTele2; |
|
194 |
} |
|
195 |
else if ( aBasicCode == KPEPlmnSpecificTeleservice3 ) |
|
196 |
{ |
|
197 |
serviceGroup = RMobilePhone::EPlmnTele3; |
|
198 |
} |
|
199 |
else if ( aBasicCode == KPEPlmnSpecificTeleservice4 ) |
|
200 |
{ |
|
201 |
serviceGroup = RMobilePhone::EPlmnTele4; |
|
202 |
} |
|
203 |
else if ( aBasicCode == KPEPlmnSpecificTeleservice5 ) |
|
204 |
{ |
|
205 |
serviceGroup = RMobilePhone::EPlmnTele5; |
|
206 |
} |
|
207 |
else if ( aBasicCode == KPEPlmnSpecificTeleservice6 ) |
|
208 |
{ |
|
209 |
serviceGroup = RMobilePhone::EPlmnTele6; |
|
210 |
} |
|
211 |
else if ( aBasicCode == KPEPlmnSpecificTeleservice7 ) |
|
212 |
{ |
|
213 |
serviceGroup = RMobilePhone::EPlmnTele7; |
|
214 |
} |
|
215 |
else if ( aBasicCode == KPEPlmnSpecificTeleservice8 ) |
|
216 |
{ |
|
217 |
serviceGroup = RMobilePhone::EPlmnTele8; |
|
218 |
} |
|
219 |
else if ( aBasicCode == KPEPlmnSpecificTeleservice9 ) |
|
220 |
{ |
|
221 |
serviceGroup = RMobilePhone::EPlmnTele9; |
|
222 |
} |
|
223 |
else if ( aBasicCode == KPEPlmnSpecificTeleservice10 ) |
|
224 |
{ |
|
225 |
serviceGroup = RMobilePhone::EPlmnTeleA; |
|
226 |
} |
|
227 |
else if ( aBasicCode == KPEPlmnSpecificTeleservice11 ) |
|
228 |
{ |
|
229 |
serviceGroup = RMobilePhone::EPlmnTeleB; |
|
230 |
} |
|
231 |
else if ( aBasicCode == KPEPlmnSpecificTeleservice12 ) |
|
232 |
{ |
|
233 |
serviceGroup = RMobilePhone::EPlmnTeleC; |
|
234 |
} |
|
235 |
else if ( aBasicCode == KPEPlmnSpecificTeleservice13 ) |
|
236 |
{ |
|
237 |
serviceGroup = RMobilePhone::EPlmnTeleD; |
|
238 |
} |
|
239 |
else if ( aBasicCode == KPEPlmnSpecificTeleservice14 ) |
|
240 |
{ |
|
241 |
serviceGroup = RMobilePhone::EPlmnTeleE; |
|
242 |
} |
|
243 |
else if ( aBasicCode == KPEPlmnSpecificTeleservice15 ) |
|
244 |
{ |
|
245 |
serviceGroup = RMobilePhone::EPlmnTeleF; |
|
246 |
} |
|
247 |
else if ( aBasicCode == KPEAllPlmnSpecificBearerServices ) |
|
248 |
{ |
|
249 |
serviceGroup = RMobilePhone::EAllPlmnBearer; |
|
250 |
} |
|
251 |
else if ( aBasicCode == KPEPlmnSpecificBearerService1 ) |
|
252 |
{ |
|
253 |
serviceGroup = RMobilePhone::EPlmnBearerServ1; |
|
254 |
} |
|
255 |
else if ( aBasicCode == KPEPlmnSpecificBearerService2 ) |
|
256 |
{ |
|
257 |
serviceGroup = RMobilePhone::EPlmnBearerServ2; |
|
258 |
} |
|
259 |
else if ( aBasicCode == KPEPlmnSpecificBearerService3 ) |
|
260 |
{ |
|
261 |
serviceGroup = RMobilePhone::EPlmnBearerServ3; |
|
262 |
} |
|
263 |
else if ( aBasicCode == KPEPlmnSpecificBearerService4 ) |
|
264 |
{ |
|
265 |
serviceGroup = RMobilePhone::EPlmnBearerServ4; |
|
266 |
} |
|
267 |
else if ( aBasicCode == KPEPlmnSpecificBearerService5 ) |
|
268 |
{ |
|
269 |
serviceGroup = RMobilePhone::EPlmnBearerServ5; |
|
270 |
} |
|
271 |
else if ( aBasicCode == KPEPlmnSpecificBearerService6 ) |
|
272 |
{ |
|
273 |
serviceGroup = RMobilePhone::EPlmnBearerServ6; |
|
274 |
} |
|
275 |
else if ( aBasicCode == KPEPlmnSpecificBearerService7 ) |
|
276 |
{ |
|
277 |
serviceGroup = RMobilePhone::EPlmnBearerServ7; |
|
278 |
} |
|
279 |
else if ( aBasicCode == KPEPlmnSpecificBearerService8 ) |
|
280 |
{ |
|
281 |
serviceGroup = RMobilePhone::EPlmnBearerServ8; |
|
282 |
} |
|
283 |
else if ( aBasicCode == KPEPlmnSpecificBearerService9 ) |
|
284 |
{ |
|
285 |
serviceGroup = RMobilePhone::EPlmnBearerServ9; |
|
286 |
} |
|
287 |
else if ( aBasicCode == KPEPlmnSpecificBearerService10 ) |
|
288 |
{ |
|
289 |
serviceGroup = RMobilePhone::EPlmnBearerServA; |
|
290 |
} |
|
291 |
else if ( aBasicCode == KPEPlmnSpecificBearerService11 ) |
|
292 |
{ |
|
293 |
serviceGroup = RMobilePhone::EPlmnBearerServB; |
|
294 |
} |
|
295 |
else if ( aBasicCode == KPEPlmnSpecificBearerService12 ) |
|
296 |
{ |
|
297 |
serviceGroup = RMobilePhone::EPlmnBearerServC; |
|
298 |
} |
|
299 |
else if ( aBasicCode == KPEPlmnSpecificBearerService13 ) |
|
300 |
{ |
|
301 |
serviceGroup = RMobilePhone::EPlmnBearerServD; |
|
302 |
} |
|
303 |
else if ( aBasicCode == KPEPlmnSpecificBearerService14 ) |
|
304 |
{ |
|
305 |
serviceGroup = RMobilePhone::EPlmnBearerServE; |
|
306 |
} |
|
307 |
else if ( aBasicCode == KPEPlmnSpecificBearerService15 ) |
|
308 |
{ |
|
309 |
serviceGroup = RMobilePhone::EPlmnBearerServF; |
|
310 |
} |
|
311 |
else if ( aBasicCode == KPEAuxVoiceService ) |
|
312 |
{ |
|
313 |
serviceGroup = RMobilePhone::EAuxVoiceService; |
|
314 |
} |
|
315 |
else |
|
316 |
{ |
|
317 |
TEFLOGSTRING( KTAINT, "PE CPEParserSSHandler::BasicService: Unspecified Service code "); |
|
318 |
} |
|
319 |
iOwner.SetBasicServiceGroup( serviceGroup ); |
|
320 |
return serviceGroup; |
|
321 |
} |
|
322 |
||
323 |
// ----------------------------------------------------------------------------- |
|
324 |
// CPEParserSSHandler::Cancel |
|
325 |
// Method cancel command from Settings utility subsystem or security module. |
|
326 |
// Security module don't have return value from cancel command. |
|
327 |
// ----------------------------------------------------------------------------- |
|
328 |
// |
|
329 |
TInt CPEParserSSHandler::Cancel() |
|
330 |
{ |
|
331 |
// request cancellation is taken care of mainly in |
|
332 |
// the actual ss-objects. They are also able to handle |
|
333 |
// situation, where there is no ongoing request. |
|
334 |
TInt returnValue( ECCPErrorNone ); |
|
335 |
if ( iWaiting ) |
|
336 |
{ |
|
337 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::Cancel() > iWaiting->CancelProcess()" ); |
|
338 |
iWaiting->CancelProcess(); |
|
339 |
} |
|
340 |
else if ( iBarring ) |
|
341 |
{ |
|
342 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::Cancel() > iBarring->CancelCurrentRequest()" ); |
|
343 |
iBarring->CancelCurrentRequest(); |
|
344 |
} |
|
345 |
else if ( iDivert ) |
|
346 |
{ |
|
347 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::Cancel() > iDivert->CancelCurrentRequest()" ); |
|
348 |
iDivert->CancelCurrentRequest(); |
|
349 |
} |
|
350 |
else if ( iCli ) |
|
351 |
{ |
|
352 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::Cancel() > iCli->CancelAll()" ); |
|
353 |
iCli->CancelAll(); |
|
354 |
} |
|
355 |
else |
|
356 |
{ |
|
357 |
TEFLOGSTRING( KTAERROR, "PE CPEParserSSHandler::Cancel() ! Not Found" ); |
|
358 |
returnValue = ECCPErrorNotFound; |
|
359 |
} |
|
360 |
||
361 |
return returnValue; |
|
362 |
} |
|
363 |
||
364 |
// ----------------------------------------------------------------------------- |
|
365 |
// CPEParserSSHandler::ProcessBarringL |
|
366 |
// Process barring procedures |
|
367 |
// ----------------------------------------------------------------------------- |
|
368 |
// |
|
369 |
void CPEParserSSHandler::ProcessBarringL( |
|
370 |
TAction aAction, // It is action |
|
371 |
TBarringProcedure aBarring, // It contains barring procedure. |
|
372 |
const TDesC& aPassword, // It should be barring password, if required. |
|
373 |
const TDesC& aBasicCode ) // It is basic service code. |
|
374 |
{ |
|
375 |
TEFLOGSTRING( KTAINT, |
|
376 |
"PE CPEParserSSHandler::ProcessBarringL: Start" ); |
|
377 |
// Notify Phone Application that an SS string was identified |
|
378 |
// and is about to be processed. This procedure is needed to quarantee |
|
379 |
// that an incoming call will not be blocked by the confirmation dialog |
|
380 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuingSSRequest ); |
|
381 |
||
382 |
// convert into bsc |
|
383 |
TBasicServiceGroups bsc = ChangeToBsc( aBasicCode ); |
|
384 |
// Basic service group for S90 UI... |
|
385 |
RMobilePhone::TMobileService serviceGroup = BasicService( aBasicCode ); |
|
386 |
iSupplementaryServicesCommandInfo.group = serviceGroup; |
|
387 |
||
388 |
// connect to ss engine |
|
389 |
CreateCBObsL(); |
|
390 |
TCallBarringSetting setBarring; |
|
391 |
// set basic service group to be used in line init. |
|
392 |
setBarring.iServiceGroup = EServiceGroupVoice; |
|
393 |
// copy the password |
|
394 |
setBarring.iPassword = aPassword; |
|
395 |
// chooses the right barring program |
|
396 |
switch( aBarring ) |
|
397 |
{ |
|
398 |
case EBarringAllOutgoingCalls: |
|
399 |
setBarring.iType = EBarringTypeAllOutgoing; |
|
400 |
iSupplementaryServicesCommandInfo.type = EPECallBarringAllOutgoing; |
|
401 |
break; |
|
402 |
case EBarringAllOutgoingInternationalCalls: |
|
403 |
setBarring.iType = EBarringTypeOutgoingInternational; |
|
404 |
iSupplementaryServicesCommandInfo.type = EPECallBarringAllOutgoingInternational; |
|
405 |
break; |
|
406 |
case EBarringAllOutgoingInternationalCallsExceptHome: |
|
407 |
setBarring.iType = |
|
408 |
EBarringTypeOutgoingInternationalExceptToHomeCountry; |
|
409 |
iSupplementaryServicesCommandInfo.type = EPECallBarringAllOutgoingInternationalExcHome; |
|
410 |
break; |
|
411 |
case EBarringAllIncomingCalls: |
|
412 |
setBarring.iType = EBarringTypeAllIncoming; |
|
413 |
iSupplementaryServicesCommandInfo.type = EPECallBarringAllIncoming; |
|
414 |
break; |
|
415 |
case EBarringAllIncomingCallsWhenRoaming: |
|
416 |
setBarring.iType = EBarringTypeIncomingWhenRoaming; |
|
417 |
iSupplementaryServicesCommandInfo.type = EPECallBarringAllIncomingWhenRoaming; |
|
418 |
break; |
|
419 |
case EBarringAllServices: |
|
420 |
setBarring.iType = EBarringTypeAllServices; |
|
421 |
iSupplementaryServicesCommandInfo.type = EPECallBarringAllServices; |
|
422 |
break; |
|
423 |
case EBarringAllOutgoingServices: |
|
424 |
setBarring.iType = EBarringTypeAllOutgoingServices; |
|
425 |
iSupplementaryServicesCommandInfo.type = EPECallBarringAllOutgoingServices; |
|
426 |
break; |
|
427 |
case EBarringAllIncomingServices: |
|
428 |
setBarring.iType = EBarringTypeAllIncomingServices; |
|
429 |
iSupplementaryServicesCommandInfo.type = EPECallBarringAllIncomingServices; |
|
430 |
break; |
|
431 |
default: |
|
432 |
break; |
|
433 |
} |
|
434 |
// right function of the iBarring is called according to aAction |
|
435 |
switch( aAction ) |
|
436 |
{ |
|
437 |
case EActivate: |
|
438 |
setBarring.iSetting = EActivateBarring; |
|
439 |
iSupplementaryServicesCommandInfo.action = EPESSActivation; |
|
65 | 440 |
//iBarring->SetBarringL( setBarring, bsc ); |
441 |
//iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
442 |
//iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
37 | 443 |
break; |
444 |
case EDeactivate: |
|
445 |
setBarring.iSetting = ECancelBarring; |
|
446 |
iSupplementaryServicesCommandInfo.action = EPESSDeactivation; |
|
65 | 447 |
//iBarring->SetBarringL( setBarring, bsc ); |
448 |
//iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
449 |
//iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
37 | 450 |
break; |
451 |
case EInterrogate: |
|
452 |
iSupplementaryServicesCommandInfo.action = EPESSInterrogation; |
|
65 | 453 |
//iBarring->GetBarringStatusL( EServiceGroupVoice, setBarring.iType ); |
454 |
//iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
455 |
//iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
37 | 456 |
break; |
457 |
case ERegister: |
|
458 |
case EErase: |
|
459 |
default: |
|
460 |
iSupplementaryServicesCommandInfo.action = EPESSActionUnspecified; |
|
461 |
iModel.SendMessage( MEngineMonitor::EPEMessageSSRequestFailed ); |
|
462 |
break; |
|
463 |
} |
|
464 |
TEFLOGSTRING( KTAINT, |
|
465 |
"PE CPEParserSSHandler::ProcessBarringL: End" ); |
|
466 |
} |
|
467 |
||
468 |
// ----------------------------------------------------------------------------- |
|
469 |
// CPEParserSSHandler::ProcessClipStatusL. |
|
470 |
// Process calling line identification presentation status. |
|
471 |
// ----------------------------------------------------------------------------- |
|
472 |
// |
|
473 |
void CPEParserSSHandler::ProcessClipStatusL() |
|
474 |
{ |
|
475 |
TEFLOGSTRING( KTAINT, |
|
476 |
"PE CPEParserSSHandler::ProcessBarringL: Start" ); |
|
477 |
// Notify Phone Application that an SS string was identified |
|
478 |
// and is about to be processed. This procedure is needed to quarantee |
|
479 |
// that an incoming call will not be blocked by the confirmation dialog |
|
480 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuingSSRequest ); |
|
481 |
||
482 |
CreateCliObsL(); |
|
483 |
iCli->GetClipModeL(); |
|
484 |
||
485 |
iSupplementaryServicesCommandInfo.type = EPEClip; |
|
486 |
iSupplementaryServicesCommandInfo.action = EPESSInterrogation; |
|
487 |
iSupplementaryServicesCommandInfo.group = RMobilePhone::EServiceUnspecified; |
|
488 |
iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
489 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
490 |
||
491 |
TEFLOGSTRING( KTAINT, |
|
492 |
"PE CPEParserSSHandler::ProcessBarringL: End" ); |
|
493 |
} |
|
494 |
||
495 |
// ----------------------------------------------------------------------------- |
|
496 |
// CPEParserSSHandler::ProcessClirStatusL |
|
497 |
// Process connected line presentation status. |
|
498 |
// ----------------------------------------------------------------------------- |
|
499 |
// |
|
500 |
void CPEParserSSHandler::ProcessClirStatusL() |
|
501 |
{ |
|
502 |
TEFLOGSTRING( KTAINT, |
|
503 |
"PE CPEParserSSHandler::ProcessClirStatusL: Start" ); |
|
504 |
// Notify Phone Application that an SS string was identified |
|
505 |
// and is about to be processed. This procedure is needed to quarantee |
|
506 |
// that an incoming call will not be blocked by the confirmation dialog |
|
507 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuingSSRequest ); |
|
508 |
||
509 |
CreateCliObsL(); |
|
510 |
iCli->GetClirModeL(); |
|
511 |
||
512 |
iSupplementaryServicesCommandInfo.type = EPEClir; |
|
513 |
iSupplementaryServicesCommandInfo.action = EPESSInterrogation; |
|
514 |
iSupplementaryServicesCommandInfo.group = RMobilePhone::EServiceUnspecified; |
|
515 |
iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
516 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
517 |
TEFLOGSTRING( KTAINT, |
|
518 |
"PE CPEParserSSHandler::ProcessClirStatusL: End" ); |
|
519 |
} |
|
520 |
||
521 |
// ----------------------------------------------------------------------------- |
|
522 |
// CPEParserSSHandler::ProcessCnapStatusL |
|
523 |
// Process Calling Name Presentation (CNAP) status check. |
|
524 |
// ----------------------------------------------------------------------------- |
|
525 |
// |
|
526 |
void CPEParserSSHandler::ProcessCnapStatusL() |
|
527 |
{ |
|
528 |
TEFLOGSTRING( KTAINT, |
|
529 |
"PE CPEParserSSHandler::ProcessCnapStatusL: Start" ); |
|
530 |
if ( FeatureManager::FeatureSupported( KFeatureIdPhoneCnap ) ) |
|
531 |
{ |
|
532 |
// Notify Phone Application that an SS string was identified |
|
533 |
// and is about to be processed. This procedure is needed to quarantee |
|
534 |
// that an incoming call will not be blocked by the confirmation dialog |
|
535 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuingSSRequest ); |
|
536 |
||
537 |
CreateCliObsL(); |
|
538 |
iCli->GetCnapL(); |
|
539 |
||
540 |
iSupplementaryServicesCommandInfo.type = EPECnap; |
|
541 |
iSupplementaryServicesCommandInfo.action = EPESSInterrogation; |
|
542 |
iSupplementaryServicesCommandInfo.group = RMobilePhone::EServiceUnspecified; |
|
543 |
iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
544 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
545 |
} |
|
546 |
else |
|
547 |
{ |
|
548 |
iOwner.SetGsmParserErrorCode( ECCPErrorNotSupported ); |
|
549 |
} |
|
550 |
TEFLOGSTRING( KTAINT, |
|
551 |
"PE CPEParserSSHandler::ProcessCnapStatusL: End" ); |
|
552 |
} |
|
553 |
||
554 |
// ----------------------------------------------------------------------------- |
|
555 |
// CPEParserSSHandler::ProcessColpStatusL |
|
556 |
// Process connected line presentation status. |
|
557 |
// ----------------------------------------------------------------------------- |
|
558 |
// |
|
559 |
void CPEParserSSHandler::ProcessColpStatusL() |
|
560 |
{ |
|
561 |
TEFLOGSTRING( KTAINT, |
|
562 |
"PE CPEParserSSHandler::ProcessColpStatusL: Start" ); |
|
563 |
// Notify Phone Application that an SS string was identified |
|
564 |
// and is about to be processed. This procedure is needed to quarantee |
|
565 |
// that an incoming call will not be blocked by the confirmation dialog |
|
566 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuingSSRequest ); |
|
567 |
||
568 |
CreateCliObsL(); |
|
569 |
iCli->GetColpModeL(); |
|
570 |
||
571 |
iSupplementaryServicesCommandInfo.type = EPEColp; |
|
572 |
iSupplementaryServicesCommandInfo.action = EPESSInterrogation; |
|
573 |
iSupplementaryServicesCommandInfo.group = RMobilePhone::EServiceUnspecified; |
|
574 |
iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
575 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
576 |
||
577 |
TEFLOGSTRING( KTAINT, |
|
578 |
"PE CPEParserSSHandler::ProcessColpStatusL: End" ); |
|
579 |
} |
|
580 |
||
581 |
// ----------------------------------------------------------------------------- |
|
582 |
// CPEParserSSHandler::ProcessColrStatusL |
|
583 |
// Process connected line restriction status. |
|
584 |
// ----------------------------------------------------------------------------- |
|
585 |
// |
|
586 |
void CPEParserSSHandler::ProcessColrStatusL() |
|
587 |
{ |
|
588 |
TEFLOGSTRING( KTAINT, |
|
589 |
"PE CPEParserSSHandler::ProcessColrStatusL: Start" ); |
|
590 |
// Notify Phone Application that an SS string was identified |
|
591 |
// and is about to be processed. This procedure is needed to quarantee |
|
592 |
// that an incoming call will not be blocked by the confirmation dialog |
|
593 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuingSSRequest ); |
|
594 |
||
595 |
CreateCliObsL(); |
|
596 |
iCli->GetColrModeL(); |
|
597 |
||
598 |
iSupplementaryServicesCommandInfo.type = EPEColr; |
|
599 |
iSupplementaryServicesCommandInfo.action = EPESSInterrogation; |
|
600 |
iSupplementaryServicesCommandInfo.group = RMobilePhone::EServiceUnspecified; |
|
601 |
iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
602 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
603 |
TEFLOGSTRING( KTAINT, |
|
604 |
"PE CPEParserSSHandler::ProcessColrStatusL: End" ); |
|
605 |
} |
|
606 |
||
607 |
// ----------------------------------------------------------------------------- |
|
608 |
// CPEParserSSHandler::ProcessEmlppL |
|
609 |
// Process enhanced Multi-Level Precedence and Pre-emption (eMLPP). |
|
610 |
// ----------------------------------------------------------------------------- |
|
611 |
// |
|
612 |
void CPEParserSSHandler::ProcessEmlppL( |
|
613 |
TAction /*aAction*/, // It as action. |
|
614 |
const TDesC& /*aNumber*/, // It is directory number. |
|
615 |
const TInt ) /*aServiceCode*/ // It is service code. |
|
616 |
{ |
|
617 |
TEFLOGSTRING( KTAINT, |
|
618 |
"PE CPEParserSSHandler::ProcessEmlppL: " ); |
|
619 |
//This feature is not supported. |
|
620 |
iOwner.SetGsmParserErrorCode( ECCPErrorNotSupported ); |
|
621 |
} |
|
622 |
||
623 |
// ----------------------------------------------------------------------------- |
|
624 |
// CPEParserSSHandler::ProcessForwardingL |
|
625 |
// If a parameter is not allowed for a procedure,then it is empty. If a |
|
626 |
// parameter is not explicitly given, then it is empty. If a parameter is |
|
627 |
// present, then it can be assumed to contain appropriate values. |
|
628 |
// ----------------------------------------------------------------------------- |
|
629 |
// |
|
630 |
void CPEParserSSHandler::ProcessForwardingL( |
|
631 |
TAction aAction, // It is action |
|
632 |
TForwardingProcedure aForwarding, // It contains forwarding procedure. |
|
633 |
const TDesC& aNumber, // It is directory number. |
|
634 |
const TDesC& aBasicCode, // It is basic service code. |
|
635 |
const TDesC& aTimer ) // It is timer. |
|
636 |
{ |
|
637 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::ProcessForwardingL: Start" ); |
|
638 |
||
639 |
// Notify Phone Application that an SS string was identified |
|
640 |
// and is about to be processed. This procedure is needed to quarantee |
|
641 |
// that an incoming call will not be blocked by the confirmation dialog |
|
642 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuingSSRequest ); |
|
643 |
||
644 |
// connect to ss engine |
|
645 |
CreateCFObsL(); |
|
646 |
||
647 |
RMobilePhone::TMobileService serviceGroup = BasicService( aBasicCode ); |
|
648 |
iSupplementaryServicesCommandInfo.group = serviceGroup; |
|
649 |
||
650 |
TCallDivertSetting setDivert; |
|
651 |
// forwarded-to number copied |
|
652 |
if ( aNumber.Length() > KPsetPhoneNumberLength ) |
|
653 |
{ |
|
654 |
User::Leave( KErrArgument ); |
|
655 |
} |
|
656 |
setDivert.iNumber.Copy( aNumber ); |
|
657 |
// default basic service group used for line initialization is set |
|
658 |
setDivert.iServiceGroup = EServiceGroupData; |
|
659 |
||
660 |
// convert into bsc |
|
661 |
TBasicServiceGroups bsc = ChangeToBsc( aBasicCode ); |
|
662 |
// to get the divert indicator correctly |
|
663 |
// (needed when voice is concerned) |
|
664 |
if ( bsc == EAllTeleAndBearer || |
|
665 |
bsc == EAllTele || |
|
666 |
bsc == ETelephony || |
|
667 |
bsc == EAllTeleExcSms || |
|
668 |
bsc == EAltTele ) |
|
669 |
{ |
|
670 |
setDivert.iServiceGroup = EServiceGroupVoice; |
|
671 |
} |
|
672 |
||
673 |
// status initialized |
|
674 |
setDivert.iStatus = EDivertingStatusUnknown; |
|
675 |
setDivert.iNoReplyTimer = 0; |
|
676 |
||
677 |
// chooses the correct forwarding program |
|
678 |
||
679 |
switch ( aForwarding ) |
|
680 |
{ |
|
681 |
case EForwardingNotReachable: |
|
682 |
setDivert.iCondition = EDivertConditionNotReachable; |
|
683 |
iSupplementaryServicesCommandInfo.type = EPECallForwardingNotReachable; |
|
684 |
break; |
|
685 |
case EForwardingNoReply: |
|
686 |
{ |
|
687 |
// set the timer in case of timer concerned function call |
|
688 |
if ( aTimer.Length() != 0 ) |
|
689 |
{ |
|
690 |
TLex input( aTimer ); |
|
691 |
User::LeaveIfError( input.Val( setDivert.iNoReplyTimer ) ); |
|
692 |
} |
|
693 |
else |
|
694 |
{ |
|
695 |
setDivert.iNoReplyTimer = iDivert->GetTimerValueL(); |
|
696 |
} |
|
697 |
setDivert.iCondition = EDivertConditionNoReply; |
|
698 |
iSupplementaryServicesCommandInfo.type = EPECallForwardingNoReply; |
|
699 |
break; |
|
700 |
} |
|
701 |
case EForwardingBusy: |
|
702 |
setDivert.iCondition = EDivertConditionBusy; |
|
703 |
iSupplementaryServicesCommandInfo.type = EPECallForwardingBusy; |
|
704 |
break; |
|
705 |
case EForwardingUnconditional: |
|
706 |
setDivert.iCondition = EDivertConditionUnconditional; |
|
707 |
iSupplementaryServicesCommandInfo.type = EPECallForwardingUnconditional; |
|
708 |
break; |
|
709 |
case EForwardingAll: |
|
710 |
setDivert.iCondition = EDivertConditionAllCalls; |
|
711 |
iSupplementaryServicesCommandInfo.type = EPECallForwardingAll; |
|
712 |
break; |
|
713 |
case EForwardingAllConditional: |
|
714 |
setDivert.iCondition = EDivertConditionAllConditionalCases; |
|
715 |
iSupplementaryServicesCommandInfo.type = EPECallForwardingAllConditional; |
|
716 |
break; |
|
717 |
default: |
|
718 |
break; |
|
719 |
} |
|
720 |
// right function chosen from iDivert according to aAction |
|
721 |
switch( aAction ) |
|
722 |
{ |
|
723 |
case EActivate: |
|
724 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::ProcessForwardingL EActivate" ); |
|
725 |
setDivert.iSetting = EActivateDiverting; |
|
726 |
iDivert->SetDivertingL( setDivert, bsc ); |
|
727 |
iSupplementaryServicesCommandInfo.action = EPESSActivation; |
|
728 |
iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
729 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
730 |
break; |
|
731 |
case EDeactivate: |
|
732 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::ProcessForwardingL EDeactivate" ); |
|
733 |
setDivert.iSetting = ECancelDiverting; |
|
734 |
iDivert->SetDivertingL( setDivert, bsc ); |
|
735 |
iSupplementaryServicesCommandInfo.action = EPESSDeactivation; |
|
736 |
iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
737 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
738 |
break; |
|
739 |
case EInterrogate: |
|
740 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::ProcessForwardingL EInterrogate" ); |
|
741 |
iDivert->GetDivertingStatusL( EServiceGroupVoice, |
|
742 |
setDivert.iCondition, bsc ); |
|
743 |
iSupplementaryServicesCommandInfo.action = EPESSInterrogation; |
|
744 |
iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
745 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
746 |
break; |
|
747 |
case ERegister: |
|
748 |
setDivert.iSetting = ERegisterDiverting; |
|
749 |
iDivert->SetDivertingL( setDivert, bsc ); |
|
750 |
iSupplementaryServicesCommandInfo.action = EPESSRegistration; |
|
751 |
iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
752 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
753 |
break; |
|
754 |
case EErase: |
|
755 |
setDivert.iSetting = EEraseDiverting; |
|
756 |
iDivert->SetDivertingL( setDivert, bsc ); |
|
757 |
iSupplementaryServicesCommandInfo.action = EPESSErasure; |
|
758 |
iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
759 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
760 |
break; |
|
761 |
default: |
|
762 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::ProcessForwardingL default FAIL" ); |
|
763 |
iSupplementaryServicesCommandInfo.action = EPESSActionUnspecified; |
|
764 |
iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
765 |
iModel.SendMessage( MEngineMonitor::EPEMessageSSRequestFailed ); |
|
766 |
break; |
|
767 |
} |
|
768 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::ProcessForwardingL: End" ); |
|
769 |
} |
|
770 |
||
771 |
// ----------------------------------------------------------------------------- |
|
772 |
// CPEParserSSHandler::ProcessMspL |
|
773 |
// Process Multiple Subscriber Profile (MSP). |
|
774 |
// ----------------------------------------------------------------------------- |
|
775 |
// |
|
776 |
void CPEParserSSHandler::ProcessMspL( |
|
777 |
TAction /*aAction*/, // It is action. |
|
778 |
const TDesC& /*aNumber*/, // It is directory number. |
|
779 |
const TInt ) /*aServiceCode*/ // It is service code. |
|
780 |
{ |
|
781 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::ProcessMspL" ); |
|
782 |
//This feature is not supported. |
|
783 |
iOwner.SetGsmParserErrorCode( ECCPErrorNotSupported ); |
|
784 |
} |
|
785 |
||
786 |
// ----------------------------------------------------------------------------- |
|
787 |
// CPEParserSSHandler::ProcessPasswordChange |
|
788 |
// Process password change. |
|
789 |
// ----------------------------------------------------------------------------- |
|
790 |
// |
|
791 |
void CPEParserSSHandler::ProcessPasswordChangeL |
|
792 |
( |
|
793 |
TPasswordProcedure aPassword, // It is password procedure. |
|
794 |
const TDesC& aOldPassword, // It should be old password. |
|
795 |
const TDesC& aNewPassword, |
|
796 |
const TDesC& aVerifyNewPassword ) |
|
797 |
{ |
|
798 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::ProcessPasswordChangeL: Start" ); |
|
799 |
// Notify Phone Application that an SS string was identified |
|
800 |
// and is about to be processed. This procedure is needed to quarantee |
|
801 |
// that an incoming call will not be blocked by the confirmation dialog |
|
802 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuingSSRequest ); |
|
803 |
||
804 |
CreateCBObsL(); |
|
805 |
||
806 |
if ( aPassword == EPasswordBarring ) |
|
807 |
{ |
|
808 |
RMobilePhone::TMobilePhonePasswordChangeV2 password; |
|
809 |
CopyL( password.iOldPassword, aOldPassword ); |
|
810 |
CopyL( password.iNewPassword, aNewPassword ); |
|
811 |
CopyL( password.iVerifiedPassword, aVerifyNewPassword ); |
|
812 |
iBarring->ChangePasswordL( password, ETrue ); |
|
813 |
iSupplementaryServicesCommandInfo.type = EPECallBarringPassword; |
|
814 |
} |
|
815 |
else |
|
816 |
{ |
|
817 |
RMobilePhone::TMobilePhonePasswordChangeV2 password; |
|
818 |
CopyL( password.iOldPassword, aOldPassword ); |
|
819 |
CopyL( password.iNewPassword, aNewPassword ); |
|
820 |
CopyL( password.iVerifiedPassword, aVerifyNewPassword ); |
|
821 |
iBarring->ChangePasswordL( password, EFalse ); |
|
822 |
iSupplementaryServicesCommandInfo.type = EPESSTypeUnspecified; |
|
823 |
} |
|
824 |
||
825 |
iSupplementaryServicesCommandInfo.action = EPEPasswordOperation; |
|
826 |
iSupplementaryServicesCommandInfo.group = RMobilePhone::EServiceUnspecified; |
|
827 |
iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
828 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
829 |
||
830 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::ProcessPasswordChangeL: End" ); |
|
831 |
} |
|
832 |
||
833 |
// ----------------------------------------------------------------------------- |
|
834 |
// CPEParserSSHandler::ProcessSpnpL |
|
835 |
// Process Support for Private Numbering Plan (SPNP). |
|
836 |
// ----------------------------------------------------------------------------- |
|
837 |
// |
|
838 |
void CPEParserSSHandler::ProcessSpnpL( |
|
839 |
TAction /*aAction*/, // It is action. |
|
840 |
const TInt ) /*aServiceCode*/ // It is service code. |
|
841 |
{ |
|
842 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::ProcessSpnpL" ); |
|
843 |
//This feature is not supported. |
|
844 |
iOwner.SetGsmParserErrorCode( ECCPErrorNotSupported ); |
|
845 |
} |
|
846 |
||
847 |
// ----------------------------------------------------------------------------- |
|
848 |
// CPEParserSSHandler::ProcessWaitingL |
|
849 |
// Process waiting. |
|
850 |
// ----------------------------------------------------------------------------- |
|
851 |
// |
|
852 |
void CPEParserSSHandler::ProcessWaitingL( |
|
853 |
TAction aAction, // It is action. |
|
854 |
const TDesC& aBasicCode ) // It is basic service code. |
|
855 |
{ |
|
856 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::ProcessWaitingL: Start" ); |
|
857 |
// Notify Phone Application that an SS string was identified |
|
858 |
// and is about to be processed. This procedure is needed to quarantee |
|
859 |
// that an incoming call will not be blocked by the confirmation dialog |
|
860 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuingSSRequest ); |
|
861 |
||
862 |
// changes aBasicCode to basic service group |
|
863 |
TBasicServiceGroups bsc = ChangeToBsc( aBasicCode ); |
|
864 |
// Basic service group for S90 UI... |
|
865 |
RMobilePhone::TMobileService serviceGroup = BasicService( aBasicCode ); |
|
866 |
iSupplementaryServicesCommandInfo.group = serviceGroup; |
|
867 |
iSupplementaryServicesCommandInfo.type = EPECallWaiting; |
|
868 |
// connects to ss engine |
|
869 |
CreateCWObsL(); |
|
870 |
switch( aAction ) |
|
871 |
{ |
|
872 |
case EActivate: |
|
873 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::ProcessWaitingL EActivate" ); |
|
874 |
iWaiting->SetCallWaitingL( |
|
875 |
MPsetCallWaiting::EActivateCallWaiting, |
|
876 |
bsc ); |
|
877 |
iSupplementaryServicesCommandInfo.action = EPESSActivation; |
|
878 |
iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
879 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
880 |
break; |
|
881 |
case EDeactivate: |
|
882 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::ProcessWaitingL EDeactivate" ); |
|
883 |
iWaiting->SetCallWaitingL( |
|
884 |
MPsetCallWaiting::EDeactivateCallWaiting, |
|
885 |
bsc ); |
|
886 |
iSupplementaryServicesCommandInfo.action = EPESSDeactivation; |
|
887 |
iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
888 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
889 |
break; |
|
890 |
case EInterrogate: |
|
891 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::ProcessWaitingL EInterrogate" ); |
|
892 |
iWaiting->GetCallWaitingStatusL(); |
|
893 |
iSupplementaryServicesCommandInfo.action = EPESSInterrogation; |
|
894 |
iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
895 |
iModel.SendMessage( MEngineMonitor::EPEMessageIssuedSSRequest ); |
|
896 |
break; |
|
897 |
case ERegister: |
|
898 |
case EErase: |
|
899 |
default: |
|
900 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::ProcessWaitingL default" ); |
|
901 |
iSupplementaryServicesCommandInfo.action = EPESSActionUnspecified; |
|
902 |
iModel.DataStore()->SetSSCommandInfo( iSupplementaryServicesCommandInfo ); |
|
903 |
iModel.SendMessage( MEngineMonitor::EPEMessageSSRequestFailed ); |
|
904 |
break; |
|
905 |
} |
|
906 |
TEFLOGSTRING( KTAMESINT, "PE CPEParserSSHandler::ProcessWaitingL: End" ); |
|
907 |
} |
|
908 |
||
909 |
// ----------------------------------------------------------------------------- |
|
910 |
// CPEParserSSHandler::ChangeToBsc |
|
911 |
// ----------------------------------------------------------------------------- |
|
912 |
// |
|
913 |
TBasicServiceGroups CPEParserSSHandler::ChangeToBsc( |
|
914 |
const TDesC& aBasicCode ) |
|
915 |
{ |
|
916 |
//null values must be handled as well, length == 0 |
|
917 |
if ( aBasicCode.Length() == 0 ) |
|
918 |
{ |
|
919 |
return EAllTeleAndBearer; |
|
920 |
} |
|
921 |
TInt value( 0 ); |
|
922 |
TLex input( aBasicCode ); |
|
923 |
TInt error = input.Val( value ); |
|
924 |
__ASSERT_ALWAYS( error > -1, |
|
925 |
User::Panic( KPEPhoneEnginePanic, EPEPanicStupidUser ) ); |
|
926 |
TBasicServiceGroups returnValue = EAllTeleAndBearer; |
|
927 |
if ( (EAllTele <= value && value <= EFax) || |
|
928 |
(ESms <= value && value <= EAllSync) || |
|
929 |
(ESyncData <= value && value <= EPadAccess) || |
|
930 |
(EAllPlmnTele <= value && value <= EPlmnTeleF) || |
|
931 |
(EAllPlmnBearer <= value && value <= EPlmnBearerServF) || |
|
932 |
value == EAltTele || |
|
933 |
value == KPEDefinedBasicServiceGroup ) |
|
934 |
{ |
|
935 |
returnValue = ( TBasicServiceGroups ) value; |
|
936 |
} |
|
937 |
else |
|
938 |
{ |
|
939 |
User::Panic( KPEPhoneEnginePanic, EPEPanicStupidUser ); |
|
940 |
} |
|
941 |
return returnValue; |
|
942 |
} |
|
943 |
||
944 |
// ----------------------------------------------------------------------------- |
|
945 |
// CPEParserSSHandler::ConnectToSsEngineL |
|
946 |
// ----------------------------------------------------------------------------- |
|
947 |
// |
|
948 |
void CPEParserSSHandler::ConnectToSsEngineL() |
|
949 |
{ |
|
950 |
if ( iSettings ) |
|
951 |
{ |
|
952 |
return; |
|
953 |
} |
|
954 |
CleanupStack::PushL( TCleanupItem( DoClean, this ) ); |
|
955 |
||
956 |
//creates the containers |
|
957 |
iSettings = CPsetContainer::NewL(); |
|
958 |
||
959 |
CleanupStack::Pop( this ); |
|
960 |
} |
|
961 |
||
962 |
// ----------------------------------------------------------------------------- |
|
963 |
// CPEParserSSHandler::CreateCWObsL |
|
964 |
// ----------------------------------------------------------------------------- |
|
965 |
// |
|
966 |
void CPEParserSSHandler::CreateCWObsL() |
|
967 |
{ |
|
968 |
ConnectToSsEngineL(); |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
969 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
970 |
if ( !iPsetWrapper ) |
37 | 971 |
{ |
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
972 |
iPsetWrapper = new PSetWrapper; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
973 |
iCallWaitingWrapper = &iPsetWrapper->callWaitingWrapper(); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
974 |
iCallWaitingHandler = new PsUiWaitingNoteHandler(*iCallWaitingWrapper); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
975 |
iWaiting = &iCallWaitingWrapper->getCPsetCallWaiting(); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
976 |
iWaiting->SetRequestObserver(this); |
37 | 977 |
} |
978 |
} |
|
979 |
||
980 |
// ----------------------------------------------------------------------------- |
|
981 |
// CPEParserSSHandler::CreateCBObsL |
|
982 |
// ----------------------------------------------------------------------------- |
|
983 |
// |
|
984 |
void CPEParserSSHandler::CreateCBObsL() |
|
985 |
{ |
|
986 |
ConnectToSsEngineL(); |
|
987 |
} |
|
988 |
||
989 |
// ----------------------------------------------------------------------------- |
|
990 |
// CPEParserSSHandler::CreateCFObsL |
|
991 |
// ----------------------------------------------------------------------------- |
|
992 |
// |
|
993 |
void CPEParserSSHandler::CreateCFObsL() |
|
994 |
{ |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
995 |
if ( !iPsetWrapper ) |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
996 |
{ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
997 |
iPsetWrapper = new PSetWrapper; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
998 |
iCallDivertingWrapper = &iPsetWrapper->callDivertingWrapper(); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
999 |
iCallDivertingHandler = new PsUiDivertNoteHandler(*iCallDivertingWrapper); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1000 |
iDivert = &iCallDivertingWrapper->getCPsetCallDiverting(); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1001 |
iDivert->SetRequestObserver(this); |
37 | 1002 |
} |
1003 |
} |
|
1004 |
||
1005 |
// ----------------------------------------------------------------------------- |
|
1006 |
// CPEParserSSHandler::CreateCliObsL |
|
1007 |
// ----------------------------------------------------------------------------- |
|
1008 |
// |
|
1009 |
void CPEParserSSHandler::CreateCliObsL() |
|
1010 |
{ |
|
1011 |
ConnectToSsEngineL(); |
|
1012 |
} |
|
1013 |
||
1014 |
// ----------------------------------------------------------------------------- |
|
1015 |
// CPEParserSSHandler::ProcessForwardingL |
|
1016 |
// ----------------------------------------------------------------------------- |
|
1017 |
void CPEParserSSHandler::RequestComplete() |
|
1018 |
{ |
|
1019 |
ResetVariables(); |
|
1020 |
} |
|
1021 |
||
1022 |
// ----------------------------------------------------------------------------- |
|
1023 |
// CPEParserSSHandler::RequestStatusChanged |
|
1024 |
// ----------------------------------------------------------------------------- |
|
1025 |
void CPEParserSSHandler::RequestStatusChanged( |
|
1026 |
TInt /*aNewStatus*/ ) |
|
1027 |
{ |
|
1028 |
// Phone app is not interested in Ss state changes. |
|
1029 |
} |
|
1030 |
||
1031 |
// ----------------------------------------------------------------------------- |
|
1032 |
// CPEParserSSHandler::DoClean |
|
1033 |
// ----------------------------------------------------------------------------- |
|
1034 |
// |
|
1035 |
void CPEParserSSHandler::DoClean( |
|
1036 |
TAny* aAny ) |
|
1037 |
{ |
|
1038 |
CPEParserSSHandler* ssHandler = |
|
1039 |
static_cast< CPEParserSSHandler* >( aAny ); |
|
1040 |
||
1041 |
ssHandler->ResetVariables(); |
|
1042 |
} |
|
1043 |
||
1044 |
||
1045 |
// ----------------------------------------------------------------------------- |
|
1046 |
// CPEParserSSHandler::ResetVariables |
|
1047 |
// ----------------------------------------------------------------------------- |
|
1048 |
// |
|
1049 |
void CPEParserSSHandler::ResetVariables() |
|
1050 |
{ |
|
1051 |
delete iBarring; |
|
1052 |
iBarring = NULL; |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1053 |
|
37 | 1054 |
delete iCli; |
1055 |
iCli = NULL; |
|
1056 |
delete iSettings; |
|
1057 |
iSettings = NULL; |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1058 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1059 |
iDivert = NULL; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1060 |
delete iCallDivertingHandler; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1061 |
iCallDivertingHandler = NULL; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1062 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1063 |
iWaiting = NULL; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1064 |
delete iCallWaitingHandler; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1065 |
iCallWaitingHandler = NULL; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1066 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1067 |
delete iPsetWrapper; |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
1068 |
iPsetWrapper = NULL; |
37 | 1069 |
} |
1070 |
||
1071 |
// ----------------------------------------------------------------------------- |
|
1072 |
// CPEParserSSHandler::CopyL |
|
1073 |
// ----------------------------------------------------------------------------- |
|
1074 |
// |
|
1075 |
void CPEParserSSHandler::CopyL( |
|
1076 |
TDes& aDest, |
|
1077 |
const TDesC& aSource ) |
|
1078 |
{ |
|
1079 |
if ( aDest.MaxLength() < aSource.Length() ) |
|
1080 |
{ |
|
1081 |
User::Leave( KErrOverflow ); |
|
1082 |
} |
|
1083 |
||
1084 |
aDest = aSource; |
|
1085 |
} |
|
1086 |
||
1087 |
// End of File |