24
|
1 |
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
// INCLUDE FILES
|
|
19 |
#include "cmmsupplservtsy.h"
|
|
20 |
#include <ctsy/tflogger.h>
|
|
21 |
|
|
22 |
// include internal Tsy classes
|
|
23 |
#include "cmmphonetsy.h"
|
|
24 |
#include "cmmtsyreqhandlestore.h"
|
|
25 |
#include <ctsy/pluginapi/cmmdatapackage.h>
|
|
26 |
#include "CMmCommonStaticUtility.h"
|
|
27 |
#include <ctsy/serviceapi/ctsydomaincrkeys.h>
|
|
28 |
#include <ctsy/rmmcustomapi.h>
|
|
29 |
#include "ctsyprivatecrpkeys.h"
|
|
30 |
#include <ctsy/serviceapi/gsmerror.h>
|
|
31 |
|
|
32 |
// ======== MEMBER FUNCTIONS ========
|
|
33 |
|
|
34 |
CMmSupplServTsy::CMmSupplServTsy()
|
|
35 |
{
|
|
36 |
}
|
|
37 |
|
|
38 |
void CMmSupplServTsy::ConstructL()
|
|
39 |
{
|
|
40 |
// Initialise SS capabilities
|
|
41 |
iCallServiceCaps = KMultimodeTsyGsmCallServiceCaps;
|
|
42 |
|
|
43 |
// Initialise Call Forwarding member variables
|
|
44 |
iRetCFStatusSize = NULL;
|
|
45 |
iRetCallForwardingCondition = NULL;
|
|
46 |
iRetServiceGroup = NULL;
|
|
47 |
iRetActiveType = NULL;
|
|
48 |
iCFList = NULL;
|
|
49 |
iCFClientId = NULL;
|
|
50 |
iCBClientId = NULL;
|
|
51 |
iCWClientId = NULL;
|
|
52 |
iMwisCentRep = iMmPhone->GetMwisCenRep();
|
|
53 |
iCfisCentRep = iMmPhone->GetCfisCenRep();
|
|
54 |
iCFISPrivateCentRep = iMmPhone->GetCfisPRCenRep();
|
|
55 |
iGetIccSupportAtBoot = ETrue;
|
|
56 |
iMessageWaitingSupportedByIcc = ETrue;
|
|
57 |
// Initialize flag
|
|
58 |
iSsNoFdnCheckFlag = ESsNoFdnCheckUnknown;
|
|
59 |
}
|
|
60 |
|
|
61 |
|
|
62 |
CMmSupplServTsy* CMmSupplServTsy::NewL(
|
|
63 |
CMmPhoneTsy* aPhoneTsy ) // Pointer to PhoneTsy
|
|
64 |
{
|
|
65 |
CMmSupplServTsy* self = new( ELeave ) CMmSupplServTsy();
|
|
66 |
|
|
67 |
CleanupStack::PushL( self );
|
|
68 |
self->iMmPhone = aPhoneTsy;
|
|
69 |
self->ConstructL();
|
|
70 |
CleanupStack::Pop();
|
|
71 |
|
|
72 |
return self;
|
|
73 |
}
|
|
74 |
|
|
75 |
|
|
76 |
CMmSupplServTsy::~CMmSupplServTsy()
|
|
77 |
{
|
|
78 |
iMmPhone = NULL;
|
|
79 |
iRetCallServiceCaps = NULL;
|
|
80 |
iRetCFStatusSize = NULL;
|
|
81 |
iRetCallForwardingCondition = NULL;
|
|
82 |
iRetServiceGroup = NULL;
|
|
83 |
iRetActiveType = NULL;
|
|
84 |
iCFList = NULL;
|
|
85 |
|
|
86 |
if ( iCFClientId )
|
|
87 |
{
|
|
88 |
delete iCFClientId;
|
|
89 |
iCFClientId = NULL;
|
|
90 |
}
|
|
91 |
|
|
92 |
iRetCBStatusSize = NULL;
|
|
93 |
iRetCallBarringCondition = NULL;
|
|
94 |
iCBList = NULL;
|
|
95 |
|
|
96 |
if ( iCBClientId )
|
|
97 |
{
|
|
98 |
delete iCBClientId;
|
|
99 |
iCBClientId = NULL;
|
|
100 |
}
|
|
101 |
|
|
102 |
iRetCWStatusSize = NULL;
|
|
103 |
iRetNotifyCallWaitingStatus = NULL;
|
|
104 |
iCWList = NULL;
|
|
105 |
|
|
106 |
if ( iCWClientId )
|
|
107 |
{
|
|
108 |
delete iCWClientId;
|
|
109 |
iCWClientId = NULL;
|
|
110 |
}
|
|
111 |
|
|
112 |
iRetGetIdentityServiceStatus = NULL;
|
|
113 |
iMwisCentRep = NULL;
|
|
114 |
iRetSetMessageWaiting = NULL;
|
|
115 |
iRetNotifyMessageWaiting = NULL;
|
|
116 |
iMwisInfoRequests.ResetAndDestroy();
|
|
117 |
}
|
|
118 |
|
|
119 |
// ---------------------------------------------------------------------------
|
|
120 |
// CMmSupplServTsy::DoExtFuncL
|
|
121 |
// Supplementary Services-specific functionality of CMmPhoneTsy::DoExtFuncL
|
|
122 |
// (other items were commented in a header).
|
|
123 |
// ---------------------------------------------------------------------------
|
|
124 |
//
|
|
125 |
TInt CMmSupplServTsy::DoExtFuncL(
|
|
126 |
const TTsyReqHandle aTsyReqHandle,
|
|
127 |
const TInt aIpc,
|
|
128 |
const TDataPackage& aPackage )
|
|
129 |
{
|
|
130 |
TInt ret = KErrNone;
|
|
131 |
TAny* dataPtr = aPackage.Ptr1();
|
|
132 |
TAny* dataPtr2 = aPackage.Ptr2();
|
|
133 |
|
|
134 |
switch ( aIpc )
|
|
135 |
{
|
|
136 |
// supported SS features
|
|
137 |
// Call Service Capabilities
|
|
138 |
// Get Call Service Capabilities
|
|
139 |
case EMobilePhoneGetCallServiceCaps:
|
|
140 |
ret = GetCallServiceCaps( aTsyReqHandle,
|
|
141 |
reinterpret_cast<TUint32*>( dataPtr ) );
|
|
142 |
break;
|
|
143 |
// Notify Change of Call Service Capabilities
|
|
144 |
case EMobilePhoneNotifyCallServiceCapsChange:
|
|
145 |
ret = NotifyCallServiceCapsChange(
|
|
146 |
reinterpret_cast<TUint32*>( dataPtr ) );
|
|
147 |
break;
|
|
148 |
//Call Forwarding
|
|
149 |
//Get Call Forwarding Status and Information - Phase1
|
|
150 |
case EMobilePhoneGetCallForwardingStatusPhase1:
|
|
151 |
ret = GetCallForwardingStatusPhase1L( aTsyReqHandle,
|
|
152 |
reinterpret_cast<CRetrieveMobilePhoneCFList::TGetCallForwardingRequest*>
|
|
153 |
( dataPtr ),
|
|
154 |
reinterpret_cast< TInt*>( dataPtr2 ) );
|
|
155 |
break;
|
|
156 |
//Get Call Forwarding Status and Information - Phase2
|
|
157 |
case EMobilePhoneGetCallForwardingStatusPhase2:
|
|
158 |
ret = GetCallForwardingStatusPhase2( aTsyReqHandle ,
|
|
159 |
reinterpret_cast<RMobilePhone::TClientId*>( dataPtr ),
|
|
160 |
aPackage.Des2n() );
|
|
161 |
break;
|
|
162 |
// Set Call Forwarding Status and Information
|
|
163 |
case EMobilePhoneSetCallForwardingStatus:
|
|
164 |
ret = SetCallForwardingStatusL( aTsyReqHandle,
|
|
165 |
reinterpret_cast<RMobilePhone::TMobilePhoneCFCondition*>
|
|
166 |
( dataPtr ),
|
|
167 |
reinterpret_cast<const RMobilePhone::TMobilePhoneCFChangeV1*>
|
|
168 |
( dataPtr2 ) );
|
|
169 |
break;
|
|
170 |
// Notify Change of Call Forwarding Status or Information
|
|
171 |
case EMobilePhoneNotifyCallForwardingStatusChange:
|
|
172 |
ret = NotifyCallForwardingStatusChange(
|
|
173 |
reinterpret_cast<RMobilePhone::TMobilePhoneCFCondition*>
|
|
174 |
( dataPtr ) );
|
|
175 |
break;
|
|
176 |
// Call Forwarding Active Notification
|
|
177 |
case EMobilePhoneNotifyCallForwardingActive:
|
|
178 |
ret = NotifyCallForwardingActive(
|
|
179 |
reinterpret_cast<RMobilePhone::TMobileService*>( dataPtr ),
|
|
180 |
reinterpret_cast<RMobilePhone::TMobilePhoneCFActive*>
|
|
181 |
( dataPtr2 ) );
|
|
182 |
break;
|
|
183 |
|
|
184 |
//Call Barring
|
|
185 |
// Get Call Barring Status and Information - Phase1
|
|
186 |
case EMobilePhoneGetBarringStatusPhase1:
|
|
187 |
ret = GetCallBarringStatusPhase1L( aTsyReqHandle,
|
|
188 |
reinterpret_cast<CRetrieveMobilePhoneCBList::TGetCallBarringRequest*>
|
|
189 |
( dataPtr ),
|
|
190 |
reinterpret_cast<TInt*>( dataPtr2 ) );
|
|
191 |
break;
|
|
192 |
// Get Call Barring Status and Information - Phase2
|
|
193 |
case EMobilePhoneGetBarringStatusPhase2:
|
|
194 |
ret = GetCallBarringStatusPhase2( aTsyReqHandle,
|
|
195 |
reinterpret_cast<RMobilePhone::TClientId*>( dataPtr ),
|
|
196 |
aPackage.Des2n() );
|
|
197 |
break;
|
|
198 |
// Set Call Barring Status and Information
|
|
199 |
case EMobilePhoneSetCallBarringStatus:
|
|
200 |
ret = SetCallBarringStatusL( aTsyReqHandle,
|
|
201 |
reinterpret_cast<RMobilePhone::TMobilePhoneCBCondition*>
|
|
202 |
( dataPtr ),
|
|
203 |
reinterpret_cast<const RMobilePhone::TMobilePhoneCBChangeV1*>
|
|
204 |
( dataPtr2 ) );
|
|
205 |
break;
|
|
206 |
// Notify Change of Call Barring Status or Information
|
|
207 |
case EMobilePhoneNotifyCallBarringStatusChange:
|
|
208 |
ret = NotifyCallBarringStatusChange(
|
|
209 |
reinterpret_cast<RMobilePhone::TMobilePhoneCBCondition*>
|
|
210 |
( dataPtr ) );
|
|
211 |
break;
|
|
212 |
|
|
213 |
// Supplementary Services password change
|
|
214 |
// Set SS password
|
|
215 |
case EMobilePhoneSetSSPassword:
|
|
216 |
ret = SetSSPasswordL( aTsyReqHandle, aPackage.Des1n(),
|
|
217 |
reinterpret_cast<TInt*>( dataPtr2 ) );
|
|
218 |
break;
|
|
219 |
|
|
220 |
// Call Waiting
|
|
221 |
// Get Call Waiting Status - Phase1
|
|
222 |
case EMobilePhoneGetWaitingStatusPhase1:
|
|
223 |
ret = GetCallWaitingStatusPhase1L( aTsyReqHandle,
|
|
224 |
reinterpret_cast<CRetrieveMobilePhoneCWList::TGetCallWaitingRequest*>
|
|
225 |
( dataPtr ),
|
|
226 |
reinterpret_cast<TInt*>( dataPtr2 ) );
|
|
227 |
break;
|
|
228 |
|
|
229 |
// Get Call Waiting Status - Phase2
|
|
230 |
case EMobilePhoneGetWaitingStatusPhase2:
|
|
231 |
ret = GetCallWaitingStatusPhase2( aTsyReqHandle,
|
|
232 |
reinterpret_cast<RMobilePhone::TClientId*>( dataPtr ),
|
|
233 |
aPackage.Des2n() );
|
|
234 |
break;
|
|
235 |
|
|
236 |
// Set Call Waiting Status
|
|
237 |
case EMobilePhoneSetCallWaitingStatus:
|
|
238 |
ret = SetCallWaitingStatusL( aTsyReqHandle,
|
|
239 |
reinterpret_cast<RMobilePhone::TMobileService*>( dataPtr ),
|
|
240 |
reinterpret_cast<RMobilePhone::TMobilePhoneServiceAction*>
|
|
241 |
( dataPtr2 ) );
|
|
242 |
break;
|
|
243 |
|
|
244 |
// Notify Change of Call Waiting Status
|
|
245 |
case EMobilePhoneNotifyCallWaitingStatusChange:
|
|
246 |
ret = NotifyCallWaitingStatusChange( aPackage.Des1n() );
|
|
247 |
break;
|
|
248 |
|
|
249 |
// Identity Services
|
|
250 |
// Get Status of an Identity Service
|
|
251 |
case EMobilePhoneGetIdentityServiceStatus:
|
|
252 |
ret = GetIdentityServiceStatusL( aTsyReqHandle,
|
|
253 |
reinterpret_cast<RMobilePhone::TIdServiceAndLocation*>( dataPtr ),
|
|
254 |
reinterpret_cast<RMobilePhone::TMobilePhoneIdServiceStatus*>
|
|
255 |
( dataPtr2 ) );
|
|
256 |
break;
|
|
257 |
|
|
258 |
// User's Access to Network Services
|
|
259 |
case EMobilePhoneSendNetworkServiceRequest:
|
|
260 |
{
|
|
261 |
//Set flag value
|
|
262 |
iSsNoFdnCheckFlag = ESsNoFdnCheckNotUsed;
|
|
263 |
ret = SendNetworkServiceRequestL(
|
|
264 |
aTsyReqHandle, aPackage.Des1u() );
|
|
265 |
}
|
|
266 |
break;
|
|
267 |
|
|
268 |
// User's Access to Network Services with NoFdnCheck
|
|
269 |
case EMobilePhoneSendNetworkServiceRequestNoFdnCheck:
|
|
270 |
{
|
|
271 |
//Set flag value
|
|
272 |
iSsNoFdnCheckFlag = ESsNoFdnCheckUsed;
|
|
273 |
ret = SendNetworkServiceRequestL(
|
|
274 |
aTsyReqHandle, aPackage.Des1u() );
|
|
275 |
}
|
|
276 |
break;
|
|
277 |
|
|
278 |
// Notify for Network Service Requests
|
|
279 |
case EMobilePhoneNotifySendNetworkServiceRequest:
|
|
280 |
ret = NotifySendNetworkServiceRequest(
|
|
281 |
reinterpret_cast<const RMobilePhone::TMobilePhoneNotifySendSSOperation*>
|
|
282 |
( dataPtr ), aPackage.Des2n() );
|
|
283 |
break;
|
|
284 |
|
|
285 |
// Notify for All Network Service Requests
|
|
286 |
case EMobilePhoneNotifyAllSendNetworkServiceRequest:
|
|
287 |
ret = NotifyAllSendNetworkServiceRequest(
|
|
288 |
reinterpret_cast<RMobilePhone::TMobilePhoneNotifySendSSOperation*>
|
|
289 |
( dataPtr ), aPackage.Des2n() );
|
|
290 |
break;
|
|
291 |
|
|
292 |
// Get ICC message waiting indicators
|
|
293 |
case EMobilePhoneGetIccMessageWaitingIndicators:
|
|
294 |
ret = GetIccMessageWaitingIndicatorsL( aTsyReqHandle,
|
|
295 |
REINTERPRET_CAST(
|
|
296 |
RMobilePhone::TMobilePhoneMessageWaitingV1*, dataPtr ) );
|
|
297 |
break;
|
|
298 |
|
|
299 |
// Set ICC message waiting indicators
|
|
300 |
case EMobilePhoneSetIccMessageWaitingIndicators:
|
|
301 |
ret = SetIccMessageWaitingIndicatorsL( aTsyReqHandle,
|
|
302 |
aPackage.Des1n() );
|
|
303 |
break;
|
|
304 |
|
|
305 |
// Notify ICC message waiting indicators change
|
|
306 |
case EMobilePhoneNotifyIccMessageWaitingIndicatorsChange:
|
|
307 |
ret = NotifyIccMessageWaitingIndicatorsChange(
|
|
308 |
REINTERPRET_CAST(
|
|
309 |
RMobilePhone::TMobilePhoneMessageWaitingV1*, dataPtr ) );
|
|
310 |
break;
|
|
311 |
|
|
312 |
// not supported SS features
|
|
313 |
case EMobilePhoneGetCallForwardingIndicator:
|
|
314 |
case EMobilePhoneSetCallBarringPassword:
|
|
315 |
case EMobilePhoneGetCompMethodName:
|
|
316 |
ret = KErrNotSupported;
|
|
317 |
break;
|
|
318 |
|
|
319 |
// error case
|
|
320 |
default:
|
|
321 |
// this method should only be called for SS cases
|
|
322 |
ret = KErrArgument;
|
|
323 |
break;
|
|
324 |
}
|
|
325 |
|
|
326 |
return ret;
|
|
327 |
}
|
|
328 |
|
|
329 |
// ---------------------------------------------------------------------------
|
|
330 |
// CMmSupplServTsy::CancelService
|
|
331 |
// Cancels SS requests.
|
|
332 |
// (other items were commented in a header).
|
|
333 |
// ---------------------------------------------------------------------------
|
|
334 |
//
|
|
335 |
TInt CMmSupplServTsy::CancelService(
|
|
336 |
const TInt aIpc,
|
|
337 |
const TTsyReqHandle aTsyReqHandle )
|
|
338 |
{
|
|
339 |
TInt ret ( KErrNone );
|
|
340 |
switch ( aIpc )
|
|
341 |
{
|
|
342 |
// Notifications
|
|
343 |
case EMobilePhoneNotifyCallServiceCapsChange:
|
|
344 |
ret = NotifyCallServiceCapsChangeCancel( aTsyReqHandle );
|
|
345 |
break;
|
|
346 |
case EMobilePhoneNotifyCallForwardingStatusChange:
|
|
347 |
ret = NotifyCallForwardingStatusChangeCancel( aTsyReqHandle );
|
|
348 |
break;
|
|
349 |
case EMobilePhoneNotifyCallForwardingActive:
|
|
350 |
ret = NotifyCallForwardingActiveCancel( aTsyReqHandle );
|
|
351 |
break;
|
|
352 |
case EMobilePhoneNotifyCallBarringStatusChange:
|
|
353 |
ret = NotifyCallBarringStatusChangeCancel( aTsyReqHandle );
|
|
354 |
break;
|
|
355 |
case EMobilePhoneNotifyCallWaitingStatusChange:
|
|
356 |
ret = NotifyCallWaitingStatusChangeCancel( aTsyReqHandle );
|
|
357 |
break;
|
|
358 |
// Other requests
|
|
359 |
case EMobilePhoneGetCallForwardingStatusPhase1:
|
|
360 |
case EMobilePhoneGetCallForwardingStatusPhase2:
|
|
361 |
ret = GetCallForwardingStatusCancel( aTsyReqHandle );
|
|
362 |
break;
|
|
363 |
case EMobilePhoneSetCallForwardingStatus:
|
|
364 |
ret = SetCallForwardingStatusCancel( aTsyReqHandle );
|
|
365 |
break;
|
|
366 |
case EMobilePhoneGetBarringStatusPhase1:
|
|
367 |
case EMobilePhoneGetBarringStatusPhase2:
|
|
368 |
ret = GetCallBarringStatusCancel( aTsyReqHandle );
|
|
369 |
break;
|
|
370 |
case EMobilePhoneSetCallBarringStatus:
|
|
371 |
ret = SetCallBarringStatusCancel( aTsyReqHandle );
|
|
372 |
break;
|
|
373 |
case EMobilePhoneSetSSPassword:
|
|
374 |
ret = SetSSPasswordCancel( aTsyReqHandle );
|
|
375 |
break;
|
|
376 |
case EMobilePhoneGetWaitingStatusPhase1:
|
|
377 |
case EMobilePhoneGetWaitingStatusPhase2:
|
|
378 |
ret = GetCallWaitingStatusCancel( aTsyReqHandle );
|
|
379 |
break;
|
|
380 |
case EMobilePhoneSetCallWaitingStatus:
|
|
381 |
ret = SetCallWaitingStatusCancel( aTsyReqHandle );
|
|
382 |
break;
|
|
383 |
case EMobilePhoneGetIdentityServiceStatus:
|
|
384 |
ret = GetIdentityServiceStatusCancel( aTsyReqHandle );
|
|
385 |
break;
|
|
386 |
case EMobilePhoneSendNetworkServiceRequest:
|
|
387 |
case EMobilePhoneSendNetworkServiceRequestNoFdnCheck:
|
|
388 |
// Ignore
|
|
389 |
break;
|
|
390 |
case EMobilePhoneGetIccMessageWaitingIndicators:
|
|
391 |
ret = GetIccMessageWaitingIndicatorsCancel( aTsyReqHandle );
|
|
392 |
break;
|
|
393 |
case EMobilePhoneSetIccMessageWaitingIndicators:
|
|
394 |
ret = SetIccMessageWaitingIndicatorsCancel( aTsyReqHandle );
|
|
395 |
break;
|
|
396 |
case EMobilePhoneNotifyIccMessageWaitingIndicatorsChange:
|
|
397 |
ret = NotifyIccMessageWaitingIndicatorChangeCancel( aTsyReqHandle );
|
|
398 |
break;
|
|
399 |
case EMobilePhoneNotifySendNetworkServiceRequest:
|
|
400 |
ret = NotifySendNetworkServiceRequestCancel( aTsyReqHandle );
|
|
401 |
break;
|
|
402 |
case EMobilePhoneNotifyAllSendNetworkServiceRequest:
|
|
403 |
ret = NotifyAllSendNetworkServiceRequestCancel( aTsyReqHandle );
|
|
404 |
break;
|
|
405 |
|
|
406 |
// Error case
|
|
407 |
default:
|
|
408 |
// This method should only be called for SS cases
|
|
409 |
ret = KErrArgument;
|
|
410 |
}
|
|
411 |
|
|
412 |
return ret;
|
|
413 |
}
|
|
414 |
|
|
415 |
// ---------------------------------------------------------------------------
|
|
416 |
// CMmSupplServTsy::Complete
|
|
417 |
// Completes the request due timer expiration.
|
|
418 |
// (other items were commented in a header).
|
|
419 |
// ---------------------------------------------------------------------------
|
|
420 |
//
|
|
421 |
void CMmSupplServTsy::Complete(
|
|
422 |
TInt aReqHandleType,
|
|
423 |
TInt aError )
|
|
424 |
{
|
|
425 |
switch( aReqHandleType )
|
|
426 |
{
|
|
427 |
case CMmPhoneTsy::EMultimodePhoneGetCallForwardingStatusPhase1:
|
|
428 |
TRAP_IGNORE( CompleteGetCallForwardingStatusPhase1L(
|
|
429 |
NULL, aError ););
|
|
430 |
break;
|
|
431 |
case CMmPhoneTsy::EMultimodePhoneSetCallForwardingStatus:
|
|
432 |
CompleteSetCallForwardingStatus( aError );
|
|
433 |
break;
|
|
434 |
case CMmPhoneTsy::EMultimodePhoneGetCallBarringStatusPhase1:
|
|
435 |
TRAP_IGNORE( CompleteGetCallBarringStatusPhase1L(
|
|
436 |
NULL, aError ););
|
|
437 |
break;
|
|
438 |
case CMmPhoneTsy::EMultimodePhoneSetCallBarringStatus:
|
|
439 |
CompleteSetCallBarringStatus( aError );
|
|
440 |
break;
|
|
441 |
case CMmPhoneTsy::EMultimodePhoneSetSSPassword:
|
|
442 |
CompleteSetSSPassword( aError );
|
|
443 |
break;
|
|
444 |
case CMmPhoneTsy::EMultimodePhoneGetCallWaitingStatusPhase1:
|
|
445 |
TRAP_IGNORE( CompleteGetCallWaitingStatusPhase1L(
|
|
446 |
NULL, aError ););
|
|
447 |
break;
|
|
448 |
case CMmPhoneTsy::EMultimodePhoneSetCallWaitingStatus:
|
|
449 |
CompleteSetCallWaitingStatus( aError );
|
|
450 |
break;
|
|
451 |
case CMmPhoneTsy::EMultimodePhoneGetIdentityServiceStatus:
|
|
452 |
CompleteGetIdentityServiceStatus(
|
|
453 |
RMobilePhone::EIdServiceUnknown, aError );
|
|
454 |
break;
|
|
455 |
case CMmPhoneTsy::EMultimodePhoneSendNetworkServiceRequest:
|
|
456 |
CompleteSendNetworkServiceRequest( aError );
|
|
457 |
break;
|
|
458 |
case CMmPhoneTsy::EMultimodePhoneSendNetworkServiceRequestNoFdnCheck:
|
|
459 |
CompleteSendNetworkServiceRequestNoFdnCheck( aError );
|
|
460 |
break;
|
|
461 |
case CMmPhoneTsy::EMultimodePhoneGetIccMessageWaitingIndicators:
|
|
462 |
CompleteGetIccMessageWaitingIndicators( NULL, aError );
|
|
463 |
break;
|
|
464 |
case CMmPhoneTsy::EMultimodePhoneSetIccMessageWaitingIndicators:
|
|
465 |
CompleteSetIccMessageWaitingIndicators( aError );
|
|
466 |
break;
|
|
467 |
default:
|
|
468 |
// Ignore
|
|
469 |
break;
|
|
470 |
}
|
|
471 |
}
|
|
472 |
|
|
473 |
// ---------------------------------------------------------------------------
|
|
474 |
// CMmSupplServTsy::GetCallServiceCaps
|
|
475 |
// Get Call Service Capabilities.
|
|
476 |
// (other items were commented in a header).
|
|
477 |
// ---------------------------------------------------------------------------
|
|
478 |
//
|
|
479 |
TInt CMmSupplServTsy::GetCallServiceCaps(
|
|
480 |
const TTsyReqHandle aTsyReqHandle,
|
|
481 |
TUint32* aCaps )
|
|
482 |
{
|
|
483 |
*aCaps = iCallServiceCaps;
|
|
484 |
// Complete the request using the return value from extension
|
|
485 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrNone );
|
|
486 |
|
|
487 |
return KErrNone;
|
|
488 |
}
|
|
489 |
|
|
490 |
// ---------------------------------------------------------------------------
|
|
491 |
// CMmSupplServTsy::NotifyCallServiceCapsChange
|
|
492 |
// Notify Change of Call Service Capabilities.
|
|
493 |
// (other items were commented in a header).
|
|
494 |
// ---------------------------------------------------------------------------
|
|
495 |
//
|
|
496 |
TInt CMmSupplServTsy::NotifyCallServiceCapsChange(
|
|
497 |
TUint32* aCaps )
|
|
498 |
{
|
|
499 |
|
|
500 |
iRetCallServiceCaps = aCaps;
|
|
501 |
iMmPhone->iReqHandleType =
|
|
502 |
CMmPhoneTsy::EMultimodePhoneNotifyCallServiceCapsChange;
|
|
503 |
|
|
504 |
return KErrNone;
|
|
505 |
}
|
|
506 |
|
|
507 |
// ---------------------------------------------------------------------------
|
|
508 |
// CMmSupplServTsy::NotifyCallServiceCapsChangeCancel
|
|
509 |
// Use this method to cancel a previously placed asynchronous
|
|
510 |
// NotifyCallServiceCapsChange request.
|
|
511 |
// (other items were commented in a header).
|
|
512 |
// ---------------------------------------------------------------------------
|
|
513 |
//
|
|
514 |
TInt CMmSupplServTsy::NotifyCallServiceCapsChangeCancel(
|
|
515 |
TTsyReqHandle aTsyReqHandle )
|
|
516 |
{
|
|
517 |
//set pointer to NULL
|
|
518 |
iRetCallServiceCaps = NULL;
|
|
519 |
|
|
520 |
// Reset request handle and pointer
|
|
521 |
iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
522 |
CMmPhoneTsy::EMultimodePhoneNotifyCallServiceCapsChange );
|
|
523 |
|
|
524 |
// Complete the request and return KErrNone
|
|
525 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
526 |
|
|
527 |
return KErrNone;
|
|
528 |
}
|
|
529 |
|
|
530 |
// ---------------------------------------------------------------------------
|
|
531 |
// CMmSupplServTsy::CompleteNotifyCallServiceCapsChange
|
|
532 |
// Description: This method completes an outstanding
|
|
533 |
// NotifyCallServiceCapsChange request.
|
|
534 |
// (other items were commented in a header).
|
|
535 |
// ---------------------------------------------------------------------------
|
|
536 |
//
|
|
537 |
void CMmSupplServTsy::CompleteNotifyCallServiceCapsChange(
|
|
538 |
RMobilePhone::TMobilePhoneCallServiceCaps aCallServiceCaps )
|
|
539 |
{
|
|
540 |
// Reset req handle. Returns the deleted req handle
|
|
541 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
542 |
CMmPhoneTsy::EMultimodePhoneNotifyCallServiceCapsChange );
|
|
543 |
|
|
544 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
545 |
{
|
|
546 |
*iRetCallServiceCaps = aCallServiceCaps;
|
|
547 |
iRetCallServiceCaps = NULL;
|
|
548 |
iMmPhone->ReqCompleted( reqHandle, KErrNone );
|
|
549 |
}
|
|
550 |
}
|
|
551 |
|
|
552 |
// ---------------------------------------------------------------------------
|
|
553 |
// CMmSupplServTsy::GetCallForwardingStatusPhase1L
|
|
554 |
// First phase of fetching call forwarding status.
|
|
555 |
// (other items were commented in a header).
|
|
556 |
// ---------------------------------------------------------------------------
|
|
557 |
//
|
|
558 |
TInt CMmSupplServTsy::GetCallForwardingStatusPhase1L(
|
|
559 |
const TTsyReqHandle aTsyReqHandle, // Tsy request handle
|
|
560 |
CRetrieveMobilePhoneCFList::TGetCallForwardingRequest* aReqData,
|
|
561 |
TInt* aBufSize ) // Buffer size
|
|
562 |
{
|
|
563 |
TInt ret = KErrNone;
|
|
564 |
if ( iSsTransactionOngoing )
|
|
565 |
{
|
|
566 |
ret = KErrServerBusy;
|
|
567 |
}
|
|
568 |
// Check some error cases first
|
|
569 |
else if ( RMobilePhone::EInfoLocationCache == aReqData->iLocation )
|
|
570 |
{
|
|
571 |
// No cache implemented
|
|
572 |
ret = KErrNotFound;
|
|
573 |
}
|
|
574 |
else if ( ( RMobilePhone::ECallForwardingAllCases == aReqData->iCondition )
|
|
575 |
|| ( RMobilePhone::ECallForwardingAllConditionalCases ==
|
|
576 |
aReqData->iCondition ) )
|
|
577 |
{
|
|
578 |
// The combined cases cannot be used for requesting the status,
|
|
579 |
// only for activation and deactivation
|
|
580 |
ret = KErrArgument;
|
|
581 |
}
|
|
582 |
else
|
|
583 |
{
|
|
584 |
// Forward the request to DOS
|
|
585 |
CMmDataPackage package;
|
|
586 |
package.PackData( &aReqData->iCondition, &aReqData->iServiceGroup );
|
|
587 |
ret = iMmPhone->MessageManager()->HandleRequestL(
|
|
588 |
EMobilePhoneGetCallForwardingStatusPhase1, &package );
|
|
589 |
iSsTransactionOngoing = ETrue;
|
|
590 |
}
|
|
591 |
if ( ret != KErrNone )
|
|
592 |
{
|
|
593 |
iMmPhone->ReqCompleted( aTsyReqHandle, ret );
|
|
594 |
iSsTransactionOngoing = EFalse;
|
|
595 |
}
|
|
596 |
else
|
|
597 |
{
|
|
598 |
// Save return pointer for list size
|
|
599 |
iRetCFStatusSize = aBufSize;
|
|
600 |
|
|
601 |
// Copy client id (session and subsession handle). it's used for
|
|
602 |
// matching phase 1 and 2 of a request
|
|
603 |
|
|
604 |
if ( iCFClientId )
|
|
605 |
{
|
|
606 |
delete iCFClientId;
|
|
607 |
iCFClientId = NULL;
|
|
608 |
}
|
|
609 |
|
|
610 |
iCFClientId = new( ELeave ) RMobilePhone::TClientId(
|
|
611 |
aReqData->iClient );
|
|
612 |
|
|
613 |
// Save req handle type
|
|
614 |
iMmPhone->iReqHandleType =
|
|
615 |
CMmPhoneTsy::EMultimodePhoneGetCallForwardingStatusPhase1;
|
|
616 |
}
|
|
617 |
|
|
618 |
return KErrNone;
|
|
619 |
}
|
|
620 |
|
|
621 |
// ---------------------------------------------------------------------------
|
|
622 |
// CMmSupplServTsy::GetCallForwardingStatusPhase2
|
|
623 |
// Second phase of fetching call forwarding status.
|
|
624 |
// (other items were commented in a header).
|
|
625 |
// ---------------------------------------------------------------------------
|
|
626 |
//
|
|
627 |
TInt CMmSupplServTsy::GetCallForwardingStatusPhase2(
|
|
628 |
const TTsyReqHandle aTsyReqHandle,
|
|
629 |
RMobilePhone::TClientId const * aClient,
|
|
630 |
TDes8* aBuf )
|
|
631 |
{
|
|
632 |
TInt ret = KErrNone;
|
|
633 |
// Check if client id matches between phase 1 and phase 2
|
|
634 |
if ( ( iCFClientId->iSessionHandle == aClient->iSessionHandle ) &&
|
|
635 |
( iCFClientId->iSubSessionHandle == aClient->iSubSessionHandle ) )
|
|
636 |
{
|
|
637 |
// Copy the streamed list to the client
|
|
638 |
aBuf->Copy( iCFList->Ptr( 0 ) );
|
|
639 |
|
|
640 |
// Reset the client Id
|
|
641 |
delete iCFClientId;
|
|
642 |
iCFClientId = NULL;
|
|
643 |
|
|
644 |
// Reset the list
|
|
645 |
delete iCFList;
|
|
646 |
iCFList = NULL;
|
|
647 |
}
|
|
648 |
else
|
|
649 |
{
|
|
650 |
ret = KErrNotFound;
|
|
651 |
}
|
|
652 |
|
|
653 |
iMmPhone->ReqCompleted( aTsyReqHandle, ret );
|
|
654 |
|
|
655 |
return KErrNone;
|
|
656 |
}
|
|
657 |
|
|
658 |
// ---------------------------------------------------------------------------
|
|
659 |
// CMmSupplServTsy::GetCallForwardingStatusCancel
|
|
660 |
// This method cancels an outstanding GetCallForwardingStatus
|
|
661 |
// request.
|
|
662 |
// (other items were commented in a header).
|
|
663 |
// ---------------------------------------------------------------------------
|
|
664 |
//
|
|
665 |
TInt CMmSupplServTsy::GetCallForwardingStatusCancel(
|
|
666 |
const TTsyReqHandle aTsyReqHandle )
|
|
667 |
{
|
|
668 |
iRetCFStatusSize = NULL;
|
|
669 |
iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
670 |
CMmPhoneTsy::EMultimodePhoneGetCallForwardingStatusPhase1 );
|
|
671 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
672 |
iSsTransactionOngoing = EFalse;
|
|
673 |
|
|
674 |
return KErrNone;
|
|
675 |
}
|
|
676 |
|
|
677 |
// ---------------------------------------------------------------------------
|
|
678 |
// CMmSupplServTsy::CompleteGetCallForwardingStatusPhase1L
|
|
679 |
// This method completes an outstanding GetCallForwardingStatusPhase1
|
|
680 |
// request.
|
|
681 |
// (other items were commented in a header).
|
|
682 |
// ---------------------------------------------------------------------------
|
|
683 |
//
|
|
684 |
void CMmSupplServTsy::CompleteGetCallForwardingStatusPhase1L(
|
|
685 |
CMobilePhoneCFList* aResults,
|
|
686 |
TInt aErrorCode )
|
|
687 |
{
|
|
688 |
// Reset req handle. Returns the deleted req handle
|
|
689 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
690 |
CMmPhoneTsy::EMultimodePhoneGetCallForwardingStatusPhase1 );
|
|
691 |
|
|
692 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
693 |
{
|
|
694 |
if ( KErrNone == aErrorCode )
|
|
695 |
{
|
|
696 |
// If there's no error, we should have got some results ...
|
|
697 |
if ( aResults && aResults->Enumerate() > 0 )
|
|
698 |
{
|
|
699 |
// Store the streamed list for phase 2
|
|
700 |
iCFList = aResults->StoreLC();
|
|
701 |
CleanupStack::Pop(); // pop the CBufFlat allocated by StoreLC
|
|
702 |
}
|
|
703 |
if ( iCFList )
|
|
704 |
{
|
|
705 |
// Copy the size of the streamed list to client
|
|
706 |
*iRetCFStatusSize = iCFList->Size();
|
|
707 |
}
|
|
708 |
else
|
|
709 |
{
|
|
710 |
TFLOGSTRING("TSY: CMmSupplServTsy::CompleteGetCallForwardingStatusPhase1L: No response received.");
|
|
711 |
aErrorCode = KErrNotFound;
|
|
712 |
}
|
|
713 |
}
|
|
714 |
|
|
715 |
iRetCFStatusSize = NULL;
|
|
716 |
iMmPhone->ReqCompleted( reqHandle, aErrorCode );
|
|
717 |
iSsTransactionOngoing = EFalse;
|
|
718 |
}
|
|
719 |
}
|
|
720 |
|
|
721 |
// ---------------------------------------------------------------------------
|
|
722 |
// CMmSupplServTsy::NotifyCallForwardingStatusChange
|
|
723 |
// This request allows a client to be notified when the status
|
|
724 |
// or associated information of any of the call forwarding conditions
|
|
725 |
// applied to any of the basic service groups changes.
|
|
726 |
// (other items were commented in a header).
|
|
727 |
// ---------------------------------------------------------------------------
|
|
728 |
//
|
|
729 |
TInt CMmSupplServTsy::NotifyCallForwardingStatusChange(
|
|
730 |
RMobilePhone::TMobilePhoneCFCondition* aCondition )
|
|
731 |
{
|
|
732 |
iRetCallForwardingCondition = aCondition;
|
|
733 |
// Save req handle type
|
|
734 |
iMmPhone->iReqHandleType =
|
|
735 |
CMmPhoneTsy::EMultimodePhoneNotifyCallForwardingStatusChange;
|
|
736 |
|
|
737 |
return KErrNone;
|
|
738 |
}
|
|
739 |
|
|
740 |
// ---------------------------------------------------------------------------
|
|
741 |
// CMmSupplServTsy::NotifyCallForwardingStatusChangeCancel
|
|
742 |
// This method cancels an outstanding
|
|
743 |
// NotifyCallForwardingStatusChange request.
|
|
744 |
// (other items were commented in a header).
|
|
745 |
// ---------------------------------------------------------------------------
|
|
746 |
//
|
|
747 |
TInt CMmSupplServTsy::NotifyCallForwardingStatusChangeCancel(
|
|
748 |
const TTsyReqHandle aTsyReqHandle ) // Tsy request handle
|
|
749 |
{
|
|
750 |
iRetCallForwardingCondition = NULL;
|
|
751 |
iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
752 |
CMmPhoneTsy::EMultimodePhoneNotifyCallForwardingStatusChange );
|
|
753 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
754 |
|
|
755 |
return KErrNone;
|
|
756 |
}
|
|
757 |
|
|
758 |
// ---------------------------------------------------------------------------
|
|
759 |
// CMmSupplServTsy::CompleteNotifyCallForwardingStatusChange
|
|
760 |
// Description: This method completes an outstanding
|
|
761 |
// NotifyCallForwardingStatusChange request.
|
|
762 |
// (other items were commented in a header).
|
|
763 |
// ---------------------------------------------------------------------------
|
|
764 |
//
|
|
765 |
void CMmSupplServTsy::CompleteNotifyCallForwardingStatusChange(
|
|
766 |
RMobilePhone::TMobilePhoneCFCondition aCondition )
|
|
767 |
{
|
|
768 |
// Reset req handle. Returns the deleted req handle
|
|
769 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
770 |
CMmPhoneTsy::EMultimodePhoneNotifyCallForwardingStatusChange );
|
|
771 |
|
|
772 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
773 |
{
|
|
774 |
*iRetCallForwardingCondition = aCondition;
|
|
775 |
iRetCallForwardingCondition = NULL;
|
|
776 |
iMmPhone->ReqCompleted( reqHandle, KErrNone );
|
|
777 |
}
|
|
778 |
}
|
|
779 |
|
|
780 |
// ---------------------------------------------------------------------------
|
|
781 |
// CMmSupplServTsy::SetCallForwardingStatusL
|
|
782 |
// This method sets the call forwarding status/information for
|
|
783 |
// the call forwarding service specified by the aCondition parameter.
|
|
784 |
// (other items were commented in a header).
|
|
785 |
// ---------------------------------------------------------------------------
|
|
786 |
//
|
|
787 |
TInt CMmSupplServTsy::SetCallForwardingStatusL(
|
|
788 |
const TTsyReqHandle aTsyReqHandle,
|
|
789 |
RMobilePhone::TMobilePhoneCFCondition* aCondition,
|
|
790 |
const RMobilePhone::TMobilePhoneCFChangeV1* aInfo )
|
|
791 |
{
|
|
792 |
TInt ret = KErrNone;
|
|
793 |
if ( iSsTransactionOngoing )
|
|
794 |
{
|
|
795 |
ret = KErrServerBusy;
|
|
796 |
}
|
|
797 |
else if ( ( RMobilePhone::EServiceActionActivate != aInfo->iAction ) &&
|
|
798 |
( RMobilePhone::EServiceActionDeactivate != aInfo->iAction ) &&
|
|
799 |
( RMobilePhone::EServiceActionRegister != aInfo->iAction ) &&
|
|
800 |
( RMobilePhone::EServiceActionErase != aInfo->iAction ) )
|
|
801 |
{
|
|
802 |
// Status can be set only by above actions
|
|
803 |
ret = KErrArgument;
|
|
804 |
}
|
|
805 |
else
|
|
806 |
{
|
|
807 |
iCondition = aCondition;
|
|
808 |
iInfo = aInfo;
|
|
809 |
|
|
810 |
// Forward the request to DOS
|
|
811 |
CMmDataPackage package;
|
|
812 |
package.PackData( aCondition,
|
|
813 |
const_cast<RMobilePhone::TMobilePhoneCFChangeV1**>( &aInfo ) );
|
|
814 |
ret = iMmPhone->MessageManager()->HandleRequestL(
|
|
815 |
EMobilePhoneSetCallForwardingStatus, &package );
|
|
816 |
iSsTransactionOngoing = ETrue;
|
|
817 |
}
|
|
818 |
if ( ret != KErrNone )
|
|
819 |
{
|
|
820 |
iMmPhone->ReqCompleted( aTsyReqHandle, ret );
|
|
821 |
iSsTransactionOngoing = EFalse;
|
|
822 |
}
|
|
823 |
else
|
|
824 |
{
|
|
825 |
// Save req handle type
|
|
826 |
iMmPhone->iReqHandleType =
|
|
827 |
CMmPhoneTsy::EMultimodePhoneSetCallForwardingStatus;
|
|
828 |
}
|
|
829 |
|
|
830 |
return KErrNone;
|
|
831 |
}
|
|
832 |
|
|
833 |
// ---------------------------------------------------------------------------
|
|
834 |
// CMmSupplServTsy::CompleteSetCallForwardingStatus
|
|
835 |
// This method completes an outstanding SetCallForwardingStatus
|
|
836 |
// request.
|
|
837 |
// (other items were commented in a header).
|
|
838 |
// ---------------------------------------------------------------------------
|
|
839 |
//
|
|
840 |
void CMmSupplServTsy::CompleteSetCallForwardingStatus(
|
|
841 |
TInt aErrorCode ) // error code
|
|
842 |
{
|
|
843 |
// Reset req handle. Returns the deleted req handle
|
|
844 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
845 |
CMmPhoneTsy::EMultimodePhoneSetCallForwardingStatus );
|
|
846 |
|
|
847 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
848 |
{
|
|
849 |
//Update Central Repository
|
|
850 |
if( KErrNone == aErrorCode )
|
|
851 |
{
|
|
852 |
iCFISPrivateCentRep->Set( KCtsyCallForwardingSupported, ETrue );
|
|
853 |
}
|
|
854 |
|
|
855 |
iCfisCentRep->Set( KCtsyCallForwardingPhoneCFCondition,
|
|
856 |
*iCondition );
|
|
857 |
iCfisCentRep->Set( KCtsyCallForwardingStatus,
|
|
858 |
iInfo->iServiceGroup );
|
|
859 |
iCFISPrivateCentRep->Set( KCtsyCallForwardingAction,
|
|
860 |
iInfo->iAction );
|
|
861 |
iCFISPrivateCentRep->Set( KEFCfisiTimeout, iInfo->iTimeout );
|
|
862 |
iCFISPrivateCentRep->Set( KCtsyCallForwardingNumberPlan,
|
|
863 |
iInfo->iNumber.iNumberPlan );
|
|
864 |
iCfisCentRep->Set( KCtsyCallForwardingNumber,
|
|
865 |
iInfo->iNumber.iTelNumber );
|
|
866 |
iCFISPrivateCentRep->Set( KCtsyCallForwardingMspId,
|
|
867 |
RMmCustomAPI::KProfileIdentityOne );
|
|
868 |
|
|
869 |
iMmPhone->ReqCompleted( reqHandle, aErrorCode );
|
|
870 |
iSsTransactionOngoing = EFalse;
|
|
871 |
}
|
|
872 |
}
|
|
873 |
|
|
874 |
// ---------------------------------------------------------------------------
|
|
875 |
// CMmSupplServTsy::SetCallForwardingStatusCancel
|
|
876 |
// This method cancels setting of the call forwarding status.
|
|
877 |
// (other items were commented in a header).
|
|
878 |
// ---------------------------------------------------------------------------
|
|
879 |
//
|
|
880 |
TInt CMmSupplServTsy::SetCallForwardingStatusCancel(
|
|
881 |
const TTsyReqHandle aTsyReqHandle )
|
|
882 |
{
|
|
883 |
TTsyReqHandle cancelSetCallForwardingStatus =
|
|
884 |
iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
885 |
CMmPhoneTsy::EMultimodePhoneSetCallForwardingStatus );
|
|
886 |
|
|
887 |
if ( !cancelSetCallForwardingStatus )
|
|
888 |
{
|
|
889 |
// Cancellation called although request is not going on
|
|
890 |
TFLOGSTRING("TSY: CMmSupplServTsy::SetCallForwardingStatusCancel - KErrServerBusy");
|
|
891 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
892 |
}
|
|
893 |
else
|
|
894 |
{
|
|
895 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
896 |
}
|
|
897 |
iSsTransactionOngoing = EFalse;
|
|
898 |
|
|
899 |
return KErrNone;
|
|
900 |
}
|
|
901 |
|
|
902 |
// ---------------------------------------------------------------------------
|
|
903 |
// CMmSupplServTsy::NotifyCallForwardingActive
|
|
904 |
// Call Forwarding Active Notification.
|
|
905 |
// (other items were commented in a header).
|
|
906 |
// ---------------------------------------------------------------------------
|
|
907 |
//
|
|
908 |
TInt CMmSupplServTsy::NotifyCallForwardingActive(
|
|
909 |
RMobilePhone::TMobileService* aServiceGroup,
|
|
910 |
RMobilePhone::TMobilePhoneCFActive* aActiveType )
|
|
911 |
{
|
|
912 |
iRetServiceGroup = aServiceGroup;
|
|
913 |
iRetActiveType = aActiveType;
|
|
914 |
|
|
915 |
iMmPhone->iReqHandleType =
|
|
916 |
CMmPhoneTsy::EMultimodePhoneNotifyCallForwardingActive;
|
|
917 |
|
|
918 |
return KErrNone;
|
|
919 |
}
|
|
920 |
|
|
921 |
// ---------------------------------------------------------------------------
|
|
922 |
// CMmSupplServTsy::NotifyCallForwardingActiveCancel
|
|
923 |
// Use this method to cancel a previously placed asynchronous
|
|
924 |
// NotifyCallForwardingActive request.
|
|
925 |
// (other items were commented in a header).
|
|
926 |
// ---------------------------------------------------------------------------
|
|
927 |
//
|
|
928 |
TInt CMmSupplServTsy::NotifyCallForwardingActiveCancel(
|
|
929 |
TTsyReqHandle aTsyReqHandle )
|
|
930 |
|
|
931 |
{
|
|
932 |
iRetServiceGroup = NULL;
|
|
933 |
iRetActiveType = NULL;
|
|
934 |
iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
935 |
CMmPhoneTsy::EMultimodePhoneNotifyCallForwardingActive );
|
|
936 |
|
|
937 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
938 |
|
|
939 |
return KErrNone;
|
|
940 |
}
|
|
941 |
|
|
942 |
// ---------------------------------------------------------------------------
|
|
943 |
// CMmSupplServTsy::CompleteNotifyCallForwardingActive
|
|
944 |
// Completes asynchronous CallForwardingActive notification
|
|
945 |
// request.
|
|
946 |
// (other items were commented in a header).
|
|
947 |
// ---------------------------------------------------------------------------
|
|
948 |
//
|
|
949 |
void CMmSupplServTsy::CompleteNotifyCallForwardingActive(
|
|
950 |
RMobilePhone::TMobileService aServiceGroup,
|
|
951 |
RMobilePhone::TMobilePhoneCFActive aActiveType )
|
|
952 |
{
|
|
953 |
// Reset req handle. Returns the deleted req handle
|
|
954 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
955 |
CMmPhoneTsy::EMultimodePhoneNotifyCallForwardingActive );
|
|
956 |
|
|
957 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
958 |
{
|
|
959 |
*iRetServiceGroup = aServiceGroup;
|
|
960 |
*iRetActiveType = aActiveType;
|
|
961 |
iRetServiceGroup = NULL;
|
|
962 |
iRetActiveType = NULL;
|
|
963 |
iMmPhone->ReqCompleted( reqHandle, KErrNone );
|
|
964 |
}
|
|
965 |
}
|
|
966 |
|
|
967 |
// ---------------------------------------------------------------------------
|
|
968 |
// CMmSupplServTsy::GetCallBarringStatusPhase1L
|
|
969 |
// First phase of fetching call barring status.
|
|
970 |
// (other items were commented in a header).
|
|
971 |
// ---------------------------------------------------------------------------
|
|
972 |
//
|
|
973 |
TInt CMmSupplServTsy::GetCallBarringStatusPhase1L(
|
|
974 |
const TTsyReqHandle aTsyReqHandle, // Tsy request handle
|
|
975 |
CRetrieveMobilePhoneCBList::TGetCallBarringRequest* aReqData,
|
|
976 |
TInt* aBufSize ) // Buffer size pointer
|
|
977 |
{
|
|
978 |
TInt ret = KErrNone;
|
|
979 |
if ( iSsTransactionOngoing )
|
|
980 |
{
|
|
981 |
ret = KErrServerBusy;
|
|
982 |
}
|
|
983 |
// Check some error cases first
|
|
984 |
else if ( RMobilePhone::EInfoLocationCache == aReqData->iLocation )
|
|
985 |
{
|
|
986 |
// No cache implemented
|
|
987 |
ret = KErrNotFound;
|
|
988 |
}
|
|
989 |
else if ( ( RMobilePhone::EBarAllCases == aReqData->iCondition )
|
|
990 |
|| ( RMobilePhone::EBarAllOutgoingServices == aReqData->iCondition )
|
|
991 |
|| ( RMobilePhone::EBarAllIncomingServices == aReqData->iCondition ) )
|
|
992 |
{
|
|
993 |
// The combined cases cannot be used for requesting the status,
|
|
994 |
// only for deactivation
|
|
995 |
ret = KErrArgument;
|
|
996 |
}
|
|
997 |
else
|
|
998 |
{
|
|
999 |
// Forward the request to DOS
|
|
1000 |
CMmDataPackage package;
|
|
1001 |
package.PackData( &aReqData->iCondition );
|
|
1002 |
ret = iMmPhone->MessageManager()->HandleRequestL(
|
|
1003 |
EMobilePhoneGetBarringStatusPhase1, &package );
|
|
1004 |
iSsTransactionOngoing = ETrue;
|
|
1005 |
}
|
|
1006 |
if ( ret != KErrNone )
|
|
1007 |
{
|
|
1008 |
iMmPhone->ReqCompleted( aTsyReqHandle, ret );
|
|
1009 |
iSsTransactionOngoing = EFalse;
|
|
1010 |
}
|
|
1011 |
else
|
|
1012 |
{
|
|
1013 |
// Save return pointer for list size
|
|
1014 |
iRetCBStatusSize = aBufSize;
|
|
1015 |
|
|
1016 |
// Copy client id (session and subsession handle). it's used
|
|
1017 |
// for matching phase 1 and 2 of a request
|
|
1018 |
|
|
1019 |
if ( iCBClientId )
|
|
1020 |
{
|
|
1021 |
delete iCBClientId;
|
|
1022 |
iCBClientId = NULL;
|
|
1023 |
}
|
|
1024 |
|
|
1025 |
iCBClientId = new( ELeave ) RMobilePhone::TClientId(
|
|
1026 |
aReqData->iClient );
|
|
1027 |
|
|
1028 |
// Save req handle type
|
|
1029 |
iMmPhone->iReqHandleType =
|
|
1030 |
CMmPhoneTsy::EMultimodePhoneGetCallBarringStatusPhase1;
|
|
1031 |
}
|
|
1032 |
|
|
1033 |
return KErrNone;
|
|
1034 |
}
|
|
1035 |
|
|
1036 |
// ---------------------------------------------------------------------------
|
|
1037 |
// CMmSupplServTsy::GetCallBarringStatusPhase2
|
|
1038 |
// Second phase of fetching call barring status.
|
|
1039 |
// (other items were commented in a header).
|
|
1040 |
// ---------------------------------------------------------------------------
|
|
1041 |
//
|
|
1042 |
TInt CMmSupplServTsy::GetCallBarringStatusPhase2(
|
|
1043 |
const TTsyReqHandle aTsyReqHandle,
|
|
1044 |
RMobilePhone::TClientId const* aClient,
|
|
1045 |
TDes8* aBuf )
|
|
1046 |
{
|
|
1047 |
TInt ret = KErrNone;
|
|
1048 |
// Check if client id matches between phase 1 and phase 2
|
|
1049 |
if ( ( iCBClientId->iSessionHandle == aClient->iSessionHandle ) &&
|
|
1050 |
( iCBClientId->iSubSessionHandle == aClient->iSubSessionHandle ) )
|
|
1051 |
{
|
|
1052 |
// Copy the streamed list to the client
|
|
1053 |
aBuf->Copy( iCBList->Ptr( 0 ) );
|
|
1054 |
|
|
1055 |
// Reset the client Id
|
|
1056 |
delete iCBClientId;
|
|
1057 |
iCBClientId = NULL;
|
|
1058 |
|
|
1059 |
// Reset the list
|
|
1060 |
delete iCBList;
|
|
1061 |
iCBList = NULL;
|
|
1062 |
}
|
|
1063 |
else
|
|
1064 |
{
|
|
1065 |
ret = KErrNotFound;
|
|
1066 |
}
|
|
1067 |
|
|
1068 |
iMmPhone->ReqCompleted( aTsyReqHandle, ret );
|
|
1069 |
|
|
1070 |
return KErrNone;
|
|
1071 |
}
|
|
1072 |
|
|
1073 |
// ---------------------------------------------------------------------------
|
|
1074 |
// CMmSupplServTsy::GetCallBarringStatusPhase2
|
|
1075 |
// This method cancels an outstanding GetCallBarringStatus request.
|
|
1076 |
// (other items were commented in a header).
|
|
1077 |
// ---------------------------------------------------------------------------
|
|
1078 |
//
|
|
1079 |
TInt CMmSupplServTsy::GetCallBarringStatusCancel(
|
|
1080 |
const TTsyReqHandle aTsyReqHandle )
|
|
1081 |
{
|
|
1082 |
iRetCBStatusSize = NULL;
|
|
1083 |
|
|
1084 |
iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1085 |
CMmPhoneTsy::EMultimodePhoneGetCallBarringStatusPhase1 );
|
|
1086 |
|
|
1087 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
1088 |
iSsTransactionOngoing = EFalse;
|
|
1089 |
|
|
1090 |
return KErrNone;
|
|
1091 |
}
|
|
1092 |
|
|
1093 |
// ---------------------------------------------------------------------------
|
|
1094 |
// CMmSupplServTsy::CompleteGetCallBarringStatusPhase1L
|
|
1095 |
// This method completes an outstanding GetCallBarringStatusPhase1 request.
|
|
1096 |
// (other items were commented in a header).
|
|
1097 |
// ---------------------------------------------------------------------------
|
|
1098 |
//
|
|
1099 |
void CMmSupplServTsy::CompleteGetCallBarringStatusPhase1L(
|
|
1100 |
CMobilePhoneCBList* aResults,
|
|
1101 |
TInt aErrorCode )
|
|
1102 |
{
|
|
1103 |
// Reset req handle. Returns the deleted req handle
|
|
1104 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1105 |
CMmPhoneTsy::EMultimodePhoneGetCallBarringStatusPhase1 );
|
|
1106 |
|
|
1107 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
1108 |
{
|
|
1109 |
if ( KErrNone == aErrorCode )
|
|
1110 |
{
|
|
1111 |
// If there's no error, we should have got some results ...
|
|
1112 |
if ( aResults && aResults->Enumerate() > 0 )
|
|
1113 |
{
|
|
1114 |
// Store the streamed list for phase 2
|
|
1115 |
iCBList = aResults->StoreLC();
|
|
1116 |
CleanupStack::Pop(); // Pop the CBufFlat allocated by StoreLC
|
|
1117 |
}
|
|
1118 |
if ( iCBList )
|
|
1119 |
{
|
|
1120 |
// Copy the size of the streamed list to client
|
|
1121 |
*iRetCBStatusSize = iCBList->Size();
|
|
1122 |
}
|
|
1123 |
else
|
|
1124 |
{
|
|
1125 |
TFLOGSTRING("TSY: CMmSupplServTsy::CompleteGetCallBarringStatusPhase1L: No response received.");
|
|
1126 |
aErrorCode = KErrNotFound;
|
|
1127 |
}
|
|
1128 |
}
|
|
1129 |
|
|
1130 |
iRetCBStatusSize = NULL;
|
|
1131 |
iMmPhone->ReqCompleted( reqHandle, aErrorCode );
|
|
1132 |
iSsTransactionOngoing = EFalse;
|
|
1133 |
}
|
|
1134 |
}
|
|
1135 |
|
|
1136 |
// ---------------------------------------------------------------------------
|
|
1137 |
// CMmSupplServTsy::SetCallBarringStatusL
|
|
1138 |
// This method sets the call barring status for the call barring
|
|
1139 |
// condition specified by the aCondition parameter. The client can
|
|
1140 |
// be activating or deactivating the specified CB condition.
|
|
1141 |
// (other items were commented in a header).
|
|
1142 |
// ---------------------------------------------------------------------------
|
|
1143 |
//
|
|
1144 |
TInt CMmSupplServTsy::SetCallBarringStatusL(
|
|
1145 |
const TTsyReqHandle aTsyReqHandle,
|
|
1146 |
RMobilePhone::TMobilePhoneCBCondition* aCondition,
|
|
1147 |
const RMobilePhone::TMobilePhoneCBChangeV1* aInfo )
|
|
1148 |
{
|
|
1149 |
TInt ret = KErrNone;
|
|
1150 |
|
|
1151 |
if ( iSsTransactionOngoing )
|
|
1152 |
{
|
|
1153 |
ret = KErrServerBusy;
|
|
1154 |
}
|
|
1155 |
else if ( KMmTsyMaxLengthOfSSPassword != aInfo->iPassword.Length() )
|
|
1156 |
{
|
|
1157 |
// Password must have full length
|
|
1158 |
ret = CMmCommonStaticUtility::EpocErrorCode( KErrGeneral,
|
|
1159 |
KErrGsmSSPasswordRegistrationFailure );
|
|
1160 |
}
|
|
1161 |
else if ( ( RMobilePhone::EServiceActionActivate != aInfo->iAction ) &&
|
|
1162 |
( RMobilePhone::EServiceActionDeactivate != aInfo->iAction ) &&
|
|
1163 |
( RMobilePhone::EServiceActionRegister != aInfo->iAction ) &&
|
|
1164 |
( RMobilePhone::EServiceActionErase != aInfo->iAction ) )
|
|
1165 |
{
|
|
1166 |
// Status can be set only by above actions
|
|
1167 |
ret = KErrArgument;
|
|
1168 |
}
|
|
1169 |
else if ( ( ( RMobilePhone::EServiceActionDeactivate != aInfo->iAction )
|
|
1170 |
&& ( RMobilePhone::EServiceActionErase != aInfo->iAction ) )
|
|
1171 |
&&
|
|
1172 |
( ( RMobilePhone::EBarAllCases == *aCondition )
|
|
1173 |
|| ( RMobilePhone::EBarAllOutgoingServices == *aCondition )
|
|
1174 |
|| ( RMobilePhone::EBarAllIncomingServices == *aCondition ) ) )
|
|
1175 |
{
|
|
1176 |
// The combined conditions (all calls, all outgoing calls,
|
|
1177 |
// all incoming calls) are legal only for deactivation and erasure
|
|
1178 |
ret = KErrArgument;
|
|
1179 |
}
|
|
1180 |
else
|
|
1181 |
{
|
|
1182 |
// Forward the request to DOS
|
|
1183 |
// packed parameters: a RMobilePhone::TMobilePhoneCBCondition
|
|
1184 |
// and a RMobilePhone::TMobilePhoneCBChangeV1
|
|
1185 |
CMmDataPackage package;
|
|
1186 |
package.PackData( aCondition,
|
|
1187 |
const_cast<RMobilePhone::TMobilePhoneCBChangeV1**>( &aInfo ) );
|
|
1188 |
ret = iMmPhone->MessageManager()->HandleRequestL(
|
|
1189 |
EMobilePhoneSetCallBarringStatus, &package );
|
|
1190 |
iSsTransactionOngoing = ETrue;
|
|
1191 |
}
|
|
1192 |
if ( ret != KErrNone )
|
|
1193 |
{
|
|
1194 |
iMmPhone->ReqCompleted( aTsyReqHandle, ret );
|
|
1195 |
iSsTransactionOngoing = EFalse;
|
|
1196 |
}
|
|
1197 |
else
|
|
1198 |
{
|
|
1199 |
//Save req handle type
|
|
1200 |
iMmPhone->iReqHandleType =
|
|
1201 |
CMmPhoneTsy::EMultimodePhoneSetCallBarringStatus;
|
|
1202 |
}
|
|
1203 |
|
|
1204 |
return KErrNone;
|
|
1205 |
}
|
|
1206 |
|
|
1207 |
// ---------------------------------------------------------------------------
|
|
1208 |
// CMmSupplServTsy::CompleteSetCallBarringStatus
|
|
1209 |
// This method completes an outstanding asynchronous
|
|
1210 |
// SetCallBarringStatus request.
|
|
1211 |
// (other items were commented in a header).
|
|
1212 |
// ---------------------------------------------------------------------------
|
|
1213 |
//
|
|
1214 |
void CMmSupplServTsy::CompleteSetCallBarringStatus(
|
|
1215 |
TInt aErrorCode )
|
|
1216 |
{
|
|
1217 |
// Reset req handle. Returns the deleted req handle
|
|
1218 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1219 |
CMmPhoneTsy::EMultimodePhoneSetCallBarringStatus );
|
|
1220 |
|
|
1221 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
1222 |
{
|
|
1223 |
iMmPhone->ReqCompleted( reqHandle, aErrorCode );
|
|
1224 |
iSsTransactionOngoing = EFalse;
|
|
1225 |
}
|
|
1226 |
}
|
|
1227 |
|
|
1228 |
// ---------------------------------------------------------------------------
|
|
1229 |
// CMmSupplServTsy::SetCallBarringStatusCancel
|
|
1230 |
// This method cancels setting of the call barring status.
|
|
1231 |
// (other items were commented in a header).
|
|
1232 |
// ---------------------------------------------------------------------------
|
|
1233 |
//
|
|
1234 |
TInt CMmSupplServTsy::SetCallBarringStatusCancel(
|
|
1235 |
const TTsyReqHandle aTsyReqHandle ) //Request status
|
|
1236 |
{
|
|
1237 |
TTsyReqHandle cancelSetCallBarringStatus = iMmPhone->iTsyReqHandleStore->
|
|
1238 |
ResetTsyReqHandle( CMmPhoneTsy::EMultimodePhoneSetCallBarringStatus );
|
|
1239 |
|
|
1240 |
if ( !cancelSetCallBarringStatus )
|
|
1241 |
{
|
|
1242 |
//The request is already in processing because of previous request
|
|
1243 |
//Complete request with status value informing the client about
|
|
1244 |
//the situation.
|
|
1245 |
TFLOGSTRING("TSY: CMmPhoneTsy::SetCallBarringStatusCancel - KErrServerBusy");
|
|
1246 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
1247 |
}
|
|
1248 |
else
|
|
1249 |
{
|
|
1250 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
1251 |
}
|
|
1252 |
iSsTransactionOngoing = EFalse;
|
|
1253 |
|
|
1254 |
return KErrNone;
|
|
1255 |
}
|
|
1256 |
|
|
1257 |
// ---------------------------------------------------------------------------
|
|
1258 |
// CMmSupplServTsy::NotifyCallBarringStatusChange
|
|
1259 |
// This request allows a client to be notified when the status
|
|
1260 |
// or associated information changes for any of the call barring conditions
|
|
1261 |
// as applied to any of the call service groups.
|
|
1262 |
// (other items were commented in a header).
|
|
1263 |
// ---------------------------------------------------------------------------
|
|
1264 |
//
|
|
1265 |
TInt CMmSupplServTsy::NotifyCallBarringStatusChange(
|
|
1266 |
RMobilePhone::TMobilePhoneCBCondition* aCondition )
|
|
1267 |
{
|
|
1268 |
iRetCallBarringCondition = aCondition;
|
|
1269 |
// Save req handle type
|
|
1270 |
iMmPhone->iReqHandleType =
|
|
1271 |
CMmPhoneTsy::EMultimodePhoneNotifyCallBarringStatusChange;
|
|
1272 |
|
|
1273 |
return KErrNone;
|
|
1274 |
}
|
|
1275 |
|
|
1276 |
// ---------------------------------------------------------------------------
|
|
1277 |
// CMmSupplServTsy::NotifyCallBarringStatusChangeCancel
|
|
1278 |
// This method cancels an outstanding asynchronous
|
|
1279 |
// NotifyCallBarringStatusChange request.
|
|
1280 |
// (other items were commented in a header).
|
|
1281 |
// ---------------------------------------------------------------------------
|
|
1282 |
//
|
|
1283 |
TInt CMmSupplServTsy::NotifyCallBarringStatusChangeCancel(
|
|
1284 |
const TTsyReqHandle aTsyReqHandle ) // tsy request handle
|
|
1285 |
{
|
|
1286 |
iRetCallBarringCondition = NULL;
|
|
1287 |
iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1288 |
CMmPhoneTsy::EMultimodePhoneNotifyCallBarringStatusChange );
|
|
1289 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
1290 |
|
|
1291 |
return KErrNone;
|
|
1292 |
}
|
|
1293 |
|
|
1294 |
// ---------------------------------------------------------------------------
|
|
1295 |
// CMmSupplServTsy::CompleteNotifyCallBarringStatusChange
|
|
1296 |
// This method completes an outstanding asynchronous
|
|
1297 |
// NotifyCallBarringStatusChange request.
|
|
1298 |
// (other items were commented in a header).
|
|
1299 |
// ---------------------------------------------------------------------------
|
|
1300 |
//
|
|
1301 |
void CMmSupplServTsy::CompleteNotifyCallBarringStatusChange(
|
|
1302 |
RMobilePhone::TMobilePhoneCBCondition aCondition )
|
|
1303 |
{
|
|
1304 |
// Reset req handle. Returns the deleted req handle
|
|
1305 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1306 |
CMmPhoneTsy::EMultimodePhoneNotifyCallBarringStatusChange );
|
|
1307 |
|
|
1308 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
1309 |
{
|
|
1310 |
*iRetCallBarringCondition = aCondition;
|
|
1311 |
iRetCallBarringCondition = NULL;
|
|
1312 |
iMmPhone->ReqCompleted( reqHandle, KErrNone );
|
|
1313 |
}
|
|
1314 |
}
|
|
1315 |
|
|
1316 |
// ---------------------------------------------------------------------------
|
|
1317 |
// CMmSupplServTsy::SetSSPasswordL
|
|
1318 |
// This method allows the client to change the call barring
|
|
1319 |
// password or common SS password.
|
|
1320 |
// (other items were commented in a header).
|
|
1321 |
// ---------------------------------------------------------------------------
|
|
1322 |
//
|
|
1323 |
TInt CMmSupplServTsy::SetSSPasswordL(
|
|
1324 |
const TTsyReqHandle aTsyReqHandle, // Tsy request handle
|
|
1325 |
TDes8* aPasswordPckg, // Password package
|
|
1326 |
TInt const* aSsService ) // SS service
|
|
1327 |
{
|
|
1328 |
TInt ret = KErrArgument;
|
|
1329 |
if ( iSsTransactionOngoing )
|
|
1330 |
{
|
|
1331 |
ret = KErrServerBusy;
|
|
1332 |
}
|
|
1333 |
// Check if parameter aSsService contains one of the two valid service
|
|
1334 |
// codes: According to 3GPP TS 22.030 V5.0.0 (2002-06), the only two
|
|
1335 |
// valid cases are
|
|
1336 |
// "Password for Barring Services" = 330
|
|
1337 |
// "Common Password for All Appropriate Services" = 0
|
|
1338 |
else if ( ( 330 == *aSsService ) || ( 0 == *aSsService ) )
|
|
1339 |
{
|
|
1340 |
TPckg<RMobilePhone::TMobilePhonePasswordChangeV2>* ssPasswordPckg =
|
|
1341 |
reinterpret_cast<TPckg<RMobilePhone::TMobilePhonePasswordChangeV2>*>
|
|
1342 |
( aPasswordPckg );
|
|
1343 |
RMobilePhone::TMobilePhonePasswordChangeV2& ssPassword =
|
|
1344 |
( *ssPasswordPckg )();
|
|
1345 |
|
|
1346 |
TFLOGSTRING2("TSY: CMmSupplServTsy::SetSSPassword - SS service: %d",
|
|
1347 |
*aSsService );
|
|
1348 |
|
|
1349 |
TFLOGSTRING2("TSY: CMmSupplServTsy::SetSSPassword - Old PW: %S",
|
|
1350 |
&ssPassword.iOldPassword );
|
|
1351 |
|
|
1352 |
TFLOGSTRING3("TSY: CMmSupplServTsy::SetSSPassword - New PW: %S, Verify PW: %S",
|
|
1353 |
&ssPassword.iNewPassword, &ssPassword.iVerifiedPassword );
|
|
1354 |
|
|
1355 |
// Packed parameters: TMobilePhonePasswordChangeV2 and TUint16
|
|
1356 |
TUint16 ssServiceUnsigned = static_cast<TUint16>( *aSsService );
|
|
1357 |
CMmDataPackage dataPackage;
|
|
1358 |
dataPackage.PackData( &ssPassword, &ssServiceUnsigned );
|
|
1359 |
ret = iMmPhone->MessageManager()->HandleRequestL(
|
|
1360 |
EMobilePhoneSetSSPassword, &dataPackage );
|
|
1361 |
iSsTransactionOngoing = ETrue;
|
|
1362 |
}
|
|
1363 |
if ( KErrNone != ret )
|
|
1364 |
{
|
|
1365 |
iMmPhone->ReqCompleted( aTsyReqHandle, ret );
|
|
1366 |
iSsTransactionOngoing = EFalse;
|
|
1367 |
}
|
|
1368 |
else
|
|
1369 |
{
|
|
1370 |
// Save req handle type
|
|
1371 |
iMmPhone->iReqHandleType = CMmPhoneTsy::EMultimodePhoneSetSSPassword;
|
|
1372 |
}
|
|
1373 |
|
|
1374 |
return KErrNone;
|
|
1375 |
}
|
|
1376 |
|
|
1377 |
// ---------------------------------------------------------------------------
|
|
1378 |
// CMmSupplServTsy::CompleteSetSSPassword
|
|
1379 |
// This method completes an outstanding asynchronous SetSSPassword request.
|
|
1380 |
// (other items were commented in a header).
|
|
1381 |
// ---------------------------------------------------------------------------
|
|
1382 |
//
|
|
1383 |
void CMmSupplServTsy::CompleteSetSSPassword(
|
|
1384 |
TInt aErrorCode ) // Error code
|
|
1385 |
{
|
|
1386 |
// Reset req handle. Returns the deleted req handle
|
|
1387 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1388 |
CMmPhoneTsy::EMultimodePhoneSetSSPassword );
|
|
1389 |
|
|
1390 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
1391 |
{
|
|
1392 |
// Complete the client request
|
|
1393 |
iMmPhone->ReqCompleted( reqHandle, aErrorCode );
|
|
1394 |
iSsTransactionOngoing = EFalse;
|
|
1395 |
}
|
|
1396 |
}
|
|
1397 |
|
|
1398 |
// ---------------------------------------------------------------------------
|
|
1399 |
// CMmSupplServTsy::SetSSPasswordCancel
|
|
1400 |
// This method cancels setting of the SS password.
|
|
1401 |
// (other items were commented in a header).
|
|
1402 |
// ---------------------------------------------------------------------------
|
|
1403 |
//
|
|
1404 |
TInt CMmSupplServTsy::SetSSPasswordCancel(
|
|
1405 |
const TTsyReqHandle aTsyReqHandle )
|
|
1406 |
{
|
|
1407 |
TTsyReqHandle cancelSetSSPasswordHandle =
|
|
1408 |
iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1409 |
CMmPhoneTsy::EMultimodePhoneSetSSPassword );
|
|
1410 |
|
|
1411 |
if ( !cancelSetSSPasswordHandle )
|
|
1412 |
{
|
|
1413 |
//The request is already in processing because of previous request
|
|
1414 |
//Complete request with status value informing the client about
|
|
1415 |
//the situation.
|
|
1416 |
TFLOGSTRING("TSY: CMmSupplServTsy::SetSSPasswordCancel - KErrServerBusy");
|
|
1417 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
1418 |
}
|
|
1419 |
else
|
|
1420 |
{
|
|
1421 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
1422 |
}
|
|
1423 |
iSsTransactionOngoing = EFalse;
|
|
1424 |
|
|
1425 |
return KErrNone;
|
|
1426 |
}
|
|
1427 |
|
|
1428 |
// ---------------------------------------------------------------------------
|
|
1429 |
// CMmSupplServTsy::GetCallWaitingStatusPhase1L
|
|
1430 |
// First phase of fetching call waiting status.
|
|
1431 |
// (other items were commented in a header).
|
|
1432 |
// ---------------------------------------------------------------------------
|
|
1433 |
//
|
|
1434 |
TInt CMmSupplServTsy::GetCallWaitingStatusPhase1L(
|
|
1435 |
const TTsyReqHandle aTsyReqHandle,
|
|
1436 |
CRetrieveMobilePhoneCWList::TGetCallWaitingRequest const* aReqData,
|
|
1437 |
TInt* aBufSize )
|
|
1438 |
{
|
|
1439 |
TInt ret = KErrNone;
|
|
1440 |
if ( iSsTransactionOngoing )
|
|
1441 |
{
|
|
1442 |
ret = KErrServerBusy;
|
|
1443 |
}
|
|
1444 |
else if ( RMobilePhone::EInfoLocationCache == aReqData->iLocation )
|
|
1445 |
{
|
|
1446 |
// Cache not supported
|
|
1447 |
ret = KErrNotFound;
|
|
1448 |
}
|
|
1449 |
else
|
|
1450 |
{
|
|
1451 |
// Forward the request to DOS
|
|
1452 |
// no packed parameters
|
|
1453 |
ret = iMmPhone->MessageManager()->HandleRequestL(
|
|
1454 |
EMobilePhoneGetWaitingStatusPhase1 );
|
|
1455 |
iSsTransactionOngoing = ETrue;
|
|
1456 |
}
|
|
1457 |
|
|
1458 |
if ( ret != KErrNone )
|
|
1459 |
{
|
|
1460 |
iMmPhone->ReqCompleted( aTsyReqHandle, ret );
|
|
1461 |
iSsTransactionOngoing = EFalse;
|
|
1462 |
}
|
|
1463 |
else
|
|
1464 |
{
|
|
1465 |
// Save return pointer for list size
|
|
1466 |
iRetCWStatusSize = aBufSize;
|
|
1467 |
|
|
1468 |
// Copy client id (session and subsession handle). it's used for
|
|
1469 |
// matching phase 1 and 2 of a request
|
|
1470 |
|
|
1471 |
if ( iCWClientId )
|
|
1472 |
{
|
|
1473 |
delete iCWClientId;
|
|
1474 |
iCWClientId = NULL;
|
|
1475 |
}
|
|
1476 |
|
|
1477 |
iCWClientId = new( ELeave ) RMobilePhone::TClientId(
|
|
1478 |
aReqData->iClient );
|
|
1479 |
|
|
1480 |
// Save req handle type
|
|
1481 |
iMmPhone->iReqHandleType =
|
|
1482 |
CMmPhoneTsy::EMultimodePhoneGetCallWaitingStatusPhase1;
|
|
1483 |
}
|
|
1484 |
|
|
1485 |
return KErrNone;
|
|
1486 |
}
|
|
1487 |
|
|
1488 |
// ---------------------------------------------------------------------------
|
|
1489 |
// CMmSupplServTsy::GetCallWaitingStatusPhase2
|
|
1490 |
// Second phase of fetching call waiting status.
|
|
1491 |
// (other items were commented in a header).
|
|
1492 |
// ---------------------------------------------------------------------------
|
|
1493 |
//
|
|
1494 |
TInt CMmSupplServTsy::GetCallWaitingStatusPhase2(
|
|
1495 |
const TTsyReqHandle aTsyReqHandle,
|
|
1496 |
RMobilePhone::TClientId const* aClient,
|
|
1497 |
TDes8* aBuf )
|
|
1498 |
{
|
|
1499 |
TInt ret = KErrNone;
|
|
1500 |
// Check if client id matches between phase 1 and phase 2
|
|
1501 |
if ( ( iCWClientId->iSessionHandle == aClient->iSessionHandle ) &&
|
|
1502 |
( iCWClientId->iSubSessionHandle == aClient->iSubSessionHandle ) )
|
|
1503 |
{
|
|
1504 |
// Copy the streamed list to the client
|
|
1505 |
aBuf->Copy( iCWList->Ptr( 0 ) );
|
|
1506 |
|
|
1507 |
// Reset the client Id
|
|
1508 |
delete iCWClientId;
|
|
1509 |
iCWClientId = NULL;
|
|
1510 |
|
|
1511 |
// Reset the list
|
|
1512 |
delete iCWList;
|
|
1513 |
iCWList = NULL;
|
|
1514 |
}
|
|
1515 |
else
|
|
1516 |
{
|
|
1517 |
ret = KErrNotFound;
|
|
1518 |
}
|
|
1519 |
|
|
1520 |
iMmPhone->ReqCompleted( aTsyReqHandle, ret );
|
|
1521 |
|
|
1522 |
return KErrNone;
|
|
1523 |
}
|
|
1524 |
|
|
1525 |
// ---------------------------------------------------------------------------
|
|
1526 |
// CMmSupplServTsy::GetCallWaitingStatusCancel
|
|
1527 |
// This method cancels an outstanding GetCallWaitingStatus request.
|
|
1528 |
// (other items were commented in a header).
|
|
1529 |
// ---------------------------------------------------------------------------
|
|
1530 |
//
|
|
1531 |
TInt CMmSupplServTsy::GetCallWaitingStatusCancel(
|
|
1532 |
const TTsyReqHandle aTsyReqHandle )
|
|
1533 |
{
|
|
1534 |
iRetCWStatusSize = NULL;
|
|
1535 |
|
|
1536 |
iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1537 |
CMmPhoneTsy::EMultimodePhoneGetCallWaitingStatusPhase1 );
|
|
1538 |
|
|
1539 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
1540 |
iSsTransactionOngoing = EFalse;
|
|
1541 |
|
|
1542 |
return KErrNone;
|
|
1543 |
}
|
|
1544 |
|
|
1545 |
// ---------------------------------------------------------------------------
|
|
1546 |
// CMmSupplServTsy::CompleteGetCallWaitingStatusPhase1L
|
|
1547 |
// This method completes an outstanding GetCallWaitingStatusPhase1L request.
|
|
1548 |
// (other items were commented in a header).
|
|
1549 |
// ---------------------------------------------------------------------------
|
|
1550 |
//
|
|
1551 |
void CMmSupplServTsy::CompleteGetCallWaitingStatusPhase1L(
|
|
1552 |
CMobilePhoneCWList* aResults,
|
|
1553 |
TInt aErrorCode )
|
|
1554 |
{
|
|
1555 |
// Reset req handle. Returns the deleted req handle
|
|
1556 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1557 |
CMmPhoneTsy::EMultimodePhoneGetCallWaitingStatusPhase1 );
|
|
1558 |
|
|
1559 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
1560 |
{
|
|
1561 |
if ( KErrNone == aErrorCode )
|
|
1562 |
{
|
|
1563 |
// If there's no error, we should have got some results ...
|
|
1564 |
if ( aResults )
|
|
1565 |
{
|
|
1566 |
// Store the streamed list for phase 2
|
|
1567 |
iCWList = aResults->StoreLC();
|
|
1568 |
CleanupStack::Pop(); // Pop the CBufFlat allocated by StoreLC
|
|
1569 |
}
|
|
1570 |
|
|
1571 |
if ( iCWList )
|
|
1572 |
{
|
|
1573 |
// Copy the size of the streamed list to client
|
|
1574 |
*iRetCWStatusSize = iCWList->Size();
|
|
1575 |
}
|
|
1576 |
else
|
|
1577 |
{
|
|
1578 |
TFLOGSTRING("TSY: CMmSupplServTsy::CompleteGetCallWaitingStatusPhase1L: No response received.");
|
|
1579 |
aErrorCode = KErrNotFound;
|
|
1580 |
}
|
|
1581 |
}
|
|
1582 |
|
|
1583 |
iRetCWStatusSize = NULL;
|
|
1584 |
iMmPhone->ReqCompleted( reqHandle, aErrorCode );
|
|
1585 |
iSsTransactionOngoing = EFalse;
|
|
1586 |
}
|
|
1587 |
}
|
|
1588 |
|
|
1589 |
// ---------------------------------------------------------------------------
|
|
1590 |
// CMmSupplServTsy::SetCallWaitingStatusL
|
|
1591 |
// This method sets the call waiting status. The client can be activating
|
|
1592 |
// or deactivating the CW service.
|
|
1593 |
// (other items were commented in a header).
|
|
1594 |
// ---------------------------------------------------------------------------
|
|
1595 |
//
|
|
1596 |
TInt CMmSupplServTsy::SetCallWaitingStatusL(
|
|
1597 |
const TTsyReqHandle aTsyReqHandle,
|
|
1598 |
RMobilePhone::TMobileService* aServiceGroup,
|
|
1599 |
RMobilePhone::TMobilePhoneServiceAction* aAction )
|
|
1600 |
{
|
|
1601 |
TInt ret = KErrNone;
|
|
1602 |
if ( iSsTransactionOngoing )
|
|
1603 |
{
|
|
1604 |
ret = KErrServerBusy;
|
|
1605 |
}
|
|
1606 |
else if ( ( RMobilePhone::EServiceActionActivate != *aAction ) &&
|
|
1607 |
( RMobilePhone::EServiceActionDeactivate != *aAction ) )
|
|
1608 |
{
|
|
1609 |
// Status can be set only by above actions
|
|
1610 |
ret = KErrArgument;
|
|
1611 |
}
|
|
1612 |
else
|
|
1613 |
{
|
|
1614 |
// Forward the request to DOS
|
|
1615 |
// packed parameters: a TMobileService and a TMobilePhoneServiceAction
|
|
1616 |
CMmDataPackage package;
|
|
1617 |
package.PackData( aServiceGroup, aAction );
|
|
1618 |
ret = iMmPhone->MessageManager()->HandleRequestL(
|
|
1619 |
EMobilePhoneSetCallWaitingStatus, &package );
|
|
1620 |
iSsTransactionOngoing = ETrue;
|
|
1621 |
}
|
|
1622 |
|
|
1623 |
if ( ret != KErrNone )
|
|
1624 |
{
|
|
1625 |
iMmPhone->ReqCompleted( aTsyReqHandle, ret );
|
|
1626 |
iSsTransactionOngoing = EFalse;
|
|
1627 |
}
|
|
1628 |
else
|
|
1629 |
{
|
|
1630 |
// Save req handle type
|
|
1631 |
iMmPhone->iReqHandleType =
|
|
1632 |
CMmPhoneTsy::EMultimodePhoneSetCallWaitingStatus;
|
|
1633 |
}
|
|
1634 |
|
|
1635 |
return KErrNone;
|
|
1636 |
}
|
|
1637 |
|
|
1638 |
// ---------------------------------------------------------------------------
|
|
1639 |
// CMmSupplServTsy::CompleteSetCallWaitingStatus
|
|
1640 |
// This method completes an outstanding asynchronous SetCallWaitingStatus
|
|
1641 |
// request.
|
|
1642 |
// (other items were commented in a header).
|
|
1643 |
// ---------------------------------------------------------------------------
|
|
1644 |
//
|
|
1645 |
void CMmSupplServTsy::CompleteSetCallWaitingStatus(
|
|
1646 |
TInt aErrorCode )
|
|
1647 |
{
|
|
1648 |
// Reset req handle. Returns the deleted req handle
|
|
1649 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1650 |
CMmPhoneTsy::EMultimodePhoneSetCallWaitingStatus );
|
|
1651 |
|
|
1652 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
1653 |
{
|
|
1654 |
iMmPhone->ReqCompleted( reqHandle, aErrorCode );
|
|
1655 |
iSsTransactionOngoing = EFalse;
|
|
1656 |
}
|
|
1657 |
}
|
|
1658 |
|
|
1659 |
// ---------------------------------------------------------------------------
|
|
1660 |
// CMmSupplServTsy::SetCallWaitingStatusCancel
|
|
1661 |
// This method cancels setting of the call waiting status.
|
|
1662 |
// (other items were commented in a header).
|
|
1663 |
// ---------------------------------------------------------------------------
|
|
1664 |
//
|
|
1665 |
TInt CMmSupplServTsy::SetCallWaitingStatusCancel(
|
|
1666 |
const TTsyReqHandle aTsyReqHandle )
|
|
1667 |
{
|
|
1668 |
TTsyReqHandle cancelSetCallWaitingStatusHandle =
|
|
1669 |
iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1670 |
CMmPhoneTsy::EMultimodePhoneSetCallWaitingStatus );
|
|
1671 |
|
|
1672 |
if ( !cancelSetCallWaitingStatusHandle )
|
|
1673 |
{
|
|
1674 |
//The request is already in processing because of previous request
|
|
1675 |
//Complete request with status value informing the client about
|
|
1676 |
//the situation.
|
|
1677 |
TFLOGSTRING("TSY: CMmSupplServTsy::SetCallWaitingStatusCancel - KErrServerBusy");
|
|
1678 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
1679 |
}
|
|
1680 |
else
|
|
1681 |
{
|
|
1682 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
1683 |
}
|
|
1684 |
iSsTransactionOngoing = EFalse;
|
|
1685 |
|
|
1686 |
return KErrNone;
|
|
1687 |
}
|
|
1688 |
|
|
1689 |
// ---------------------------------------------------------------------------
|
|
1690 |
// CMmSupplServTsy::NotifyCallWaitingStatusChange
|
|
1691 |
// This request allows a client to be notified when the status
|
|
1692 |
// changes for the call waiting service as applied to any of the call
|
|
1693 |
// service groups.
|
|
1694 |
// (other items were commented in a header).
|
|
1695 |
// ---------------------------------------------------------------------------
|
|
1696 |
//
|
|
1697 |
TInt CMmSupplServTsy::NotifyCallWaitingStatusChange(
|
|
1698 |
TDes8* aCWStatus )
|
|
1699 |
{
|
|
1700 |
TInt ret = KErrArgument;
|
|
1701 |
|
|
1702 |
if ( sizeof( RMobilePhone::TMobilePhoneCWInfoEntryV1 ) <=
|
|
1703 |
aCWStatus->MaxLength() )
|
|
1704 |
{
|
|
1705 |
ret = KErrNone;
|
|
1706 |
iRetNotifyCallWaitingStatus = aCWStatus;
|
|
1707 |
|
|
1708 |
// Save req handle type
|
|
1709 |
iMmPhone->iReqHandleType = CMmPhoneTsy::EMultimodePhoneNotifyCallWaitingStatusChange;
|
|
1710 |
}
|
|
1711 |
|
|
1712 |
return ret;
|
|
1713 |
}
|
|
1714 |
|
|
1715 |
// ---------------------------------------------------------------------------
|
|
1716 |
// CMmSupplServTsy::NotifyCallWaitingStatusChangeCancel
|
|
1717 |
// This method cancels an outstanding asynchronous
|
|
1718 |
// NotifyCallWaitingStatusChange request.
|
|
1719 |
// (other items were commented in a header).
|
|
1720 |
// ---------------------------------------------------------------------------
|
|
1721 |
//
|
|
1722 |
TInt CMmSupplServTsy::NotifyCallWaitingStatusChangeCancel(
|
|
1723 |
const TTsyReqHandle aTsyReqHandle )
|
|
1724 |
{
|
|
1725 |
iRetNotifyCallWaitingStatus = NULL;
|
|
1726 |
iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1727 |
CMmPhoneTsy::EMultimodePhoneNotifyCallWaitingStatusChange );
|
|
1728 |
|
|
1729 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
1730 |
|
|
1731 |
return KErrNone;
|
|
1732 |
}
|
|
1733 |
|
|
1734 |
// ---------------------------------------------------------------------------
|
|
1735 |
// CMmSupplServTsy::CompleteNotifyCallWaitingStatusChange
|
|
1736 |
// This method cancels an outstanding asynchronous
|
|
1737 |
// NotifyCallWaitingStatusChange request.
|
|
1738 |
// (other items were commented in a header).
|
|
1739 |
// ---------------------------------------------------------------------------
|
|
1740 |
//
|
|
1741 |
void CMmSupplServTsy::CompleteNotifyCallWaitingStatusChange(
|
|
1742 |
RMobilePhone::TMobilePhoneCWInfoEntryV1 const* aChangedCwStatus )
|
|
1743 |
{
|
|
1744 |
// Reset req handle. Returns the deleted req handle
|
|
1745 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1746 |
CMmPhoneTsy::EMultimodePhoneNotifyCallWaitingStatusChange );
|
|
1747 |
|
|
1748 |
if( ( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
1749 |
&& ( NULL != iRetNotifyCallWaitingStatus ) )
|
|
1750 |
{
|
|
1751 |
// Pack status information
|
|
1752 |
RMobilePhone::TMobilePhoneCWInfoEntryV1Pckg* cwStatusPckg =
|
|
1753 |
reinterpret_cast<RMobilePhone::TMobilePhoneCWInfoEntryV1Pckg*>(
|
|
1754 |
iRetNotifyCallWaitingStatus );
|
|
1755 |
RMobilePhone::TMobilePhoneCWInfoEntryV1& cwStatus =
|
|
1756 |
( *cwStatusPckg )();
|
|
1757 |
|
|
1758 |
cwStatus.iServiceGroup = aChangedCwStatus->iServiceGroup;
|
|
1759 |
cwStatus.iStatus = aChangedCwStatus->iStatus;
|
|
1760 |
|
|
1761 |
iRetNotifyCallWaitingStatus = NULL;
|
|
1762 |
iMmPhone->ReqCompleted( reqHandle, KErrNone );
|
|
1763 |
}
|
|
1764 |
}
|
|
1765 |
|
|
1766 |
// ---------------------------------------------------------------------------
|
|
1767 |
// CMmSupplServTsy::GetIdentityServiceStatusL
|
|
1768 |
// This method reads the current status of the Identity Service.
|
|
1769 |
// (other items were commented in a header).
|
|
1770 |
// ---------------------------------------------------------------------------
|
|
1771 |
TInt CMmSupplServTsy::GetIdentityServiceStatusL(
|
|
1772 |
const TTsyReqHandle aTsyReqHandle,
|
|
1773 |
RMobilePhone::TIdServiceAndLocation* aServiceAndLocation,
|
|
1774 |
RMobilePhone::TMobilePhoneIdServiceStatus* aStatus )
|
|
1775 |
{
|
|
1776 |
TInt ret = KErrNone;
|
|
1777 |
// Check some error cases first
|
|
1778 |
if ( iSsTransactionOngoing )
|
|
1779 |
{
|
|
1780 |
ret = KErrServerBusy;
|
|
1781 |
}
|
|
1782 |
else if ( RMobilePhone::EInfoLocationCache ==
|
|
1783 |
aServiceAndLocation->iLocation )
|
|
1784 |
{
|
|
1785 |
// No cache implemented
|
|
1786 |
ret = KErrNotFound;
|
|
1787 |
}
|
|
1788 |
else
|
|
1789 |
{
|
|
1790 |
// Forward the request to DOS
|
|
1791 |
// packed parameter: TMobilePhoneIdService (service code)
|
|
1792 |
CMmDataPackage package;
|
|
1793 |
package.PackData( &aServiceAndLocation->iService );
|
|
1794 |
ret = iMmPhone->MessageManager()->HandleRequestL(
|
|
1795 |
EMobilePhoneGetIdentityServiceStatus, &package );
|
|
1796 |
iSsTransactionOngoing = ETrue;
|
|
1797 |
}
|
|
1798 |
if ( ret != KErrNone )
|
|
1799 |
{
|
|
1800 |
iMmPhone->ReqCompleted( aTsyReqHandle, ret );
|
|
1801 |
iSsTransactionOngoing = EFalse;
|
|
1802 |
}
|
|
1803 |
else
|
|
1804 |
{
|
|
1805 |
// Save return pointer for list size
|
|
1806 |
iRetGetIdentityServiceStatus = aStatus;
|
|
1807 |
|
|
1808 |
// Save req handle type
|
|
1809 |
iMmPhone->iReqHandleType =
|
|
1810 |
CMmPhoneTsy::EMultimodePhoneGetIdentityServiceStatus;
|
|
1811 |
}
|
|
1812 |
|
|
1813 |
return KErrNone;
|
|
1814 |
}
|
|
1815 |
|
|
1816 |
// ---------------------------------------------------------------------------
|
|
1817 |
// CMmSupplServTsy::GetIdentityServiceStatusCancel
|
|
1818 |
// This method cancels an outstanding asynchronous GetIdentityServiceStatus
|
|
1819 |
// method.
|
|
1820 |
// (other items were commented in a header).
|
|
1821 |
// ---------------------------------------------------------------------------
|
|
1822 |
TInt CMmSupplServTsy::GetIdentityServiceStatusCancel(
|
|
1823 |
const TTsyReqHandle aTsyReqHandle )
|
|
1824 |
{
|
|
1825 |
iRetGetIdentityServiceStatus = NULL;
|
|
1826 |
|
|
1827 |
iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1828 |
CMmPhoneTsy::EMultimodePhoneGetIdentityServiceStatus );
|
|
1829 |
|
|
1830 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
1831 |
iSsTransactionOngoing = EFalse;
|
|
1832 |
|
|
1833 |
return KErrNone;
|
|
1834 |
}
|
|
1835 |
|
|
1836 |
// ---------------------------------------------------------------------------
|
|
1837 |
// CMmSupplServTsy::CompleteGetIdentityServiceStatus
|
|
1838 |
// Completes the GetIdentityServiceStatus request.
|
|
1839 |
// (other items were commented in a header).
|
|
1840 |
// ---------------------------------------------------------------------------
|
|
1841 |
void CMmSupplServTsy::CompleteGetIdentityServiceStatus(
|
|
1842 |
RMobilePhone::TMobilePhoneIdServiceStatus aStatus,
|
|
1843 |
TInt aErrorCode )
|
|
1844 |
{
|
|
1845 |
// Reset req handle. Returns the deleted req handle
|
|
1846 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1847 |
CMmPhoneTsy::EMultimodePhoneGetIdentityServiceStatus );
|
|
1848 |
|
|
1849 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
1850 |
{
|
|
1851 |
if ( KErrNone == aErrorCode )
|
|
1852 |
{
|
|
1853 |
// Copy the returned status to client
|
|
1854 |
*iRetGetIdentityServiceStatus = aStatus;
|
|
1855 |
}
|
|
1856 |
|
|
1857 |
iRetGetIdentityServiceStatus = NULL;
|
|
1858 |
iMmPhone->ReqCompleted( reqHandle, aErrorCode );
|
|
1859 |
iSsTransactionOngoing = EFalse;
|
|
1860 |
}
|
|
1861 |
}
|
|
1862 |
|
|
1863 |
// ---------------------------------------------------------------------------
|
|
1864 |
// CMmSupplServTsy::SendNetworkServiceRequestL
|
|
1865 |
// This method sends a network service request string ( e.g. a SS string
|
|
1866 |
// entered by the user ) directly to the serving network.
|
|
1867 |
// (other items were commented in a header).
|
|
1868 |
// ---------------------------------------------------------------------------
|
|
1869 |
TInt CMmSupplServTsy::SendNetworkServiceRequestL(
|
|
1870 |
const TTsyReqHandle aTsyReqHandle,
|
|
1871 |
const TDesC* aServiceString )
|
|
1872 |
{
|
|
1873 |
TInt ret = KErrNone;
|
|
1874 |
TFLOGSTRING2("TSY: CMmSupplServTsy::SendNetworkServiceRequestL: iSsNoFdnCheckFlag: %d", iSsNoFdnCheckFlag);
|
|
1875 |
if ( iSsTransactionOngoing )
|
|
1876 |
{
|
|
1877 |
ret = KErrServerBusy;
|
|
1878 |
}
|
|
1879 |
else
|
|
1880 |
{
|
|
1881 |
// Forward the request to DOS
|
|
1882 |
// packed parameter:TDesC* (service string)
|
|
1883 |
CMmDataPackage package;
|
|
1884 |
package.PackData( &aServiceString );
|
|
1885 |
|
|
1886 |
if( iSsNoFdnCheckFlag == ESsNoFdnCheckUsed )
|
|
1887 |
{
|
|
1888 |
ret = iMmPhone->MessageManager()->HandleRequestL(
|
|
1889 |
EMobilePhoneSendNetworkServiceRequestNoFdnCheck, &package );
|
|
1890 |
}
|
|
1891 |
if ( iSsNoFdnCheckFlag == ESsNoFdnCheckNotUsed )
|
|
1892 |
{
|
|
1893 |
ret = iMmPhone->MessageManager()->HandleRequestL(
|
|
1894 |
EMobilePhoneSendNetworkServiceRequest, &package );
|
|
1895 |
}
|
|
1896 |
|
|
1897 |
iSsTransactionOngoing = ETrue;
|
|
1898 |
}
|
|
1899 |
|
|
1900 |
if ( ret != KErrNone )
|
|
1901 |
{
|
|
1902 |
iMmPhone->ReqCompleted( aTsyReqHandle, ret );
|
|
1903 |
iSsTransactionOngoing = EFalse;
|
|
1904 |
}
|
|
1905 |
else
|
|
1906 |
{
|
|
1907 |
if( iSsNoFdnCheckFlag == ESsNoFdnCheckUsed )
|
|
1908 |
{
|
|
1909 |
// Save tsy req handle type
|
|
1910 |
iMmPhone->iReqHandleType = CMmPhoneTsy::
|
|
1911 |
EMultimodePhoneSendNetworkServiceRequestNoFdnCheck;
|
|
1912 |
}
|
|
1913 |
if ( iSsNoFdnCheckFlag == ESsNoFdnCheckNotUsed )
|
|
1914 |
{
|
|
1915 |
// Save tsy req handle type
|
|
1916 |
iMmPhone->iReqHandleType = CMmPhoneTsy::
|
|
1917 |
EMultimodePhoneSendNetworkServiceRequest;
|
|
1918 |
}
|
|
1919 |
}
|
|
1920 |
|
|
1921 |
return KErrNone;
|
|
1922 |
}
|
|
1923 |
|
|
1924 |
// ---------------------------------------------------------------------------
|
|
1925 |
// CMmSupplServTsy::CompleteSendNetworkServiceRequest
|
|
1926 |
// Completes an outstanding SendNetworkServiceRequest request.
|
|
1927 |
// (other items were commented in a header).
|
|
1928 |
// ---------------------------------------------------------------------------
|
|
1929 |
//
|
|
1930 |
void CMmSupplServTsy::CompleteSendNetworkServiceRequest(
|
|
1931 |
TInt aErrorCode )
|
|
1932 |
{
|
|
1933 |
// Reset req handle. Returns the deleted req handle
|
|
1934 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1935 |
CMmPhoneTsy::EMultimodePhoneSendNetworkServiceRequest );
|
|
1936 |
|
|
1937 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
1938 |
{
|
|
1939 |
// Complete the client request
|
|
1940 |
iMmPhone->ReqCompleted( reqHandle, aErrorCode );
|
|
1941 |
iSsTransactionOngoing = EFalse;
|
|
1942 |
|
|
1943 |
iSsNoFdnCheckFlag = ESsNoFdnCheckUnknown;
|
|
1944 |
}
|
|
1945 |
}
|
|
1946 |
|
|
1947 |
// ---------------------------------------------------------------------------
|
|
1948 |
// CMmSupplServTsy::GetIccMessageWaitingIndicatorsL
|
|
1949 |
// Retrieves the set of message waiting indicators from the current ICC, if
|
|
1950 |
// the ICC doesn't support MWIS then get it from the CenRep.
|
|
1951 |
// (other items were commented in a header).
|
|
1952 |
// ---------------------------------------------------------------------------
|
|
1953 |
//
|
|
1954 |
TInt CMmSupplServTsy::GetIccMessageWaitingIndicatorsL(
|
|
1955 |
const TTsyReqHandle aTsyReqHandle,
|
|
1956 |
RMobilePhone::TMobilePhoneMessageWaitingV1* aMessageWaiting )
|
|
1957 |
{
|
|
1958 |
TFLOGSTRING("TSY: CMmSupplServTsy::GetIccMessageWaitingIndicatorsL");
|
|
1959 |
|
|
1960 |
// check if parameter is correct type of class
|
|
1961 |
if ( KETelExtMultimodeV1 != aMessageWaiting->ExtensionId() )
|
|
1962 |
{
|
|
1963 |
// complete request
|
|
1964 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrArgument );
|
|
1965 |
}
|
|
1966 |
|
|
1967 |
else
|
|
1968 |
{
|
|
1969 |
// check that handle is not used for Set or Get
|
|
1970 |
if ( ( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown ==
|
|
1971 |
iMmPhone->iTsyReqHandleStore->GetTsyReqHandle(
|
|
1972 |
CMmPhoneTsy::EMultimodePhoneGetIccMessageWaitingIndicators ) ) &&
|
|
1973 |
( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown ==
|
|
1974 |
iMmPhone->iTsyReqHandleStore->GetTsyReqHandle(
|
|
1975 |
CMmPhoneTsy::EMultimodePhoneSetIccMessageWaitingIndicators ) ) )
|
|
1976 |
{
|
|
1977 |
TInt ret( KErrNone );
|
|
1978 |
|
|
1979 |
TFLOGSTRING2("TSY: CMmSupplServTsy::GetIccMessageWaitingIndicatorsL, MWIS supported:%d", iMessageWaitingSupportedByIcc );
|
|
1980 |
|
|
1981 |
if (iMmPhone->IsSIMReady())
|
|
1982 |
{
|
|
1983 |
if ( iMessageWaitingSupportedByIcc )
|
|
1984 |
{
|
|
1985 |
|
|
1986 |
// no packed parameters for DOS call
|
|
1987 |
ret = iMmPhone->iMessageManager->HandleRequestL(
|
|
1988 |
EMobilePhoneGetIccMessageWaitingIndicators );
|
|
1989 |
|
|
1990 |
if ( KErrNone != ret )
|
|
1991 |
{
|
|
1992 |
// complete request
|
|
1993 |
iMmPhone->ReqCompleted ( aTsyReqHandle, ret );
|
|
1994 |
}
|
|
1995 |
else
|
|
1996 |
{
|
|
1997 |
// save tsy req handle type
|
|
1998 |
iMmPhone->iReqHandleType = CMmPhoneTsy::
|
|
1999 |
EMultimodePhoneGetIccMessageWaitingIndicators;
|
|
2000 |
// save request in queue for completion
|
|
2001 |
TMwisInfoRequest* req = new (ELeave) TMwisInfoRequest();
|
|
2002 |
req->iReqHandle = aTsyReqHandle;
|
|
2003 |
req->iMwisInfo = aMessageWaiting;
|
|
2004 |
iMwisInfoRequests.AppendL(req);
|
|
2005 |
}
|
|
2006 |
}
|
|
2007 |
else
|
|
2008 |
{
|
|
2009 |
// read the values from the central repository
|
|
2010 |
ret = ReadIccMessageWaitingIndicatorsFromCentRep(
|
|
2011 |
iMessageWaiting );
|
|
2012 |
|
|
2013 |
TFLOGSTRING2("TSY: CMmSupplServTsy::GetIccMessageWaitingIndicatorsL, Error during the reading from CentRep:%d", ret);
|
|
2014 |
|
|
2015 |
if ( KErrNone == ret )
|
|
2016 |
{
|
|
2017 |
// copy default values to the client side
|
|
2018 |
*aMessageWaiting = iMessageWaiting;
|
|
2019 |
// complete request immediately
|
|
2020 |
iMmPhone->ReqCompleted ( aTsyReqHandle, ret );
|
|
2021 |
}
|
|
2022 |
}
|
|
2023 |
}
|
|
2024 |
else
|
|
2025 |
{
|
|
2026 |
// save request in queue for completion
|
|
2027 |
TMwisInfoRequest* req = new (ELeave) TMwisInfoRequest();
|
|
2028 |
req->iReqHandle = aTsyReqHandle;
|
|
2029 |
req->iMwisInfo = aMessageWaiting;
|
|
2030 |
iMwisInfoRequests.AppendL(req);
|
|
2031 |
}
|
|
2032 |
}
|
|
2033 |
else
|
|
2034 |
{
|
|
2035 |
TFLOGSTRING("TSY: CMmSupplServTsy::GetIccMessageWaitingIndicatorsL - save reqHandle to queue");
|
|
2036 |
// Save reqHandle to queue for completion
|
|
2037 |
TMwisInfoRequest* req = new (ELeave) TMwisInfoRequest();
|
|
2038 |
req->iReqHandle = aTsyReqHandle;
|
|
2039 |
req->iMwisInfo = aMessageWaiting;
|
|
2040 |
iMwisInfoRequests.AppendL(req);
|
|
2041 |
}
|
|
2042 |
}
|
|
2043 |
|
|
2044 |
return KErrNone;
|
|
2045 |
}
|
|
2046 |
|
|
2047 |
// ---------------------------------------------------------------------------
|
|
2048 |
// CMmSupplServTsy::CompleteGetIccMessageWaitingIndicators
|
|
2049 |
// This method completes an outstanding GetIccMessageWaitingIndicators
|
|
2050 |
// request.
|
|
2051 |
// (other items were commented in a header).
|
|
2052 |
// ---------------------------------------------------------------------------
|
|
2053 |
//
|
|
2054 |
void CMmSupplServTsy::CompleteGetIccMessageWaitingIndicators(
|
|
2055 |
RMobilePhone::TMobilePhoneMessageWaitingV1* aMessageWaiting,
|
|
2056 |
TInt aErrorCode )
|
|
2057 |
{
|
|
2058 |
TFLOGSTRING3("TSY: CMmSupplServTsy::CompleteGetIccMessageWaitingIndicators, bootup=%d, Error: %d", iGetIccSupportAtBoot, aErrorCode );
|
|
2059 |
|
|
2060 |
// reset req handle. Returns the deleted req handle
|
|
2061 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2062 |
CMmPhoneTsy::EMultimodePhoneGetIccMessageWaitingIndicators );
|
|
2063 |
|
|
2064 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
2065 |
{
|
|
2066 |
if ( ( KErrNone == aErrorCode ) ||
|
|
2067 |
( KErrCPHSInUseBySIM == aErrorCode ) )
|
|
2068 |
{
|
|
2069 |
SetIccSupportForMWIS( ETrue );
|
|
2070 |
|
|
2071 |
// has information changed
|
|
2072 |
if ( IsMwisInfoChanged ( *aMessageWaiting ) )
|
|
2073 |
{
|
|
2074 |
// complete notify; also copy information if changed
|
|
2075 |
CompleteNotifyIccMessageWaitingIndicatorChange(
|
|
2076 |
aMessageWaiting, aErrorCode );
|
|
2077 |
}
|
|
2078 |
else
|
|
2079 |
{
|
|
2080 |
// set the error code to none, in CPHS case
|
|
2081 |
aErrorCode = KErrNone;
|
|
2082 |
}
|
|
2083 |
}
|
|
2084 |
else
|
|
2085 |
{
|
|
2086 |
TFLOGSTRING("TSY: CMmSupplServTsy::CompleteGetIccMessageWaitingIndicators, NOT supported by SIM" );
|
|
2087 |
SetIccSupportForMWIS( EFalse );
|
|
2088 |
|
|
2089 |
// read the data from the Central Repository
|
|
2090 |
aErrorCode = ReadIccMessageWaitingIndicatorsFromCentRep(
|
|
2091 |
iMessageWaiting );
|
|
2092 |
}
|
|
2093 |
|
|
2094 |
// Go through the request queue and complete same information to all reguests
|
|
2095 |
for ( TInt i = 0; i < iMwisInfoRequests.Count(); i++ )
|
|
2096 |
{
|
|
2097 |
TFLOGSTRING("TSY: CMmSupplServTsy::CompleteGetIccMessageWaitingIndicators, Going throw request queue" );
|
|
2098 |
TMwisInfoRequest* req = iMwisInfoRequests[ i ];
|
|
2099 |
//set value in client side
|
|
2100 |
*(req->iMwisInfo) = iMessageWaiting;
|
|
2101 |
// Complete the client request
|
|
2102 |
iMmPhone->ReqCompleted( req->iReqHandle, aErrorCode );
|
|
2103 |
}
|
|
2104 |
//Destroy Array - all client request handled
|
|
2105 |
iMwisInfoRequests.ResetAndDestroy();
|
|
2106 |
}
|
|
2107 |
else if ( iGetIccSupportAtBoot )
|
|
2108 |
{
|
|
2109 |
iGetIccSupportAtBoot = EFalse;
|
|
2110 |
|
|
2111 |
// BOOT-UP case
|
|
2112 |
if ( KErrNone == aErrorCode )
|
|
2113 |
{
|
|
2114 |
// SIM supports EF-MWIS
|
|
2115 |
SetIccSupportForMWIS( ETrue );
|
|
2116 |
iMessageWaiting = *aMessageWaiting;
|
|
2117 |
aErrorCode = WriteIccMessageWaitingIndicatorsToCentRep(
|
|
2118 |
iMessageWaiting );
|
|
2119 |
}
|
|
2120 |
else if ( KErrCPHSInUseBySIM == aErrorCode )
|
|
2121 |
{
|
|
2122 |
SetIccSupportForMWIS( ETrue );
|
|
2123 |
// update only display status information
|
|
2124 |
iMessageWaiting.iDisplayStatus = aMessageWaiting->iDisplayStatus;
|
|
2125 |
aErrorCode = iMwisCentRep->Set( KCtsyMessageWaitingDisplayStatus,
|
|
2126 |
aMessageWaiting->iDisplayStatus );
|
|
2127 |
TFLOGSTRING3("TSY: CMmSupplServTsy::CompleteGetIccMessageWaitingIndicators, CPHS bootup, status=%d, error=%d ", aMessageWaiting->iDisplayStatus, aErrorCode );
|
|
2128 |
}
|
|
2129 |
else
|
|
2130 |
{
|
|
2131 |
SetIccSupportForMWIS( EFalse );
|
|
2132 |
}
|
|
2133 |
}
|
|
2134 |
}
|
|
2135 |
|
|
2136 |
// ---------------------------------------------------------------------------
|
|
2137 |
// CMmSupplServTsy::GetIccMessageWaitingIndicatorsCancel
|
|
2138 |
// Use this method to cancel a previously placed asynchronous
|
|
2139 |
// GetIccMessageWaitingIndicators request.
|
|
2140 |
// (other items were commented in a header).
|
|
2141 |
// ---------------------------------------------------------------------------
|
|
2142 |
//
|
|
2143 |
TInt CMmSupplServTsy::GetIccMessageWaitingIndicatorsCancel(
|
|
2144 |
const TTsyReqHandle aTsyReqHandle )
|
|
2145 |
{
|
|
2146 |
TFLOGSTRING("TSY: CMmSupplServTsy::GetIccMessageWaitingIndicatorsCancel");
|
|
2147 |
|
|
2148 |
//reset the req handle if only one req remains
|
|
2149 |
if( 1 == iMwisInfoRequests.Count() )
|
|
2150 |
{
|
|
2151 |
TFLOGSTRING("TSY: CMmSupplServTsy::GetIccMessageWaitingIndicatorsCancel - one req");
|
|
2152 |
TTsyReqHandle reqHandle = iMmPhone->
|
|
2153 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2154 |
CMmPhoneTsy::EMultimodePhoneGetIccMessageWaitingIndicators);
|
|
2155 |
}
|
|
2156 |
// qo through array if several requests and find correct reqhandle to cancel
|
|
2157 |
for ( TInt i = 0; i < iMwisInfoRequests.Count(); i++ )
|
|
2158 |
{
|
|
2159 |
TFLOGSTRING("TSY: CMmSupplServTsy::GetIccMessageWaitingIndicatorsCancel - queued requests");
|
|
2160 |
TMwisInfoRequest* req = iMwisInfoRequests[ i ];
|
|
2161 |
if( aTsyReqHandle == req->iReqHandle )
|
|
2162 |
{
|
|
2163 |
iMmPhone->ReqCompleted( req->iReqHandle, KErrCancel );
|
|
2164 |
delete iMwisInfoRequests[ i ];
|
|
2165 |
iMwisInfoRequests.Remove(i);
|
|
2166 |
break;
|
|
2167 |
}
|
|
2168 |
}
|
|
2169 |
|
|
2170 |
return KErrNone;
|
|
2171 |
}
|
|
2172 |
|
|
2173 |
// ---------------------------------------------------------------------------
|
|
2174 |
// CMmSupplServTsy::SetIccMessageWaitingIndicatorsL
|
|
2175 |
// Set the message waiting indicators on the current ICC.
|
|
2176 |
// (other items were commented in a header).
|
|
2177 |
// ---------------------------------------------------------------------------
|
|
2178 |
//
|
|
2179 |
TInt CMmSupplServTsy::SetIccMessageWaitingIndicatorsL(
|
|
2180 |
const TTsyReqHandle aTsyReqHandle,
|
|
2181 |
TDes8* aParams )
|
|
2182 |
{
|
|
2183 |
TFLOGSTRING("TSY: CMmSupplServTsy::SetIccMessageWaitingIndicatorsL");
|
|
2184 |
|
|
2185 |
TInt ret( KErrNone );
|
|
2186 |
|
|
2187 |
if ( sizeof( RMobilePhone::TMobilePhoneMessageWaitingV1 ) > aParams->MaxLength() )
|
|
2188 |
{
|
|
2189 |
TFLOGSTRING ("TSY: CMmSupplServTsy::SetIccMessageWaitingIndicatorsL bad size argument");
|
|
2190 |
// Complete the request with appropiate error
|
|
2191 |
ret = KErrArgument;
|
|
2192 |
}
|
|
2193 |
|
|
2194 |
// check if handle is not used for Set or Get
|
|
2195 |
else if ( ( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown == iMmPhone->
|
|
2196 |
iTsyReqHandleStore->GetTsyReqHandle(
|
|
2197 |
CMmPhoneTsy::EMultimodePhoneSetIccMessageWaitingIndicators ) ) &&
|
|
2198 |
( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown == iMmPhone->
|
|
2199 |
iTsyReqHandleStore->GetTsyReqHandle(
|
|
2200 |
CMmPhoneTsy::EMultimodePhoneGetIccMessageWaitingIndicators ) ) )
|
|
2201 |
{
|
|
2202 |
|
|
2203 |
TFLOGSTRING2("TSY: CMmSupplServTsy::SetIccMessageWaitingIndicatorsL, MWIS supported:%d",iMessageWaitingSupportedByIcc );
|
|
2204 |
|
|
2205 |
RMobilePhone::TMobilePhoneMessageWaitingV1Pckg* paramsPckgV1 =
|
|
2206 |
reinterpret_cast<RMobilePhone::TMobilePhoneMessageWaitingV1Pckg*>( aParams );
|
|
2207 |
RMobilePhone::TMobilePhoneMessageWaitingV1& messageWaiting = ( *paramsPckgV1 )();
|
|
2208 |
|
|
2209 |
if ( iMessageWaitingSupportedByIcc )
|
|
2210 |
{
|
|
2211 |
// save the client pointer temporaryly, used again on complete
|
|
2212 |
iRetSetMessageWaiting = &messageWaiting;
|
|
2213 |
|
|
2214 |
// packed parameter for DOS call:
|
|
2215 |
// RMobilePhone::TMobilePhoneMessageWaitingV1
|
|
2216 |
CMmDataPackage dataPackage;
|
|
2217 |
dataPackage.PackData( &messageWaiting );
|
|
2218 |
|
|
2219 |
// send EMultimodePhoneSetIccMessageWaitingIndicators to DOS
|
|
2220 |
ret = iMmPhone->iMessageManager->HandleRequestL(
|
|
2221 |
EMobilePhoneSetIccMessageWaitingIndicators,
|
|
2222 |
&dataPackage );
|
|
2223 |
|
|
2224 |
if ( KErrNone == ret )
|
|
2225 |
{
|
|
2226 |
// save tsy req handle type
|
|
2227 |
iMmPhone->iReqHandleType = CMmPhoneTsy::
|
|
2228 |
EMultimodePhoneSetIccMessageWaitingIndicators;
|
|
2229 |
}
|
|
2230 |
}
|
|
2231 |
|
|
2232 |
else
|
|
2233 |
{
|
|
2234 |
// complete notify; also copy information if changed
|
|
2235 |
CompleteNotifyIccMessageWaitingIndicatorChange(
|
|
2236 |
&messageWaiting, ret );
|
|
2237 |
iMmPhone->ReqCompleted ( aTsyReqHandle, ret );
|
|
2238 |
ret = KErrNone;
|
|
2239 |
}
|
|
2240 |
}
|
|
2241 |
|
|
2242 |
else
|
|
2243 |
{
|
|
2244 |
// handle already in use
|
|
2245 |
ret = KErrServerBusy;
|
|
2246 |
}
|
|
2247 |
|
|
2248 |
return ret;
|
|
2249 |
}
|
|
2250 |
|
|
2251 |
// ---------------------------------------------------------------------------
|
|
2252 |
// CMmSupplServTsy::CompleteSetIccMessageWaitingIndicators
|
|
2253 |
// This method completes an outstanding SetIccMessageWaitingIndicators
|
|
2254 |
// request.
|
|
2255 |
// (other items were commented in a header).
|
|
2256 |
// ---------------------------------------------------------------------------
|
|
2257 |
//
|
|
2258 |
void CMmSupplServTsy::CompleteSetIccMessageWaitingIndicators(
|
|
2259 |
TInt aErrorCode )
|
|
2260 |
{
|
|
2261 |
TFLOGSTRING2("TSY: CMmSupplServTsy::CompleteSetIccMessageWaitingIndicators, Error: %d", aErrorCode );
|
|
2262 |
|
|
2263 |
// reset req handle. Returns the deleted req handle
|
|
2264 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2265 |
CMmPhoneTsy::EMultimodePhoneSetIccMessageWaitingIndicators );
|
|
2266 |
|
|
2267 |
if ( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
2268 |
{
|
|
2269 |
if ( ( KErrNone == aErrorCode ) ||
|
|
2270 |
( KErrCPHSInUseBySIM == aErrorCode ) )
|
|
2271 |
{
|
|
2272 |
// send reqest to LTSY also in future
|
|
2273 |
SetIccSupportForMWIS( ETrue );
|
|
2274 |
|
|
2275 |
// map error value so that during the notify-complete
|
|
2276 |
// the central repository values are updated, in CPHS case
|
|
2277 |
aErrorCode = KErrNone;
|
|
2278 |
|
|
2279 |
// complete notify; also copy information if changed
|
|
2280 |
CompleteNotifyIccMessageWaitingIndicatorChange(
|
|
2281 |
iRetSetMessageWaiting, aErrorCode );
|
|
2282 |
}
|
|
2283 |
else
|
|
2284 |
{
|
|
2285 |
TFLOGSTRING("TSY: CMmSupplServTsy::CompleteSetIccMessageWaitingIndicators, not supported by SIM" );
|
|
2286 |
SetIccSupportForMWIS( EFalse );
|
|
2287 |
|
|
2288 |
// reset error value, return possible cenrep error value
|
|
2289 |
aErrorCode = KErrNone;
|
|
2290 |
// complete notify; also copy information if changed
|
|
2291 |
CompleteNotifyIccMessageWaitingIndicatorChange(
|
|
2292 |
iRetSetMessageWaiting, aErrorCode );
|
|
2293 |
}
|
|
2294 |
|
|
2295 |
// reset the client pointer
|
|
2296 |
iRetSetMessageWaiting = NULL;
|
|
2297 |
// Complete the client request
|
|
2298 |
iMmPhone->ReqCompleted( reqHandle, aErrorCode );
|
|
2299 |
}
|
|
2300 |
|
|
2301 |
//It might be possible that at the time of serving the request for SetIccMessageWaitingIndicators()
|
|
2302 |
//CTSY receives the request for GetIccMessageWaitingIndicators().
|
|
2303 |
//In that case the request will be queued in request queue.
|
|
2304 |
// So go through the request queue and complete all the request.
|
|
2305 |
for ( TInt i = 0; i < iMwisInfoRequests.Count(); i++ )
|
|
2306 |
{
|
|
2307 |
TFLOGSTRING("TSY: CMmSupplServTsy::CompleteGetIccMessageWaitingIndicators, Going throw request queue" );
|
|
2308 |
TMwisInfoRequest* req = iMwisInfoRequests[ i ];
|
|
2309 |
//set value in client side
|
|
2310 |
*(req->iMwisInfo) = iMessageWaiting;
|
|
2311 |
// Complete the client request
|
|
2312 |
iMmPhone->ReqCompleted( req->iReqHandle, KErrNone );
|
|
2313 |
}
|
|
2314 |
//Destroy Array - all client request handled
|
|
2315 |
iMwisInfoRequests.ResetAndDestroy();
|
|
2316 |
}
|
|
2317 |
|
|
2318 |
// ---------------------------------------------------------------------------
|
|
2319 |
// CMmSupplServTsy::SetIccMessageWaitingIndicatorsCancel
|
|
2320 |
// Use this method to cancel a previously placed asynchronous
|
|
2321 |
// SetIccMessageWaitingIndicators request.
|
|
2322 |
// (other items were commented in a header).
|
|
2323 |
// ---------------------------------------------------------------------------
|
|
2324 |
//
|
|
2325 |
TInt CMmSupplServTsy::SetIccMessageWaitingIndicatorsCancel(
|
|
2326 |
const TTsyReqHandle aTsyReqHandle )
|
|
2327 |
{
|
|
2328 |
TFLOGSTRING("TSY: CMmSupplServTsy::SetIccMessageWaitingIndicatorsCancel");
|
|
2329 |
|
|
2330 |
// As cancel is called, the client memory address pointed to is no longer
|
|
2331 |
// valid -> NULL it
|
|
2332 |
iRetSetMessageWaiting = NULL;
|
|
2333 |
iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2334 |
CMmPhoneTsy::EMultimodePhoneSetIccMessageWaitingIndicators );
|
|
2335 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
2336 |
|
|
2337 |
return KErrNone;
|
|
2338 |
}
|
|
2339 |
|
|
2340 |
// ---------------------------------------------------------------------------
|
|
2341 |
// CMmSupplServTsy::NotifyIccMessageWaitingIndicatorsChange
|
|
2342 |
// Notify when message waiting indicators changed on ICC.
|
|
2343 |
// (other items were commented in a header).
|
|
2344 |
// ---------------------------------------------------------------------------
|
|
2345 |
//
|
|
2346 |
TInt CMmSupplServTsy::NotifyIccMessageWaitingIndicatorsChange(
|
|
2347 |
RMobilePhone::TMobilePhoneMessageWaitingV1* aMessageWaiting )
|
|
2348 |
{
|
|
2349 |
TFLOGSTRING("TSY: CMmSupplServTsy::NotifyIccMessageWaitingIndicatorsChangeL");
|
|
2350 |
|
|
2351 |
TInt ret( KErrNone );
|
|
2352 |
|
|
2353 |
// check if parameter is correct type of class
|
|
2354 |
if ( KETelExtMultimodeV1 == aMessageWaiting->ExtensionId() )
|
|
2355 |
{
|
|
2356 |
iRetNotifyMessageWaiting = aMessageWaiting;
|
|
2357 |
iMmPhone->iReqHandleType =
|
|
2358 |
CMmPhoneTsy::EMultimodePhoneNotifyIccMessageWaitingIndicatorsChange;
|
|
2359 |
}
|
|
2360 |
|
|
2361 |
else
|
|
2362 |
{
|
|
2363 |
ret = KErrArgument;
|
|
2364 |
}
|
|
2365 |
|
|
2366 |
return ret;
|
|
2367 |
}
|
|
2368 |
|
|
2369 |
// ---------------------------------------------------------------------------
|
|
2370 |
// CMmSupplServTsy::CompleteNotifyIccMessageWaitingIndicatorChange
|
|
2371 |
// This method completes an outstanding NotifyIccMessageWaitingIndicatorChange
|
|
2372 |
// request.
|
|
2373 |
// (other items were commented in a header).
|
|
2374 |
// ---------------------------------------------------------------------------
|
|
2375 |
//
|
|
2376 |
void CMmSupplServTsy::CompleteNotifyIccMessageWaitingIndicatorChange(
|
|
2377 |
RMobilePhone::TMobilePhoneMessageWaitingV1* aMessageWaiting,
|
|
2378 |
TInt& aErrorCode )
|
|
2379 |
{
|
|
2380 |
TFLOGSTRING2("TSY: CMmSupplServTsy::CompleteNotifyIccMessageWaitingIndicatorChange, error:%d", aErrorCode );
|
|
2381 |
|
|
2382 |
if ( IsMwisInfoChanged( *aMessageWaiting ) )
|
|
2383 |
{
|
|
2384 |
if ( KErrNone == aErrorCode )
|
|
2385 |
{
|
|
2386 |
// copy the new value to the member variable
|
|
2387 |
iMessageWaiting = *aMessageWaiting;
|
|
2388 |
|
|
2389 |
// update central repository
|
|
2390 |
aErrorCode = WriteIccMessageWaitingIndicatorsToCentRep(
|
|
2391 |
iMessageWaiting );
|
|
2392 |
}
|
|
2393 |
// CPHS is used by the SIM, supports only display status indications
|
|
2394 |
else if ( KErrCPHSInUseBySIM == aErrorCode )
|
|
2395 |
{
|
|
2396 |
// change the error code; CPHS case only, not an error
|
|
2397 |
aErrorCode = KErrNone;
|
|
2398 |
|
|
2399 |
if ( aMessageWaiting->iDisplayStatus !=
|
|
2400 |
iMessageWaiting.iDisplayStatus )
|
|
2401 |
{
|
|
2402 |
TFLOGSTRING2("TSY: CMmSupplServTsy::CompleteNotifyIccMessageWaitingIndicatorChange, CPHS information changed status=%d ", aMessageWaiting->iDisplayStatus);
|
|
2403 |
// update only CPHS supported information
|
|
2404 |
iMessageWaiting.iDisplayStatus =
|
|
2405 |
aMessageWaiting->iDisplayStatus;
|
|
2406 |
|
|
2407 |
// update central repository, only display status
|
|
2408 |
aErrorCode = iMwisCentRep->Set(
|
|
2409 |
KCtsyMessageWaitingDisplayStatus,
|
|
2410 |
aMessageWaiting->iDisplayStatus );
|
|
2411 |
}
|
|
2412 |
}
|
|
2413 |
|
|
2414 |
// reset req handle. Returns the deleted req handle
|
|
2415 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->
|
|
2416 |
ResetTsyReqHandle( CMmPhoneTsy::
|
|
2417 |
EMultimodePhoneNotifyIccMessageWaitingIndicatorsChange );
|
|
2418 |
|
|
2419 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
2420 |
{
|
|
2421 |
// copy the altered information to the client side
|
|
2422 |
*iRetNotifyMessageWaiting = iMessageWaiting;
|
|
2423 |
iRetNotifyMessageWaiting = NULL;
|
|
2424 |
|
|
2425 |
// complete the client request
|
|
2426 |
iMmPhone->ReqCompleted( reqHandle, aErrorCode );
|
|
2427 |
}
|
|
2428 |
}
|
|
2429 |
}
|
|
2430 |
|
|
2431 |
// ---------------------------------------------------------------------------
|
|
2432 |
// CMmSupplServTsy::NotifyIccMessageWaitingIndicatorChangeCancel
|
|
2433 |
// Use this method to cancel a previously placed asynchronous
|
|
2434 |
// NotifyIccMessageWaitingIndicatorChange request.
|
|
2435 |
// (other items were commented in a header).
|
|
2436 |
// ---------------------------------------------------------------------------
|
|
2437 |
//
|
|
2438 |
TInt CMmSupplServTsy::NotifyIccMessageWaitingIndicatorChangeCancel(
|
|
2439 |
const TTsyReqHandle aTsyReqHandle )
|
|
2440 |
{
|
|
2441 |
TFLOGSTRING("TSY: CMmSupplServTsy::NotifyIccMessageWaitingIndicatorChangeCancel");
|
|
2442 |
|
|
2443 |
// Null the pointer to client-side data
|
|
2444 |
iRetNotifyMessageWaiting = NULL;
|
|
2445 |
iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2446 |
CMmPhoneTsy::EMultimodePhoneNotifyIccMessageWaitingIndicatorsChange );
|
|
2447 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
2448 |
|
|
2449 |
return KErrNone;
|
|
2450 |
}
|
|
2451 |
|
|
2452 |
// ---------------------------------------------------------------------------
|
|
2453 |
// CMmSupplServTsy::SetIccSupportForMWIS
|
|
2454 |
// Use this method to set the ICC support for Message Waiting indicators.
|
|
2455 |
// (other items were commented in a header).
|
|
2456 |
// ---------------------------------------------------------------------------
|
|
2457 |
//
|
|
2458 |
void CMmSupplServTsy::SetIccSupportForMWIS( TBool aSupport )
|
|
2459 |
{
|
|
2460 |
TFLOGSTRING2("TSY: CMmSupplServTsy::SetIccSupportForMWIS, support%d ", aSupport );
|
|
2461 |
|
|
2462 |
iMessageWaitingSupportedByIcc = aSupport;
|
|
2463 |
}
|
|
2464 |
|
|
2465 |
// ---------------------------------------------------------------------------
|
|
2466 |
// CMmSupplServTsy::ReadIccMessageWaitingFromCentRep
|
|
2467 |
// Read the EF-MWIS infromation from the central repository
|
|
2468 |
// (other items were commented in a header).
|
|
2469 |
// ---------------------------------------------------------------------------
|
|
2470 |
//
|
|
2471 |
TInt CMmSupplServTsy::ReadIccMessageWaitingIndicatorsFromCentRep(
|
|
2472 |
RMobilePhone::TMobilePhoneMessageWaitingV1& aMessageWaiting )
|
|
2473 |
{
|
|
2474 |
TFLOGSTRING("TSY: CMmSupplServTsy::ReadIccMessageWaitingIndicatorsFromCentRep");
|
|
2475 |
|
|
2476 |
TInt retval( KErrNone );
|
|
2477 |
TInt tempVal( 0 );
|
|
2478 |
|
|
2479 |
// Read values from the central repository and check that it is positive
|
|
2480 |
retval = iMwisCentRep->Get( KCtsyMessageWaitingDisplayStatus, tempVal );
|
|
2481 |
( tempVal > 0 ) ?
|
|
2482 |
aMessageWaiting.iDisplayStatus = tempVal :
|
|
2483 |
aMessageWaiting.iDisplayStatus = 0;
|
|
2484 |
|
|
2485 |
retval = iMwisCentRep->Get( KCtsyMessageWaitingVoiceMailCount,
|
|
2486 |
tempVal );
|
|
2487 |
( tempVal > 0 ) ?
|
|
2488 |
aMessageWaiting.iVoiceMsgs = tempVal :
|
|
2489 |
aMessageWaiting.iVoiceMsgs = 0;
|
|
2490 |
|
|
2491 |
retval = iMwisCentRep->Get( KCtsyMessageWaitingAuxLineCount, tempVal );
|
|
2492 |
( tempVal > 0 ) ?
|
|
2493 |
aMessageWaiting.iAuxVoiceMsgs = tempVal :
|
|
2494 |
aMessageWaiting.iAuxVoiceMsgs = 0;
|
|
2495 |
|
|
2496 |
retval = iMwisCentRep->Get( KCtsyMessageWaitingDataCount, tempVal );
|
|
2497 |
( tempVal > 0 ) ?
|
|
2498 |
aMessageWaiting.iDataMsgs = tempVal :
|
|
2499 |
aMessageWaiting.iDataMsgs = 0;
|
|
2500 |
|
|
2501 |
retval = iMwisCentRep->Get( KCtsyMessageWaitingFaxCount, tempVal );
|
|
2502 |
( tempVal > 0 ) ?
|
|
2503 |
aMessageWaiting.iFaxMsgs = tempVal :
|
|
2504 |
aMessageWaiting.iFaxMsgs = 0;
|
|
2505 |
|
|
2506 |
retval = iMwisCentRep->Get( KCtsyMessageWaitingEmailCount, tempVal );
|
|
2507 |
( tempVal > 0 ) ?
|
|
2508 |
aMessageWaiting.iEmailMsgs = tempVal :
|
|
2509 |
aMessageWaiting.iEmailMsgs = 0;
|
|
2510 |
|
|
2511 |
retval = iMwisCentRep->Get( KCtsyMessageWaitingOtherMessageCount,
|
|
2512 |
tempVal );
|
|
2513 |
( tempVal > 0 ) ?
|
|
2514 |
aMessageWaiting.iOtherMsgs = tempVal :
|
|
2515 |
aMessageWaiting.iOtherMsgs = 0;
|
|
2516 |
|
|
2517 |
return retval;
|
|
2518 |
}
|
|
2519 |
|
|
2520 |
// ---------------------------------------------------------------------------
|
|
2521 |
// CMmSupplServTsy::WriteIccMessageWaitingIndicatorsToCentRep
|
|
2522 |
// Write the EF-MWIS infromation to the central repository
|
|
2523 |
// (other items were commented in a header).
|
|
2524 |
// ---------------------------------------------------------------------------
|
|
2525 |
//
|
|
2526 |
TInt CMmSupplServTsy::WriteIccMessageWaitingIndicatorsToCentRep(
|
|
2527 |
const RMobilePhone::TMobilePhoneMessageWaitingV1& aMessageWaiting )
|
|
2528 |
{
|
|
2529 |
TFLOGSTRING("TSY: CMmSupplServTsy::WriteIccMessageWaitingIndicatorsToCentRep");
|
|
2530 |
|
|
2531 |
TInt retval( KErrNone );
|
|
2532 |
|
|
2533 |
// Write new values to the central repository
|
|
2534 |
retval = iMwisCentRep->Set( KCtsyMessageWaitingDisplayStatus,
|
|
2535 |
aMessageWaiting.iDisplayStatus );
|
|
2536 |
TFLOGSTRING2("TSY: CMmSupplServTsy::WriteIccMessageWaitingIndicatorsToCentRep : iDisplayStatus:%u", aMessageWaiting.iDisplayStatus );
|
|
2537 |
retval = iMwisCentRep->Set( KCtsyMessageWaitingVoiceMailCount,
|
|
2538 |
aMessageWaiting.iVoiceMsgs );
|
|
2539 |
TFLOGSTRING2("TSY: CMmSupplServTsy::WriteIccMessageWaitingIndicatorsToCentRep : iVoiceMsgs:%u", aMessageWaiting.iVoiceMsgs );
|
|
2540 |
retval = iMwisCentRep->Set( KCtsyMessageWaitingAuxLineCount,
|
|
2541 |
aMessageWaiting.iAuxVoiceMsgs );
|
|
2542 |
TFLOGSTRING2("TSY: CMmSupplServTsy::WriteIccMessageWaitingIndicatorsToCentRep : iAuxVoiceMsgs:%u", aMessageWaiting.iAuxVoiceMsgs );
|
|
2543 |
retval = iMwisCentRep->Set( KCtsyMessageWaitingDataCount,
|
|
2544 |
aMessageWaiting.iDataMsgs );
|
|
2545 |
TFLOGSTRING2("TSY: CMmSupplServTsy::WriteIccMessageWaitingIndicatorsToCentRep : iDataMsgs:%u", aMessageWaiting.iDataMsgs );
|
|
2546 |
retval = iMwisCentRep->Set( KCtsyMessageWaitingFaxCount,
|
|
2547 |
aMessageWaiting.iFaxMsgs );
|
|
2548 |
TFLOGSTRING2("TSY: CMmSupplServTsy::WriteIccMessageWaitingIndicatorsToCentRep : iFaxMsgs:%u", aMessageWaiting.iFaxMsgs );
|
|
2549 |
retval = iMwisCentRep->Set( KCtsyMessageWaitingEmailCount,
|
|
2550 |
aMessageWaiting.iEmailMsgs );
|
|
2551 |
TFLOGSTRING2("TSY: CMmSupplServTsy::WriteIccMessageWaitingIndicatorsToCentRep : iEmailMsgs:%u", aMessageWaiting.iEmailMsgs );
|
|
2552 |
retval = iMwisCentRep->Set( KCtsyMessageWaitingOtherMessageCount,
|
|
2553 |
aMessageWaiting.iOtherMsgs );
|
|
2554 |
TFLOGSTRING2("TSY: CMmSupplServTsy::WriteIccMessageWaitingIndicatorsToCentRep : iOtherMsgs:%u", aMessageWaiting.iOtherMsgs );
|
|
2555 |
|
|
2556 |
return retval;
|
|
2557 |
}
|
|
2558 |
|
|
2559 |
// ---------------------------------------------------------------------------
|
|
2560 |
// CMmSupplServTsy::IsMwisInfoChanged
|
|
2561 |
// Return ETrue if the MWIS information has been changed.
|
|
2562 |
// (other items were commented in a header).
|
|
2563 |
// ---------------------------------------------------------------------------
|
|
2564 |
//
|
|
2565 |
TBool CMmSupplServTsy::IsMwisInfoChanged(
|
|
2566 |
const RMobilePhone::TMobilePhoneMessageWaitingV1& aNewMessageWaiting )
|
|
2567 |
{
|
|
2568 |
TFLOGSTRING("TSY: CMmSupplServTsy::IsMwisInfoChanged");
|
|
2569 |
|
|
2570 |
TBool retval( ETrue );
|
|
2571 |
|
|
2572 |
if( aNewMessageWaiting.iDisplayStatus == iMessageWaiting.iDisplayStatus &&
|
|
2573 |
aNewMessageWaiting.iVoiceMsgs == iMessageWaiting.iVoiceMsgs &&
|
|
2574 |
aNewMessageWaiting.iAuxVoiceMsgs == iMessageWaiting.iAuxVoiceMsgs &&
|
|
2575 |
aNewMessageWaiting.iDataMsgs == iMessageWaiting.iDataMsgs &&
|
|
2576 |
aNewMessageWaiting.iFaxMsgs == iMessageWaiting.iFaxMsgs &&
|
|
2577 |
aNewMessageWaiting.iEmailMsgs == iMessageWaiting.iEmailMsgs &&
|
|
2578 |
aNewMessageWaiting.iOtherMsgs == iMessageWaiting.iOtherMsgs )
|
|
2579 |
{
|
|
2580 |
retval = EFalse;
|
|
2581 |
}
|
|
2582 |
|
|
2583 |
return retval;
|
|
2584 |
}
|
|
2585 |
// ---------------------------------------------------------------------------
|
|
2586 |
// CMmSupplServTsy::CompleteSendNetworkServiceRequestNoFdnCheck
|
|
2587 |
// Completes an outstanding SendNetworkServiceRequest with no FDN check
|
|
2588 |
// request.
|
|
2589 |
// (other items were commented in a header).
|
|
2590 |
// ---------------------------------------------------------------------------
|
|
2591 |
//
|
|
2592 |
void CMmSupplServTsy::CompleteSendNetworkServiceRequestNoFdnCheck(
|
|
2593 |
TInt aErrorCode )
|
|
2594 |
{
|
|
2595 |
// Reset req handle. Returns the deleted req handle
|
|
2596 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2597 |
CMmPhoneTsy::EMultimodePhoneSendNetworkServiceRequestNoFdnCheck );
|
|
2598 |
|
|
2599 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
2600 |
{
|
|
2601 |
// Complete the client request
|
|
2602 |
iMmPhone->ReqCompleted( reqHandle, aErrorCode );
|
|
2603 |
iSsTransactionOngoing = EFalse;
|
|
2604 |
iSsNoFdnCheckFlag = ESsNoFdnCheckUnknown;
|
|
2605 |
}
|
|
2606 |
}
|
|
2607 |
|
|
2608 |
// ---------------------------------------------------------------------------
|
|
2609 |
// CMmSupplServTsy::NotifySendNetworkServiceRequest
|
|
2610 |
// This method activates notifying of a send network request
|
|
2611 |
// (other items were commented in a header).
|
|
2612 |
// ---------------------------------------------------------------------------
|
|
2613 |
//
|
|
2614 |
TInt CMmSupplServTsy::NotifySendNetworkServiceRequest(
|
|
2615 |
const RMobilePhone::TMobilePhoneNotifySendSSOperation* aOperation,
|
|
2616 |
TDes8* aSendSSRequestPckg )
|
|
2617 |
{
|
|
2618 |
TFLOGSTRING("TSY: CMmSupplServTsy::NotifySendNetworkServiceRequest" );
|
|
2619 |
|
|
2620 |
if(sizeof(RMobilePhone::TMobilePhoneSendSSRequestV3) > aSendSSRequestPckg->MaxLength())
|
|
2621 |
{
|
|
2622 |
TFLOGSTRING ("TSY: CMmNetTsy::NotifySendNetworkServiceRequest Bad size argument");
|
|
2623 |
// Complete the request with appropiate error
|
|
2624 |
return KErrArgument;
|
|
2625 |
}
|
|
2626 |
|
|
2627 |
TPckg<RMobilePhone::TMobilePhoneSendSSRequestV3>* ssDataPckg =
|
|
2628 |
reinterpret_cast<TPckg<RMobilePhone::TMobilePhoneSendSSRequestV3>*>( aSendSSRequestPckg );
|
|
2629 |
|
|
2630 |
RMobilePhone::TMobilePhoneSendSSRequestV3& ssData = ( *ssDataPckg )();
|
|
2631 |
iInputSSOperation = *aOperation;
|
|
2632 |
|
|
2633 |
//save pointer to client data
|
|
2634 |
iRetSSDataPtrIndRequest = &ssData;
|
|
2635 |
|
|
2636 |
// Save tsy req handle type
|
|
2637 |
iMmPhone->iReqHandleType = CMmPhoneTsy::EMultimodePhoneNotifySendNetworkServiceRequest;
|
|
2638 |
|
|
2639 |
return KErrNone;
|
|
2640 |
}
|
|
2641 |
|
|
2642 |
// ---------------------------------------------------------------------------
|
|
2643 |
// CMmSupplServTsy::CompleteSendNetworkServiceRequestInd
|
|
2644 |
// This method completes notify network service request.
|
|
2645 |
// (other items were commented in a header).
|
|
2646 |
// ---------------------------------------------------------------------------
|
|
2647 |
//
|
|
2648 |
void CMmSupplServTsy::CompleteSendNetworkServiceRequestInd(
|
|
2649 |
TInt aErrorCode, CMmDataPackage* aDataPackage )
|
|
2650 |
{
|
|
2651 |
TFLOGSTRING2("TSY: CMmSupplServTsy::CompleteSendNetworkServiceRequestInd. Error: %d", aErrorCode );
|
|
2652 |
|
|
2653 |
// Reset req handle. Returns the deleted req handle
|
|
2654 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2655 |
CMmPhoneTsy::EMultimodePhoneNotifySendNetworkServiceRequest );
|
|
2656 |
|
|
2657 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
2658 |
{
|
|
2659 |
// Check if response was ok
|
|
2660 |
if ( KErrNone == aErrorCode )
|
|
2661 |
{
|
|
2662 |
// Unpack data to client side pointers
|
|
2663 |
aDataPackage->UnPackData ( *iRetSSDataPtrIndRequest );
|
|
2664 |
|
|
2665 |
if (iRetSSDataPtrIndRequest->iOpCode == iInputSSOperation)
|
|
2666 |
{
|
|
2667 |
// Complete the client request
|
|
2668 |
iMmPhone->ReqCompleted( reqHandle, KErrNone );
|
|
2669 |
}
|
|
2670 |
#ifdef USING_CTSY_DISPATCHER
|
|
2671 |
//CTSY defect, if a complete is called with a different op code, then the
|
|
2672 |
//original request can never be completed as the request handle is taken
|
|
2673 |
//out of the store at the start of the function, here we simply put it back in
|
|
2674 |
//as a quick fix to minimise if defs.
|
|
2675 |
else
|
|
2676 |
{
|
|
2677 |
iMmPhone->iTsyReqHandleStore->SetTsyReqHandle(CMmPhoneTsy::EMultimodePhoneNotifySendNetworkServiceRequest,reqHandle);
|
|
2678 |
}
|
|
2679 |
#endif //USING_CTSY_DISPATCHER
|
|
2680 |
}
|
|
2681 |
else
|
|
2682 |
{
|
|
2683 |
// Complete error value
|
|
2684 |
iMmPhone->ReqCompleted( reqHandle, aErrorCode );
|
|
2685 |
}
|
|
2686 |
}
|
|
2687 |
}
|
|
2688 |
|
|
2689 |
// ---------------------------------------------------------------------------
|
|
2690 |
// CMmSupplServTsy::NotifySendNetworkRequestCancel()
|
|
2691 |
// Cancels notify send network service request.
|
|
2692 |
// (other items were commented in a header).
|
|
2693 |
// ---------------------------------------------------------------------------
|
|
2694 |
//
|
|
2695 |
TInt CMmSupplServTsy::NotifySendNetworkServiceRequestCancel(
|
|
2696 |
const TTsyReqHandle aTsyReqHandle )
|
|
2697 |
{
|
|
2698 |
TFLOGSTRING("TSY: CMmSupplServTsy::NotifySendNetworkServiceRequestCancel");
|
|
2699 |
|
|
2700 |
// Clear data pointers
|
|
2701 |
iRetSSDataPtrIndRequest = NULL;
|
|
2702 |
|
|
2703 |
// Reset the req handle
|
|
2704 |
iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2705 |
CMmPhoneTsy::EMultimodePhoneNotifySendNetworkServiceRequest );
|
|
2706 |
|
|
2707 |
// Complete request with cancel
|
|
2708 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
2709 |
|
|
2710 |
return KErrNone;
|
|
2711 |
}
|
|
2712 |
|
|
2713 |
// ---------------------------------------------------------------------------
|
|
2714 |
// CMmSupplServTsy::NotifyAllSendNetworkServiceRequest
|
|
2715 |
// This method activates notifying of network release
|
|
2716 |
// (other items were commented in a header).
|
|
2717 |
// ---------------------------------------------------------------------------
|
|
2718 |
//
|
|
2719 |
TInt CMmSupplServTsy::NotifyAllSendNetworkServiceRequest(
|
|
2720 |
RMobilePhone::TMobilePhoneNotifySendSSOperation* aOperation,
|
|
2721 |
TDes8* aRequestComplete )
|
|
2722 |
{
|
|
2723 |
TFLOGSTRING("TSY: CMmSupplServTsy::NotifyAllSendNetworkRequest" );
|
|
2724 |
|
|
2725 |
TPckg<RMobilePhone::TMobilePhoneSendSSRequestV3>* ssDataPckg =
|
|
2726 |
reinterpret_cast<TPckg<RMobilePhone::TMobilePhoneSendSSRequestV3>*>
|
|
2727 |
( aRequestComplete );
|
|
2728 |
|
|
2729 |
RMobilePhone::TMobilePhoneSendSSRequestV3& ssData =
|
|
2730 |
( *ssDataPckg )();
|
|
2731 |
|
|
2732 |
//save pointer to client data
|
|
2733 |
iRetSSDataPtrAllRequest = &ssData;
|
|
2734 |
|
|
2735 |
// aOperation type
|
|
2736 |
iRetSSOperationPtr = aOperation;
|
|
2737 |
|
|
2738 |
// set req handle
|
|
2739 |
iMmPhone->iReqHandleType =
|
|
2740 |
CMmPhoneTsy::EMultimodePhoneNotifyAllSendNetworkServiceRequest;
|
|
2741 |
|
|
2742 |
return KErrNone;
|
|
2743 |
}
|
|
2744 |
|
|
2745 |
|
|
2746 |
|
|
2747 |
// ---------------------------------------------------------------------------
|
|
2748 |
// CMmSupplServTsy::CompleteNotifyAllSendNetworkServiceRequest
|
|
2749 |
// This method completes notify network service request.
|
|
2750 |
// (other items were commented in a header).
|
|
2751 |
// ---------------------------------------------------------------------------
|
|
2752 |
//
|
|
2753 |
void CMmSupplServTsy::CompleteNotifyAllSendNetworkServiceRequest(
|
|
2754 |
TInt aErrorCode, CMmDataPackage* aDataPackage )
|
|
2755 |
{
|
|
2756 |
TFLOGSTRING2("TSY: CMmSupplServTsy::CompleteNotifyAllSendNetworkRequest. Error: %d", aErrorCode );
|
|
2757 |
|
|
2758 |
// Reset req handle. Returns the deleted req handle
|
|
2759 |
TTsyReqHandle reqHandle = iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2760 |
CMmPhoneTsy::EMultimodePhoneNotifyAllSendNetworkServiceRequest );
|
|
2761 |
|
|
2762 |
if( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
2763 |
{
|
|
2764 |
// Check if response was ok
|
|
2765 |
if ( KErrNone == aErrorCode )
|
|
2766 |
{
|
|
2767 |
// Unpack data to client side pointers
|
|
2768 |
aDataPackage->UnPackData ( *iRetSSOperationPtr, *iRetSSDataPtrAllRequest );
|
|
2769 |
|
|
2770 |
// Complete the client request
|
|
2771 |
iMmPhone->ReqCompleted( reqHandle, KErrNone );
|
|
2772 |
}
|
|
2773 |
else
|
|
2774 |
{
|
|
2775 |
// Complete error value
|
|
2776 |
iMmPhone->ReqCompleted( reqHandle, aErrorCode );
|
|
2777 |
}
|
|
2778 |
}
|
|
2779 |
}
|
|
2780 |
|
|
2781 |
// ---------------------------------------------------------------------------
|
|
2782 |
// CMmSupplServTsy::NotifyAllSendNetworkRequestCancel()
|
|
2783 |
// Cancels notify all send network service request.
|
|
2784 |
// (other items were commented in a header).
|
|
2785 |
// ---------------------------------------------------------------------------
|
|
2786 |
//
|
|
2787 |
TInt CMmSupplServTsy::NotifyAllSendNetworkServiceRequestCancel(
|
|
2788 |
const TTsyReqHandle aTsyReqHandle )
|
|
2789 |
{
|
|
2790 |
TFLOGSTRING("TSY: CMmSupplServTsy::NotifyAllSendNetworkServiceRequestCancel");
|
|
2791 |
|
|
2792 |
// Clear data pointers
|
|
2793 |
iRetSSOperationPtr = NULL;
|
|
2794 |
iRetSSDataPtrAllRequest = NULL;
|
|
2795 |
|
|
2796 |
// Reset the req handle
|
|
2797 |
iMmPhone->iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2798 |
CMmPhoneTsy::EMultimodePhoneNotifyAllSendNetworkServiceRequest );
|
|
2799 |
|
|
2800 |
// Compelete request with cancel
|
|
2801 |
iMmPhone->ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
2802 |
|
|
2803 |
return KErrNone;
|
|
2804 |
}
|
|
2805 |
|
|
2806 |
// ---------------------------------------------------------------------------
|
|
2807 |
// CMmSupplServTsy::SetIccMwisBootUpFlag
|
|
2808 |
// Set new value for ICC MWIS bootup.
|
|
2809 |
// (other items were commented in a header).
|
|
2810 |
// ---------------------------------------------------------------------------
|
|
2811 |
//
|
|
2812 |
void CMmSupplServTsy::SetIccMwisBootUpFlag( TBool aBootUp )
|
|
2813 |
{
|
|
2814 |
TFLOGSTRING2("TSY: CMmSupplServTsy::SetIccMwisBootUpFlag, aBootUp=%d", aBootUp );
|
|
2815 |
|
|
2816 |
iGetIccSupportAtBoot = aBootUp;
|
|
2817 |
}
|
|
2818 |
|
|
2819 |
// End of File
|