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 "CMmCustomTsy.h"
|
|
20 |
#include "CMmCustomGsmExt.h"
|
|
21 |
#include "cmmcalllist.h"
|
|
22 |
#include "cmmphoneextinterface.h"
|
|
23 |
#include "CMmWimTsy.h"
|
|
24 |
#include "cmmcalltsy.h"
|
|
25 |
#include "CMmCommonStaticUtility.h"
|
|
26 |
#include "CMmSimLockTsy.h"
|
|
27 |
#include "MmTsy_conf.h"
|
|
28 |
#include <ctsy/tflogger.h>
|
|
29 |
#include "cmmpblist.h"
|
|
30 |
#include "cmmphonebookstoretsy.h"
|
|
31 |
#include "CMmPacketTsy.h"
|
|
32 |
#include "CMmSIMTsy.h"
|
|
33 |
#include "CMmCustomSecurityTsy.h"
|
|
34 |
#include <ctsy/serviceapi/gsmerror.h>
|
|
35 |
#include <ctsy/serviceapi/cmmcustomvendorext.h>
|
|
36 |
#include "cmmnettsy.h" // for CMmNetTsy::CipheringIndicatorForcedOff()
|
|
37 |
#include <ctsy/serviceapi/ctsydomaincrkeys.h>
|
|
38 |
#include "ctsyprivatecrpkeys.h"
|
|
39 |
#include <featureuids.h>
|
|
40 |
|
|
41 |
// ======== MEMBER FUNCTIONS ========
|
|
42 |
|
|
43 |
CMmCustomTsy::CMmCustomTsy():
|
|
44 |
iReqHandleType(ECustomTsyReqHandleUnknown)
|
|
45 |
{
|
|
46 |
iMmPhoneTsy = NULL;
|
|
47 |
iMmCustomExtInterface = NULL;
|
|
48 |
Mem::FillZ( iMmSubTsy, sizeof( iMmSubTsy ) );
|
|
49 |
|
|
50 |
// initialize internal data
|
|
51 |
iCipheringInfo.iIndStatus = EFalse;
|
|
52 |
iCipheringInfo.iCiphStatus = EFalse;
|
|
53 |
}
|
|
54 |
|
|
55 |
void CMmCustomTsy::ConstructL(
|
|
56 |
CMmPhoneTsy* aMmPhoneTsy )
|
|
57 |
{
|
|
58 |
TFLOGSTRING("TSY: CMmCustomTsy::ConstructL");
|
|
59 |
iMmPhoneTsy = aMmPhoneTsy;
|
|
60 |
|
|
61 |
iMmCustomExtInterface = CMmCustomGsmExt::NewL( aMmPhoneTsy, this );
|
|
62 |
iMmSubTsy[ESubTsyIdxWIM] = CMmWimTsy::NewL( this );
|
|
63 |
iMmSubTsy[ESubTsyIdxSimLock] = CMmSimLockTsy::NewL( this );
|
|
64 |
iMmSubTsy[ESubTsyIdxPacket] = CMmPacketTsy::NewL( this, aMmPhoneTsy );
|
|
65 |
|
|
66 |
iMmSubTsy[ESubTsyIdxSIM] = CMmSIMTsy::NewL( this );
|
|
67 |
|
|
68 |
iMmSecurityTsy = CMmCustomSecurityTsy::NewL( this, aMmPhoneTsy );
|
|
69 |
|
|
70 |
|
|
71 |
|
|
72 |
#ifdef REQHANDLE_TIMER
|
|
73 |
// Create req handle store
|
|
74 |
iTsyReqHandleStore = CMmTsyReqHandleStore::NewL( this, iMmPhoneTsy,
|
|
75 |
ECustomTsyMaxNumOfRequests, iCustomReqHandles );
|
|
76 |
#else
|
|
77 |
// Create req handle store
|
|
78 |
iTsyReqHandleStore = CMmTsyReqHandleStore::NewL(
|
|
79 |
ECustomTsyMaxNumOfRequests, iCustomReqHandles );
|
|
80 |
#endif
|
|
81 |
|
|
82 |
// register custom tsy in the message manager
|
|
83 |
Phone()->MessageManager()->RegisterTsyObject(
|
|
84 |
CMmMessageManagerBase::ECustomTsy, this );
|
|
85 |
|
|
86 |
iAdnCacheStatus = RMmCustomAPI::ECacheNotReady;
|
|
87 |
iFdnCacheStatus = RMmCustomAPI::ECacheNotReady;
|
|
88 |
|
|
89 |
iISVDialNumberCheckObject = NULL;
|
|
90 |
iISVDialNumberCheck = EFalse;
|
|
91 |
iGetIccCfStatusBootUp = ETrue;
|
|
92 |
//Get pointer to public CenRep
|
|
93 |
iCFISCentRep = iMmPhoneTsy->GetCfisCenRep();
|
|
94 |
iCFISPrivateCentRep = iMmPhoneTsy->GetCfisPRCenRep();
|
|
95 |
TInt err = iFeatureControl.Open();
|
|
96 |
iUsingFeatureManager = (err == KErrNone);
|
|
97 |
|
|
98 |
// update/receive Icc Call forward information
|
|
99 |
if( iMmPhoneTsy->NosBootState()->iSIMReady )
|
|
100 |
{
|
|
101 |
TFLOGSTRING("TSY: CMmCustomTsy::ConstructL -- GET ICC call forward indicators");
|
|
102 |
// Get Icc cfis values from LTSY
|
|
103 |
Phone()->MessageManager()->HandleRequestL(
|
|
104 |
ECustomGetIccCallForwardingStatusIPC );
|
|
105 |
}
|
|
106 |
|
|
107 |
// check if HomeZoneParams has been already read in NotifySimStatusReady
|
|
108 |
// if not, query again
|
|
109 |
if ( !iMmPhoneTsy->GetHomeZoneParamsChecked() )
|
|
110 |
{
|
|
111 |
TFLOGSTRING("TSY: CMmCustomTsy::ConstructL - GetHomeZoneParamsChecked()");
|
|
112 |
CMmSIMTsy* simCustomTsy = NULL;
|
|
113 |
simCustomTsy = ( CMmSIMTsy* )GetSIMTsyPtr();
|
|
114 |
TFLOGSTRING("TSY: CMmCustomTsy::ConstructL - pointer created");
|
|
115 |
|
|
116 |
if ( simCustomTsy )
|
|
117 |
{
|
|
118 |
TFLOGSTRING("TSY: CMmCustomTsy::ConstructL - CheckViagHomeZoneParamsL()");
|
|
119 |
simCustomTsy->CheckViagHomezoneParamsL();
|
|
120 |
iMmPhoneTsy->SetHomeZoneParamsChecked( ETrue );
|
|
121 |
}
|
|
122 |
else
|
|
123 |
{
|
|
124 |
TFLOGSTRING("TSY: CMmCustomTsy::ConstructL - CheckViagHomeZoneParamsL() False");
|
|
125 |
iMmPhoneTsy->SetHomeZoneParamsChecked( EFalse );
|
|
126 |
}
|
|
127 |
}
|
|
128 |
}
|
|
129 |
|
|
130 |
CMmCustomTsy* CMmCustomTsy::NewL(
|
|
131 |
CMmPhoneTsy* aMmPhoneTsy )
|
|
132 |
{
|
|
133 |
TFLOGSTRING("TSY: CMmCustomTsy::NewL");
|
|
134 |
CMmCustomTsy* mmCustomTsy = new ( ELeave ) CMmCustomTsy();
|
|
135 |
CleanupClosePushL( *mmCustomTsy );
|
|
136 |
mmCustomTsy->ConstructL( aMmPhoneTsy );
|
|
137 |
CleanupStack::Pop( mmCustomTsy );
|
|
138 |
|
|
139 |
return mmCustomTsy;
|
|
140 |
}
|
|
141 |
|
|
142 |
CMmCustomTsy::~CMmCustomTsy()
|
|
143 |
{
|
|
144 |
TFLOGSTRING("TSY: CMmCustomTsy::~CMmCustomTsy");
|
|
145 |
|
|
146 |
iFeatureControl.Close();
|
|
147 |
|
|
148 |
// Delete subsystems
|
|
149 |
for ( TInt i = 0; ESubTsyIdxMaxNum > i; i++ )
|
|
150 |
{
|
|
151 |
delete iMmSubTsy[i];
|
|
152 |
}
|
|
153 |
|
|
154 |
// Delete SecurityTsy
|
|
155 |
delete iMmSecurityTsy;
|
|
156 |
|
|
157 |
// Delete GSM extensions
|
|
158 |
delete iMmCustomExtInterface;
|
|
159 |
|
|
160 |
// delete req handle store
|
|
161 |
delete iTsyReqHandleStore;
|
|
162 |
|
|
163 |
if ( iMmPhoneTsy )
|
|
164 |
{
|
|
165 |
iMmPhoneTsy->SetHomeZoneParamsChecked( EFalse );
|
|
166 |
iMmPhoneTsy->SetCustomTsy( NULL );
|
|
167 |
// unregister custom tsy in the message manager
|
|
168 |
iMmPhoneTsy->MessageManager()->DeregisterTsyObject(this);
|
|
169 |
}
|
|
170 |
}
|
|
171 |
|
|
172 |
// ---------------------------------------------------------------------------
|
|
173 |
// CMmCustomTsy::Phone
|
|
174 |
// Returns pointer to PhoneTsy object
|
|
175 |
// (other items were commented in a header).
|
|
176 |
// ---------------------------------------------------------------------------
|
|
177 |
//
|
|
178 |
CMmPhoneTsy* CMmCustomTsy::Phone()
|
|
179 |
{
|
|
180 |
return iMmPhoneTsy;
|
|
181 |
}
|
|
182 |
|
|
183 |
|
|
184 |
// ---------------------------------------------------------------------------
|
|
185 |
// CMmCustomTsy::ExtFunc
|
|
186 |
// Dispatches extension function requests. All functions that are not part
|
|
187 |
// of the core function set, are routed via the ExtFunc method.
|
|
188 |
// At the beginning of this method, packaged pointers are unpacked. Then
|
|
189 |
// the correct function is selected using the IPC number.
|
|
190 |
// (other items were commented in a header).
|
|
191 |
// ---------------------------------------------------------------------------
|
|
192 |
//
|
|
193 |
TInt CMmCustomTsy::ExtFunc(
|
|
194 |
const TTsyReqHandle aTsyReqHandle,
|
|
195 |
const TInt aIpc,
|
|
196 |
const TDataPackage& aPackage )
|
|
197 |
{
|
|
198 |
TInt ret = KErrNone;
|
|
199 |
TInt trapError = KErrNone;
|
|
200 |
|
|
201 |
// Ensure the ReqHandleType is unset.
|
|
202 |
// This will detect cases where this method indirectly calls itself
|
|
203 |
// (e.g. servicing a client call that causes a self-reposting notification to complete and thus repost).
|
|
204 |
// Such cases are not supported because iReqHandleType is in the context of this class instance,
|
|
205 |
// not this request, and we don't want the values set by the inner request and the outer request
|
|
206 |
// interfering with each other.
|
|
207 |
__ASSERT_DEBUG(iReqHandleType==ECustomTsyReqHandleUnknown, User::Invariant());
|
|
208 |
|
|
209 |
// before processing further the request, check if offline mode status
|
|
210 |
// is enabled and if the given request can be perfomed in that case.
|
|
211 |
if ( ERfsStateInfoInactive == iMmPhoneTsy->GetRfStateInfo() &&
|
|
212 |
!IsRequestPossibleInOffline( aIpc ) )
|
|
213 |
{
|
|
214 |
TFLOGSTRING2 ("TSY: Offline mode ON, request is not allowed: %d", aIpc );
|
|
215 |
ret = CMmCommonStaticUtility::EpocErrorCode( KErrGeneral,
|
|
216 |
KErrGsmOfflineOpNotAllowed );
|
|
217 |
|
|
218 |
// Complete the request with appropiate error
|
|
219 |
ReqCompleted ( aTsyReqHandle, ret );
|
|
220 |
}
|
|
221 |
else
|
|
222 |
{
|
|
223 |
TRAP( trapError, ret = DoExtFuncL( aTsyReqHandle, aIpc, aPackage ); );
|
|
224 |
|
|
225 |
if ( KErrNone != trapError )
|
|
226 |
{
|
|
227 |
// error handling. Object cannot be created.
|
|
228 |
ret = trapError;
|
|
229 |
}
|
|
230 |
if ( KErrNone != ret )
|
|
231 |
{
|
|
232 |
ReqCompleted( aTsyReqHandle, ret );
|
|
233 |
}
|
|
234 |
}
|
|
235 |
|
|
236 |
return KErrNone;
|
|
237 |
}
|
|
238 |
|
|
239 |
// ---------------------------------------------------------------------------
|
|
240 |
// CMmCustomTsy::DoExtFuncL
|
|
241 |
// This DoExtFuncL is called by Etel server when it has Custom API
|
|
242 |
// request for the TSY. To process a request handle, request type and request
|
|
243 |
// data are passed to the Custom TSY.
|
|
244 |
// (other items were commented in a header).
|
|
245 |
// ---------------------------------------------------------------------------
|
|
246 |
//
|
|
247 |
TInt CMmCustomTsy::DoExtFuncL(
|
|
248 |
const TTsyReqHandle aTsyReqHandle,
|
|
249 |
const TInt aIpc,
|
|
250 |
const TDataPackage& aPackage )
|
|
251 |
{
|
|
252 |
TInt ret( KErrNotSupported );
|
|
253 |
|
|
254 |
// first check if request is supported in CMmSecurityTsy
|
|
255 |
// (due layering that class is no longer a part of extension modules)
|
|
256 |
|
|
257 |
ret = iMmSecurityTsy->DoExtFuncL( aTsyReqHandle, aIpc, aPackage );
|
|
258 |
|
|
259 |
if ( KErrNotSupported == ret )
|
|
260 |
{
|
|
261 |
|
|
262 |
// then check all the Custom extension modules
|
|
263 |
ret = CMmTsyBase::DoBaseExtFuncL( aTsyReqHandle, aIpc, aPackage );
|
|
264 |
|
|
265 |
// if extension modules did not serve this request
|
|
266 |
if ( KErrNotSupported == ret )
|
|
267 |
{
|
|
268 |
// Ensure the ReqHandleType is unset.
|
|
269 |
// This will detect cases where this method indirectly calls itself
|
|
270 |
// (e.g. servicing a client call that causes a self-reposting notification to complete and thus repost).
|
|
271 |
// Such cases are not supported because iReqHandleType is in the context of this class instance,
|
|
272 |
// not this request, and we don't want the values set by the inner request and the outer request
|
|
273 |
// interfering with each other.
|
|
274 |
__ASSERT_DEBUG(iReqHandleType==ECustomTsyReqHandleUnknown, User::Invariant());
|
|
275 |
|
|
276 |
switch ( aIpc )
|
|
277 |
{
|
|
278 |
// Perform IMS Authentication
|
|
279 |
case EMobilePhoneIMSAuthenticate:
|
|
280 |
ret = ImsAuthenticationL( aTsyReqHandle,
|
|
281 |
REINTERPRET_CAST(
|
|
282 |
RMobilePhone::TImsAuthenticateDataV5*,
|
|
283 |
aPackage.Ptr1() ) );
|
|
284 |
break;
|
|
285 |
// Get sim authentication data
|
|
286 |
case ECustomGetSimAuthenticationDataIPC:
|
|
287 |
ret = SimAuthenticationL( aTsyReqHandle, aPackage );
|
|
288 |
break;
|
|
289 |
// Notify Dtmf event
|
|
290 |
case ECustomNotifyDtmfEventIPC:
|
|
291 |
ret = NotifyDtmfEvent(
|
|
292 |
REINTERPRET_CAST( RMmCustomAPI::TDtmfInfo*,
|
|
293 |
aPackage.Ptr1() ) );
|
|
294 |
break;
|
|
295 |
// Get Diagnostic Octets - info
|
|
296 |
case ECustomGetDiagnosticOctetsIPC:
|
|
297 |
ret = GetDiagnosticInfo ( aTsyReqHandle,
|
|
298 |
REINTERPRET_CAST( TName*, aPackage.Ptr1() ) );
|
|
299 |
break;
|
|
300 |
// Get Remote Alerting Tone Status
|
|
301 |
case ECustomGetRemoteAlertingToneStatusIPC:
|
|
302 |
ret = GetRemoteAlertingToneStatus ( aTsyReqHandle,
|
|
303 |
REINTERPRET_CAST(
|
|
304 |
RMmCustomAPI::TRemoteAlertingToneStatus*,
|
|
305 |
aPackage.Ptr1() ) );
|
|
306 |
break;
|
|
307 |
// Call Origin
|
|
308 |
case ECustomCallOriginIPC:
|
|
309 |
ret = GetCallOrigin( aTsyReqHandle,
|
|
310 |
REINTERPRET_CAST( TName*, aPackage.Ptr1() ),
|
|
311 |
REINTERPRET_CAST( RMmCustomAPI::TCallOrigin*,
|
|
312 |
aPackage.Ptr2() ) );
|
|
313 |
break;
|
|
314 |
// Terminate a Call/all calls
|
|
315 |
case ECustomTerminateCallIPC:
|
|
316 |
ret = TerminateCallL( aTsyReqHandle,
|
|
317 |
REINTERPRET_CAST( TName*, aPackage.Ptr1() ) );
|
|
318 |
break;
|
|
319 |
// Get Als Blocked
|
|
320 |
case ECustomGetAlsBlockedIPC:
|
|
321 |
ret = GetAlsBlockedL( aTsyReqHandle,
|
|
322 |
REINTERPRET_CAST( RMmCustomAPI::TGetAlsBlockStatus*,
|
|
323 |
aPackage.Ptr1() ) );
|
|
324 |
break;
|
|
325 |
// Set Alternative Line Service Blocked
|
|
326 |
case ECustomSetAlsBlockedIPC:
|
|
327 |
ret = SetAlsBlockedL( aTsyReqHandle,
|
|
328 |
REINTERPRET_CAST( RMmCustomAPI::TSetAlsBlock*,
|
|
329 |
aPackage.Ptr1() ) );
|
|
330 |
break;
|
|
331 |
// Notify Als Blocked Change
|
|
332 |
case ECustomNotifyAlsBlockedChangedIPC:
|
|
333 |
ret = NotifyAlsBlockedChanged (
|
|
334 |
REINTERPRET_CAST( RMmCustomAPI::TGetAlsBlockStatus*,
|
|
335 |
aPackage.Ptr1() ) );
|
|
336 |
break;
|
|
337 |
// Get ALS pp support
|
|
338 |
case ECustomCheckAlsPpSupportIPC:
|
|
339 |
ret = GetAlsPpSupportL( aTsyReqHandle,
|
|
340 |
REINTERPRET_CAST( RMmCustomAPI::TAlsSupport*,
|
|
341 |
aPackage.Ptr1() ) );
|
|
342 |
break;
|
|
343 |
// Get ciphering information
|
|
344 |
case ECustomGetCipheringInfoIPC:
|
|
345 |
ret = GetCipheringInfoL( aTsyReqHandle,
|
|
346 |
REINTERPRET_CAST( RMmCustomAPI::TCipheringInfo*,
|
|
347 |
aPackage.Ptr1() ) );
|
|
348 |
break;
|
|
349 |
// Notify ciphering information change
|
|
350 |
case ECustomNotifyCipheringInfoChangeIPC:
|
|
351 |
ret = NotifyCipheringInfoChange(
|
|
352 |
REINTERPRET_CAST(RMmCustomAPI::TCipheringInfo*,
|
|
353 |
aPackage.Ptr1() ) );
|
|
354 |
break;
|
|
355 |
// Notify NSPS status
|
|
356 |
case ECustomNotifyNSPSStatusIPC:
|
|
357 |
ret = NotifyNSPSStatus (
|
|
358 |
REINTERPRET_CAST(RMmCustomAPI::TNspsStatus*,
|
|
359 |
aPackage.Ptr1() ) );
|
|
360 |
break;
|
|
361 |
// Wake up network from NSPS status
|
|
362 |
case ECustomNetWakeupIPC:
|
|
363 |
ret = NetWakeupL( aTsyReqHandle );
|
|
364 |
break;
|
|
365 |
case ECustomClearCallBlackListIPC:
|
|
366 |
ret = ClearCallBlackListL ( aTsyReqHandle );
|
|
367 |
break;
|
|
368 |
// SS additional info notification
|
|
369 |
case ECustomSsAdditionalInfoNotificationIPC:
|
|
370 |
ret = SsAdditionalInfoNotification(
|
|
371 |
REINTERPRET_CAST( RMmCustomAPI::TSsAdditionalInfo*,
|
|
372 |
aPackage.Ptr1() ) );
|
|
373 |
break;
|
|
374 |
// Get the air time duration
|
|
375 |
case ECustomGetAirTimeDurationIPC:
|
|
376 |
ret = GetAirTimeDuration ( aTsyReqHandle,
|
|
377 |
REINTERPRET_CAST( TTimeIntervalSeconds*,
|
|
378 |
aPackage.Ptr1() ) );
|
|
379 |
break;
|
|
380 |
// Check emergency number
|
|
381 |
case ECustomCheckEmergencyNumberIPC:
|
|
382 |
ret = CheckEmergencyNumberL( aTsyReqHandle,
|
|
383 |
REINTERPRET_CAST( RMmCustomAPI::TEmerNumberCheckMode*,
|
|
384 |
aPackage.Ptr1() ),
|
|
385 |
REINTERPRET_CAST( TBool*, aPackage.Ptr2() ) );
|
|
386 |
break;
|
|
387 |
// Get Network Operator Name
|
|
388 |
case ECustomGetNetworkProviderNameIPC:
|
|
389 |
ret = GetNetworkOperatorNameL( aPackage.Des1u() );
|
|
390 |
break;
|
|
391 |
// Get two digit dial support
|
|
392 |
case ECustomCheckTwoDigitDialSupportIPC:
|
|
393 |
ret = CheckTwoDigitDialSupportL( aTsyReqHandle,
|
|
394 |
REINTERPRET_CAST( RMmCustomAPI::TTwoDigitDialSupport*,
|
|
395 |
aPackage.Ptr1() ) );
|
|
396 |
break;
|
|
397 |
// Notify when phonebook cache is ready
|
|
398 |
case ECustomNotifyPndCacheReadyIPC:
|
|
399 |
ret = NotifyPhoneBookCacheReady( aTsyReqHandle,
|
|
400 |
REINTERPRET_CAST( TName*, aPackage.Ptr1() ) );
|
|
401 |
break;
|
|
402 |
// Get phonebook cache status
|
|
403 |
case ECustomGetPndCacheStatusIPC:
|
|
404 |
ret = GetPndCacheStatus( aTsyReqHandle,
|
|
405 |
REINTERPRET_CAST( RMmCustomAPI::TPndCacheStatus*,
|
|
406 |
aPackage.Ptr1() ),
|
|
407 |
REINTERPRET_CAST( const TName*, aPackage.Des2u() ) );
|
|
408 |
break;
|
|
409 |
// Get the programmable operator name
|
|
410 |
case ECustomGetOperatorNameIPC:
|
|
411 |
ret = GetOperatorNameL( aTsyReqHandle,
|
|
412 |
REINTERPRET_CAST( RMmCustomAPI::TOperatorNameInfo*,
|
|
413 |
aPackage.Ptr1() ) );
|
|
414 |
break;
|
|
415 |
// Notify SS Network event
|
|
416 |
case ECustomNotifySsNetworkEventIPC:
|
|
417 |
ret = NotifySsNetworkEvent(
|
|
418 |
REINTERPRET_CAST( RMmCustomAPI::TSsTypeAndMode*,
|
|
419 |
aPackage.Ptr1() ),
|
|
420 |
REINTERPRET_CAST( RMmCustomAPI::TSsInfo*,
|
|
421 |
aPackage.Ptr2() ) );
|
|
422 |
break;
|
|
423 |
// Get the programmable operator logo
|
|
424 |
case ECustomGetProgrammableOperatorLogoIPC:
|
|
425 |
ret = GetProgrammableOperatorLogoL( aTsyReqHandle,
|
|
426 |
REINTERPRET_CAST( RMmCustomAPI::TOperatorId*,
|
|
427 |
aPackage.Ptr1() ),
|
|
428 |
REINTERPRET_CAST( RMmCustomAPI::TOperatorLogo*,
|
|
429 |
aPackage.Ptr2() ) );
|
|
430 |
break;
|
|
431 |
// Sat refresh complete notification
|
|
432 |
case ECustomSatRefreshCompleteNotificationIPC:
|
|
433 |
ret = SatRefreshCompleteNotification();
|
|
434 |
break;
|
|
435 |
// Reset the net server
|
|
436 |
case ECustomResetNetServerIPC:
|
|
437 |
ret = ResetNetServerL( aTsyReqHandle );
|
|
438 |
break;
|
|
439 |
// Notify Network Connection Failure
|
|
440 |
case ECustomNotifyNetworkConnectionFailureIPC:
|
|
441 |
ret = NotifyNetworkConnectionFailure( );
|
|
442 |
break;
|
|
443 |
// Get supported network modes
|
|
444 |
case ECustomGetSystemNetworkModesIPC:
|
|
445 |
ret = GetSystemNetworkModesL( aTsyReqHandle,
|
|
446 |
REINTERPRET_CAST(TUint32*, aPackage.Ptr1()) );
|
|
447 |
break;
|
|
448 |
// Set system network mode
|
|
449 |
case ECustomSetSystemNetworkModeIPC:
|
|
450 |
ret = SetSystemNetworkModeL( aTsyReqHandle,
|
|
451 |
REINTERPRET_CAST(RMmCustomAPI::TNetworkModeCaps*,
|
|
452 |
aPackage.Ptr1()) );
|
|
453 |
break;
|
|
454 |
// Get current system network mode
|
|
455 |
case ECustomGetCurrentSystemNetworkModesIPC:
|
|
456 |
ret = GetCurrentSystemNetworkModeL( aTsyReqHandle,
|
|
457 |
REINTERPRET_CAST(TUint32*, aPackage.Ptr1()) );
|
|
458 |
break;
|
|
459 |
// Get supported network bands
|
|
460 |
case ECustomGetBandSelectionIPC:
|
|
461 |
ret = GetSystemNetworkBandL( aTsyReqHandle,
|
|
462 |
REINTERPRET_CAST(RMmCustomAPI::TBandSelection*,
|
|
463 |
aPackage.Ptr1()),
|
|
464 |
REINTERPRET_CAST(RMmCustomAPI::TNetworkModeCaps*,
|
|
465 |
aPackage.Ptr2()) );
|
|
466 |
break;
|
|
467 |
// Set system network band
|
|
468 |
case ECustomSetBandSelectionIPC:
|
|
469 |
ret = SetSystemNetworkBandL( aTsyReqHandle,
|
|
470 |
REINTERPRET_CAST(RMmCustomAPI::TBandSelection*,
|
|
471 |
aPackage.Ptr1() ),
|
|
472 |
REINTERPRET_CAST(RMmCustomAPI::TNetworkModeCaps*,
|
|
473 |
aPackage.Ptr2() ) );
|
|
474 |
break;
|
|
475 |
// Notify SS request complete
|
|
476 |
case ECustomNotifySsRequestCompleteIPC:
|
|
477 |
ret = SsRequestCompleteNotification(
|
|
478 |
REINTERPRET_CAST( TInt*, aPackage.Ptr1() ) );
|
|
479 |
break;
|
|
480 |
case ECustomGetLifeTimeIPC:
|
|
481 |
ret = GetLifeTimeL( aTsyReqHandle, aPackage.Des1n() );
|
|
482 |
break;
|
|
483 |
case ECustomReadSimFileIPC:
|
|
484 |
ret = GetSimFileInfoL(aTsyReqHandle, aPackage.Des1n(),
|
|
485 |
aPackage.Des2n());
|
|
486 |
break;
|
|
487 |
// Get 3G phonebook info
|
|
488 |
case EGet3GPBInfoIPC:
|
|
489 |
ret = Get3GPBInfo ( aTsyReqHandle,
|
|
490 |
REINTERPRET_CAST( RMmCustomAPI::T3GPBInfo*,
|
|
491 |
aPackage.Ptr1() ) );
|
|
492 |
break;
|
|
493 |
case ECustomSetDriveModeIPC:
|
|
494 |
ret = SetDriveModeL( aTsyReqHandle,
|
|
495 |
REINTERPRET_CAST( RMmCustomAPI::TSetDriveMode*,
|
|
496 |
aPackage.Ptr1() ) );
|
|
497 |
break;
|
|
498 |
case ECustomSetSimMessageStatusReadIPC:
|
|
499 |
ret = SetSimMessageStatusReadL( aTsyReqHandle,
|
|
500 |
*( REINTERPRET_CAST(TTime*, aPackage.Ptr1() ) ),
|
|
501 |
*( REINTERPRET_CAST(TInt*, aPackage.Ptr2() ) ) );
|
|
502 |
break;
|
|
503 |
case ECustomNotifyRauEventIPC:
|
|
504 |
ret = NotifyRauEvent(
|
|
505 |
REINTERPRET_CAST( RMmCustomAPI::TRauEventStatus*,
|
|
506 |
aPackage.Ptr1() ) );
|
|
507 |
break;
|
|
508 |
case ECustomReadHSxPAStatusIPC:
|
|
509 |
ret = ReadHSxPAStatusL( aTsyReqHandle, REINTERPRET_CAST(
|
|
510 |
RMmCustomAPI::THSxPAStatus*, aPackage.Ptr1() ) );
|
|
511 |
break;
|
|
512 |
case ECustomWriteHSxPAStatusIPC:
|
|
513 |
ret = WriteHSxPAStatusL( aTsyReqHandle, REINTERPRET_CAST(
|
|
514 |
RMmCustomAPI::THSxPAStatus*, aPackage.Ptr1() ) );
|
|
515 |
break;
|
|
516 |
case ECustomNotifyHSxPAStatusIPC:
|
|
517 |
ret = NotifyHSxPAStatus( REINTERPRET_CAST(
|
|
518 |
RMmCustomAPI::THSxPAStatus*, aPackage.Ptr1() ) );
|
|
519 |
break;
|
|
520 |
case ECustomGetIccCallForwardingStatusIPC:
|
|
521 |
ret = GetIccCallForwardingStatusL( aTsyReqHandle,
|
|
522 |
aPackage.Des1n() );
|
|
523 |
break;
|
|
524 |
case ECustomNotifyIccCallForwardingStatusChangeIPC:
|
|
525 |
ret = NotifyIccCallForwardingStatusChange(
|
|
526 |
aPackage.Des1n() );
|
|
527 |
break;
|
|
528 |
case ECustomNotifyCellInfoChangeIPC:
|
|
529 |
ret = NotifyCellInfoChange( aPackage.Des1n() );
|
|
530 |
break;
|
|
531 |
case ECustomGetCellInfoIPC:
|
|
532 |
ret = GetCellInfoL( aPackage.Des1n() );
|
|
533 |
break;
|
|
534 |
case ECustomGetServiceTableSupportbyApplicationIPC:
|
|
535 |
ret = GetUSIMServiceSupportL( aTsyReqHandle,
|
|
536 |
REINTERPRET_CAST( RMmCustomAPI::TAppSupport*,
|
|
537 |
aPackage.Ptr1() ) );
|
|
538 |
break;
|
|
539 |
case ECustomNotifyRemoteAlertingToneStatusChangeIPC:
|
|
540 |
ret = NotifyRemoteAlertingToneStatusChange(
|
|
541 |
REINTERPRET_CAST(
|
|
542 |
RMmCustomAPI::TRemoteAlertingToneStatus*,
|
|
543 |
aPackage.Ptr1() ) );
|
|
544 |
break;
|
|
545 |
default:
|
|
546 |
// ret is already set as KErrNotSupported
|
|
547 |
TFLOGSTRING2("TSY: CMmCustomTsy::DoExtFuncL unsupported ipc=%d", aIpc);
|
|
548 |
break;
|
|
549 |
}
|
|
550 |
|
|
551 |
// save request handle
|
|
552 |
if ( ECustomTsyReqHandleUnknown != iReqHandleType )
|
|
553 |
{
|
|
554 |
#ifdef REQHANDLE_TIMER
|
|
555 |
// set timer for the request
|
|
556 |
SetTypeOfResponse ( iReqHandleType, aTsyReqHandle );
|
|
557 |
#else
|
|
558 |
iTsyReqHandleStore->SetTsyReqHandle( iReqHandleType,
|
|
559 |
aTsyReqHandle );
|
|
560 |
#endif // REQHANDLE_TIMER
|
|
561 |
// We've finished with this value now. Clear it so it doesn't leak
|
|
562 |
// up to any other instances of this method down the call stack
|
|
563 |
iReqHandleType = ECustomTsyReqHandleUnknown;
|
|
564 |
}
|
|
565 |
}
|
|
566 |
}
|
|
567 |
|
|
568 |
return ret;
|
|
569 |
}
|
|
570 |
|
|
571 |
// ---------------------------------------------------------------------------
|
|
572 |
// CMmCustomTsy::RegisterNotification
|
|
573 |
// Called when the server recognises that this notification is being posted
|
|
574 |
// for the first time on this sub-session object. It enables the TSY to
|
|
575 |
// "turn on" any regular notification messages that it may receive from DOS.
|
|
576 |
// (other items were commented in a header).
|
|
577 |
// ---------------------------------------------------------------------------
|
|
578 |
//
|
|
579 |
TInt CMmCustomTsy::RegisterNotification(
|
|
580 |
const TInt aIpc )
|
|
581 |
{
|
|
582 |
TInt ret ( KErrNotSupported );
|
|
583 |
|
|
584 |
switch( aIpc )
|
|
585 |
{
|
|
586 |
case ECustomNotifyRauEventIPC:
|
|
587 |
case ECustomNotifyDtmfEventIPC:
|
|
588 |
case ECustomNotifyAlsBlockedChangedIPC:
|
|
589 |
case ECustomNotifyCipheringInfoChangeIPC:
|
|
590 |
case ECustomNotifyNSPSStatusIPC:
|
|
591 |
case ECustomSsAdditionalInfoNotificationIPC:
|
|
592 |
case ECustomNotifySsRequestCompleteIPC:
|
|
593 |
case ECustomNotifyPndCacheReadyIPC:
|
|
594 |
case ECustomNotifySsNetworkEventIPC:
|
|
595 |
case ECustomSatRefreshCompleteNotificationIPC:
|
|
596 |
case ECustomNotifyNetworkConnectionFailureIPC:
|
|
597 |
case ECustomNotifyHSxPAStatusIPC:
|
|
598 |
case ECustomNotifyIccCallForwardingStatusChangeIPC:
|
|
599 |
case ECustomNotifyCellInfoChangeIPC:
|
|
600 |
case ECustomNotifyRemoteAlertingToneStatusChangeIPC:
|
|
601 |
ret = KErrNone;
|
|
602 |
break;
|
|
603 |
|
|
604 |
default:
|
|
605 |
ret = CMmTsyBase::RegisterNotification( aIpc );
|
|
606 |
break;
|
|
607 |
}
|
|
608 |
|
|
609 |
return ret;
|
|
610 |
}
|
|
611 |
|
|
612 |
// ---------------------------------------------------------------------------
|
|
613 |
// CMmCustomTsy::DeregisterNotification
|
|
614 |
// Called when the server recognises that this notification will not be posted
|
|
615 |
// again because the last client to have a handle on this sub-session object
|
|
616 |
// has just closed the handle. It enables the TSY to "turn off" any regular
|
|
617 |
// notification messages that it may receive from DOS.
|
|
618 |
// (other items were commented in a header).
|
|
619 |
// ---------------------------------------------------------------------------
|
|
620 |
//
|
|
621 |
TInt CMmCustomTsy::DeregisterNotification(
|
|
622 |
const TInt aIpc )
|
|
623 |
{
|
|
624 |
TInt ret ( KErrNotFound );
|
|
625 |
|
|
626 |
switch( aIpc )
|
|
627 |
{
|
|
628 |
case ECustomNotifyRauEventIPC:
|
|
629 |
case ECustomNotifyDtmfEventIPC:
|
|
630 |
case ECustomNotifyAlsBlockedChangedIPC:
|
|
631 |
case ECustomNotifyCipheringInfoChangeIPC:
|
|
632 |
case ECustomNotifyNSPSStatusIPC:
|
|
633 |
case ECustomSsAdditionalInfoNotificationIPC:
|
|
634 |
case ECustomNotifySsRequestCompleteIPC:
|
|
635 |
case ECustomNotifyPndCacheReadyIPC:
|
|
636 |
case ECustomNotifySsNetworkEventIPC:
|
|
637 |
case ECustomSatRefreshCompleteNotificationIPC:
|
|
638 |
case ECustomNotifyNetworkConnectionFailureIPC:
|
|
639 |
case ECustomNotifyHSxPAStatusIPC:
|
|
640 |
case ECustomNotifyIccCallForwardingStatusChangeIPC:
|
|
641 |
case ECustomNotifyCellInfoChangeIPC:
|
|
642 |
case ECustomNotifyRemoteAlertingToneStatusChangeIPC:
|
|
643 |
ret = KErrNone;
|
|
644 |
break;
|
|
645 |
default:
|
|
646 |
ret = CMmTsyBase::DeregisterNotification( aIpc );
|
|
647 |
break;
|
|
648 |
}
|
|
649 |
|
|
650 |
return ret;
|
|
651 |
}
|
|
652 |
|
|
653 |
// ---------------------------------------------------------------------------
|
|
654 |
// CMmCustomTsy::ReqModeL
|
|
655 |
// Returns request mode for given IPC. If the IPC number belongs to some of
|
|
656 |
// the Custom API functions.
|
|
657 |
// Possible return values:
|
|
658 |
// tsy has own buffering =0x00000000
|
|
659 |
// KReqModeMultipleCompletionEnabled=0x00000001
|
|
660 |
// KReqModeFlowControlObeyed=0x00000002
|
|
661 |
// KReqModeRePostImmediately=0x00000004
|
|
662 |
// (other items were commented in a header).
|
|
663 |
// ---------------------------------------------------------------------------
|
|
664 |
//
|
|
665 |
CTelObject::TReqMode CMmCustomTsy::ReqModeL(
|
|
666 |
const TInt aIpc )
|
|
667 |
{
|
|
668 |
CTelObject::TReqMode ret = 0;
|
|
669 |
|
|
670 |
switch ( aIpc )
|
|
671 |
{
|
|
672 |
// methods using DOS
|
|
673 |
case ECustomNetWakeupIPC:
|
|
674 |
case ECustomGetNetworkProviderNameIPC:
|
|
675 |
case ECustomCheckTwoDigitDialSupportIPC:
|
|
676 |
case ECustomGetOperatorNameIPC:
|
|
677 |
case ECustomResetNetServerIPC:
|
|
678 |
ret = KReqModeFlowControlObeyed;
|
|
679 |
break;
|
|
680 |
|
|
681 |
//TSYs wishing to implement their own buffering can return 0
|
|
682 |
case ECustomSetAlsBlockedIPC:
|
|
683 |
case ECustomSetDriveModeIPC:
|
|
684 |
ret = 0;
|
|
685 |
break;
|
|
686 |
|
|
687 |
// Notifications
|
|
688 |
case ECustomNotifyRauEventIPC:
|
|
689 |
case ECustomNotifyDtmfEventIPC:
|
|
690 |
case ECustomNotifyAlsBlockedChangedIPC:
|
|
691 |
case ECustomNotifyCipheringInfoChangeIPC:
|
|
692 |
case ECustomNotifyNSPSStatusIPC:
|
|
693 |
case ECustomSsAdditionalInfoNotificationIPC:
|
|
694 |
case ECustomNotifyPndCacheReadyIPC:
|
|
695 |
case ECustomNotifySsNetworkEventIPC:
|
|
696 |
case ECustomSatRefreshCompleteNotificationIPC:
|
|
697 |
case ECustomNotifyNetworkConnectionFailureIPC:
|
|
698 |
case ECustomNotifySsRequestCompleteIPC:
|
|
699 |
case ECustomNotifyHSxPAStatusIPC:
|
|
700 |
case ECustomNotifyIccCallForwardingStatusChangeIPC:
|
|
701 |
case ECustomNotifyCellInfoChangeIPC:
|
|
702 |
case ECustomNotifyRemoteAlertingToneStatusChangeIPC:
|
|
703 |
ret = KReqModeRePostImmediately |
|
|
704 |
KReqModeMultipleCompletionEnabled;
|
|
705 |
break;
|
|
706 |
|
|
707 |
// methods that are using DOS but have own flow control system
|
|
708 |
case ECustomGetProgrammableOperatorLogoIPC:
|
|
709 |
case ECustomTerminateCallIPC:
|
|
710 |
case ECustomCheckEmergencyNumberIPC:
|
|
711 |
case ECustomCheckAlsPpSupportIPC:
|
|
712 |
case ECustomGetAlsBlockedIPC:
|
|
713 |
case ECustomGetCipheringInfoIPC:
|
|
714 |
case ECustomClearCallBlackListIPC:
|
|
715 |
case ECustomGetSystemNetworkModesIPC:
|
|
716 |
case ECustomSetSystemNetworkModeIPC:
|
|
717 |
case ECustomGetCurrentSystemNetworkModesIPC:
|
|
718 |
case ECustomReadHSxPAStatusIPC:
|
|
719 |
case ECustomWriteHSxPAStatusIPC:
|
|
720 |
case ECustomGetIccCallForwardingStatusIPC:
|
|
721 |
case ECustomGetCellInfoIPC:
|
|
722 |
case ECustomGetBandSelectionIPC:
|
|
723 |
case ECustomSetBandSelectionIPC:
|
|
724 |
|
|
725 |
// methods not using DOS
|
|
726 |
case ECustomCallOriginIPC:
|
|
727 |
case ECustomGetDiagnosticOctetsIPC:
|
|
728 |
case ECustomGetAirTimeDurationIPC:
|
|
729 |
case ECustomGetRemoteAlertingToneStatusIPC:
|
|
730 |
case ECustomGetPndCacheStatusIPC:
|
|
731 |
case ECustomGetLifeTimeIPC:
|
|
732 |
case ECustomReadSimFileIPC:
|
|
733 |
case EGet3GPBInfoIPC:
|
|
734 |
case EMobilePhoneIMSAuthenticate:
|
|
735 |
case ECustomGetSimAuthenticationDataIPC:
|
|
736 |
case ECustomGetServiceTableSupportbyApplicationIPC:
|
|
737 |
|
|
738 |
// from Security Tsy
|
|
739 |
case ECustomCheckSecurityCodeIPC:
|
|
740 |
case ECustomIsBlockedIPC:
|
|
741 |
case ECustomDisablePhoneLockIPC:
|
|
742 |
case ECustomGetActivePinIPC:
|
|
743 |
case ECustomSetSimMessageStatusReadIPC:
|
|
744 |
ret = 0;
|
|
745 |
break;
|
|
746 |
default:
|
|
747 |
ret = CMmTsyBase::ReqModeL ( aIpc );
|
|
748 |
break;
|
|
749 |
}
|
|
750 |
|
|
751 |
return ret;
|
|
752 |
}
|
|
753 |
|
|
754 |
// ---------------------------------------------------------------------------
|
|
755 |
// CMmCustomTsy::NumberOfSlotsL
|
|
756 |
// Returns number of slots to be used for given IPC.
|
|
757 |
// (other items were commented in a header).
|
|
758 |
// ---------------------------------------------------------------------------
|
|
759 |
//
|
|
760 |
TInt CMmCustomTsy::NumberOfSlotsL(
|
|
761 |
const TInt aIpc )
|
|
762 |
{
|
|
763 |
TInt numberOfSlots ( KMmCustomDefaultSlots );
|
|
764 |
|
|
765 |
switch ( aIpc )
|
|
766 |
{
|
|
767 |
case ECustomNotifyDtmfEventIPC:
|
|
768 |
numberOfSlots = KMmCustomNotifyDtmfEventSlots;
|
|
769 |
break;
|
|
770 |
case ECustomNotifyRauEventIPC:
|
|
771 |
case ECustomNotifyAlsBlockedChangedIPC:
|
|
772 |
case ECustomNotifyCipheringInfoChangeIPC:
|
|
773 |
case ECustomNotifyNSPSStatusIPC:
|
|
774 |
case ECustomSsAdditionalInfoNotificationIPC:
|
|
775 |
case ECustomNotifySsRequestCompleteIPC:
|
|
776 |
case ECustomNotifyPndCacheReadyIPC:
|
|
777 |
case ECustomNotifySsNetworkEventIPC:
|
|
778 |
case ECustomSatRefreshCompleteNotificationIPC:
|
|
779 |
case ECustomNotifyNetworkConnectionFailureIPC:
|
|
780 |
case ECustomNotifyHSxPAStatusIPC:
|
|
781 |
case ECustomNotifyIccCallForwardingStatusChangeIPC:
|
|
782 |
case ECustomNotifyCellInfoChangeIPC:
|
|
783 |
case ECustomNotifyRemoteAlertingToneStatusChangeIPC:
|
|
784 |
break;
|
|
785 |
|
|
786 |
default:
|
|
787 |
numberOfSlots = CMmTsyBase:: NumberOfSlotsL( aIpc );
|
|
788 |
break;
|
|
789 |
}
|
|
790 |
|
|
791 |
return numberOfSlots;
|
|
792 |
}
|
|
793 |
|
|
794 |
// ---------------------------------------------------------------------------
|
|
795 |
// CMmCustomTsy::GetRequiredPlatSecCaps
|
|
796 |
// ETel server calls this method to find out capabilities of custom IPCs.
|
|
797 |
// (other items were commented in a header).
|
|
798 |
// ---------------------------------------------------------------------------
|
|
799 |
//
|
|
800 |
TSecurityPolicy CMmCustomTsy::GetRequiredPlatSecCaps(
|
|
801 |
const TInt aIpc )
|
|
802 |
{
|
|
803 |
TFLOGSTRING2( "TSY: CMmCustomTsy::GetRequiredPlatSecCaps ipc=%d", aIpc );
|
|
804 |
// assume fail as default return value
|
|
805 |
TSecurityPolicy policy( TSecurityPolicy::EAlwaysFail );
|
|
806 |
|
|
807 |
// deal with cancellations
|
|
808 |
TInt ipc ( aIpc );
|
|
809 |
if (ipc >= KIpcCustomExt + EMobileCancelOffset)
|
|
810 |
{
|
|
811 |
ipc -= EMobileCancelOffset;
|
|
812 |
TFLOGSTRING2("TSY: CMmCustomTsy::GetRequiredPlatSecCaps cancel for ipc=%d", ipc);
|
|
813 |
}
|
|
814 |
|
|
815 |
switch ( ipc )
|
|
816 |
{
|
|
817 |
case ECustomNotifyRauEventIPC:
|
|
818 |
case ECustomSatRefreshCompleteNotificationIPC: // To be removed
|
|
819 |
case ECustomNotifyPndCacheReadyIPC:
|
|
820 |
case ECustomGetPndCacheStatusIPC:
|
|
821 |
case EGet3GPBInfoIPC:
|
|
822 |
case ECustomNotifyDtmfEventIPC:
|
|
823 |
case ECustomGetRemoteAlertingToneStatusIPC:
|
|
824 |
case ECustomCallOriginIPC:
|
|
825 |
case ECustomGetAlsBlockedIPC:
|
|
826 |
case ECustomNotifyAlsBlockedChangedIPC:
|
|
827 |
case ECustomCheckAlsPpSupportIPC:
|
|
828 |
case ECustomCheckEmergencyNumberIPC:
|
|
829 |
case ECustomGetCipheringInfoIPC:
|
|
830 |
case ECustomNotifyCipheringInfoChangeIPC:
|
|
831 |
case ECustomNotifyNSPSStatusIPC:
|
|
832 |
case ECustomNotifyProgrammableOperatorLogoChangeIPC:
|
|
833 |
case ECustomNotifyNetworkConnectionFailureIPC:
|
|
834 |
case ECustomNotifySsRequestCompleteIPC:
|
|
835 |
case ECustomGetActivePinIPC:
|
|
836 |
case ECustomGetSystemNetworkModesIPC:
|
|
837 |
case ECustomGetCurrentSystemNetworkModesIPC:
|
|
838 |
case ECustomGetATRIPC:
|
|
839 |
case ECustomNotifySimCardStatusIPC:
|
|
840 |
case ECustomGetSimCardReaderStatusIPC:
|
|
841 |
case ECustomNotifyHSxPAStatusIPC:
|
|
842 |
case ECustomNotifyIccCallForwardingStatusChangeIPC:
|
|
843 |
case ECustomNotifyCellInfoChangeIPC:
|
|
844 |
case ECustomGetBandSelectionIPC:
|
|
845 |
case ECustomNotifyRemoteAlertingToneStatusChangeIPC:
|
|
846 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=None");
|
|
847 |
policy = TSecurityPolicy( TSecurityPolicy::EAlwaysPass );
|
|
848 |
break;
|
|
849 |
|
|
850 |
// NetworkControl
|
|
851 |
case ECustomResetNetServerIPC:
|
|
852 |
case ECustomSetSystemNetworkModeIPC:
|
|
853 |
case ECustomSimWarmResetIPC:
|
|
854 |
case ECustomSetBandSelectionIPC:
|
|
855 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=NetworkControl");
|
|
856 |
policy = TSecurityPolicy( ECapabilityNetworkControl );
|
|
857 |
break;
|
|
858 |
|
|
859 |
// NetworkControl, PowerMgmt
|
|
860 |
case ECustomPowerSimOnIPC:
|
|
861 |
case ECustomPowerSimOffIPC:
|
|
862 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=NetworkControl, PowerMgmt");
|
|
863 |
policy = TSecurityPolicy( ECapabilityNetworkControl,
|
|
864 |
ECapabilityPowerMgmt );
|
|
865 |
break;
|
|
866 |
|
|
867 |
// NetworkControl, ReadDeviceData
|
|
868 |
case ECustomReleaseFileIPC:
|
|
869 |
case ECustomRestartFileIPC:
|
|
870 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=NetworkControl, ReadDeviceData");
|
|
871 |
policy = TSecurityPolicy( ECapabilityNetworkControl,
|
|
872 |
ECapabilityReadDeviceData );
|
|
873 |
break;
|
|
874 |
|
|
875 |
// NetworkServices
|
|
876 |
case ECustomTerminateCallIPC:
|
|
877 |
case ECustomCancelUssdSessionIPC:
|
|
878 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=NetworkServices");
|
|
879 |
policy = TSecurityPolicy( ECapabilityNetworkServices );
|
|
880 |
break;
|
|
881 |
|
|
882 |
// NetworkServices, WriteDeviceData
|
|
883 |
case ECustomSetDriveModeIPC:
|
|
884 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=NetworkServices, WriteDeviceData");
|
|
885 |
policy = TSecurityPolicy( ECapabilityNetworkServices,
|
|
886 |
ECapabilityWriteDeviceData );
|
|
887 |
break;
|
|
888 |
|
|
889 |
// ReadDeviceData
|
|
890 |
case EReadViagHomeZoneParamsIPC:
|
|
891 |
case ECustomGetNetworkProviderNameIPC:
|
|
892 |
case ECustomGetDiagnosticOctetsIPC:
|
|
893 |
case ECustomGetLifeTimeIPC:
|
|
894 |
case ECustomGetOperatorNameIPC:
|
|
895 |
case ECustomGetProgrammableOperatorLogoIPC:
|
|
896 |
case ECustomSsAdditionalInfoNotificationIPC:
|
|
897 |
case ECustomIsBlockedIPC:
|
|
898 |
case ECustomCheckTwoDigitDialSupportIPC:
|
|
899 |
case ECustomNotifyEGprsInfoChange:
|
|
900 |
case ECustomGetEGprsInfo:
|
|
901 |
case EMobilePhoneIMSAuthenticate:
|
|
902 |
case ECustomReadHSxPAStatusIPC:
|
|
903 |
case ECustomGetIccCallForwardingStatusIPC:
|
|
904 |
case ECustomGetCellInfoIPC:
|
|
905 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData");
|
|
906 |
policy = TSecurityPolicy( ECapabilityReadDeviceData );
|
|
907 |
break;
|
|
908 |
|
|
909 |
// ReadDeviceData, Location
|
|
910 |
case EReadViagHomeZoneCacheIPC:
|
|
911 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData, Location");
|
|
912 |
policy = TSecurityPolicy( ECapabilityReadDeviceData,
|
|
913 |
ECapabilityLocation );
|
|
914 |
break;
|
|
915 |
|
|
916 |
// ReadDeviceData, ReadUserData
|
|
917 |
case ECustomNotifySsNetworkEventIPC:
|
|
918 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy= ReadDeviceData, ReadUserData");
|
|
919 |
policy = TSecurityPolicy( ECapabilityReadDeviceData,
|
|
920 |
ECapabilityReadUserData );
|
|
921 |
break;
|
|
922 |
|
|
923 |
// ReadDeviceData, ReadUserData, Location
|
|
924 |
case ECustomReadSimFileIPC:
|
|
925 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData, ReadUserData, Location");
|
|
926 |
policy = TSecurityPolicy( ECapabilityReadDeviceData,
|
|
927 |
ECapabilityReadUserData,
|
|
928 |
ECapabilityLocation );
|
|
929 |
break;
|
|
930 |
|
|
931 |
// ReadDeviceData, ReadUserData, WriteUserData, NetworkControl
|
|
932 |
case ECustomGetSimAuthenticationDataIPC:
|
|
933 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData, ReadUserData, WriteUserData, NetworkControl");
|
|
934 |
policy = TSecurityPolicy( ECapabilityReadDeviceData,
|
|
935 |
ECapabilityReadUserData,
|
|
936 |
ECapabilityWriteUserData,
|
|
937 |
ECapabilityNetworkControl );
|
|
938 |
break;
|
|
939 |
|
|
940 |
case ECustomGetServiceTableSupportbyApplicationIPC:
|
|
941 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData");
|
|
942 |
policy = TSecurityPolicy( ECapabilityReadDeviceData );
|
|
943 |
break;
|
|
944 |
// ReadDeviceData, WriteDeviceData, ReadUserData, WriteUserData,
|
|
945 |
// Location, NetworkServices, NetworkControl
|
|
946 |
case ECustomSendAPDUReqIPC:
|
|
947 |
case ECustomSendAPDUReqV2IPC:
|
|
948 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData, WriteDeviceData, ReadUserData, WriteUserData, Location, NetworkServices, NetworkControl");
|
|
949 |
policy = TSecurityPolicy( ECapabilityReadDeviceData,
|
|
950 |
ECapabilityWriteDeviceData,
|
|
951 |
ECapabilityReadUserData,
|
|
952 |
ECapabilityWriteUserData,
|
|
953 |
ECapabilityLocation,
|
|
954 |
ECapabilityNetworkServices,
|
|
955 |
ECapabilityNetworkControl );
|
|
956 |
break;
|
|
957 |
|
|
958 |
// ReadUserData
|
|
959 |
case ECustomStartSimCbTopicBrowsingIPC:
|
|
960 |
case ECustomGetNextSimCbTopicIPC:
|
|
961 |
case ECustomGetAirTimeDurationIPC:
|
|
962 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadUserData");
|
|
963 |
policy = TSecurityPolicy( ECapabilityReadUserData );
|
|
964 |
break;
|
|
965 |
|
|
966 |
// WriteDeviceData
|
|
967 |
case ECustomSetAlwaysOnMode:
|
|
968 |
case ECustomSimLockActivateIPC:
|
|
969 |
case ECustomSimLockDeActivateIPC:
|
|
970 |
case ECustomSetAlsBlockedIPC:
|
|
971 |
case ECustomClearCallBlackListIPC:
|
|
972 |
case ECustomNetWakeupIPC:
|
|
973 |
case ECustomCheckSecurityCodeIPC:
|
|
974 |
case ECustomDisablePhoneLockIPC:
|
|
975 |
case ECustomSetSimMessageStatusReadIPC:
|
|
976 |
case ECustomWriteHSxPAStatusIPC:
|
|
977 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=WriteDeviceData");
|
|
978 |
policy = TSecurityPolicy( ECapabilityWriteDeviceData );
|
|
979 |
break;
|
|
980 |
|
|
981 |
// WriteDeviceData, Location
|
|
982 |
case EWriteViagHomeZoneCacheIPC:
|
|
983 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=WriteDeviceData, Location");
|
|
984 |
policy = TSecurityPolicy( ECapabilityWriteDeviceData,
|
|
985 |
ECapabilityLocation );
|
|
986 |
break;
|
|
987 |
|
|
988 |
// WriteUserData
|
|
989 |
case ECustomDeleteSimCbTopicIPC:
|
|
990 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=WriteUserData");
|
|
991 |
policy = TSecurityPolicy( ECapabilityWriteUserData );
|
|
992 |
break;
|
|
993 |
|
|
994 |
// WriteDeviceData
|
|
995 |
case EWriteViagHomeZoneUHZIUESettingsIPC:
|
|
996 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=WriteDeviceData");
|
|
997 |
policy = TSecurityPolicy( ECapabilityWriteDeviceData );
|
|
998 |
break;
|
|
999 |
default:
|
|
1000 |
// if none of the above then we end up here,
|
|
1001 |
// as a default we already have caps as alwaysfail.
|
|
1002 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=AlwaysFail");
|
|
1003 |
break;
|
|
1004 |
}
|
|
1005 |
|
|
1006 |
return policy;
|
|
1007 |
}
|
|
1008 |
|
|
1009 |
// ---------------------------------------------------------------------------
|
|
1010 |
// CMmCustomTsy::CancelService
|
|
1011 |
// When the clients close their sub-sessions (eg. by calling RPhone::Close),
|
|
1012 |
// they may not have cancelled all their outstanding asynchronous requests
|
|
1013 |
// before closing. It is up to the ETel server to clean up in this situation,
|
|
1014 |
// so the server will find the list of outstanding requests related to that
|
|
1015 |
// sub-session object and pass these outstanding IPC request numbers, one at
|
|
1016 |
// a time, to the CancelService function in the TSY.
|
|
1017 |
// (other items were commented in a header).
|
|
1018 |
// ---------------------------------------------------------------------------
|
|
1019 |
//
|
|
1020 |
TInt CMmCustomTsy::CancelService(
|
|
1021 |
const TInt aIpc,
|
|
1022 |
const TTsyReqHandle aTsyReqHandle )
|
|
1023 |
{
|
|
1024 |
TInt ret ( KErrGeneral );
|
|
1025 |
|
|
1026 |
// When the clients close their sub-sessions (eg. by calling
|
|
1027 |
// RPhone::Close), they may not have cancelled all their outstanding
|
|
1028 |
// asynchronous requests before closing. It is up to the ETel server to
|
|
1029 |
// clean up in this situation, so the server will find the list of
|
|
1030 |
// outstanding requests related to that sub-session object and pass these
|
|
1031 |
// outstanding IPC request numbers, one at a time, to the CancelService
|
|
1032 |
// function in the TSY.
|
|
1033 |
|
|
1034 |
switch ( aIpc )
|
|
1035 |
{
|
|
1036 |
case ECustomTerminateCallIPC:
|
|
1037 |
case ECustomSetAlsBlockedIPC:
|
|
1038 |
case ECustomNetWakeupIPC:
|
|
1039 |
case ECustomClearCallBlackListIPC:
|
|
1040 |
case ECustomResetNetServerIPC:
|
|
1041 |
case ECustomGetPndCacheStatusIPC:
|
|
1042 |
case ECustomSetDriveModeIPC:
|
|
1043 |
case ECustomSetBandSelectionIPC:
|
|
1044 |
case ECustomSetSystemNetworkModeIPC:
|
|
1045 |
// TSY has started a request and it is not possible to then
|
|
1046 |
// cancel it. The best thing for the TSY to do in
|
|
1047 |
// this case is to proceed as though the Cancel never happened.
|
|
1048 |
// The server's call to the TSY cancel function will return
|
|
1049 |
// synchronously. The TSY then continues to wait for the methods
|
|
1050 |
// acknowledgement and when it receives it, the TSY will complete
|
|
1051 |
// the original request.
|
|
1052 |
ret = KErrNone;
|
|
1053 |
break;
|
|
1054 |
case ECustomNotifyRauEventIPC:
|
|
1055 |
ret = NotifyRauEventCancel();
|
|
1056 |
break;
|
|
1057 |
case ECustomNotifyDtmfEventIPC:
|
|
1058 |
ret = NotifyDtmfEventCancel( aTsyReqHandle );
|
|
1059 |
break;
|
|
1060 |
case ECustomGetAlsBlockedIPC:
|
|
1061 |
ret = GetAlsBlockedCancel ();
|
|
1062 |
break;
|
|
1063 |
case ECustomGetCipheringInfoIPC:
|
|
1064 |
ret = GetCipheringInfoCancel();
|
|
1065 |
break;
|
|
1066 |
case ECustomNotifyCipheringInfoChangeIPC:
|
|
1067 |
ret = NotifyCipheringInfoChangeCancel( aTsyReqHandle );
|
|
1068 |
break;
|
|
1069 |
case ECustomNotifyNSPSStatusIPC:
|
|
1070 |
ret = NotifyNSPSStatusCancel( aTsyReqHandle );
|
|
1071 |
break;
|
|
1072 |
case ECustomNotifyAlsBlockedChangedIPC:
|
|
1073 |
ret = NotifyAlsBlockedChangedCancel( aTsyReqHandle );
|
|
1074 |
break;
|
|
1075 |
case ECustomCheckAlsPpSupportIPC:
|
|
1076 |
ret = GetAlsPpSupportCancel();
|
|
1077 |
break;
|
|
1078 |
case ECustomSsAdditionalInfoNotificationIPC:
|
|
1079 |
ret = SsAdditionalInfoNotificationCancel( aTsyReqHandle );
|
|
1080 |
break;
|
|
1081 |
case ECustomNotifySsRequestCompleteIPC:
|
|
1082 |
ret = SsRequestCompleteNotificationCancel( aTsyReqHandle );
|
|
1083 |
break;
|
|
1084 |
case ECustomNotifyPndCacheReadyIPC:
|
|
1085 |
ret = NotifyPhoneBookCacheReadyCancel( aTsyReqHandle );
|
|
1086 |
break;
|
|
1087 |
case ECustomCheckEmergencyNumberIPC:
|
|
1088 |
ret = CheckEmergencyNumberCancel();
|
|
1089 |
break;
|
|
1090 |
case ECustomGetNetworkProviderNameIPC:
|
|
1091 |
ret = GetNetworkOperatorNameCancel();
|
|
1092 |
break;
|
|
1093 |
case ECustomCheckTwoDigitDialSupportIPC:
|
|
1094 |
ret = CheckTwoDigitDialSupportCancel();
|
|
1095 |
break;
|
|
1096 |
case ECustomGetOperatorNameIPC:
|
|
1097 |
ret = GetOperatorNameCancel();
|
|
1098 |
break;
|
|
1099 |
case ECustomNotifySsNetworkEventIPC:
|
|
1100 |
ret = NotifySsNetworkEventCancel();
|
|
1101 |
break;
|
|
1102 |
case ECustomGetProgrammableOperatorLogoIPC:
|
|
1103 |
ret = GetProgrammableOperatorLogoCancel();
|
|
1104 |
break;
|
|
1105 |
case ECustomSatRefreshCompleteNotificationIPC:
|
|
1106 |
ret = SatRefreshCompleteNotificationCancel( aTsyReqHandle );
|
|
1107 |
break;
|
|
1108 |
case ECustomGetCurrentSystemNetworkModesIPC:
|
|
1109 |
ret = GetCurrentSystemNetworkModeCancel( aTsyReqHandle );
|
|
1110 |
break;
|
|
1111 |
case ECustomNotifyNetworkConnectionFailureIPC:
|
|
1112 |
ret = NotifyNetworkConnectionFailureCancel();
|
|
1113 |
break;
|
|
1114 |
case ECustomReadSimFileIPC:
|
|
1115 |
ret = GetSimFileInfoCancel( aTsyReqHandle );
|
|
1116 |
break;
|
|
1117 |
case ECustomGetLifeTimeIPC:
|
|
1118 |
ret = GetLifeTimeCancel();
|
|
1119 |
break;
|
|
1120 |
case EGet3GPBInfoIPC:
|
|
1121 |
ret = Get3GPBInfoCancel ();
|
|
1122 |
break;
|
|
1123 |
case ECustomGetSystemNetworkModesIPC:
|
|
1124 |
ret = GetSystemNetworkModesCancel( aTsyReqHandle );
|
|
1125 |
break;
|
|
1126 |
case EMobilePhoneIMSAuthenticate:
|
|
1127 |
ret = ImsAuthenticationCancel();
|
|
1128 |
break;
|
|
1129 |
case ECustomGetSimAuthenticationDataIPC:
|
|
1130 |
ret = SimAuthenticationCancel();
|
|
1131 |
break;
|
|
1132 |
case ECustomReadHSxPAStatusIPC:
|
|
1133 |
ret = ReadHSxPAStatusCancel();
|
|
1134 |
break;
|
|
1135 |
case ECustomWriteHSxPAStatusIPC:
|
|
1136 |
ret = WriteHSxPAStatusCancel();
|
|
1137 |
break;
|
|
1138 |
case ECustomNotifyHSxPAStatusIPC:
|
|
1139 |
ret = NotifyHSxPAStatusCancel();
|
|
1140 |
break;
|
|
1141 |
case ECustomNotifyIccCallForwardingStatusChangeIPC:
|
|
1142 |
ret = NotifyIccCallForwardingStatusChangeCancel( aTsyReqHandle );
|
|
1143 |
break;
|
|
1144 |
case ECustomGetIccCallForwardingStatusIPC:
|
|
1145 |
ret = GetIccCallForwardingStatusCancel();
|
|
1146 |
break;
|
|
1147 |
case ECustomNotifyCellInfoChangeIPC:
|
|
1148 |
ret = NotifyCellInfoChangeCancel();
|
|
1149 |
break;
|
|
1150 |
case ECustomGetCellInfoIPC:
|
|
1151 |
ret = GetCellInfoCancel();
|
|
1152 |
break;
|
|
1153 |
case ECustomGetBandSelectionIPC:
|
|
1154 |
ret = GetSystemNetworkBandCancel( aTsyReqHandle );
|
|
1155 |
break;
|
|
1156 |
case ECustomGetServiceTableSupportbyApplicationIPC:
|
|
1157 |
ret = GetUSIMServiceSupportCancel();
|
|
1158 |
break;
|
|
1159 |
case ECustomNotifyRemoteAlertingToneStatusChangeIPC:
|
|
1160 |
ret = NotifyRemoteAlertingToneStatusChangeCancel();
|
|
1161 |
break;
|
|
1162 |
case ECustomTsyGetIccCallForwardingStatus:
|
|
1163 |
ret = GetIccCallForwardingStatusCancel( aTsyReqHandle );
|
|
1164 |
break;
|
|
1165 |
default:
|
|
1166 |
if ( iMmSecurityTsy->SupportingIPC( aIpc ) )
|
|
1167 |
{
|
|
1168 |
ret = iMmSecurityTsy->CancelService ( aIpc,
|
|
1169 |
aTsyReqHandle );
|
|
1170 |
}
|
|
1171 |
else
|
|
1172 |
{
|
|
1173 |
ret = CMmTsyBase::CancelService ( aIpc, aTsyReqHandle );
|
|
1174 |
}
|
|
1175 |
break;
|
|
1176 |
}
|
|
1177 |
|
|
1178 |
return ret;
|
|
1179 |
}
|
|
1180 |
|
|
1181 |
// ---------------------------------------------------------------------------
|
|
1182 |
// CMmCustomTsy::IMSAuthenticationL
|
|
1183 |
// Requests authentication data generatation from input parameters
|
|
1184 |
// (other items were commented in a header).
|
|
1185 |
// ---------------------------------------------------------------------------
|
|
1186 |
//
|
|
1187 |
TInt CMmCustomTsy::ImsAuthenticationL(
|
|
1188 |
const TTsyReqHandle aTsyReqHandle,
|
|
1189 |
RMobilePhone::TImsAuthenticateDataV5* aAuthenticationData )
|
|
1190 |
{
|
|
1191 |
// Save pointer to client space
|
|
1192 |
iIMSAuthenticationData = aAuthenticationData;
|
|
1193 |
|
|
1194 |
CMmDataPackage authenticationDataPackage;
|
|
1195 |
authenticationDataPackage.PackData( iIMSAuthenticationData );
|
|
1196 |
|
|
1197 |
TInt ret = ( iMmPhoneTsy->MessageManager()->HandleRequestL(
|
|
1198 |
EMobilePhoneIMSAuthenticate, &authenticationDataPackage ) );
|
|
1199 |
|
|
1200 |
// Check response of the extension
|
|
1201 |
if ( KErrNone != ret )
|
|
1202 |
{
|
|
1203 |
ReqCompleted( aTsyReqHandle, ret );
|
|
1204 |
}
|
|
1205 |
else
|
|
1206 |
{
|
|
1207 |
// Save the req handle type
|
|
1208 |
iReqHandleType = ECustomTsyIMSAuthenticate;
|
|
1209 |
}
|
|
1210 |
|
|
1211 |
return KErrNone;
|
|
1212 |
}
|
|
1213 |
|
|
1214 |
// ---------------------------------------------------------------------------
|
|
1215 |
// CMmCustomTsy::CompleteImsAuthentication
|
|
1216 |
// Requests authentication data generatation from input parameters
|
|
1217 |
// (other items were commented in a header).
|
|
1218 |
// ---------------------------------------------------------------------------
|
|
1219 |
//
|
|
1220 |
void CMmCustomTsy::CompleteImsAuthentication(
|
|
1221 |
CMmDataPackage* aDataPackage,
|
|
1222 |
TInt aResult )
|
|
1223 |
{
|
|
1224 |
// reset req handle. Returns the deleted req handle
|
|
1225 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1226 |
ECustomTsyIMSAuthenticate );
|
|
1227 |
|
|
1228 |
if ( KErrNone == aResult )
|
|
1229 |
{
|
|
1230 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
1231 |
{
|
|
1232 |
RMobilePhone::TImsAuthenticateDataV5* authenticationData;
|
|
1233 |
aDataPackage->UnPackData( &authenticationData );
|
|
1234 |
|
|
1235 |
// Copy data to client
|
|
1236 |
iIMSAuthenticationData->iRES.Copy( authenticationData->iRES );
|
|
1237 |
iIMSAuthenticationData->iCK.Copy( authenticationData->iCK );
|
|
1238 |
iIMSAuthenticationData->iIK.Copy( authenticationData->iIK );
|
|
1239 |
|
|
1240 |
iIMSAuthenticationData = NULL;
|
|
1241 |
|
|
1242 |
ReqCompleted( reqHandle, aResult );
|
|
1243 |
}
|
|
1244 |
}
|
|
1245 |
else if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
1246 |
{
|
|
1247 |
if ( KErrTimedOut == aResult )
|
|
1248 |
{
|
|
1249 |
iIMSAuthenticationData = NULL;
|
|
1250 |
}
|
|
1251 |
else
|
|
1252 |
{
|
|
1253 |
RMobilePhone::TImsAuthenticateDataV5* authenticationData;
|
|
1254 |
aDataPackage->UnPackData( &authenticationData );
|
|
1255 |
|
|
1256 |
// It is possible that request is completed whithout any data
|
|
1257 |
// inside datapackage
|
|
1258 |
if ( NULL != authenticationData )
|
|
1259 |
{
|
|
1260 |
iIMSAuthenticationData->iAUTS.Copy(
|
|
1261 |
authenticationData->iAUTS );
|
|
1262 |
|
|
1263 |
iIMSAuthenticationData = NULL;
|
|
1264 |
}
|
|
1265 |
}
|
|
1266 |
|
|
1267 |
ReqCompleted( reqHandle, aResult );
|
|
1268 |
}
|
|
1269 |
}
|
|
1270 |
|
|
1271 |
// ---------------------------------------------------------------------------
|
|
1272 |
// CMmCustomTsy::ImsAuthenticationCancel
|
|
1273 |
// Cancels sim authentication request
|
|
1274 |
// (other items were commented in a header).
|
|
1275 |
// ---------------------------------------------------------------------------
|
|
1276 |
//
|
|
1277 |
TInt CMmCustomTsy::ImsAuthenticationCancel()
|
|
1278 |
{
|
|
1279 |
// reset the reqhandle
|
|
1280 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1281 |
ECustomTsyIMSAuthenticate );
|
|
1282 |
|
|
1283 |
// reset pointer to client data
|
|
1284 |
iIMSAuthenticationData = NULL;
|
|
1285 |
|
|
1286 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
1287 |
{
|
|
1288 |
// complete
|
|
1289 |
ReqCompleted( reqHandle, KErrCancel );
|
|
1290 |
}
|
|
1291 |
|
|
1292 |
return KErrNone;
|
|
1293 |
}
|
|
1294 |
|
|
1295 |
// ---------------------------------------------------------------------------
|
|
1296 |
// CMmCustomTsy::SimAuthenticationL
|
|
1297 |
// Gets authentication parameters from sim
|
|
1298 |
// (other items were commented in a header).
|
|
1299 |
// ---------------------------------------------------------------------------
|
|
1300 |
//
|
|
1301 |
TInt CMmCustomTsy::SimAuthenticationL(
|
|
1302 |
const TTsyReqHandle aTsyReqHandle,
|
|
1303 |
const TDataPackage& aAuthData )
|
|
1304 |
{
|
|
1305 |
TInt ret ( KErrNone );
|
|
1306 |
TInt rfStateInfo ( ERfsStateInfoNormal );
|
|
1307 |
|
|
1308 |
TFLOGSTRING( "CMmCustomTSY: CMmCustomTsy::SimAuthentication" );
|
|
1309 |
|
|
1310 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(ECustomTsyGetSimAuthenticationData);
|
|
1311 |
if(0 < reqHandle)
|
|
1312 |
{
|
|
1313 |
return KErrServerBusy;
|
|
1314 |
}
|
|
1315 |
|
|
1316 |
|
|
1317 |
|
|
1318 |
RMmCustomAPI::TSimAuthenticationBase* basePtr =
|
|
1319 |
REINTERPRET_CAST( RMmCustomAPI::TSimAuthenticationBase*,
|
|
1320 |
aAuthData.Ptr1() );
|
|
1321 |
|
|
1322 |
CMmDataPackage authenticationDataPackage;
|
|
1323 |
|
|
1324 |
rfStateInfo = iMmPhoneTsy->GetRfStatus();
|
|
1325 |
|
|
1326 |
// Declare a RAND sized buffer
|
|
1327 |
TBuf8<16> rand;
|
|
1328 |
|
|
1329 |
if ( RMmCustomAPI::TSimAuthenticationBase::EEapSim ==
|
|
1330 |
basePtr->ExtensionId() )
|
|
1331 |
{
|
|
1332 |
iEapSim = REINTERPRET_CAST( RMmCustomAPI::TSimAuthenticationEapSim*,
|
|
1333 |
basePtr );
|
|
1334 |
|
|
1335 |
rand.Append( iEapSim->iRandomParameters );
|
|
1336 |
|
|
1337 |
authenticationDataPackage.PackData( iEapSim, &rfStateInfo );
|
|
1338 |
}
|
|
1339 |
else if ( RMmCustomAPI::TSimAuthenticationBase::EEapAka ==
|
|
1340 |
basePtr->ExtensionId() )
|
|
1341 |
{
|
|
1342 |
iEapAka = REINTERPRET_CAST( RMmCustomAPI::TSimAuthenticationEapAka*,
|
|
1343 |
basePtr );
|
|
1344 |
|
|
1345 |
rand.Append( iEapAka->iRandomParameters );
|
|
1346 |
|
|
1347 |
authenticationDataPackage.PackData( iEapAka, &rfStateInfo );
|
|
1348 |
}
|
|
1349 |
else if ( RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrap ==
|
|
1350 |
basePtr->ExtensionId() )
|
|
1351 |
{
|
|
1352 |
TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::in EGbaBootstrap" );
|
|
1353 |
iGbaBootstrap = REINTERPRET_CAST(
|
|
1354 |
RMmCustomAPI::TSimAuthenticationGbaBootstrap*, basePtr );
|
|
1355 |
|
|
1356 |
rand.Append( iGbaBootstrap->iRandomParameters );
|
|
1357 |
|
|
1358 |
authenticationDataPackage.PackData( iGbaBootstrap, &rfStateInfo );
|
|
1359 |
TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::out EGbaBootstrap" );
|
|
1360 |
}
|
|
1361 |
else if ( RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrapUpdate ==
|
|
1362 |
basePtr->ExtensionId() )
|
|
1363 |
{
|
|
1364 |
TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::in EGbaBootstrapUpdate" );
|
|
1365 |
iGbaBootstrapUpdate = REINTERPRET_CAST(
|
|
1366 |
RMmCustomAPI::TSimAuthenticationGbaBootstrapUpdate*, basePtr );
|
|
1367 |
|
|
1368 |
authenticationDataPackage.PackData( iGbaBootstrapUpdate, &rfStateInfo );
|
|
1369 |
TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::out EGbaBootstrapUpdate" );
|
|
1370 |
}
|
|
1371 |
else if (
|
|
1372 |
RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrapNafDerivation ==
|
|
1373 |
basePtr->ExtensionId() )
|
|
1374 |
{
|
|
1375 |
TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::in EGbaBootstrapNafDerivation" );
|
|
1376 |
iGbaNafDerivation = REINTERPRET_CAST(
|
|
1377 |
RMmCustomAPI::TSimAuthenticationGbaNafDerivation*, basePtr );
|
|
1378 |
|
|
1379 |
authenticationDataPackage.PackData( iGbaNafDerivation, &rfStateInfo );
|
|
1380 |
TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::out EGbaBootstrapNafDerivation" );
|
|
1381 |
}
|
|
1382 |
else if ( RMmCustomAPI::TSimAuthenticationBase::EMgvMskUpdate ==
|
|
1383 |
basePtr->ExtensionId() )
|
|
1384 |
{
|
|
1385 |
TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::in EMgvMskUpdate" );
|
|
1386 |
iMgvMskUpdate = REINTERPRET_CAST(
|
|
1387 |
RMmCustomAPI::TSimAuthenticationMgvMskUpdate*, basePtr );
|
|
1388 |
|
|
1389 |
authenticationDataPackage.PackData( iMgvMskUpdate, &rfStateInfo );
|
|
1390 |
TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::out EMgvMskUpdate" );
|
|
1391 |
}
|
|
1392 |
else if ( RMmCustomAPI::TSimAuthenticationBase::EMgvMtkGeneration ==
|
|
1393 |
basePtr->ExtensionId() )
|
|
1394 |
{
|
|
1395 |
TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::in EMgvMtkGeneration" );
|
|
1396 |
iMgvMtkGeneration = REINTERPRET_CAST(
|
|
1397 |
RMmCustomAPI::TSimAuthenticationMgvMtkGeneration*, basePtr );
|
|
1398 |
|
|
1399 |
authenticationDataPackage.PackData( iMgvMtkGeneration, &rfStateInfo );
|
|
1400 |
TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::out EMgvMtkGeneration" );
|
|
1401 |
}
|
|
1402 |
else if ( RMmCustomAPI::TSimAuthenticationBase::EMgvMskDeletion ==
|
|
1403 |
basePtr->ExtensionId() )
|
|
1404 |
{
|
|
1405 |
TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::in EMgvMskDeletion" );
|
|
1406 |
iMgvMskDeletion = REINTERPRET_CAST(
|
|
1407 |
RMmCustomAPI::TSimAuthenticationMgvMskDeletion*, basePtr );
|
|
1408 |
|
|
1409 |
authenticationDataPackage.PackData( iMgvMskDeletion, &rfStateInfo );
|
|
1410 |
TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::out EMgvMskDeletion" );
|
|
1411 |
}
|
|
1412 |
else
|
|
1413 |
{
|
|
1414 |
TFLOGSTRING2( "CMmCustomTSY: Invalid authentication type specified: %d", basePtr->ExtensionId() );
|
|
1415 |
ret = KErrNotSupported;
|
|
1416 |
|
|
1417 |
iEapSim = NULL;
|
|
1418 |
iEapAka = NULL;
|
|
1419 |
iGbaBootstrap = NULL;
|
|
1420 |
iGbaBootstrapUpdate = NULL;
|
|
1421 |
iGbaNafDerivation = NULL;
|
|
1422 |
iMgvMskUpdate = NULL;
|
|
1423 |
iMgvMtkGeneration = NULL;
|
|
1424 |
iMgvMskDeletion = NULL;
|
|
1425 |
|
|
1426 |
//ReqCompleted( aTsyReqHandle, ret );
|
|
1427 |
}
|
|
1428 |
|
|
1429 |
// Check if Rand received from network is valid
|
|
1430 |
// when if basePtr has ExtensionId of EEapSim or EEapAka
|
|
1431 |
if ( RMmCustomAPI::TSimAuthenticationBase::EEapSim ==
|
|
1432 |
basePtr->ExtensionId() || RMmCustomAPI::TSimAuthenticationBase::
|
|
1433 |
EEapAka == basePtr->ExtensionId())/* || RMmCustomAPI::
|
|
1434 |
TSimAuthenticationBase::EGbaBootstrap == basePtr->ExtensionId())*/
|
|
1435 |
{
|
|
1436 |
ret = CheckRandValidityL( rand );
|
|
1437 |
}
|
|
1438 |
|
|
1439 |
if ( KErrNone == ret )
|
|
1440 |
{
|
|
1441 |
ret = ( iMmPhoneTsy->MessageManager()->HandleRequestL(
|
|
1442 |
ECustomGetSimAuthenticationDataIPC, &authenticationDataPackage ) );
|
|
1443 |
|
|
1444 |
// check result
|
|
1445 |
if ( KErrNone == ret )
|
|
1446 |
{
|
|
1447 |
// Save the req handle type
|
|
1448 |
iReqHandleType = ECustomTsyGetSimAuthenticationData;
|
|
1449 |
}
|
|
1450 |
else
|
|
1451 |
{
|
|
1452 |
iEapSim = NULL;
|
|
1453 |
iEapAka = NULL;
|
|
1454 |
iGbaBootstrap = NULL;
|
|
1455 |
iGbaBootstrapUpdate = NULL;
|
|
1456 |
iGbaNafDerivation = NULL;
|
|
1457 |
iMgvMskUpdate = NULL;
|
|
1458 |
iMgvMtkGeneration = NULL;
|
|
1459 |
iMgvMskDeletion = NULL;
|
|
1460 |
|
|
1461 |
ReqCompleted( aTsyReqHandle, ret );
|
|
1462 |
}
|
|
1463 |
}
|
|
1464 |
else
|
|
1465 |
{
|
|
1466 |
iEapSim = NULL;
|
|
1467 |
iEapAka = NULL;
|
|
1468 |
iGbaBootstrap = NULL;
|
|
1469 |
iGbaBootstrapUpdate = NULL;
|
|
1470 |
iGbaNafDerivation = NULL;
|
|
1471 |
iMgvMskUpdate = NULL;
|
|
1472 |
iMgvMtkGeneration = NULL;
|
|
1473 |
iMgvMskDeletion = NULL;
|
|
1474 |
|
|
1475 |
ReqCompleted( aTsyReqHandle, ret );
|
|
1476 |
}
|
|
1477 |
|
|
1478 |
return KErrNone;
|
|
1479 |
}
|
|
1480 |
|
|
1481 |
// ---------------------------------------------------------------------------
|
|
1482 |
// CMmCustomTsy::CompleteSimAuthentication
|
|
1483 |
// Completes sim authenticaiton request
|
|
1484 |
// (other items were commented in a header).
|
|
1485 |
// ---------------------------------------------------------------------------
|
|
1486 |
//
|
|
1487 |
void CMmCustomTsy::CompleteSimAuthentication(
|
|
1488 |
CMmDataPackage* aDataPackage,
|
|
1489 |
TInt aResult )
|
|
1490 |
{
|
|
1491 |
TFLOGSTRING( "TSY: CMmCustomTsy::CompleteSimAuthentication" );
|
|
1492 |
// reset req handle. Returns the deleted req handle
|
|
1493 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1494 |
ECustomTsyGetSimAuthenticationData );
|
|
1495 |
|
|
1496 |
if ( KErrNone == aResult )
|
|
1497 |
{
|
|
1498 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
1499 |
{
|
|
1500 |
RMmCustomAPI::TSimAuthenticationBase* basePtr;
|
|
1501 |
aDataPackage->UnPackData( &basePtr );
|
|
1502 |
|
|
1503 |
// if 2G authentication needs to be completed
|
|
1504 |
if ( RMmCustomAPI::TSimAuthenticationBase::EEapSim ==
|
|
1505 |
basePtr->ExtensionId() )
|
|
1506 |
{
|
|
1507 |
RMmCustomAPI::TSimAuthenticationEapSim* eapSim;
|
|
1508 |
|
|
1509 |
aDataPackage->UnPackData( &eapSim );
|
|
1510 |
|
|
1511 |
// Copy data to client
|
|
1512 |
iEapSim->iSRES.Copy( eapSim->iSRES );
|
|
1513 |
iEapSim->iKC.Copy( eapSim->iKC );
|
|
1514 |
|
|
1515 |
iEapSim = NULL;
|
|
1516 |
|
|
1517 |
ReqCompleted( reqHandle, aResult );
|
|
1518 |
}
|
|
1519 |
// if 3G authentication needs to be completed
|
|
1520 |
else if ( RMmCustomAPI::TSimAuthenticationBase::EEapAka ==
|
|
1521 |
basePtr->ExtensionId() )
|
|
1522 |
{
|
|
1523 |
RMmCustomAPI::TSimAuthenticationEapAka* eapAka;
|
|
1524 |
|
|
1525 |
aDataPackage->UnPackData( &eapAka );
|
|
1526 |
|
|
1527 |
// Copy data to client
|
|
1528 |
iEapAka->iRES.Copy( eapAka->iRES );
|
|
1529 |
iEapAka->iCK.Copy( eapAka->iCK );
|
|
1530 |
iEapAka->iIK.Copy( eapAka->iIK );
|
|
1531 |
|
|
1532 |
iEapAka = NULL;
|
|
1533 |
|
|
1534 |
ReqCompleted( reqHandle, aResult );
|
|
1535 |
}
|
|
1536 |
else if ( RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrap ==
|
|
1537 |
basePtr->ExtensionId() )
|
|
1538 |
{
|
|
1539 |
TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::in EGbaBootstrap" );
|
|
1540 |
RMmCustomAPI::TSimAuthenticationGbaBootstrap* gbaBootstrap;
|
|
1541 |
|
|
1542 |
aDataPackage->UnPackData( &gbaBootstrap );
|
|
1543 |
|
|
1544 |
// Copy data to client
|
|
1545 |
iGbaBootstrap->iRES.Copy( gbaBootstrap->iRES );
|
|
1546 |
iGbaBootstrap->iAUTS.Copy( gbaBootstrap->iAUTS );
|
|
1547 |
|
|
1548 |
iGbaBootstrap = NULL;
|
|
1549 |
|
|
1550 |
ReqCompleted( reqHandle, aResult );
|
|
1551 |
TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::out EGbaBootstrap" );
|
|
1552 |
}
|
|
1553 |
else if (
|
|
1554 |
RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrapUpdate ==
|
|
1555 |
basePtr->ExtensionId() )
|
|
1556 |
{
|
|
1557 |
TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::in EGbaBootstrapUpdate" );
|
|
1558 |
RMmCustomAPI::TSimAuthenticationGbaBootstrapUpdate*
|
|
1559 |
gbaBootstrapUpdate;
|
|
1560 |
|
|
1561 |
aDataPackage->UnPackData( &gbaBootstrapUpdate );
|
|
1562 |
|
|
1563 |
// Copy data to client
|
|
1564 |
iGbaBootstrapUpdate->iRandomParameters.Copy(
|
|
1565 |
gbaBootstrapUpdate->iRandomParameters );
|
|
1566 |
|
|
1567 |
iGbaBootstrapUpdate = NULL;
|
|
1568 |
|
|
1569 |
ReqCompleted( reqHandle, aResult );
|
|
1570 |
TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::out EGbaBootstrapUpdate" );
|
|
1571 |
}
|
|
1572 |
else if (
|
|
1573 |
RMmCustomAPI::TSimAuthenticationBase::
|
|
1574 |
EGbaBootstrapNafDerivation == basePtr->ExtensionId() )
|
|
1575 |
{
|
|
1576 |
TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::in EGbaBootstrapNafDerivation" );
|
|
1577 |
RMmCustomAPI::TSimAuthenticationGbaNafDerivation*
|
|
1578 |
gbaNafDerivation;
|
|
1579 |
|
|
1580 |
aDataPackage->UnPackData( &gbaNafDerivation );
|
|
1581 |
|
|
1582 |
// Copy data to client
|
|
1583 |
iGbaNafDerivation->iKsExtNaf.Copy(
|
|
1584 |
gbaNafDerivation->iKsExtNaf );
|
|
1585 |
|
|
1586 |
iGbaNafDerivation = NULL;
|
|
1587 |
|
|
1588 |
ReqCompleted( reqHandle, aResult );
|
|
1589 |
TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::out EGbaBootstrapNafDerivation" );
|
|
1590 |
}
|
|
1591 |
else if ( RMmCustomAPI::TSimAuthenticationBase::EMgvMskUpdate ==
|
|
1592 |
basePtr->ExtensionId() )
|
|
1593 |
{
|
|
1594 |
TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::in EMgvMskUpdate" );
|
|
1595 |
RMmCustomAPI::TSimAuthenticationMgvMskUpdate* mgvMskUpdate;
|
|
1596 |
|
|
1597 |
aDataPackage->UnPackData( &mgvMskUpdate );
|
|
1598 |
|
|
1599 |
// Copy data to client
|
|
1600 |
iMgvMskUpdate->iMikey.Copy( mgvMskUpdate->iMikey );
|
|
1601 |
// Smartcard support for MobileTV
|
|
1602 |
iMgvMskUpdate->iBCASTManagement.Copy( mgvMskUpdate->iBCASTManagement );
|
|
1603 |
iMgvMskUpdate->iParentalRating.Copy( mgvMskUpdate->iParentalRating );
|
|
1604 |
iMgvMskUpdate->iSecurityPolicyExt.Copy( mgvMskUpdate->iSecurityPolicyExt );
|
|
1605 |
|
|
1606 |
iMgvMskUpdate = NULL;
|
|
1607 |
|
|
1608 |
ReqCompleted( reqHandle, aResult );
|
|
1609 |
TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::out EMgvMskUpdate" );
|
|
1610 |
}
|
|
1611 |
else if ( RMmCustomAPI::TSimAuthenticationBase::
|
|
1612 |
EMgvMtkGeneration == basePtr->ExtensionId() )
|
|
1613 |
{
|
|
1614 |
TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::in EMgvMtkGeneration" );
|
|
1615 |
RMmCustomAPI::TSimAuthenticationMgvMtkGeneration*
|
|
1616 |
mgvMtkGeneration;
|
|
1617 |
|
|
1618 |
aDataPackage->UnPackData( &mgvMtkGeneration );
|
|
1619 |
|
|
1620 |
// Copy data to client
|
|
1621 |
iMgvMtkGeneration->iMtkSalt.Copy( mgvMtkGeneration->iMtkSalt );
|
|
1622 |
// Smartcard support for MobileTV
|
|
1623 |
iMgvMtkGeneration->iBCASTManagement.Copy( mgvMtkGeneration->iBCASTManagement );
|
|
1624 |
iMgvMtkGeneration->iParentalControl.Copy( mgvMtkGeneration->iParentalControl );
|
|
1625 |
iMgvMtkGeneration->iTrafficEncryptionKey.Copy( mgvMtkGeneration->iTrafficEncryptionKey );
|
|
1626 |
iMgvMtkGeneration = NULL;
|
|
1627 |
|
|
1628 |
ReqCompleted( reqHandle, aResult );
|
|
1629 |
TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::out EMgvMtkGeneration" );
|
|
1630 |
}
|
|
1631 |
else if ( RMmCustomAPI::TSimAuthenticationBase::
|
|
1632 |
EMgvMskDeletion == basePtr->ExtensionId() )
|
|
1633 |
{
|
|
1634 |
ReqCompleted( reqHandle, aResult );
|
|
1635 |
}
|
|
1636 |
else
|
|
1637 |
{
|
|
1638 |
TFLOGSTRING2( "CMmCustomTSY: Invalid authentication type specified: %d", basePtr->ExtensionId() );
|
|
1639 |
aResult = KErrArgument;
|
|
1640 |
ReqCompleted( reqHandle, aResult );
|
|
1641 |
}
|
|
1642 |
}
|
|
1643 |
}
|
|
1644 |
else if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
1645 |
{
|
|
1646 |
if ( KErrTimedOut == aResult )
|
|
1647 |
{
|
|
1648 |
iEapSim = NULL;
|
|
1649 |
iEapAka = NULL;
|
|
1650 |
}
|
|
1651 |
else
|
|
1652 |
{
|
|
1653 |
RMmCustomAPI::TSimAuthenticationBase* basePtr;
|
|
1654 |
aDataPackage->UnPackData( &basePtr );
|
|
1655 |
|
|
1656 |
// if no datapackage is received in error response
|
|
1657 |
if ( NULL == basePtr )
|
|
1658 |
{
|
|
1659 |
iEapAka = NULL;
|
|
1660 |
iEapSim = NULL;
|
|
1661 |
}
|
|
1662 |
else
|
|
1663 |
{
|
|
1664 |
// if 3G authentication needs to be completed
|
|
1665 |
// copy AUTS sequence to client
|
|
1666 |
if ( RMmCustomAPI::TSimAuthenticationBase::EEapAka ==
|
|
1667 |
basePtr->ExtensionId() )
|
|
1668 |
{
|
|
1669 |
RMmCustomAPI::TSimAuthenticationEapAka* eapAka;
|
|
1670 |
aDataPackage->UnPackData( &eapAka );
|
|
1671 |
|
|
1672 |
iEapAka->iAUTS.Copy( eapAka->iAUTS );
|
|
1673 |
|
|
1674 |
iEapAka = NULL;
|
|
1675 |
}
|
|
1676 |
|
|
1677 |
else if( RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrap ==
|
|
1678 |
basePtr->ExtensionId() )
|
|
1679 |
{
|
|
1680 |
TFLOGSTRING( "TSYMH: CompleteSimAuthentication RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrap" );
|
|
1681 |
RMmCustomAPI::TSimAuthenticationGbaBootstrap* gbabootstrap;
|
|
1682 |
aDataPackage->UnPackData( &gbabootstrap );
|
|
1683 |
|
|
1684 |
iGbaBootstrap->iAUTS.Copy( gbabootstrap->iAUTS );
|
|
1685 |
}
|
|
1686 |
|
|
1687 |
iEapSim = NULL;
|
|
1688 |
}
|
|
1689 |
}
|
|
1690 |
|
|
1691 |
// reset pointer to client data
|
|
1692 |
iGbaBootstrap = NULL;
|
|
1693 |
iGbaBootstrapUpdate = NULL;
|
|
1694 |
iMgvMskUpdate = NULL;
|
|
1695 |
iMgvMtkGeneration = NULL;
|
|
1696 |
iMgvMskDeletion = NULL;
|
|
1697 |
ReqCompleted( reqHandle, aResult );
|
|
1698 |
}
|
|
1699 |
}
|
|
1700 |
|
|
1701 |
// ---------------------------------------------------------------------------
|
|
1702 |
// CMmCustomTsy::SimAuthenticationCancel
|
|
1703 |
// Cancels sim authentication request
|
|
1704 |
// (other items were commented in a header).
|
|
1705 |
// ---------------------------------------------------------------------------
|
|
1706 |
//
|
|
1707 |
TInt CMmCustomTsy::SimAuthenticationCancel()
|
|
1708 |
{
|
|
1709 |
// reset the reqhandle
|
|
1710 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
1711 |
ECustomTsyGetSimAuthenticationData );
|
|
1712 |
|
|
1713 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
1714 |
{
|
|
1715 |
// reset pointer to client data
|
|
1716 |
iEapSim = NULL;
|
|
1717 |
iEapAka = NULL;
|
|
1718 |
iGbaBootstrap = NULL;
|
|
1719 |
iGbaBootstrapUpdate = NULL;
|
|
1720 |
iMgvMskUpdate = NULL;
|
|
1721 |
iMgvMtkGeneration = NULL;
|
|
1722 |
iMgvMskDeletion = NULL;
|
|
1723 |
|
|
1724 |
// complete
|
|
1725 |
ReqCompleted( reqHandle, KErrCancel );
|
|
1726 |
|
|
1727 |
}
|
|
1728 |
|
|
1729 |
return KErrNone;
|
|
1730 |
}
|
|
1731 |
|
|
1732 |
// ---------------------------------------------------------------------------
|
|
1733 |
// CMmCustomTsy::CheckRandValidityL
|
|
1734 |
// Checks if rand received from network is valid
|
|
1735 |
// (other items were commented in a header).
|
|
1736 |
// ---------------------------------------------------------------------------
|
|
1737 |
//
|
|
1738 |
TInt CMmCustomTsy::CheckRandValidityL(
|
|
1739 |
TBuf8<16> aRand )
|
|
1740 |
{
|
|
1741 |
TInt ret( KErrNone );
|
|
1742 |
|
|
1743 |
TDesC8& rand = aRand;
|
|
1744 |
|
|
1745 |
CSHA1* sha1 = CSHA1::NewL();
|
|
1746 |
|
|
1747 |
sha1->Reset();
|
|
1748 |
|
|
1749 |
TPtrC8 messageDigest = sha1->Final( rand );
|
|
1750 |
|
|
1751 |
ret = FindSetBitsFromBackup( messageDigest );
|
|
1752 |
|
|
1753 |
// If bits were not found from rand_db.prv or
|
|
1754 |
// if rand_db.prv itself was not found
|
|
1755 |
if ( KErrNone == ret || KErrNotFound == ret )
|
|
1756 |
{
|
|
1757 |
ret = InsertBlobsToRandDb( messageDigest );
|
|
1758 |
}
|
|
1759 |
|
|
1760 |
delete sha1;
|
|
1761 |
sha1 = NULL;
|
|
1762 |
|
|
1763 |
if ( KErrArgument == ret && 0 == iFreshBitCounter )
|
|
1764 |
{
|
|
1765 |
TFLOGSTRING( "CMmCustomTsy: RAND rejected" );
|
|
1766 |
}
|
|
1767 |
|
|
1768 |
return ret;
|
|
1769 |
}
|
|
1770 |
|
|
1771 |
// ---------------------------------------------------------------------------
|
|
1772 |
// CMmCustomTsy::CreateRandDb
|
|
1773 |
// Creates rand_db.cur
|
|
1774 |
// (other items were commented in a header).
|
|
1775 |
// ---------------------------------------------------------------------------
|
|
1776 |
//
|
|
1777 |
TInt CMmCustomTsy::CreateRandDb()
|
|
1778 |
{
|
|
1779 |
TInt ret = ( KErrNone );
|
|
1780 |
|
|
1781 |
// local variable initialized to zero
|
|
1782 |
TInt counter = 0;
|
|
1783 |
|
|
1784 |
|
|
1785 |
// fileSize is initialized to 2 because of filesize calculation method
|
|
1786 |
TInt fileSize = 2;
|
|
1787 |
|
|
1788 |
RFs fs;
|
|
1789 |
RFile file;
|
|
1790 |
|
|
1791 |
ret = fs.Connect();
|
|
1792 |
|
|
1793 |
TDriveNumber driveNumber;
|
|
1794 |
driveNumber = fs.GetSystemDrive();
|
|
1795 |
fs.CreatePrivatePath( driveNumber );
|
|
1796 |
fs.SetSessionToPrivate( driveNumber );
|
|
1797 |
|
|
1798 |
if ( KErrNone == ret )
|
|
1799 |
{
|
|
1800 |
ret = file.Create( fs, KRandDb, EFileShareAny );
|
|
1801 |
|
|
1802 |
if ( KErrNone != ret )
|
|
1803 |
{
|
|
1804 |
TFLOGSTRING( "TSY: CMmCustomTsy: 'rand_db.cur' creation failed!" );
|
|
1805 |
}
|
|
1806 |
else if ( KErrNone == ret )
|
|
1807 |
{
|
|
1808 |
ret = file.Open( fs, KRandDb, EFileShareAny | EFileWrite );
|
|
1809 |
|
|
1810 |
if ( KErrNone == ret )
|
|
1811 |
{
|
|
1812 |
// calculates how many bits can be addressed with current
|
|
1813 |
// BLOB_SIZE
|
|
1814 |
for ( counter = 1; counter < BLOB_SIZE; counter++ )
|
|
1815 |
{
|
|
1816 |
fileSize = ( fileSize * 2 );
|
|
1817 |
}
|
|
1818 |
// max number of bits is divided by 8 to get the actual
|
|
1819 |
// filesize
|
|
1820 |
fileSize = ( fileSize / 8 );
|
|
1821 |
|
|
1822 |
ret = file.SetSize( fileSize + METADATA_SIZE );
|
|
1823 |
|
|
1824 |
// empty tbuf for rand_db initialization
|
|
1825 |
TBuf8<1024> empty;
|
|
1826 |
TInt chunkSize = 1024;
|
|
1827 |
empty.FillZ( chunkSize );
|
|
1828 |
|
|
1829 |
// reset every byte of newly created rand_db to zero
|
|
1830 |
TInt maxSize = ( fileSize + METADATA_SIZE );
|
|
1831 |
for ( counter = 0; counter < maxSize;
|
|
1832 |
counter+=chunkSize )
|
|
1833 |
{
|
|
1834 |
TInt writeSize = maxSize - counter;
|
|
1835 |
if(writeSize > chunkSize)
|
|
1836 |
{
|
|
1837 |
writeSize = chunkSize;
|
|
1838 |
}
|
|
1839 |
ret = file.Write( counter, empty, writeSize );
|
|
1840 |
}
|
|
1841 |
|
|
1842 |
if ( KErrNone != ret )
|
|
1843 |
{
|
|
1844 |
TFLOGSTRING( "TSY: CMmCustomTsy: 'rand_db.cur' initialization failed!" );
|
|
1845 |
file.Close();
|
|
1846 |
}
|
|
1847 |
}
|
|
1848 |
else
|
|
1849 |
{
|
|
1850 |
TFLOGSTRING( "TSY: CMmCustomTsy: 'rand_db.cur' open failed!" );
|
|
1851 |
}
|
|
1852 |
}
|
|
1853 |
|
|
1854 |
if ( KErrNone == ret )
|
|
1855 |
{
|
|
1856 |
file.Close();
|
|
1857 |
fs.Close();
|
|
1858 |
}
|
|
1859 |
else
|
|
1860 |
{
|
|
1861 |
fs.Close();
|
|
1862 |
}
|
|
1863 |
}
|
|
1864 |
else
|
|
1865 |
{
|
|
1866 |
TFLOGSTRING( "TSY: CMmCustomTsy: Could not connect to file server!" );
|
|
1867 |
}
|
|
1868 |
|
|
1869 |
// Give some time for file.Close() and fs.Close() to complete
|
|
1870 |
User::After( 200000 );
|
|
1871 |
|
|
1872 |
return ret;
|
|
1873 |
}
|
|
1874 |
|
|
1875 |
// ---------------------------------------------------------------------------
|
|
1876 |
// CMmCustomTsy::InsertBlobsToRandDb
|
|
1877 |
// Inserts blobs to rand_db.cur
|
|
1878 |
// (other items were commented in a header).
|
|
1879 |
// ---------------------------------------------------------------------------
|
|
1880 |
//
|
|
1881 |
TInt CMmCustomTsy::InsertBlobsToRandDb(
|
|
1882 |
TPtrC8 aMessageDigest )
|
|
1883 |
{
|
|
1884 |
RFs fs;
|
|
1885 |
RFile file;
|
|
1886 |
|
|
1887 |
TBuf8<1> byteFromRandDb;
|
|
1888 |
|
|
1889 |
TInt ret = KErrNone;
|
|
1890 |
|
|
1891 |
// Many local variables initialized to zero
|
|
1892 |
TInt8 counter = 0;
|
|
1893 |
TInt8 counter2 = 0;
|
|
1894 |
|
|
1895 |
TUint16 hexDigit = 0;
|
|
1896 |
TUint8 blob = 0;
|
|
1897 |
TInt byteNumber = 0;
|
|
1898 |
TInt bit = 0;
|
|
1899 |
|
|
1900 |
TUint16 assignedBits = 0;
|
|
1901 |
iFreshBitCounter = 0;
|
|
1902 |
|
|
1903 |
ret = fs.Connect();
|
|
1904 |
|
|
1905 |
TDriveNumber driveNumber;
|
|
1906 |
driveNumber = fs.GetSystemDrive();
|
|
1907 |
fs.CreatePrivatePath( driveNumber );
|
|
1908 |
fs.SetSessionToPrivate( driveNumber );
|
|
1909 |
|
|
1910 |
if ( KErrNone == ret )
|
|
1911 |
{
|
|
1912 |
ret = file.Open( fs, KRandDb, EFileShareExclusive | EFileWrite );
|
|
1913 |
if ( KErrNotFound == ret )
|
|
1914 |
{
|
|
1915 |
ret = CreateRandDb();
|
|
1916 |
|
|
1917 |
if ( KErrNone == ret )
|
|
1918 |
{
|
|
1919 |
ret = file.Open( fs, KRandDb, EFileShareExclusive |
|
|
1920 |
EFileWrite );
|
|
1921 |
if( KErrNone != ret )
|
|
1922 |
{
|
|
1923 |
TFLOGSTRING( "TSY: CMmCustomTsy: rand_db open failed" );
|
|
1924 |
}
|
|
1925 |
}
|
|
1926 |
if ( KErrNone != ret )
|
|
1927 |
{
|
|
1928 |
fs.Close();
|
|
1929 |
|
|
1930 |
return ret;
|
|
1931 |
}
|
|
1932 |
}
|
|
1933 |
|
|
1934 |
for ( counter = 0; counter < 20; counter++ )
|
|
1935 |
{
|
|
1936 |
// reset loop variables
|
|
1937 |
hexDigit = 0;
|
|
1938 |
assignedBits = 0;
|
|
1939 |
|
|
1940 |
// read one hexDigit from message digest
|
|
1941 |
hexDigit = static_cast< TUint16 > ( aMessageDigest[counter] );
|
|
1942 |
hexDigit <<= 8;
|
|
1943 |
counter++;
|
|
1944 |
hexDigit |= static_cast< TUint16 > ( aMessageDigest[counter] );
|
|
1945 |
|
|
1946 |
bit = 1;
|
|
1947 |
|
|
1948 |
// read as many bits from hexDigit as blobSize indicates
|
|
1949 |
for ( counter2 = 0; counter2 < BLOB_SIZE; counter2++ )
|
|
1950 |
{
|
|
1951 |
assignedBits |= bit & hexDigit;
|
|
1952 |
bit <<= 1;
|
|
1953 |
}
|
|
1954 |
|
|
1955 |
byteNumber = ( assignedBits / 8 );
|
|
1956 |
bit = ( assignedBits - ( byteNumber * 8 ) );
|
|
1957 |
|
|
1958 |
ret = file.Read( byteNumber, byteFromRandDb );
|
|
1959 |
if( KErrNone != ret )
|
|
1960 |
{
|
|
1961 |
break;
|
|
1962 |
}
|
|
1963 |
|
|
1964 |
blob = 128;
|
|
1965 |
blob >>= bit;
|
|
1966 |
|
|
1967 |
// if bit is not already set
|
|
1968 |
if ( !blob == ( blob & byteFromRandDb[0] ) )
|
|
1969 |
{
|
|
1970 |
|
|
1971 |
byteFromRandDb[0] |= blob;
|
|
1972 |
|
|
1973 |
ret = file.Write( byteNumber, byteFromRandDb );
|
|
1974 |
if( KErrNone != ret )
|
|
1975 |
{
|
|
1976 |
break;
|
|
1977 |
}
|
|
1978 |
|
|
1979 |
iFreshBitCounter++;
|
|
1980 |
}
|
|
1981 |
}
|
|
1982 |
|
|
1983 |
file.Close();
|
|
1984 |
fs.Close();
|
|
1985 |
}
|
|
1986 |
else
|
|
1987 |
{
|
|
1988 |
TFLOGSTRING( "TSY: CMmCustomTsy: Could not connect to file server!" );
|
|
1989 |
return ret;
|
|
1990 |
}
|
|
1991 |
|
|
1992 |
// if no new bits were found e.g. RAND will be rejected
|
|
1993 |
if ( 0 == iFreshBitCounter )
|
|
1994 |
{
|
|
1995 |
ret = KErrArgument;
|
|
1996 |
}
|
|
1997 |
else
|
|
1998 |
{
|
|
1999 |
ret = UpdateBitCounter();
|
|
2000 |
}
|
|
2001 |
|
|
2002 |
return ret;
|
|
2003 |
}
|
|
2004 |
|
|
2005 |
// ---------------------------------------------------------------------------
|
|
2006 |
// CMmCustomTsy::UpdateBitCounter
|
|
2007 |
// Updates bitcounter information on rand_db.cur
|
|
2008 |
// (other items were commented in a header).
|
|
2009 |
// ---------------------------------------------------------------------------
|
|
2010 |
//
|
|
2011 |
TInt CMmCustomTsy::UpdateBitCounter()
|
|
2012 |
{
|
|
2013 |
TInt ret( KErrNone );
|
|
2014 |
|
|
2015 |
RFs fs;
|
|
2016 |
RFile file;
|
|
2017 |
|
|
2018 |
TBuf8<2> bitCounterBytes;
|
|
2019 |
|
|
2020 |
// local varibales initialized to zero
|
|
2021 |
TUint16 bitCounter = 0;
|
|
2022 |
TUint16 temporaryBitCounter = 0;
|
|
2023 |
TInt8 counter = 0;
|
|
2024 |
|
|
2025 |
// fileSize is initialized to 2 because of filesize calculation method
|
|
2026 |
TInt fileSize = 2;
|
|
2027 |
|
|
2028 |
ret = fs.Connect();
|
|
2029 |
|
|
2030 |
TDriveNumber driveNumber;
|
|
2031 |
driveNumber = fs.GetSystemDrive();
|
|
2032 |
fs.CreatePrivatePath( driveNumber );
|
|
2033 |
fs.SetSessionToPrivate( driveNumber );
|
|
2034 |
|
|
2035 |
if ( KErrNone == ret )
|
|
2036 |
{
|
|
2037 |
ret = file.Open( fs, KRandDb, EFileShareExclusive | EFileWrite );
|
|
2038 |
if ( KErrNone == ret )
|
|
2039 |
{
|
|
2040 |
// calculate filesize
|
|
2041 |
for ( counter = 1; counter < BLOB_SIZE; counter++ )
|
|
2042 |
{
|
|
2043 |
fileSize = ( fileSize * 2 );
|
|
2044 |
}
|
|
2045 |
fileSize = ( fileSize / 8 );
|
|
2046 |
|
|
2047 |
ret = file.Read( fileSize, bitCounterBytes, 2 );
|
|
2048 |
if ( KErrNone == ret )
|
|
2049 |
{
|
|
2050 |
// read bitcounter info from rand_db
|
|
2051 |
bitCounter = STATIC_CAST( TUint16, bitCounterBytes[0] );
|
|
2052 |
bitCounter <<= 8;
|
|
2053 |
bitCounter |= bitCounterBytes[1];
|
|
2054 |
|
|
2055 |
// add fresh bits to bit counter info
|
|
2056 |
bitCounter += iFreshBitCounter;
|
|
2057 |
|
|
2058 |
temporaryBitCounter = bitCounter;
|
|
2059 |
bitCounterBytes[1] = STATIC_CAST( TUint8,
|
|
2060 |
temporaryBitCounter );
|
|
2061 |
temporaryBitCounter >>= 8;
|
|
2062 |
bitCounterBytes[0] = STATIC_CAST( TUint8,
|
|
2063 |
temporaryBitCounter );
|
|
2064 |
|
|
2065 |
ret = file.Write( fileSize, bitCounterBytes, 2 );
|
|
2066 |
|
|
2067 |
// if more than half of the available bits are set
|
|
2068 |
if ( ( fileSize * 4 ) < bitCounter )
|
|
2069 |
{
|
|
2070 |
ret = fs.Delete( KRandDbPrev );
|
|
2071 |
|
|
2072 |
if ( KErrNotFound == ret || KErrNone == ret )
|
|
2073 |
{
|
|
2074 |
ret = file.Rename( KRandDbPrev );
|
|
2075 |
}
|
|
2076 |
}
|
|
2077 |
}
|
|
2078 |
|
|
2079 |
file.Close();
|
|
2080 |
}
|
|
2081 |
|
|
2082 |
fs.Close();
|
|
2083 |
}
|
|
2084 |
else
|
|
2085 |
{
|
|
2086 |
TFLOGSTRING( "TSY: CMmCustomTsy: Could not connect to file server!" );
|
|
2087 |
}
|
|
2088 |
|
|
2089 |
return ret;
|
|
2090 |
}
|
|
2091 |
|
|
2092 |
// ---------------------------------------------------------------------------
|
|
2093 |
// CMmCustomTsy::FindSetBitsFromBackup
|
|
2094 |
// Checks rand_db.prv for set bits
|
|
2095 |
// (other items were commented in a header).
|
|
2096 |
// ---------------------------------------------------------------------------
|
|
2097 |
//
|
|
2098 |
TInt CMmCustomTsy::FindSetBitsFromBackup(
|
|
2099 |
TPtrC8 aMessageDigest )
|
|
2100 |
{
|
|
2101 |
RFs fs;
|
|
2102 |
RFile file;
|
|
2103 |
TBuf8<1> byteFromRandDb;
|
|
2104 |
|
|
2105 |
TInt ret = KErrNone;
|
|
2106 |
|
|
2107 |
// Many local variables initialized to zero
|
|
2108 |
TInt8 counter = 0;
|
|
2109 |
TInt8 counter2 = 0;
|
|
2110 |
|
|
2111 |
TUint16 hexDigit = 0;
|
|
2112 |
TUint8 blob = 0;
|
|
2113 |
TInt byteNumber = 0;
|
|
2114 |
TInt bit = 0;
|
|
2115 |
|
|
2116 |
TUint16 assignedBits = 0;
|
|
2117 |
iFreshBitCounter = 0;
|
|
2118 |
|
|
2119 |
ret = fs.Connect();
|
|
2120 |
|
|
2121 |
TDriveNumber driveNumber;
|
|
2122 |
driveNumber = fs.GetSystemDrive();
|
|
2123 |
fs.CreatePrivatePath( driveNumber );
|
|
2124 |
fs.SetSessionToPrivate( driveNumber );
|
|
2125 |
|
|
2126 |
if( KErrNone == ret )
|
|
2127 |
{
|
|
2128 |
ret = file.Open( fs, KRandDbPrev, EFileShareAny | EFileRead );
|
|
2129 |
|
|
2130 |
if ( KErrNone == ret )
|
|
2131 |
{
|
|
2132 |
for ( counter = 0; counter < 20; counter++ )
|
|
2133 |
{
|
|
2134 |
// reset loop variables
|
|
2135 |
hexDigit = 0;
|
|
2136 |
assignedBits = 0;
|
|
2137 |
|
|
2138 |
// read one hexDigit from message digest
|
|
2139 |
hexDigit = STATIC_CAST( TUint16, aMessageDigest[counter] );
|
|
2140 |
hexDigit <<= 8;
|
|
2141 |
counter++;
|
|
2142 |
hexDigit |= STATIC_CAST( TUint16, aMessageDigest[counter] );
|
|
2143 |
|
|
2144 |
// Initialize bit to 1
|
|
2145 |
bit = 1;
|
|
2146 |
|
|
2147 |
// read as many bits from hexDigit as blobSize indicates
|
|
2148 |
for ( counter2 = 0; counter2 < BLOB_SIZE; counter2++ )
|
|
2149 |
{
|
|
2150 |
assignedBits |= bit & hexDigit;
|
|
2151 |
bit <<= 1;
|
|
2152 |
}
|
|
2153 |
|
|
2154 |
// calculate the byte and bit to be read from rand_db backup
|
|
2155 |
byteNumber = ( assignedBits / 8 );
|
|
2156 |
bit = ( assignedBits - ( byteNumber * 8 ) );
|
|
2157 |
|
|
2158 |
ret = file.Read( byteNumber, byteFromRandDb );
|
|
2159 |
if ( KErrNone != ret )
|
|
2160 |
{
|
|
2161 |
break;
|
|
2162 |
}
|
|
2163 |
|
|
2164 |
// Initialize blob to 10000000
|
|
2165 |
blob = 128;
|
|
2166 |
blob >>= bit;
|
|
2167 |
|
|
2168 |
// if bit is not found from old db
|
|
2169 |
if ( !blob == ( blob & byteFromRandDb[0] ) )
|
|
2170 |
{
|
|
2171 |
iFreshBitCounter++;
|
|
2172 |
|
|
2173 |
file.Close();
|
|
2174 |
fs.Close();
|
|
2175 |
|
|
2176 |
return ret;
|
|
2177 |
}
|
|
2178 |
}
|
|
2179 |
|
|
2180 |
file.Close();
|
|
2181 |
fs.Close();
|
|
2182 |
|
|
2183 |
if ( 0 == iFreshBitCounter )
|
|
2184 |
{
|
|
2185 |
ret = KErrArgument;
|
|
2186 |
}
|
|
2187 |
else
|
|
2188 |
{
|
|
2189 |
ret = KErrNone;
|
|
2190 |
}
|
|
2191 |
}
|
|
2192 |
|
|
2193 |
if ( KErrNotFound == ret )
|
|
2194 |
{
|
|
2195 |
fs.Close();
|
|
2196 |
}
|
|
2197 |
}
|
|
2198 |
|
|
2199 |
return ret;
|
|
2200 |
}
|
|
2201 |
|
|
2202 |
// ---------------------------------------------------------------------------
|
|
2203 |
// CMmCustomTsy::TerminateCallL
|
|
2204 |
// This method is used for terminating a call or all calls.
|
|
2205 |
// (other items were commented in a header).
|
|
2206 |
// ---------------------------------------------------------------------------
|
|
2207 |
//
|
|
2208 |
TInt CMmCustomTsy::TerminateCallL(
|
|
2209 |
const TTsyReqHandle aTsyReqHandle,
|
|
2210 |
const TName* aCallName )
|
|
2211 |
{
|
|
2212 |
// set return value to KErrNotFound
|
|
2213 |
TInt ret( KErrNotFound );
|
|
2214 |
|
|
2215 |
TTsyReqHandle terminateCallHandle =
|
|
2216 |
iTsyReqHandleStore->GetTsyReqHandle( ECustomTsyTerminateCall );
|
|
2217 |
|
|
2218 |
if ( 0 < terminateCallHandle )
|
|
2219 |
{
|
|
2220 |
//The request is already in processing because of previous request
|
|
2221 |
//Complete request with status value informing the client about
|
|
2222 |
//the situation.
|
|
2223 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
2224 |
}
|
|
2225 |
else
|
|
2226 |
{
|
|
2227 |
// Cases are:
|
|
2228 |
// if parameter is ALL_CALLS
|
|
2229 |
// if any active or held call exists
|
|
2230 |
// hangup active and held calls
|
|
2231 |
// else
|
|
2232 |
// complete with KErrNone
|
|
2233 |
// else (parameter is single call)
|
|
2234 |
// if call exists
|
|
2235 |
// hangup call
|
|
2236 |
// else
|
|
2237 |
// complete with KErrNotFound
|
|
2238 |
//
|
|
2239 |
|
|
2240 |
// call id
|
|
2241 |
TInt callId = -1;
|
|
2242 |
|
|
2243 |
// indicates if this is called in an error situation (ETrue)
|
|
2244 |
// or by user request (EFalse);
|
|
2245 |
TBool isError = EFalse;
|
|
2246 |
|
|
2247 |
// terminate all calls
|
|
2248 |
// CompareF returns 0 if names are equal
|
|
2249 |
if ( 0 == aCallName->CompareF( KTerminateAllCalls ) )
|
|
2250 |
{
|
|
2251 |
CMmCallTsy* activeCall =
|
|
2252 |
iMmPhoneTsy->CallList()->GetMmCallByStatus(
|
|
2253 |
RMobileCall::EStatusConnected );
|
|
2254 |
CMmCallTsy* heldCall =
|
|
2255 |
iMmPhoneTsy->CallList()->GetMmCallByStatus(
|
|
2256 |
RMobileCall::EStatusHold );
|
|
2257 |
CMmCallTsy* connectingCall =
|
|
2258 |
iMmPhoneTsy->CallList()->GetMmCallByStatus(
|
|
2259 |
RMobileCall::EStatusDialling );
|
|
2260 |
if ( NULL == connectingCall )
|
|
2261 |
{
|
|
2262 |
connectingCall =
|
|
2263 |
iMmPhoneTsy->CallList()->GetMmCallByStatus(
|
|
2264 |
RMobileCall::EStatusConnecting );
|
|
2265 |
}
|
|
2266 |
|
|
2267 |
if ( activeCall || heldCall || connectingCall )
|
|
2268 |
{
|
|
2269 |
// Let's have negative or zero mean "all active and held calls
|
|
2270 |
// and the call id given by taking absolute value of
|
|
2271 |
// parameter" as we need to somehow pass alerting call id,
|
|
2272 |
// which is neither active or held call..
|
|
2273 |
callId = ( NULL != connectingCall ) ?
|
|
2274 |
-TInt( connectingCall->CallId() ) : ( 0 );
|
|
2275 |
CMmDataPackage dataPackage;
|
|
2276 |
dataPackage.PackData( &callId, &isError );
|
|
2277 |
ret = iMmPhoneTsy->MessageManager()->HandleRequestL(
|
|
2278 |
ECustomTerminateCallIPC, &dataPackage );
|
|
2279 |
}
|
|
2280 |
else
|
|
2281 |
{
|
|
2282 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
2283 |
// return immediately, otherwise KErrNone would cause the
|
|
2284 |
// request handle to be saved!
|
|
2285 |
return KErrNone;
|
|
2286 |
}
|
|
2287 |
}
|
|
2288 |
// terminate call by name
|
|
2289 |
else
|
|
2290 |
{
|
|
2291 |
// change the cause value, a specific call termination is called
|
|
2292 |
// when error has ocurred
|
|
2293 |
isError = ETrue;
|
|
2294 |
|
|
2295 |
// get call object by name
|
|
2296 |
CMmCallTsy* namedCall =
|
|
2297 |
iMmPhoneTsy->CallList()->GetMmCallByName( aCallName );
|
|
2298 |
|
|
2299 |
// get call ID
|
|
2300 |
if ( namedCall )
|
|
2301 |
{
|
|
2302 |
callId = namedCall->CallId();
|
|
2303 |
CMmDataPackage dataPackage;
|
|
2304 |
dataPackage.PackData( &callId, &isError );
|
|
2305 |
ret = iMmPhoneTsy->MessageManager()->HandleRequestL(
|
|
2306 |
ECustomTerminateCallIPC, &dataPackage );
|
|
2307 |
}
|
|
2308 |
}
|
|
2309 |
|
|
2310 |
if ( KErrNone != ret )
|
|
2311 |
{
|
|
2312 |
// request failed, complete with error value
|
|
2313 |
ReqCompleted( aTsyReqHandle, ret );
|
|
2314 |
}
|
|
2315 |
else
|
|
2316 |
{
|
|
2317 |
// Store the request handle
|
|
2318 |
iReqHandleType = ECustomTsyTerminateCall;
|
|
2319 |
}
|
|
2320 |
}
|
|
2321 |
|
|
2322 |
return KErrNone;
|
|
2323 |
}
|
|
2324 |
|
|
2325 |
// ---------------------------------------------------------------------------
|
|
2326 |
// CMmCustomTsy::CompleteTerminateCall
|
|
2327 |
// This method completes a TerminateCall or a DialCancel request.
|
|
2328 |
// (other items were commented in a header).
|
|
2329 |
// ---------------------------------------------------------------------------
|
|
2330 |
//
|
|
2331 |
void CMmCustomTsy::CompleteTerminateCall(
|
|
2332 |
TInt aError )
|
|
2333 |
{
|
|
2334 |
TFLOGSTRING2( "TSY: CMmCustomTsy::CompleteTerminateCall - aError: %d", aError );
|
|
2335 |
|
|
2336 |
// reset req handle. Returns the deleted req handle
|
|
2337 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2338 |
ECustomTsyTerminateCall );
|
|
2339 |
|
|
2340 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
2341 |
{
|
|
2342 |
// complete the request with reqhandle and aError
|
|
2343 |
ReqCompleted( reqHandle, aError );
|
|
2344 |
}
|
|
2345 |
// Set 3rd party Dial check number to EFalse
|
|
2346 |
iISVDialNumberCheck = EFalse;
|
|
2347 |
}
|
|
2348 |
|
|
2349 |
// ---------------------------------------------------------------------------
|
|
2350 |
// CMmCustomTsy::NotifyDtmfEvent
|
|
2351 |
// This method allows a client to be notified when the DTMF phase of a call
|
|
2352 |
// has begun and completed
|
|
2353 |
// (other items were commented in a header).
|
|
2354 |
// ---------------------------------------------------------------------------
|
|
2355 |
//
|
|
2356 |
TInt CMmCustomTsy::NotifyDtmfEvent(
|
|
2357 |
RMmCustomAPI::TDtmfInfo* aInfo )
|
|
2358 |
{
|
|
2359 |
TFLOGSTRING("TSY: CMmCustomTsy::NotifyDtmfEvent");
|
|
2360 |
// save pointer to client data
|
|
2361 |
iNotifyInfo = aInfo;
|
|
2362 |
|
|
2363 |
// save handle type
|
|
2364 |
iReqHandleType = ECustomTsyNotifyDtmfEvent;
|
|
2365 |
|
|
2366 |
return KErrNone;
|
|
2367 |
}
|
|
2368 |
|
|
2369 |
// ---------------------------------------------------------------------------
|
|
2370 |
// CMmCustomTsy::CompleteNotifyDtmfEvent
|
|
2371 |
// Completes a NotifyDtmfEvent request.
|
|
2372 |
// (other items were commented in a header).
|
|
2373 |
// ---------------------------------------------------------------------------
|
|
2374 |
//
|
|
2375 |
void CMmCustomTsy::CompleteNotifyDtmfEvent(
|
|
2376 |
RMmCustomAPI::TDtmfInfo aInfo,
|
|
2377 |
TInt aErrorCode )
|
|
2378 |
{
|
|
2379 |
TFLOGSTRING("TSY: CMmCustomTsy::CompleteNotifyDtmfEvent");
|
|
2380 |
// reset request handle. Returns the deleted req handle.
|
|
2381 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2382 |
ECustomTsyNotifyDtmfEvent );
|
|
2383 |
|
|
2384 |
// check if request was called
|
|
2385 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
2386 |
{
|
|
2387 |
// check if response was ok
|
|
2388 |
if ( KErrNone == aErrorCode )
|
|
2389 |
{
|
|
2390 |
// set the information for the client
|
|
2391 |
*iNotifyInfo= aInfo;
|
|
2392 |
}
|
|
2393 |
|
|
2394 |
// reset the internal variable
|
|
2395 |
iNotifyInfo = NULL;
|
|
2396 |
// complete
|
|
2397 |
ReqCompleted( reqHandle, aErrorCode );
|
|
2398 |
}
|
|
2399 |
}
|
|
2400 |
|
|
2401 |
// ---------------------------------------------------------------------------
|
|
2402 |
// CMmCustomTsy::NotifyDtmfEventCancel
|
|
2403 |
// This method cancels an outstanding notification of dtmf event, placed with
|
|
2404 |
// the NotifyDtmfEvent function.
|
|
2405 |
// (other items were commented in a header).
|
|
2406 |
// ---------------------------------------------------------------------------
|
|
2407 |
//
|
|
2408 |
TInt CMmCustomTsy::NotifyDtmfEventCancel(
|
|
2409 |
const TTsyReqHandle aTsyReqHandle )
|
|
2410 |
{
|
|
2411 |
// reset pointer to client data
|
|
2412 |
iNotifyInfo = NULL;
|
|
2413 |
|
|
2414 |
// reset reqhandle
|
|
2415 |
iTsyReqHandleStore->ResetTsyReqHandle( ECustomTsyNotifyDtmfEvent );
|
|
2416 |
|
|
2417 |
// complete with KErrCancel
|
|
2418 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
2419 |
|
|
2420 |
return KErrNone;
|
|
2421 |
}
|
|
2422 |
|
|
2423 |
// ---------------------------------------------------------------------------
|
|
2424 |
// CMmCustomTsy::GetDiagnosticInfo
|
|
2425 |
// This function gets the SS diagnostic info (octets) of a call object.
|
|
2426 |
// (other items were commented in a header).
|
|
2427 |
// ---------------------------------------------------------------------------
|
|
2428 |
//
|
|
2429 |
TInt CMmCustomTsy::GetDiagnosticInfo(
|
|
2430 |
const TTsyReqHandle aTsyReqHandle,
|
|
2431 |
TName* aCallName )
|
|
2432 |
{
|
|
2433 |
TInt errorValue = KErrNone;
|
|
2434 |
// get call object by name
|
|
2435 |
CMmCallTsy* mmCall = iMmPhoneTsy->CallList()->GetMmCallByName(
|
|
2436 |
aCallName );
|
|
2437 |
|
|
2438 |
// if call exists
|
|
2439 |
if ( mmCall )
|
|
2440 |
{
|
|
2441 |
TUint8 diags = mmCall->GetDiagnostics();
|
|
2442 |
//gets diagnostic value - check value - return error code
|
|
2443 |
|
|
2444 |
if ( 0 != diags )
|
|
2445 |
{
|
|
2446 |
TFLOGSTRING3( "TSY:CMmCustomTsy::GetDiagnosticInfo: Diagnostic info=%d asked for call id=%d", diags, mmCall->CallId() );
|
|
2447 |
switch ( diags )
|
|
2448 |
{
|
|
2449 |
case KDiagnosticInfoBarredWithCUG:
|
|
2450 |
errorValue = KErrDiagnosticInfoBarredWithCUG;
|
|
2451 |
break;
|
|
2452 |
case KDiagnosticInfoBarredNoCUG:
|
|
2453 |
errorValue = KErrDiagnosticInfoBarredNoCUG;
|
|
2454 |
break;
|
|
2455 |
case KDiagnosticInfoBarredUnknownCUG:
|
|
2456 |
errorValue = KErrDiagnosticInfoBarredUnknownCUG;
|
|
2457 |
break;
|
|
2458 |
case KDiagnosticInfoBarredIncompatibleCUG:
|
|
2459 |
errorValue = KErrDiagnosticInfoBarredIncompatibleCUG;
|
|
2460 |
break;
|
|
2461 |
case KDiagnosticInfoBarredFailureCUG:
|
|
2462 |
errorValue = KErrDiagnosticInfoBarredFailureCUG;
|
|
2463 |
break;
|
|
2464 |
case KDiagnosticInfoBarredClirNotSubscribed:
|
|
2465 |
errorValue = KErrDiagnosticInfoBarredClirNotSubscribed;
|
|
2466 |
break;
|
|
2467 |
case KDiagnosticInfoBarredCCBSPossible:
|
|
2468 |
errorValue = KErrDiagnosticInfoBarredCCBSPossible;
|
|
2469 |
break;
|
|
2470 |
case KDiagnosticInfoBarredCCBSNotPossible:
|
|
2471 |
errorValue = KErrDiagnosticInfoBarredCCBSNotPossible;
|
|
2472 |
break;
|
|
2473 |
default:
|
|
2474 |
errorValue = KErrNone;
|
|
2475 |
break;
|
|
2476 |
}
|
|
2477 |
}
|
|
2478 |
TFLOGSTRING2( "TSY: CMmCustomTsy::GetDiagnosticInfo - ReqCompleted - Error code: %d", errorValue );
|
|
2479 |
// complete errorvalue to client - inform change
|
|
2480 |
ReqCompleted( aTsyReqHandle, errorValue );
|
|
2481 |
}
|
|
2482 |
else
|
|
2483 |
{
|
|
2484 |
// call is not found
|
|
2485 |
TFLOGSTRING("TSY: CMmCustomTsy::GetDiagnosticInfo - Call is not found");
|
|
2486 |
ReqCompleted( aTsyReqHandle, KErrNotFound );
|
|
2487 |
}
|
|
2488 |
TFLOGSTRING2( "TSY: CMmCustomTsy::GetDiagnosticInfo - Error code: %d", errorValue );
|
|
2489 |
|
|
2490 |
return KErrNone;
|
|
2491 |
}
|
|
2492 |
|
|
2493 |
// ---------------------------------------------------------------------------
|
|
2494 |
// CMmCustomTsy::CompleteGetDiagnosticOctects
|
|
2495 |
// This function sets the SS diagnostic octets of a call object when received
|
|
2496 |
// from DOS.
|
|
2497 |
// (other items were commented in a header).
|
|
2498 |
// ---------------------------------------------------------------------------
|
|
2499 |
//
|
|
2500 |
void CMmCustomTsy::CompleteGetDiagnosticOctects(
|
|
2501 |
TInt aCallId,
|
|
2502 |
TUint8 aDiags )
|
|
2503 |
{
|
|
2504 |
// get call object by id
|
|
2505 |
CMmCallTsy* mmCall = iMmPhoneTsy->CallList()->GetMmCallById( aCallId );
|
|
2506 |
|
|
2507 |
// if call exists, set diagnostics
|
|
2508 |
if ( mmCall )
|
|
2509 |
{
|
|
2510 |
mmCall->SetDiagnostics( aDiags );
|
|
2511 |
}
|
|
2512 |
}
|
|
2513 |
|
|
2514 |
// ---------------------------------------------------------------------------
|
|
2515 |
// CMmCustomTsy::GetRemoteAlertingToneStatus
|
|
2516 |
// This function returns the remote alerting tone status.
|
|
2517 |
// (other items were commented in a header).
|
|
2518 |
// ---------------------------------------------------------------------------
|
|
2519 |
//
|
|
2520 |
TInt CMmCustomTsy::GetRemoteAlertingToneStatus(
|
|
2521 |
const TTsyReqHandle aTsyReqHandle,
|
|
2522 |
RMmCustomAPI::TRemoteAlertingToneStatus* aToneStatus )
|
|
2523 |
{
|
|
2524 |
TFLOGSTRING("TSY: CMmCustomTsy::GetRemoteAlertingToneStatus");
|
|
2525 |
TInt ret = iMmCustomExtInterface->GetRemoteAlertingToneStatus(
|
|
2526 |
aToneStatus );
|
|
2527 |
|
|
2528 |
ReqCompleted( aTsyReqHandle, ret );
|
|
2529 |
|
|
2530 |
return KErrNone;
|
|
2531 |
}
|
|
2532 |
|
|
2533 |
// ---------------------------------------------------------------------------
|
|
2534 |
// CMmCustomTsy::GetCallOrigin
|
|
2535 |
// This function returns the origin of the call (ETel or other), defined by
|
|
2536 |
// aCallName parameter.
|
|
2537 |
// (other items were commented in a header).
|
|
2538 |
// ---------------------------------------------------------------------------
|
|
2539 |
//
|
|
2540 |
TInt CMmCustomTsy::GetCallOrigin(
|
|
2541 |
const TTsyReqHandle aTsyReqHandle,
|
|
2542 |
TName* aCallName,
|
|
2543 |
RMmCustomAPI::TCallOrigin* aOrigin )
|
|
2544 |
{
|
|
2545 |
// get call object by name
|
|
2546 |
CMmCallTsy* mmCall = iMmPhoneTsy->CallList()->GetMmCallByName(
|
|
2547 |
aCallName );
|
|
2548 |
|
|
2549 |
// if call exists
|
|
2550 |
if ( mmCall )
|
|
2551 |
{
|
|
2552 |
// get the call origin from Call Object
|
|
2553 |
// if the call is a ghost call it means that is not made by ETEL
|
|
2554 |
if ( mmCall->ETelOriginated() )
|
|
2555 |
{
|
|
2556 |
*aOrigin = RMmCustomAPI::EETelCall;
|
|
2557 |
}
|
|
2558 |
else
|
|
2559 |
{
|
|
2560 |
*aOrigin = RMmCustomAPI::EOutsider;
|
|
2561 |
}
|
|
2562 |
}
|
|
2563 |
else // call not found
|
|
2564 |
{
|
|
2565 |
*aOrigin = RMmCustomAPI::EUnknown;
|
|
2566 |
}
|
|
2567 |
|
|
2568 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
2569 |
|
|
2570 |
return KErrNone;
|
|
2571 |
}
|
|
2572 |
|
|
2573 |
// ---------------------------------------------------------------------------
|
|
2574 |
// CMmCustomTsy::GetAlsBlockedL
|
|
2575 |
// This method gets the alternating line service block status.
|
|
2576 |
// (other items were commented in a header).
|
|
2577 |
// ---------------------------------------------------------------------------
|
|
2578 |
//
|
|
2579 |
TInt CMmCustomTsy::GetAlsBlockedL(
|
|
2580 |
const TTsyReqHandle aTsyReqHandle,
|
|
2581 |
RMmCustomAPI::TGetAlsBlockStatus* aBlockStatus )
|
|
2582 |
{
|
|
2583 |
TFLOGSTRING3( "TSY: CMmCustomTsy::GetAlsBlockedL - Req handle: %d, Block status: %d", aTsyReqHandle, *aBlockStatus );
|
|
2584 |
TTsyReqHandle getAlsBlockedHandle =
|
|
2585 |
iTsyReqHandleStore->GetTsyReqHandle( ECustomTsyGetAlsBlocked );
|
|
2586 |
|
|
2587 |
if ( 0 < getAlsBlockedHandle )
|
|
2588 |
{
|
|
2589 |
// The request is already in processing because of previous request
|
|
2590 |
// Complete request with status value informing the client about
|
|
2591 |
// the situation.
|
|
2592 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
2593 |
}
|
|
2594 |
else
|
|
2595 |
{
|
|
2596 |
// save pointer to client data
|
|
2597 |
iRetAlsBlockStatus = aBlockStatus;
|
|
2598 |
|
|
2599 |
// call DOS (no packed parameters)
|
|
2600 |
TInt ret = iMmPhoneTsy->MessageManager()->HandleRequestL(
|
|
2601 |
ECustomGetAlsBlockedIPC );
|
|
2602 |
|
|
2603 |
// check the result of the call
|
|
2604 |
if ( KErrNone != ret )
|
|
2605 |
{
|
|
2606 |
ReqCompleted ( aTsyReqHandle, ret );
|
|
2607 |
}
|
|
2608 |
else
|
|
2609 |
{
|
|
2610 |
// Store the request handle
|
|
2611 |
iReqHandleType = ECustomTsyGetAlsBlocked;
|
|
2612 |
}
|
|
2613 |
}
|
|
2614 |
|
|
2615 |
return KErrNone;
|
|
2616 |
}
|
|
2617 |
|
|
2618 |
// ---------------------------------------------------------------------------
|
|
2619 |
// CMmCustomTsy::CompleteGetAlsBlocked
|
|
2620 |
// Completes a GetAlsBlocked operation.
|
|
2621 |
// (other items were commented in a header).
|
|
2622 |
// ---------------------------------------------------------------------------
|
|
2623 |
//
|
|
2624 |
void CMmCustomTsy::CompleteGetAlsBlocked(
|
|
2625 |
RMmCustomAPI::TGetAlsBlockStatus aBlockStatus,
|
|
2626 |
TInt aErrorCode )
|
|
2627 |
{
|
|
2628 |
TFLOGSTRING3( "TSY: CMmCustomTsy::CompleteGetAlsBlocked - Block status: %d, Error code: %d", aBlockStatus, aErrorCode );
|
|
2629 |
//reset req handle. Returns the deleted req handle
|
|
2630 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2631 |
ECustomTsyGetAlsBlocked );
|
|
2632 |
|
|
2633 |
// check if request was called
|
|
2634 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
2635 |
{
|
|
2636 |
//check if response was ok
|
|
2637 |
if ( KErrNone == aErrorCode )
|
|
2638 |
{
|
|
2639 |
// set the information for the client
|
|
2640 |
*iRetAlsBlockStatus = aBlockStatus;
|
|
2641 |
}
|
|
2642 |
// reset the internal variable
|
|
2643 |
iRetAlsBlockStatus = NULL;
|
|
2644 |
// complete
|
|
2645 |
ReqCompleted( reqHandle, aErrorCode );
|
|
2646 |
}
|
|
2647 |
}
|
|
2648 |
|
|
2649 |
// ---------------------------------------------------------------------------
|
|
2650 |
// CMmCustomTsy::GetAlsBlockedCancel
|
|
2651 |
// This method cancels getting of alternative line service block status.
|
|
2652 |
// (other items were commented in a header).
|
|
2653 |
// ---------------------------------------------------------------------------
|
|
2654 |
//
|
|
2655 |
TInt CMmCustomTsy::GetAlsBlockedCancel()
|
|
2656 |
{
|
|
2657 |
// reset the pointer to client space
|
|
2658 |
iRetAlsBlockStatus = NULL;
|
|
2659 |
|
|
2660 |
// reset the req handle
|
|
2661 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2662 |
ECustomTsyGetAlsBlocked );
|
|
2663 |
|
|
2664 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
2665 |
{
|
|
2666 |
// complete with cancel
|
|
2667 |
ReqCompleted( reqHandle, KErrCancel );
|
|
2668 |
}
|
|
2669 |
|
|
2670 |
return KErrNone;
|
|
2671 |
}
|
|
2672 |
|
|
2673 |
// ---------------------------------------------------------------------------
|
|
2674 |
// CMmCustomTsy::Get3GPBInfo
|
|
2675 |
// This method gets 3G phonebook info.
|
|
2676 |
// (other items were commented in a header).
|
|
2677 |
// ---------------------------------------------------------------------------
|
|
2678 |
//
|
|
2679 |
TInt CMmCustomTsy::Get3GPBInfo(
|
|
2680 |
const TTsyReqHandle aTsyReqHandle,
|
|
2681 |
RMmCustomAPI::T3GPBInfo* aInfo )
|
|
2682 |
{
|
|
2683 |
// Fill info struct
|
|
2684 |
aInfo->iMaxLenAnr = ( TInt16 )iMmPhoneTsy->PhoneBookState()->
|
|
2685 |
iANRNumLengthMax;
|
|
2686 |
aInfo->iMaxLenEmail = ( TInt16 )iMmPhoneTsy->PhoneBookState()->
|
|
2687 |
iEmailTextLengthMax;
|
|
2688 |
aInfo->iMaxLenSne = ( TInt16 )iMmPhoneTsy->PhoneBookState()->
|
|
2689 |
iSNETextLengthMax;
|
|
2690 |
aInfo->iMaxNumAnr = ( TInt8 )iMmPhoneTsy->PhoneBookState()->
|
|
2691 |
iANRNumOfEntriesPerEntry;
|
|
2692 |
aInfo->iMaxNumEmail = ( TInt8 )iMmPhoneTsy->PhoneBookState()->
|
|
2693 |
iEmailNumOfEntriesPerEntry;
|
|
2694 |
aInfo->iMaxNumGroupName = ( TInt8 )iMmPhoneTsy->PhoneBookState()->
|
|
2695 |
iGRPNumOfEntriesPerEntry;
|
|
2696 |
aInfo->iMaxNumSne = ( TInt8 )iMmPhoneTsy->PhoneBookState()->
|
|
2697 |
iSNENumOfEntriesPerEntry;
|
|
2698 |
aInfo->iMaxLenGroupName = -1; // Not known
|
|
2699 |
|
|
2700 |
// complete with KErrNone
|
|
2701 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
2702 |
|
|
2703 |
return KErrNone;
|
|
2704 |
}
|
|
2705 |
|
|
2706 |
// ---------------------------------------------------------------------------
|
|
2707 |
// CMmCustomTsy::Get3GPBInfoCancel
|
|
2708 |
// This method cancels getting of 3G phonebook info
|
|
2709 |
// (other items were commented in a header).
|
|
2710 |
// ---------------------------------------------------------------------------
|
|
2711 |
//
|
|
2712 |
TInt CMmCustomTsy::Get3GPBInfoCancel()
|
|
2713 |
{
|
|
2714 |
// Get3GPBInfo is completed immediately after the request
|
|
2715 |
// has been done. No cancelling possible.
|
|
2716 |
return KErrNone;
|
|
2717 |
}
|
|
2718 |
|
|
2719 |
// ---------------------------------------------------------------------------
|
|
2720 |
// CMmCustomTsy::SetAlsBlockedL
|
|
2721 |
// This method sets the alternating line service (ALS) block status using the
|
|
2722 |
// aBlockStatus variable.
|
|
2723 |
// (other items were commented in a header).
|
|
2724 |
// ---------------------------------------------------------------------------
|
|
2725 |
//
|
|
2726 |
TInt CMmCustomTsy::SetAlsBlockedL(
|
|
2727 |
const TTsyReqHandle aTsyReqHandle,
|
|
2728 |
RMmCustomAPI::TSetAlsBlock* aBlockStatus )
|
|
2729 |
{
|
|
2730 |
TFLOGSTRING3( "TSY: CMmCustomTsy::SetAlsBlockedL - Req handle: %d, Block status: %d", aTsyReqHandle, *aBlockStatus );
|
|
2731 |
// get the handle
|
|
2732 |
TTsyReqHandle setAlsBlockedHandle =
|
|
2733 |
iTsyReqHandleStore->GetTsyReqHandle( ECustomTsySetAlsBlocked );
|
|
2734 |
|
|
2735 |
if ( setAlsBlockedHandle > 0 )
|
|
2736 |
{
|
|
2737 |
// The request is already in processing because of previous request
|
|
2738 |
// Complete request with status value informing the client about
|
|
2739 |
// the situation.
|
|
2740 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
2741 |
}
|
|
2742 |
else
|
|
2743 |
{
|
|
2744 |
// save pointer to aBlockStatus (used for notification)
|
|
2745 |
iSetBlockStatus = aBlockStatus;
|
|
2746 |
|
|
2747 |
// call DOS
|
|
2748 |
// packed parameter: TSetAlsBlock (block status)
|
|
2749 |
CMmDataPackage dataPackage;
|
|
2750 |
dataPackage.PackData( aBlockStatus );
|
|
2751 |
TInt ret = iMmPhoneTsy->MessageManager()->HandleRequestL(
|
|
2752 |
ECustomSetAlsBlockedIPC, &dataPackage );
|
|
2753 |
|
|
2754 |
// check success
|
|
2755 |
if ( KErrNone != ret )
|
|
2756 |
{
|
|
2757 |
ReqCompleted ( aTsyReqHandle, ret );
|
|
2758 |
}
|
|
2759 |
else
|
|
2760 |
{
|
|
2761 |
// Store the request handle
|
|
2762 |
iReqHandleType = ECustomTsySetAlsBlocked;
|
|
2763 |
}
|
|
2764 |
}
|
|
2765 |
|
|
2766 |
return KErrNone;
|
|
2767 |
}
|
|
2768 |
|
|
2769 |
// ---------------------------------------------------------------------------
|
|
2770 |
// CMmCustomTsy::CompleteSetAlsBlocked
|
|
2771 |
// Completes a SetAlsBlocked request. If value for completion is KErrNone and
|
|
2772 |
// a NotifyAlsBlockedChanged has been requested this method calls
|
|
2773 |
// CompleteNotifyAlsBlockedChanged.
|
|
2774 |
// (other items were commented in a header).
|
|
2775 |
// ---------------------------------------------------------------------------
|
|
2776 |
//
|
|
2777 |
void CMmCustomTsy::CompleteSetAlsBlocked(
|
|
2778 |
TInt aErrorCode )
|
|
2779 |
{
|
|
2780 |
TFLOGSTRING2( "TSY: CMmCustomTsy::CompleteSetAlsBlocked - Error code: %d", aErrorCode );
|
|
2781 |
// get reaq handle for NotifyAlsBlockedChanged
|
|
2782 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
2783 |
ECustomTsyNotifyAlsBlockedChanged );
|
|
2784 |
|
|
2785 |
// check if notification was requested and Set was ok
|
|
2786 |
if( ECustomTsyReqHandleUnknown != reqHandle && KErrNone == aErrorCode )
|
|
2787 |
{
|
|
2788 |
CompleteNotifyAlsBlockedChanged ();
|
|
2789 |
}
|
|
2790 |
|
|
2791 |
// reset saved pointer
|
|
2792 |
iSetBlockStatus = NULL;
|
|
2793 |
|
|
2794 |
// reset req handle. Returns the deleted req handle
|
|
2795 |
reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2796 |
ECustomTsySetAlsBlocked );
|
|
2797 |
|
|
2798 |
// check if request was called
|
|
2799 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
2800 |
{
|
|
2801 |
// complete
|
|
2802 |
ReqCompleted( reqHandle, aErrorCode );
|
|
2803 |
}
|
|
2804 |
}
|
|
2805 |
|
|
2806 |
// ---------------------------------------------------------------------------
|
|
2807 |
// CMmCustomTsy::NotifyAlsBlockedChanged
|
|
2808 |
// This method notifies a client of changed ALS blocked status.
|
|
2809 |
// (other items were commented in a header).
|
|
2810 |
// ---------------------------------------------------------------------------
|
|
2811 |
//
|
|
2812 |
TInt CMmCustomTsy::NotifyAlsBlockedChanged(
|
|
2813 |
RMmCustomAPI::TGetAlsBlockStatus* aBlockStatus )
|
|
2814 |
{
|
|
2815 |
// save pointer to client data
|
|
2816 |
iRetNotifyAlsBlockStatus = aBlockStatus;
|
|
2817 |
|
|
2818 |
// save handle type
|
|
2819 |
iReqHandleType = ECustomTsyNotifyAlsBlockedChanged;
|
|
2820 |
|
|
2821 |
return KErrNone;
|
|
2822 |
}
|
|
2823 |
|
|
2824 |
// ---------------------------------------------------------------------------
|
|
2825 |
// CMmCustomTsy::CompleteNotifyAlsBlockedChanged
|
|
2826 |
// This method notifies a client of changed ALS blocked status.
|
|
2827 |
// (other items were commented in a header).
|
|
2828 |
// ---------------------------------------------------------------------------
|
|
2829 |
//
|
|
2830 |
void CMmCustomTsy::CompleteNotifyAlsBlockedChanged()
|
|
2831 |
{
|
|
2832 |
// reset req handle. Returns the deleted req handle
|
|
2833 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2834 |
ECustomTsyNotifyAlsBlockedChanged );
|
|
2835 |
|
|
2836 |
// check if handle exists
|
|
2837 |
if ( ECustomTsyReqHandleUnknown != reqHandle && iSetBlockStatus)
|
|
2838 |
{
|
|
2839 |
// set the information for the client
|
|
2840 |
#ifndef USING_CTSY_DISPATCHER
|
|
2841 |
if ( RMmCustomAPI::EActivateBlock == *iSetBlockStatus )
|
|
2842 |
#else //USING_CTSY_DISPATCHER
|
|
2843 |
if ( iSetBlockStatus && RMmCustomAPI::EActivateBlock == *iSetBlockStatus )
|
|
2844 |
#endif //USING_CTSY_DISPATCHER
|
|
2845 |
{
|
|
2846 |
*iRetNotifyAlsBlockStatus = RMmCustomAPI::EBlockStatusActive;
|
|
2847 |
}
|
|
2848 |
else // EDeactivateBlock == *iSetBlockStatus
|
|
2849 |
{
|
|
2850 |
*iRetNotifyAlsBlockStatus = RMmCustomAPI::EBlockStatusInactive;
|
|
2851 |
}
|
|
2852 |
TFLOGSTRING2( "TSY: CMmCustomTsy::CompleteNotifyAlsBlockedChanged - Block status: %d", *iSetBlockStatus );
|
|
2853 |
|
|
2854 |
// reset the varible
|
|
2855 |
iRetNotifyAlsBlockStatus = NULL;
|
|
2856 |
|
|
2857 |
// complete
|
|
2858 |
ReqCompleted( reqHandle, KErrNone );
|
|
2859 |
}
|
|
2860 |
}
|
|
2861 |
|
|
2862 |
// ---------------------------------------------------------------------------
|
|
2863 |
// CMmCustomTsy::NotifyAlsBlockedChangedCancel
|
|
2864 |
// Cancels an outstanding NotifyAlsBlockedChanged notification.
|
|
2865 |
// (other items were commented in a header).
|
|
2866 |
// ---------------------------------------------------------------------------
|
|
2867 |
//
|
|
2868 |
TInt CMmCustomTsy::NotifyAlsBlockedChangedCancel(
|
|
2869 |
const TTsyReqHandle aTsyReqHandle )
|
|
2870 |
{
|
|
2871 |
// reset the pointer to client data
|
|
2872 |
iRetNotifyAlsBlockStatus = NULL;
|
|
2873 |
|
|
2874 |
// reset the reqhandle
|
|
2875 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2876 |
ECustomTsyNotifyAlsBlockedChanged );
|
|
2877 |
|
|
2878 |
// complete
|
|
2879 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
2880 |
|
|
2881 |
return KErrNone;
|
|
2882 |
}
|
|
2883 |
|
|
2884 |
// ---------------------------------------------------------------------------
|
|
2885 |
// CMmCustomTsy::GetAlsPpSupportL
|
|
2886 |
// Gets ALS support information from Product Profile.
|
|
2887 |
// (other items were commented in a header).
|
|
2888 |
// ---------------------------------------------------------------------------
|
|
2889 |
//
|
|
2890 |
TInt CMmCustomTsy::GetAlsPpSupportL(
|
|
2891 |
const TTsyReqHandle aTsyReqHandle,
|
|
2892 |
RMmCustomAPI::TAlsSupport* aSupport )
|
|
2893 |
{
|
|
2894 |
TFLOGSTRING( "TSY: CMmCustomTsy::GetAlsPpSupportL");
|
|
2895 |
// save pointer to client space
|
|
2896 |
iAlsSupport = aSupport;
|
|
2897 |
|
|
2898 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
2899 |
ECustomTsyGetAlsPpSupport );
|
|
2900 |
|
|
2901 |
if ( 0 < reqHandle )
|
|
2902 |
{
|
|
2903 |
TFLOGSTRING( "TSY: CMmCustomTsy::GetAlsPpSupportL - Already processing, save handle");
|
|
2904 |
//The request is already in processing because of previous request
|
|
2905 |
//Complete request with status value informing the client about
|
|
2906 |
TCheckAlsPpSupportRequest* req =
|
|
2907 |
new (ELeave) TCheckAlsPpSupportRequest();
|
|
2908 |
req->iReqHandle = aTsyReqHandle;
|
|
2909 |
req->iRetSupport = aSupport;
|
|
2910 |
iCheckAlsPpSupportRequests.AppendL( req );
|
|
2911 |
}
|
|
2912 |
else
|
|
2913 |
{
|
|
2914 |
// call DOS (no packed parameters)
|
|
2915 |
TInt ret = Phone()->MessageManager()->HandleRequestL(
|
|
2916 |
ECustomCheckAlsPpSupportIPC );
|
|
2917 |
|
|
2918 |
if ( KErrNone != ret )
|
|
2919 |
{
|
|
2920 |
ReqCompleted( aTsyReqHandle, ret );
|
|
2921 |
}
|
|
2922 |
else
|
|
2923 |
{
|
|
2924 |
TFLOGSTRING( "TSY: CMmCustomTsy::GetAlsPpSupportL - Save handle");
|
|
2925 |
// Save the req handle type
|
|
2926 |
iReqHandleType = ECustomTsyGetAlsPpSupport;
|
|
2927 |
// save request in queue for completion
|
|
2928 |
TCheckAlsPpSupportRequest* req =
|
|
2929 |
new (ELeave) TCheckAlsPpSupportRequest();
|
|
2930 |
req->iReqHandle = aTsyReqHandle;
|
|
2931 |
req->iRetSupport = aSupport;
|
|
2932 |
iCheckAlsPpSupportRequests.AppendL( req );
|
|
2933 |
}
|
|
2934 |
}
|
|
2935 |
|
|
2936 |
return KErrNone;
|
|
2937 |
}
|
|
2938 |
|
|
2939 |
// ---------------------------------------------------------------------------
|
|
2940 |
// CMmCustomTsy::GetAlsPpSupportCancel
|
|
2941 |
// Cancels an outstanding asynchronous request to get ALS support.
|
|
2942 |
// (other items were commented in a header).
|
|
2943 |
// ---------------------------------------------------------------------------
|
|
2944 |
//
|
|
2945 |
TInt CMmCustomTsy::GetAlsPpSupportCancel()
|
|
2946 |
{
|
|
2947 |
TFLOGSTRING( "TSY: CMmCustomTsy::GetAlsPpSupportCancel");
|
|
2948 |
// reset the pointer to client data
|
|
2949 |
iAlsSupport = NULL;
|
|
2950 |
|
|
2951 |
// reset the reqhandle
|
|
2952 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2953 |
ECustomTsyGetAlsPpSupport );
|
|
2954 |
|
|
2955 |
// complete
|
|
2956 |
TInt checkAlsPpSupportRequestsCount =
|
|
2957 |
iCheckAlsPpSupportRequests.Count();
|
|
2958 |
TFLOGSTRING2( "TSY: CMmCustomTsy::GetAlsPpSupportCancel - Cancel %d requests", checkAlsPpSupportRequestsCount );
|
|
2959 |
|
|
2960 |
for ( TInt i=0; i < checkAlsPpSupportRequestsCount ; i++ )
|
|
2961 |
{
|
|
2962 |
TCheckAlsPpSupportRequest* req =
|
|
2963 |
iCheckAlsPpSupportRequests[ i ];
|
|
2964 |
//reset the return pointer
|
|
2965 |
ReqCompleted( req->iReqHandle, KErrCancel );
|
|
2966 |
}
|
|
2967 |
// Complete the client request
|
|
2968 |
// Destroy Array
|
|
2969 |
iCheckAlsPpSupportRequests.ResetAndDestroy();
|
|
2970 |
|
|
2971 |
return KErrNone;
|
|
2972 |
}
|
|
2973 |
|
|
2974 |
// ---------------------------------------------------------------------------
|
|
2975 |
// CMmCustomTsy::CompleteGetAlsPpSupport
|
|
2976 |
// Completes a GetAlsPpSupport request.
|
|
2977 |
// (other items were commented in a header).
|
|
2978 |
// ---------------------------------------------------------------------------
|
|
2979 |
//
|
|
2980 |
void CMmCustomTsy::CompleteGetAlsPpSupport(
|
|
2981 |
RMmCustomAPI::TAlsSupport aAlsSupport,
|
|
2982 |
TInt aErrorCode )
|
|
2983 |
{
|
|
2984 |
TFLOGSTRING3( "TSY: CMmCustomTsy::CompleteGetAlsPpSupport - ALS support: %d, Error: %d", aAlsSupport, aErrorCode );
|
|
2985 |
TBool status = EFalse;
|
|
2986 |
|
|
2987 |
// Check if the get was called internally during boot
|
|
2988 |
if( iMmPhoneTsy->GetAlsQueryInBoot() )
|
|
2989 |
{
|
|
2990 |
if( RMmCustomAPI::EAlsSupportOn == aAlsSupport )
|
|
2991 |
{
|
|
2992 |
TFLOGSTRING( "TSY: CMmCustomTsy::CompleteGetAlsPpSupport - ALS supported by SIM" );
|
|
2993 |
status = ETrue;
|
|
2994 |
}
|
|
2995 |
//Update ALS status from sim
|
|
2996 |
iMmPhoneTsy->SetAlsState( status );
|
|
2997 |
iMmPhoneTsy->SetAlsQueryInBoot( EFalse );
|
|
2998 |
}
|
|
2999 |
|
|
3000 |
// reset req handle. Returns the deleted req handle
|
|
3001 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3002 |
ECustomTsyGetAlsPpSupport );
|
|
3003 |
|
|
3004 |
// check if request was called
|
|
3005 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
3006 |
{
|
|
3007 |
// check if response was ok
|
|
3008 |
if ( KErrNone == aErrorCode )
|
|
3009 |
{
|
|
3010 |
// set the information for the client
|
|
3011 |
*iAlsSupport = aAlsSupport;
|
|
3012 |
|
|
3013 |
if( RMmCustomAPI::EAlsSupportOn == aAlsSupport )
|
|
3014 |
{
|
|
3015 |
TFLOGSTRING( "TSY: CMmCustomTsy::CompleteGetAlsPpSupport - ALS supported by SIM" );
|
|
3016 |
status = ETrue;
|
|
3017 |
}
|
|
3018 |
//Update ALS status from sim
|
|
3019 |
iMmPhoneTsy->SetAlsState( status );
|
|
3020 |
}
|
|
3021 |
|
|
3022 |
// reset the internal variable
|
|
3023 |
iAlsSupport = NULL;
|
|
3024 |
// complete
|
|
3025 |
TInt checkAlsPpSupportRequestsCount =
|
|
3026 |
iCheckAlsPpSupportRequests.Count();
|
|
3027 |
TFLOGSTRING2( "TSY: CMmCustomTsy::CompleteGetAlsPpSupport - Complete %d requests", checkAlsPpSupportRequestsCount );
|
|
3028 |
|
|
3029 |
for ( TInt i=0; i < checkAlsPpSupportRequestsCount ; i++ )
|
|
3030 |
{
|
|
3031 |
TCheckAlsPpSupportRequest* req =
|
|
3032 |
iCheckAlsPpSupportRequests[ i ];
|
|
3033 |
|
|
3034 |
//set value in client side
|
|
3035 |
*(req->iRetSupport) = aAlsSupport;
|
|
3036 |
//reset the return pointer
|
|
3037 |
ReqCompleted( req->iReqHandle, aErrorCode );
|
|
3038 |
}
|
|
3039 |
// Complete the client request
|
|
3040 |
//Destroy Array
|
|
3041 |
iCheckAlsPpSupportRequests.ResetAndDestroy();
|
|
3042 |
}
|
|
3043 |
}
|
|
3044 |
|
|
3045 |
// ---------------------------------------------------------------------------
|
|
3046 |
// CMmCustomTsy::GetCipheringInfoL
|
|
3047 |
// Get Ciphering Info
|
|
3048 |
// (other items were commented in a header).
|
|
3049 |
// ---------------------------------------------------------------------------
|
|
3050 |
//
|
|
3051 |
TInt CMmCustomTsy::GetCipheringInfoL(
|
|
3052 |
const TTsyReqHandle aTsyReqHandle,
|
|
3053 |
RMmCustomAPI::TCipheringInfo* aInfo )
|
|
3054 |
{
|
|
3055 |
// this is special case, only called when Ciphering indicator
|
|
3056 |
// is forced off for some operators
|
|
3057 |
if ( iMmPhoneTsy->GetNetTsy()->CipheringIndicatorForcedOff() )
|
|
3058 |
{
|
|
3059 |
aInfo->iIndStatus = EFalse;
|
|
3060 |
aInfo->iCiphStatus = EFalse;
|
|
3061 |
|
|
3062 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
3063 |
}
|
|
3064 |
// normal case
|
|
3065 |
else
|
|
3066 |
{
|
|
3067 |
TTsyReqHandle getCipheringInfoHandle =
|
|
3068 |
iTsyReqHandleStore->GetTsyReqHandle( ECustomTsyGetCipheringInfo );
|
|
3069 |
|
|
3070 |
if ( 0 < getCipheringInfoHandle )
|
|
3071 |
{
|
|
3072 |
// The request is already in processing because of previous request
|
|
3073 |
// Complete request with status value informing the client about
|
|
3074 |
// the situation.
|
|
3075 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
3076 |
}
|
|
3077 |
else
|
|
3078 |
{
|
|
3079 |
// save pointer to client space
|
|
3080 |
iRetCipheringInfo = aInfo;
|
|
3081 |
|
|
3082 |
// call DOS (no packed parameters)
|
|
3083 |
TInt ret = Phone()->MessageManager()->HandleRequestL(
|
|
3084 |
ECustomGetCipheringInfoIPC );
|
|
3085 |
|
|
3086 |
// check the correct completion of the call to the extension
|
|
3087 |
if ( KErrNone != ret )
|
|
3088 |
{
|
|
3089 |
ReqCompleted( aTsyReqHandle, ret );
|
|
3090 |
}
|
|
3091 |
else
|
|
3092 |
{
|
|
3093 |
// Save the req handle type
|
|
3094 |
iReqHandleType = ECustomTsyGetCipheringInfo;
|
|
3095 |
}
|
|
3096 |
}
|
|
3097 |
}
|
|
3098 |
|
|
3099 |
return KErrNone;
|
|
3100 |
}
|
|
3101 |
|
|
3102 |
// ---------------------------------------------------------------------------
|
|
3103 |
// CMmCustomTsy::CompleteGetCipheringInfo
|
|
3104 |
// Completes a GetCipheringInfo request.
|
|
3105 |
// (other items were commented in a header).
|
|
3106 |
// ---------------------------------------------------------------------------
|
|
3107 |
//
|
|
3108 |
void CMmCustomTsy::CompleteGetCipheringInfo(
|
|
3109 |
TBool aCipherIndStatus,
|
|
3110 |
TInt aErrorCode )
|
|
3111 |
{
|
|
3112 |
// reset req handle. Returns the deleted req handle
|
|
3113 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3114 |
ECustomTsyGetCipheringInfo );
|
|
3115 |
|
|
3116 |
// check if request was called
|
|
3117 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
3118 |
{
|
|
3119 |
// check if response was ok
|
|
3120 |
if ( KErrNone == aErrorCode )
|
|
3121 |
{
|
|
3122 |
// set the information for the client
|
|
3123 |
iRetCipheringInfo->iIndStatus = aCipherIndStatus;
|
|
3124 |
iRetCipheringInfo->iCiphStatus = iCipheringInfo.iCiphStatus;
|
|
3125 |
}
|
|
3126 |
|
|
3127 |
// reset the internal variable
|
|
3128 |
iRetCipheringInfo = NULL;
|
|
3129 |
// complete
|
|
3130 |
ReqCompleted( reqHandle, aErrorCode );
|
|
3131 |
}
|
|
3132 |
}
|
|
3133 |
|
|
3134 |
// ---------------------------------------------------------------------------
|
|
3135 |
// CMmCustomTsy::GetCipheringInfoCancel
|
|
3136 |
// This function cancels an outstanding GetCipheringInfo request.
|
|
3137 |
// (other items were commented in a header).
|
|
3138 |
// ---------------------------------------------------------------------------
|
|
3139 |
//
|
|
3140 |
TInt CMmCustomTsy::GetCipheringInfoCancel()
|
|
3141 |
{
|
|
3142 |
// reset the pointer to client space
|
|
3143 |
iRetCipheringInfo = NULL;
|
|
3144 |
|
|
3145 |
// reset the req handle
|
|
3146 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3147 |
ECustomTsyGetCipheringInfo );
|
|
3148 |
|
|
3149 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
3150 |
{
|
|
3151 |
// complete with cancel
|
|
3152 |
ReqCompleted( reqHandle, KErrCancel );
|
|
3153 |
}
|
|
3154 |
|
|
3155 |
return KErrNone;
|
|
3156 |
}
|
|
3157 |
|
|
3158 |
// ---------------------------------------------------------------------------
|
|
3159 |
// CMmCustomTsy::NotifyCipheringInfoChange
|
|
3160 |
// Notifies a client of ciphering info change.
|
|
3161 |
// (other items were commented in a header).
|
|
3162 |
// ---------------------------------------------------------------------------
|
|
3163 |
//
|
|
3164 |
TInt CMmCustomTsy::NotifyCipheringInfoChange(
|
|
3165 |
RMmCustomAPI::TCipheringInfo* aInfo )
|
|
3166 |
{
|
|
3167 |
// save pointer to client data
|
|
3168 |
iRetNotifyCipheringInfoChange = aInfo;
|
|
3169 |
|
|
3170 |
// set the reqhandle type
|
|
3171 |
iReqHandleType = ECustomTsyNotifyCipheringInfoChange;
|
|
3172 |
|
|
3173 |
return KErrNone;
|
|
3174 |
}
|
|
3175 |
|
|
3176 |
// ---------------------------------------------------------------------------
|
|
3177 |
// CMmCustomTsy::NotifyCipheringInfoChangeCancel
|
|
3178 |
// Cancels an outstanding NotifyCipheringInfoChange request.
|
|
3179 |
// (other items were commented in a header).
|
|
3180 |
// ---------------------------------------------------------------------------
|
|
3181 |
//
|
|
3182 |
TInt CMmCustomTsy::NotifyCipheringInfoChangeCancel(
|
|
3183 |
const TTsyReqHandle aTsyReqHandle )
|
|
3184 |
{
|
|
3185 |
// reset the pointer to client data
|
|
3186 |
iRetNotifyCipheringInfoChange = NULL;
|
|
3187 |
|
|
3188 |
// reset the reqhandle
|
|
3189 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3190 |
ECustomTsyNotifyCipheringInfoChange );
|
|
3191 |
|
|
3192 |
// complete
|
|
3193 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
3194 |
|
|
3195 |
return KErrNone;
|
|
3196 |
}
|
|
3197 |
|
|
3198 |
// ---------------------------------------------------------------------------
|
|
3199 |
// CMmCustomTsy::CompleteNotifyCipheringInfoChange
|
|
3200 |
// Completes the NotifyCipheringInfoChange method.
|
|
3201 |
// (other items were commented in a header).
|
|
3202 |
// ---------------------------------------------------------------------------
|
|
3203 |
//
|
|
3204 |
void CMmCustomTsy::CompleteNotifyCipheringInfoChange(
|
|
3205 |
TBool aCipherIndStatus,
|
|
3206 |
TBool aCipherStatus,
|
|
3207 |
TInt aErrorCode )
|
|
3208 |
{
|
|
3209 |
TFLOGSTRING("TSY:CMmCustomTsy::CompleteNotifyCipheringInfoChange entered");
|
|
3210 |
// this is special case, only called when Ciphering indicator
|
|
3211 |
// is forced off for some operators
|
|
3212 |
if ( iMmPhoneTsy->GetNetTsy()->CipheringIndicatorForcedOff() )
|
|
3213 |
{
|
|
3214 |
TFLOGSTRING("TSY:CMmCustomTsy::CompleteNotifyCipheringInfoChange: Ciphering forced off");
|
|
3215 |
TTsyReqHandle handle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3216 |
ECustomTsyNotifyCipheringInfoChange );
|
|
3217 |
|
|
3218 |
if ( ECustomTsyReqHandleUnknown != handle )
|
|
3219 |
{
|
|
3220 |
TFLOGSTRING("TSY:CMmCustomTsy::CompleteNotifyCipheringInfoChange: Ciphering forced off, request completed");
|
|
3221 |
iRetNotifyCipheringInfoChange->iIndStatus = EFalse;
|
|
3222 |
iRetNotifyCipheringInfoChange->iCiphStatus = ETrue;
|
|
3223 |
|
|
3224 |
iRetNotifyCipheringInfoChange = NULL;
|
|
3225 |
|
|
3226 |
ReqCompleted( handle, KErrNone );
|
|
3227 |
}
|
|
3228 |
}
|
|
3229 |
|
|
3230 |
// check if information has changed, continue only in case is changed
|
|
3231 |
else
|
|
3232 |
{
|
|
3233 |
if ( iCipheringInfo.iIndStatus != aCipherIndStatus ||
|
|
3234 |
iCipheringInfo.iCiphStatus != aCipherStatus )
|
|
3235 |
{
|
|
3236 |
// save the information in the custom TSY
|
|
3237 |
iCipheringInfo.iIndStatus = aCipherIndStatus;
|
|
3238 |
iCipheringInfo.iCiphStatus = aCipherStatus;
|
|
3239 |
|
|
3240 |
// reset req handle. Returns the deleted req handle
|
|
3241 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3242 |
ECustomTsyNotifyCipheringInfoChange );
|
|
3243 |
|
|
3244 |
// check if handle exists
|
|
3245 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
3246 |
{
|
|
3247 |
// set the information for the client
|
|
3248 |
iRetNotifyCipheringInfoChange->iIndStatus =
|
|
3249 |
iCipheringInfo.iIndStatus;
|
|
3250 |
iRetNotifyCipheringInfoChange->iCiphStatus =
|
|
3251 |
iCipheringInfo.iCiphStatus;
|
|
3252 |
|
|
3253 |
// reset the varible
|
|
3254 |
iRetNotifyCipheringInfoChange = NULL;
|
|
3255 |
|
|
3256 |
// complete
|
|
3257 |
ReqCompleted( reqHandle, aErrorCode );
|
|
3258 |
|
|
3259 |
}
|
|
3260 |
}
|
|
3261 |
}
|
|
3262 |
}
|
|
3263 |
|
|
3264 |
// ---------------------------------------------------------------------------
|
|
3265 |
// CMmCustomTsy::NotifyNSPSStatus
|
|
3266 |
// Notifies a client of a change in NSPS (No Service Power Save) status.
|
|
3267 |
// (other items were commented in a header).
|
|
3268 |
// ---------------------------------------------------------------------------
|
|
3269 |
//
|
|
3270 |
TInt CMmCustomTsy::NotifyNSPSStatus(
|
|
3271 |
RMmCustomAPI::TNspsStatus* aNspsStatus )
|
|
3272 |
{
|
|
3273 |
// save pointer to client data
|
|
3274 |
iRetNspsStatus = aNspsStatus;
|
|
3275 |
|
|
3276 |
// set the reqhandle type
|
|
3277 |
iReqHandleType = ECustomTsyNotifyNSPSStatus;
|
|
3278 |
|
|
3279 |
return KErrNone;
|
|
3280 |
}
|
|
3281 |
|
|
3282 |
// ---------------------------------------------------------------------------
|
|
3283 |
// CMmCustomTsy::CompleteNotifyNSPSStatus
|
|
3284 |
// Completes the notification of a change in NSPS (No Service Power Save)
|
|
3285 |
// status.
|
|
3286 |
// (other items were commented in a header).
|
|
3287 |
// ---------------------------------------------------------------------------
|
|
3288 |
//
|
|
3289 |
void CMmCustomTsy::CompleteNotifyNSPSStatus(
|
|
3290 |
TBool aNspsStatus )
|
|
3291 |
{
|
|
3292 |
// reset req handle. Returns the deleted req handle
|
|
3293 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3294 |
ECustomTsyNotifyNSPSStatus );
|
|
3295 |
|
|
3296 |
// check if handle exists
|
|
3297 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
3298 |
{
|
|
3299 |
// set the information for the client
|
|
3300 |
if ( aNspsStatus ) // the NSPS mode is ON
|
|
3301 |
{
|
|
3302 |
*iRetNspsStatus = RMmCustomAPI::ENspsOn;
|
|
3303 |
}
|
|
3304 |
else
|
|
3305 |
{
|
|
3306 |
*iRetNspsStatus = RMmCustomAPI::ENspsOff;
|
|
3307 |
}
|
|
3308 |
|
|
3309 |
// reset the varible
|
|
3310 |
iRetNspsStatus = NULL;
|
|
3311 |
|
|
3312 |
// complete
|
|
3313 |
ReqCompleted( reqHandle, KErrNone );
|
|
3314 |
}
|
|
3315 |
}
|
|
3316 |
|
|
3317 |
// ---------------------------------------------------------------------------
|
|
3318 |
// CMmCustomTsy::NotifyNSPSStatusCancel
|
|
3319 |
// Cancels an outstanding notification of a change in NSPS (No Service Power
|
|
3320 |
// Save) status.
|
|
3321 |
// (other items were commented in a header).
|
|
3322 |
// ---------------------------------------------------------------------------
|
|
3323 |
//
|
|
3324 |
TInt CMmCustomTsy::NotifyNSPSStatusCancel(
|
|
3325 |
const TTsyReqHandle aTsyReqHandle )
|
|
3326 |
{
|
|
3327 |
// reset pointer to client data
|
|
3328 |
iRetNspsStatus = NULL;
|
|
3329 |
|
|
3330 |
// reset reqhandle
|
|
3331 |
iTsyReqHandleStore->ResetTsyReqHandle( ECustomTsyNotifyNSPSStatus );
|
|
3332 |
|
|
3333 |
// complete with KErrCancel
|
|
3334 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
3335 |
|
|
3336 |
return KErrNone;
|
|
3337 |
}
|
|
3338 |
|
|
3339 |
// ---------------------------------------------------------------------------
|
|
3340 |
// CMmCustomTsy::NetWakeupL
|
|
3341 |
// Send NetWakeUp request
|
|
3342 |
// (other items were commented in a header).
|
|
3343 |
// ---------------------------------------------------------------------------
|
|
3344 |
//
|
|
3345 |
TInt CMmCustomTsy::NetWakeupL(
|
|
3346 |
const TTsyReqHandle aTsyReqHandle )
|
|
3347 |
{
|
|
3348 |
// intialize ret value
|
|
3349 |
TInt ret ( KErrNone );
|
|
3350 |
|
|
3351 |
// call DOS (no packed parameters)
|
|
3352 |
ret = Phone()->MessageManager()->HandleRequestL( ECustomNetWakeupIPC );
|
|
3353 |
|
|
3354 |
// check result
|
|
3355 |
if ( KErrNone != ret )
|
|
3356 |
{
|
|
3357 |
ReqCompleted( aTsyReqHandle, ret );
|
|
3358 |
}
|
|
3359 |
else
|
|
3360 |
{
|
|
3361 |
// Save the req handle type
|
|
3362 |
iReqHandleType = ECustomTsyNetWakeup;
|
|
3363 |
}
|
|
3364 |
|
|
3365 |
return KErrNone;
|
|
3366 |
}
|
|
3367 |
|
|
3368 |
// ---------------------------------------------------------------------------
|
|
3369 |
// CMmCustomTsy::CompleteNetWakeup
|
|
3370 |
// Completes a NetWakeup request.
|
|
3371 |
// (other items were commented in a header).
|
|
3372 |
// ---------------------------------------------------------------------------
|
|
3373 |
//
|
|
3374 |
void CMmCustomTsy::CompleteNetWakeup(
|
|
3375 |
TInt aErrorCode )
|
|
3376 |
{
|
|
3377 |
// reset req handle. Returns the deleted req handle
|
|
3378 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3379 |
ECustomTsyNetWakeup );
|
|
3380 |
|
|
3381 |
// check the handle and complete
|
|
3382 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
3383 |
{
|
|
3384 |
ReqCompleted( reqHandle, aErrorCode );
|
|
3385 |
}
|
|
3386 |
}
|
|
3387 |
|
|
3388 |
#ifdef REQHANDLE_TIMER
|
|
3389 |
// ---------------------------------------------------------------------------
|
|
3390 |
// CMmCustomTsy::SetTypeOfResponse
|
|
3391 |
// Sets the type of response for a given handle.
|
|
3392 |
// Automatic mode includes an automatic response in case of no response from
|
|
3393 |
// the DOS in a specified time.
|
|
3394 |
// (other items were commented in a header).
|
|
3395 |
// ---------------------------------------------------------------------------
|
|
3396 |
//
|
|
3397 |
void CMmCustomTsy::SetTypeOfResponse(
|
|
3398 |
const TInt aReqHandleType,
|
|
3399 |
const TTsyReqHandle aTsyReqHandle )
|
|
3400 |
{
|
|
3401 |
TInt timeOut( 0 );
|
|
3402 |
TInt ipc( 0 );
|
|
3403 |
|
|
3404 |
switch ( aReqHandleType )
|
|
3405 |
{
|
|
3406 |
case ECustomTsyCallGsmBlackListClear:
|
|
3407 |
timeOut = KMmCustomCallGsmBlackListClearTimeOut;
|
|
3408 |
ipc = ECustomClearCallBlackListIPC;
|
|
3409 |
break;
|
|
3410 |
case ECustomTsyTerminateCall:
|
|
3411 |
timeOut = KMmCustomTerminateCallTimeOut;
|
|
3412 |
ipc = ECustomTerminateCallIPC;
|
|
3413 |
break;
|
|
3414 |
case ECustomTsyGetAlsBlocked:
|
|
3415 |
timeOut = KMmCustomGetAlsBlockedTimeOut;
|
|
3416 |
ipc = ECustomGetAlsBlockedIPC;
|
|
3417 |
break;
|
|
3418 |
case ECustomTsySetAlsBlocked:
|
|
3419 |
timeOut = KMmCustomSetAlsBlockedTimeOut;
|
|
3420 |
ipc = ECustomSetAlsBlockedIPC;
|
|
3421 |
break;
|
|
3422 |
case ECustomTsyGetCipheringInfo:
|
|
3423 |
timeOut = KMmCustomGetCipheringInfoTimeOut;
|
|
3424 |
ipc = ECustomGetCipheringInfoIPC;
|
|
3425 |
break;
|
|
3426 |
case ECustomTsyCheckEmergencyNumber:
|
|
3427 |
timeOut = KMmCustomCheckEmergencyNumberTimeout;
|
|
3428 |
ipc = ECustomCheckEmergencyNumberIPC;
|
|
3429 |
break;
|
|
3430 |
case ECustomTsyGetNetworkOperatorName:
|
|
3431 |
timeOut = KMmCustomGetNetworkOperatorNameTimeout;
|
|
3432 |
ipc = ECustomGetNetworkProviderNameIPC;
|
|
3433 |
break;
|
|
3434 |
case ECustomTsyCheckTwoDigitDialSupport:
|
|
3435 |
timeOut = KMmCustomCheckTwoDigitDialTimeout;
|
|
3436 |
ipc = ECustomCheckTwoDigitDialSupportIPC;
|
|
3437 |
break;
|
|
3438 |
case ECustomTsyGetOperatorName:
|
|
3439 |
timeOut = KMmCustomGetOperatorNameTimeout;
|
|
3440 |
ipc = ECustomGetOperatorNameIPC;
|
|
3441 |
break;
|
|
3442 |
case ECustomTsyGetProgrammableOperatorLogo:
|
|
3443 |
timeOut = KMmCustomGetProgrammableOperatorLogoTimeout;
|
|
3444 |
ipc = ECustomGetProgrammableOperatorLogoIPC;
|
|
3445 |
break;
|
|
3446 |
case ECustomTsyResetNetServer:
|
|
3447 |
timeOut = KMmCustomResetNetServer;
|
|
3448 |
ipc = ECustomResetNetServerIPC;
|
|
3449 |
break;
|
|
3450 |
case ECustomTsyGetSimFileInfo:
|
|
3451 |
timeOut = KMmCustomReadSimFile;
|
|
3452 |
ipc = ECustomReadSimFileIPC;
|
|
3453 |
break;
|
|
3454 |
case ECustomTsyGetLifeTimerInfo:
|
|
3455 |
timeOut = KMmCustomReadSimFile;
|
|
3456 |
ipc = ECustomGetLifeTimeIPC;
|
|
3457 |
break;
|
|
3458 |
case ECustomTsyIMSAuthenticate:
|
|
3459 |
timeOut = KMmCustomIMSAuthenticate;
|
|
3460 |
ipc = EMobilePhoneIMSAuthenticate;
|
|
3461 |
break;
|
|
3462 |
case ECustomTsyGetSimAuthenticationData:
|
|
3463 |
timeOut = KMmCustomGetSimAuthenticationData;
|
|
3464 |
ipc = ECustomGetSimAuthenticationDataIPC;
|
|
3465 |
break;
|
|
3466 |
case ECustomTsySetDriveMode:
|
|
3467 |
timeOut = KMmCustomSetDriveModeTimeOut;
|
|
3468 |
ipc = ECustomSetDriveModeIPC;
|
|
3469 |
break;
|
|
3470 |
case ECustomTsyReadHSxPAStatus:
|
|
3471 |
timeOut = KMmCustomTsyReadHSxPAStatusTimeOut;
|
|
3472 |
ipc = ECustomReadHSxPAStatusIPC;
|
|
3473 |
break;
|
|
3474 |
case ECustomTsyWriteHSxPAStatus:
|
|
3475 |
timeOut = KMmCustomTsyWriteHSxPAStatusTimeOut;
|
|
3476 |
ipc = ECustomWriteHSxPAStatusIPC;
|
|
3477 |
break;
|
|
3478 |
case ECustomTsyGetIccCallForwardingStatus:
|
|
3479 |
timeOut = KMmCustomTsyGetIccCallForwardingStatusTimeOut;
|
|
3480 |
ipc = ECustomGetIccCallForwardingStatusIPC;
|
|
3481 |
break;
|
|
3482 |
case ECustomTsyGetCellInfo:
|
|
3483 |
timeOut = KMmCustomTsyGetCellInfoTimeOut;
|
|
3484 |
ipc = ECustomGetCellInfoIPC;
|
|
3485 |
break;
|
|
3486 |
case ECustomTsyGetUSIMServiceSupport:
|
|
3487 |
timeOut = KMmCustomGetUSIMServiceSupportTimeOut;
|
|
3488 |
ipc = ECustomGetServiceTableSupportbyApplicationIPC;
|
|
3489 |
break;
|
|
3490 |
case ECustomTsyGetSystemNetworkBand:
|
|
3491 |
timeOut = KMmCustomTsyGetSystemNetworkBandTimeOut;
|
|
3492 |
ipc = ECustomGetBandSelectionIPC;
|
|
3493 |
break;
|
|
3494 |
default:
|
|
3495 |
// Does not use timer
|
|
3496 |
iTsyReqHandleStore->SetTsyReqHandle( aReqHandleType,
|
|
3497 |
aTsyReqHandle );
|
|
3498 |
break;
|
|
3499 |
}
|
|
3500 |
|
|
3501 |
if ( 0 < timeOut )
|
|
3502 |
{
|
|
3503 |
// The timeout parameter is given in seconds.
|
|
3504 |
iTsyReqHandleStore->SetTsyReqHandle( aReqHandleType, aTsyReqHandle,
|
|
3505 |
timeOut, ipc );
|
|
3506 |
}
|
|
3507 |
}
|
|
3508 |
|
|
3509 |
// ---------------------------------------------------------------------------
|
|
3510 |
// CMmCustomTsy::Complete
|
|
3511 |
// Completes the request due the timer expiration.
|
|
3512 |
// (other items were commented in a header).
|
|
3513 |
// ---------------------------------------------------------------------------
|
|
3514 |
//
|
|
3515 |
void CMmCustomTsy::Complete(
|
|
3516 |
TInt aReqHandleType,
|
|
3517 |
TInt aError,
|
|
3518 |
TInt aIPC )
|
|
3519 |
{
|
|
3520 |
TFLOGSTRING3( "TSY: CMmCustomTsy::Complete - ReqHandleType: %d Error: %d", aReqHandleType, aError );
|
|
3521 |
TBool subTsyReqFound = EFalse;
|
|
3522 |
TInt max = GetMaxNumberOfSubsystems();
|
|
3523 |
CMmSubTsyBase** subTsyPtr = GetSubsystemArrayPtr();
|
|
3524 |
|
|
3525 |
// Check Custom TSY's subsystems' req handles first
|
|
3526 |
for ( TInt i = 0; max > i; i++ )
|
|
3527 |
{
|
|
3528 |
// check which custom object handles this IPC
|
|
3529 |
if ( ( NULL != subTsyPtr[i] ) &&
|
|
3530 |
( EFalse != subTsyPtr[i]->SupportingIPC( aIPC ) ) )
|
|
3531 |
{
|
|
3532 |
// call complete method of the right custom object
|
|
3533 |
subTsyPtr[i]->Complete( aReqHandleType, aError );
|
|
3534 |
i = max;
|
|
3535 |
subTsyReqFound = ETrue;
|
|
3536 |
}
|
|
3537 |
}
|
|
3538 |
|
|
3539 |
// If the reg handle was not found on Custom TSY's subsystems check the
|
|
3540 |
// Custom TSY's request handles
|
|
3541 |
if ( !subTsyReqFound )
|
|
3542 |
{
|
|
3543 |
TBuf<1> name(KNullDesC);
|
|
3544 |
RMmCustomAPI::TOperatorNameInfo operatorNameInfo;
|
|
3545 |
RMmCustomAPI::TLifeTimeData timeData;
|
|
3546 |
|
|
3547 |
// All possible Custom TSY req handle types are listed in the
|
|
3548 |
// switch case below.
|
|
3549 |
switch ( aReqHandleType )
|
|
3550 |
{
|
|
3551 |
case ECustomTsyCallGsmBlackListClear:
|
|
3552 |
CompleteClearCallBlackList ( aError );
|
|
3553 |
break;
|
|
3554 |
case ECustomTsyTerminateCall:
|
|
3555 |
CompleteTerminateCall( aError );
|
|
3556 |
break;
|
|
3557 |
case ECustomTsyGetAlsBlocked:
|
|
3558 |
CompleteGetAlsBlocked( RMmCustomAPI::EBlockStatusUnknown,
|
|
3559 |
aError );
|
|
3560 |
break;
|
|
3561 |
case ECustomTsySetAlsBlocked:
|
|
3562 |
CompleteSetAlsBlocked( aError );
|
|
3563 |
break;
|
|
3564 |
case ECustomTsyGetCipheringInfo:
|
|
3565 |
CompleteGetCipheringInfo( EFalse, aError );
|
|
3566 |
break;
|
|
3567 |
case ECustomTsyCheckEmergencyNumber:
|
|
3568 |
CompleteCheckEmergencyNumber( 0, aError );
|
|
3569 |
break;
|
|
3570 |
case ECustomTsyGetNetworkOperatorName:
|
|
3571 |
CompleteGetNetworkOperatorName( &name, aError );
|
|
3572 |
break;
|
|
3573 |
case ECustomTsyCheckTwoDigitDialSupport:
|
|
3574 |
CompleteCheckTwoDigitDialSupport(
|
|
3575 |
RMmCustomAPI::ETwoDigitDialSupportOff, aError );
|
|
3576 |
break;
|
|
3577 |
case ECustomTsyGetOperatorName:
|
|
3578 |
// we don't initialize as this is response to error situation
|
|
3579 |
CompleteGetOperatorName( operatorNameInfo , aError );
|
|
3580 |
break;
|
|
3581 |
case ECustomTsyResetNetServer:
|
|
3582 |
CompleteResetNetServer( aError );
|
|
3583 |
break;
|
|
3584 |
case ECustomTsyGetSimFileInfo:
|
|
3585 |
CompleteGetSimFileInfo( NULL, aError );
|
|
3586 |
break;
|
|
3587 |
case ECustomTsyGetLifeTimerInfo:
|
|
3588 |
CompleteGetLifeTime( timeData, aError );
|
|
3589 |
break;
|
|
3590 |
case ECustomTsyGetProgrammableOperatorLogo:
|
|
3591 |
CompleteGetProgrammableOperatorLogo( NULL, NULL, aError );
|
|
3592 |
break;
|
|
3593 |
case ECustomTsyGetSimAuthenticationData:
|
|
3594 |
CompleteSimAuthentication( NULL, aError );
|
|
3595 |
break;
|
|
3596 |
case ECustomTsyIMSAuthenticate:
|
|
3597 |
CompleteImsAuthentication( NULL, aError );
|
|
3598 |
break;
|
|
3599 |
case ECustomTsySetDriveMode:
|
|
3600 |
CompleteSetDriveMode( aError );
|
|
3601 |
break;
|
|
3602 |
case ECustomTsyReadHSxPAStatus:
|
|
3603 |
CompleteReadHSxPAStatus( NULL, aError );
|
|
3604 |
break;
|
|
3605 |
case ECustomTsyWriteHSxPAStatus:
|
|
3606 |
CompleteWriteHSxPAStatus( aError );
|
|
3607 |
break;
|
|
3608 |
case ECustomTsyGetCellInfo:
|
|
3609 |
CompleteGetCellInfo( NULL, aError );
|
|
3610 |
break;
|
|
3611 |
case ECustomTsyGetUSIMServiceSupport:
|
|
3612 |
CompleteGetUSIMServiceSupport( NULL, aError );
|
|
3613 |
break;
|
|
3614 |
case ECustomTsyGetSystemNetworkBand:
|
|
3615 |
CompleteGetSystemNetworkBand(
|
|
3616 |
RMmCustomAPI::ENetworkBandAny,
|
|
3617 |
RMmCustomAPI::KCapsNetworkModeDual,
|
|
3618 |
aError );
|
|
3619 |
break;
|
|
3620 |
case ECustomTsyGetIccCallForwardingStatus:
|
|
3621 |
CompleteGetIccCallForwardingStatus( NULL, aError );
|
|
3622 |
break;
|
|
3623 |
default:
|
|
3624 |
break;
|
|
3625 |
}
|
|
3626 |
}
|
|
3627 |
}
|
|
3628 |
#endif // REQHANDLE_TIMER
|
|
3629 |
|
|
3630 |
// ---------------------------------------------------------------------------
|
|
3631 |
// CMmCustomTsy::ClearCallBlackList
|
|
3632 |
// Clears the Call Blacklist.
|
|
3633 |
// (other items were commented in a header).
|
|
3634 |
// ---------------------------------------------------------------------------
|
|
3635 |
//
|
|
3636 |
TInt CMmCustomTsy::ClearCallBlackListL(
|
|
3637 |
const TTsyReqHandle aTsyReqHandle )
|
|
3638 |
{
|
|
3639 |
TInt retValue ( KErrNone );
|
|
3640 |
|
|
3641 |
TTsyReqHandle reqhandle =
|
|
3642 |
iTsyReqHandleStore->GetTsyReqHandle(
|
|
3643 |
ECustomTsyCallGsmBlackListClear );
|
|
3644 |
|
|
3645 |
if ( 0 < reqhandle )
|
|
3646 |
{
|
|
3647 |
// The request is already in processing because of previous request
|
|
3648 |
// Complete request with status value informing the client about
|
|
3649 |
// the situation.
|
|
3650 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
3651 |
}
|
|
3652 |
else
|
|
3653 |
{
|
|
3654 |
// call DOS and initialize ret value
|
|
3655 |
// no parameters for DOS call
|
|
3656 |
retValue = Phone()->MessageManager()->
|
|
3657 |
HandleRequestL( ECustomClearCallBlackListIPC );
|
|
3658 |
|
|
3659 |
// check result
|
|
3660 |
if ( KErrNone != retValue )
|
|
3661 |
{
|
|
3662 |
ReqCompleted( aTsyReqHandle, retValue );
|
|
3663 |
}
|
|
3664 |
else
|
|
3665 |
{
|
|
3666 |
// Save the req handle type
|
|
3667 |
iReqHandleType = ECustomTsyCallGsmBlackListClear;
|
|
3668 |
}
|
|
3669 |
}
|
|
3670 |
|
|
3671 |
return KErrNone;
|
|
3672 |
}
|
|
3673 |
|
|
3674 |
// ---------------------------------------------------------------------------
|
|
3675 |
// CMmCustomTsy::CompleteClearCallBlackList
|
|
3676 |
// Completes a ClearCallBlackList request.
|
|
3677 |
// (other items were commented in a header).
|
|
3678 |
// ---------------------------------------------------------------------------
|
|
3679 |
//
|
|
3680 |
void CMmCustomTsy::CompleteClearCallBlackList(
|
|
3681 |
TInt aErrorCode )
|
|
3682 |
{
|
|
3683 |
// reset req handle. Returns the deleted req handle
|
|
3684 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3685 |
ECustomTsyCallGsmBlackListClear );
|
|
3686 |
|
|
3687 |
// check the handle and complete
|
|
3688 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
3689 |
{
|
|
3690 |
ReqCompleted( reqHandle, aErrorCode );
|
|
3691 |
}
|
|
3692 |
}
|
|
3693 |
|
|
3694 |
// ---------------------------------------------------------------------------
|
|
3695 |
// CMmCustomTsy::ClearCallBlackListCancel
|
|
3696 |
// Cancels an outstanding ClearCallBlackList request.
|
|
3697 |
// (other items were commented in a header).
|
|
3698 |
// ---------------------------------------------------------------------------
|
|
3699 |
//
|
|
3700 |
TInt CMmCustomTsy::ClearCallBlackListCancel()
|
|
3701 |
{
|
|
3702 |
// reset req handle. Returns the deleted req handle
|
|
3703 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3704 |
ECustomTsyCallGsmBlackListClear );
|
|
3705 |
// complete with KErrCancel
|
|
3706 |
// check the handle and complete
|
|
3707 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
3708 |
{
|
|
3709 |
ReqCompleted( reqHandle, KErrCancel );
|
|
3710 |
}
|
|
3711 |
|
|
3712 |
return KErrNone;
|
|
3713 |
}
|
|
3714 |
|
|
3715 |
// ---------------------------------------------------------------------------
|
|
3716 |
// CMmCustomTsy::GetAirTimeDuration
|
|
3717 |
// Gets the air time duration information from CMmPhoneTsy.
|
|
3718 |
// (other items were commented in a header).
|
|
3719 |
// ---------------------------------------------------------------------------
|
|
3720 |
//
|
|
3721 |
TInt CMmCustomTsy::GetAirTimeDuration(
|
|
3722 |
const TTsyReqHandle aTsyReqHandle,
|
|
3723 |
TTimeIntervalSeconds* aTime )
|
|
3724 |
{
|
|
3725 |
// get the air time duration from phone
|
|
3726 |
Phone()->GetAirTimeDuration( *aTime );
|
|
3727 |
|
|
3728 |
// complete with KErrNone
|
|
3729 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
3730 |
|
|
3731 |
return KErrNone;
|
|
3732 |
}
|
|
3733 |
|
|
3734 |
// ---------------------------------------------------------------------------
|
|
3735 |
// CMmCustomTsy::CheckEmergencyNumberL
|
|
3736 |
// Checks whether given number is emergency number or not.
|
|
3737 |
// (other items were commented in a header).
|
|
3738 |
// ---------------------------------------------------------------------------
|
|
3739 |
//
|
|
3740 |
TInt CMmCustomTsy::CheckEmergencyNumberL(
|
|
3741 |
const TTsyReqHandle aTsyReqHandle,
|
|
3742 |
RMmCustomAPI::TEmerNumberCheckMode* aNumberMode,
|
|
3743 |
TBool* aResult )
|
|
3744 |
{
|
|
3745 |
TFLOGSTRING2("TSY: CMmCustomTsy::CheckEmergencyNumberL number=%S", &(aNumberMode->iNumber) );
|
|
3746 |
|
|
3747 |
TInt ret(KErrGeneral);
|
|
3748 |
|
|
3749 |
TTsyReqHandle requestHandle =
|
|
3750 |
iTsyReqHandleStore->GetTsyReqHandle( ECustomTsyCheckEmergencyNumber );
|
|
3751 |
|
|
3752 |
// 3rd Dial check number
|
|
3753 |
if( iISVDialNumberCheck && 0 == requestHandle )
|
|
3754 |
{
|
|
3755 |
TFLOGSTRING2("TSY: CMmCustomTsy::CheckEmergencyNumberL - 3rd party client nbr check aResult = %d" , aResult );
|
|
3756 |
iEmergencyNumberCheckMode = aNumberMode;
|
|
3757 |
iEmergencyNumberCheckResult = aResult;
|
|
3758 |
|
|
3759 |
// parameter for DOS call: a TEmerNumberCheckMode
|
|
3760 |
CMmDataPackage dataPackage;
|
|
3761 |
dataPackage.PackData( aNumberMode );
|
|
3762 |
ret = Phone()->MessageManager()->HandleRequestL(
|
|
3763 |
ECustomCheckEmergencyNumberIPC, &dataPackage );
|
|
3764 |
}
|
|
3765 |
|
|
3766 |
//Normal case
|
|
3767 |
else
|
|
3768 |
{
|
|
3769 |
TFLOGSTRING2("TSY: CMmCustomTsy::CheckEmergencyNumberL - aResult = %d" , aResult );
|
|
3770 |
|
|
3771 |
if ( ( 0 < requestHandle || iISVDialNumberCheck ) && 0 != aTsyReqHandle )
|
|
3772 |
{
|
|
3773 |
// The request is already in processing because of previous request
|
|
3774 |
ret = KErrServerBusy;
|
|
3775 |
}
|
|
3776 |
|
|
3777 |
else if( iISVDialNumberCheck && 0 == aTsyReqHandle )
|
|
3778 |
{
|
|
3779 |
ret = KErrServerBusy;
|
|
3780 |
}
|
|
3781 |
|
|
3782 |
else
|
|
3783 |
{
|
|
3784 |
// save pointers
|
|
3785 |
iEmergencyNumberCheckMode = aNumberMode;
|
|
3786 |
iEmergencyNumberCheckResult = aResult;
|
|
3787 |
|
|
3788 |
// parameter for DOS call: a TEmerNumberCheckMode
|
|
3789 |
CMmDataPackage dataPackage;
|
|
3790 |
dataPackage.PackData( aNumberMode );
|
|
3791 |
ret = Phone()->MessageManager()->HandleRequestL(
|
|
3792 |
ECustomCheckEmergencyNumberIPC, &dataPackage );
|
|
3793 |
|
|
3794 |
// check the correct completion of the call
|
|
3795 |
if ( KErrNone == ret )
|
|
3796 |
{
|
|
3797 |
// Save the req handle type
|
|
3798 |
iReqHandleType = ECustomTsyCheckEmergencyNumber;
|
|
3799 |
}
|
|
3800 |
}
|
|
3801 |
}
|
|
3802 |
|
|
3803 |
return ret;
|
|
3804 |
}
|
|
3805 |
|
|
3806 |
// ---------------------------------------------------------------------------
|
|
3807 |
// CMmCustomTsy::CompleteCheckEmergencyNumber
|
|
3808 |
// Completes checking of emergency number.
|
|
3809 |
// (other items were commented in a header).
|
|
3810 |
// ---------------------------------------------------------------------------
|
|
3811 |
//
|
|
3812 |
void CMmCustomTsy::CompleteCheckEmergencyNumber(
|
|
3813 |
RMmCustomAPI::TMobileTelNumber* aTelNumber,
|
|
3814 |
TInt aErrorValue )
|
|
3815 |
{
|
|
3816 |
|
|
3817 |
TFLOGSTRING("TSY: CMmCustomTsy::CompleteCheckEmergencyNumber" );
|
|
3818 |
|
|
3819 |
// 3rd party number check completion0
|
|
3820 |
if( iISVDialNumberCheck )
|
|
3821 |
{
|
|
3822 |
//Reset
|
|
3823 |
TBool isEmergencyNbr = EFalse;
|
|
3824 |
|
|
3825 |
if ( KErrNone == aErrorValue && NULL == aTelNumber )
|
|
3826 |
{
|
|
3827 |
*iEmergencyNumberCheckResult = ETrue;
|
|
3828 |
isEmergencyNbr = EFalse;
|
|
3829 |
}
|
|
3830 |
else
|
|
3831 |
{
|
|
3832 |
*iEmergencyNumberCheckResult = ETrue;
|
|
3833 |
isEmergencyNbr = ETrue;
|
|
3834 |
}
|
|
3835 |
|
|
3836 |
// check is the Dial cancel NULL
|
|
3837 |
if( iISVDialNumberCheckObject )
|
|
3838 |
{
|
|
3839 |
TFLOGSTRING2("TSY: CMmCustomTsy::CompleteCheckEmergencyNumber - Complete3rdPartyCallNbrCheck isEmergencyNbr = %d",isEmergencyNbr );
|
|
3840 |
iISVDialNumberCheckObject->Complete3rdPartyCallNbrCheck(
|
|
3841 |
isEmergencyNbr );
|
|
3842 |
}
|
|
3843 |
|
|
3844 |
//reset pointer
|
|
3845 |
iISVDialNumberCheckObject = NULL;
|
|
3846 |
iISVDialNumberCheck = EFalse;
|
|
3847 |
}
|
|
3848 |
|
|
3849 |
// Normal case
|
|
3850 |
else
|
|
3851 |
{
|
|
3852 |
// reset req handle. Returns the deleted req handle
|
|
3853 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3854 |
ECustomTsyCheckEmergencyNumber );
|
|
3855 |
|
|
3856 |
// check if request was called
|
|
3857 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
3858 |
{
|
|
3859 |
// check if response was ok
|
|
3860 |
if ( KErrNone == aErrorValue )
|
|
3861 |
{
|
|
3862 |
//set the information for the client
|
|
3863 |
if ( aTelNumber )
|
|
3864 |
{
|
|
3865 |
*iEmergencyNumberCheckResult = ETrue;
|
|
3866 |
iEmergencyNumberCheckMode->iNumber = *aTelNumber;
|
|
3867 |
}
|
|
3868 |
else
|
|
3869 |
{
|
|
3870 |
*iEmergencyNumberCheckResult = EFalse;
|
|
3871 |
}
|
|
3872 |
}
|
|
3873 |
TFLOGSTRING2("TSY: CMmCustomTsy::CompleteCheckEmergencyNumber number=%S", &(iEmergencyNumberCheckMode->iNumber) );
|
|
3874 |
|
|
3875 |
// reset the internal variable
|
|
3876 |
iEmergencyNumberCheckResult = NULL;
|
|
3877 |
iEmergencyNumberCheckMode = NULL;
|
|
3878 |
// complete
|
|
3879 |
ReqCompleted( reqHandle, aErrorValue );
|
|
3880 |
}
|
|
3881 |
|
|
3882 |
}
|
|
3883 |
|
|
3884 |
//Reset
|
|
3885 |
iISVDialNumberCheck = EFalse;
|
|
3886 |
}
|
|
3887 |
|
|
3888 |
// ---------------------------------------------------------------------------
|
|
3889 |
// CMmCustomTsy::CheckEmergencyNumberCancel
|
|
3890 |
// Cancels checking of emergency number.
|
|
3891 |
// (other items were commented in a header).
|
|
3892 |
// ---------------------------------------------------------------------------
|
|
3893 |
//
|
|
3894 |
TInt CMmCustomTsy::CheckEmergencyNumberCancel()
|
|
3895 |
{
|
|
3896 |
iEmergencyNumberCheckResult = NULL;
|
|
3897 |
|
|
3898 |
// reset the req handle.Returns the deleted req handle.
|
|
3899 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3900 |
ECustomTsyCheckEmergencyNumber );
|
|
3901 |
|
|
3902 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
3903 |
{
|
|
3904 |
// complete with cancel
|
|
3905 |
ReqCompleted( reqHandle, KErrCancel );
|
|
3906 |
}
|
|
3907 |
|
|
3908 |
return KErrNone;
|
|
3909 |
}
|
|
3910 |
|
|
3911 |
// ---------------------------------------------------------------------------
|
|
3912 |
// CMmCustomTsy::NotifyPhoneBookCacheReady
|
|
3913 |
// Notifies client when phonebookcache is ready.
|
|
3914 |
// (other items were commented in a header).
|
|
3915 |
// ---------------------------------------------------------------------------
|
|
3916 |
//
|
|
3917 |
TInt CMmCustomTsy::NotifyPhoneBookCacheReady(
|
|
3918 |
const TTsyReqHandle,
|
|
3919 |
TName* aPndName )
|
|
3920 |
{
|
|
3921 |
iPndName = aPndName;
|
|
3922 |
|
|
3923 |
iReqHandleType = ECustomTsyNotifyCacheReady;
|
|
3924 |
|
|
3925 |
return KErrNone;
|
|
3926 |
}
|
|
3927 |
|
|
3928 |
// ---------------------------------------------------------------------------
|
|
3929 |
// CMmCustomTsy::CompleteNotifyPhoneBookCacheReady
|
|
3930 |
// Completes notify phonebook cache ready.
|
|
3931 |
// (other items were commented in a header).
|
|
3932 |
// ---------------------------------------------------------------------------
|
|
3933 |
//
|
|
3934 |
void CMmCustomTsy::CompleteNotifyPhoneBookCacheReady(
|
|
3935 |
TName& aPndName,
|
|
3936 |
TInt aResult )
|
|
3937 |
{
|
|
3938 |
// reset req handle. Returns the deleted req handle
|
|
3939 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3940 |
ECustomTsyNotifyCacheReady );
|
|
3941 |
|
|
3942 |
// check if request was called
|
|
3943 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
3944 |
{
|
|
3945 |
*iPndName = aPndName;
|
|
3946 |
|
|
3947 |
iPndName = NULL;
|
|
3948 |
|
|
3949 |
ReqCompleted( reqHandle, aResult );
|
|
3950 |
}
|
|
3951 |
}
|
|
3952 |
|
|
3953 |
// ---------------------------------------------------------------------------
|
|
3954 |
// CMmCustomTsy::NotifyPhoneBookCacheReadyCancel
|
|
3955 |
// Cancels notify phonebook cache ready notification.
|
|
3956 |
// (other items were commented in a header).
|
|
3957 |
// ---------------------------------------------------------------------------
|
|
3958 |
//
|
|
3959 |
TInt CMmCustomTsy::NotifyPhoneBookCacheReadyCancel(
|
|
3960 |
const TTsyReqHandle )
|
|
3961 |
{
|
|
3962 |
// reset request handle
|
|
3963 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3964 |
ECustomTsyNotifyCacheReady );
|
|
3965 |
|
|
3966 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
3967 |
{
|
|
3968 |
ReqCompleted( reqHandle, KErrCancel );
|
|
3969 |
}
|
|
3970 |
|
|
3971 |
return KErrNone;
|
|
3972 |
}
|
|
3973 |
|
|
3974 |
// ---------------------------------------------------------------------------
|
|
3975 |
// CMmCustomTsy::GetPndCacheStatus
|
|
3976 |
// This function gets current status of phonebook caching.
|
|
3977 |
// (other items were commented in a header).
|
|
3978 |
// ---------------------------------------------------------------------------
|
|
3979 |
//
|
|
3980 |
TInt CMmCustomTsy::GetPndCacheStatus(
|
|
3981 |
const TTsyReqHandle aTsyReqHandle,
|
|
3982 |
RMmCustomAPI::TPndCacheStatus* aPndStatus,
|
|
3983 |
const TName* aPndName )
|
|
3984 |
{
|
|
3985 |
|
|
3986 |
TInt error = KErrNone;
|
|
3987 |
// used phonebook is Adn
|
|
3988 |
if ( 0 == aPndName->CompareF( KETelIccAdnPhoneBook ) )
|
|
3989 |
{
|
|
3990 |
TFLOGSTRING2("TSY: CMmCustomTsy::GetPndCacheStatus - ADN phonebook status: %d", iAdnCacheStatus);
|
|
3991 |
*aPndStatus = iAdnCacheStatus;
|
|
3992 |
}
|
|
3993 |
// used phonebook is Fdn
|
|
3994 |
else if ( 0 == aPndName->CompareF( KETelIccFdnPhoneBook ) )
|
|
3995 |
{
|
|
3996 |
TFLOGSTRING2("TSY: CMmCustomTsy::GetPndCacheStatus - FDN phonebook status: %d", iFdnCacheStatus);
|
|
3997 |
*aPndStatus = iFdnCacheStatus;
|
|
3998 |
}
|
|
3999 |
// used phonebook doesn't have cache
|
|
4000 |
else if ( ( 0 == aPndName->CompareF( KETelIccBdnPhoneBook ) ) ||
|
|
4001 |
( 0 == aPndName->CompareF( KETelIccSdnPhoneBook ) ) ||
|
|
4002 |
( 0 == aPndName->CompareF( KETelIccVoiceMailBox ) ) )
|
|
4003 |
{
|
|
4004 |
TFLOGSTRING2("TSY: CMmCustomTsy::GetPndCacheStatus - No cache for: %S ", aPndName);
|
|
4005 |
*aPndStatus = RMmCustomAPI::ECacheNotUsed;
|
|
4006 |
}
|
|
4007 |
else
|
|
4008 |
{
|
|
4009 |
TFLOGSTRING2("TSY: CMmCustomTsy::GetPndCacheStatus - No cache found for: %S ", aPndName);
|
|
4010 |
error = KErrArgument;
|
|
4011 |
}
|
|
4012 |
|
|
4013 |
ReqCompleted( aTsyReqHandle, error );
|
|
4014 |
|
|
4015 |
return KErrNone;
|
|
4016 |
}
|
|
4017 |
|
|
4018 |
// ---------------------------------------------------------------------------
|
|
4019 |
// CMmCustomTsy::UpdateCacheStatus
|
|
4020 |
// This method updates phonebook caching status.
|
|
4021 |
// (other items were commented in a header).
|
|
4022 |
// ---------------------------------------------------------------------------
|
|
4023 |
//
|
|
4024 |
void CMmCustomTsy::UpdateCacheStatus(
|
|
4025 |
RMmCustomAPI::TPndCacheStatus aPndStatus,
|
|
4026 |
TName& aPndName )
|
|
4027 |
{
|
|
4028 |
TFLOGSTRING3("TSY: CMmCustomTsy::UpdateCacheStatus - Phonebook: %S status: %d", &aPndName, aPndStatus);
|
|
4029 |
// if used phonebook is Adn
|
|
4030 |
if ( 0 == aPndName.CompareF( KETelIccAdnPhoneBook ) )
|
|
4031 |
{
|
|
4032 |
iAdnCacheStatus = aPndStatus;
|
|
4033 |
}
|
|
4034 |
// else if used phonebook is Fdn
|
|
4035 |
else if ( 0 == aPndName.CompareF( KETelIccFdnPhoneBook ) )
|
|
4036 |
{
|
|
4037 |
iFdnCacheStatus = aPndStatus;
|
|
4038 |
}
|
|
4039 |
}
|
|
4040 |
|
|
4041 |
// ---------------------------------------------------------------------------
|
|
4042 |
// CMmCustomTsy::GetNetworkOperatorNameL
|
|
4043 |
// Gets the network operator name from the SIM card.
|
|
4044 |
// (other items were commented in a header).
|
|
4045 |
// ---------------------------------------------------------------------------
|
|
4046 |
//
|
|
4047 |
TInt CMmCustomTsy::GetNetworkOperatorNameL(
|
|
4048 |
TDes* aNetworkOperatorName )
|
|
4049 |
{
|
|
4050 |
// call DOS (no packed parameters)
|
|
4051 |
TInt ret = Phone()->MessageManager()->HandleRequestL(
|
|
4052 |
ECustomGetNetworkProviderNameIPC );
|
|
4053 |
|
|
4054 |
if ( KErrNone == ret )
|
|
4055 |
{
|
|
4056 |
// save pointer to client space and req handle type
|
|
4057 |
iNetworkOperatorName = aNetworkOperatorName;
|
|
4058 |
iReqHandleType = ECustomTsyGetNetworkOperatorName;
|
|
4059 |
}
|
|
4060 |
|
|
4061 |
return ret;
|
|
4062 |
}
|
|
4063 |
|
|
4064 |
// ---------------------------------------------------------------------------
|
|
4065 |
// CMmCustomTsy::GetNetworkOperatorName
|
|
4066 |
// Completes getting network operator name from SIM card.
|
|
4067 |
// (other items were commented in a header).
|
|
4068 |
// ---------------------------------------------------------------------------
|
|
4069 |
//
|
|
4070 |
void CMmCustomTsy::CompleteGetNetworkOperatorName(
|
|
4071 |
TDes* aName,
|
|
4072 |
TInt aError )
|
|
4073 |
{
|
|
4074 |
// reset req handle. Returns the deleted req handle
|
|
4075 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4076 |
ECustomTsyGetNetworkOperatorName );
|
|
4077 |
|
|
4078 |
// check if request was called
|
|
4079 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
4080 |
{
|
|
4081 |
// check if response was ok
|
|
4082 |
if ( ( KErrNone == aError ) && ( NULL != aName ) )
|
|
4083 |
{
|
|
4084 |
if ( aName->Length() <= iNetworkOperatorName->MaxLength() )
|
|
4085 |
{
|
|
4086 |
// set the information for the client
|
|
4087 |
*iNetworkOperatorName = *aName;
|
|
4088 |
}
|
|
4089 |
else
|
|
4090 |
{
|
|
4091 |
// client delivered too small buffer
|
|
4092 |
aError = KErrArgument;
|
|
4093 |
}
|
|
4094 |
}
|
|
4095 |
|
|
4096 |
// reset the internal variable
|
|
4097 |
iNetworkOperatorName = NULL;
|
|
4098 |
// complete
|
|
4099 |
ReqCompleted( reqHandle, aError );
|
|
4100 |
}
|
|
4101 |
}
|
|
4102 |
|
|
4103 |
// ---------------------------------------------------------------------------
|
|
4104 |
// CMmCustomTsy::GetNetworkOperatorNameCancel
|
|
4105 |
// Cancels getting network operator name from SIM card.
|
|
4106 |
// (other items were commented in a header).
|
|
4107 |
// ---------------------------------------------------------------------------
|
|
4108 |
//
|
|
4109 |
TInt CMmCustomTsy::GetNetworkOperatorNameCancel()
|
|
4110 |
{
|
|
4111 |
// reset the pointer to client space
|
|
4112 |
iNetworkOperatorName = NULL;
|
|
4113 |
|
|
4114 |
// reset the req handle
|
|
4115 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4116 |
ECustomTsyGetNetworkOperatorName );
|
|
4117 |
|
|
4118 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
4119 |
{
|
|
4120 |
// complete with cancel
|
|
4121 |
ReqCompleted( reqHandle, KErrCancel );
|
|
4122 |
}
|
|
4123 |
|
|
4124 |
return KErrNone;
|
|
4125 |
}
|
|
4126 |
|
|
4127 |
// ---------------------------------------------------------------------------
|
|
4128 |
// CMmCustomTsy::SsAdditionalInfoNotification
|
|
4129 |
// Notification request for additional info message.
|
|
4130 |
// (other items were commented in a header).
|
|
4131 |
// ---------------------------------------------------------------------------
|
|
4132 |
//
|
|
4133 |
TInt CMmCustomTsy::SsAdditionalInfoNotification(
|
|
4134 |
RMmCustomAPI::TSsAdditionalInfo* aSsAdditionalInfo )
|
|
4135 |
{
|
|
4136 |
TFLOGSTRING("TSY: CMmCustomTsy::SsAdditionalInfoNotification");
|
|
4137 |
iRetSsAdditionalInfo = aSsAdditionalInfo;
|
|
4138 |
iReqHandleType = ECustomTsyNotifySsAdditionalInfo;
|
|
4139 |
|
|
4140 |
return KErrNone;
|
|
4141 |
}
|
|
4142 |
|
|
4143 |
// ---------------------------------------------------------------------------
|
|
4144 |
// CMmCustomTsy::SsAdditionalInfoNotificationCancel
|
|
4145 |
// Cancels notification request for additional info message.
|
|
4146 |
// (other items were commented in a header).
|
|
4147 |
// ---------------------------------------------------------------------------
|
|
4148 |
//
|
|
4149 |
TInt CMmCustomTsy::SsAdditionalInfoNotificationCancel(
|
|
4150 |
const TTsyReqHandle )
|
|
4151 |
{
|
|
4152 |
TFLOGSTRING("TSY: CMmCustomTsy::SsAdditionalInfoNotificationCancel");
|
|
4153 |
iRetSsAdditionalInfo = NULL;
|
|
4154 |
|
|
4155 |
// reset reqhandle
|
|
4156 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4157 |
ECustomTsyNotifySsAdditionalInfo );
|
|
4158 |
|
|
4159 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
4160 |
{
|
|
4161 |
ReqCompleted( reqHandle, KErrCancel );
|
|
4162 |
}
|
|
4163 |
|
|
4164 |
return KErrNone;
|
|
4165 |
}
|
|
4166 |
|
|
4167 |
// ---------------------------------------------------------------------------
|
|
4168 |
// CMmCustomTsy::CompleteSsAdditionalInfoNotification
|
|
4169 |
// Completes SsAdditionalInfo notification.
|
|
4170 |
// (other items were commented in a header).
|
|
4171 |
// ---------------------------------------------------------------------------
|
|
4172 |
//
|
|
4173 |
void CMmCustomTsy::CompleteSsAdditionalInfoNotification(
|
|
4174 |
RMmCustomAPI::TSsAdditionalInfo* aSsAdditionalInfo,
|
|
4175 |
TInt aError )
|
|
4176 |
{
|
|
4177 |
TFLOGSTRING("TSY: CMmCustomTsy::CompleteSsAdditionalInfoNotification");
|
|
4178 |
// reset req handle. Returns the deleted req handle
|
|
4179 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4180 |
ECustomTsyNotifySsAdditionalInfo );
|
|
4181 |
|
|
4182 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
4183 |
{
|
|
4184 |
// copy data to client
|
|
4185 |
iRetSsAdditionalInfo->iOperationCode =
|
|
4186 |
aSsAdditionalInfo->iOperationCode;
|
|
4187 |
iRetSsAdditionalInfo->iAdditionalInfo.Copy(
|
|
4188 |
aSsAdditionalInfo->iAdditionalInfo );
|
|
4189 |
|
|
4190 |
// reset pointer to client
|
|
4191 |
iRetSsAdditionalInfo = NULL;
|
|
4192 |
|
|
4193 |
// Complete the client request
|
|
4194 |
ReqCompleted( reqHandle, aError );
|
|
4195 |
}
|
|
4196 |
}
|
|
4197 |
|
|
4198 |
// ---------------------------------------------------------------------------
|
|
4199 |
// CMmCustomTsy::CheckTwoDigitDialSupportL
|
|
4200 |
// Checks two digit dialing support from Product Profile.
|
|
4201 |
// (other items were commented in a header).
|
|
4202 |
// ---------------------------------------------------------------------------
|
|
4203 |
//
|
|
4204 |
TInt CMmCustomTsy::CheckTwoDigitDialSupportL(
|
|
4205 |
const TTsyReqHandle aTsyReqHandle,
|
|
4206 |
RMmCustomAPI::TTwoDigitDialSupport* aSupport )
|
|
4207 |
{
|
|
4208 |
TFLOGSTRING("TSY: CMmCustomTsy::CheckTwoDigitDialSupportL");
|
|
4209 |
// save pointer to client space
|
|
4210 |
iTwoDigitDialSupport = aSupport;
|
|
4211 |
|
|
4212 |
// call DOS
|
|
4213 |
TInt error = Phone()->MessageManager()->HandleRequestL(
|
|
4214 |
ECustomCheckTwoDigitDialSupportIPC );
|
|
4215 |
|
|
4216 |
if ( KErrNone != error )
|
|
4217 |
{
|
|
4218 |
ReqCompleted( aTsyReqHandle, error );
|
|
4219 |
}
|
|
4220 |
else
|
|
4221 |
{
|
|
4222 |
// Save the req handle type
|
|
4223 |
iReqHandleType = ECustomTsyCheckTwoDigitDialSupport;
|
|
4224 |
}
|
|
4225 |
|
|
4226 |
return KErrNone;
|
|
4227 |
}
|
|
4228 |
|
|
4229 |
// ---------------------------------------------------------------------------
|
|
4230 |
// CMmCustomTsy::CheckTwoDigitDialSupport
|
|
4231 |
// Completes a CheckTwoDigitDialSupport request.
|
|
4232 |
// (other items were commented in a header).
|
|
4233 |
// ---------------------------------------------------------------------------
|
|
4234 |
//
|
|
4235 |
void CMmCustomTsy::CompleteCheckTwoDigitDialSupport(
|
|
4236 |
RMmCustomAPI::TTwoDigitDialSupport aTwoDigitDialSupport,
|
|
4237 |
TInt aErrorCode )
|
|
4238 |
{
|
|
4239 |
// reset req handle. Returns the deleted req handle
|
|
4240 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4241 |
ECustomTsyCheckTwoDigitDialSupport );
|
|
4242 |
|
|
4243 |
// check if request was called
|
|
4244 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
4245 |
{
|
|
4246 |
// check if response was ok
|
|
4247 |
if ( KErrNone == aErrorCode )
|
|
4248 |
{
|
|
4249 |
// set the information for the client
|
|
4250 |
*iTwoDigitDialSupport = aTwoDigitDialSupport;
|
|
4251 |
}
|
|
4252 |
|
|
4253 |
// reset the internal variable
|
|
4254 |
iTwoDigitDialSupport = NULL;
|
|
4255 |
// complete
|
|
4256 |
ReqCompleted( reqHandle, aErrorCode );
|
|
4257 |
}
|
|
4258 |
}
|
|
4259 |
|
|
4260 |
// ---------------------------------------------------------------------------
|
|
4261 |
// CMmCustomTsy::CheckTwoDigitDialSupportCancel
|
|
4262 |
// Cancels an outstanding CheckTwoDigitDialSupport request.
|
|
4263 |
// (other items were commented in a header).
|
|
4264 |
// ---------------------------------------------------------------------------
|
|
4265 |
//
|
|
4266 |
TInt CMmCustomTsy::CheckTwoDigitDialSupportCancel()
|
|
4267 |
{
|
|
4268 |
// reset the pointer to client data
|
|
4269 |
iTwoDigitDialSupport = NULL;
|
|
4270 |
|
|
4271 |
// reset the reqhandle
|
|
4272 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4273 |
ECustomTsyCheckTwoDigitDialSupport );
|
|
4274 |
|
|
4275 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
4276 |
{
|
|
4277 |
// complete
|
|
4278 |
ReqCompleted( reqHandle, KErrCancel );
|
|
4279 |
}
|
|
4280 |
|
|
4281 |
return KErrNone;
|
|
4282 |
}
|
|
4283 |
|
|
4284 |
// ---------------------------------------------------------------------------
|
|
4285 |
// CMmCustomTsy::GetOperatorNameL
|
|
4286 |
// Get the programmable operator name of the current network.
|
|
4287 |
// (other items were commented in a header).
|
|
4288 |
// ---------------------------------------------------------------------------
|
|
4289 |
//
|
|
4290 |
TInt CMmCustomTsy::GetOperatorNameL(
|
|
4291 |
const TTsyReqHandle aTsyReqHandle,
|
|
4292 |
RMmCustomAPI::TOperatorNameInfo* aOperatorNameInfo )
|
|
4293 |
{
|
|
4294 |
// save a pointer to client space
|
|
4295 |
iRetOperatorNameInfo = aOperatorNameInfo;
|
|
4296 |
|
|
4297 |
// call DOS (no packed parameters)
|
|
4298 |
TInt ret = Phone()->MessageManager()->HandleRequestL(
|
|
4299 |
ECustomGetOperatorNameIPC );
|
|
4300 |
|
|
4301 |
// check result
|
|
4302 |
if ( KErrNone != ret )
|
|
4303 |
{
|
|
4304 |
ReqCompleted( aTsyReqHandle, ret );
|
|
4305 |
}
|
|
4306 |
else
|
|
4307 |
{
|
|
4308 |
// Save the req handle type
|
|
4309 |
iReqHandleType = ECustomTsyGetOperatorName;
|
|
4310 |
}
|
|
4311 |
|
|
4312 |
return KErrNone;
|
|
4313 |
}
|
|
4314 |
|
|
4315 |
// ---------------------------------------------------------------------------
|
|
4316 |
// CMmCustomTsy::GetOperatorNameCancel
|
|
4317 |
// Cancels an outstanding GetOperatorName request.
|
|
4318 |
// (other items were commented in a header).
|
|
4319 |
// ---------------------------------------------------------------------------
|
|
4320 |
//
|
|
4321 |
TInt CMmCustomTsy::GetOperatorNameCancel()
|
|
4322 |
{
|
|
4323 |
// reset the pointer to client space
|
|
4324 |
iRetOperatorNameInfo = NULL;
|
|
4325 |
|
|
4326 |
// reset the req handle
|
|
4327 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4328 |
ECustomTsyGetOperatorName );
|
|
4329 |
|
|
4330 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
4331 |
{
|
|
4332 |
// complete with cancel
|
|
4333 |
ReqCompleted( reqHandle, KErrCancel );
|
|
4334 |
}
|
|
4335 |
|
|
4336 |
return KErrNone;
|
|
4337 |
}
|
|
4338 |
|
|
4339 |
// ---------------------------------------------------------------------------
|
|
4340 |
// CMmCustomTsy::CompleteGetOperatorName
|
|
4341 |
// Completes an outstanding GetOperatorName request.
|
|
4342 |
// (other items were commented in a header).
|
|
4343 |
// ---------------------------------------------------------------------------
|
|
4344 |
//
|
|
4345 |
void CMmCustomTsy::CompleteGetOperatorName(
|
|
4346 |
RMmCustomAPI::TOperatorNameInfo& aOperatorNameInfo,
|
|
4347 |
TInt aErrorValue )
|
|
4348 |
{
|
|
4349 |
// reset the req handle
|
|
4350 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4351 |
ECustomTsyGetOperatorName );
|
|
4352 |
|
|
4353 |
// check the validity of the handler
|
|
4354 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
4355 |
{
|
|
4356 |
if ( KErrNone == aErrorValue )
|
|
4357 |
{
|
|
4358 |
// Copy the programmable operator name info in the client space
|
|
4359 |
*iRetOperatorNameInfo = aOperatorNameInfo;
|
|
4360 |
}
|
|
4361 |
// reset the pointer to client space
|
|
4362 |
iRetOperatorNameInfo = NULL;
|
|
4363 |
|
|
4364 |
// complete operation
|
|
4365 |
ReqCompleted ( reqHandle, aErrorValue );
|
|
4366 |
}
|
|
4367 |
}
|
|
4368 |
|
|
4369 |
// ---------------------------------------------------------------------------
|
|
4370 |
// CMmCustomTsy::NotifySsNetworkEvent
|
|
4371 |
// Notifies the client about a network generated SS event.
|
|
4372 |
// (other items were commented in a header).
|
|
4373 |
// ---------------------------------------------------------------------------
|
|
4374 |
//
|
|
4375 |
TInt CMmCustomTsy::NotifySsNetworkEvent(
|
|
4376 |
RMmCustomAPI::TSsTypeAndMode* aSsTypeAndMode,
|
|
4377 |
RMmCustomAPI::TSsInfo* aSsInfo )
|
|
4378 |
{
|
|
4379 |
// save pointer to client data
|
|
4380 |
iSsTypeAndMode = aSsTypeAndMode;
|
|
4381 |
iSsInfo = aSsInfo;
|
|
4382 |
|
|
4383 |
// set the reqhandle type
|
|
4384 |
iReqHandleType = ECustomTsySsNotification;
|
|
4385 |
|
|
4386 |
return KErrNone;
|
|
4387 |
}
|
|
4388 |
|
|
4389 |
// ---------------------------------------------------------------------------
|
|
4390 |
// CMmCustomTsy::NotifySsNetworkEventCancel
|
|
4391 |
// Cancels an outstanding NotifySsNetworkEvent.
|
|
4392 |
// (other items were commented in a header).
|
|
4393 |
// ---------------------------------------------------------------------------
|
|
4394 |
//
|
|
4395 |
TInt CMmCustomTsy::NotifySsNetworkEventCancel()
|
|
4396 |
{
|
|
4397 |
// erase pointers to client data
|
|
4398 |
iSsTypeAndMode = NULL;
|
|
4399 |
iSsInfo = NULL;
|
|
4400 |
|
|
4401 |
// reset the reqhandle
|
|
4402 |
TTsyReqHandle tsyReqHandle =
|
|
4403 |
iTsyReqHandleStore->ResetTsyReqHandle( ECustomTsySsNotification );
|
|
4404 |
|
|
4405 |
if ( ECustomTsyReqHandleUnknown != tsyReqHandle )
|
|
4406 |
{
|
|
4407 |
// complete with cancel
|
|
4408 |
ReqCompleted( tsyReqHandle, KErrCancel );
|
|
4409 |
}
|
|
4410 |
|
|
4411 |
return KErrNone;
|
|
4412 |
}
|
|
4413 |
|
|
4414 |
// ---------------------------------------------------------------------------
|
|
4415 |
// CMmCustomTsy::CompleteNotifySsNetworkEvent
|
|
4416 |
// Completes NotifySsNetworkEvent.
|
|
4417 |
// (other items were commented in a header).
|
|
4418 |
// ---------------------------------------------------------------------------
|
|
4419 |
//
|
|
4420 |
void CMmCustomTsy::CompleteNotifySsNetworkEvent(
|
|
4421 |
RMmCustomAPI::TSsTypeAndMode& aSsTypeAndMode,
|
|
4422 |
RMmCustomAPI::TSsInfo& aSsInfo,
|
|
4423 |
TInt aErrorCode )
|
|
4424 |
{
|
|
4425 |
// reset the reqhandle
|
|
4426 |
TTsyReqHandle tsyReqHandle =
|
|
4427 |
iTsyReqHandleStore->ResetTsyReqHandle( ECustomTsySsNotification );
|
|
4428 |
|
|
4429 |
if ( ECustomTsyReqHandleUnknown != tsyReqHandle )
|
|
4430 |
{
|
|
4431 |
if ( KErrNone == aErrorCode )
|
|
4432 |
{
|
|
4433 |
// save data in client space
|
|
4434 |
*iSsTypeAndMode = aSsTypeAndMode;
|
|
4435 |
*iSsInfo = aSsInfo;
|
|
4436 |
}
|
|
4437 |
// reset the pointers to client space
|
|
4438 |
iSsTypeAndMode = NULL;
|
|
4439 |
iSsInfo = NULL;
|
|
4440 |
// complete
|
|
4441 |
ReqCompleted( tsyReqHandle, aErrorCode );
|
|
4442 |
}
|
|
4443 |
}
|
|
4444 |
|
|
4445 |
// ---------------------------------------------------------------------------
|
|
4446 |
// CMmCustomTsy::GetProgrammableOperatorLogoL
|
|
4447 |
// Gets the programmable operator logo.
|
|
4448 |
// (other items were commented in a header).
|
|
4449 |
// ---------------------------------------------------------------------------
|
|
4450 |
//
|
|
4451 |
TInt CMmCustomTsy::GetProgrammableOperatorLogoL(
|
|
4452 |
const TTsyReqHandle aTsyReqHandle,
|
|
4453 |
RMmCustomAPI::TOperatorId* aOperatorId,
|
|
4454 |
RMmCustomAPI::TOperatorLogo* aLogo )
|
|
4455 |
{
|
|
4456 |
TTsyReqHandle reqhandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
4457 |
ECustomTsyGetProgrammableOperatorLogo );
|
|
4458 |
|
|
4459 |
if ( 0 < reqhandle )
|
|
4460 |
{
|
|
4461 |
// The request is already in processing because of previous request
|
|
4462 |
// Complete request with status value informing the client about
|
|
4463 |
// the situation.
|
|
4464 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
4465 |
}
|
|
4466 |
else
|
|
4467 |
{
|
|
4468 |
// save a pointer to client space
|
|
4469 |
iRetOperatorLogoInfo = aLogo;
|
|
4470 |
iRetOperatorIdInfo = aOperatorId;
|
|
4471 |
|
|
4472 |
// call DOS
|
|
4473 |
// packed parameter: RMmCustomAPI::TOperatorId
|
|
4474 |
CMmDataPackage dataPackage;
|
|
4475 |
dataPackage.PackData( aOperatorId );
|
|
4476 |
TInt ret = Phone()->MessageManager()->HandleRequestL(
|
|
4477 |
ECustomGetProgrammableOperatorLogoIPC, &dataPackage );
|
|
4478 |
|
|
4479 |
if ( KErrNone != ret )
|
|
4480 |
{
|
|
4481 |
ReqCompleted( aTsyReqHandle, ret );
|
|
4482 |
}
|
|
4483 |
else
|
|
4484 |
{
|
|
4485 |
// Save the req handle type
|
|
4486 |
iReqHandleType = ECustomTsyGetProgrammableOperatorLogo;
|
|
4487 |
}
|
|
4488 |
}
|
|
4489 |
|
|
4490 |
return KErrNone;
|
|
4491 |
}
|
|
4492 |
|
|
4493 |
// ---------------------------------------------------------------------------
|
|
4494 |
// CMmCustomTsy::GetProgrammableOperatorLogoCancel
|
|
4495 |
// Cancels an outstanding GetProgrammableOperatorLogo request.
|
|
4496 |
// (other items were commented in a header).
|
|
4497 |
// ---------------------------------------------------------------------------
|
|
4498 |
//
|
|
4499 |
TInt CMmCustomTsy::GetProgrammableOperatorLogoCancel()
|
|
4500 |
{
|
|
4501 |
// reset the pointers
|
|
4502 |
iRetOperatorLogoInfo = NULL;
|
|
4503 |
iRetOperatorIdInfo = NULL;
|
|
4504 |
|
|
4505 |
// reset the req handle
|
|
4506 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4507 |
ECustomTsyGetProgrammableOperatorLogo );
|
|
4508 |
|
|
4509 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
4510 |
{
|
|
4511 |
// complete with cancel
|
|
4512 |
ReqCompleted( reqHandle, KErrCancel );
|
|
4513 |
}
|
|
4514 |
|
|
4515 |
return KErrNone;
|
|
4516 |
}
|
|
4517 |
|
|
4518 |
// ---------------------------------------------------------------------------
|
|
4519 |
// CMmCustomTsy::CompleteGetProgrammableOperatorLogo
|
|
4520 |
// Completes GetProgrammableOperatorLogo.
|
|
4521 |
// (other items were commented in a header).
|
|
4522 |
// ---------------------------------------------------------------------------
|
|
4523 |
//
|
|
4524 |
void CMmCustomTsy::CompleteGetProgrammableOperatorLogo(
|
|
4525 |
RMmCustomAPI::TOperatorId* aOperatorIdInfo,
|
|
4526 |
RMmCustomAPI::TOperatorLogo* aLogoData,
|
|
4527 |
TInt aErrorValue )
|
|
4528 |
{
|
|
4529 |
|
|
4530 |
// reset the req handle
|
|
4531 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4532 |
ECustomTsyGetProgrammableOperatorLogo );
|
|
4533 |
|
|
4534 |
// check the validity of the handler
|
|
4535 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
4536 |
{
|
|
4537 |
if ( KErrNone == aErrorValue)
|
|
4538 |
{
|
|
4539 |
// if client has allocated big enough space for logo data, logo data
|
|
4540 |
// is appended into client space pointer
|
|
4541 |
if ( ( aLogoData->iOperatorLogo ) &&
|
|
4542 |
( aLogoData->iOperatorLogo->Size() <=
|
|
4543 |
iRetOperatorLogoInfo->iOperatorLogo->MaxSize() ) )
|
|
4544 |
{
|
|
4545 |
// Copy the logo info in the client space
|
|
4546 |
iRetOperatorLogoInfo->iLogoInfo = aLogoData->iLogoInfo;
|
|
4547 |
// Copy the logo in the client space
|
|
4548 |
iRetOperatorLogoInfo->iOperatorLogo->Copy( *(
|
|
4549 |
aLogoData->iOperatorLogo ) );
|
|
4550 |
// Copy the operator info in the client space
|
|
4551 |
*iRetOperatorIdInfo = *aOperatorIdInfo;
|
|
4552 |
}
|
|
4553 |
else
|
|
4554 |
{
|
|
4555 |
// logo will not fit into client space
|
|
4556 |
aErrorValue = KErrTooBig;
|
|
4557 |
}
|
|
4558 |
}
|
|
4559 |
|
|
4560 |
// reset the pointers
|
|
4561 |
iRetOperatorLogoInfo = NULL;
|
|
4562 |
iRetOperatorIdInfo = NULL;
|
|
4563 |
|
|
4564 |
// complete operation
|
|
4565 |
ReqCompleted ( reqHandle, aErrorValue );
|
|
4566 |
}
|
|
4567 |
}
|
|
4568 |
|
|
4569 |
// ---------------------------------------------------------------------------
|
|
4570 |
// CMmCustomTsy::SatRefreshCompleteNotification
|
|
4571 |
// Notifies the client of SAT refresh.
|
|
4572 |
// (other items were commented in a header).
|
|
4573 |
// ---------------------------------------------------------------------------
|
|
4574 |
//
|
|
4575 |
TInt CMmCustomTsy::SatRefreshCompleteNotification()
|
|
4576 |
{
|
|
4577 |
iReqHandleType = ECustomTsySatRefreshCompleteNotification;
|
|
4578 |
|
|
4579 |
return KErrNone;
|
|
4580 |
}
|
|
4581 |
|
|
4582 |
// ---------------------------------------------------------------------------
|
|
4583 |
// CMmCustomTsy::SatRefreshCompleteNotificationCancel
|
|
4584 |
// Cancels an outstanding asynchronous SatRefreshCompleteNotification request.
|
|
4585 |
// (other items were commented in a header).
|
|
4586 |
// ---------------------------------------------------------------------------
|
|
4587 |
//
|
|
4588 |
TInt CMmCustomTsy::SatRefreshCompleteNotificationCancel(
|
|
4589 |
const TTsyReqHandle aTsyReqHandle )
|
|
4590 |
{
|
|
4591 |
// reset reqhandle
|
|
4592 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4593 |
ECustomTsySatRefreshCompleteNotification );
|
|
4594 |
|
|
4595 |
// complete with KErrCancel
|
|
4596 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
4597 |
|
|
4598 |
return KErrNone;
|
|
4599 |
}
|
|
4600 |
|
|
4601 |
// ---------------------------------------------------------------------------
|
|
4602 |
// CMmCustomTsy::CompleteSatRefreshCompleteNotification
|
|
4603 |
// Completes the notification of SAT refresh to the client.
|
|
4604 |
// (other items were commented in a header).
|
|
4605 |
// ---------------------------------------------------------------------------
|
|
4606 |
//
|
|
4607 |
void CMmCustomTsy::CompleteSatRefreshCompleteNotification()
|
|
4608 |
{
|
|
4609 |
//Note iRefresh is never set to ETrue
|
|
4610 |
|
|
4611 |
// reset req handle. Returns the deleted req handle
|
|
4612 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4613 |
ECustomTsySatRefreshCompleteNotification );
|
|
4614 |
|
|
4615 |
// check if handle exists
|
|
4616 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
4617 |
{
|
|
4618 |
// complete
|
|
4619 |
ReqCompleted( reqHandle, KErrNone );
|
|
4620 |
// set sat refresh flag off
|
|
4621 |
SetSatRefreshStatus ( EFalse );
|
|
4622 |
//Reset ME ALS info
|
|
4623 |
Phone()->ResetMEAlsInfo();
|
|
4624 |
}
|
|
4625 |
}
|
|
4626 |
|
|
4627 |
// ---------------------------------------------------------------------------
|
|
4628 |
// CMmCustomTsy::SetSatRefreshStatus
|
|
4629 |
// Sets aSatRefreshStatus into internal variable iIsRefresh.
|
|
4630 |
// (other items were commented in a header).
|
|
4631 |
// ---------------------------------------------------------------------------
|
|
4632 |
//
|
|
4633 |
EXPORT_C void CMmCustomTsy::SetSatRefreshStatus(
|
|
4634 |
TBool aSatRefreshStatus )
|
|
4635 |
{
|
|
4636 |
iIsRefresh = aSatRefreshStatus;
|
|
4637 |
}
|
|
4638 |
|
|
4639 |
// ---------------------------------------------------------------------------
|
|
4640 |
// CMmCustomTsy::ResetNetServerL
|
|
4641 |
// Resets the net server to previous network selection when user doesn't select
|
|
4642 |
// a network from the network list got in a search.
|
|
4643 |
// (other items were commented in a header).
|
|
4644 |
// ---------------------------------------------------------------------------
|
|
4645 |
//
|
|
4646 |
TInt CMmCustomTsy::ResetNetServerL(
|
|
4647 |
const TTsyReqHandle aTsyReqHandle )
|
|
4648 |
{
|
|
4649 |
TFLOGSTRING("TSY: CMmCustomTsy::ResetNetServerL");
|
|
4650 |
// call DOS (no packed parameters)
|
|
4651 |
TInt ret = Phone()->MessageManager()->HandleRequestL(
|
|
4652 |
ECustomResetNetServerIPC );
|
|
4653 |
|
|
4654 |
if ( KErrNone != ret )
|
|
4655 |
{
|
|
4656 |
ReqCompleted( aTsyReqHandle, ret );
|
|
4657 |
}
|
|
4658 |
else
|
|
4659 |
{
|
|
4660 |
// Save the req handle type
|
|
4661 |
iReqHandleType = ECustomTsyResetNetServer;
|
|
4662 |
}
|
|
4663 |
|
|
4664 |
return KErrNone;
|
|
4665 |
}
|
|
4666 |
|
|
4667 |
// ---------------------------------------------------------------------------
|
|
4668 |
// CMmCustomTsy::CompleteResetNetServer
|
|
4669 |
// Completes a ResetNetServer request.
|
|
4670 |
// (other items were commented in a header).
|
|
4671 |
// ---------------------------------------------------------------------------
|
|
4672 |
//
|
|
4673 |
void CMmCustomTsy::CompleteResetNetServer(
|
|
4674 |
TInt aErrorValue )
|
|
4675 |
{
|
|
4676 |
TFLOGSTRING2("TSY: CMmCustomTsy::CompleteResetNetServer - Error: %d", aErrorValue );
|
|
4677 |
// reset the reqhandle
|
|
4678 |
TTsyReqHandle tsyReqHandle =
|
|
4679 |
iTsyReqHandleStore->ResetTsyReqHandle( ECustomTsyResetNetServer );
|
|
4680 |
|
|
4681 |
// Check the reqHandle
|
|
4682 |
if ( ECustomTsyReqHandleUnknown != tsyReqHandle )
|
|
4683 |
{
|
|
4684 |
// Check that the error value is not KErrCancel, because this will
|
|
4685 |
// cause panic on the ETEL side - error: EZGO-6WVD5N
|
|
4686 |
if ( KErrCancel == aErrorValue )
|
|
4687 |
{
|
|
4688 |
// Convert the error value from KErrCancel to KErrNotReady
|
|
4689 |
aErrorValue = KErrNotReady;
|
|
4690 |
}
|
|
4691 |
|
|
4692 |
TFLOGSTRING2("TSY: CMmCustomTsy::CompleteResetNetServer - complete with error value: %d", aErrorValue );
|
|
4693 |
ReqCompleted( tsyReqHandle, aErrorValue );
|
|
4694 |
}
|
|
4695 |
}
|
|
4696 |
|
|
4697 |
// ---------------------------------------------------------------------------
|
|
4698 |
// CMmCustomTsy::NotifyNetworkConnectionFailure
|
|
4699 |
// Notifies of a network connection failure. This failure is so severe that
|
|
4700 |
// the only way to recover is to restart the phone.
|
|
4701 |
// (other items were commented in a header).
|
|
4702 |
// ---------------------------------------------------------------------------
|
|
4703 |
//
|
|
4704 |
TInt CMmCustomTsy::NotifyNetworkConnectionFailure()
|
|
4705 |
{
|
|
4706 |
iReqHandleType = ECustomTsyNotifyNetworkConnectionFailure;
|
|
4707 |
|
|
4708 |
return KErrNone;
|
|
4709 |
}
|
|
4710 |
|
|
4711 |
// ---------------------------------------------------------------------------
|
|
4712 |
// CMmCustomTsy::NotifyNetworkConnectionFailureCancel
|
|
4713 |
// Cancels a NotifyNetworkConnectionFailure.
|
|
4714 |
// (other items were commented in a header).
|
|
4715 |
// ---------------------------------------------------------------------------
|
|
4716 |
//
|
|
4717 |
TInt CMmCustomTsy::NotifyNetworkConnectionFailureCancel()
|
|
4718 |
{
|
|
4719 |
// reset the reqhandle
|
|
4720 |
TTsyReqHandle tsyReqHandle =
|
|
4721 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4722 |
ECustomTsyNotifyNetworkConnectionFailure );
|
|
4723 |
|
|
4724 |
if ( ECustomTsyReqHandleUnknown != tsyReqHandle )
|
|
4725 |
{
|
|
4726 |
// complete with cancel
|
|
4727 |
ReqCompleted( tsyReqHandle, KErrCancel );
|
|
4728 |
}
|
|
4729 |
|
|
4730 |
return KErrNone;
|
|
4731 |
}
|
|
4732 |
|
|
4733 |
// ---------------------------------------------------------------------------
|
|
4734 |
// CMmCustomTsy::CompleteNotifyNetworkConnectionFailure
|
|
4735 |
// Completes NotifyNetworkConnectionFailure.
|
|
4736 |
// (other items were commented in a header).
|
|
4737 |
// ---------------------------------------------------------------------------
|
|
4738 |
//
|
|
4739 |
void CMmCustomTsy::CompleteNotifyNetworkConnectionFailure()
|
|
4740 |
{
|
|
4741 |
// If SIM is inserted complete network connection failure
|
|
4742 |
if ( iMmPhoneTsy->NosBootState()->iSIMReady )
|
|
4743 |
{
|
|
4744 |
TFLOGSTRING("TSY: CMmCustomTsy::CompleteNotifyNetworkConnectionFailure");
|
|
4745 |
// reset the reqhandle
|
|
4746 |
TTsyReqHandle tsyReqHandle =
|
|
4747 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4748 |
ECustomTsyNotifyNetworkConnectionFailure );
|
|
4749 |
|
|
4750 |
// Check the reqHandle
|
|
4751 |
if( ECustomTsyReqHandleUnknown != tsyReqHandle )
|
|
4752 |
{
|
|
4753 |
ReqCompleted ( tsyReqHandle, KErrNone );
|
|
4754 |
}
|
|
4755 |
}
|
|
4756 |
}
|
|
4757 |
|
|
4758 |
// ---------------------------------------------------------------------------
|
|
4759 |
// CMmCustomTsy::SsRequestCompleteNotification
|
|
4760 |
// Notification request for "SS request complete".
|
|
4761 |
// (other items were commented in a header).
|
|
4762 |
// ---------------------------------------------------------------------------
|
|
4763 |
//
|
|
4764 |
TInt CMmCustomTsy::SsRequestCompleteNotification(
|
|
4765 |
TInt* aStatus )
|
|
4766 |
{
|
|
4767 |
iRetSsRequestComplete = aStatus;
|
|
4768 |
iReqHandleType = ECustomTsyNotifySsRequestComplete;
|
|
4769 |
|
|
4770 |
return KErrNone;
|
|
4771 |
}
|
|
4772 |
|
|
4773 |
// ---------------------------------------------------------------------------
|
|
4774 |
// CMmCustomTsy::CompleteSsRequestCompleteNotification
|
|
4775 |
// Completes notification request for "SS request complete".
|
|
4776 |
// (other items were commented in a header).
|
|
4777 |
// ---------------------------------------------------------------------------
|
|
4778 |
//
|
|
4779 |
void CMmCustomTsy::CompleteSsRequestCompleteNotification(
|
|
4780 |
TInt aSsStatus,
|
|
4781 |
TInt aError )
|
|
4782 |
{
|
|
4783 |
// Reset the req handle. Returns the deleted req handle
|
|
4784 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4785 |
ECustomTsyNotifySsRequestComplete );
|
|
4786 |
|
|
4787 |
// check if request was called
|
|
4788 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
4789 |
{
|
|
4790 |
if ( NULL == iRetSsRequestComplete )
|
|
4791 |
{
|
|
4792 |
ReqCompleted( reqHandle, KErrCorrupt );
|
|
4793 |
}
|
|
4794 |
else
|
|
4795 |
{
|
|
4796 |
*iRetSsRequestComplete = aSsStatus;
|
|
4797 |
iRetSsRequestComplete = NULL;
|
|
4798 |
ReqCompleted( reqHandle, aError );
|
|
4799 |
}
|
|
4800 |
}
|
|
4801 |
}
|
|
4802 |
|
|
4803 |
// ---------------------------------------------------------------------------
|
|
4804 |
// CMmCustomTsy::SsRequestCompleteNotificationCancel
|
|
4805 |
// Cancels notification request for "SS request complete".
|
|
4806 |
// (other items were commented in a header).
|
|
4807 |
// ---------------------------------------------------------------------------
|
|
4808 |
//
|
|
4809 |
TInt CMmCustomTsy::SsRequestCompleteNotificationCancel(
|
|
4810 |
const TTsyReqHandle )
|
|
4811 |
{
|
|
4812 |
iRetSsRequestComplete = NULL;
|
|
4813 |
|
|
4814 |
// reset reqhandler
|
|
4815 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4816 |
ECustomTsyNotifySsRequestComplete );
|
|
4817 |
|
|
4818 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
4819 |
{
|
|
4820 |
// complete with cancel
|
|
4821 |
ReqCompleted( reqHandle, KErrCancel );
|
|
4822 |
}
|
|
4823 |
|
|
4824 |
return KErrNone;
|
|
4825 |
}
|
|
4826 |
|
|
4827 |
// ---------------------------------------------------------------------------
|
|
4828 |
// CMmCustomTsy::GetSystemNetworkModesL
|
|
4829 |
// This method gets the supported network modes.
|
|
4830 |
// (other items were commented in a header).
|
|
4831 |
// ---------------------------------------------------------------------------
|
|
4832 |
//
|
|
4833 |
TInt CMmCustomTsy::GetSystemNetworkModesL(
|
|
4834 |
const TTsyReqHandle aTsyReqHandle,
|
|
4835 |
TUint32* aSystemNetworkModes )
|
|
4836 |
{
|
|
4837 |
TTsyReqHandle reqhandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
4838 |
ECustomTsyGetSystemNetworkModes );
|
|
4839 |
|
|
4840 |
if ( 0 < reqhandle )
|
|
4841 |
{
|
|
4842 |
// The request is already in processing because of previous request
|
|
4843 |
// Complete request with status value informing the client about
|
|
4844 |
// the situation.
|
|
4845 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
4846 |
}
|
|
4847 |
else
|
|
4848 |
{
|
|
4849 |
// save pointer to the packaged life timer info
|
|
4850 |
iSystemNetworkModes = aSystemNetworkModes;
|
|
4851 |
TBool useCurrentRats = EFalse;
|
|
4852 |
// call DOS
|
|
4853 |
CMmDataPackage dataPackage;
|
|
4854 |
dataPackage.PackData( &useCurrentRats );
|
|
4855 |
TInt ret = Phone()->MessageManager()->HandleRequestL(
|
|
4856 |
ECustomGetSystemNetworkModesIPC, &dataPackage );
|
|
4857 |
|
|
4858 |
// Check response of the extension
|
|
4859 |
if ( KErrNone != ret )
|
|
4860 |
{
|
|
4861 |
ReqCompleted( aTsyReqHandle, ret );
|
|
4862 |
}
|
|
4863 |
else
|
|
4864 |
{
|
|
4865 |
// Save the req handle type
|
|
4866 |
iReqHandleType = ECustomTsyGetSystemNetworkModes;
|
|
4867 |
}
|
|
4868 |
}
|
|
4869 |
|
|
4870 |
return KErrNone;
|
|
4871 |
}
|
|
4872 |
|
|
4873 |
// ---------------------------------------------------------------------------
|
|
4874 |
// CMmCustomTsy::CompleteGetSystemOrCurrentNetworkModes
|
|
4875 |
// Completes a GetSystemNetworkModes.
|
|
4876 |
// (other items were commented in a header).
|
|
4877 |
// ---------------------------------------------------------------------------
|
|
4878 |
//
|
|
4879 |
void CMmCustomTsy::CompleteGetSystemOrCurrentNetworkModes(
|
|
4880 |
TUint32 aSystemNetworkModes,
|
|
4881 |
TInt aResult )
|
|
4882 |
{
|
|
4883 |
// reset req handle. Returns the deleted req handle
|
|
4884 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4885 |
ECustomTsyGetSystemNetworkModes );
|
|
4886 |
|
|
4887 |
// check if handle exists
|
|
4888 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
4889 |
{
|
|
4890 |
// set the information for the client
|
|
4891 |
*iSystemNetworkModes = aSystemNetworkModes;
|
|
4892 |
|
|
4893 |
// complete
|
|
4894 |
ReqCompleted( reqHandle, aResult );
|
|
4895 |
}
|
|
4896 |
|
|
4897 |
// reset req handle. Returns the deleted req handle
|
|
4898 |
reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4899 |
ECustomTsyGetCurrentSystemNetworkMode );
|
|
4900 |
|
|
4901 |
// check if handle exists
|
|
4902 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
4903 |
{
|
|
4904 |
// set the information for the client
|
|
4905 |
*iCurrentNetworkMode = aSystemNetworkModes;
|
|
4906 |
|
|
4907 |
// complete
|
|
4908 |
ReqCompleted( reqHandle, aResult );
|
|
4909 |
}
|
|
4910 |
}
|
|
4911 |
|
|
4912 |
// ---------------------------------------------------------------------------
|
|
4913 |
// CMmCustomTsy::GetSystemNetworkModesCancel
|
|
4914 |
// Cancels a GetSystemNetworkModes.
|
|
4915 |
// (other items were commented in a header).
|
|
4916 |
// ---------------------------------------------------------------------------
|
|
4917 |
//
|
|
4918 |
TInt CMmCustomTsy::GetSystemNetworkModesCancel(
|
|
4919 |
const TTsyReqHandle aTsyReqHandle )
|
|
4920 |
{
|
|
4921 |
// reset the pointer to client data
|
|
4922 |
iSystemNetworkModes = NULL;
|
|
4923 |
|
|
4924 |
// reset the reqhandle
|
|
4925 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4926 |
ECustomTsyGetSystemNetworkModes );
|
|
4927 |
|
|
4928 |
// complete
|
|
4929 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
4930 |
|
|
4931 |
return KErrNone;
|
|
4932 |
}
|
|
4933 |
|
|
4934 |
// ---------------------------------------------------------------------------
|
|
4935 |
// CMmCustomTsy::SetSystemNetworkModeL
|
|
4936 |
// This method sets the system network mode.
|
|
4937 |
// (other items were commented in a header).
|
|
4938 |
// ---------------------------------------------------------------------------
|
|
4939 |
//
|
|
4940 |
TInt CMmCustomTsy::SetSystemNetworkModeL(
|
|
4941 |
const TTsyReqHandle aTsyReqHandle,
|
|
4942 |
RMmCustomAPI::TNetworkModeCaps* aSystemNetworkModeCaps )
|
|
4943 |
{
|
|
4944 |
TTsyReqHandle reqhandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
4945 |
ECustomTsySetSystemNetworkMode );
|
|
4946 |
|
|
4947 |
if ( 0 < reqhandle )
|
|
4948 |
{
|
|
4949 |
// The request is already in processing because of previous request
|
|
4950 |
// Complete request with status value informing the client about
|
|
4951 |
// the situation.
|
|
4952 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
4953 |
}
|
|
4954 |
else
|
|
4955 |
{
|
|
4956 |
// call DOS
|
|
4957 |
RMmCustomAPI::TNetworkModeCaps networkModeCaps =
|
|
4958 |
*aSystemNetworkModeCaps;
|
|
4959 |
CMmDataPackage dataPackage;
|
|
4960 |
dataPackage.PackData( &networkModeCaps );
|
|
4961 |
TInt ret = Phone()->MessageManager()->HandleRequestL(
|
|
4962 |
ECustomSetSystemNetworkModeIPC, &dataPackage );
|
|
4963 |
|
|
4964 |
// Check response of the extension
|
|
4965 |
if ( KErrNone != ret )
|
|
4966 |
{
|
|
4967 |
ReqCompleted( aTsyReqHandle, ret );
|
|
4968 |
}
|
|
4969 |
else
|
|
4970 |
{
|
|
4971 |
// Save the req handle type
|
|
4972 |
iReqHandleType = ECustomTsySetSystemNetworkMode;
|
|
4973 |
}
|
|
4974 |
}
|
|
4975 |
|
|
4976 |
return KErrNone;
|
|
4977 |
}
|
|
4978 |
|
|
4979 |
// ---------------------------------------------------------------------------
|
|
4980 |
// CMmCustomTsy::CompleteSetSystemNetworkMode
|
|
4981 |
// Completes a SetSystemNetworkMode.
|
|
4982 |
// (other items were commented in a header).
|
|
4983 |
// ---------------------------------------------------------------------------
|
|
4984 |
//
|
|
4985 |
void CMmCustomTsy::CompleteSetSystemNetworkMode(
|
|
4986 |
TInt aResult )
|
|
4987 |
{
|
|
4988 |
// reset req handle. Returns the deleted req handle
|
|
4989 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4990 |
ECustomTsySetSystemNetworkMode );
|
|
4991 |
|
|
4992 |
// check if handle exists
|
|
4993 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
4994 |
{
|
|
4995 |
// complete
|
|
4996 |
ReqCompleted( reqHandle, aResult );
|
|
4997 |
}
|
|
4998 |
}
|
|
4999 |
|
|
5000 |
// ---------------------------------------------------------------------------
|
|
5001 |
// CMmCustomTsy::GetCurrentSystemNetworkModeL
|
|
5002 |
// This function gets the current network mode GSM/UMTS/Dual.
|
|
5003 |
// (other items were commented in a header).
|
|
5004 |
// ---------------------------------------------------------------------------
|
|
5005 |
//
|
|
5006 |
TInt CMmCustomTsy::GetCurrentSystemNetworkModeL(
|
|
5007 |
const TTsyReqHandle aTsyReqHandle,
|
|
5008 |
TUint32* aNetworkMode )
|
|
5009 |
{
|
|
5010 |
TFLOGSTRING("CMmCustomTsy::GetCurrentSystemNetworkModeL");
|
|
5011 |
TTsyReqHandle reqhandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
5012 |
ECustomTsyGetCurrentSystemNetworkMode );
|
|
5013 |
|
|
5014 |
if ( 0 < reqhandle )
|
|
5015 |
{
|
|
5016 |
// The request is already in processing because of previous request
|
|
5017 |
// Complete request with status value informing the client about
|
|
5018 |
// the situation.
|
|
5019 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
5020 |
}
|
|
5021 |
else
|
|
5022 |
{
|
|
5023 |
iCurrentNetworkMode = aNetworkMode;
|
|
5024 |
// call DOS
|
|
5025 |
TInt ret = Phone()->MessageManager()->HandleRequestL(
|
|
5026 |
ECustomGetCurrentSystemNetworkModesIPC );
|
|
5027 |
|
|
5028 |
if ( KErrNone != ret )
|
|
5029 |
{
|
|
5030 |
ReqCompleted( aTsyReqHandle, ret );
|
|
5031 |
}
|
|
5032 |
else
|
|
5033 |
{
|
|
5034 |
iReqHandleType = ECustomTsyGetCurrentSystemNetworkMode;
|
|
5035 |
}
|
|
5036 |
}
|
|
5037 |
|
|
5038 |
return KErrNone;
|
|
5039 |
}
|
|
5040 |
|
|
5041 |
// ---------------------------------------------------------------------------
|
|
5042 |
// CMmCustomTsy::GetCurrentSystemNetworkModeCancel
|
|
5043 |
// Cancel outstanding request
|
|
5044 |
// (other items were commented in a header).
|
|
5045 |
// ---------------------------------------------------------------------------
|
|
5046 |
//
|
|
5047 |
TInt CMmCustomTsy::GetCurrentSystemNetworkModeCancel(
|
|
5048 |
const TTsyReqHandle aTsyReqHandle )
|
|
5049 |
{
|
|
5050 |
TFLOGSTRING("CMmCustomTsy::GetCurrentSystemNetworkModeCancel");
|
|
5051 |
|
|
5052 |
// reset pointer to client data
|
|
5053 |
iCurrentNetworkMode = NULL;
|
|
5054 |
|
|
5055 |
// reset reqhandle
|
|
5056 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5057 |
ECustomTsyGetCurrentSystemNetworkMode );
|
|
5058 |
|
|
5059 |
// complete with KErrCancel
|
|
5060 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
5061 |
|
|
5062 |
return KErrNone;
|
|
5063 |
}
|
|
5064 |
|
|
5065 |
// ---------------------------------------------------------------------------
|
|
5066 |
// CMmCustomTsy::GetSimFileInfoL
|
|
5067 |
// Gets data from a given location of a given sim file determined by the
|
|
5068 |
// aSimFileInfoPckg parameter. Saves the pointer to the client side store
|
|
5069 |
// buffer for further completion.
|
|
5070 |
// (other items were commented in a header).
|
|
5071 |
// ---------------------------------------------------------------------------
|
|
5072 |
//
|
|
5073 |
TInt CMmCustomTsy::GetSimFileInfoL(
|
|
5074 |
const TTsyReqHandle aTsyReqHandle,
|
|
5075 |
TDes8* aSimFileInfoPckg,
|
|
5076 |
TDes8* aSimResponseBuffer )
|
|
5077 |
{
|
|
5078 |
TFLOGSTRING( "TSY: CMmCustomTsy::GetSimFileInfoL" );
|
|
5079 |
TTsyReqHandle reqHandle =
|
|
5080 |
iTsyReqHandleStore->GetTsyReqHandle( ECustomTsyGetSimFileInfo );
|
|
5081 |
|
|
5082 |
// Unpack the TSimFileInfo data
|
|
5083 |
RMmCustomAPI::TSimFileInfoPckg* simFileInfoPckg =
|
|
5084 |
( RMmCustomAPI::TSimFileInfoPckg* ) aSimFileInfoPckg;
|
|
5085 |
|
|
5086 |
RMmCustomAPI::TSimFileInfo simFileInfo = ( *simFileInfoPckg )();
|
|
5087 |
|
|
5088 |
if ( 0 < reqHandle )
|
|
5089 |
{
|
|
5090 |
//The request is already in processing because of previous request
|
|
5091 |
//Check if the request is the same than before
|
|
5092 |
|
|
5093 |
//Check the file path in SIM where file is read, the offset from
|
|
5094 |
//beginning of the file and amount of data to read
|
|
5095 |
if ( ( KErrNotFound != simFileInfo.iPath.Match( iGetSimFileInfoReq.iPath ) )
|
|
5096 |
&& ( iGetSimFileInfoReq.iOffSet == simFileInfo.iOffSet )
|
|
5097 |
&& ( iGetSimFileInfoReq.iSize == simFileInfo.iSize ) )
|
|
5098 |
{
|
|
5099 |
TFLOGSTRING( "TSY: CMmCustomTsy::GetSimFileInfoL - Same info already requested" );
|
|
5100 |
|
|
5101 |
TGetSimFileInfoRequest* req = new ( ELeave ) TGetSimFileInfoRequest();
|
|
5102 |
req->iReqHandle = aTsyReqHandle;
|
|
5103 |
req->iSimFileInfo = aSimResponseBuffer;
|
|
5104 |
iGetSimFileInfoRequests.AppendL( req );
|
|
5105 |
}
|
|
5106 |
else
|
|
5107 |
{
|
|
5108 |
//Complete request with status value informing the client about
|
|
5109 |
//the situation.
|
|
5110 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
5111 |
}
|
|
5112 |
}
|
|
5113 |
else
|
|
5114 |
{
|
|
5115 |
iGetSimFileInfoReq = simFileInfo;
|
|
5116 |
// call DOS
|
|
5117 |
CMmDataPackage dataPackage;
|
|
5118 |
dataPackage.PackData( &simFileInfo );
|
|
5119 |
TInt ret = Phone()->MessageManager()->HandleRequestL(
|
|
5120 |
ECustomReadSimFileIPC, &dataPackage );
|
|
5121 |
|
|
5122 |
// check the return value of the call to DOS
|
|
5123 |
if ( KErrNone != ret )
|
|
5124 |
{
|
|
5125 |
ReqCompleted( aTsyReqHandle, ret );
|
|
5126 |
}
|
|
5127 |
else
|
|
5128 |
{
|
|
5129 |
TFLOGSTRING( "TSY: CMmCustomTsy::GetSimFileInfoL - Save handle" );
|
|
5130 |
// Save the req handle type
|
|
5131 |
iReqHandleType = ECustomTsyGetSimFileInfo;
|
|
5132 |
// Save request in queue for completion
|
|
5133 |
TGetSimFileInfoRequest* req = new ( ELeave ) TGetSimFileInfoRequest();
|
|
5134 |
req->iReqHandle = aTsyReqHandle;
|
|
5135 |
req->iSimFileInfo = aSimResponseBuffer;
|
|
5136 |
iGetSimFileInfoRequests.AppendL( req );
|
|
5137 |
}
|
|
5138 |
}
|
|
5139 |
|
|
5140 |
return KErrNone;
|
|
5141 |
}
|
|
5142 |
|
|
5143 |
// ---------------------------------------------------------------------------
|
|
5144 |
// CMmCustomTsy::GetSimFileInfoCancel
|
|
5145 |
// Cancels an outstanding GetSimFileInfo request.
|
|
5146 |
// (other items were commented in a header).
|
|
5147 |
// ---------------------------------------------------------------------------
|
|
5148 |
//
|
|
5149 |
TInt CMmCustomTsy::GetSimFileInfoCancel( TTsyReqHandle aTsyReqHandle )
|
|
5150 |
{
|
|
5151 |
TFLOGSTRING( "TSY: CMmCustomTsy::GetSimFileInfoCancel" );
|
|
5152 |
|
|
5153 |
for ( TInt i = 0; i < iGetSimFileInfoRequests.Count(); i++ )
|
|
5154 |
{
|
|
5155 |
TGetSimFileInfoRequest* req = iGetSimFileInfoRequests[ i ];
|
|
5156 |
if ( aTsyReqHandle == req->iReqHandle )
|
|
5157 |
{
|
|
5158 |
//reset the return pointer
|
|
5159 |
ReqCompleted( req->iReqHandle, KErrCancel );
|
|
5160 |
|
|
5161 |
iGetSimFileInfoRequests.Remove( i );
|
|
5162 |
iGetSimFileInfoRequests.Compress();
|
|
5163 |
|
|
5164 |
//Delete TGetSimFileInfoRequest object
|
|
5165 |
delete req;
|
|
5166 |
}
|
|
5167 |
}
|
|
5168 |
|
|
5169 |
if ( 0 == iGetSimFileInfoRequests.Count() )
|
|
5170 |
{
|
|
5171 |
// reset the reqhandle
|
|
5172 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5173 |
ECustomTsyGetSimFileInfo );
|
|
5174 |
|
|
5175 |
//Destroy Array
|
|
5176 |
iGetSimFileInfoRequests.ResetAndDestroy();
|
|
5177 |
}
|
|
5178 |
|
|
5179 |
return KErrNone;
|
|
5180 |
}
|
|
5181 |
|
|
5182 |
// ---------------------------------------------------------------------------
|
|
5183 |
// CMmCustomTsy::CompleteGetSimFileInfo
|
|
5184 |
// Completes an outstanding GetSimFileInfo request.
|
|
5185 |
// (other items were commented in a header).
|
|
5186 |
// ---------------------------------------------------------------------------
|
|
5187 |
//
|
|
5188 |
void CMmCustomTsy::CompleteGetSimFileInfo(
|
|
5189 |
TDesC8* aData,
|
|
5190 |
TInt aError )
|
|
5191 |
{
|
|
5192 |
TFLOGSTRING( "TSY: CMmCustomTsy::CompleteGetSimFileInfo" );
|
|
5193 |
|
|
5194 |
// reset the reqhandle
|
|
5195 |
TTsyReqHandle tsyReqHandle =
|
|
5196 |
iTsyReqHandleStore->ResetTsyReqHandle( ECustomTsyGetSimFileInfo );
|
|
5197 |
|
|
5198 |
// Check the reqHandle
|
|
5199 |
if ( ECustomTsyReqHandleUnknown != tsyReqHandle )
|
|
5200 |
{
|
|
5201 |
// complete
|
|
5202 |
TInt getSimFileInfoRequestsCount = iGetSimFileInfoRequests.Count();
|
|
5203 |
TFLOGSTRING2( "TSY: CMmCustomTsy::CompleteGetSimFileInfo - Complete %d requests", getSimFileInfoRequestsCount );
|
|
5204 |
|
|
5205 |
for ( TInt i = 0; i < getSimFileInfoRequestsCount; i++ )
|
|
5206 |
{
|
|
5207 |
TGetSimFileInfoRequest* req = iGetSimFileInfoRequests[ i ];
|
|
5208 |
|
|
5209 |
if ( ( KErrNone == aError ) && aData )
|
|
5210 |
{
|
|
5211 |
// check the size....
|
|
5212 |
if ( req->iSimFileInfo->MaxLength() >= aData->Length() )
|
|
5213 |
{
|
|
5214 |
req->iSimFileInfo->Copy( *aData );
|
|
5215 |
ReqCompleted( req->iReqHandle, aError );
|
|
5216 |
}
|
|
5217 |
else // data is too big for client's buffer
|
|
5218 |
{
|
|
5219 |
req->iSimFileInfo->Zero();
|
|
5220 |
ReqCompleted( req->iReqHandle, KErrOverflow );
|
|
5221 |
}
|
|
5222 |
}
|
|
5223 |
else
|
|
5224 |
{
|
|
5225 |
req->iSimFileInfo->Zero();
|
|
5226 |
ReqCompleted( req->iReqHandle, aError );
|
|
5227 |
}
|
|
5228 |
}
|
|
5229 |
}
|
|
5230 |
|
|
5231 |
//Destroy Array
|
|
5232 |
iGetSimFileInfoRequests.ResetAndDestroy();
|
|
5233 |
}
|
|
5234 |
|
|
5235 |
// ---------------------------------------------------------------------------
|
|
5236 |
// CMmCustomTsy::GetLifeTimeL
|
|
5237 |
// Gets the life timer's information and the manufacturing date of the phone.
|
|
5238 |
// (other items were commented in a header).
|
|
5239 |
// ---------------------------------------------------------------------------
|
|
5240 |
//
|
|
5241 |
TInt CMmCustomTsy::GetLifeTimeL(
|
|
5242 |
const TTsyReqHandle aTsyReqHandle,
|
|
5243 |
TDes8* aLifeTimerInfoPckg )
|
|
5244 |
{
|
|
5245 |
|
|
5246 |
TInt ret( KErrNone );
|
|
5247 |
TFLOGSTRING ("TSY: CMmCustomTsy::GetLifeTimeL");
|
|
5248 |
if ( sizeof(RMmCustomAPI::TLifeTimeData) != aLifeTimerInfoPckg->MaxLength() )
|
|
5249 |
{
|
|
5250 |
TFLOGSTRING ("TSY: CMmCustomTsy::GetLifeTimeL bad size argument");
|
|
5251 |
// Complete the request with appropiate error
|
|
5252 |
return KErrArgument;
|
|
5253 |
}
|
|
5254 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
5255 |
ECustomTsyGetLifeTimerInfo );
|
|
5256 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
5257 |
{
|
|
5258 |
TFLOGSTRING( "TSY: CMmCustomTsy::GetLifeTimeL - ECustomTsyReqHandleUnknown" );
|
|
5259 |
// The request is already in processing because of previous request.
|
|
5260 |
// Complete request with status value informing the client about
|
|
5261 |
// the situation.
|
|
5262 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
5263 |
}
|
|
5264 |
else
|
|
5265 |
{
|
|
5266 |
// save pointer to the packaged life timer info
|
|
5267 |
iLifeTimerInfoPckg = aLifeTimerInfoPckg;
|
|
5268 |
TFLOGSTRING( "TSY: CMmCustomTsy::GetLifeTimeL - send request" );
|
|
5269 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
5270 |
ECustomTsyGetLifeTimerInfo, aTsyReqHandle );
|
|
5271 |
ret = Phone()->MessageManager()->HandleRequestL(
|
|
5272 |
ECustomGetLifeTimeIPC);
|
|
5273 |
// Check response of the extension
|
|
5274 |
if ( KErrNone != ret )
|
|
5275 |
{
|
|
5276 |
TFLOGSTRING( "TSY: CMmCustomTsy::GetLifeTimeL - DOS layer returned error " );
|
|
5277 |
TTsyReqHandle tsyReqHandle =
|
|
5278 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5279 |
ECustomTsyGetLifeTimerInfo );
|
|
5280 |
if ( ECustomTsyReqHandleUnknown != tsyReqHandle )
|
|
5281 |
{
|
|
5282 |
TFLOGSTRING( "TSY: CMmCustomTsy::GetLifeTimeL - DOS error - unknown handle" );
|
|
5283 |
}
|
|
5284 |
ReqCompleted( aTsyReqHandle, ret );
|
|
5285 |
}
|
|
5286 |
}
|
|
5287 |
return KErrNone;
|
|
5288 |
}
|
|
5289 |
|
|
5290 |
// ---------------------------------------------------------------------------
|
|
5291 |
// CMmCustomTsy::GetLifeTimeCancel
|
|
5292 |
// Cancels an ongoing GetLifeTime request.
|
|
5293 |
// (other items were commented in a header).
|
|
5294 |
// ---------------------------------------------------------------------------
|
|
5295 |
//
|
|
5296 |
TInt CMmCustomTsy::GetLifeTimeCancel()
|
|
5297 |
{
|
|
5298 |
// reset the reqhandle
|
|
5299 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5300 |
ECustomTsyGetLifeTimerInfo );
|
|
5301 |
|
|
5302 |
// reset pointer to client data
|
|
5303 |
iLifeTimerInfoPckg = NULL;
|
|
5304 |
|
|
5305 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
5306 |
{
|
|
5307 |
// complete with cancel
|
|
5308 |
ReqCompleted( reqHandle, KErrCancel );
|
|
5309 |
}
|
|
5310 |
|
|
5311 |
return KErrNone;
|
|
5312 |
}
|
|
5313 |
|
|
5314 |
// ---------------------------------------------------------------------------
|
|
5315 |
// CMmCustomTsy::CompleteGetLifeTime
|
|
5316 |
// Completes a GetLifeTime request.
|
|
5317 |
// (other items were commented in a header).
|
|
5318 |
// ---------------------------------------------------------------------------
|
|
5319 |
//
|
|
5320 |
void CMmCustomTsy::CompleteGetLifeTime(
|
|
5321 |
RMmCustomAPI::TLifeTimeData& aLifeTimerData,
|
|
5322 |
TInt aErrorValue )
|
|
5323 |
{
|
|
5324 |
// reset the reqhandle
|
|
5325 |
TTsyReqHandle tsyReqHandle =
|
|
5326 |
iTsyReqHandleStore->ResetTsyReqHandle( ECustomTsyGetLifeTimerInfo );
|
|
5327 |
|
|
5328 |
// Check the reqHandle
|
|
5329 |
if ( ECustomTsyReqHandleUnknown != tsyReqHandle )
|
|
5330 |
{
|
|
5331 |
// Check if there is error
|
|
5332 |
if ( KErrNone == aErrorValue )
|
|
5333 |
{
|
|
5334 |
// pack the return information
|
|
5335 |
RMmCustomAPI::TLifeTimeDataPckg aPackg ( aLifeTimerData);
|
|
5336 |
// Copy the return info into the client side
|
|
5337 |
(*iLifeTimerInfoPckg) = aPackg;
|
|
5338 |
}
|
|
5339 |
// reset the pointer to client space
|
|
5340 |
iLifeTimerInfoPckg = NULL;
|
|
5341 |
// complete
|
|
5342 |
ReqCompleted( tsyReqHandle, aErrorValue );
|
|
5343 |
}
|
|
5344 |
}
|
|
5345 |
|
|
5346 |
// ---------------------------------------------------------------------------
|
|
5347 |
// CMmCustomTsy::DeliverCode
|
|
5348 |
// Deliveres code and unblock code.
|
|
5349 |
// (other items were commented in a header).
|
|
5350 |
// ---------------------------------------------------------------------------
|
|
5351 |
//
|
|
5352 |
void CMmCustomTsy::DeliverCodeL(
|
|
5353 |
RMobilePhone::TCodeAndUnblockCode aCodes )
|
|
5354 |
{
|
|
5355 |
iMmSecurityTsy->DeliverCodeL( aCodes );
|
|
5356 |
}
|
|
5357 |
|
|
5358 |
// ---------------------------------------------------------------------------
|
|
5359 |
// CMmCustomTsy::SetDriveModeL
|
|
5360 |
// This method sets Drive Mode status using the aModeStatus variable.
|
|
5361 |
// (other items were commented in a header).
|
|
5362 |
// ---------------------------------------------------------------------------
|
|
5363 |
//
|
|
5364 |
TInt CMmCustomTsy::SetDriveModeL(
|
|
5365 |
const TTsyReqHandle aTsyReqHandle,
|
|
5366 |
RMmCustomAPI::TSetDriveMode* aModeStatus )
|
|
5367 |
{
|
|
5368 |
TFLOGSTRING3("TSY: CMmCustomTsy::SetDriveModeL - Req handle: %d, Mode status: %d", aTsyReqHandle, *aModeStatus );
|
|
5369 |
if ( (iUsingFeatureManager) && (iFeatureControl.FeatureSupported(NFeature::KDriveModeCanRestrictMtCalls) == KFeatureSupported) )
|
|
5370 |
{
|
|
5371 |
// get the handle
|
|
5372 |
TTsyReqHandle setDriveModeHandle =
|
|
5373 |
iTsyReqHandleStore->GetTsyReqHandle( ECustomTsySetDriveMode );
|
|
5374 |
|
|
5375 |
if ( setDriveModeHandle > 0 )
|
|
5376 |
{
|
|
5377 |
// The request is already in processing because of previous
|
|
5378 |
// request. Complete request with status value informing the
|
|
5379 |
// client about the situation.
|
|
5380 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
5381 |
}
|
|
5382 |
else
|
|
5383 |
{
|
|
5384 |
// call DOS
|
|
5385 |
// packed parameter: TSetDriveMode (mode status)
|
|
5386 |
CMmDataPackage dataPackage;
|
|
5387 |
dataPackage.PackData( aModeStatus );
|
|
5388 |
// allow for ECustomSetDriveModeIPC immediate completion
|
|
5389 |
#ifdef REQHANDLE_TIMER
|
|
5390 |
// set timer for the request
|
|
5391 |
SetTypeOfResponse ( ECustomTsySetDriveMode, aTsyReqHandle );
|
|
5392 |
#else
|
|
5393 |
iTsyReqHandleStore->SetTsyReqHandle( ECustomTsySetDriveMode,
|
|
5394 |
aTsyReqHandle );
|
|
5395 |
#endif // REQHANDLE_TIMER
|
|
5396 |
TInt ret = iMmPhoneTsy->MessageManager()->HandleRequestL(
|
|
5397 |
ECustomSetDriveModeIPC, &dataPackage );
|
|
5398 |
|
|
5399 |
// check success
|
|
5400 |
if ( (KErrNone != ret) && (iTsyReqHandleStore->ResetTsyReqHandle(ECustomTsySetDriveMode)) )
|
|
5401 |
{
|
|
5402 |
ReqCompleted ( aTsyReqHandle, ret );
|
|
5403 |
}
|
|
5404 |
}
|
|
5405 |
}
|
|
5406 |
else
|
|
5407 |
{
|
|
5408 |
ReqCompleted ( aTsyReqHandle, KErrNotSupported );
|
|
5409 |
}
|
|
5410 |
|
|
5411 |
return KErrNone;
|
|
5412 |
}
|
|
5413 |
|
|
5414 |
// ---------------------------------------------------------------------------
|
|
5415 |
// CMmCustomTsy::CompleteSetDriveMode
|
|
5416 |
// Completes a Set Drive Mode request.
|
|
5417 |
// (other items were commented in a header).
|
|
5418 |
// ---------------------------------------------------------------------------
|
|
5419 |
//
|
|
5420 |
void CMmCustomTsy::CompleteSetDriveMode(
|
|
5421 |
TInt aErrorCode )
|
|
5422 |
{
|
|
5423 |
TFLOGSTRING2( "TSY: CMmCustomTsy::CompleteSetDriveMode - Error code: %d", aErrorCode );
|
|
5424 |
if ( (iUsingFeatureManager) && (iFeatureControl.FeatureSupported(NFeature::KDriveModeCanRestrictMtCalls) == KFeatureSupported) )
|
|
5425 |
{
|
|
5426 |
//Reset req handle, returns the deleted req handle
|
|
5427 |
TTsyReqHandle reqHandle =
|
|
5428 |
iTsyReqHandleStore->ResetTsyReqHandle( ECustomTsySetDriveMode );
|
|
5429 |
|
|
5430 |
//check if request was called
|
|
5431 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
5432 |
{
|
|
5433 |
//complete
|
|
5434 |
ReqCompleted( reqHandle, aErrorCode );
|
|
5435 |
}
|
|
5436 |
}
|
|
5437 |
}
|
|
5438 |
|
|
5439 |
// ---------------------------------------------------------------------------
|
|
5440 |
// CMmCustomTsy::IsRequestPossibleInOffLine
|
|
5441 |
// Checks wether a ETel request can be performed or not while offline mode is
|
|
5442 |
// enabled
|
|
5443 |
// (other items were commented in a header).
|
|
5444 |
// ---------------------------------------------------------------------------
|
|
5445 |
//
|
|
5446 |
TBool CMmCustomTsy::IsRequestPossibleInOffline(
|
|
5447 |
TInt aIpc )
|
|
5448 |
{
|
|
5449 |
// we assume here that most of the requests are possible, thefore
|
|
5450 |
// we switch for the not possible ones, optimizing a bit the checking.
|
|
5451 |
TBool isRequestPossible ( ETrue );
|
|
5452 |
// yet another switching function, yeah!
|
|
5453 |
switch ( aIpc )
|
|
5454 |
{
|
|
5455 |
//case ECustomSsAdditionalInfoNotificationIPC: //ok (but shouldn't be
|
|
5456 |
//triggered anyways)
|
|
5457 |
//case ECustomNotifySsRequestCompleteIPC: //ok (but shouldn't be
|
|
5458 |
//triggered anyways)
|
|
5459 |
//case ECustomStartSimCbTopicBrowsingIPC: //ok
|
|
5460 |
//case ECustomGetNextSimCbTopicIPC: //ok
|
|
5461 |
//case ECustomDeleteSimCbTopicIPC: //ok
|
|
5462 |
//case ECustomReadSimFileIPC: //ok
|
|
5463 |
//case ECustomNotifyDtmfEventIPC: //ok (policy is to leave
|
|
5464 |
//the notifications as ok)
|
|
5465 |
//case ECustomGetDiagnosticOctetsIPC: //ok (NO?, this only applies to
|
|
5466 |
//call so...should be no)
|
|
5467 |
//case ECustomSetAlsBlockedIPC: //ok
|
|
5468 |
//case ECustomGetAlsBlockedIPC: //ok
|
|
5469 |
//case ECustomCheckAlsPpSupportIPC: //ok
|
|
5470 |
//case ECustomGetRemoteAlertingToneStatusIPC:
|
|
5471 |
//case ECustomCallOriginIPC: //ok (only for emergency)
|
|
5472 |
//case ECustomNotifyAlsBlockedChangedIPC: //ok //Notify Als
|
|
5473 |
//Blocked Change
|
|
5474 |
//case ECustomTerminateCallIPC: //ok (or no?) //Terminate a Call
|
|
5475 |
//case ECustomClearCallBlackListIPC: //ok //Clear call blacklist
|
|
5476 |
//case ECustomSimLockActivateIPC: //ok
|
|
5477 |
//case ECustomSimLockDeActivateIPC: //ok
|
|
5478 |
//case EReadViagHomeZoneParamsIPC: //ok
|
|
5479 |
//case EReadViagHomeZoneCacheIPC: //ok
|
|
5480 |
//case EWriteViagHomeZoneCacheIPC: //ok
|
|
5481 |
//case ECustomGetCipheringInfoIPC: //ok
|
|
5482 |
//case ECustomNotifyCipheringInfoChangeIPC: //ok
|
|
5483 |
//case ECustomNotifyNSPSStatusIPC: //ok
|
|
5484 |
case ECustomNetWakeupIPC: //NO
|
|
5485 |
//case ECustomGetNetworkProviderNameIPC: //ok //(info is got from sim)
|
|
5486 |
case ECustomGetOperatorNameIPC: //NO //(there is no operator
|
|
5487 |
//available in offline)
|
|
5488 |
//case ECustomGetProgrammableOperatorLogoIPC: //ok
|
|
5489 |
case ECustomResetNetServerIPC: //NO (or yes, but this one is sensible)
|
|
5490 |
//case ECustomNotifyProgrammableOperatorLogoChangeIPC: //ok
|
|
5491 |
//case ECustomNotifyNetworkConnectionFailureIPC: //ok
|
|
5492 |
//case ECustomGetAirTimeDurationIPC: //ok (at least for emergency call)
|
|
5493 |
//case ECustomNotifyPndCacheReadyIPC: //ok
|
|
5494 |
//case ECustomGetPndCacheStatusIPC: //ok
|
|
5495 |
//case ECustomNotifySsNetworkEventIPC: //ok //(shouldn't be possible
|
|
5496 |
//to get any )
|
|
5497 |
//case ECustomCheckTwoDigitDialSupportIPC: //ok
|
|
5498 |
//case ECustomSendAPDUReqIPC: //ok
|
|
5499 |
//case ECustomGetLifeTimeIPC: //ok
|
|
5500 |
//case ECustomIsBlockedIPC: //ok
|
|
5501 |
//case ECustomCheckSecurityCodeIPC: //ok
|
|
5502 |
//case ECustomCheckEmergencyNumberIPC: //ok
|
|
5503 |
//case ECustomSatRefreshCompleteNotificationIPC: //ok
|
|
5504 |
//case ECustomDisablePhoneLockIPC: //ok
|
|
5505 |
//case ECustomGetActivePinIPC: //ok
|
|
5506 |
//case ECustomReleaseFileIPC: //ok
|
|
5507 |
//case ECustomRestartFileIPC: //ok
|
|
5508 |
//case ECustomNotifyEGprsInfoChange: //ok
|
|
5509 |
//case ECustomGetEGprsInfo: //ok
|
|
5510 |
//case EGet3GPBInfoIPC: //ok
|
|
5511 |
//case ECustomSetDriveModeIPC: //ok
|
|
5512 |
//case ECustomReadHSxPAStatusIPC: //ok
|
|
5513 |
//case ECustomWriteHSxPAStatusIPC: //ok
|
|
5514 |
//case ECustomNotifyHSxPAStatusIPC: //ok
|
|
5515 |
//case ECustomNotifyCellInfoChangeIPC: //ok
|
|
5516 |
//case ECustomGetCellInfoIPC: //ok
|
|
5517 |
|
|
5518 |
//case ECustomGetBandSelectionIPC: //ok
|
|
5519 |
//case ECustomNotifyRemoteAlertingToneStatusChangeIPC: //ok
|
|
5520 |
|
|
5521 |
case ECustomSetSystemNetworkModeIPC:
|
|
5522 |
case ECustomSetBandSelectionIPC:
|
|
5523 |
isRequestPossible = EFalse;
|
|
5524 |
break;
|
|
5525 |
default:
|
|
5526 |
break;
|
|
5527 |
}
|
|
5528 |
|
|
5529 |
return isRequestPossible;
|
|
5530 |
}
|
|
5531 |
|
|
5532 |
// ---------------------------------------------------------------------------
|
|
5533 |
// CMmCustomTsy::CompleteGetCurrentSystemNetworkMode
|
|
5534 |
// Completes Get Current System Network Mode
|
|
5535 |
// (other items were commented in a header).
|
|
5536 |
// ---------------------------------------------------------------------------
|
|
5537 |
//
|
|
5538 |
void CMmCustomTsy::CompleteGetCurrentSystemNetworkMode(
|
|
5539 |
TUint32 aCurrentNetwork,
|
|
5540 |
TInt aResult )
|
|
5541 |
{
|
|
5542 |
// reset req handle. Returns the deleted req handle
|
|
5543 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5544 |
ECustomTsyGetCurrentSystemNetworkMode );
|
|
5545 |
|
|
5546 |
// check if handle exists
|
|
5547 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
5548 |
{
|
|
5549 |
// set the information for the client
|
|
5550 |
*iCurrentNetworkMode = aCurrentNetwork;
|
|
5551 |
|
|
5552 |
// reset the varible
|
|
5553 |
iCurrentNetworkMode = NULL;
|
|
5554 |
|
|
5555 |
// complete
|
|
5556 |
ReqCompleted( reqHandle, aResult );
|
|
5557 |
}
|
|
5558 |
}
|
|
5559 |
|
|
5560 |
// ---------------------------------------------------------------------------
|
|
5561 |
// CMmCustomTsy::SetSimMessageStatusReadL
|
|
5562 |
// Sets SIM SMS storage status to "read". Implements
|
|
5563 |
// CustomAPI method SetSimMessageStatusRead.
|
|
5564 |
// (other items were commented in a header).
|
|
5565 |
// ---------------------------------------------------------------------------
|
|
5566 |
//
|
|
5567 |
TInt CMmCustomTsy::SetSimMessageStatusReadL(
|
|
5568 |
const TTsyReqHandle aTsyReqHandle,
|
|
5569 |
TTime& aTime,
|
|
5570 |
TInt& aTimezoneDiff )
|
|
5571 |
{
|
|
5572 |
// NOTE: This method asynchronously calls DOS, and then immediately
|
|
5573 |
// completes with KErrNone. Any problems or errors are silently ignored.
|
|
5574 |
|
|
5575 |
//call DOS
|
|
5576 |
CMmDataPackage dataPackage;
|
|
5577 |
dataPackage.PackData( &aTime, &aTimezoneDiff );
|
|
5578 |
iMmPhoneTsy->MessageManager()->HandleRequestL(
|
|
5579 |
ECustomSetSimMessageStatusReadIPC, &dataPackage );
|
|
5580 |
|
|
5581 |
// immediately complete, ignore the result.
|
|
5582 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
5583 |
|
|
5584 |
return KErrNone;
|
|
5585 |
}
|
|
5586 |
|
|
5587 |
// ---------------------------------------------------------------------------
|
|
5588 |
// CMmCustomTsy::ISVDialNumberCheck
|
|
5589 |
// Saves call object for completion
|
|
5590 |
// (other items were commented in a header).
|
|
5591 |
// ---------------------------------------------------------------------------
|
|
5592 |
//
|
|
5593 |
void CMmCustomTsy::SetObjectForISVDialNumberCheck(
|
|
5594 |
CMmVoiceCallTsy* aCallObject )
|
|
5595 |
{
|
|
5596 |
TFLOGSTRING2("TSY: CMmCustomTsy::SetObjectForISVDialNumberCheck aCallObject=%x", aCallObject );
|
|
5597 |
//Save pointer for completion of check emergency number
|
|
5598 |
iISVDialNumberCheckObject = aCallObject;
|
|
5599 |
//ISV dial has been requested
|
|
5600 |
iISVDialNumberCheck = ETrue;
|
|
5601 |
}
|
|
5602 |
|
|
5603 |
// ---------------------------------------------------------------------------
|
|
5604 |
// CMmCustomTsy::NotifyRauEvent
|
|
5605 |
// Sets RAU event notification
|
|
5606 |
// (other items were commented in a header).
|
|
5607 |
// ---------------------------------------------------------------------------
|
|
5608 |
//
|
|
5609 |
TInt CMmCustomTsy::NotifyRauEvent(
|
|
5610 |
RMmCustomAPI::TRauEventStatus* aEventStatus )
|
|
5611 |
{
|
|
5612 |
TFLOGSTRING("TSY: CMmCustomTsy::NotifyRauEvent");
|
|
5613 |
|
|
5614 |
// save pointer to client data
|
|
5615 |
iRauEventStatus = aEventStatus;
|
|
5616 |
|
|
5617 |
// save handle type
|
|
5618 |
iReqHandleType = ECustomTsyNotifyRauEvent;
|
|
5619 |
|
|
5620 |
return KErrNone;
|
|
5621 |
}
|
|
5622 |
|
|
5623 |
// ---------------------------------------------------------------------------
|
|
5624 |
// CMmCustomTsy::CompleteNotifyRauEvent
|
|
5625 |
// Completes a NotifyRauEvent request.
|
|
5626 |
// (other items were commented in a header).
|
|
5627 |
// ---------------------------------------------------------------------------
|
|
5628 |
//
|
|
5629 |
void CMmCustomTsy::CompleteNotifyRauEvent(
|
|
5630 |
RMmCustomAPI::TRauEventStatus aEventStatus,
|
|
5631 |
TInt aErrorCode )
|
|
5632 |
{
|
|
5633 |
TFLOGSTRING("TSY: CMmCustomTsy::CompleteNotifyRauEvent");
|
|
5634 |
|
|
5635 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5636 |
ECustomTsyNotifyRauEvent );
|
|
5637 |
|
|
5638 |
// check if request was called
|
|
5639 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
5640 |
{
|
|
5641 |
// check if response was ok
|
|
5642 |
if ( KErrNone == aErrorCode )
|
|
5643 |
{
|
|
5644 |
// set the information for the client
|
|
5645 |
*iRauEventStatus = aEventStatus;
|
|
5646 |
}
|
|
5647 |
|
|
5648 |
// reset the internal variable
|
|
5649 |
iRauEventStatus = NULL;
|
|
5650 |
// complete
|
|
5651 |
ReqCompleted( reqHandle, aErrorCode );
|
|
5652 |
}
|
|
5653 |
}
|
|
5654 |
|
|
5655 |
// ---------------------------------------------------------------------------
|
|
5656 |
// CMmCustomTsy::NotifyRauEventCancel
|
|
5657 |
// This method cancels an outstanding notification of RAU event, placed with
|
|
5658 |
// the NotifyRauEvent function.
|
|
5659 |
// (other items were commented in a header).
|
|
5660 |
// ---------------------------------------------------------------------------
|
|
5661 |
//
|
|
5662 |
TInt CMmCustomTsy::NotifyRauEventCancel()
|
|
5663 |
{
|
|
5664 |
// reset reqhandle
|
|
5665 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5666 |
ECustomTsyNotifyRauEvent );
|
|
5667 |
|
|
5668 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
5669 |
{
|
|
5670 |
// reset pointer to client data
|
|
5671 |
iRauEventStatus = NULL;
|
|
5672 |
|
|
5673 |
ReqCompleted( reqHandle, KErrCancel );
|
|
5674 |
}
|
|
5675 |
|
|
5676 |
return KErrNone;
|
|
5677 |
}
|
|
5678 |
|
|
5679 |
// ---------------------------------------------------------------------------
|
|
5680 |
// CMmCustomTsy::ReadHSxPAStatusL
|
|
5681 |
// Read high speed channel status
|
|
5682 |
// (other items were commented in a header).
|
|
5683 |
// ---------------------------------------------------------------------------
|
|
5684 |
//
|
|
5685 |
TInt CMmCustomTsy::ReadHSxPAStatusL(
|
|
5686 |
const TTsyReqHandle aTsyReqHandle,
|
|
5687 |
RMmCustomAPI::THSxPAStatus* aHSxPAStatus )
|
|
5688 |
{
|
|
5689 |
TFLOGSTRING("TSY: CMmCustomTsy::ReadHSxPAStatusL");
|
|
5690 |
|
|
5691 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
5692 |
ECustomTsyReadHSxPAStatus );
|
|
5693 |
|
|
5694 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
5695 |
{
|
|
5696 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
5697 |
}
|
|
5698 |
else
|
|
5699 |
{
|
|
5700 |
// save pointer to client data
|
|
5701 |
iRetHSxPAStatus = aHSxPAStatus;
|
|
5702 |
|
|
5703 |
// call DOS (no packed parameters)
|
|
5704 |
TInt ret = Phone()->MessageManager()->HandleRequestL(
|
|
5705 |
ECustomReadHSxPAStatusIPC );
|
|
5706 |
|
|
5707 |
// check the result of the call
|
|
5708 |
if ( KErrNone != ret )
|
|
5709 |
{
|
|
5710 |
ReqCompleted( aTsyReqHandle, ret );
|
|
5711 |
}
|
|
5712 |
else
|
|
5713 |
{
|
|
5714 |
// Store the request handle
|
|
5715 |
iReqHandleType = ECustomTsyReadHSxPAStatus;
|
|
5716 |
}
|
|
5717 |
}
|
|
5718 |
|
|
5719 |
return KErrNone;
|
|
5720 |
}
|
|
5721 |
|
|
5722 |
// ---------------------------------------------------------------------------
|
|
5723 |
// CMmCustomTsy::CompleteReadHSxPAStatus
|
|
5724 |
// Completes a ReadHSxPAStatus request
|
|
5725 |
// (other items were commented in a header).
|
|
5726 |
// ---------------------------------------------------------------------------
|
|
5727 |
//
|
|
5728 |
void CMmCustomTsy::CompleteReadHSxPAStatus(
|
|
5729 |
CMmDataPackage* aDataPackage,
|
|
5730 |
TInt aErrorCode )
|
|
5731 |
{
|
|
5732 |
TFLOGSTRING("TSY: CMmCustomTsy::CompleteReadHSxPAStatus");
|
|
5733 |
|
|
5734 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5735 |
ECustomTsyReadHSxPAStatus );
|
|
5736 |
|
|
5737 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
5738 |
{
|
|
5739 |
if ( KErrNone == aErrorCode )
|
|
5740 |
{
|
|
5741 |
RMmCustomAPI::THSxPAStatus status;
|
|
5742 |
aDataPackage->UnPackData( status );
|
|
5743 |
|
|
5744 |
TFLOGSTRING2("TSY: CMmCustomTsy::CompleteReadHSxPAStatus, status = %d", status);
|
|
5745 |
|
|
5746 |
// Save the status.
|
|
5747 |
iHSxPAStatus = status;
|
|
5748 |
|
|
5749 |
// set the information for the client
|
|
5750 |
*iRetHSxPAStatus = status;
|
|
5751 |
|
|
5752 |
// reset the internal variable
|
|
5753 |
iRetHSxPAStatus = NULL;
|
|
5754 |
//Complete request to success
|
|
5755 |
ReqCompleted( reqHandle, KErrNone );
|
|
5756 |
}
|
|
5757 |
else
|
|
5758 |
{
|
|
5759 |
// Complete with error
|
|
5760 |
ReqCompleted( reqHandle, aErrorCode );
|
|
5761 |
}
|
|
5762 |
}
|
|
5763 |
}
|
|
5764 |
|
|
5765 |
// ---------------------------------------------------------------------------
|
|
5766 |
// CMmCustomTsy::ReadHSxPAStatusCancel
|
|
5767 |
// Cancels a ReadHSxPAStatus request
|
|
5768 |
// (other items were commented in a header).
|
|
5769 |
// ---------------------------------------------------------------------------
|
|
5770 |
//
|
|
5771 |
TInt CMmCustomTsy::ReadHSxPAStatusCancel()
|
|
5772 |
{
|
|
5773 |
TFLOGSTRING("TSY: CMmCustomTsy::ReadHSxPAStatusCancel");
|
|
5774 |
|
|
5775 |
// reset the reqhandle
|
|
5776 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5777 |
ECustomTsyReadHSxPAStatus );
|
|
5778 |
|
|
5779 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
5780 |
{
|
|
5781 |
// reset the pointer to client data
|
|
5782 |
iRetHSxPAStatus = NULL;
|
|
5783 |
|
|
5784 |
ReqCompleted( reqHandle, KErrCancel );
|
|
5785 |
}
|
|
5786 |
|
|
5787 |
return KErrNone;
|
|
5788 |
}
|
|
5789 |
|
|
5790 |
// ---------------------------------------------------------------------------
|
|
5791 |
// CMmCustomTsy::WriteHSxPAStatusL
|
|
5792 |
// Write HSxPAStatus
|
|
5793 |
// (other items were commented in a header).
|
|
5794 |
// ---------------------------------------------------------------------------
|
|
5795 |
//
|
|
5796 |
TInt CMmCustomTsy::WriteHSxPAStatusL(
|
|
5797 |
const TTsyReqHandle aTsyReqHandle,
|
|
5798 |
RMmCustomAPI::THSxPAStatus* aHSxPAStatus )
|
|
5799 |
{
|
|
5800 |
TFLOGSTRING2("TSY: CMmCustomTsy::WriteHSxPAStatusL. New status: %d", *aHSxPAStatus);
|
|
5801 |
|
|
5802 |
iSetHSxPAStatus = aHSxPAStatus;
|
|
5803 |
|
|
5804 |
// get the handle
|
|
5805 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
5806 |
ECustomTsyWriteHSxPAStatus );
|
|
5807 |
|
|
5808 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
5809 |
{
|
|
5810 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
5811 |
}
|
|
5812 |
else
|
|
5813 |
{
|
|
5814 |
CMmDataPackage dataPackage;
|
|
5815 |
dataPackage.PackData( iSetHSxPAStatus );
|
|
5816 |
|
|
5817 |
TInt ret = Phone()->MessageManager()->HandleRequestL(
|
|
5818 |
ECustomWriteHSxPAStatusIPC, &dataPackage );
|
|
5819 |
|
|
5820 |
if ( KErrNone != ret )
|
|
5821 |
{
|
|
5822 |
ReqCompleted( aTsyReqHandle, ret );
|
|
5823 |
}
|
|
5824 |
else
|
|
5825 |
{
|
|
5826 |
// Save the req handle type
|
|
5827 |
iReqHandleType = ECustomTsyWriteHSxPAStatus;
|
|
5828 |
}
|
|
5829 |
}
|
|
5830 |
|
|
5831 |
return KErrNone;
|
|
5832 |
}
|
|
5833 |
|
|
5834 |
// ---------------------------------------------------------------------------
|
|
5835 |
// CMmCustomTsy::CompleteWriteHSxPAStatus
|
|
5836 |
// Complete WriteHSxPAStatus request
|
|
5837 |
// (other items were commented in a header).
|
|
5838 |
// ---------------------------------------------------------------------------
|
|
5839 |
//
|
|
5840 |
void CMmCustomTsy::CompleteWriteHSxPAStatus(
|
|
5841 |
TInt aErrorCode )
|
|
5842 |
{
|
|
5843 |
TFLOGSTRING("TSY: CMmCustomTsy::CompleteWriteHSxPAStatus");
|
|
5844 |
|
|
5845 |
//reset req handle.
|
|
5846 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5847 |
ECustomTsyWriteHSxPAStatus );
|
|
5848 |
|
|
5849 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
5850 |
{
|
|
5851 |
if ( KErrNone == aErrorCode )
|
|
5852 |
{
|
|
5853 |
// Save the current status
|
|
5854 |
iHSxPAStatus = *iSetHSxPAStatus;
|
|
5855 |
}
|
|
5856 |
|
|
5857 |
// erase pointer to client data
|
|
5858 |
iSetHSxPAStatus = NULL;
|
|
5859 |
|
|
5860 |
ReqCompleted( reqHandle, aErrorCode );
|
|
5861 |
}
|
|
5862 |
}
|
|
5863 |
|
|
5864 |
// ---------------------------------------------------------------------------
|
|
5865 |
// CMmCustomTsy::WriteHSxPAStatusCancel
|
|
5866 |
// Cancel WriteHSxPAStatus request
|
|
5867 |
// (other items were commented in a header).
|
|
5868 |
// ---------------------------------------------------------------------------
|
|
5869 |
//
|
|
5870 |
TInt CMmCustomTsy::WriteHSxPAStatusCancel()
|
|
5871 |
{
|
|
5872 |
TFLOGSTRING("TSY: CMmCustomTsy::WriteHSxPAStatusCancel");
|
|
5873 |
|
|
5874 |
// reset the reqhandle
|
|
5875 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5876 |
ECustomTsyWriteHSxPAStatus );
|
|
5877 |
|
|
5878 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
5879 |
{
|
|
5880 |
// erase pointer to client data
|
|
5881 |
iSetHSxPAStatus = NULL;
|
|
5882 |
|
|
5883 |
ReqCompleted( reqHandle, KErrCancel );
|
|
5884 |
}
|
|
5885 |
|
|
5886 |
return KErrNone;
|
|
5887 |
}
|
|
5888 |
|
|
5889 |
// ---------------------------------------------------------------------------
|
|
5890 |
// CMmCustomTsy::NotifyHSxPAStatus
|
|
5891 |
// Set HSxPA notification
|
|
5892 |
// (other items were commented in a header).
|
|
5893 |
// ---------------------------------------------------------------------------
|
|
5894 |
//
|
|
5895 |
TInt CMmCustomTsy::NotifyHSxPAStatus(
|
|
5896 |
RMmCustomAPI::THSxPAStatus* aHSxPAStatus )
|
|
5897 |
{
|
|
5898 |
TFLOGSTRING("TSY: CMmCustomTsy::NotifyHSxPAStatus");
|
|
5899 |
|
|
5900 |
// save pointer to client data
|
|
5901 |
iRetNotifyHSxPAStatus = aHSxPAStatus;
|
|
5902 |
|
|
5903 |
// set the reqhandle type
|
|
5904 |
iReqHandleType = ECustomTsyNotifyHSxPAStatus;
|
|
5905 |
|
|
5906 |
return KErrNone;
|
|
5907 |
}
|
|
5908 |
|
|
5909 |
// ---------------------------------------------------------------------------
|
|
5910 |
// CMmCustomTsy::CompleteNotifyHSxPAStatus
|
|
5911 |
// Complete HSxPA notification
|
|
5912 |
// (other items were commented in a header).
|
|
5913 |
// ---------------------------------------------------------------------------
|
|
5914 |
//
|
|
5915 |
void CMmCustomTsy::CompleteNotifyHSxPAStatus(
|
|
5916 |
CMmDataPackage* aDataPackage,
|
|
5917 |
TInt aErrorCode )
|
|
5918 |
{
|
|
5919 |
TFLOGSTRING2("TSY: CMmCustomTsy::CompleteNotifyHSxPAStatus, Error: %d", aErrorCode);
|
|
5920 |
|
|
5921 |
RMmCustomAPI::THSxPAStatus status;
|
|
5922 |
aDataPackage->UnPackData( status );
|
|
5923 |
|
|
5924 |
TFLOGSTRING2("TSY: CMmCustomTsy::CompleteNotifyHSxPAStatus, old status: %d", iHSxPAStatus);
|
|
5925 |
TFLOGSTRING2("TSY: CMmCustomTsy::CompleteNotifyHSxPAStatus, new status: %d", status);
|
|
5926 |
|
|
5927 |
// check if status was changed
|
|
5928 |
if ( iHSxPAStatus != status )
|
|
5929 |
{
|
|
5930 |
// Check if notification was requested
|
|
5931 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5932 |
ECustomTsyNotifyHSxPAStatus );
|
|
5933 |
|
|
5934 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
5935 |
{
|
|
5936 |
// check if response was ok
|
|
5937 |
if ( KErrNone == aErrorCode )
|
|
5938 |
{
|
|
5939 |
// Save the status
|
|
5940 |
iHSxPAStatus = status;
|
|
5941 |
|
|
5942 |
// set the information for the client
|
|
5943 |
*iRetNotifyHSxPAStatus = status;
|
|
5944 |
|
|
5945 |
//Complete request to success
|
|
5946 |
ReqCompleted( reqHandle, KErrNone );
|
|
5947 |
}
|
|
5948 |
else
|
|
5949 |
{
|
|
5950 |
// Complete error value
|
|
5951 |
ReqCompleted( reqHandle, aErrorCode );
|
|
5952 |
}
|
|
5953 |
|
|
5954 |
// reset the internal variable
|
|
5955 |
iRetNotifyHSxPAStatus = NULL;
|
|
5956 |
}
|
|
5957 |
}
|
|
5958 |
}
|
|
5959 |
|
|
5960 |
// ---------------------------------------------------------------------------
|
|
5961 |
// CMmCustomTsy::NotifyHSxPAStatusCancel
|
|
5962 |
// Cancel HSxPA notification
|
|
5963 |
// (other items were commented in a header).
|
|
5964 |
// ---------------------------------------------------------------------------
|
|
5965 |
//
|
|
5966 |
TInt CMmCustomTsy::NotifyHSxPAStatusCancel()
|
|
5967 |
{
|
|
5968 |
TFLOGSTRING("TSY: CMmCustomTsy::NotifyHSxPAStatusCancel");
|
|
5969 |
|
|
5970 |
// reset the reqhandle
|
|
5971 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5972 |
ECustomTsyNotifyHSxPAStatus );
|
|
5973 |
|
|
5974 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
5975 |
{
|
|
5976 |
// reset the pointer to client data
|
|
5977 |
iRetNotifyHSxPAStatus = NULL;
|
|
5978 |
|
|
5979 |
ReqCompleted( reqHandle, KErrCancel );
|
|
5980 |
}
|
|
5981 |
|
|
5982 |
return KErrNone;
|
|
5983 |
}
|
|
5984 |
|
|
5985 |
// ---------------------------------------------------------------------------
|
|
5986 |
// CMmCustomTsy::GetCallForwardingStatusL
|
|
5987 |
// Gets call forwarding status
|
|
5988 |
// (other items were commented in a header).
|
|
5989 |
// ---------------------------------------------------------------------------
|
|
5990 |
//
|
|
5991 |
TInt CMmCustomTsy::GetIccCallForwardingStatusL(
|
|
5992 |
TTsyReqHandle /*aTsyReqHandle*/,
|
|
5993 |
TDes8* aCFIndicators )
|
|
5994 |
{
|
|
5995 |
TFLOGSTRING("TSY: CMmCustomTsy::GetIccCallForwardingStatusL");
|
|
5996 |
|
|
5997 |
TInt ret( KErrGeneral );
|
|
5998 |
|
|
5999 |
//Get reqhandle
|
|
6000 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
6001 |
ECustomTsyGetIccCallForwardingStatus );
|
|
6002 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
6003 |
{
|
|
6004 |
ret = KErrServerBusy;
|
|
6005 |
}
|
|
6006 |
else
|
|
6007 |
{
|
|
6008 |
if( sizeof(RMmCustomAPI::TCFIndicators) > aCFIndicators->Size())
|
|
6009 |
{
|
|
6010 |
ret = KErrArgument;
|
|
6011 |
}
|
|
6012 |
else
|
|
6013 |
{
|
|
6014 |
//Store client side pointer
|
|
6015 |
iRetCFIndicators = aCFIndicators;
|
|
6016 |
|
|
6017 |
ret = Phone()->MessageManager()->HandleRequestL(
|
|
6018 |
ECustomGetIccCallForwardingStatusIPC );
|
|
6019 |
|
|
6020 |
if ( KErrNone == ret )
|
|
6021 |
{
|
|
6022 |
// Save the req handle type
|
|
6023 |
iReqHandleType = ECustomTsyGetIccCallForwardingStatus;
|
|
6024 |
}
|
|
6025 |
}
|
|
6026 |
}
|
|
6027 |
|
|
6028 |
return ret;
|
|
6029 |
}
|
|
6030 |
|
|
6031 |
// ---------------------------------------------------------------------------
|
|
6032 |
// CMmCustomTsy::CompleteGetCallForwardingStatus
|
|
6033 |
// completes gets call forwarding status request
|
|
6034 |
// (other items were commented in a header).
|
|
6035 |
// ---------------------------------------------------------------------------
|
|
6036 |
//
|
|
6037 |
void CMmCustomTsy::CompleteGetIccCallForwardingStatus(
|
|
6038 |
CMmDataPackage* aDataPackage,
|
|
6039 |
TInt aErrorCode )
|
|
6040 |
{
|
|
6041 |
TFLOGSTRING2("TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus, aErrorCode=%d", aErrorCode );
|
|
6042 |
|
|
6043 |
//reset req handle.
|
|
6044 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6045 |
ECustomTsyGetIccCallForwardingStatus );
|
|
6046 |
|
|
6047 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
6048 |
{
|
|
6049 |
if( KErrNone == aErrorCode )
|
|
6050 |
{
|
|
6051 |
RMmCustomAPI::TCFIndicatorsPckg* tcfIndicatorPckg = REINTERPRET_CAST(
|
|
6052 |
RMmCustomAPI::TCFIndicatorsPckg*, iRetCFIndicators );
|
|
6053 |
RMmCustomAPI::TCFIndicators& tcfIndicator = ( *tcfIndicatorPckg )();
|
|
6054 |
|
|
6055 |
aDataPackage->UnPackData( iCurrentTCFIndicator );
|
|
6056 |
TFLOGSTRING2("TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus, indicator=%u", iCurrentTCFIndicator.iIndicator );
|
|
6057 |
|
|
6058 |
tcfIndicator.iIndicator = iCurrentTCFIndicator.iIndicator;
|
|
6059 |
tcfIndicator.iCFNumber.iTypeOfNumber =
|
|
6060 |
iCurrentTCFIndicator.iCFNumber.iTypeOfNumber;
|
|
6061 |
tcfIndicator.iCFNumber.iNumberPlan =
|
|
6062 |
iCurrentTCFIndicator.iCFNumber.iNumberPlan;
|
|
6063 |
tcfIndicator.iCFNumber.iTelNumber.Copy(
|
|
6064 |
iCurrentTCFIndicator.iCFNumber.iTelNumber );
|
|
6065 |
|
|
6066 |
// Update CenRep with latest valid data
|
|
6067 |
if( &iCurrentTCFIndicator )
|
|
6068 |
{
|
|
6069 |
TFLOGSTRING("TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus : Update Central Repository");
|
|
6070 |
TPckg<TUint32> tempPckg( iCurrentTCFIndicator.iIndicator );
|
|
6071 |
iCFISCentRep->Set( KCtsyCallForwardingIndicator, tempPckg );
|
|
6072 |
|
|
6073 |
iCFISPrivateCentRep->Set( KCtsyCallForwardingNumberPlan,
|
|
6074 |
iCurrentTCFIndicator.iCFNumber.iNumberPlan );
|
|
6075 |
iCFISCentRep->Set( KCtsyCallForwardingNumber,
|
|
6076 |
iCurrentTCFIndicator.iCFNumber.iTelNumber );
|
|
6077 |
iCFISPrivateCentRep->Set( KCtsyCallForwardingMspId,
|
|
6078 |
iCurrentTCFIndicator.iMultipleSubscriberProfileID );
|
|
6079 |
}
|
|
6080 |
}
|
|
6081 |
//Erase client side pointer
|
|
6082 |
iRetCFIndicators = NULL;
|
|
6083 |
//Complete
|
|
6084 |
ReqCompleted( reqHandle, aErrorCode );
|
|
6085 |
}
|
|
6086 |
|
|
6087 |
//Request is made during boot-up done only once
|
|
6088 |
else if( iGetIccCfStatusBootUp )
|
|
6089 |
{
|
|
6090 |
if( KErrNone == aErrorCode )
|
|
6091 |
{
|
|
6092 |
iGetIccCfStatusBootUp = EFalse;
|
|
6093 |
aDataPackage->UnPackData( iCurrentTCFIndicator );
|
|
6094 |
TFLOGSTRING("TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus CenRep key UnconditionalCFStatus not RESETED.");
|
|
6095 |
|
|
6096 |
TFLOGSTRING2("TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus : Bootup case, KCtsyCallForwardingIndicator indicator=%u", iCurrentTCFIndicator.iIndicator );
|
|
6097 |
|
|
6098 |
TPckg<TUint32> tempPckg( iCurrentTCFIndicator.iIndicator );
|
|
6099 |
iCFISCentRep->Set( KCtsyCallForwardingIndicator, tempPckg );
|
|
6100 |
iCFISPrivateCentRep->Set( KCtsyCallForwardingNumberPlan,
|
|
6101 |
iCurrentTCFIndicator.iCFNumber.iNumberPlan );
|
|
6102 |
iCFISCentRep->Set( KCtsyCallForwardingNumber,
|
|
6103 |
iCurrentTCFIndicator.iCFNumber.iTelNumber );
|
|
6104 |
iCFISPrivateCentRep->Set( KCtsyCallForwardingMspId,
|
|
6105 |
iCurrentTCFIndicator.iMultipleSubscriberProfileID );
|
|
6106 |
TFLOGSTRING("TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus CenRep updated.");
|
|
6107 |
}
|
|
6108 |
}
|
|
6109 |
}
|
|
6110 |
|
|
6111 |
// ---------------------------------------------------------------------------
|
|
6112 |
// CMmCustomTsy::GetIccCallForwardingStatusCancel
|
|
6113 |
// Cancels Get icc call forwarding status
|
|
6114 |
// (other items were commented in a header).
|
|
6115 |
// ---------------------------------------------------------------------------
|
|
6116 |
//
|
|
6117 |
TInt CMmCustomTsy::GetIccCallForwardingStatusCancel(
|
|
6118 |
const TTsyReqHandle aTsyReqHandle )
|
|
6119 |
{
|
|
6120 |
TFLOGSTRING("CMmCustomTsy::GetIccCallForwardingStatusCancel");
|
|
6121 |
// reset reqhandle
|
|
6122 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6123 |
ECustomTsyGetIccCallForwardingStatus );
|
|
6124 |
|
|
6125 |
// complete with KErrCancel
|
|
6126 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
6127 |
|
|
6128 |
return KErrNone;
|
|
6129 |
}
|
|
6130 |
|
|
6131 |
// ---------------------------------------------------------------------------
|
|
6132 |
// CMmCustomTsy::GetIccCallForwardingStatusCancel
|
|
6133 |
// Cancels an ongoing GetIccCallForwardingStatus request.
|
|
6134 |
// (other items were commented in a header).
|
|
6135 |
// ---------------------------------------------------------------------------
|
|
6136 |
//
|
|
6137 |
TInt CMmCustomTsy::GetIccCallForwardingStatusCancel()
|
|
6138 |
{
|
|
6139 |
//Reset req handle
|
|
6140 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6141 |
ECustomTsyGetIccCallForwardingStatus );
|
|
6142 |
|
|
6143 |
//Erase client side pointer
|
|
6144 |
iRetCFIndicators = NULL;
|
|
6145 |
|
|
6146 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
6147 |
{
|
|
6148 |
//Complete request with cancel
|
|
6149 |
ReqCompleted( reqHandle, KErrCancel );
|
|
6150 |
}
|
|
6151 |
|
|
6152 |
return KErrNone;
|
|
6153 |
}
|
|
6154 |
|
|
6155 |
// ---------------------------------------------------------------------------
|
|
6156 |
// CMmCustomTsy::NotifyCallForwardingStatusChange
|
|
6157 |
// Set notification on
|
|
6158 |
// (other items were commented in a header).
|
|
6159 |
// ---------------------------------------------------------------------------
|
|
6160 |
//
|
|
6161 |
TInt CMmCustomTsy::NotifyIccCallForwardingStatusChange(
|
|
6162 |
TDes8* aCFIndicators )
|
|
6163 |
{
|
|
6164 |
|
|
6165 |
iNotifyCFIndicator = aCFIndicators;
|
|
6166 |
// save handle type
|
|
6167 |
iReqHandleType = ECustomTsyNotifyIccCallForwardingStatusChange;
|
|
6168 |
|
|
6169 |
return KErrNone;
|
|
6170 |
}
|
|
6171 |
|
|
6172 |
// ---------------------------------------------------------------------------
|
|
6173 |
// CMmCustomTsy::CompleteNotifyCallForwardingStatusChange
|
|
6174 |
// Notifies client
|
|
6175 |
// (other items were commented in a header).
|
|
6176 |
// ---------------------------------------------------------------------------
|
|
6177 |
//
|
|
6178 |
void CMmCustomTsy::CompleteNotifyIccCallForwardingStatusChange(
|
|
6179 |
CMmDataPackage* aDataPackage,
|
|
6180 |
TInt aErrorCode )
|
|
6181 |
{
|
|
6182 |
TFLOGSTRING2("TSY: CMmCustomTsy::CompleteNotifyIccCallForwardingStatusChange, Error: %d", aErrorCode);
|
|
6183 |
|
|
6184 |
RMmCustomAPI::TCFIndicators tempNotifyCFIndicator;
|
|
6185 |
aDataPackage->UnPackData( tempNotifyCFIndicator );
|
|
6186 |
|
|
6187 |
TBool isChanged = IsIccCallForwardingStatusChanged(
|
|
6188 |
tempNotifyCFIndicator );
|
|
6189 |
|
|
6190 |
// check if information was changed
|
|
6191 |
if ( isChanged )
|
|
6192 |
{
|
|
6193 |
//Update CTSY internal buffer
|
|
6194 |
iCurrentTCFIndicator = tempNotifyCFIndicator;
|
|
6195 |
|
|
6196 |
if ( KErrNone == aErrorCode )
|
|
6197 |
{
|
|
6198 |
//Update CenRep
|
|
6199 |
|
|
6200 |
TPckg<TUint32> tempPckg( iCurrentTCFIndicator.iIndicator );
|
|
6201 |
iCFISCentRep->Set( KCtsyCallForwardingIndicator, tempPckg );
|
|
6202 |
TFLOGSTRING2("TSY: CMmCustomTsy::CompleteNotifyIccCallForwardingStatusChange : Update CenRep, KCtsyCallForwardingIndicator indicator=%u", iCurrentTCFIndicator.iIndicator );
|
|
6203 |
|
|
6204 |
iCFISPrivateCentRep->Set( KCtsyCallForwardingNumberPlan,
|
|
6205 |
iCurrentTCFIndicator.iCFNumber.iNumberPlan );
|
|
6206 |
|
|
6207 |
iCFISCentRep->Set( KCtsyCallForwardingNumber,
|
|
6208 |
iCurrentTCFIndicator.iCFNumber.iTelNumber );
|
|
6209 |
|
|
6210 |
iCFISPrivateCentRep->Set( KCtsyCallForwardingMspId,
|
|
6211 |
iCurrentTCFIndicator.iMultipleSubscriberProfileID );
|
|
6212 |
//CenRep updated
|
|
6213 |
TFLOGSTRING("TSY: CMmCustomTsy::CompleteNotifyIccCallForwardingStatusChange CenRep updated.");
|
|
6214 |
}
|
|
6215 |
|
|
6216 |
// Check if notification was requested
|
|
6217 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6218 |
ECustomTsyNotifyIccCallForwardingStatusChange );
|
|
6219 |
|
|
6220 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
6221 |
{
|
|
6222 |
// check if response was ok
|
|
6223 |
if ( KErrNone == aErrorCode )
|
|
6224 |
{
|
|
6225 |
RMmCustomAPI::TCFIndicatorsPckg* tcfIndicatorPckg =
|
|
6226 |
REINTERPRET_CAST(
|
|
6227 |
RMmCustomAPI::TCFIndicatorsPckg*, iNotifyCFIndicator );
|
|
6228 |
RMmCustomAPI::TCFIndicators& tcfIndicator =
|
|
6229 |
( *tcfIndicatorPckg )();
|
|
6230 |
|
|
6231 |
if( sizeof(RMmCustomAPI::TCFIndicators) > tcfIndicatorPckg->Size())
|
|
6232 |
{
|
|
6233 |
ReqCompleted( reqHandle, KErrArgument);
|
|
6234 |
}
|
|
6235 |
else
|
|
6236 |
{
|
|
6237 |
// Save the new info
|
|
6238 |
tcfIndicator = tempNotifyCFIndicator;
|
|
6239 |
//Complete request
|
|
6240 |
ReqCompleted( reqHandle, KErrNone );
|
|
6241 |
}
|
|
6242 |
}
|
|
6243 |
else
|
|
6244 |
{
|
|
6245 |
// Complete with error value
|
|
6246 |
ReqCompleted( reqHandle, aErrorCode );
|
|
6247 |
}
|
|
6248 |
|
|
6249 |
// reset the internal variable
|
|
6250 |
//iNotifyCFIndicator = NULL;
|
|
6251 |
}
|
|
6252 |
}
|
|
6253 |
}
|
|
6254 |
|
|
6255 |
// ---------------------------------------------------------------------------
|
|
6256 |
// CMmCustomTsy::NotifyCallForwardingStatusChangeCancel
|
|
6257 |
// Cancels notification
|
|
6258 |
// (other items were commented in a header).
|
|
6259 |
// ---------------------------------------------------------------------------
|
|
6260 |
//
|
|
6261 |
TInt CMmCustomTsy::NotifyIccCallForwardingStatusChangeCancel(
|
|
6262 |
const TTsyReqHandle aTsyReqHandle )
|
|
6263 |
{
|
|
6264 |
// reset pointer to client data
|
|
6265 |
iNotifyCFIndicator = NULL;
|
|
6266 |
|
|
6267 |
// reset reqhandle
|
|
6268 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6269 |
ECustomTsyNotifyIccCallForwardingStatusChange );
|
|
6270 |
|
|
6271 |
// complete with KErrCancel
|
|
6272 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
6273 |
|
|
6274 |
return KErrNone;
|
|
6275 |
}
|
|
6276 |
|
|
6277 |
// ---------------------------------------------------------------------------
|
|
6278 |
// CMmCustomTsy::IsCallForwardingStatusChanged
|
|
6279 |
// Decides if CTSY internal indicator buffer differs from received buffer
|
|
6280 |
// (other items were commented in a header).
|
|
6281 |
// ---------------------------------------------------------------------------
|
|
6282 |
//
|
|
6283 |
TBool CMmCustomTsy::IsIccCallForwardingStatusChanged(
|
|
6284 |
RMmCustomAPI::TCFIndicators& aNotifyCFIndicator )
|
|
6285 |
{
|
|
6286 |
TBool changed( EFalse );
|
|
6287 |
|
|
6288 |
if( ( aNotifyCFIndicator.iIndicator !=
|
|
6289 |
iCurrentTCFIndicator.iIndicator ) ||
|
|
6290 |
( aNotifyCFIndicator.iCFNumber.iTypeOfNumber !=
|
|
6291 |
iCurrentTCFIndicator.iCFNumber.iTypeOfNumber ) ||
|
|
6292 |
( aNotifyCFIndicator.iCFNumber.iNumberPlan !=
|
|
6293 |
iCurrentTCFIndicator.iCFNumber.iNumberPlan ) ||
|
|
6294 |
KErrNotFound == ( aNotifyCFIndicator.iCFNumber.iTelNumber.Match(
|
|
6295 |
iCurrentTCFIndicator.iCFNumber.iTelNumber ) ) )
|
|
6296 |
{
|
|
6297 |
changed = ETrue;
|
|
6298 |
}
|
|
6299 |
|
|
6300 |
return changed;
|
|
6301 |
}
|
|
6302 |
|
|
6303 |
// ---------------------------------------------------------------------------
|
|
6304 |
// CMmCustomTsy::GetCellInfoL
|
|
6305 |
// Gets GSM/WCDMA cell(s) info.
|
|
6306 |
// (other items were commented in a header).
|
|
6307 |
// ---------------------------------------------------------------------------
|
|
6308 |
//
|
|
6309 |
TInt CMmCustomTsy::GetCellInfoL(
|
|
6310 |
TDes8* aCellInfoPckg )
|
|
6311 |
{
|
|
6312 |
TFLOGSTRING("TSY: CMmCustomTsy::GetCellInfo");
|
|
6313 |
|
|
6314 |
TInt ret = KErrServerBusy;
|
|
6315 |
|
|
6316 |
// Try to get request handle
|
|
6317 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
6318 |
ECustomTsyGetCellInfo );
|
|
6319 |
|
|
6320 |
if ( ECustomTsyReqHandleUnknown == reqHandle )
|
|
6321 |
{
|
|
6322 |
ret = KErrArgument;
|
|
6323 |
|
|
6324 |
if ( sizeof( RMmCustomAPI::TMmCellInfo ) <=
|
|
6325 |
aCellInfoPckg->MaxLength() )
|
|
6326 |
{
|
|
6327 |
iCellInfoPckg = REINTERPRET_CAST(
|
|
6328 |
RMmCustomAPI::TMmCellInfoPckg*, aCellInfoPckg );
|
|
6329 |
|
|
6330 |
ret = Phone()->MessageManager()->HandleRequestL(
|
|
6331 |
ECustomGetCellInfoIPC );
|
|
6332 |
|
|
6333 |
if ( KErrNone == ret )
|
|
6334 |
{
|
|
6335 |
// Save request handle in DoExtFuncL()
|
|
6336 |
iReqHandleType = ECustomTsyGetCellInfo;
|
|
6337 |
}
|
|
6338 |
}
|
|
6339 |
}
|
|
6340 |
|
|
6341 |
return ret;
|
|
6342 |
}
|
|
6343 |
|
|
6344 |
// ---------------------------------------------------------------------------
|
|
6345 |
// CMmCustomTsy::GetCellInfoCancel
|
|
6346 |
// Cancels an outstanding GetCellInfo request.
|
|
6347 |
// (other items were commented in a header).
|
|
6348 |
// ---------------------------------------------------------------------------
|
|
6349 |
//
|
|
6350 |
TInt CMmCustomTsy::GetCellInfoCancel()
|
|
6351 |
{
|
|
6352 |
TFLOGSTRING("TSY: CMmCustomTsy::GetCellInfoCancel");
|
|
6353 |
|
|
6354 |
// reset the req handle
|
|
6355 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6356 |
ECustomTsyGetCellInfo );
|
|
6357 |
|
|
6358 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
6359 |
{
|
|
6360 |
// reset pointer to client data
|
|
6361 |
iCellInfoPckg = NULL;
|
|
6362 |
|
|
6363 |
// complete with cancel
|
|
6364 |
ReqCompleted( reqHandle, KErrCancel );
|
|
6365 |
}
|
|
6366 |
|
|
6367 |
return KErrNone;
|
|
6368 |
}
|
|
6369 |
|
|
6370 |
// ---------------------------------------------------------------------------
|
|
6371 |
// CMmCustomTsy::CompleteGetCellInfo
|
|
6372 |
// Completes an outstanding GetCellInfo request.
|
|
6373 |
// (other items were commented in a header).
|
|
6374 |
// ---------------------------------------------------------------------------
|
|
6375 |
//
|
|
6376 |
void CMmCustomTsy::CompleteGetCellInfo(
|
|
6377 |
RMmCustomAPI::TMmCellInfo* aCellInfo,
|
|
6378 |
TInt aErrorValue )
|
|
6379 |
{
|
|
6380 |
TFLOGSTRING2("TSY: CMmCustomTsy::CompleteGetCellInfo - aErrorValue %d", aErrorValue);
|
|
6381 |
|
|
6382 |
// reset the req handle
|
|
6383 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6384 |
ECustomTsyGetCellInfo );
|
|
6385 |
|
|
6386 |
// check the validity of the handler
|
|
6387 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
6388 |
{
|
|
6389 |
if ( KErrNone == aErrorValue )
|
|
6390 |
{
|
|
6391 |
RMmCustomAPI::TMmCellInfo& tempCellInfo = ( *iCellInfoPckg )();
|
|
6392 |
tempCellInfo = *aCellInfo;
|
|
6393 |
}
|
|
6394 |
// reset the pointer to client space
|
|
6395 |
iCellInfoPckg = NULL;
|
|
6396 |
|
|
6397 |
// complete operation
|
|
6398 |
ReqCompleted ( reqHandle, aErrorValue );
|
|
6399 |
}
|
|
6400 |
}
|
|
6401 |
|
|
6402 |
// ---------------------------------------------------------------------------
|
|
6403 |
// CMmCustomTsy::NotifyCellInfoChange
|
|
6404 |
// Notification cell(s) info changes
|
|
6405 |
// (other items were commented in a header).
|
|
6406 |
// ---------------------------------------------------------------------------
|
|
6407 |
//
|
|
6408 |
TInt CMmCustomTsy::NotifyCellInfoChange(
|
|
6409 |
TDes8* aCellInfoPckg )
|
|
6410 |
{
|
|
6411 |
TFLOGSTRING("TSY: CMmCustomTsy::NotifyCellInfoChange");
|
|
6412 |
|
|
6413 |
RMmCustomAPI::TMmCellInfo temp;
|
|
6414 |
RMmCustomAPI::TMmCellInfoPckg tempPckg(temp);
|
|
6415 |
|
|
6416 |
TInt paramLength = aCellInfoPckg->MaxLength();
|
|
6417 |
TInt expectedLength = tempPckg.MaxLength();
|
|
6418 |
|
|
6419 |
TInt ret = KErrArgument;
|
|
6420 |
if (paramLength == expectedLength)
|
|
6421 |
{
|
|
6422 |
iRetNotifyCellInfoPckg = REINTERPRET_CAST( RMmCustomAPI::TMmCellInfoPckg*, aCellInfoPckg );
|
|
6423 |
// set the reqhandle type
|
|
6424 |
iReqHandleType = ECustomTsyNotifyCellInfoChange;
|
|
6425 |
|
|
6426 |
ret = KErrNone;
|
|
6427 |
}
|
|
6428 |
return ret;
|
|
6429 |
}
|
|
6430 |
|
|
6431 |
// ---------------------------------------------------------------------------
|
|
6432 |
// CMmCustomTsy::CompleteNotifyCellInfoChange
|
|
6433 |
// Complete cell info change notification
|
|
6434 |
// (other items were commented in a header).
|
|
6435 |
// ---------------------------------------------------------------------------
|
|
6436 |
//
|
|
6437 |
void CMmCustomTsy::CompleteNotifyCellInfoChange(
|
|
6438 |
RMmCustomAPI::TMmCellInfo* aCellInfo,
|
|
6439 |
TInt aErrorCode )
|
|
6440 |
{
|
|
6441 |
TFLOGSTRING2("TSY: CMmCustomTsy::CompleteNotifyCellInfoChange Error: %d", aErrorCode);
|
|
6442 |
|
|
6443 |
// Check if notification was requested
|
|
6444 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6445 |
ECustomTsyNotifyCellInfoChange );
|
|
6446 |
|
|
6447 |
// check if request was called
|
|
6448 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
6449 |
{
|
|
6450 |
// check if response was ok
|
|
6451 |
if ( KErrNone == aErrorCode )
|
|
6452 |
{
|
|
6453 |
// set the information for the client
|
|
6454 |
RMmCustomAPI::TMmCellInfo& tempCellInfo = ( *iRetNotifyCellInfoPckg )();
|
|
6455 |
tempCellInfo = *aCellInfo;
|
|
6456 |
}
|
|
6457 |
// reset the internal variable
|
|
6458 |
iRetNotifyCellInfoPckg = NULL;
|
|
6459 |
|
|
6460 |
// complete
|
|
6461 |
ReqCompleted( reqHandle, aErrorCode );
|
|
6462 |
}
|
|
6463 |
}
|
|
6464 |
|
|
6465 |
// ---------------------------------------------------------------------------
|
|
6466 |
// CMmCustomTsy::NotifyCellInfoChangeCancel
|
|
6467 |
// Cancel cell info change notification
|
|
6468 |
// (other items were commented in a header).
|
|
6469 |
// ---------------------------------------------------------------------------
|
|
6470 |
//
|
|
6471 |
TInt CMmCustomTsy::NotifyCellInfoChangeCancel()
|
|
6472 |
{
|
|
6473 |
TFLOGSTRING("TSY: CMmCustomTsy::NotifyCellInfoChangeCancel");
|
|
6474 |
|
|
6475 |
// reset the reqhandle
|
|
6476 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6477 |
ECustomTsyNotifyCellInfoChange );
|
|
6478 |
|
|
6479 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
6480 |
{
|
|
6481 |
// reset the pointer to client data
|
|
6482 |
iRetNotifyCellInfoPckg = NULL;
|
|
6483 |
|
|
6484 |
ReqCompleted( reqHandle, KErrCancel );
|
|
6485 |
}
|
|
6486 |
|
|
6487 |
return KErrNone;
|
|
6488 |
}
|
|
6489 |
|
|
6490 |
// ---------------------------------------------------------------------------
|
|
6491 |
// CMmCustomTsy::GetPhonebookCacheStatus
|
|
6492 |
// Get Phonebook cache status
|
|
6493 |
// (other items were commented in a header).
|
|
6494 |
// ---------------------------------------------------------------------------
|
|
6495 |
//
|
|
6496 |
RMmCustomAPI::TPndCacheStatus CMmCustomTsy::GetPhonebookCacheStatus(
|
|
6497 |
TUint8 aPhoneBookType )
|
|
6498 |
{
|
|
6499 |
TFLOGSTRING("TSY: CMmCustomTsy::GetPhonebookCacheStatus");
|
|
6500 |
RMmCustomAPI::TPndCacheStatus ret( RMmCustomAPI::ECacheNotUsed );
|
|
6501 |
|
|
6502 |
switch ( aPhoneBookType )
|
|
6503 |
{
|
|
6504 |
case KADNPhoneBook:
|
|
6505 |
ret = iAdnCacheStatus;
|
|
6506 |
break;
|
|
6507 |
case KFDNPhoneBook:
|
|
6508 |
ret = iFdnCacheStatus;
|
|
6509 |
break;
|
|
6510 |
case KSDNPhoneBook:
|
|
6511 |
case KVMBXPhoneBook:
|
|
6512 |
case KMBDNPhoneBook:
|
|
6513 |
ret = RMmCustomAPI::ECacheNotUsed;
|
|
6514 |
break;
|
|
6515 |
}
|
|
6516 |
|
|
6517 |
return ret;
|
|
6518 |
}
|
|
6519 |
|
|
6520 |
// ---------------------------------------------------------------------------
|
|
6521 |
// CMmCustomTsy::ReqCompleted
|
|
6522 |
// Completes a request back to the client.
|
|
6523 |
// (other items were commented in a header).
|
|
6524 |
// ---------------------------------------------------------------------------
|
|
6525 |
//
|
|
6526 |
void CMmCustomTsy::ReqCompleted( const TTsyReqHandle aTsyReqHandle,
|
|
6527 |
const TInt aError )
|
|
6528 |
{
|
|
6529 |
TFLOGSTRING3("TSY: CMmCustomTsy::ReqCompleted, aTsyReqHandle=%d, aError=%d", aTsyReqHandle, aError );
|
|
6530 |
|
|
6531 |
CTelObject::ReqCompleted ( aTsyReqHandle, aError );
|
|
6532 |
}
|
|
6533 |
|
|
6534 |
// ---------------------------------------------------------------------------
|
|
6535 |
// CMmCustomTsy::GetSystemNetworkBandL
|
|
6536 |
// This method gets the supported network band.
|
|
6537 |
// (other items were commented in a header).
|
|
6538 |
// ---------------------------------------------------------------------------
|
|
6539 |
//
|
|
6540 |
TInt CMmCustomTsy::GetSystemNetworkBandL(
|
|
6541 |
const TTsyReqHandle aTsyReqHandle,
|
|
6542 |
RMmCustomAPI::TBandSelection* aSystemNetworkBand,
|
|
6543 |
RMmCustomAPI::TNetworkModeCaps* aSystemNetworkMode )
|
|
6544 |
{
|
|
6545 |
TFLOGSTRING("TSY: CMmCustomTsy::GetSystemNetworkBandL");
|
|
6546 |
TTsyReqHandle reqhandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
6547 |
ECustomTsyGetSystemNetworkBand );
|
|
6548 |
|
|
6549 |
if ( ECustomTsyReqHandleUnknown < reqhandle )
|
|
6550 |
{
|
|
6551 |
// The request is already in processing because of previous request
|
|
6552 |
// Complete request with status value informing the client about
|
|
6553 |
// the situation.
|
|
6554 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
6555 |
}
|
|
6556 |
else
|
|
6557 |
{
|
|
6558 |
// save pointer to the packaged life timer info
|
|
6559 |
iAvailableSystemNetworkBand = aSystemNetworkBand;
|
|
6560 |
iSystemNetworkModeCaps = aSystemNetworkMode;
|
|
6561 |
// call DOS
|
|
6562 |
TInt ret = Phone()->MessageManager()->HandleRequestL(
|
|
6563 |
ECustomGetBandSelectionIPC );
|
|
6564 |
|
|
6565 |
// Check response of the extension
|
|
6566 |
if ( KErrNone != ret )
|
|
6567 |
{
|
|
6568 |
ReqCompleted( aTsyReqHandle, ret );
|
|
6569 |
}
|
|
6570 |
else
|
|
6571 |
{
|
|
6572 |
// Save the req handle type
|
|
6573 |
iReqHandleType = ECustomTsyGetSystemNetworkBand;
|
|
6574 |
}
|
|
6575 |
}
|
|
6576 |
|
|
6577 |
return KErrNone;
|
|
6578 |
}
|
|
6579 |
|
|
6580 |
// ---------------------------------------------------------------------------
|
|
6581 |
// CMmCustomTsy::CompleteGetSystemNetworkBand
|
|
6582 |
// Completes a GetSystemNetworkBand.
|
|
6583 |
// (other items were commented in a header).
|
|
6584 |
// ---------------------------------------------------------------------------
|
|
6585 |
//
|
|
6586 |
void CMmCustomTsy::CompleteGetSystemNetworkBand(
|
|
6587 |
RMmCustomAPI::TBandSelection aSystemNetworkBand,
|
|
6588 |
RMmCustomAPI::TNetworkModeCaps aSystemNetworkMode,
|
|
6589 |
TInt aResult )
|
|
6590 |
{
|
|
6591 |
TFLOGSTRING2("TSY: CMmCustomTsy::CompleteGetSystemNetworkBand. Result: %d", aResult);
|
|
6592 |
// reset req handle. Returns the deleted req handle
|
|
6593 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6594 |
ECustomTsyGetSystemNetworkBand );
|
|
6595 |
|
|
6596 |
// check if handle exists
|
|
6597 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
6598 |
{
|
|
6599 |
|
|
6600 |
if ( KErrNone == aResult )
|
|
6601 |
{
|
|
6602 |
// set the information for the client
|
|
6603 |
*iAvailableSystemNetworkBand = aSystemNetworkBand;
|
|
6604 |
if ( *iSystemNetworkModeCaps != aSystemNetworkMode )
|
|
6605 |
{
|
|
6606 |
*iSystemNetworkModeCaps = aSystemNetworkMode;
|
|
6607 |
}
|
|
6608 |
}
|
|
6609 |
|
|
6610 |
// complete
|
|
6611 |
ReqCompleted( reqHandle, aResult );
|
|
6612 |
}
|
|
6613 |
}
|
|
6614 |
|
|
6615 |
// ---------------------------------------------------------------------------
|
|
6616 |
// CMmCustomTsy::GetSystemNetworkBandCancel
|
|
6617 |
// Cancels a GetSystemNetworkBand.
|
|
6618 |
// (other items were commented in a header).
|
|
6619 |
// ---------------------------------------------------------------------------
|
|
6620 |
//
|
|
6621 |
TInt CMmCustomTsy::GetSystemNetworkBandCancel(
|
|
6622 |
const TTsyReqHandle aTsyReqHandle )
|
|
6623 |
{
|
|
6624 |
TFLOGSTRING("TSY: CMmCustomTsy::GetSystemNetworkBandCancel");
|
|
6625 |
// reset the pointer to client data
|
|
6626 |
iAvailableSystemNetworkBand = NULL;
|
|
6627 |
iSystemNetworkModeCaps = NULL;
|
|
6628 |
|
|
6629 |
// reset the reqhandle
|
|
6630 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6631 |
ECustomTsyGetSystemNetworkBand );
|
|
6632 |
|
|
6633 |
// complete
|
|
6634 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
6635 |
|
|
6636 |
return KErrNone;
|
|
6637 |
}
|
|
6638 |
|
|
6639 |
// ---------------------------------------------------------------------------
|
|
6640 |
// CMmCustomTsy::SetSystemNetworkBandL
|
|
6641 |
// This method sets the system network band.
|
|
6642 |
// (other items were commented in a header).
|
|
6643 |
// ---------------------------------------------------------------------------
|
|
6644 |
//
|
|
6645 |
TInt CMmCustomTsy::SetSystemNetworkBandL(
|
|
6646 |
const TTsyReqHandle aTsyReqHandle,
|
|
6647 |
RMmCustomAPI::TBandSelection* aSystemNetworkBand,
|
|
6648 |
RMmCustomAPI::TNetworkModeCaps* aSystemNetworkModeCaps )
|
|
6649 |
{
|
|
6650 |
TFLOGSTRING("TSY: CMmCustomTsy::SetSystemNetworkBandL");
|
|
6651 |
TTsyReqHandle reqhandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
6652 |
ECustomTsySetSystemNetworkBand );
|
|
6653 |
|
|
6654 |
if ( ECustomTsyReqHandleUnknown < reqhandle )
|
|
6655 |
{
|
|
6656 |
// The request is already in processing because of previous request
|
|
6657 |
// Complete request with status value informing the client about
|
|
6658 |
// the situation.
|
|
6659 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
6660 |
}
|
|
6661 |
else
|
|
6662 |
{
|
|
6663 |
// call DOS
|
|
6664 |
// The networkband to be set
|
|
6665 |
RMmCustomAPI::TBandSelection networkBand =
|
|
6666 |
*aSystemNetworkBand;
|
|
6667 |
// Used network mode
|
|
6668 |
RMmCustomAPI::TNetworkModeCaps networkMode =
|
|
6669 |
*aSystemNetworkModeCaps;
|
|
6670 |
CMmDataPackage dataPackage;
|
|
6671 |
// Pack network mode and band
|
|
6672 |
dataPackage.PackData( &networkBand, &networkMode );
|
|
6673 |
TInt ret = Phone()->MessageManager()->HandleRequestL(
|
|
6674 |
ECustomSetBandSelectionIPC, &dataPackage );
|
|
6675 |
|
|
6676 |
// Check response of the extension
|
|
6677 |
if ( KErrNone != ret )
|
|
6678 |
{
|
|
6679 |
ReqCompleted( aTsyReqHandle, ret );
|
|
6680 |
}
|
|
6681 |
else
|
|
6682 |
{
|
|
6683 |
// Save the req handle type
|
|
6684 |
iReqHandleType = ECustomTsySetSystemNetworkBand;
|
|
6685 |
}
|
|
6686 |
}
|
|
6687 |
|
|
6688 |
return KErrNone;
|
|
6689 |
}
|
|
6690 |
|
|
6691 |
// ---------------------------------------------------------------------------
|
|
6692 |
// CMmCustomTsy::CompleteSetSystemNetworkBand
|
|
6693 |
// Completes a SetSystemNetworkBand.
|
|
6694 |
// (other items were commented in a header).
|
|
6695 |
// ---------------------------------------------------------------------------
|
|
6696 |
//
|
|
6697 |
void CMmCustomTsy::CompleteSetSystemNetworkBand(
|
|
6698 |
TInt aResult )
|
|
6699 |
{
|
|
6700 |
TFLOGSTRING("TSY: CMmCustomTsy::CompleteSetSystemNetworkBand");
|
|
6701 |
// reset req handle. Returns the deleted req handle
|
|
6702 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6703 |
ECustomTsySetSystemNetworkBand );
|
|
6704 |
|
|
6705 |
// check if handle exists
|
|
6706 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
6707 |
{
|
|
6708 |
// complete
|
|
6709 |
ReqCompleted( reqHandle, aResult );
|
|
6710 |
}
|
|
6711 |
}
|
|
6712 |
|
|
6713 |
// ---------------------------------------------------------------------------
|
|
6714 |
// CMmCustomTsy::SetIccCfBootUpFlag
|
|
6715 |
// Set new value for ICC CF bootup.
|
|
6716 |
// (other items were commented in a header).
|
|
6717 |
// ---------------------------------------------------------------------------
|
|
6718 |
//
|
|
6719 |
void CMmCustomTsy::SetIccCfBootUpFlag( TBool aBootUp )
|
|
6720 |
{
|
|
6721 |
TFLOGSTRING2("TSY: CMmCustomTsy::SetIccCfBootUpFlag, aBootUp=%d", aBootUp );
|
|
6722 |
|
|
6723 |
iGetIccCfStatusBootUp = aBootUp;
|
|
6724 |
}
|
|
6725 |
|
|
6726 |
// ---------------------------------------------------------------------------
|
|
6727 |
// CMmCustomTsy::GetUSIMServiceSupportL
|
|
6728 |
// (other items were commented in a header).
|
|
6729 |
// ---------------------------------------------------------------------------
|
|
6730 |
//
|
|
6731 |
TInt CMmCustomTsy::GetUSIMServiceSupportL(
|
|
6732 |
const TTsyReqHandle aTsyReqHandle,
|
|
6733 |
RMmCustomAPI::TAppSupport* aAppSupport )
|
|
6734 |
{
|
|
6735 |
TFLOGSTRING("TSY: CMmCustomTsy::GetUSIMServiceSupportL");
|
|
6736 |
|
|
6737 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
6738 |
ECustomTsyGetUSIMServiceSupport );
|
|
6739 |
|
|
6740 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
6741 |
{
|
|
6742 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
6743 |
}
|
|
6744 |
else
|
|
6745 |
{
|
|
6746 |
// save pointer to client data
|
|
6747 |
iAppSupport = aAppSupport;
|
|
6748 |
|
|
6749 |
CMmDataPackage appSupportPackage;
|
|
6750 |
appSupportPackage.PackData( iAppSupport );
|
|
6751 |
|
|
6752 |
// call DOS (no packed parameters)
|
|
6753 |
TInt ret = KErrNone;
|
|
6754 |
ret = Phone()->MessageManager()->HandleRequestL(
|
|
6755 |
ECustomGetServiceTableSupportbyApplicationIPC, &appSupportPackage);
|
|
6756 |
|
|
6757 |
// check the result of the call
|
|
6758 |
if ( KErrNone != ret )
|
|
6759 |
{
|
|
6760 |
ReqCompleted( aTsyReqHandle, ret );
|
|
6761 |
}
|
|
6762 |
else
|
|
6763 |
{
|
|
6764 |
// Store the request handle
|
|
6765 |
iReqHandleType = ECustomTsyGetUSIMServiceSupport;
|
|
6766 |
}
|
|
6767 |
}
|
|
6768 |
|
|
6769 |
return KErrNone;
|
|
6770 |
}
|
|
6771 |
|
|
6772 |
// ---------------------------------------------------------------------------
|
|
6773 |
// CMmCustomTsy::CompleteGetUSIMServiceSupport
|
|
6774 |
// Completes a GetUSIMServiceSupport request
|
|
6775 |
// (other items were commented in a header).
|
|
6776 |
// ---------------------------------------------------------------------------
|
|
6777 |
//
|
|
6778 |
void CMmCustomTsy::CompleteGetUSIMServiceSupport(
|
|
6779 |
CMmDataPackage* aDataPackage,
|
|
6780 |
TInt aErrorCode )
|
|
6781 |
{
|
|
6782 |
TFLOGSTRING("TSY: CMmCustomTsy::CompleteGetUSIMServiceSupport");
|
|
6783 |
|
|
6784 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6785 |
ECustomTsyGetUSIMServiceSupport );
|
|
6786 |
|
|
6787 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
6788 |
{
|
|
6789 |
if ( KErrNone == aErrorCode )
|
|
6790 |
{
|
|
6791 |
RMmCustomAPI::TAppSupport *appSupport;
|
|
6792 |
aDataPackage->UnPackData( &appSupport );
|
|
6793 |
|
|
6794 |
// set the information for the client
|
|
6795 |
*iAppSupport = *appSupport;
|
|
6796 |
|
|
6797 |
// reset the internal variable
|
|
6798 |
iAppSupport = NULL;
|
|
6799 |
|
|
6800 |
//Complete request to success
|
|
6801 |
ReqCompleted( reqHandle, KErrNone );
|
|
6802 |
}
|
|
6803 |
else
|
|
6804 |
{
|
|
6805 |
// Complete with error
|
|
6806 |
ReqCompleted( reqHandle, aErrorCode );
|
|
6807 |
}
|
|
6808 |
}
|
|
6809 |
}
|
|
6810 |
|
|
6811 |
// ---------------------------------------------------------------------------
|
|
6812 |
// CMmCustomTsy::GetUSIMServiceSupportCancel
|
|
6813 |
// Cancels a GetUSIMServiceSupport request
|
|
6814 |
// (other items were commented in a header).
|
|
6815 |
// ---------------------------------------------------------------------------
|
|
6816 |
//
|
|
6817 |
TInt CMmCustomTsy::GetUSIMServiceSupportCancel()
|
|
6818 |
{
|
|
6819 |
TFLOGSTRING("TSY: CMmCustomTsy::GetUSIMServiceSupportCancel");
|
|
6820 |
|
|
6821 |
// reset the reqhandle
|
|
6822 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6823 |
ECustomTsyGetUSIMServiceSupport );
|
|
6824 |
|
|
6825 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
6826 |
{
|
|
6827 |
// reset the pointer to client data
|
|
6828 |
iAppSupport = NULL;
|
|
6829 |
|
|
6830 |
ReqCompleted( reqHandle, KErrCancel );
|
|
6831 |
}
|
|
6832 |
|
|
6833 |
return KErrNone;
|
|
6834 |
}
|
|
6835 |
|
|
6836 |
// ---------------------------------------------------------------------------
|
|
6837 |
// CMmCustomTsy::NotifyRemoteAlertingToneStatusChange
|
|
6838 |
// Sets Remote Alerting Tone Status Change notification
|
|
6839 |
// (other items were commented in a header).
|
|
6840 |
// ---------------------------------------------------------------------------
|
|
6841 |
//
|
|
6842 |
TInt CMmCustomTsy::NotifyRemoteAlertingToneStatusChange(
|
|
6843 |
RMmCustomAPI::TRemoteAlertingToneStatus* aToneStatus )
|
|
6844 |
{
|
|
6845 |
TFLOGSTRING("TSY: CMmCustomTsy::NotifyRemoteAlertingToneStatusChange");
|
|
6846 |
|
|
6847 |
// save pointer to client data
|
|
6848 |
iToneStatus = aToneStatus;
|
|
6849 |
|
|
6850 |
// save handle type
|
|
6851 |
iReqHandleType = ECustomTsyNotifyRemoteAlertingToneStatusChange;
|
|
6852 |
|
|
6853 |
return KErrNone;
|
|
6854 |
}
|
|
6855 |
|
|
6856 |
// ---------------------------------------------------------------------------
|
|
6857 |
// CMmCustomTsy::CompleteNotifyRemoteAlertingToneStatusChange
|
|
6858 |
// Completes a NotifyRemoteToneAlertingStatusChange request.
|
|
6859 |
// (other items were commented in a header).
|
|
6860 |
// ---------------------------------------------------------------------------
|
|
6861 |
//
|
|
6862 |
void CMmCustomTsy::CompleteNotifyRemoteAlertingToneStatusChange(
|
|
6863 |
RMmCustomAPI::TRemoteAlertingToneStatus aToneStatus,
|
|
6864 |
TInt aErrorCode )
|
|
6865 |
{
|
|
6866 |
TFLOGSTRING("TSY: CMmCustomTsy::CompleteNotifyRemoteAlertingToneStatusChange");
|
|
6867 |
|
|
6868 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6869 |
ECustomTsyNotifyRemoteAlertingToneStatusChange );
|
|
6870 |
|
|
6871 |
// check if request was called
|
|
6872 |
if ( ECustomTsyReqHandleUnknown != reqHandle )
|
|
6873 |
{
|
|
6874 |
// check if response was ok
|
|
6875 |
if ( KErrNone == aErrorCode )
|
|
6876 |
{
|
|
6877 |
// set the information for the client
|
|
6878 |
*iToneStatus = aToneStatus;
|
|
6879 |
}
|
|
6880 |
|
|
6881 |
// reset the internal variable
|
|
6882 |
iToneStatus = NULL;
|
|
6883 |
// complete
|
|
6884 |
ReqCompleted( reqHandle, aErrorCode );
|
|
6885 |
}
|
|
6886 |
}
|
|
6887 |
|
|
6888 |
// ---------------------------------------------------------------------------
|
|
6889 |
// CMmCustomTsy::NotifyRemoteAlertingToneStatusChangeCancel
|
|
6890 |
// This method cancels an outstanding notification of
|
|
6891 |
// RemoteAlertingToneStatusChange.
|
|
6892 |
// (other items were commented in a header).
|
|
6893 |
// ---------------------------------------------------------------------------
|
|
6894 |
//
|
|
6895 |
TInt CMmCustomTsy::NotifyRemoteAlertingToneStatusChangeCancel()
|
|
6896 |
{
|
|
6897 |
// reset reqhandle
|
|
6898 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6899 |
ECustomTsyNotifyRemoteAlertingToneStatusChange );
|
|
6900 |
|
|
6901 |
if( ECustomTsyReqHandleUnknown != reqHandle )
|
|
6902 |
{
|
|
6903 |
// reset pointer to client data
|
|
6904 |
iToneStatus = NULL;
|
|
6905 |
|
|
6906 |
ReqCompleted( reqHandle, KErrCancel );
|
|
6907 |
}
|
|
6908 |
|
|
6909 |
return KErrNone;
|
|
6910 |
}
|
|
6911 |
|
|
6912 |
// End of File
|