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