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 |
//INCLUDES
|
|
19 |
#include <etelmm.h>
|
|
20 |
#include <etelmmerr.h>
|
|
21 |
#include <exterror.h>
|
|
22 |
|
|
23 |
#include "cmmphonetsy.h"
|
|
24 |
#include "cmmvoicelinetsy.h"
|
|
25 |
#include "cmmdatalinetsy.h"
|
|
26 |
#include "cmmfaxlinetsy.h"
|
|
27 |
#include "cmmcalltsy.h"
|
|
28 |
#include "cmmconferencecalltsy.h"
|
|
29 |
#include "cmmussdtsy.h"
|
|
30 |
#include "cmmsecuritytsy.h"
|
|
31 |
#include "cmmbroadcasttsy.h"
|
|
32 |
#include "cmmsmstsy.h"
|
|
33 |
#include "cmmonstoretsy.h"
|
|
34 |
#include "cmmenstoretsy.h"
|
|
35 |
#include "cmmphonebookstoretsy.h"
|
|
36 |
#include "CMmCustomTsy.h"
|
|
37 |
#include "cmmtsyreqhandlestore.h"
|
|
38 |
#include "cmmcalllist.h"
|
|
39 |
#include "cmmlinelist.h"
|
|
40 |
#include "cmmpblist.h"
|
|
41 |
#include "MmTsy_numberOfSlots.h"
|
|
42 |
#include "MmTsy_conf.h"
|
|
43 |
#include <ctsy/mmtsy_names.h>
|
|
44 |
#include <ctsy/serviceapi/mmtsy_ipcdefs.h>
|
|
45 |
#include "CMmCommonStaticUtility.h"
|
|
46 |
#include "CMmSIMTsy.h"
|
|
47 |
#include "cmmnettsy.h"
|
|
48 |
#include "cmmdtmftsy.h"
|
|
49 |
#include "cmmsupplservtsy.h"
|
|
50 |
#include "ctsyprivatecrpkeys.h"
|
|
51 |
#include <ctsy/serviceapi/ctsydomaincrkeys.h>
|
|
52 |
#include "et_struct.h"
|
|
53 |
|
|
54 |
// Product specific headers
|
|
55 |
#include "MmTsy_PhoneDefs.h"
|
|
56 |
#include "Cmmpacketservicetsy.h"
|
|
57 |
#include "cmmphonegsmwcdmaext.h"
|
|
58 |
|
|
59 |
#ifdef REQHANDLE_TIMER
|
|
60 |
#include "CResponseTimer.h"
|
|
61 |
#include "CResponseTimerStore.h"
|
|
62 |
#endif // REQHANDLE_TIMER
|
|
63 |
|
|
64 |
#include <ctsy/serviceapi/ctsysatmessagingbase.h>
|
|
65 |
#include "cmmphonefactorytsy.h"
|
|
66 |
#include <ctsy/pluginapi/cmmdatapackage.h>
|
|
67 |
#include <ctsy/serviceapi/gsmerror.h>
|
|
68 |
|
|
69 |
// observers for HWRM
|
|
70 |
#include "BatteryInfoObserver.h"
|
|
71 |
#include "ChargingStatusObserver.h"
|
|
72 |
|
|
73 |
#ifdef SYMBIAN_BAFL_SYSUTIL
|
|
74 |
#include <bafl/sysutil.h>
|
|
75 |
#endif
|
|
76 |
|
|
77 |
// ======== Patchable-Constants ======
|
|
78 |
#ifdef __EABI__
|
|
79 |
// HWRM is supported
|
|
80 |
IMPORT_C extern const TInt32 KHWRMIsSupported;
|
|
81 |
#else
|
|
82 |
// for emulator, use HalFunction to get the value from epoc.ini
|
|
83 |
#include <u32hal.h>
|
|
84 |
#endif
|
|
85 |
|
|
86 |
// ======== MEMBER FUNCTIONS ========
|
|
87 |
|
|
88 |
EXPORT_C CMmPhoneTsy* CMmPhoneTsy::NewL (
|
|
89 |
CMmMessageManagerBase* aMessageManager,
|
|
90 |
CMmPhoneFactoryTsy* aMmPhoneFactoryTsy,
|
|
91 |
MLtsyFactoryBase* aFactory )
|
|
92 |
{
|
|
93 |
TFLOGSTRING2("TSY: CMmPhoneTsy::NewL - Phone model Id: %S", &KPhoneModelId);
|
|
94 |
CleanupStack::PushL( aMessageManager );
|
|
95 |
CMmPhoneTsy* mmPhoneTsy = new (ELeave) CMmPhoneTsy();
|
|
96 |
|
|
97 |
mmPhoneTsy->iMessageManager = aMessageManager;
|
|
98 |
CleanupStack::Pop(aMessageManager);
|
|
99 |
mmPhoneTsy->iMmPhoneFactory = aMmPhoneFactoryTsy;
|
|
100 |
CleanupClosePushL( *mmPhoneTsy );
|
|
101 |
//For pointer is stored for deleting licenseetsy instance
|
|
102 |
mmPhoneTsy->iLtsyFactory = aFactory;
|
|
103 |
mmPhoneTsy->iTelephonyAudioControl = NULL;
|
|
104 |
if ( aFactory )
|
|
105 |
{
|
|
106 |
// Version number is used to specify LTSY interface
|
|
107 |
MLtsyFactoryBase::TCtsyInterfaceVersion vers =
|
|
108 |
aFactory->Version();
|
|
109 |
|
|
110 |
if( MLtsyFactoryBase::EIfVersion2 <= vers )
|
|
111 |
{
|
|
112 |
MLtsyFactoryV2* ptr_v2 =
|
|
113 |
static_cast<MLtsyFactoryV2*>( aFactory );
|
|
114 |
|
|
115 |
// Acquire Telephony Audio Control pointer
|
|
116 |
mmPhoneTsy->iTelephonyAudioControl =
|
|
117 |
ptr_v2->GetTelephonyAudioControl( mmPhoneTsy );
|
|
118 |
}
|
|
119 |
}
|
|
120 |
|
|
121 |
mmPhoneTsy->ConstructL();
|
|
122 |
CleanupStack::Pop( mmPhoneTsy );
|
|
123 |
return mmPhoneTsy;
|
|
124 |
}
|
|
125 |
|
|
126 |
CMmPhoneTsy::CMmPhoneTsy():
|
|
127 |
iReqHandleType(EMultimodePhoneReqHandleUnknown)
|
|
128 |
{
|
|
129 |
}
|
|
130 |
|
|
131 |
void CMmPhoneTsy::ConstructL()
|
|
132 |
{
|
|
133 |
TFLOGSTRING("TSY: CMmPhoneTsy::ConstructL");
|
|
134 |
iCentRep = CRepository::NewL( KCRUidCtsyMEAlsLine );
|
|
135 |
TFLOGSTRING("TSY: CMmPhoneTsy::ConstructL Central Repository opened successfully");
|
|
136 |
|
|
137 |
//iPublic Central Repositories
|
|
138 |
iMWISCentRep = CRepository::NewL( KCRUidCtsyMessageWaitingIndicator );
|
|
139 |
iCFISPrivateCentRep = CRepository::NewL( KCRUidCtsyPrivateCallForwardingIndicator );
|
|
140 |
iCFISCentRep = CRepository::NewL( KCRUidCtsyCallForwardingIndicator );
|
|
141 |
|
|
142 |
// Set all the boot states to false
|
|
143 |
iBootState.iSIMReady = EFalse;
|
|
144 |
iBootState.iADNReady = EFalse;
|
|
145 |
// Security will be set ready when all needed security codes
|
|
146 |
// (PIN/Security code) are requested in boot
|
|
147 |
iBootState.iSecReady = EFalse;
|
|
148 |
|
|
149 |
//Initialise transaction handler, TSY req handle store, and object lists
|
|
150 |
InitStoresAndListsL();
|
|
151 |
|
|
152 |
//Initialise extension modules
|
|
153 |
InitExtensionModulesL();
|
|
154 |
|
|
155 |
//Initialise miscellaneous internal attributes
|
|
156 |
InitInternalAttributes();
|
|
157 |
|
|
158 |
//register phonetsy in the message manager
|
|
159 |
iMessageManager->RegisterTsyObject(
|
|
160 |
CMmMessageManagerBase::EPhoneTsy , this );
|
|
161 |
|
|
162 |
iEmergencyCallInfoProperty.Define( KPSUidCtsyEmergencyCallInfo,
|
|
163 |
KCTSYEmergencyCallInfo, RProperty::EInt );
|
|
164 |
|
|
165 |
//Parameter store
|
|
166 |
iServiceTableReq = new ( ELeave ) TGetServiceTableRequest();
|
|
167 |
|
|
168 |
//Initialisation
|
|
169 |
iCalledOnGet = EFalse;
|
|
170 |
iServiceTableReq->iCaching = EFalse;
|
|
171 |
iSimRefreshRegisterOk = EFalse;
|
|
172 |
iCacheServiceTableError = KErrNone;
|
|
173 |
iTSYSubscriberIdReq = EFalse;
|
|
174 |
iAlsQueryInBoot = EFalse;
|
|
175 |
iCspFileQueryInBoot = EFalse;
|
|
176 |
iCspFileALS = EFalse;
|
|
177 |
iAlsPpSupport = EFalse;
|
|
178 |
iCspFileAlsSet = EFalse;
|
|
179 |
iViagHomeZoneParamsChecked = EFalse;
|
|
180 |
iIsInitializationActive = EFalse;
|
|
181 |
|
|
182 |
// initialize HWRM & its observers
|
|
183 |
if(IsHWRMSupported())
|
|
184 |
{
|
|
185 |
TFLOGSTRING("TSY: HWRM Battery API is in use.");
|
|
186 |
iPowerManager = CHWRMPower::NewL();
|
|
187 |
iBattery = CBatteryInfoObserver::NewL( *iPowerManager, *this );
|
|
188 |
iChargingStatus = CChargingStatusObserver::NewL( *this );
|
|
189 |
}
|
|
190 |
|
|
191 |
//Create the SSM Plugin Handler on creation rather than on demand to avoid problems
|
|
192 |
//with Emergency Calls in Out Of Memory situations.
|
77
|
193 |
//iSystemStatePluginHandler = CCtsySystemStatePluginHandler::NewL();
|
24
|
194 |
|
|
195 |
//#ifdef __WINS__ SYMBIAN commented out
|
|
196 |
// iMmPhoneExtInterface->NotifySimStatusReadyL();
|
|
197 |
//#endif
|
|
198 |
}
|
|
199 |
|
|
200 |
// ---------------------------------------------------------------------------
|
|
201 |
// CMmPhoneTsy::InitStoresAndListsL
|
|
202 |
// Initialises transaction handler, TSY req handle store,
|
|
203 |
// and object lists (Call, Line and Phonebook lists) for CMmPhoneTsy
|
|
204 |
// (other items were commented in a header).
|
|
205 |
// ---------------------------------------------------------------------------
|
|
206 |
//
|
|
207 |
void CMmPhoneTsy::InitStoresAndListsL()
|
|
208 |
{
|
|
209 |
#ifdef REQHANDLE_TIMER
|
|
210 |
iTsyReqHandleStore = CMmTsyReqHandleStore::NewL( this,
|
|
211 |
this, EMultimodePhoneMaxNumOfRequests, iPhoneReqHandles );
|
|
212 |
|
|
213 |
iTimeStampStore = CResponseTimerStore::NewL ( this );
|
|
214 |
iReqHandleTimer = CResponseTimer::NewL( this );
|
|
215 |
|
|
216 |
#else
|
|
217 |
//create req handle store
|
|
218 |
iTsyReqHandleStore = CMmTsyReqHandleStore::NewL(
|
|
219 |
EMultimodePhoneMaxNumOfRequests, iPhoneReqHandles );
|
|
220 |
|
|
221 |
#endif //REQHANDLE_TIMER
|
|
222 |
|
|
223 |
// Create call list
|
|
224 |
iCallList = CMmCallList::NewL( this );
|
|
225 |
|
|
226 |
// Create line list
|
|
227 |
iLineList = CMmLineList::NewL( this );
|
|
228 |
|
|
229 |
// Create phonebook list
|
|
230 |
iPBList = CMmPBList::NewL( this );
|
|
231 |
|
|
232 |
// Service table
|
|
233 |
iServiceTableDataCache = NULL;
|
|
234 |
|
|
235 |
// Service table (USIM)
|
|
236 |
iServiceTableUSIMDataCache = NULL;
|
|
237 |
|
|
238 |
//air time duration timer
|
|
239 |
iAirTimeDurationTimer = CHeartbeatRunner::NewL( NULL, this );
|
|
240 |
|
|
241 |
// Create and init phonebook state
|
|
242 |
iPhoneBookState = new(ELeave) CStorageInfoData();
|
|
243 |
}
|
|
244 |
|
|
245 |
|
|
246 |
// ---------------------------------------------------------------------------
|
|
247 |
// CMmPhoneTsy::SetMessageManager
|
|
248 |
// Set message handler
|
|
249 |
// (other items were commented in a header).
|
|
250 |
// ---------------------------------------------------------------------------
|
|
251 |
//
|
|
252 |
void CMmPhoneTsy::SetMessageManager(
|
|
253 |
CMmMessageManagerBase* aMessageManager )
|
|
254 |
{
|
|
255 |
iMessageManager = aMessageManager;
|
|
256 |
}
|
|
257 |
|
|
258 |
// ---------------------------------------------------------------------------
|
|
259 |
// CMmPhoneTsy::InitExtensionModulesL
|
|
260 |
// Initialises extension modules for CMmPhoneTsy
|
|
261 |
// (other items were commented in a header).
|
|
262 |
// ---------------------------------------------------------------------------
|
|
263 |
//
|
|
264 |
void CMmPhoneTsy::InitExtensionModulesL()
|
|
265 |
{
|
|
266 |
//Warnings caused by configurational constants in if case. These are not
|
|
267 |
//really errors but act as flags. This warning is purely informational as can
|
|
268 |
//be seen from the explanation of Visual C++ help:
|
|
269 |
//Compiler Warning (level 4) C4127
|
|
270 |
//conditional expression is constant. The controlling expression of an
|
|
271 |
//if statement or while loop evaluated to a constant. As a result, the
|
|
272 |
//code in the body of the if statement or while loop either always
|
|
273 |
//executes or never executes. This warning is informational.
|
|
274 |
#pragma warning(disable : 4127)
|
|
275 |
|
|
276 |
if ( RMobilePhone::ENetworkModeGsm == KDefaultProtocol )
|
|
277 |
{
|
|
278 |
//Create GSM Phone extension
|
|
279 |
iMmPhoneExtInterface = CMmPhoneGsmWcdmaExt::NewL( this,
|
|
280 |
iMessageManager );
|
|
281 |
}
|
|
282 |
|
|
283 |
//Set warning level to normal
|
|
284 |
#pragma warning(default : 4127)
|
|
285 |
|
|
286 |
// create DTMF Tsy instance
|
|
287 |
iMmDtmfTsy = CMmDtmfTsy::NewL( this );
|
|
288 |
|
|
289 |
// create NetTsy instance
|
|
290 |
iMmNetTsy = CMmNetTsy::NewL( this );
|
|
291 |
|
|
292 |
// create SupplServTsy instance
|
|
293 |
iMmSupplServTsy = CMmSupplServTsy::NewL( this );
|
|
294 |
|
|
295 |
//create SecurityTsy instance
|
|
296 |
iMmSecurityTsy = CMmSecurityTsy::NewL( this );
|
|
297 |
}
|
|
298 |
|
|
299 |
// ---------------------------------------------------------------------------
|
|
300 |
// CMmPhoneTsy::InitInternalAttributes
|
|
301 |
// Initialises miscellaneous internal attributes
|
|
302 |
// (other items were commented in a header).
|
|
303 |
// ---------------------------------------------------------------------------
|
|
304 |
//
|
|
305 |
void CMmPhoneTsy::InitInternalAttributes()
|
|
306 |
{
|
|
307 |
// Battery info
|
|
308 |
iBatteryInfo.iStatus = RMobilePhone::EPowerStatusUnknown;
|
|
309 |
iBatteryInfo.iChargeLevel = 0x00;
|
|
310 |
|
|
311 |
// Modem info
|
|
312 |
iPhoneStatus.iMode = RPhone::EModeIdle;
|
|
313 |
iPhoneStatus.iModemDetected = RPhone::EDetectedPresent;
|
|
314 |
|
|
315 |
//ALS line
|
|
316 |
iAlsLine = RMobilePhone::EAlternateLineUnknown;
|
|
317 |
|
|
318 |
//amount of active calls for air time duration
|
|
319 |
iAmountOfActiveCalls = 0;
|
|
320 |
|
|
321 |
//Temporary ALS line
|
|
322 |
iTempAlsLine = RMobilePhone::EAlternateLineUnknown;
|
|
323 |
|
|
324 |
//SMS Messaging sub session
|
|
325 |
iMmSmsTsy = NULL;
|
|
326 |
|
|
327 |
//Set manufacturer
|
|
328 |
iPhoneIdentity.iManufacturer.Copy( KPhoneManufacturerId );
|
|
329 |
|
|
330 |
//Set model
|
|
331 |
iPhoneIdentity.iModel.Copy( KPhoneModelId );
|
|
332 |
|
|
333 |
//Set revision
|
|
334 |
iPhoneIdentity.iRevision.Copy( KPhoneRevisionId );
|
|
335 |
|
|
336 |
//Set serial number to 'unknown'
|
|
337 |
iPhoneIdentity.iSerialNumber.Zero();
|
|
338 |
|
|
339 |
// no SIM refresh ongoing at boot
|
|
340 |
iRefreshOngoing = EFalse;
|
|
341 |
iSimCacheQueue = 0;
|
|
342 |
|
|
343 |
iPendingServiceTableReq = ENoRequest;
|
|
344 |
iPendingServiceTableCacheReq = ENoRequest;
|
|
345 |
|
|
346 |
// modem not ready
|
|
347 |
iIsModemReady = EFalse;
|
|
348 |
}
|
|
349 |
|
|
350 |
CMmPhoneTsy::~CMmPhoneTsy()
|
|
351 |
{
|
|
352 |
TFLOGSTRING("TSY: CMmPhoneTsy::~CMmPhoneTsy");
|
|
353 |
|
|
354 |
if(IsHWRMSupported())
|
|
355 |
{
|
|
356 |
if ( iChargingStatus )
|
|
357 |
{
|
|
358 |
delete iChargingStatus;
|
|
359 |
}
|
|
360 |
|
|
361 |
if ( iBattery )
|
|
362 |
{
|
|
363 |
delete iBattery;
|
|
364 |
}
|
|
365 |
|
|
366 |
if ( iPowerManager )
|
|
367 |
{
|
|
368 |
delete iPowerManager;
|
|
369 |
}
|
|
370 |
}
|
|
371 |
// deregister tsy object from message manager
|
|
372 |
MessageManager()->DeregisterTsyObject( this );
|
|
373 |
|
|
374 |
//Close handle to P&S (Close is not needed because we don't
|
|
375 |
//have a handle to this property)
|
|
376 |
iEmergencyCallInfoProperty.Delete(KPSUidCtsyEmergencyCallInfo,
|
|
377 |
KCTSYEmergencyCallInfo);
|
|
378 |
|
|
379 |
if ( iServiceTableDataCache )
|
|
380 |
{
|
|
381 |
delete iServiceTableDataCache;
|
|
382 |
}
|
|
383 |
|
|
384 |
if ( iServiceTableUSIMDataCache )
|
|
385 |
{
|
|
386 |
delete iServiceTableUSIMDataCache;
|
|
387 |
}
|
|
388 |
|
|
389 |
//delete req handle store
|
|
390 |
if ( iTsyReqHandleStore )
|
|
391 |
{
|
|
392 |
delete iTsyReqHandleStore;
|
|
393 |
}
|
|
394 |
iTsyReqHandleStore = NULL;
|
|
395 |
//delete phone extension
|
|
396 |
if ( iMmPhoneExtInterface )
|
|
397 |
{
|
|
398 |
delete iMmPhoneExtInterface;
|
|
399 |
}
|
|
400 |
iMmPhoneExtInterface = NULL;
|
|
401 |
// delete DTMF Tsy instance
|
|
402 |
if ( iMmDtmfTsy )
|
|
403 |
{
|
|
404 |
delete iMmDtmfTsy;
|
|
405 |
}
|
|
406 |
iMmDtmfTsy = NULL;
|
|
407 |
// delete NetTsy instance
|
|
408 |
if ( iMmNetTsy )
|
|
409 |
{
|
|
410 |
delete iMmNetTsy;
|
|
411 |
}
|
|
412 |
iMmNetTsy = NULL;
|
|
413 |
// delete SupplServTsy instance
|
|
414 |
if ( iMmSupplServTsy )
|
|
415 |
{
|
|
416 |
delete iMmSupplServTsy;
|
|
417 |
}
|
|
418 |
iMmSupplServTsy = NULL;
|
|
419 |
//delete SecurityTsy instance
|
|
420 |
if ( iMmSecurityTsy )
|
|
421 |
{
|
|
422 |
delete iMmSecurityTsy;
|
|
423 |
}
|
|
424 |
iMmSecurityTsy = NULL;
|
|
425 |
|
|
426 |
// Destroy the call list
|
|
427 |
if ( iCallList )
|
|
428 |
{
|
|
429 |
delete iCallList;
|
|
430 |
}
|
|
431 |
iCallList = NULL;
|
|
432 |
// Destroy the line list
|
|
433 |
if ( iLineList )
|
|
434 |
{
|
|
435 |
delete iLineList;
|
|
436 |
}
|
|
437 |
iLineList = NULL;
|
|
438 |
// Destroy the phonebook list
|
|
439 |
if ( iPBList )
|
|
440 |
{
|
|
441 |
delete iPBList;
|
|
442 |
}
|
|
443 |
iPBList = NULL;
|
|
444 |
|
|
445 |
//Release created LicenseeTsy instance
|
|
446 |
if( iLtsyFactory )
|
|
447 |
{
|
|
448 |
iLtsyFactory->Release();
|
|
449 |
}
|
|
450 |
iLtsyFactory = NULL;
|
|
451 |
|
|
452 |
// Destroy the message manager
|
|
453 |
if ( iMessageManager )
|
|
454 |
{
|
|
455 |
delete iMessageManager;
|
|
456 |
}
|
|
457 |
iMessageManager = NULL;
|
|
458 |
|
|
459 |
#ifdef REQHANDLE_TIMER
|
|
460 |
//delete the time store
|
|
461 |
if ( iReqHandleTimer )
|
|
462 |
{
|
|
463 |
delete iReqHandleTimer;
|
|
464 |
}
|
|
465 |
iReqHandleTimer = NULL;
|
|
466 |
//delete the timer
|
|
467 |
if ( iTimeStampStore )
|
|
468 |
{
|
|
469 |
delete iTimeStampStore;
|
|
470 |
}
|
|
471 |
iTimeStampStore = NULL;
|
|
472 |
#endif //REQHANDLE_TIMER
|
|
473 |
|
|
474 |
//delete the air time duration timer
|
|
475 |
if ( iAirTimeDurationTimer )
|
|
476 |
{
|
|
477 |
delete iAirTimeDurationTimer;
|
|
478 |
}
|
|
479 |
iAirTimeDurationTimer = NULL;
|
|
480 |
|
|
481 |
//delete phonebook state
|
|
482 |
if ( iPhoneBookState )
|
|
483 |
{
|
|
484 |
delete iPhoneBookState;
|
|
485 |
}
|
|
486 |
iPhoneBookState = NULL;
|
|
487 |
|
|
488 |
if( iCentRep )
|
|
489 |
{
|
|
490 |
delete iCentRep;
|
|
491 |
}
|
|
492 |
iCentRep = NULL;
|
|
493 |
|
|
494 |
// public central repositories
|
|
495 |
if( iCFISCentRep )
|
|
496 |
{
|
|
497 |
delete iCFISCentRep;
|
|
498 |
}
|
|
499 |
iCFISCentRep = NULL;
|
|
500 |
|
|
501 |
if( iMWISCentRep )
|
|
502 |
{
|
|
503 |
delete iMWISCentRep;
|
|
504 |
}
|
|
505 |
iMWISCentRep = NULL;
|
|
506 |
|
|
507 |
|
|
508 |
if ( iCFISPrivateCentRep )
|
|
509 |
{
|
|
510 |
delete iCFISPrivateCentRep;
|
|
511 |
}
|
|
512 |
iCFISPrivateCentRep = NULL;
|
|
513 |
|
|
514 |
//delete service table req
|
|
515 |
if( iServiceTableReq )
|
|
516 |
{
|
|
517 |
delete iServiceTableReq;
|
|
518 |
iServiceTableReq = NULL;
|
|
519 |
}
|
|
520 |
|
|
521 |
iSubscriberIdRequests.ResetAndDestroy();
|
|
522 |
iCustomerServiceProfileRequests.ResetAndDestroy();
|
|
523 |
iGetAlsLineRequests.ResetAndDestroy();
|
|
524 |
iServiceProviderNameRequests.ResetAndDestroy();
|
|
525 |
|
|
526 |
//set pointters to NULL
|
|
527 |
iMmPhoneFactory = NULL;
|
|
528 |
iMmConferenceCall = NULL;
|
|
529 |
iTsySatMessaging = NULL;
|
|
530 |
iMmUssdTsy = NULL;
|
|
531 |
iMmONStoreTsy = NULL;
|
|
532 |
iMmENStoreTsy = NULL;
|
|
533 |
iMmPhoneBookStoreTsy = NULL;
|
|
534 |
iMmCustomTsy = NULL;
|
|
535 |
iMmSmsTsy = NULL;
|
|
536 |
iMmPacketServiceTsy = NULL;
|
|
537 |
iRetPhoneIdentity = NULL;
|
|
538 |
iRetCaps = NULL;
|
|
539 |
iRetModemDetection = NULL;
|
|
540 |
iRetNotifyFdnStatus = NULL;
|
|
541 |
iRetNotifyALSLine = NULL;
|
|
542 |
iICCCaps = NULL;
|
|
543 |
iRetBatteryInfo = NULL;
|
|
544 |
iRetPhoneStoreInfo = NULL;
|
|
545 |
iRetTableData = NULL;
|
|
546 |
iMmBroadcastTsy = NULL;
|
|
547 |
iRetFdnSetting = NULL;
|
|
548 |
iMmWaitingDataCall = NULL;
|
|
549 |
iRetGetFdnStatus = NULL;
|
|
550 |
iRetAPNEntries = NULL;
|
|
551 |
iRetAPNname = NULL;
|
|
552 |
iRetAclStatus = NULL;
|
|
553 |
iSetAclStatus = NULL;
|
|
554 |
iRetNotifyAclStatus = NULL;
|
|
555 |
|
|
556 |
if ( iSystemStatePluginHandler )
|
|
557 |
{
|
|
558 |
iSystemStatePluginHandler->Close();
|
|
559 |
delete iSystemStatePluginHandler;
|
|
560 |
}
|
|
561 |
iSystemStatePluginHandler = NULL;
|
|
562 |
TFLOGSTRING("TSY: CMmPhoneTsy::~CMmPhoneTsy DONE");
|
|
563 |
}
|
|
564 |
|
|
565 |
// ---------------------------------------------------------------------------
|
|
566 |
// CMmPhoneTsy::Init
|
|
567 |
// Initialisation method that is called from ETel Server
|
|
568 |
// Creates TRAP and calls InitL method to do the actual initialisation
|
|
569 |
// (other items were commented in a header).
|
|
570 |
// ---------------------------------------------------------------------------
|
|
571 |
//
|
|
572 |
void CMmPhoneTsy::Init()
|
|
573 |
{
|
|
574 |
}
|
|
575 |
|
|
576 |
// ---------------------------------------------------------------------------
|
|
577 |
// CMmPhoneTsy::CompleteNotifyModemStatusReady
|
|
578 |
// Trapped version of Init. Sends mode independent initialisation
|
|
579 |
// requests to Phonet and then directs the request also to extension for
|
|
580 |
// mode dependent initialisation requests
|
|
581 |
// (other items were commented in a header).
|
|
582 |
// ---------------------------------------------------------------------------
|
|
583 |
//
|
|
584 |
void CMmPhoneTsy::CompleteNotifyModemStatusReady()
|
|
585 |
{
|
|
586 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteNotifyModemStatusReady");
|
|
587 |
|
|
588 |
TRAP_IGNORE(
|
|
589 |
//update the network registration status
|
|
590 |
iMmPhoneExtInterface->GetNetworkRegistrationStatusL( );
|
|
591 |
|
|
592 |
//Start SMS routing if is not activated
|
|
593 |
if( iMmSmsTsy )
|
|
594 |
{
|
|
595 |
iMmSmsTsy->ActivateSmsRoutingL();
|
|
596 |
}
|
|
597 |
|
|
598 |
// Make the SIM status request here to get SIM initializing started
|
|
599 |
iMmPhoneExtInterface->NotifySimStatusReadyL();
|
|
600 |
);
|
|
601 |
// set internal boolean to true
|
|
602 |
iIsModemReady = ETrue;
|
|
603 |
}
|
|
604 |
|
|
605 |
// ---------------------------------------------------------------------------
|
|
606 |
// CMmPhoneTsy::CompleteNotifySimStatusReadyL
|
|
607 |
// Initializes SIM dependent parts
|
|
608 |
// (other items were commented in a header).
|
|
609 |
// ---------------------------------------------------------------------------
|
|
610 |
//
|
|
611 |
void CMmPhoneTsy::CompleteNotifySimStatusReadyL()
|
|
612 |
{
|
|
613 |
if ( !iBootState.iSIMReady )
|
|
614 |
{
|
|
615 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteNotifySimStatusReadyL - SIM is ready, start initialisations");
|
|
616 |
|
|
617 |
iBootState.iSIMReady = ETrue;
|
|
618 |
iBootState.iADNReady = ETrue;
|
|
619 |
|
|
620 |
// Might leave, but we want to call also other
|
|
621 |
// init methods here so trap possible leave.
|
|
622 |
iMmPhoneExtInterface->InitSimL();
|
|
623 |
|
|
624 |
// Cache Service Tables
|
|
625 |
CacheServiceTablesL();
|
|
626 |
// start Phonebook caching
|
|
627 |
StartPBCachingL();
|
|
628 |
|
|
629 |
// request ALS status
|
|
630 |
iMessageManager->HandleRequestL( EMobilePhoneGetALSLine );
|
|
631 |
// Request callforwarding number
|
|
632 |
iMessageManager->HandleRequestL( EMmTsyGetCallForwardingNumberIPC );
|
|
633 |
// Get call forwarding status
|
|
634 |
iMessageManager->HandleRequestL(
|
|
635 |
ECustomGetIccCallForwardingStatusIPC );
|
|
636 |
// Get message waiting indicators
|
|
637 |
iMessageManager->HandleRequestL(
|
|
638 |
EMobilePhoneGetIccMessageWaitingIndicators );
|
|
639 |
|
|
640 |
TInt ret = iMessageManager->HandleRequestL(
|
|
641 |
ECustomCheckAlsPpSupportIPC );
|
|
642 |
|
|
643 |
if( KErrNone == ret )
|
|
644 |
{
|
|
645 |
iAlsQueryInBoot = ETrue;
|
|
646 |
}
|
|
647 |
|
|
648 |
ret = iMessageManager->HandleRequestL(
|
|
649 |
EMobilePhoneGetCustomerServiceProfile );
|
|
650 |
|
|
651 |
if( KErrNone == ret )
|
|
652 |
{
|
|
653 |
iCspFileQueryInBoot = ETrue;
|
|
654 |
}
|
|
655 |
|
|
656 |
// If Custom TSY is open, check whether we need to read
|
|
657 |
// VIAG homezone parameters.
|
|
658 |
if ( iMmCustomTsy )
|
|
659 |
{
|
|
660 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteNotifySimStatusReadyL - CustomTSY ready");
|
|
661 |
// Get pointer to SIM Custom TSY
|
|
662 |
CMmSIMTsy* simCustomTsy =
|
|
663 |
( ( CMmSIMTsy* ) iMmCustomTsy->GetSIMTsyPtr() );
|
|
664 |
|
|
665 |
if ( simCustomTsy )
|
|
666 |
{
|
|
667 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteNotifySimStatusReadyL - CheckViagHomeZoneParamsL()");
|
|
668 |
simCustomTsy->CheckViagHomezoneParamsL();
|
|
669 |
iViagHomeZoneParamsChecked = ETrue;
|
|
670 |
}
|
|
671 |
}
|
|
672 |
// If not able to read here it's tried again in customtsy
|
|
673 |
else
|
|
674 |
{
|
|
675 |
iViagHomeZoneParamsChecked = EFalse;
|
|
676 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteNotifySimStatusReadyL - CustomTSY NOT ready");
|
|
677 |
}
|
|
678 |
}
|
|
679 |
}
|
|
680 |
|
|
681 |
// ---------------------------------------------------------------------------
|
|
682 |
// CMmPhoneTsy::CompleteNotifySecurityReady
|
|
683 |
// Completes NotifySecurityReady request
|
|
684 |
// (other items were commented in a header).
|
|
685 |
// ---------------------------------------------------------------------------
|
|
686 |
//
|
|
687 |
void CMmPhoneTsy::CompleteNotifySecurityReady()
|
|
688 |
{
|
|
689 |
iBootState.iSecReady = ETrue;
|
|
690 |
}
|
|
691 |
|
|
692 |
// ---------------------------------------------------------------------------
|
|
693 |
// CMmPhoneTsy::StartPBCachingL
|
|
694 |
// Initializes Phonebook caching once the SIM is ready
|
|
695 |
// (other items were commented in a header).
|
|
696 |
// ---------------------------------------------------------------------------
|
|
697 |
//
|
|
698 |
void CMmPhoneTsy::StartPBCachingL()
|
|
699 |
{
|
|
700 |
// If ADN or FDN phone book storage is created, then start to fetch
|
|
701 |
// entries from SIM into cache.
|
|
702 |
for( TInt i = 0; i < iPBList->GetNumberOfObjects(); i++ )
|
|
703 |
{
|
|
704 |
// Get pbStore object
|
|
705 |
CMmPhoneBookStoreTsy* pbStore = iPBList->GetMmPBByIndex( i );
|
|
706 |
// Notify the store that the SIM is ready
|
|
707 |
pbStore->SimIsReady();
|
|
708 |
}
|
|
709 |
}
|
|
710 |
|
|
711 |
// ---------------------------------------------------------------------------
|
|
712 |
// CMmPhoneTsy::NotifyIndicatorChange
|
|
713 |
// Register to listen to indicator changes
|
|
714 |
// (other items were commented in a header).
|
|
715 |
// ---------------------------------------------------------------------------
|
|
716 |
//
|
|
717 |
TInt CMmPhoneTsy::NotifyIndicatorChange(
|
|
718 |
TUint32* aIndicatorState )
|
|
719 |
{
|
|
720 |
TFLOGSTRING("TSY: CMmPhoneTsy::NotifyIndicatorChange");
|
|
721 |
|
|
722 |
// Update indicator state, we don't keep track of it
|
|
723 |
// unless notify is on. So we need to update starting
|
|
724 |
// value first..
|
|
725 |
iIndicatorState = GetIndicatorState();
|
|
726 |
iRetIndicatorState = aIndicatorState;
|
|
727 |
iReqHandleType = EMultimodePhoneNotifyIndicatorChange;
|
|
728 |
return KErrNone;
|
|
729 |
}
|
|
730 |
|
|
731 |
// ---------------------------------------------------------------------------
|
|
732 |
// CMmPhoneTsy::CompleteNotifyIndicatorChange
|
|
733 |
// Description: Complete NotifyIndicatorChange if indicator state has changed
|
|
734 |
// (other items were commented in a header).
|
|
735 |
// ---------------------------------------------------------------------------
|
|
736 |
//
|
|
737 |
void CMmPhoneTsy::CompleteNotifyIndicatorChange()
|
|
738 |
{
|
|
739 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteNotifyIndicatorChange");
|
|
740 |
|
|
741 |
// first check if this notify is actually requested..
|
|
742 |
if (NULL != iRetIndicatorState)
|
|
743 |
{
|
|
744 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteNotifyIndicatorChange -- notify is on");
|
|
745 |
TUint32 newIndicatorState = GetIndicatorState();
|
|
746 |
if (newIndicatorState != iIndicatorState)
|
|
747 |
{
|
|
748 |
iIndicatorState = newIndicatorState;
|
|
749 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteNotifyIndicatorChange -- changed to 0x%x", iIndicatorState);
|
|
750 |
|
|
751 |
//reset req handle. Returns the deleted req handle
|
|
752 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
753 |
EMultimodePhoneNotifyIndicatorChange );
|
|
754 |
|
|
755 |
if( EMultimodePhoneReqHandleUnknown != reqHandle)
|
|
756 |
{
|
|
757 |
*iRetIndicatorState = iIndicatorState;
|
|
758 |
iRetIndicatorState = NULL;
|
|
759 |
// complete the client request
|
|
760 |
ReqCompleted( reqHandle, KErrNone );
|
|
761 |
}
|
|
762 |
}
|
|
763 |
}
|
|
764 |
}
|
|
765 |
|
|
766 |
// ---------------------------------------------------------------------------
|
|
767 |
// CMmPhoneTsy::NotifyIndicatorChangeCancel
|
|
768 |
// Cancels an outstanding NotifyIndicatorChange request.
|
|
769 |
// (other items were commented in a header).
|
|
770 |
// ---------------------------------------------------------------------------
|
|
771 |
//
|
|
772 |
TInt CMmPhoneTsy::NotifyIndicatorChangeCancel(
|
|
773 |
const TTsyReqHandle aTsyReqHandle )
|
|
774 |
{
|
|
775 |
TFLOGSTRING("TSY: CMmPhoneTsy::NotifyIndicatorChangeCancel");
|
|
776 |
|
|
777 |
iRetIndicatorState = NULL;
|
|
778 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
779 |
EMultimodePhoneNotifyIndicatorChange );
|
|
780 |
|
|
781 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
782 |
|
|
783 |
return KErrNone;
|
|
784 |
}
|
|
785 |
|
|
786 |
// ---------------------------------------------------------------------------
|
|
787 |
// CMmPhoneTsy::NosBootState
|
|
788 |
// Returns current DOS boot state
|
|
789 |
// (other items were commented in a header).
|
|
790 |
// ---------------------------------------------------------------------------
|
|
791 |
//
|
|
792 |
CMmPhoneTsy::TNosBootState* CMmPhoneTsy::NosBootState()
|
|
793 |
{
|
|
794 |
return &iBootState;
|
|
795 |
}
|
|
796 |
|
|
797 |
// ---------------------------------------------------------------------------
|
|
798 |
// CMmPhoneTsy::PhoneBookState
|
|
799 |
// Returns current Phonebook state
|
|
800 |
// (other items were commented in a header).
|
|
801 |
// ---------------------------------------------------------------------------
|
|
802 |
//
|
|
803 |
CStorageInfoData* CMmPhoneTsy::PhoneBookState()
|
|
804 |
{
|
|
805 |
return iPhoneBookState;
|
|
806 |
}
|
|
807 |
|
|
808 |
// ---------------------------------------------------------------------------
|
|
809 |
// CMmPhoneTsy::OpenNewObjectByNameL
|
|
810 |
// Creates new object and returns a pointer to it. The ETel
|
|
811 |
// Server calls this method after some client has requested to open object
|
|
812 |
// (e.g. line, sms, sat etc.) from ETel. TSY classes must not use this method.
|
|
813 |
// (other items were commented in a header).
|
|
814 |
// ---------------------------------------------------------------------------
|
|
815 |
//
|
|
816 |
CTelObject* CMmPhoneTsy::OpenNewObjectByNameL(
|
|
817 |
const TDesC& aName )
|
|
818 |
{
|
|
819 |
//Warnings caused by configurational constants in if case. These are not
|
|
820 |
//really errors but act as flags. This warning is purely informational as can
|
|
821 |
//be seen from the explanation of Visual C++ help:
|
|
822 |
//Compiler Warning (level 4) C4127
|
|
823 |
//conditional expression is constant. The controlling expression of an
|
|
824 |
//if statement or while loop evaluated to a constant. As a result, the
|
|
825 |
//code in the body of the if statement or while loop either always
|
|
826 |
//executes or never executes. This warning is informational.
|
|
827 |
#pragma warning(disable : 4127)
|
|
828 |
|
|
829 |
RMobilePhone::TMobileService mode( RMobilePhone::EServiceUnspecified );
|
|
830 |
TInt addLineSucceeded( KErrNone );
|
|
831 |
TInt addPBSucceeded( KErrNone );
|
|
832 |
TInt trapError( 0 );
|
|
833 |
CTelObject* mmObject = NULL;
|
|
834 |
CMmLineTsy* mmLine = NULL;
|
|
835 |
|
|
836 |
//Voice line
|
|
837 |
if ( KVoice1LineSupported &&
|
|
838 |
aName.CompareF( KMmTsyVoice1LineName ) == KErrNone )
|
|
839 |
{
|
|
840 |
mode = RMobilePhone::EVoiceService;
|
|
841 |
TRAP( trapError, mmLine = CMmVoiceLineTsy::NewL( this, mode, aName,
|
|
842 |
iMessageManager, iTelephonyAudioControl ); );
|
|
843 |
if( KErrNone == trapError)
|
|
844 |
{
|
|
845 |
addLineSucceeded = iLineList->AddLineObject( mmLine,
|
|
846 |
mmLine->LineName() );
|
|
847 |
mmObject = REINTERPRET_CAST( CTelObject*, mmLine );
|
|
848 |
|
|
849 |
if ( 0 == addLineSucceeded )
|
|
850 |
{
|
|
851 |
if(!(iPhoneCaps.iFlags & RPhone::KCapsVoice))//complete capability change only if required
|
|
852 |
{
|
|
853 |
//set voice flag to capabilities, mask 'Unknown' caps bit away
|
|
854 |
iPhoneCaps.iFlags = RPhone::KCapsVoice + (
|
|
855 |
iPhoneCaps.iFlags & 0xFFFFFFFE );
|
|
856 |
CompleteNotifyCapsChange();
|
|
857 |
}
|
|
858 |
}
|
|
859 |
}
|
|
860 |
}
|
|
861 |
//Data line
|
|
862 |
else if ( KDataLineSupported &&
|
|
863 |
aName.CompareF( KMmTsyDataLineName ) == KErrNone )
|
|
864 |
{
|
|
865 |
mode = RMobilePhone::ECircuitDataService;
|
|
866 |
TRAP( trapError, mmLine = CMmDataLineTsy::NewL( this, mode, aName,
|
|
867 |
iMessageManager ); );
|
|
868 |
if( KErrNone == trapError)
|
|
869 |
{
|
|
870 |
addLineSucceeded = iLineList->AddLineObject( mmLine,
|
|
871 |
mmLine->LineName() );
|
|
872 |
mmObject = REINTERPRET_CAST( CTelObject*, mmLine );
|
|
873 |
|
|
874 |
if ( 0 == addLineSucceeded )
|
|
875 |
{
|
|
876 |
//set data flags to capabilities, mask 'Unknown' caps bit away
|
|
877 |
iPhoneCaps.iFlags = RPhone::KCapsData +
|
|
878 |
RPhone::KCapsEventModemDetection +
|
|
879 |
RPhone::KCapsStealCommPort + (
|
|
880 |
iPhoneCaps.iFlags & 0xFFFFFFFE );
|
|
881 |
CompleteNotifyCapsChange();
|
|
882 |
}
|
|
883 |
}
|
|
884 |
}
|
|
885 |
//Fax line
|
|
886 |
else if ( KFaxLineSupported &&
|
|
887 |
aName.CompareF( KMmTsyFaxLineName ) == KErrNone )
|
|
888 |
{
|
|
889 |
mode = RMobilePhone::EFaxService;
|
|
890 |
TRAP( trapError, mmLine = CMmFaxLineTsy::NewL( this, mode, aName,
|
|
891 |
iMessageManager ); );
|
|
892 |
if( KErrNone == trapError)
|
|
893 |
{
|
|
894 |
addLineSucceeded = iLineList->AddLineObject( mmLine,
|
|
895 |
mmLine->LineName() );
|
|
896 |
mmObject = REINTERPRET_CAST( CTelObject*, mmLine );
|
|
897 |
}
|
|
898 |
}
|
|
899 |
//Voice line 2
|
|
900 |
else if ( KVoice2LineSupported &&
|
|
901 |
aName.CompareF( KMmTsyVoice2LineName ) == KErrNone )
|
|
902 |
{
|
|
903 |
mode = RMobilePhone::EAuxVoiceService;
|
|
904 |
TRAP( trapError, mmLine = CMmVoiceLineTsy::NewL( this, mode, aName,
|
|
905 |
iMessageManager, iTelephonyAudioControl ); );
|
|
906 |
if( KErrNone == trapError)
|
|
907 |
{
|
|
908 |
addLineSucceeded = iLineList->AddLineObject( mmLine, mmLine->
|
|
909 |
LineName() );
|
|
910 |
mmObject = REINTERPRET_CAST( CTelObject*, mmLine );
|
|
911 |
|
|
912 |
if ( 0 == addLineSucceeded )
|
|
913 |
{
|
|
914 |
if(!(iPhoneCaps.iFlags & RPhone::KCapsVoice))//complete capability change only if required
|
|
915 |
{
|
|
916 |
//set voice flag to capabilities, mask 'Unknown' caps bit away
|
|
917 |
iPhoneCaps.iFlags = RPhone::KCapsVoice + (
|
|
918 |
iPhoneCaps.iFlags & 0xFFFFFFFE );
|
|
919 |
CompleteNotifyCapsChange();
|
|
920 |
}
|
|
921 |
}
|
|
922 |
}
|
|
923 |
}
|
|
924 |
//Conference call
|
|
925 |
else if ( KConferenceCallSupported &&
|
|
926 |
aName.CompareF( KETelConferenceCall ) == KErrNone )
|
|
927 |
{
|
|
928 |
TRAP( trapError, iMmConferenceCall =
|
|
929 |
CMmConferenceCallTsy::NewL( this ); );
|
|
930 |
if( KErrNone == trapError)
|
|
931 |
{
|
|
932 |
mmObject = REINTERPRET_CAST( CTelObject*, iMmConferenceCall );
|
|
933 |
}
|
|
934 |
}
|
|
935 |
//SMS
|
|
936 |
else if ( KSmsMessagingSupported &&
|
|
937 |
aName.CompareF( KETelSmsMessaging ) == KErrNone )
|
|
938 |
{
|
|
939 |
TRAP( trapError, iMmSmsTsy = CMmSmsTsy::NewL( this ); );
|
|
940 |
if( KErrNone == trapError)
|
|
941 |
{
|
|
942 |
mmObject = REINTERPRET_CAST( CTelObject*, iMmSmsTsy );
|
|
943 |
}
|
|
944 |
}
|
|
945 |
//Broadcast messaging
|
|
946 |
else if ( KBroadcastMessagingSupported &&
|
|
947 |
aName.CompareF( KETelBroadcastMessaging ) == KErrNone )
|
|
948 |
{
|
|
949 |
TRAP( trapError, iMmBroadcastTsy = CMmBroadcastTsy::NewL(
|
|
950 |
this ); );
|
|
951 |
if( KErrNone == trapError)
|
|
952 |
{
|
|
953 |
mmObject = REINTERPRET_CAST( CTelObject*, iMmBroadcastTsy );
|
|
954 |
}
|
|
955 |
}
|
|
956 |
//ON store
|
|
957 |
else if ( KONStoreSupported &&
|
|
958 |
aName.CompareF( KETelOwnNumberStore ) == KErrNone )
|
|
959 |
{
|
|
960 |
TRAP( trapError, iMmONStoreTsy = CMmONStoreTsy::NewL( this ); );
|
|
961 |
if( KErrNone == trapError)
|
|
962 |
{
|
|
963 |
mmObject = REINTERPRET_CAST( CTelObject*, iMmONStoreTsy );
|
|
964 |
}
|
|
965 |
}
|
|
966 |
//EN store
|
|
967 |
else if ( KENStoreSupported &&
|
|
968 |
aName.CompareF( KETelEmergencyNumberStore ) == KErrNone )
|
|
969 |
{
|
|
970 |
TRAP( trapError, iMmENStoreTsy = CMmENStoreTsy::NewL( this ); );
|
|
971 |
if( KErrNone == trapError)
|
|
972 |
{
|
|
973 |
mmObject = REINTERPRET_CAST( CTelObject*, iMmENStoreTsy );
|
|
974 |
}
|
|
975 |
}
|
|
976 |
//Phonebook
|
|
977 |
else if ( KSimPhoneBookSupported &&
|
|
978 |
aName.CompareF( KETelIccAdnPhoneBook ) == KErrNone ||
|
|
979 |
aName.CompareF( KETelIccFdnPhoneBook ) == KErrNone ||
|
|
980 |
aName.CompareF( KETelIccSdnPhoneBook ) == KErrNone ||
|
|
981 |
aName.CompareF( KETelIccBdnPhoneBook ) == KErrNone ||
|
|
982 |
aName.CompareF( KETelIccVoiceMailBox ) == KErrNone ||
|
|
983 |
aName.CompareF( KETelIccMbdnPhoneBook ) == KErrNone )
|
|
984 |
{
|
|
985 |
TBool isPhonebookAlreadyCreated = EFalse;
|
|
986 |
//Check that no already created object is tried to open multiple times
|
|
987 |
for( TInt i = 0; i < iPBList->GetNumberOfObjects(); i++ )
|
|
988 |
{
|
|
989 |
CMmPhoneBookStoreTsy* pbStore = iPBList->GetMmPBByIndex( i );
|
|
990 |
|
|
991 |
if ( 0 == pbStore->PhoneBookName()->CompareF( aName ) )
|
|
992 |
{
|
|
993 |
isPhonebookAlreadyCreated = ETrue;
|
|
994 |
mmObject = REINTERPRET_CAST( CTelObject*, pbStore );
|
|
995 |
}
|
|
996 |
}
|
|
997 |
|
|
998 |
// If not, a new instance can be safely created
|
|
999 |
if ( !isPhonebookAlreadyCreated )
|
|
1000 |
{
|
|
1001 |
TRAP( trapError, iMmPhoneBookStoreTsy =
|
|
1002 |
CMmPhoneBookStoreTsy::NewL( this, aName ); );
|
|
1003 |
|
|
1004 |
if( KErrNone == trapError)
|
|
1005 |
{
|
|
1006 |
addPBSucceeded = iPBList->AddObject( iMmPhoneBookStoreTsy );
|
|
1007 |
mmObject = REINTERPRET_CAST(
|
|
1008 |
CTelObject*, iMmPhoneBookStoreTsy );
|
|
1009 |
}
|
|
1010 |
}
|
|
1011 |
}
|
|
1012 |
//SAT
|
|
1013 |
else if ( KSatToolkitSupported &&
|
|
1014 |
!aName.CompareF( KSatToolkit ) )
|
|
1015 |
{
|
|
1016 |
iTsySatMessaging = iMmPhoneFactory->NewSimAtk( aName );
|
|
1017 |
if( iTsySatMessaging )
|
|
1018 |
{
|
|
1019 |
//Only one application in the phone uses SAT
|
|
1020 |
mmObject = REINTERPRET_CAST( CTelObject*, iTsySatMessaging );
|
|
1021 |
}
|
|
1022 |
}
|
|
1023 |
//USSD
|
|
1024 |
else if ( KUssdMessagingSupported &&
|
|
1025 |
aName.CompareF( KETelUssdMessaging ) == KErrNone )
|
|
1026 |
{
|
|
1027 |
TRAP( trapError, iMmUssdTsy = CMmUssdTsy::NewL(
|
|
1028 |
this ); );
|
|
1029 |
if( KErrNone == trapError)
|
|
1030 |
{
|
|
1031 |
mmObject = REINTERPRET_CAST( CTelObject*, iMmUssdTsy );
|
|
1032 |
}
|
|
1033 |
}
|
|
1034 |
//Custom TSY
|
|
1035 |
else if ( KCustomAPISupported &&
|
|
1036 |
aName.CompareF( KCustomAPIName ) == KErrNone )
|
|
1037 |
{
|
|
1038 |
TRAP( trapError, iMmCustomTsy = CMmCustomTsy::NewL(
|
|
1039 |
this ); );
|
|
1040 |
if( KErrNone == trapError)
|
|
1041 |
{
|
|
1042 |
mmObject = REINTERPRET_CAST( CTelObject*, iMmCustomTsy );
|
|
1043 |
}
|
|
1044 |
}
|
|
1045 |
|
|
1046 |
//Packet Data Session
|
|
1047 |
else if ( KGprsLineSupported && ( KErrNone ==
|
|
1048 |
aName.CompareF( KPacketName ) ) )
|
|
1049 |
{
|
|
1050 |
TRAP( trapError, iMmPacketServiceTsy =
|
|
1051 |
CMmPacketServiceTsy::NewL( this,
|
|
1052 |
REINTERPRET_CAST( CMmMessageManagerBase*, iMessageManager ),
|
|
1053 |
iLtsyFactory ) );
|
|
1054 |
if( KErrNone == trapError )
|
|
1055 |
{
|
|
1056 |
mmObject = REINTERPRET_CAST( CTelObject*, iMmPacketServiceTsy );
|
|
1057 |
}
|
|
1058 |
}
|
|
1059 |
|
|
1060 |
//Set warning level to normal
|
|
1061 |
#pragma warning(default : 4127)
|
|
1062 |
|
|
1063 |
if ( KErrNone != trapError || KErrNone != addLineSucceeded
|
|
1064 |
|| KErrNone != addPBSucceeded )
|
|
1065 |
{
|
|
1066 |
TFLOGSTRING2("TSY: CMmPhoneTsy::OpenNewObjectByNameL - Failed: %d",
|
|
1067 |
trapError);
|
|
1068 |
|
|
1069 |
if ( mmLine )
|
|
1070 |
{
|
|
1071 |
mmLine->Close();
|
|
1072 |
mmLine = NULL;
|
|
1073 |
}
|
|
1074 |
if ( KErrNone == trapError )
|
|
1075 |
{
|
|
1076 |
User::Leave( KErrNoMemory );
|
|
1077 |
}
|
|
1078 |
else
|
|
1079 |
{
|
|
1080 |
User::Leave( trapError );
|
|
1081 |
}
|
|
1082 |
}
|
|
1083 |
if ( NULL != mmObject )
|
|
1084 |
{
|
|
1085 |
//if object has been opened, return it.
|
|
1086 |
return mmObject;
|
|
1087 |
}
|
|
1088 |
|
|
1089 |
//Otherwise we can leave...
|
|
1090 |
User::Leave( KErrNotSupported );
|
|
1091 |
return NULL;
|
|
1092 |
|
|
1093 |
}
|
|
1094 |
|
|
1095 |
// ---------------------------------------------------------------------------
|
|
1096 |
// CMmPhoneTsy::OpenNewObjectL
|
|
1097 |
// Creates new Line object and returns a pointer to it. All
|
|
1098 |
// objects opened from the phone are opened by name, hence
|
|
1099 |
// this method is not supported.
|
|
1100 |
// (other items were commented in a header).
|
|
1101 |
// ---------------------------------------------------------------------------
|
|
1102 |
//
|
|
1103 |
CTelObject* CMmPhoneTsy::OpenNewObjectL(
|
|
1104 |
TDes& )
|
|
1105 |
{
|
|
1106 |
User::Leave( KErrNotSupported );
|
|
1107 |
return NULL;
|
|
1108 |
}
|
|
1109 |
|
|
1110 |
// ---------------------------------------------------------------------------
|
|
1111 |
// CMmPhoneTsy::ExtFunc
|
|
1112 |
// TRAP's all CMmPhoneTsy related MM API requests in cases that
|
|
1113 |
// they fail. This method functions only as a centralized TRAP for the
|
|
1114 |
// DoExtFuncL method that does the actual mapping of IPC number to
|
|
1115 |
// TSY method call.
|
|
1116 |
// (other items were commented in a header).
|
|
1117 |
// ---------------------------------------------------------------------------
|
|
1118 |
//
|
|
1119 |
TInt CMmPhoneTsy::ExtFunc(
|
|
1120 |
const TTsyReqHandle aTsyReqHandle,
|
|
1121 |
const TInt aIpc,
|
|
1122 |
const TDataPackage& aPackage )
|
|
1123 |
{
|
|
1124 |
TFLOGSTRING3("TSY: CMmPhoneTsy::ExtFunc, IPC:%d, Handle:%d", aIpc, aTsyReqHandle);
|
|
1125 |
|
|
1126 |
TInt ret = KErrNone;
|
|
1127 |
TInt trapError = KErrNone;
|
|
1128 |
|
|
1129 |
// Ensure the ReqHandleType is unset.
|
|
1130 |
// This will detect cases where this method indirectly calls itself
|
|
1131 |
// (e.g. servicing a client call that causes a self-reposting notification to complete and thus repost).
|
|
1132 |
// Such cases are not supported because iReqHandleType is in the context of this class instance,
|
|
1133 |
// not this request, and we don't want the values set by the inner request and the outer request
|
|
1134 |
// interfering with each other.
|
|
1135 |
__ASSERT_DEBUG(iReqHandleType==EMultimodePhoneReqHandleUnknown, User::Invariant());
|
|
1136 |
|
|
1137 |
//before processing further the request, check if offline mode status
|
|
1138 |
//is enabled and if the given request can be perfomed in that case.
|
|
1139 |
if ( ERfsStateInfoInactive == iStateInfo &&
|
|
1140 |
!IsRequestPossibleInOffline( aIpc ) )
|
|
1141 |
{
|
|
1142 |
TFLOGSTRING2 ("TSY: Offline mode ON, request is not allowed: %d", aIpc );
|
|
1143 |
ret = CMmCommonStaticUtility::EpocErrorCode( KErrGeneral,
|
|
1144 |
KErrGsmOfflineOpNotAllowed );
|
|
1145 |
|
|
1146 |
//Complete the request with appropiate error
|
|
1147 |
ReqCompleted ( aTsyReqHandle, ret );
|
|
1148 |
}
|
|
1149 |
else
|
|
1150 |
{
|
|
1151 |
|
|
1152 |
TRAP( trapError, ret = DoExtFuncL( aTsyReqHandle, aIpc, aPackage ); );
|
|
1153 |
|
|
1154 |
if ( trapError != KErrNone )
|
|
1155 |
{
|
|
1156 |
ReqCompleted( aTsyReqHandle, trapError );
|
|
1157 |
}
|
|
1158 |
else if ( ret != KErrNone )
|
|
1159 |
{
|
|
1160 |
ReqCompleted( aTsyReqHandle, ret );
|
|
1161 |
}
|
|
1162 |
|
|
1163 |
if ( EMultimodePhoneReqHandleUnknown != iReqHandleType )
|
|
1164 |
{
|
|
1165 |
#ifdef REQHANDLE_TIMER
|
|
1166 |
SetTypeOfResponse( iReqHandleType, aTsyReqHandle );
|
|
1167 |
#else
|
|
1168 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
1169 |
iReqHandleType, aTsyReqHandle );
|
|
1170 |
#endif //REQHANDLE_TIMER
|
|
1171 |
// We've finished with this value now. Clear it so it doesn't leak
|
|
1172 |
// up to any other instances of this method down the call stack
|
|
1173 |
iReqHandleType = EMultimodePhoneReqHandleUnknown;
|
|
1174 |
}
|
|
1175 |
}
|
|
1176 |
|
|
1177 |
return KErrNone;
|
|
1178 |
|
|
1179 |
}
|
|
1180 |
|
|
1181 |
// ---------------------------------------------------------------------------
|
|
1182 |
// CMmPhoneTsy::DoExtFuncL
|
|
1183 |
// ExtFunc is called by the server when it has a "extended",
|
|
1184 |
// i.e. non-core ETel request for the TSY. To process a request handle,
|
|
1185 |
// request type and request data are passed to the TSY.
|
|
1186 |
// (other items were commented in a header).
|
|
1187 |
// ---------------------------------------------------------------------------
|
|
1188 |
//
|
|
1189 |
TInt CMmPhoneTsy::DoExtFuncL(
|
|
1190 |
const TTsyReqHandle aTsyReqHandle,
|
|
1191 |
const TInt aIpc,
|
|
1192 |
const TDataPackage& aPackage )
|
|
1193 |
{
|
|
1194 |
TFLOGSTRING3("TSY: CMmPhoneTsy::DoExtFuncL - IPC:%d Handle:%d", aIpc, aTsyReqHandle);
|
|
1195 |
|
|
1196 |
TInt ret = KErrNone;
|
|
1197 |
|
|
1198 |
TAny* dataPtr = aPackage.Ptr1();
|
|
1199 |
TAny* dataPtr2 = aPackage.Ptr2();
|
|
1200 |
|
|
1201 |
|
|
1202 |
switch ( aIpc )
|
|
1203 |
{
|
|
1204 |
// Mobile Network
|
|
1205 |
case EMobilePhoneGetNetworkCaps:
|
|
1206 |
case EMobilePhoneGetNetworkRegistrationStatus:
|
|
1207 |
case EMobilePhoneNotifyNetworkRegistrationStatusChange:
|
|
1208 |
case EMobilePhoneGetCurrentMode:
|
|
1209 |
case EMobilePhoneNotifyModeChange:
|
|
1210 |
case EMobilePhoneGetCurrentNetwork:
|
|
1211 |
case EMobilePhoneGetNetworkName:
|
|
1212 |
case EMobilePhoneGetCurrentNetworkNoLocation:
|
|
1213 |
case EMobilePhoneNotifyCurrentNetworkNoLocationChange:
|
|
1214 |
case EMobilePhoneNotifyCurrentNetworkChange:
|
|
1215 |
case EMobilePhoneGetHomeNetwork:
|
|
1216 |
case EMobilePhoneGetDetectedNetworksV2Phase1:
|
|
1217 |
case EMobilePhoneGetDetectedNetworksV2Phase2:
|
|
1218 |
case EMobilePhoneGetNetworkSelectionSetting:
|
|
1219 |
case EMobilePhoneSetNetworkSelectionSetting:
|
|
1220 |
case EMobilePhoneNotifyNetworkSelectionSettingChange:
|
|
1221 |
case EMobilePhoneSelectNetwork:
|
|
1222 |
case EMobilePhoneGetNITZInfo:
|
|
1223 |
case EMobilePhoneNotifyNITZInfoChange:
|
|
1224 |
case EMobilePhoneGetSignalCaps:
|
|
1225 |
case EMobilePhoneGetSignalStrength:
|
|
1226 |
case EMobilePhoneNotifySignalStrengthChange:
|
|
1227 |
case EMobilePhoneGetNetworkSecurityLevel:
|
|
1228 |
case EMobilePhoneNotifyNetworkSecurityLevelChange:
|
|
1229 |
case EMobilePhoneGetCipheringIndicatorStatus:
|
|
1230 |
case EMobilePhoneAuthorizationInfoPhase1:
|
|
1231 |
case EMobilePhoneAuthorizationInfoPhase2:
|
|
1232 |
case EMobilePhoneGetCellInfo:
|
|
1233 |
case EMobilePhoneNotifyCellInfoChange:
|
|
1234 |
case EMobilePhoneGetCurrentActiveUSimApplication:
|
|
1235 |
//direct this request to the net specific DoExtFuncL
|
|
1236 |
ret = iMmNetTsy->DoExtFuncL ( aTsyReqHandle, aIpc, aPackage );
|
|
1237 |
break;
|
|
1238 |
// Security and Phone Locks
|
|
1239 |
case EMobilePhoneGetSecurityCaps:
|
|
1240 |
case EMobilePhoneNotifySecurityCapsChange:
|
|
1241 |
case EMobilePhoneGetLockInfo:
|
|
1242 |
case EMobilePhoneNotifyLockInfoChange:
|
|
1243 |
case EMobilePhoneSetLockSetting:
|
|
1244 |
case EMobilePhoneChangeSecurityCode:
|
|
1245 |
case EMobilePhoneNotifySecurityEvent:
|
|
1246 |
case EMobilePhoneVerifySecurityCode:
|
|
1247 |
case EMobilePhoneAbortSecurityCode:
|
|
1248 |
case EMobilePhoneGetSecurityCodeInfo:
|
|
1249 |
case EMobilePhoneNotifySecurityCodeInfoChange:
|
|
1250 |
//direct this request to the security specific DoExtFuncL
|
|
1251 |
ret = iMmSecurityTsy->DoExtFuncL ( aTsyReqHandle, aIpc, aPackage );
|
|
1252 |
break;
|
|
1253 |
// Service Provider name
|
|
1254 |
case EMobilePhoneGetServiceProviderName:
|
|
1255 |
ret = GetServiceProviderNameL( aTsyReqHandle,
|
|
1256 |
aPackage.Des1n() );
|
|
1257 |
break;
|
|
1258 |
|
|
1259 |
// Access to ICC (Integrated Circuit Card)
|
|
1260 |
// Get ICC Access Capabilities
|
|
1261 |
case EMobilePhoneGetIccAccessCaps:
|
|
1262 |
ret = GetIccAccessCaps( aTsyReqHandle,
|
|
1263 |
REINTERPRET_CAST( TUint32*, dataPtr ) );
|
|
1264 |
break;
|
|
1265 |
// Notify Change of ICC Access Caps
|
|
1266 |
case EMobilePhoneNotifyIccAccessCapsChange:
|
|
1267 |
ret = NotifyIccAccessCapsChange(
|
|
1268 |
REINTERPRET_CAST( TUint32*, dataPtr ) );
|
|
1269 |
break;
|
|
1270 |
|
|
1271 |
// Customer service profile
|
|
1272 |
// Get Customer Service Profile
|
|
1273 |
case EMobilePhoneGetCustomerServiceProfile:
|
|
1274 |
ret = GetCustomerServiceProfileL( aTsyReqHandle,
|
|
1275 |
aPackage.Des1n() );
|
|
1276 |
break;
|
|
1277 |
|
|
1278 |
// SIM/USIM/CDMA service table
|
|
1279 |
// Get Service Table
|
|
1280 |
case EMobilePhoneGetServiceTable:
|
|
1281 |
ret = GetServiceTableCheckParametersL( aTsyReqHandle,
|
|
1282 |
REINTERPRET_CAST( RMobilePhone::TMobilePhoneServiceTable*,
|
|
1283 |
dataPtr ),
|
|
1284 |
aPackage.Des2n() );
|
|
1285 |
break;
|
|
1286 |
|
|
1287 |
// Power Status of Phone
|
|
1288 |
// Get Battery Caps
|
|
1289 |
case EMobilePhoneGetBatteryCaps:
|
|
1290 |
ret = GetBatteryCaps( aTsyReqHandle,
|
|
1291 |
REINTERPRET_CAST( TUint32*, dataPtr ) );
|
|
1292 |
break;
|
|
1293 |
// Get Current Battery Information
|
|
1294 |
case EMobilePhoneGetBatteryInfo:
|
|
1295 |
ret = GetBatteryInfoL( aTsyReqHandle,
|
|
1296 |
REINTERPRET_CAST( RMobilePhone::TMobilePhoneBatteryInfoV1*,
|
|
1297 |
dataPtr ) );
|
|
1298 |
break;
|
|
1299 |
// Notify Change of Battery Information
|
|
1300 |
case EMobilePhoneNotifyBatteryInfoChange:
|
|
1301 |
ret = NotifyBatteryInfoChange(
|
|
1302 |
REINTERPRET_CAST( RMobilePhone::TMobilePhoneBatteryInfoV1*,
|
|
1303 |
dataPtr ) );
|
|
1304 |
break;
|
|
1305 |
//Identity of Phone and Subscriber
|
|
1306 |
// Get Identity Caps
|
|
1307 |
case EMobilePhoneGetIdentityCaps:
|
|
1308 |
ret = GetIdentityCaps( aTsyReqHandle,
|
|
1309 |
REINTERPRET_CAST( TUint32*, dataPtr ) );
|
|
1310 |
break;
|
|
1311 |
// Get Phone Id
|
|
1312 |
case EMobilePhoneGetPhoneId:
|
|
1313 |
ret = GetPhoneIdL( aTsyReqHandle,
|
|
1314 |
REINTERPRET_CAST( RMobilePhone::TMobilePhoneIdentityV1*,
|
|
1315 |
dataPtr ) );
|
|
1316 |
break;
|
|
1317 |
// Get Subscriber Id
|
|
1318 |
case EMobilePhoneGetSubscriberId:
|
|
1319 |
ret = GetSubscriberIdL( aTsyReqHandle,
|
|
1320 |
REINTERPRET_CAST( RMobilePhone::TMobilePhoneSubscriberId*,
|
|
1321 |
dataPtr ) );
|
|
1322 |
break;
|
|
1323 |
//Get the capabilities of the phone indicators
|
|
1324 |
case EMobilePhoneGetIndicatorCaps:
|
|
1325 |
ret = GetIndicatorCaps( aTsyReqHandle,
|
|
1326 |
REINTERPRET_CAST( TUint32*,
|
|
1327 |
dataPtr ),
|
|
1328 |
REINTERPRET_CAST( TUint32*,
|
|
1329 |
dataPtr2 )
|
|
1330 |
);
|
|
1331 |
break;
|
|
1332 |
//Get Phone Indicators current state
|
|
1333 |
case EMobilePhoneGetIndicator:
|
|
1334 |
ret = GetIndicators( aTsyReqHandle,
|
|
1335 |
REINTERPRET_CAST( TUint32*,
|
|
1336 |
dataPtr ) );
|
|
1337 |
break;
|
|
1338 |
// All calls termination
|
|
1339 |
case EMobilePhoneTerminateAllCalls:
|
|
1340 |
ret = TerminateAllCallsL( aTsyReqHandle );
|
|
1341 |
break;
|
|
1342 |
// Active calls termination
|
|
1343 |
case EMobilePhoneTerminateActiveCalls:
|
|
1344 |
ret = TerminateActiveCallsL( aTsyReqHandle );
|
|
1345 |
break;
|
|
1346 |
// DTMF
|
|
1347 |
// forward request to the DTMF-specific Tsy
|
|
1348 |
case EMobilePhoneGetDTMFCaps:
|
|
1349 |
case EMobilePhoneNotifyDTMFCapsChange:
|
|
1350 |
case EMobilePhoneSendDTMFTones:
|
|
1351 |
case EMobilePhoneStartDTMFTone:
|
|
1352 |
case EMobilePhoneStopDTMFTone:
|
|
1353 |
case EMobilePhoneNotifyStopInDTMFString:
|
|
1354 |
case EMobilePhoneContinueDTMFStringSending:
|
|
1355 |
case EMobilePhoneNotifyDTMFEvent:
|
|
1356 |
case EMobilePhoneReadDTMFTones:
|
|
1357 |
ret = iMmDtmfTsy->DoExtFuncL( aTsyReqHandle, aIpc, aPackage );
|
|
1358 |
break;
|
|
1359 |
|
|
1360 |
// Alternate Line Service
|
|
1361 |
// Get ALS Line
|
|
1362 |
case EMobilePhoneGetALSLine:
|
|
1363 |
ret = GetALSLineL( aTsyReqHandle,
|
|
1364 |
REINTERPRET_CAST(
|
|
1365 |
RMobilePhone::TMobilePhoneALSLine*, dataPtr ) );
|
|
1366 |
break;
|
|
1367 |
// Set ALS Line
|
|
1368 |
case EMobilePhoneSetALSLine:
|
|
1369 |
ret = SetALSLineL( aTsyReqHandle,
|
|
1370 |
REINTERPRET_CAST(
|
|
1371 |
RMobilePhone::TMobilePhoneALSLine*, dataPtr ) );
|
|
1372 |
break;
|
|
1373 |
// Notify Change of ALS Line Selection
|
|
1374 |
case EMobilePhoneNotifyALSLineChange:
|
|
1375 |
ret = NotifyALSLineChange(
|
|
1376 |
REINTERPRET_CAST(
|
|
1377 |
RMobilePhone::TMobilePhoneALSLine*, dataPtr ) );
|
|
1378 |
break;
|
|
1379 |
|
|
1380 |
// Fixed Dialling Numbers
|
|
1381 |
// Get Fixed Dialling Numbers Status
|
|
1382 |
case EMobilePhoneGetFdnStatus:
|
|
1383 |
ret = GetFdnStatusL( aTsyReqHandle,
|
|
1384 |
REINTERPRET_CAST(
|
|
1385 |
RMobilePhone::TMobilePhoneFdnStatus*, dataPtr ) );
|
|
1386 |
break;
|
|
1387 |
// Set Fixed Dialling Numbers Setting
|
|
1388 |
case EMobilePhoneSetFdnSetting:
|
|
1389 |
ret = SetFdnSettingL( aTsyReqHandle, aPackage );
|
|
1390 |
break;
|
|
1391 |
// Notify Fixed Dialling Numbers Status Change
|
|
1392 |
case EMobilePhoneNotifyFdnStatusChange:
|
|
1393 |
ret = NotifyFdnStatusChange(
|
|
1394 |
REINTERPRET_CAST(
|
|
1395 |
RMobilePhone::TMobilePhoneFdnStatus*, dataPtr ) );
|
|
1396 |
break;
|
|
1397 |
case EMobilePhoneGetMailboxNumbers:
|
|
1398 |
ret = GetMailboxNumbersL( aPackage.Des1n() );
|
|
1399 |
break;
|
|
1400 |
|
|
1401 |
// Supplementary services:
|
|
1402 |
// forward request to the Supplementary Services-specific Tsy
|
|
1403 |
// Call Service Capabilities
|
|
1404 |
case EMobilePhoneGetCallServiceCaps:
|
|
1405 |
case EMobilePhoneNotifyCallServiceCapsChange:
|
|
1406 |
// Call Forwarding
|
|
1407 |
case EMobilePhoneGetCallForwardingStatusPhase1:
|
|
1408 |
case EMobilePhoneGetCallForwardingStatusPhase2:
|
|
1409 |
case EMobilePhoneSetCallForwardingStatus:
|
|
1410 |
case EMobilePhoneNotifyCallForwardingStatusChange:
|
|
1411 |
case EMobilePhoneNotifyCallForwardingActive:
|
|
1412 |
// Call Barring
|
|
1413 |
case EMobilePhoneGetBarringStatusPhase1:
|
|
1414 |
case EMobilePhoneGetBarringStatusPhase2:
|
|
1415 |
case EMobilePhoneSetCallBarringStatus:
|
|
1416 |
case EMobilePhoneNotifyCallBarringStatusChange:
|
|
1417 |
// Supplementary Services password change
|
|
1418 |
case EMobilePhoneSetSSPassword:
|
|
1419 |
// Call Waiting
|
|
1420 |
case EMobilePhoneGetWaitingStatusPhase1:
|
|
1421 |
case EMobilePhoneGetWaitingStatusPhase2:
|
|
1422 |
case EMobilePhoneSetCallWaitingStatus:
|
|
1423 |
case EMobilePhoneNotifyCallWaitingStatusChange:
|
|
1424 |
// Identity Services
|
|
1425 |
case EMobilePhoneGetIdentityServiceStatus:
|
|
1426 |
// User's Access to Network Services
|
|
1427 |
case EMobilePhoneSendNetworkServiceRequest:
|
|
1428 |
case EMobilePhoneSendNetworkServiceRequestNoFdnCheck:
|
|
1429 |
// Message waiting Indicators
|
|
1430 |
case EMobilePhoneGetIccMessageWaitingIndicators:
|
|
1431 |
case EMobilePhoneSetIccMessageWaitingIndicators:
|
|
1432 |
case EMobilePhoneNotifyIccMessageWaitingIndicatorsChange:
|
|
1433 |
// Notification for send networks service requests
|
|
1434 |
case EMobilePhoneNotifySendNetworkServiceRequest:
|
|
1435 |
case EMobilePhoneNotifyAllSendNetworkServiceRequest:
|
|
1436 |
ret = iMmSupplServTsy->DoExtFuncL(
|
|
1437 |
aTsyReqHandle, aIpc, aPackage );
|
|
1438 |
break;
|
|
1439 |
|
|
1440 |
// Mode Capabilities of TSY
|
|
1441 |
// Get Multimode Capabilities
|
|
1442 |
case EMobilePhoneGetMultimodeCaps:
|
|
1443 |
ret = GetMultimodeCaps( aTsyReqHandle,
|
|
1444 |
REINTERPRET_CAST( TUint32*, dataPtr ) );
|
|
1445 |
break;
|
|
1446 |
// Get Phone Store Information and Capabilities
|
|
1447 |
case EMobilePhoneGetPhoneStoreInfo:
|
|
1448 |
switch( aPackage.Type() )
|
|
1449 |
{
|
|
1450 |
// Switch between alternative implementations of
|
|
1451 |
// GetPhoneStoreInfo
|
|
1452 |
case TDataPackage::EPackage1n2u:
|
|
1453 |
ret = GetPhoneStoreInfoL( aPackage.Des1n(),
|
|
1454 |
REINTERPRET_CAST(
|
|
1455 |
RMobilePhone::TMobileName* /*TName**/,
|
|
1456 |
aPackage.Des2u() ) );
|
|
1457 |
break;
|
|
1458 |
case TDataPackage::EPackage1n2n:
|
|
1459 |
ret = KErrNotSupported;
|
|
1460 |
break;
|
|
1461 |
default:
|
|
1462 |
ret = KErrNotSupported;
|
|
1463 |
break;
|
|
1464 |
}
|
|
1465 |
break;
|
|
1466 |
case EMobilePhoneNotifyIndicatorChange:
|
|
1467 |
ret = NotifyIndicatorChange(
|
|
1468 |
REINTERPRET_CAST( TUint32*, dataPtr ) );
|
|
1469 |
break;
|
|
1470 |
case EMobilePhoneIMSAuthenticate:
|
|
1471 |
ret = ImsAuthenticationL( aPackage.Des1n() );
|
|
1472 |
break;
|
|
1473 |
|
|
1474 |
// Access point control list
|
|
1475 |
case EMobilePhoneEnumerateAPNEntries:
|
|
1476 |
ret = EnumerateAPNEntriesL( aTsyReqHandle, REINTERPRET_CAST(
|
|
1477 |
TUint32*, dataPtr ) );
|
|
1478 |
break;
|
|
1479 |
case EMobilePhoneGetAPNname:
|
|
1480 |
ret = GetAPNnameL( aTsyReqHandle, REINTERPRET_CAST(
|
|
1481 |
TUint32*, dataPtr ), aPackage.Des2n() );
|
|
1482 |
break;
|
|
1483 |
case EMobilePhoneAppendAPNName:
|
|
1484 |
ret = AppendAPNNameL( REINTERPRET_CAST(
|
|
1485 |
RMobilePhone::TAPNEntryV3*, aPackage.Ptr1() ) );
|
|
1486 |
break;
|
|
1487 |
case EMobilePhoneDeleteAPNName:
|
|
1488 |
ret = DeleteAPNNameL( aTsyReqHandle, REINTERPRET_CAST(
|
|
1489 |
TUint32*, aPackage.Ptr1() ) );
|
|
1490 |
break;
|
|
1491 |
case EMobilePhoneSetAPNControlListServiceStatus:
|
|
1492 |
ret = SetAPNControlListServiceStatusL( aTsyReqHandle,
|
|
1493 |
REINTERPRET_CAST( RMobilePhone::TAPNControlListServiceStatus*,
|
|
1494 |
aPackage.Ptr1() ) );
|
|
1495 |
break;
|
|
1496 |
case EMobilePhoneGetAPNControlListServiceStatus:
|
|
1497 |
ret = GetAPNControlListServiceStatusL( aTsyReqHandle,
|
|
1498 |
REINTERPRET_CAST( RMobilePhone::TAPNControlListServiceStatus*,
|
|
1499 |
aPackage.Ptr1() ) );
|
|
1500 |
break;
|
|
1501 |
case EMobilePhoneNotifyAPNListChanged:
|
|
1502 |
ret = NotifyAPNListChanged();
|
|
1503 |
break;
|
|
1504 |
case EMobilePhoneNotifyAPNControlListServiceStatusChange:
|
|
1505 |
ret = NotifyAPNControlListServiceStatusChange( REINTERPRET_CAST(
|
|
1506 |
RMobilePhone::TAPNControlListServiceStatus*,
|
|
1507 |
aPackage.Ptr1() ) );
|
|
1508 |
break;
|
|
1509 |
//NOT SUPPORTED FEATURES
|
|
1510 |
case EMobilePhoneGetAlternatingCallCaps:
|
|
1511 |
case EMobilePhoneNotifyAlternatingCallCapsChange:
|
|
1512 |
case EMobilePhoneGetAlternatingCallMode:
|
|
1513 |
case EMobilePhoneSetAlternatingCallMode:
|
|
1514 |
case EMobilePhoneNotifyAlternatingCallModeChange:
|
|
1515 |
case EMobilePhoneGetIncomingCallType:
|
|
1516 |
case EMobilePhoneSetIncomingCallType:
|
|
1517 |
case EMobilePhoneNotifyIncomingCallTypeChange:
|
|
1518 |
case EMobilePhoneGetMulticallParams:
|
|
1519 |
case EMobilePhoneSetMulticallParams:
|
|
1520 |
case EMobilePhoneNotifyMulticallParamsChange:
|
|
1521 |
case EMobilePhoneGetUUSSetting:
|
|
1522 |
case EMobilePhoneSetUUSSetting:
|
|
1523 |
case EMobilePhoneNotifyUUSSettingChange:
|
|
1524 |
case EMobilePhoneSetDefaultPrivacy:
|
|
1525 |
case EMobilePhoneGetDefaultPrivacy:
|
|
1526 |
case EMobilePhoneNotifyDefaultPrivacyChange:
|
|
1527 |
case EMobilePhoneGetCCBSStatus:
|
|
1528 |
case EMobilePhoneNotifyCCBSStatusChange:
|
|
1529 |
case EMobilePhoneNotifyMessageWaiting:
|
|
1530 |
case EMobilePhoneDeactivateCCBS:
|
|
1531 |
case EMobilePhoneNotifyCCBSRecall:
|
|
1532 |
case EMobilePhoneAcceptCCBSRecall:
|
|
1533 |
case EMobilePhoneRefuseCCBSRecall:
|
|
1534 |
default:
|
|
1535 |
ret = KErrNotSupported;
|
|
1536 |
break;
|
|
1537 |
}
|
|
1538 |
|
|
1539 |
return ret;
|
|
1540 |
}
|
|
1541 |
|
|
1542 |
// ---------------------------------------------------------------------------
|
|
1543 |
// CMmPhoneTsy::ReqModeL
|
|
1544 |
// Returns request mode for given IPC. If the IPC number
|
|
1545 |
// belongs to some of the core functions, CPhoneBase's ReqModeL function
|
|
1546 |
// is called.
|
|
1547 |
// (other items were commented in a header).
|
|
1548 |
// ---------------------------------------------------------------------------
|
|
1549 |
//
|
|
1550 |
CTelObject::TReqMode CMmPhoneTsy::ReqModeL(
|
|
1551 |
const TInt aIpc )
|
|
1552 |
{
|
|
1553 |
CTelObject::TReqMode ret = 0;
|
|
1554 |
|
|
1555 |
switch ( aIpc )
|
|
1556 |
{
|
|
1557 |
// All disabled
|
|
1558 |
// TSYs wishing to implement their own buffering algorithm will place
|
|
1559 |
// all requests in this category.
|
|
1560 |
// This category will also be used by the RecoverDataPort request that
|
|
1561 |
// must be passed to the TSY to indicate that it may use the
|
|
1562 |
// communications port after a loan.
|
|
1563 |
|
|
1564 |
//Get methods that do not use DOS and return immediately. Flow control
|
|
1565 |
//not required.
|
|
1566 |
case EEtelPhoneGetInfo:
|
|
1567 |
case EEtelPhoneGetCaps:
|
|
1568 |
case EEtelPhoneGetStatus:
|
|
1569 |
case EEtelPhoneGetLineInfo:
|
|
1570 |
case EMobilePhoneGetDTMFCaps:
|
|
1571 |
case EMobilePhoneGetNetworkCaps:
|
|
1572 |
case EMobilePhoneGetNetworkRegistrationStatus:
|
|
1573 |
case EMobilePhoneGetCurrentMode:
|
|
1574 |
case EMobilePhoneGetCurrentNetwork:
|
|
1575 |
case EMobilePhoneGetNetworkName:
|
|
1576 |
case EMobilePhoneGetCurrentNetworkNoLocation:
|
|
1577 |
case EMobilePhoneGetHomeNetwork:
|
|
1578 |
case EMobilePhoneGetNetworkSelectionSetting:
|
|
1579 |
case EMobilePhoneGetNITZInfo:
|
|
1580 |
case EMobilePhoneGetMultimodeCaps:
|
|
1581 |
case EMobilePhoneGetBatteryCaps:
|
|
1582 |
case EMobilePhoneGetBatteryInfo:
|
|
1583 |
case EMobilePhoneGetSignalCaps:
|
|
1584 |
case EMobilePhoneGetSignalStrength:
|
|
1585 |
case EMobilePhoneGetIdentityCaps:
|
|
1586 |
case EMobilePhoneGetPhoneId:
|
|
1587 |
case EMobilePhoneGetSubscriberId:
|
|
1588 |
case EMobilePhoneGetAlternatingCallCaps:
|
|
1589 |
case EMobilePhoneGetAlternatingCallMode:
|
|
1590 |
case EMobilePhoneGetSecurityCaps:
|
|
1591 |
case EMobilePhoneGetIccAccessCaps:
|
|
1592 |
case EMobilePhoneGetDefaultPrivacy:
|
|
1593 |
case EMobilePhoneGetCallServiceCaps:
|
|
1594 |
case EMobilePhoneGetMulticallParams:
|
|
1595 |
case EMobilePhoneGetIncomingCallType:
|
|
1596 |
case EMobilePhoneGetUUSSetting:
|
|
1597 |
case EMobilePhoneGetNetworkSecurityLevel:
|
|
1598 |
case EMobilePhoneGetCellInfo:
|
|
1599 |
case EMobilePhoneGetCurrentActiveUSimApplication:
|
|
1600 |
//Other methods that do not use DOS and return immediately.
|
|
1601 |
//Flow control not required.
|
|
1602 |
case EEtelPhoneInitialise:
|
|
1603 |
case EEtelPhoneEnumerateLines:
|
|
1604 |
case EMobilePhoneGetDetectedNetworksV2Phase2:
|
|
1605 |
case EMobilePhoneGetCallForwardingStatusPhase2:
|
|
1606 |
case EMobilePhoneGetBarringStatusPhase2:
|
|
1607 |
case EMobilePhoneGetWaitingStatusPhase2:
|
|
1608 |
case EMobilePhoneGetCompletionRequestsPhase2:
|
|
1609 |
case EMobilePhoneContinueDTMFStringSending:
|
|
1610 |
|
|
1611 |
//Methods that can propably take a long time and cannot therefore be
|
|
1612 |
//flow controlled. Solution: All these methods must check req handle
|
|
1613 |
//tablebefore handling the request. In case that the request table
|
|
1614 |
//indicates that same method has been called and has not been
|
|
1615 |
//completed, the method should return KErrServerBusy.
|
|
1616 |
case EMobilePhoneTerminateAllCalls:
|
|
1617 |
case EMobilePhoneTerminateActiveCalls:
|
|
1618 |
case EMobilePhoneGetFdnStatus:
|
|
1619 |
case EMobilePhoneGetCustomerServiceProfile:
|
|
1620 |
case EMobilePhoneGetDetectedNetworksV2Phase1:
|
|
1621 |
case EMobilePhoneSetLockSetting:
|
|
1622 |
case EMobilePhoneVerifySecurityCode:
|
|
1623 |
case EMobilePhoneAbortSecurityCode:
|
|
1624 |
case EMobilePhoneStartDTMFTone:
|
|
1625 |
case EMobilePhoneStopDTMFTone:
|
|
1626 |
case EMobilePhoneGetServiceProviderName:
|
|
1627 |
case EMobilePhoneGetServiceTable:
|
|
1628 |
case EMobilePhoneSetALSLine:
|
|
1629 |
case EMobilePhoneGetALSLine:
|
|
1630 |
case EMobilePhoneSendDTMFTones:
|
|
1631 |
case EMobilePhoneAuthorizationInfoPhase1:
|
|
1632 |
case EMobilePhoneAuthorizationInfoPhase2:
|
|
1633 |
case EMobilePhoneEnumerateAPNEntries:
|
|
1634 |
case EMobilePhoneGetAPNname:
|
|
1635 |
case EMobilePhoneGetAPNControlListServiceStatus:
|
|
1636 |
case EMobilePhoneSetAPNControlListServiceStatus:
|
|
1637 |
case EMobilePhoneDeleteAPNName:
|
|
1638 |
case EMobilePhoneAppendAPNName:
|
|
1639 |
case EMobilePhoneGetSecurityCodeInfo:
|
|
1640 |
|
|
1641 |
//SS related methods.
|
|
1642 |
case EMobilePhoneGetCallForwardingStatusPhase1:
|
|
1643 |
case EMobilePhoneGetBarringStatusPhase1:
|
|
1644 |
case EMobilePhoneGetWaitingStatusPhase1:
|
|
1645 |
case EMobilePhoneSetCallBarringStatus:
|
|
1646 |
case EMobilePhoneSetCallWaitingStatus:
|
|
1647 |
case EMobilePhoneSetCallForwardingStatus:
|
|
1648 |
case EMobilePhoneSetSSPassword:
|
|
1649 |
case EMobilePhoneGetIdentityServiceStatus:
|
|
1650 |
case EMobilePhoneSendNetworkServiceRequest:
|
|
1651 |
case EMobilePhoneSendNetworkServiceRequestNoFdnCheck:
|
|
1652 |
case EMobilePhoneGetMailboxNumbers:
|
|
1653 |
case EMobilePhoneGetIccMessageWaitingIndicators:
|
|
1654 |
case EMobilePhoneSetIccMessageWaitingIndicators:
|
|
1655 |
case EMobilePhoneNotifyDTMFEvent:
|
|
1656 |
ret = 0;
|
|
1657 |
break;
|
|
1658 |
|
|
1659 |
// KReqModeFlowControlObeyed
|
|
1660 |
// Commands that change the state of the phone, e.g. clearing the AoC
|
|
1661 |
// counter, are commands that the TSY should only deal with one at
|
|
1662 |
// a time.
|
|
1663 |
|
|
1664 |
//Voice call related methods. Handle one at a time.
|
|
1665 |
|
|
1666 |
|
|
1667 |
//NET related methods. Handle one at a time.
|
|
1668 |
case EMobilePhoneSelectNetwork:
|
|
1669 |
case EMobilePhoneSetNetworkSelectionSetting:
|
|
1670 |
|
|
1671 |
//SS related methods. Handle one at a time.
|
|
1672 |
case EMobilePhoneGetCompletionRequestsPhase1:
|
|
1673 |
case EMobilePhoneSetAlternatingCallMode:
|
|
1674 |
case EMobilePhoneSetFdnSetting:
|
|
1675 |
case EMobilePhoneSetDefaultPrivacy:
|
|
1676 |
|
|
1677 |
//Security related methods. Handle one at a time.
|
|
1678 |
case EMobilePhoneChangeSecurityCode:
|
|
1679 |
case EMobilePhoneGetLockInfo:
|
|
1680 |
|
|
1681 |
//Other cases
|
|
1682 |
case EMobilePhoneSetMulticallParams:
|
|
1683 |
case EMobilePhoneSetUUSSetting:
|
|
1684 |
|
|
1685 |
case EMobilePhoneGetIndicatorCaps:
|
|
1686 |
case EMobilePhoneGetIndicator:
|
|
1687 |
case EMobilePhoneGetPhoneStoreInfo:
|
|
1688 |
case EMobilePhoneGetCipheringIndicatorStatus:
|
|
1689 |
case EMobilePhoneIMSAuthenticate:
|
|
1690 |
ret=KReqModeFlowControlObeyed;
|
|
1691 |
break;
|
|
1692 |
|
|
1693 |
//Do not use this! Request handle table has only one place for
|
|
1694 |
//each request handle
|
|
1695 |
//ReqModePostImmediately
|
|
1696 |
//Requests that notify a client about a change of state, where the
|
|
1697 |
//TSY needs to distinguish between different clients.
|
|
1698 |
//ret=KReqModeRePostImmediately;
|
|
1699 |
|
|
1700 |
|
|
1701 |
//KReqModeMultipleCompletionEnabled
|
|
1702 |
//(a) commands that may take some time, but which the TSY can handle
|
|
1703 |
//more than one of concurrently, or
|
|
1704 |
//(b) notifications that the TSY does not wish to be re-posted
|
|
1705 |
//immediately, so the server does no buffering.
|
|
1706 |
//ret=KReqModeMultipleCompletionEnabled;
|
|
1707 |
|
|
1708 |
|
|
1709 |
//KReqModeMultipleCompletionEnabled | KReqModeFlowControlObeyed
|
|
1710 |
//A command that may take some time and which the TSY can only deal
|
|
1711 |
//with one at a time.
|
|
1712 |
//NOTE!!! (TAN) 2.11.2000. All GetXXX methods that do lead to message
|
|
1713 |
//sending to DOS can be moved under "all disabled" case(the first one)
|
|
1714 |
//The methods will also function correctly if they are here but it is
|
|
1715 |
//possible that this reqMode requires more from the ETel Server.
|
|
1716 |
//ret=KReqModeMultipleCompletionEnabled | KReqModeFlowControlObeyed;
|
|
1717 |
//break;
|
|
1718 |
|
|
1719 |
//KReqModeMultipleCompletionEnabled | ReqModePostImmediately
|
|
1720 |
//Requests that notify a client about a change of state.
|
|
1721 |
//Since these requests do not require the issuing of any modem
|
|
1722 |
//commands, they do not have to obey flow control.
|
|
1723 |
//The TSY never gets more than one of these outstanding per CTelObject
|
|
1724 |
case EEtelPhoneNotifyModemDetected:
|
|
1725 |
case EETelPhoneCapsChangeNotification:
|
|
1726 |
case EMobilePhoneNotifyDTMFCapsChange:
|
|
1727 |
case EMobilePhoneNotifyStopInDTMFString:
|
|
1728 |
case EMobilePhoneNotifyNetworkRegistrationStatusChange:
|
|
1729 |
case EMobilePhoneNotifyModeChange:
|
|
1730 |
case EMobilePhoneNotifyCurrentNetworkChange:
|
|
1731 |
case EMobilePhoneNotifyCurrentNetworkNoLocationChange:
|
|
1732 |
case EMobilePhoneNotifyNetworkSelectionSettingChange:
|
|
1733 |
case EMobilePhoneNotifyBatteryInfoChange:
|
|
1734 |
case EMobilePhoneNotifySignalStrengthChange:
|
|
1735 |
case EMobilePhoneNotifyCallForwardingStatusChange:
|
|
1736 |
case EMobilePhoneNotifyCallBarringStatusChange:
|
|
1737 |
case EMobilePhoneNotifyCallWaitingStatusChange:
|
|
1738 |
case EMobilePhoneNotifyAlternatingCallCapsChange:
|
|
1739 |
case EMobilePhoneNotifyAlternatingCallModeChange:
|
|
1740 |
case EMobilePhoneNotifyALSLineChange:
|
|
1741 |
case EMobilePhoneNotifySecurityCapsChange:
|
|
1742 |
case EMobilePhoneNotifyLockInfoChange:
|
|
1743 |
case EMobilePhoneNotifySecurityEvent:
|
|
1744 |
case EMobilePhoneNotifyMessageWaiting:
|
|
1745 |
case EMobilePhoneNotifyFdnStatusChange:
|
|
1746 |
case EMobilePhoneNotifyIccAccessCapsChange:
|
|
1747 |
case EMobilePhoneNotifyNITZInfoChange:
|
|
1748 |
case EMobilePhoneNotifyDefaultPrivacyChange:
|
|
1749 |
case EMobilePhoneNotifyCallServiceCapsChange:
|
|
1750 |
case EMobilePhoneNotifyCallForwardingActive:
|
|
1751 |
case EMobilePhoneNotifyMulticallParamsChange:
|
|
1752 |
case EMobilePhoneNotifyIncomingCallTypeChange:
|
|
1753 |
case EMobilePhoneNotifyUUSSettingChange:
|
|
1754 |
case EMobilePhoneNotifyIccMessageWaitingIndicatorsChange:
|
|
1755 |
case EMobilePhoneNotifyIndicatorChange:
|
|
1756 |
case EMobilePhoneNotifyNetworkSecurityLevelChange:
|
|
1757 |
case EMobilePhoneNotifySecurityCodeInfoChange:
|
|
1758 |
case EMobilePhoneNotifyAPNListChanged:
|
|
1759 |
case EMobilePhoneNotifyAPNControlListServiceStatusChange:
|
|
1760 |
case EMobilePhoneNotifySendNetworkServiceRequest:
|
|
1761 |
case EMobilePhoneNotifyAllSendNetworkServiceRequest:
|
|
1762 |
case EMobilePhoneNotifyCellInfoChange:
|
|
1763 |
ret=KReqModeMultipleCompletionEnabled | KReqModeRePostImmediately;
|
|
1764 |
break;
|
|
1765 |
// Cancel Requests
|
|
1766 |
//It is not necessary to include the Cancel methods in ReqModeL at all
|
|
1767 |
//The ETel server never calls ReqModeL with a Cancel IPC.
|
|
1768 |
|
|
1769 |
//Other variations of return values are unusable
|
|
1770 |
|
|
1771 |
// Default: Call CPhoneBase's ReqModeL.
|
|
1772 |
default:
|
|
1773 |
ret=CPhoneBase::ReqModeL(aIpc);
|
|
1774 |
break;
|
|
1775 |
|
|
1776 |
}
|
|
1777 |
TFLOGSTRING3("TSY: CMmPhoneTsy::ReqModeL - IPC:%d, Mode:%d", aIpc, ret);
|
|
1778 |
|
|
1779 |
return ret;
|
|
1780 |
}
|
|
1781 |
|
|
1782 |
// ---------------------------------------------------------------------------
|
|
1783 |
// CMmPhoneTsy::NumberOfSlotsL
|
|
1784 |
// Returns number of slots to be used for given IPC
|
|
1785 |
// (other items were commented in a header).
|
|
1786 |
// ---------------------------------------------------------------------------
|
|
1787 |
//
|
|
1788 |
TInt CMmPhoneTsy::NumberOfSlotsL(
|
|
1789 |
const TInt aIpc )
|
|
1790 |
{
|
|
1791 |
// All Phone related notifications must be added here!
|
|
1792 |
TInt numberOfSlots = 1;
|
|
1793 |
|
|
1794 |
switch ( aIpc )
|
|
1795 |
{
|
|
1796 |
case EEtelPhoneNotifyModemDetected:
|
|
1797 |
numberOfSlots = KMmPhoneModemDetectedSlots;
|
|
1798 |
break;
|
|
1799 |
case EETelPhoneCapsChangeNotification:
|
|
1800 |
numberOfSlots = KMmPhoneCapsChangeNotificationSlots;
|
|
1801 |
break;
|
|
1802 |
case EMobilePhoneNotifyDTMFCapsChange:
|
|
1803 |
numberOfSlots = KMmPhoneDTMFCapsChangeSlots;
|
|
1804 |
break;
|
|
1805 |
case EMobilePhoneNotifyStopInDTMFString:
|
|
1806 |
numberOfSlots = KMmPhoneStopInDTMFStringSlots;
|
|
1807 |
break;
|
|
1808 |
case EMobilePhoneNotifyNetworkRegistrationStatusChange:
|
|
1809 |
numberOfSlots = KMmPhoneNetworkRegistrationStatusChangeSlots;
|
|
1810 |
break;
|
|
1811 |
case EMobilePhoneNotifyModeChange:
|
|
1812 |
numberOfSlots = KMmPhoneModeChangeSlots;
|
|
1813 |
break;
|
|
1814 |
case EMobilePhoneNotifyCurrentNetworkChange:
|
|
1815 |
numberOfSlots = KMmPhoneCurrentNetworkChangeSlots;
|
|
1816 |
break;
|
|
1817 |
case EMobilePhoneNotifyCurrentNetworkNoLocationChange:
|
|
1818 |
numberOfSlots = KMmPhoneCurrentNetworkChangeSlots;
|
|
1819 |
break;
|
|
1820 |
case EMobilePhoneNotifyNetworkSelectionSettingChange:
|
|
1821 |
numberOfSlots = KMmPhoneNetworkSelectionSettingChangeSlots;
|
|
1822 |
break;
|
|
1823 |
case EMobilePhoneNotifyBatteryInfoChange:
|
|
1824 |
numberOfSlots = KMmPhoneBatteryInfoChangeSlots;
|
|
1825 |
break;
|
|
1826 |
case EMobilePhoneNotifySignalStrengthChange:
|
|
1827 |
numberOfSlots = KMmPhoneSignalStrengthChangeSlots;
|
|
1828 |
break;
|
|
1829 |
case EMobilePhoneNotifyCallForwardingStatusChange:
|
|
1830 |
numberOfSlots = KMmPhoneCallForwardingStatusChangeSlots;
|
|
1831 |
break;
|
|
1832 |
case EMobilePhoneNotifyCallBarringStatusChange:
|
|
1833 |
numberOfSlots = KMmPhoneCallBarringStatusChangeSlots;
|
|
1834 |
break;
|
|
1835 |
case EMobilePhoneNotifyCallWaitingStatusChange:
|
|
1836 |
numberOfSlots = KMmPhoneCallWaitingStatusChangeSlots;
|
|
1837 |
break;
|
|
1838 |
case EMobilePhoneNotifyAlternatingCallCapsChange:
|
|
1839 |
numberOfSlots = KMmPhoneAlternatingCallCapsChangeSlots;
|
|
1840 |
break;
|
|
1841 |
case EMobilePhoneNotifyAlternatingCallModeChange:
|
|
1842 |
numberOfSlots = KMmPhoneAlternatingCallModeChangeSlots;
|
|
1843 |
break;
|
|
1844 |
case EMobilePhoneNotifyALSLineChange:
|
|
1845 |
numberOfSlots = KMmPhoneALSLineChangeSlots;
|
|
1846 |
break;
|
|
1847 |
case EMobilePhoneNotifySecurityCapsChange:
|
|
1848 |
numberOfSlots = KMmPhoneSecurityCapsChangeSlots;
|
|
1849 |
break;
|
|
1850 |
case EMobilePhoneNotifyLockInfoChange:
|
|
1851 |
numberOfSlots = KMmPhoneLockInfoChangeSlots;
|
|
1852 |
break;
|
|
1853 |
case EMobilePhoneNotifySecurityEvent:
|
|
1854 |
numberOfSlots = KMmPhoneSecurityEventSlots;
|
|
1855 |
break;
|
|
1856 |
case EMobilePhoneNotifyMessageWaiting:
|
|
1857 |
numberOfSlots = KMmPhoneMessageWaitingSlots;
|
|
1858 |
break;
|
|
1859 |
case EMobilePhoneNotifyFdnStatusChange:
|
|
1860 |
numberOfSlots = KMmPhoneFdnStatusChangeSlots;
|
|
1861 |
break;
|
|
1862 |
case EMobilePhoneNotifyIccAccessCapsChange:
|
|
1863 |
numberOfSlots = KMmPhoneIccAccessCapsChangeSlots;
|
|
1864 |
break;
|
|
1865 |
case EMobilePhoneNotifyNITZInfoChange:
|
|
1866 |
numberOfSlots = KMmPhoneNITZInfoChangeSlots;
|
|
1867 |
break;
|
|
1868 |
case EMobilePhoneNotifyDefaultPrivacyChange:
|
|
1869 |
numberOfSlots = KMmPhoneDefaultPrivacyChangeSlots;
|
|
1870 |
break;
|
|
1871 |
case EMobilePhoneNotifyCallServiceCapsChange:
|
|
1872 |
numberOfSlots = KMmPhoneCallServiceCapsChangeSlots;
|
|
1873 |
break;
|
|
1874 |
case EMobilePhoneNotifyCallForwardingActive:
|
|
1875 |
numberOfSlots = KMmPhoneCallForwardingActiveSlots;
|
|
1876 |
break;
|
|
1877 |
case EMobilePhoneNotifyMulticallParamsChange:
|
|
1878 |
numberOfSlots = KMmPhoneMulticallParamsChangeSlots;
|
|
1879 |
break;
|
|
1880 |
case EMobilePhoneNotifyIncomingCallTypeChange:
|
|
1881 |
numberOfSlots = KMmPhoneIncomingCallTypeChangeSlots;
|
|
1882 |
break;
|
|
1883 |
case EMobilePhoneNotifyUUSSettingChange:
|
|
1884 |
numberOfSlots = KMmPhoneUUSSettingChangeSlots;
|
|
1885 |
break;
|
|
1886 |
case EMobilePhoneNotifyIccMessageWaitingIndicatorsChange:
|
|
1887 |
numberOfSlots = KMmPhoneIccMessageWaitingIndicatorsChangeSlots;
|
|
1888 |
break;
|
|
1889 |
case EMobilePhoneNotifySendNetworkServiceRequest:
|
|
1890 |
numberOfSlots = KMmPhoneNotifySendNetworkServiceRequestSlots;
|
|
1891 |
break;
|
|
1892 |
case EMobilePhoneNotifyAllSendNetworkServiceRequest:
|
|
1893 |
numberOfSlots = KMmPhoneNotifyAllSendNetworkServiceRequestSlots;
|
|
1894 |
break;
|
|
1895 |
case EMobilePhoneNotifyIndicatorChange:
|
|
1896 |
numberOfSlots = KMmPhoneIndicatorChangeSlots;
|
|
1897 |
break;
|
|
1898 |
case EMobilePhoneNotifyNetworkSecurityLevelChange:
|
|
1899 |
numberOfSlots = KMmPhoneNetworkSecurityLevelChangeSlots;
|
|
1900 |
break;
|
|
1901 |
case EMobilePhoneNotifySecurityCodeInfoChange:
|
|
1902 |
numberOfSlots = KMmPhoneSecurityCodeInfoChangeSlots;
|
|
1903 |
break;
|
|
1904 |
case EMobilePhoneNotifyAPNListChanged:
|
|
1905 |
numberOfSlots = KMmPhoneAPNListChangedSlots;
|
|
1906 |
break;
|
|
1907 |
case EMobilePhoneNotifyAPNControlListServiceStatusChange:
|
|
1908 |
numberOfSlots = KMmPhoneAPNControlListServiceStatusChangeSlots;
|
|
1909 |
break;
|
|
1910 |
case EMobilePhoneNotifyCellInfoChange:
|
|
1911 |
numberOfSlots = KMmPhoneCellInfoChangeSlots;
|
|
1912 |
break;
|
|
1913 |
default:
|
|
1914 |
// Unknown or invalid Phone IPC
|
|
1915 |
User::Leave( KErrNotSupported );
|
|
1916 |
break;
|
|
1917 |
}
|
|
1918 |
|
|
1919 |
return numberOfSlots;
|
|
1920 |
}
|
|
1921 |
|
|
1922 |
// ---------------------------------------------------------------------------
|
|
1923 |
// CMmPhoneTsy::CancelService
|
|
1924 |
// Cancels specified service
|
|
1925 |
// (other items were commented in a header).
|
|
1926 |
// ---------------------------------------------------------------------------
|
|
1927 |
//
|
|
1928 |
TInt CMmPhoneTsy::CancelService(
|
|
1929 |
const TInt aIpc,
|
|
1930 |
const TTsyReqHandle aTsyReqHandle )
|
|
1931 |
{
|
|
1932 |
TFLOGSTRING3("TSY: CMmPhoneTsy::CancelService - IPC:%d, Handle:%d", aIpc, aTsyReqHandle);
|
|
1933 |
|
|
1934 |
TInt ret ( KErrNotSupported );
|
|
1935 |
|
|
1936 |
// When the clients close their sub-sessions (eg. by calling RLine::Close)
|
|
1937 |
// they may not have cancelled all their outstanding asynchronous requests
|
|
1938 |
// before closing. It is up to the ETel server to clean up in this
|
|
1939 |
// situation, so the server will find the list of outstanding requests
|
|
1940 |
// related to that sub-session object and pass these outstanding IPC
|
|
1941 |
// request numbers, one at a time, to the CancelService method in the TSY.
|
|
1942 |
|
|
1943 |
switch ( aIpc )
|
|
1944 |
{
|
|
1945 |
// forward DTMF cancellations
|
|
1946 |
case EMobilePhoneSendDTMFTones:
|
|
1947 |
case EMobilePhoneNotifyDTMFCapsChange:
|
|
1948 |
case EMobilePhoneNotifyStopInDTMFString:
|
|
1949 |
case EMobilePhoneNotifyDTMFEvent:
|
|
1950 |
ret = iMmDtmfTsy->CancelService( aIpc, aTsyReqHandle );
|
|
1951 |
break;
|
|
1952 |
// forward NET cancellations
|
|
1953 |
case EMobilePhoneGetCipheringIndicatorStatus:
|
|
1954 |
case EMobilePhoneNotifySignalStrengthChange:
|
|
1955 |
case EMobilePhoneNotifyNetworkRegistrationStatusChange:
|
|
1956 |
case EMobilePhoneNotifyModeChange:
|
|
1957 |
case EMobilePhoneNotifyCurrentNetworkChange:
|
|
1958 |
case EMobilePhoneNotifyCurrentNetworkNoLocationChange:
|
|
1959 |
case EMobilePhoneNotifyNetworkSelectionSettingChange:
|
|
1960 |
case EMobilePhoneGetNetworkRegistrationStatus:
|
|
1961 |
case EMobilePhoneNotifyNITZInfoChange:
|
|
1962 |
case EMobilePhoneGetDetectedNetworksV2Phase1:
|
|
1963 |
case EMobilePhoneGetDetectedNetworksV2Phase2:
|
|
1964 |
case EMobilePhoneSelectNetwork:
|
|
1965 |
case EMobilePhoneAuthorizationInfoPhase1:
|
|
1966 |
case EMobilePhoneAuthorizationInfoPhase2:
|
|
1967 |
case EMobilePhoneNotifyNetworkSecurityLevelChange:
|
|
1968 |
case EMobilePhoneGetCellInfo:
|
|
1969 |
case EMobilePhoneNotifyCellInfoChange:
|
|
1970 |
case EMobilePhoneGetCurrentActiveUSimApplication:
|
|
1971 |
ret = iMmNetTsy->CancelService( aIpc, aTsyReqHandle );
|
|
1972 |
break;
|
|
1973 |
// forward SS cancellations
|
|
1974 |
case EMobilePhoneNotifyCallForwardingStatusChange:
|
|
1975 |
case EMobilePhoneNotifyCallForwardingActive:
|
|
1976 |
case EMobilePhoneGetCallForwardingStatusPhase1:
|
|
1977 |
case EMobilePhoneGetCallForwardingStatusPhase2:
|
|
1978 |
case EMobilePhoneSetCallForwardingStatus:
|
|
1979 |
case EMobilePhoneNotifyCallBarringStatusChange:
|
|
1980 |
case EMobilePhoneGetBarringStatusPhase1:
|
|
1981 |
case EMobilePhoneGetBarringStatusPhase2:
|
|
1982 |
case EMobilePhoneSetCallBarringStatus:
|
|
1983 |
case EMobilePhoneSetSSPassword:
|
|
1984 |
case EMobilePhoneNotifyCallWaitingStatusChange:
|
|
1985 |
case EMobilePhoneGetWaitingStatusPhase1:
|
|
1986 |
case EMobilePhoneGetWaitingStatusPhase2:
|
|
1987 |
case EMobilePhoneSetCallWaitingStatus:
|
|
1988 |
case EMobilePhoneGetIdentityServiceStatus:
|
|
1989 |
case EMobilePhoneNotifyCallServiceCapsChange:
|
|
1990 |
case EMobilePhoneSendNetworkServiceRequest:
|
|
1991 |
case EMobilePhoneSendNetworkServiceRequestNoFdnCheck:
|
|
1992 |
case EMobilePhoneGetIccMessageWaitingIndicators:
|
|
1993 |
case EMobilePhoneSetIccMessageWaitingIndicators:
|
|
1994 |
case EMobilePhoneNotifyIccMessageWaitingIndicatorsChange:
|
|
1995 |
case EMobilePhoneNotifySendNetworkServiceRequest:
|
|
1996 |
case EMobilePhoneNotifyAllSendNetworkServiceRequest:
|
|
1997 |
ret = iMmSupplServTsy->CancelService( aIpc, aTsyReqHandle );
|
|
1998 |
break;
|
|
1999 |
//forward SECURITY cancellations
|
|
2000 |
case EMobilePhoneNotifySecurityCapsChange:
|
|
2001 |
case EMobilePhoneGetLockInfo:
|
|
2002 |
case EMobilePhoneSetLockSetting:
|
|
2003 |
case EMobilePhoneNotifyLockInfoChange:
|
|
2004 |
case EMobilePhoneNotifySecurityEvent:
|
|
2005 |
case EMobilePhoneGetSecurityCodeInfo:
|
|
2006 |
case EMobilePhoneNotifySecurityCodeInfoChange:
|
|
2007 |
ret = iMmSecurityTsy->CancelService ( aIpc, aTsyReqHandle );
|
|
2008 |
break;
|
|
2009 |
|
|
2010 |
//TSY has started a request and it is not possible to then
|
|
2011 |
//cancel this request. The best thing for the TSY to do in this case
|
|
2012 |
//is to proceed as though the Cancel never happened. The server's call
|
|
2013 |
//to the TSY cancel function will return synchronously. The TSY then
|
|
2014 |
//continues to wait for the original acknowledgement and when it
|
|
2015 |
//receives it, the TSY will complete the original request.
|
|
2016 |
case EMobilePhoneChangeSecurityCode:
|
|
2017 |
case EMobilePhoneVerifySecurityCode:
|
|
2018 |
case EMobilePhoneSetALSLine:
|
|
2019 |
case EMobilePhoneSetFdnSetting:
|
|
2020 |
case EMobilePhoneNotifyDefaultPrivacyChange:
|
|
2021 |
case EMobilePhoneSetDefaultPrivacy:
|
|
2022 |
case EMobilePhoneTerminateAllCalls:
|
|
2023 |
case EMobilePhoneTerminateActiveCalls:
|
|
2024 |
case EMobilePhoneSetNetworkSelectionSetting:
|
|
2025 |
ret = KErrNone;
|
|
2026 |
break;
|
|
2027 |
|
|
2028 |
//Cancel methods that are not supported.
|
|
2029 |
case EMobilePhoneGetBatteryInfo:
|
|
2030 |
case EMobilePhoneGetSignalStrength:
|
|
2031 |
case EMobilePhoneGetCurrentNetwork:
|
|
2032 |
case EMobilePhoneGetNetworkName:
|
|
2033 |
case EMobilePhoneGetCurrentNetworkNoLocation:
|
|
2034 |
case EMobilePhoneGetHomeNetwork:
|
|
2035 |
case EMobilePhoneSetAlternatingCallMode:
|
|
2036 |
case EMobilePhoneNotifyAlternatingCallCapsChange:
|
|
2037 |
case EMobilePhoneNotifyAlternatingCallModeChange:
|
|
2038 |
//WCDMA features, hence not supported.
|
|
2039 |
case EMobilePhoneGetUUSSetting:
|
|
2040 |
case EMobilePhoneSetUUSSetting:
|
|
2041 |
case EMobilePhoneGetIncomingCallType:
|
|
2042 |
case EMobilePhoneSetIncomingCallType:
|
|
2043 |
case EMobilePhoneNotifyIncomingCallTypeChange:
|
|
2044 |
case EMobilePhoneGetMulticallParams:
|
|
2045 |
case EMobilePhoneSetMulticallParams:
|
|
2046 |
case EMobilePhoneNotifyMulticallParamsChange:
|
|
2047 |
case EMobilePhoneNotifyUUSSettingChange:
|
|
2048 |
//Unsupported CDMA features
|
|
2049 |
case EMobilePhoneNotifyMessageWaiting:
|
|
2050 |
break;
|
|
2051 |
|
|
2052 |
//Notification Cancels, no special requirements...
|
|
2053 |
|
|
2054 |
case EMobilePhoneGetPhoneId:
|
|
2055 |
ret = MobilePhoneGetPhoneIdCancel( aTsyReqHandle );
|
|
2056 |
break;
|
|
2057 |
|
|
2058 |
case EMobilePhoneNotifyIndicatorChange:
|
|
2059 |
ret = NotifyIndicatorChangeCancel( aTsyReqHandle );
|
|
2060 |
break;
|
|
2061 |
|
|
2062 |
case EMobilePhoneNotifyIccAccessCapsChange:
|
|
2063 |
ret = NotifyIccAccessCapsChangeCancel( aTsyReqHandle );
|
|
2064 |
break;
|
|
2065 |
case EMobilePhoneNotifyBatteryInfoChange:
|
|
2066 |
ret = NotifyBatteryInfoChangeCancel( aTsyReqHandle );
|
|
2067 |
break;
|
|
2068 |
case EMobilePhoneNotifyALSLineChange:
|
|
2069 |
ret = NotifyALSLineChangeCancel( aTsyReqHandle );
|
|
2070 |
break;
|
|
2071 |
case EMobilePhoneNotifyFdnStatusChange:
|
|
2072 |
ret = NotifyFdnStatusChangeCancel( aTsyReqHandle );
|
|
2073 |
break;
|
|
2074 |
case EMobilePhoneGetMailboxNumbers:
|
|
2075 |
ret = GetMailboxNumbersCancel();
|
|
2076 |
break;
|
|
2077 |
//Everything is taken care in the method implementation.
|
|
2078 |
//Just direct the request to the method.
|
|
2079 |
case EMobilePhoneGetPhoneStoreInfo:
|
|
2080 |
ret = GetPhoneStoreInfoCancel( aTsyReqHandle );
|
|
2081 |
break;
|
|
2082 |
case EMobilePhoneGetALSLine:
|
|
2083 |
ret = GetAlsLineCancel( aTsyReqHandle );
|
|
2084 |
break;
|
|
2085 |
case EMobilePhoneGetSubscriberId:
|
|
2086 |
ret = GetSubscriberIdCancel( aTsyReqHandle );
|
|
2087 |
break;
|
|
2088 |
case EMobilePhoneIMSAuthenticate:
|
|
2089 |
ret = ImsAuthenticationCancel();
|
|
2090 |
break;
|
|
2091 |
case EMobilePhoneEnumerateAPNEntries:
|
|
2092 |
ret = EnumerateAPNEntriesCancel();
|
|
2093 |
break;
|
|
2094 |
case EMobilePhoneGetAPNname:
|
|
2095 |
ret = GetAPNnameCancel();
|
|
2096 |
break;
|
|
2097 |
case EMobilePhoneAppendAPNName:
|
|
2098 |
ret = AppendAPNNameCancel();
|
|
2099 |
break;
|
|
2100 |
case EMobilePhoneDeleteAPNName:
|
|
2101 |
ret = DeleteAPNNameCancel();
|
|
2102 |
break;
|
|
2103 |
case EMobilePhoneSetAPNControlListServiceStatus:
|
|
2104 |
ret = SetAPNControlListServiceStatusCancel();
|
|
2105 |
break;
|
|
2106 |
case EMobilePhoneGetAPNControlListServiceStatus:
|
|
2107 |
ret = GetAPNControlListServiceStatusCancel();
|
|
2108 |
break;
|
|
2109 |
case EMobilePhoneNotifyAPNListChanged:
|
|
2110 |
ret = NotifyAPNListChangedCancel();
|
|
2111 |
break;
|
|
2112 |
case EMobilePhoneNotifyAPNControlListServiceStatusChange:
|
|
2113 |
ret = NotifyAPNControlListServiceStatusChangeCancel();
|
|
2114 |
break;
|
|
2115 |
case EMobilePhoneGetCustomerServiceProfile:
|
|
2116 |
ret = GetCustomerServiceProfileCancel( aTsyReqHandle );
|
|
2117 |
break;
|
|
2118 |
case EMobilePhoneGetServiceProviderName:
|
|
2119 |
ret = GetServiceProviderNameCancel( aTsyReqHandle );
|
|
2120 |
break;
|
|
2121 |
case EMobilePhoneGetFdnStatus:
|
|
2122 |
ret = GetFdnStatusCancel( aTsyReqHandle );
|
|
2123 |
break;
|
|
2124 |
|
|
2125 |
//When WINS flag is defined cancelling EMobilePhoneGetServiceTable
|
|
2126 |
//request is made possible because the request is handled much slower
|
|
2127 |
//Otherwise KErrNone is returned.
|
|
2128 |
#ifdef __WINS__
|
|
2129 |
case EMobilePhoneGetServiceTable:
|
|
2130 |
ret = GetServiceTableCancel( aTsyReqHandle );
|
|
2131 |
break;
|
|
2132 |
#else
|
|
2133 |
case EMobilePhoneGetServiceTable:
|
|
2134 |
ret = KErrNone;
|
|
2135 |
break;
|
|
2136 |
#endif //__WINS__
|
|
2137 |
|
|
2138 |
//Default case
|
|
2139 |
default:
|
|
2140 |
ret = CPhoneBase::CancelService( aIpc, aTsyReqHandle );
|
|
2141 |
break;
|
|
2142 |
}
|
|
2143 |
|
|
2144 |
return ret;
|
|
2145 |
}
|
|
2146 |
|
|
2147 |
// ---------------------------------------------------------------------------
|
|
2148 |
// CMmPhoneTsy::GetInfo
|
|
2149 |
// This CORE API method this function returns core phone
|
|
2150 |
// information in the given parameter
|
|
2151 |
// (other items were commented in a header).
|
|
2152 |
// ---------------------------------------------------------------------------
|
|
2153 |
//
|
|
2154 |
TInt CMmPhoneTsy::GetInfo(
|
|
2155 |
const TTsyReqHandle aTsyReqHandle,
|
|
2156 |
RPhone::TPhoneInfo* aPhoneInfo )
|
|
2157 |
{
|
|
2158 |
aPhoneInfo->iDetection = iPhoneStatus.iModemDetected;
|
|
2159 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
2160 |
|
|
2161 |
return KErrNone;
|
|
2162 |
}
|
|
2163 |
|
|
2164 |
// ---------------------------------------------------------------------------
|
|
2165 |
// CMmPhoneTsy::NotifyCapsChange
|
|
2166 |
// This CORE API method is used to request caps change
|
|
2167 |
// notifications from the TSY. The request handle and the pointer are stored
|
|
2168 |
// to wait for caps change event.
|
|
2169 |
// (other items were commented in a header).
|
|
2170 |
// ---------------------------------------------------------------------------
|
|
2171 |
//
|
|
2172 |
TInt CMmPhoneTsy::NotifyCapsChange(
|
|
2173 |
const TTsyReqHandle aTsyReqHandle,
|
|
2174 |
RPhone::TCaps* aCaps )
|
|
2175 |
{
|
|
2176 |
// Save request handle and ptr to aCaps.
|
|
2177 |
iRetCaps = aCaps;
|
|
2178 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
2179 |
EMultimodePhoneCapsChangeNotification, aTsyReqHandle );
|
|
2180 |
|
|
2181 |
return KErrNone;
|
|
2182 |
}
|
|
2183 |
|
|
2184 |
// ---------------------------------------------------------------------------
|
|
2185 |
// CMmPhoneTsy::NotifyCapsChangeCancel
|
|
2186 |
// This CORE API method cancels caps change notifications
|
|
2187 |
// (other items were commented in a header).
|
|
2188 |
// ---------------------------------------------------------------------------
|
|
2189 |
//
|
|
2190 |
TInt CMmPhoneTsy::NotifyCapsChangeCancel(
|
|
2191 |
const TTsyReqHandle aTsyReqHandle )
|
|
2192 |
{
|
|
2193 |
iRetCaps = NULL;
|
|
2194 |
|
|
2195 |
// Reset request handle and pointer
|
|
2196 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2197 |
EMultimodePhoneCapsChangeNotification );
|
|
2198 |
// Complete the request and return KErrNone
|
|
2199 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
2200 |
|
|
2201 |
return KErrNone;
|
|
2202 |
}
|
|
2203 |
|
|
2204 |
// ---------------------------------------------------------------------------
|
|
2205 |
// CMmPhoneTsy::CompleteNotifyCapsChange
|
|
2206 |
// Completes caps change notification. The new capabilities
|
|
2207 |
// are written to the stored pointer and the client is notified
|
|
2208 |
// (other items were commented in a header).
|
|
2209 |
// ---------------------------------------------------------------------------
|
|
2210 |
//
|
|
2211 |
void CMmPhoneTsy::CompleteNotifyCapsChange()
|
|
2212 |
{
|
|
2213 |
//reset req handle. Returns the deleted req handle
|
|
2214 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2215 |
EMultimodePhoneCapsChangeNotification );
|
|
2216 |
|
|
2217 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
2218 |
{
|
|
2219 |
// Fill the pointer with phone capabilities
|
|
2220 |
iRetCaps->iFlags = iPhoneCaps.iFlags;
|
|
2221 |
// Complete the client request
|
|
2222 |
ReqCompleted( reqHandle, KErrNone );
|
|
2223 |
}
|
|
2224 |
}
|
|
2225 |
|
|
2226 |
// ---------------------------------------------------------------------------
|
|
2227 |
// CMmPhoneTsy::ControlledInitialisation
|
|
2228 |
// This CORE API method defines TSY special start. Not supported
|
|
2229 |
// by MMTSY. Set to return KErrNone only because SMS stack is expecting it
|
|
2230 |
// (other items were commented in a header).
|
|
2231 |
// ---------------------------------------------------------------------------
|
|
2232 |
//
|
|
2233 |
TInt CMmPhoneTsy::ControlledInitialisation(
|
|
2234 |
const TTsyReqHandle aTsyReqHandle )
|
|
2235 |
{
|
|
2236 |
// Complete the request with KErrNone
|
|
2237 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
2238 |
|
|
2239 |
return KErrNone;
|
|
2240 |
}
|
|
2241 |
|
|
2242 |
// ---------------------------------------------------------------------------
|
|
2243 |
// CMmPhoneTsy::ControlledInitialisationCancel
|
|
2244 |
// Cancels controlled initialisation. Not supported by CommonTSY
|
|
2245 |
// (other items were commented in a header).
|
|
2246 |
// ---------------------------------------------------------------------------
|
|
2247 |
//
|
|
2248 |
TInt CMmPhoneTsy::ControlledInitialisationCancel(
|
|
2249 |
const TTsyReqHandle aTsyReqHandle )
|
|
2250 |
{
|
|
2251 |
ReqCompleted( aTsyReqHandle, KErrNotSupported );
|
|
2252 |
|
|
2253 |
return KErrNone;
|
|
2254 |
}
|
|
2255 |
|
|
2256 |
// ---------------------------------------------------------------------------
|
|
2257 |
// CMmPhoneTsy::NotifyModemDetected
|
|
2258 |
// This CORE API method requests notification when modem has been
|
|
2259 |
// detected.
|
|
2260 |
// (other items were commented in a header).
|
|
2261 |
// ---------------------------------------------------------------------------
|
|
2262 |
//
|
|
2263 |
TInt CMmPhoneTsy::NotifyModemDetected(
|
|
2264 |
const TTsyReqHandle aTsyReqHandle,
|
|
2265 |
RPhone::TModemDetection* aModemDetection )
|
|
2266 |
{
|
|
2267 |
iRetModemDetection = aModemDetection;
|
|
2268 |
iTsyReqHandleStore->SetTsyReqHandle( EMultimodePhoneNotifyModemDetected,
|
|
2269 |
aTsyReqHandle );
|
|
2270 |
|
|
2271 |
return KErrNone;
|
|
2272 |
}
|
|
2273 |
|
|
2274 |
// ---------------------------------------------------------------------------
|
|
2275 |
// CMmPhoneTsy::NotifyModemDetectedCancel
|
|
2276 |
// This CORE API method cancels modem detected notifications.
|
|
2277 |
// (other items were commented in a header).
|
|
2278 |
// ---------------------------------------------------------------------------
|
|
2279 |
//
|
|
2280 |
TInt CMmPhoneTsy::NotifyModemDetectedCancel(
|
|
2281 |
const TTsyReqHandle aTsyReqHandle )
|
|
2282 |
{
|
|
2283 |
iRetModemDetection = NULL;
|
|
2284 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodePhoneNotifyModemDetected );
|
|
2285 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
2286 |
|
|
2287 |
return KErrNone;
|
|
2288 |
}
|
|
2289 |
|
|
2290 |
// ---------------------------------------------------------------------------
|
|
2291 |
// CMmPhoneTsy::CompleteNotifyModemDetected
|
|
2292 |
// Complete the client request when modem has been detected
|
|
2293 |
// (other items were commented in a header).
|
|
2294 |
// ---------------------------------------------------------------------------
|
|
2295 |
//
|
|
2296 |
void CMmPhoneTsy::CompleteNotifyModemDetected(
|
|
2297 |
RPhone::TStatus aModemStatus )
|
|
2298 |
{
|
|
2299 |
iPhoneStatus = aModemStatus;
|
|
2300 |
|
|
2301 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2302 |
EMultimodePhoneNotifyModemDetected );
|
|
2303 |
|
|
2304 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
2305 |
{
|
|
2306 |
*iRetModemDetection = iPhoneStatus.iModemDetected;
|
|
2307 |
iRetModemDetection = NULL;
|
|
2308 |
ReqCompleted( reqHandle, KErrNone );
|
|
2309 |
}
|
|
2310 |
}
|
|
2311 |
|
|
2312 |
// ---------------------------------------------------------------------------
|
|
2313 |
// CMmPhoneTsy::GetCaps
|
|
2314 |
// This CORE API method returns the phone capabilities in the
|
|
2315 |
// aCaps parameter
|
|
2316 |
// (other items were commented in a header).
|
|
2317 |
// ---------------------------------------------------------------------------
|
|
2318 |
//
|
|
2319 |
TInt CMmPhoneTsy::GetCaps(
|
|
2320 |
const TTsyReqHandle aTsyReqHandle,
|
|
2321 |
RPhone::TCaps* aCaps )
|
|
2322 |
{
|
|
2323 |
aCaps->iFlags = KPhoneCoreCaps;
|
|
2324 |
|
|
2325 |
// Complete the request
|
|
2326 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
2327 |
|
|
2328 |
return KErrNone;
|
|
2329 |
}
|
|
2330 |
|
|
2331 |
// ---------------------------------------------------------------------------
|
|
2332 |
// CMmPhoneTsy::GetStatus
|
|
2333 |
// This CORE API method returns the phone status in the aStatus
|
|
2334 |
// parameter
|
|
2335 |
// (other items were commented in a header).
|
|
2336 |
// ---------------------------------------------------------------------------
|
|
2337 |
//
|
|
2338 |
TInt CMmPhoneTsy::GetStatus(
|
|
2339 |
const TTsyReqHandle aTsyReqHandle,
|
|
2340 |
RPhone::TStatus* aStatus )
|
|
2341 |
{
|
|
2342 |
// Fill status structure.
|
|
2343 |
aStatus->iMode = iPhoneStatus.iMode;
|
|
2344 |
aStatus->iModemDetected = iPhoneStatus.iModemDetected;
|
|
2345 |
|
|
2346 |
// Complete the request
|
|
2347 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
2348 |
|
|
2349 |
return KErrNone;
|
|
2350 |
}
|
|
2351 |
|
|
2352 |
// ---------------------------------------------------------------------------
|
|
2353 |
// CMmPhoneTsy::EnumerateLines
|
|
2354 |
// This CORE API method enumerates the max. number of lines
|
|
2355 |
// that the TSY supports
|
|
2356 |
// (other items were commented in a header).
|
|
2357 |
// ---------------------------------------------------------------------------
|
|
2358 |
//
|
|
2359 |
TInt CMmPhoneTsy::EnumerateLines(
|
|
2360 |
const TTsyReqHandle aTsyReqHandle,
|
|
2361 |
TInt* aCount )
|
|
2362 |
{
|
|
2363 |
// Write maximum number of lines to server pointer
|
|
2364 |
*aCount = KMmTsyNumOfSupportedLines;
|
|
2365 |
|
|
2366 |
// Complete the request
|
|
2367 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
2368 |
|
|
2369 |
return KErrNone;
|
|
2370 |
}
|
|
2371 |
|
|
2372 |
// ---------------------------------------------------------------------------
|
|
2373 |
// CMmPhoneTsy::GetLineInfo
|
|
2374 |
// This CORE API method returns line information in the given
|
|
2375 |
// parameter
|
|
2376 |
// (other items were commented in a header).
|
|
2377 |
// ---------------------------------------------------------------------------
|
|
2378 |
//
|
|
2379 |
TInt CMmPhoneTsy::GetLineInfo(
|
|
2380 |
const TTsyReqHandle aTsyReqHandle,
|
|
2381 |
TLineInfoIndex* aLineInfoIndex )
|
|
2382 |
{
|
|
2383 |
//set return value to KErrNotFound
|
|
2384 |
TInt ret ( KErrNotFound );
|
|
2385 |
|
|
2386 |
//check that line is supported
|
|
2387 |
if ( ( aLineInfoIndex->iIndex >= 0 ) &&
|
|
2388 |
( aLineInfoIndex->iIndex < KMmTsyNumOfSupportedLines ) )
|
|
2389 |
{
|
|
2390 |
//set return value to KErrNone
|
|
2391 |
ret = KErrNone;
|
|
2392 |
|
|
2393 |
// Look line by given index
|
|
2394 |
CMmLineTsy* mmLine = REINTERPRET_CAST( CMmLineTsy*,
|
|
2395 |
iLineList->GetObjectByIndex( aLineInfoIndex->iIndex ) );
|
|
2396 |
|
|
2397 |
// Check if line was found and fill aInfo
|
|
2398 |
if( mmLine )
|
|
2399 |
{
|
|
2400 |
aLineInfoIndex->iInfo = mmLine->LineInfo();
|
|
2401 |
}
|
|
2402 |
else
|
|
2403 |
//no line found
|
|
2404 |
{
|
|
2405 |
switch ( aLineInfoIndex->iIndex )
|
|
2406 |
{
|
|
2407 |
case CMmLineList::ELine0Voice1:
|
|
2408 |
aLineInfoIndex->iInfo.iName = KMmTsyVoice1LineName;
|
|
2409 |
aLineInfoIndex->iInfo.iLineCapsFlags = 0x00010004;
|
|
2410 |
break;
|
|
2411 |
case CMmLineList::ELine1Voice2:
|
|
2412 |
aLineInfoIndex->iInfo.iName = KMmTsyVoice2LineName;
|
|
2413 |
aLineInfoIndex->iInfo.iLineCapsFlags = 0x00010008;
|
|
2414 |
break;
|
|
2415 |
case CMmLineList::ELine2Data:
|
|
2416 |
aLineInfoIndex->iInfo.iName = KMmTsyDataLineName;
|
|
2417 |
aLineInfoIndex->iInfo.iLineCapsFlags = 0x10001;
|
|
2418 |
break;
|
|
2419 |
case CMmLineList::ELine3Fax:
|
|
2420 |
aLineInfoIndex->iInfo.iName = KMmTsyFaxLineName;
|
|
2421 |
aLineInfoIndex->iInfo.iLineCapsFlags = 0x10002;
|
|
2422 |
break;
|
|
2423 |
default :
|
|
2424 |
break;
|
|
2425 |
}
|
|
2426 |
|
|
2427 |
//Status is set to "Unknown"
|
|
2428 |
aLineInfoIndex->iInfo.iStatus = RCall::EStatusUnknown;
|
|
2429 |
}
|
|
2430 |
}
|
|
2431 |
|
|
2432 |
ReqCompleted( aTsyReqHandle, ret );
|
|
2433 |
|
|
2434 |
return KErrNone;
|
|
2435 |
}
|
|
2436 |
|
|
2437 |
// ---------------------------------------------------------------------------
|
|
2438 |
// CMmPhoneTsy::TerminateAllCallsL
|
|
2439 |
// Terminates all calls simultaneously.
|
|
2440 |
// ---------------------------------------------------------------------------
|
|
2441 |
//
|
|
2442 |
TInt CMmPhoneTsy::TerminateAllCallsL(const TTsyReqHandle aTsyReqHandle)
|
|
2443 |
{
|
|
2444 |
TFLOGSTRING("TSY: CMmPhoneTsy::TerminateAllCalls");
|
|
2445 |
|
|
2446 |
// Check if some other client has already requested this
|
|
2447 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(EMultimodePhoneTerminateAllCalls);
|
|
2448 |
|
|
2449 |
if (EMultimodePhoneReqHandleUnknown >= reqHandle )
|
|
2450 |
{
|
|
2451 |
// The request is not already in processing because of a previous request
|
|
2452 |
|
|
2453 |
CMmCallTsy* activeCall = iCallList->GetMmCallByStatus(RMobileCall::EStatusConnected);
|
|
2454 |
CMmCallTsy* heldCall = iCallList->GetMmCallByStatus(RMobileCall::EStatusHold);
|
|
2455 |
CMmCallTsy* connectingCall = iCallList->GetMmCallByStatus(RMobileCall::EStatusDialling);
|
|
2456 |
if ( connectingCall == NULL )
|
|
2457 |
{
|
|
2458 |
connectingCall = iCallList->GetMmCallByStatus(RMobileCall::EStatusConnecting);
|
|
2459 |
}
|
|
2460 |
|
|
2461 |
if ( activeCall || heldCall || connectingCall )
|
|
2462 |
{
|
|
2463 |
TInt callId(0);
|
|
2464 |
if (connectingCall != NULL)
|
|
2465 |
{
|
|
2466 |
callId = connectingCall->CallId();
|
|
2467 |
}
|
|
2468 |
CMmDataPackage dataPackage;
|
|
2469 |
dataPackage.PackData(&callId);
|
|
2470 |
TInt err = iMessageManager->HandleRequestL(ECtsyPhoneTerminateAllCallsReq, &dataPackage);
|
|
2471 |
|
|
2472 |
if ( err == KErrNone )
|
|
2473 |
{
|
|
2474 |
#ifdef REQHANDLE_TIMER
|
|
2475 |
SetTypeOfResponse( EMultimodePhoneTerminateAllCalls, aTsyReqHandle );
|
|
2476 |
#else
|
|
2477 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
2478 |
EMultimodePhoneTerminateAllCalls, aTsyReqHandle );
|
|
2479 |
#endif //REQHANDLE_TIMER
|
|
2480 |
}
|
|
2481 |
else
|
|
2482 |
{
|
|
2483 |
// request failed, complete with error value
|
|
2484 |
ReqCompleted( aTsyReqHandle, err );
|
|
2485 |
}
|
|
2486 |
}
|
|
2487 |
else
|
|
2488 |
{
|
|
2489 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
2490 |
}
|
|
2491 |
}
|
|
2492 |
else
|
|
2493 |
{
|
|
2494 |
TFLOGSTRING("TSY: CMmPhoneTsy::TerminateAllCalls - Already requested");
|
|
2495 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
2496 |
}
|
|
2497 |
return KErrNone;
|
|
2498 |
}
|
|
2499 |
|
|
2500 |
void CMmPhoneTsy::CompleteTerminateAllCallsReq(TInt aErrorCode)
|
|
2501 |
{
|
|
2502 |
// Reset req handle. Returns the deleted req handle
|
|
2503 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2504 |
EMultimodePhoneTerminateAllCalls );
|
|
2505 |
|
|
2506 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
2507 |
{
|
|
2508 |
ReqCompleted( reqHandle, aErrorCode );
|
|
2509 |
}
|
|
2510 |
}
|
|
2511 |
|
|
2512 |
|
|
2513 |
// ---------------------------------------------------------------------------
|
|
2514 |
// CMmPhoneTsy::TerminateActiveCallsL
|
|
2515 |
// Terminates all active calls simultaneously.
|
|
2516 |
// ---------------------------------------------------------------------------
|
|
2517 |
//
|
|
2518 |
TInt CMmPhoneTsy::TerminateActiveCallsL(const TTsyReqHandle aTsyReqHandle)
|
|
2519 |
{
|
|
2520 |
TFLOGSTRING("TSY: CMmPhoneTsy::TerminateActiveCalls");
|
|
2521 |
|
|
2522 |
// Check if some other client has already requested this
|
|
2523 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(EMultimodePhoneTerminateActiveCalls);
|
|
2524 |
|
|
2525 |
if (EMultimodePhoneReqHandleUnknown >= reqHandle )
|
|
2526 |
{
|
|
2527 |
// The request is not already in processing because of a previous request
|
|
2528 |
|
|
2529 |
TInt err = iMessageManager->HandleRequestL(ECtsyPhoneTerminateActiveCallsReq);
|
|
2530 |
if ( err == KErrNone )
|
|
2531 |
{
|
|
2532 |
#ifdef REQHANDLE_TIMER
|
|
2533 |
SetTypeOfResponse( EMultimodePhoneTerminateActiveCalls, aTsyReqHandle );
|
|
2534 |
#else
|
|
2535 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
2536 |
iReqHandleType, aTsyReqHandle );
|
|
2537 |
#endif //REQHANDLE_TIMER
|
|
2538 |
}
|
|
2539 |
else
|
|
2540 |
{
|
|
2541 |
// request failed, complete with error value
|
|
2542 |
ReqCompleted( aTsyReqHandle, err );
|
|
2543 |
}
|
|
2544 |
}
|
|
2545 |
else
|
|
2546 |
{
|
|
2547 |
TFLOGSTRING("TSY: CMmPhoneTsy::TerminatActiveCalls - Already requested");
|
|
2548 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
2549 |
}
|
|
2550 |
return KErrNone;
|
|
2551 |
}
|
|
2552 |
// ---------------------------------------------------------------------------
|
|
2553 |
// CMmPhoneTsy::CompleteTerminateActiveCallsReq
|
|
2554 |
// Description: Complete TerminateActiveCallsRequest
|
|
2555 |
// ---------------------------------------------------------------------------
|
|
2556 |
//
|
|
2557 |
void CMmPhoneTsy::CompleteTerminateActiveCallsReq(TInt aErrorCode)
|
|
2558 |
{
|
|
2559 |
// Reset req handle. Returns the deleted req handle
|
|
2560 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2561 |
EMultimodePhoneTerminateActiveCalls );
|
|
2562 |
|
|
2563 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
2564 |
{
|
|
2565 |
ReqCompleted( reqHandle, aErrorCode );
|
|
2566 |
}
|
|
2567 |
}
|
|
2568 |
|
|
2569 |
// ---------------------------------------------------------------------------
|
|
2570 |
// CMmPhoneTsy::RegisterNotification
|
|
2571 |
// This function is used by ETel Server to subscribe
|
|
2572 |
// notifications from DOS. Currently does not really do anything but returns
|
|
2573 |
// KErrNone to ETel server in case of known notification request type
|
|
2574 |
// (other items were commented in a header).
|
|
2575 |
// ---------------------------------------------------------------------------
|
|
2576 |
//
|
|
2577 |
TInt CMmPhoneTsy::RegisterNotification (
|
|
2578 |
const TInt aIpc )
|
|
2579 |
{
|
|
2580 |
TInt ret = KErrNone;
|
|
2581 |
|
|
2582 |
switch (aIpc)
|
|
2583 |
{
|
|
2584 |
case EEtelPhoneNotifyModemDetected:
|
|
2585 |
case EETelPhoneCapsChangeNotification:
|
|
2586 |
case EMobilePhoneNotifyDTMFCapsChange:
|
|
2587 |
case EMobilePhoneNotifyStopInDTMFString:
|
|
2588 |
case EMobilePhoneNotifyDTMFEvent:
|
|
2589 |
case EMobilePhoneNotifyNetworkRegistrationStatusChange:
|
|
2590 |
case EMobilePhoneNotifyModeChange:
|
|
2591 |
case EMobilePhoneNotifyCurrentNetworkChange:
|
|
2592 |
case EMobilePhoneNotifyCurrentNetworkNoLocationChange:
|
|
2593 |
case EMobilePhoneNotifyNetworkSelectionSettingChange:
|
|
2594 |
case EMobilePhoneNotifyBatteryInfoChange:
|
|
2595 |
case EMobilePhoneNotifySignalStrengthChange:
|
|
2596 |
case EMobilePhoneNotifyCallForwardingStatusChange:
|
|
2597 |
case EMobilePhoneNotifyCallBarringStatusChange:
|
|
2598 |
case EMobilePhoneNotifyCallWaitingStatusChange:
|
|
2599 |
case EMobilePhoneNotifyAlternatingCallCapsChange:
|
|
2600 |
case EMobilePhoneNotifyAlternatingCallModeChange:
|
|
2601 |
case EMobilePhoneNotifyALSLineChange:
|
|
2602 |
case EMobilePhoneNotifySecurityCapsChange:
|
|
2603 |
case EMobilePhoneNotifyLockInfoChange:
|
|
2604 |
case EMobilePhoneNotifySecurityEvent:
|
|
2605 |
case EMobilePhoneNotifyMessageWaiting:
|
|
2606 |
case EMobilePhoneNotifyFdnStatusChange:
|
|
2607 |
case EMobilePhoneNotifyIccAccessCapsChange:
|
|
2608 |
case EMobilePhoneNotifyNITZInfoChange:
|
|
2609 |
case EMobilePhoneNotifyDefaultPrivacyChange:
|
|
2610 |
case EMobilePhoneNotifyCallServiceCapsChange:
|
|
2611 |
case EMobilePhoneNotifyCallForwardingActive:
|
|
2612 |
case EMobilePhoneNotifyMulticallParamsChange:
|
|
2613 |
case EMobilePhoneNotifyIncomingCallTypeChange:
|
|
2614 |
case EMobilePhoneNotifyUUSSettingChange:
|
|
2615 |
case EMobilePhoneNotifyIccMessageWaitingIndicatorsChange:
|
|
2616 |
case EMobilePhoneNotifyIndicatorChange:
|
|
2617 |
case EMobilePhoneNotifyNetworkSecurityLevelChange:
|
|
2618 |
case EMobilePhoneNotifySecurityCodeInfoChange:
|
|
2619 |
case EMobilePhoneNotifyAPNListChanged:
|
|
2620 |
case EMobilePhoneNotifyAPNControlListServiceStatusChange:
|
|
2621 |
case EMobilePhoneNotifySendNetworkServiceRequest:
|
|
2622 |
case EMobilePhoneNotifyAllSendNetworkServiceRequest:
|
|
2623 |
case EMobilePhoneNotifyCellInfoChange:
|
|
2624 |
ret = KErrNone;
|
|
2625 |
break;
|
|
2626 |
default:
|
|
2627 |
// Not supported
|
|
2628 |
ret = KErrNotSupported;
|
|
2629 |
}
|
|
2630 |
|
|
2631 |
return ret;
|
|
2632 |
}
|
|
2633 |
|
|
2634 |
// ---------------------------------------------------------------------------
|
|
2635 |
// CMmPhoneTsy::DeregisterNotification
|
|
2636 |
// This function is used to unsubscribe given notification
|
|
2637 |
// from DOS. Currently does not really do anything but returns
|
|
2638 |
// KErrNone to ETel server in case of known notification request type
|
|
2639 |
// (other items were commented in a header).
|
|
2640 |
// ---------------------------------------------------------------------------
|
|
2641 |
//
|
|
2642 |
TInt CMmPhoneTsy::DeregisterNotification(
|
|
2643 |
const TInt aIpc )
|
|
2644 |
{
|
|
2645 |
TInt ret = KErrNone;
|
|
2646 |
|
|
2647 |
switch (aIpc)
|
|
2648 |
{
|
|
2649 |
case EEtelPhoneNotifyModemDetected:
|
|
2650 |
case EETelPhoneCapsChangeNotification:
|
|
2651 |
case EMobilePhoneNotifyDTMFCapsChange:
|
|
2652 |
case EMobilePhoneNotifyStopInDTMFString:
|
|
2653 |
case EMobilePhoneNotifyDTMFEvent:
|
|
2654 |
case EMobilePhoneNotifyNetworkRegistrationStatusChange:
|
|
2655 |
case EMobilePhoneNotifyModeChange:
|
|
2656 |
case EMobilePhoneNotifyCurrentNetworkChange:
|
|
2657 |
case EMobilePhoneNotifyCurrentNetworkNoLocationChange:
|
|
2658 |
case EMobilePhoneNotifyNetworkSelectionSettingChange:
|
|
2659 |
case EMobilePhoneNotifyBatteryInfoChange:
|
|
2660 |
case EMobilePhoneNotifySignalStrengthChange:
|
|
2661 |
case EMobilePhoneNotifyCallForwardingStatusChange:
|
|
2662 |
case EMobilePhoneNotifyCallBarringStatusChange:
|
|
2663 |
case EMobilePhoneNotifyCallWaitingStatusChange:
|
|
2664 |
case EMobilePhoneNotifyAlternatingCallCapsChange:
|
|
2665 |
case EMobilePhoneNotifyAlternatingCallModeChange:
|
|
2666 |
case EMobilePhoneNotifyALSLineChange:
|
|
2667 |
case EMobilePhoneNotifySecurityCapsChange:
|
|
2668 |
case EMobilePhoneNotifyLockInfoChange:
|
|
2669 |
case EMobilePhoneNotifySecurityEvent:
|
|
2670 |
case EMobilePhoneNotifyMessageWaiting:
|
|
2671 |
case EMobilePhoneNotifyFdnStatusChange:
|
|
2672 |
case EMobilePhoneNotifyIccAccessCapsChange:
|
|
2673 |
case EMobilePhoneNotifyNITZInfoChange:
|
|
2674 |
case EMobilePhoneNotifyDefaultPrivacyChange:
|
|
2675 |
case EMobilePhoneNotifyCallServiceCapsChange:
|
|
2676 |
case EMobilePhoneNotifyCallForwardingActive:
|
|
2677 |
case EMobilePhoneNotifyMulticallParamsChange:
|
|
2678 |
case EMobilePhoneNotifyIncomingCallTypeChange:
|
|
2679 |
case EMobilePhoneNotifyUUSSettingChange:
|
|
2680 |
case EMobilePhoneNotifyIccMessageWaitingIndicatorsChange:
|
|
2681 |
case EMobilePhoneNotifyIndicatorChange:
|
|
2682 |
case EMobilePhoneNotifyNetworkSecurityLevelChange:
|
|
2683 |
case EMobilePhoneNotifySecurityCodeInfoChange:
|
|
2684 |
case EMobilePhoneNotifyAPNListChanged:
|
|
2685 |
case EMobilePhoneNotifyAPNControlListServiceStatusChange:
|
|
2686 |
case EMobilePhoneNotifySendNetworkServiceRequest:
|
|
2687 |
case EMobilePhoneNotifyAllSendNetworkServiceRequest:
|
|
2688 |
case EMobilePhoneNotifyCellInfoChange:
|
|
2689 |
ret = KErrNone;
|
|
2690 |
break;
|
|
2691 |
default:
|
|
2692 |
// Not supported
|
|
2693 |
ret = KErrNotSupported;
|
|
2694 |
}
|
|
2695 |
|
|
2696 |
return ret;
|
|
2697 |
}
|
|
2698 |
|
|
2699 |
// ---------------------------------------------------------------------------
|
|
2700 |
// CMmPhoneTsy::GetActivePhoneExtension
|
|
2701 |
// Returns a pointer to the active phone extension. The phone
|
|
2702 |
// extension implements phone functionality that is specific
|
|
2703 |
// for selected mode. There should always be some extension active
|
|
2704 |
// (other items were commented in a header).
|
|
2705 |
// ---------------------------------------------------------------------------
|
|
2706 |
//
|
|
2707 |
CMmPhoneExtInterface* CMmPhoneTsy::GetActivePhoneExtension()
|
|
2708 |
{
|
|
2709 |
return iMmPhoneExtInterface;
|
|
2710 |
}
|
|
2711 |
|
|
2712 |
// ---------------------------------------------------------------------------
|
|
2713 |
// CMmPhoneTsy::CallList
|
|
2714 |
// Returns a pointer to the call list. Call groups are used
|
|
2715 |
// only inside the TSY module, not from the client or from ETel Server.
|
|
2716 |
// When a new CMmCallTsy object is created in the TSY and added to the ETel
|
|
2717 |
// Server's Phone Manager database, it should also be added to the call list.
|
|
2718 |
// The call list has some same functionality as call groups had. Call groups
|
|
2719 |
// were removed from new Mobile API
|
|
2720 |
// (other items were commented in a header).
|
|
2721 |
// ---------------------------------------------------------------------------
|
|
2722 |
//
|
|
2723 |
CMmCallList* CMmPhoneTsy::CallList()
|
|
2724 |
{
|
|
2725 |
return iCallList;
|
|
2726 |
}
|
|
2727 |
|
|
2728 |
// ---------------------------------------------------------------------------
|
|
2729 |
// CMmPhoneTsy::GetActivePhoneExtension
|
|
2730 |
// Returns a pointer to the line list.
|
|
2731 |
// When a new CMmLineTsy object is created in the TSY and added to the ETel
|
|
2732 |
// Server's Phone Manager database, it should also be added to the line list
|
|
2733 |
// (other items were commented in a header).
|
|
2734 |
// ---------------------------------------------------------------------------
|
|
2735 |
//
|
|
2736 |
CMmLineList* CMmPhoneTsy::LineList()
|
|
2737 |
{
|
|
2738 |
return iLineList;
|
|
2739 |
}
|
|
2740 |
|
|
2741 |
// ---------------------------------------------------------------------------
|
|
2742 |
// CMmPhoneTsy::PBList
|
|
2743 |
// Returns a pointer to the phonebook list.
|
|
2744 |
// When a new CMmPhoneBookStoreTsy object is created in the TSY, it should
|
|
2745 |
// be also added to the phone book list
|
|
2746 |
// (other items were commented in a header).
|
|
2747 |
// ---------------------------------------------------------------------------
|
|
2748 |
//
|
|
2749 |
CMmPBList* CMmPhoneTsy::PBList()
|
|
2750 |
{
|
|
2751 |
return iPBList;
|
|
2752 |
}
|
|
2753 |
|
|
2754 |
// ---------------------------------------------------------------------------
|
|
2755 |
// CMmPhoneTsy::GetMultimodeCaps
|
|
2756 |
// This method returns the multimode support capabilities of he phone
|
|
2757 |
// (other items were commented in a header).
|
|
2758 |
// ---------------------------------------------------------------------------
|
|
2759 |
//
|
|
2760 |
TInt CMmPhoneTsy::GetMultimodeCaps(
|
|
2761 |
const TTsyReqHandle aTsyReqHandle,
|
|
2762 |
TUint32* aCaps )
|
|
2763 |
{
|
|
2764 |
*aCaps = KMultimodeCaps;
|
|
2765 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
2766 |
|
|
2767 |
return KErrNone;
|
|
2768 |
}
|
|
2769 |
|
|
2770 |
// ---------------------------------------------------------------------------
|
|
2771 |
// CMmPhoneTsy::GetPhoneStoreInfoL
|
|
2772 |
// Request information about the phone store specified by aStoreName
|
|
2773 |
// (other items were commented in a header).
|
|
2774 |
// ---------------------------------------------------------------------------
|
|
2775 |
//
|
|
2776 |
TInt CMmPhoneTsy::GetPhoneStoreInfoL(
|
|
2777 |
TDes8* aInfo,
|
|
2778 |
const RMobilePhone::TMobileName* aStoreName )
|
|
2779 |
{
|
|
2780 |
TInt ret( KErrArgument );
|
|
2781 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetPhoneStoreInfoL" );
|
|
2782 |
|
|
2783 |
if(sizeof(RMobilePhoneStore::TMobilePhoneStoreInfoV1) <= aInfo->MaxLength())
|
|
2784 |
{
|
|
2785 |
ret = KErrNone;
|
|
2786 |
|
|
2787 |
RMobilePhoneStore::TMobilePhoneStoreInfoV1Pckg* info =
|
|
2788 |
reinterpret_cast<RMobilePhoneStore::TMobilePhoneStoreInfoV1Pckg*>( aInfo );
|
|
2789 |
|
|
2790 |
RMobilePhoneStore::TMobilePhoneStoreInfoV1& storeInfo = ( *info )();
|
|
2791 |
|
|
2792 |
if ( KETelExtMultimodeV1 != storeInfo.ExtensionId() )
|
|
2793 |
{
|
|
2794 |
TFLOGSTRING("TSY: Phonebook not supported. Only KETelExtMultimodeV1 types supported for RMobilePhone::GetPhoneStoreInfo" );
|
|
2795 |
ret = KErrNotSupported;
|
|
2796 |
}
|
|
2797 |
else
|
|
2798 |
{
|
|
2799 |
// Not supported features
|
|
2800 |
if ( 0x0 == aStoreName->Compare( KETelMeAdnPhoneBook ) ||
|
|
2801 |
0x0 == aStoreName->Compare( KETelMeDialledPhoneBook ) ||
|
|
2802 |
0x0 == aStoreName->Compare( KETelMeMissedPhoneBook ) ||
|
|
2803 |
0x0 == aStoreName->Compare( KETelMeReceivedPhoneBook ) ||
|
|
2804 |
0x0 == aStoreName->Compare( KETelCombinedAdnPhoneBook ) ||
|
|
2805 |
0x0 == aStoreName->Compare( KETelCombinedSmsStore ) ||
|
|
2806 |
0x0 == aStoreName->Compare( KETelMeSmsStore )
|
|
2807 |
)
|
|
2808 |
{
|
|
2809 |
TFLOGSTRING("TSY: Phonebook name is not supported. " );
|
|
2810 |
ret = KErrNotSupported;
|
|
2811 |
}
|
|
2812 |
else
|
|
2813 |
{
|
|
2814 |
// packed parameter for DOS call: RMobilePhone::TMobileName
|
|
2815 |
CMmDataPackage dataPackage;
|
|
2816 |
|
|
2817 |
RMobilePhone::TMobileName* nonConstStoreName =
|
|
2818 |
const_cast<RMobilePhone::TMobileName*>( aStoreName );
|
|
2819 |
dataPackage.PackData( nonConstStoreName );
|
|
2820 |
ret = iMessageManager->HandleRequestL(
|
|
2821 |
EMobilePhoneGetPhoneStoreInfo, &dataPackage );
|
|
2822 |
}
|
|
2823 |
|
|
2824 |
// Check the request sending status
|
|
2825 |
if ( KErrNone == ret )
|
|
2826 |
{
|
|
2827 |
// Save last req handle type
|
|
2828 |
iReqHandleType = EMultimodePhoneGetPhoneStoreInfo;
|
|
2829 |
iRetPhoneStoreInfo = &storeInfo;
|
|
2830 |
}
|
|
2831 |
}
|
|
2832 |
}
|
|
2833 |
return ret;
|
|
2834 |
}
|
|
2835 |
|
|
2836 |
|
|
2837 |
// ---------------------------------------------------------------------------
|
|
2838 |
// CMmPhoneTsy::CompleteGetPhoneStoreInfo
|
|
2839 |
// Returns the phone store info that is stored on the SIM to the client
|
|
2840 |
// (other items were commented in a header).
|
|
2841 |
// ---------------------------------------------------------------------------
|
|
2842 |
//
|
|
2843 |
void CMmPhoneTsy::CompleteGetPhoneStoreInfo(
|
|
2844 |
RMobilePhoneStore::TMobilePhoneStoreInfoV1 aPhoneStoreInfo,
|
|
2845 |
TInt aErrorCode )
|
|
2846 |
{
|
|
2847 |
// Reset req handle. Returns the deleted req handle
|
|
2848 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2849 |
EMultimodePhoneGetPhoneStoreInfo );
|
|
2850 |
|
|
2851 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
2852 |
{
|
|
2853 |
if ( iRetPhoneStoreInfo )
|
|
2854 |
{
|
|
2855 |
// copy result to client
|
|
2856 |
*iRetPhoneStoreInfo = aPhoneStoreInfo;
|
|
2857 |
// reset pointer to client
|
|
2858 |
iRetPhoneStoreInfo = NULL;
|
|
2859 |
}
|
|
2860 |
// Complete the client request
|
|
2861 |
ReqCompleted( reqHandle, aErrorCode );
|
|
2862 |
}
|
|
2863 |
}
|
|
2864 |
|
|
2865 |
// ---------------------------------------------------------------------------
|
|
2866 |
// CMmPhoneTsy::GetPhoneStoreInfoCancel
|
|
2867 |
// Cancels a previously placed GetPhoneStoreInfo request
|
|
2868 |
// (other items were commented in a header).
|
|
2869 |
// ---------------------------------------------------------------------------
|
|
2870 |
//
|
|
2871 |
TInt CMmPhoneTsy::GetPhoneStoreInfoCancel(
|
|
2872 |
const TTsyReqHandle )
|
|
2873 |
{
|
|
2874 |
TTsyReqHandle reqHandle =
|
|
2875 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodePhoneGetPhoneStoreInfo );
|
|
2876 |
|
|
2877 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
2878 |
{
|
|
2879 |
// reset pointer to client
|
|
2880 |
iRetPhoneStoreInfo = NULL;
|
|
2881 |
//complete with cancel
|
|
2882 |
ReqCompleted( reqHandle, KErrCancel );
|
|
2883 |
}
|
|
2884 |
|
|
2885 |
return KErrNone;
|
|
2886 |
}
|
|
2887 |
|
|
2888 |
// ---------------------------------------------------------------------------
|
|
2889 |
// CMmPhoneTsy::GetCustomerServiceProfileL
|
|
2890 |
// Request the whole Customer Service Profile file that is stored on the SIM.
|
|
2891 |
// (other items were commented in a header).
|
|
2892 |
// ---------------------------------------------------------------------------
|
|
2893 |
//
|
|
2894 |
TInt CMmPhoneTsy::GetCustomerServiceProfileL(
|
|
2895 |
const TTsyReqHandle aTsyReqHandle,
|
|
2896 |
TDes8* aCspFile )
|
|
2897 |
{
|
|
2898 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetCustomerServiceProfileL" );
|
|
2899 |
|
|
2900 |
TInt ret = KErrArgument;
|
|
2901 |
|
|
2902 |
if ( sizeof( RMobilePhone::TMobilePhoneCspFileV1 ) ==
|
|
2903 |
aCspFile->MaxLength() )
|
|
2904 |
{
|
|
2905 |
RMobilePhone::TMobilePhoneCspFileV1Pckg* infoPckg =
|
|
2906 |
reinterpret_cast< RMobilePhone::TMobilePhoneCspFileV1Pckg* >
|
|
2907 |
( aCspFile );
|
|
2908 |
RMobilePhone::TMobilePhoneCspFileV1* cspFile = &( ( *infoPckg )() );
|
|
2909 |
|
|
2910 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
2911 |
EMultimodePhoneGetCustomerServiceProfile );
|
|
2912 |
|
|
2913 |
if ( 0 < reqHandle )
|
|
2914 |
{
|
|
2915 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetCustomerServiceProfileL one req already ongoing" );
|
|
2916 |
ret = KErrNone;
|
|
2917 |
//The request is already in processing because of previous request
|
|
2918 |
//Complete request with status value informing the client about
|
|
2919 |
TCustomerServiceProfileIdRequest* req =
|
|
2920 |
new (ELeave) TCustomerServiceProfileIdRequest();
|
|
2921 |
req->iReqHandle = aTsyReqHandle;
|
|
2922 |
req->iRetCspFile = cspFile;
|
|
2923 |
iCustomerServiceProfileRequests.AppendL( req );
|
|
2924 |
}
|
|
2925 |
else
|
|
2926 |
{
|
|
2927 |
// no packed parameters for DOS call
|
|
2928 |
ret = iMessageManager->HandleRequestL(
|
|
2929 |
EMobilePhoneGetCustomerServiceProfile );
|
|
2930 |
|
|
2931 |
// Check the request sending status
|
|
2932 |
if ( KErrNone == ret )
|
|
2933 |
{
|
|
2934 |
// DOS call successful, save request handle and return pointer
|
|
2935 |
// for completion
|
|
2936 |
iReqHandleType = EMultimodePhoneGetCustomerServiceProfile;
|
|
2937 |
// save request in queue for completion
|
|
2938 |
TCustomerServiceProfileIdRequest* req =
|
|
2939 |
new (ELeave) TCustomerServiceProfileIdRequest();
|
|
2940 |
req->iReqHandle = aTsyReqHandle;
|
|
2941 |
req->iRetCspFile = cspFile;
|
|
2942 |
iCustomerServiceProfileRequests.AppendL( req );
|
|
2943 |
}
|
|
2944 |
}
|
|
2945 |
}
|
|
2946 |
|
|
2947 |
return ret;
|
|
2948 |
}
|
|
2949 |
|
|
2950 |
// ---------------------------------------------------------------------------
|
|
2951 |
// CMmPhoneTsy::CompleteGetCustomerServiceProfile
|
|
2952 |
// Completes a GetCustomerServiceProfile request.
|
|
2953 |
// (other items were commented in a header).
|
|
2954 |
// ---------------------------------------------------------------------------
|
|
2955 |
//
|
|
2956 |
void CMmPhoneTsy::CompleteGetCustomerServiceProfile(
|
|
2957 |
RMobilePhone::TMobilePhoneCspFileV1 aCspFile,
|
|
2958 |
TInt aErrorCode )
|
|
2959 |
{
|
|
2960 |
|
|
2961 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetCustomerServiceProfile" );
|
|
2962 |
|
|
2963 |
// Check if the get was called internally during boot
|
|
2964 |
if( iCspFileQueryInBoot )
|
|
2965 |
{
|
|
2966 |
// Examine Csp file's ALS state
|
|
2967 |
if ( RMobilePhone::KCspALS & aCspFile.iCphsTeleservices )
|
|
2968 |
{
|
|
2969 |
iCspFileAlsSet = ETrue;
|
|
2970 |
SetAlsState( ETrue );
|
|
2971 |
iCspFileAlsSet = EFalse;
|
|
2972 |
}
|
|
2973 |
iCspFileQueryInBoot = EFalse;
|
|
2974 |
}
|
|
2975 |
|
|
2976 |
// Reset req handle. Returns the deleted req handle
|
|
2977 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
2978 |
EMultimodePhoneGetCustomerServiceProfile );
|
|
2979 |
|
|
2980 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
2981 |
{
|
|
2982 |
|
|
2983 |
TInt customerServiceProfileRequestsCount =
|
|
2984 |
iCustomerServiceProfileRequests.Count();
|
|
2985 |
|
|
2986 |
for ( TInt i=0; i < customerServiceProfileRequestsCount ; i++ )
|
|
2987 |
{
|
|
2988 |
TCustomerServiceProfileIdRequest* req =
|
|
2989 |
iCustomerServiceProfileRequests[ i ];
|
|
2990 |
|
|
2991 |
//set value in client side
|
|
2992 |
*(req->iRetCspFile) = aCspFile;
|
|
2993 |
//reset the return pointer
|
|
2994 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetCustomerServiceProfile queue handling" );
|
|
2995 |
ReqCompleted( req->iReqHandle, aErrorCode );
|
|
2996 |
}
|
|
2997 |
// Complete the client request
|
|
2998 |
//Destroy Array
|
|
2999 |
iCustomerServiceProfileRequests.ResetAndDestroy();
|
|
3000 |
}
|
|
3001 |
}
|
|
3002 |
|
|
3003 |
//
|
|
3004 |
// ---------------------------------------------------------------------------
|
|
3005 |
// CMmPhoneTsy::GetCustomerServiceProfileCancel
|
|
3006 |
// Cancels an outstanding GetCustomerServiceProfile request.
|
|
3007 |
// (other items were commented in a header).
|
|
3008 |
// ---------------------------------------------------------------------------
|
|
3009 |
//
|
|
3010 |
TInt CMmPhoneTsy::GetCustomerServiceProfileCancel( const TTsyReqHandle aTsyReqHandle )
|
|
3011 |
{
|
|
3012 |
TFLOGSTRING2("TSY: CMmPhoneTsy::GetCustomerServiceProfileCancel aTsyReqHandle: %d", aTsyReqHandle);
|
|
3013 |
|
|
3014 |
TInt customerServiceProfileRequestsCount = iCustomerServiceProfileRequests.Count();
|
|
3015 |
|
|
3016 |
//reset the req handle if only one req remains
|
|
3017 |
if( 1 == customerServiceProfileRequestsCount )
|
|
3018 |
{
|
|
3019 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetCustomerServiceProfileCancel - one req");
|
|
3020 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3021 |
EMultimodePhoneGetCustomerServiceProfile );
|
|
3022 |
}
|
|
3023 |
|
|
3024 |
// go through array if one or more requests remain and find the correct request handle to cancel
|
|
3025 |
for ( TInt i=0; i < customerServiceProfileRequestsCount ; i++ )
|
|
3026 |
{
|
|
3027 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetCustomerServiceProfileCancel - queued requests");
|
|
3028 |
|
|
3029 |
TCustomerServiceProfileIdRequest* req =
|
|
3030 |
iCustomerServiceProfileRequests[ i ];
|
|
3031 |
|
|
3032 |
// find correct handle for cancelling
|
|
3033 |
if( aTsyReqHandle == req->iReqHandle )
|
|
3034 |
{
|
|
3035 |
ReqCompleted( req->iReqHandle, KErrCancel );
|
|
3036 |
// remove correct handle from queue
|
|
3037 |
delete iCustomerServiceProfileRequests[ i ];
|
|
3038 |
iCustomerServiceProfileRequests.Remove(i);
|
|
3039 |
break;
|
|
3040 |
}
|
|
3041 |
}
|
|
3042 |
|
|
3043 |
return KErrNone;
|
|
3044 |
}
|
|
3045 |
|
|
3046 |
// ---------------------------------------------------------------------------
|
|
3047 |
// CMmPhoneTsy::GetBatteryCaps
|
|
3048 |
// Returns the battery information capabilities of the phone
|
|
3049 |
// (other items were commented in a header).
|
|
3050 |
// ---------------------------------------------------------------------------
|
|
3051 |
//
|
|
3052 |
TInt CMmPhoneTsy::GetBatteryCaps(
|
|
3053 |
const TTsyReqHandle aTsyReqHandle,
|
|
3054 |
TUint32* aCaps )
|
|
3055 |
{
|
|
3056 |
//Get battery capability information
|
|
3057 |
*aCaps = KBatteryCaps;
|
|
3058 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
3059 |
|
|
3060 |
return KErrNone;
|
|
3061 |
}
|
|
3062 |
|
|
3063 |
// ---------------------------------------------------------------------------
|
|
3064 |
// CMmPhoneTsy::GetBatteryInfo
|
|
3065 |
// Returns current battery information of the phone. If the current power
|
|
3066 |
// status is unknown, it is requested from DOS.
|
|
3067 |
// (other items were commented in a header).
|
|
3068 |
// ---------------------------------------------------------------------------
|
|
3069 |
//
|
|
3070 |
TInt CMmPhoneTsy::GetBatteryInfoL(
|
|
3071 |
const TTsyReqHandle aTsyReqHandle,
|
|
3072 |
RMobilePhone::TMobilePhoneBatteryInfoV1* aInfo )
|
|
3073 |
{
|
|
3074 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetBatteryInfoL");
|
|
3075 |
|
|
3076 |
// Battery info is requested when phone is booted up and updated when
|
|
3077 |
// EM server sends indications.
|
|
3078 |
*aInfo = iBatteryInfo;
|
|
3079 |
|
|
3080 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
3081 |
|
|
3082 |
return KErrNone;
|
|
3083 |
}
|
|
3084 |
|
|
3085 |
// ---------------------------------------------------------------------------
|
|
3086 |
// CMmPhoneTsy::NotifyBatteryInfoChange
|
|
3087 |
// Notifies the client when the battery info changes.
|
|
3088 |
// (other items were commented in a header).
|
|
3089 |
// ---------------------------------------------------------------------------
|
|
3090 |
//
|
|
3091 |
TInt CMmPhoneTsy::NotifyBatteryInfoChange(
|
|
3092 |
RMobilePhone::TMobilePhoneBatteryInfoV1* aInfo )
|
|
3093 |
{
|
|
3094 |
TFLOGSTRING("TSY: CMmPhoneTsy::NotifyBatteryInfoChange");
|
|
3095 |
|
|
3096 |
iRetBatteryInfo = aInfo;
|
|
3097 |
iReqHandleType = EMultimodePhoneNotifyBatteryInfoChange;
|
|
3098 |
return KErrNone;
|
|
3099 |
}
|
|
3100 |
|
|
3101 |
// ---------------------------------------------------------------------------
|
|
3102 |
// CMmPhoneTsy::CompleteNotifyBatteryInfoChange
|
|
3103 |
// This method completes an outstanding asynchronous NotifyALSLineChange
|
|
3104 |
// request.
|
|
3105 |
// (other items were commented in a header).
|
|
3106 |
// ---------------------------------------------------------------------------
|
|
3107 |
//
|
|
3108 |
void CMmPhoneTsy::CompleteNotifyBatteryInfoChange(
|
|
3109 |
CMmDataPackage* aDataPackage,
|
|
3110 |
TInt aErrorCode )
|
|
3111 |
{
|
|
3112 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteNotifyBatteryInfoChange");
|
|
3113 |
|
|
3114 |
if ( KErrNone == aErrorCode )
|
|
3115 |
{
|
|
3116 |
// unpack data...
|
|
3117 |
RMobilePhone::TMobilePhoneBatteryInfoV1* batteryInfo = NULL;
|
|
3118 |
aDataPackage->UnPackData(&batteryInfo);
|
|
3119 |
iBatteryInfo = *batteryInfo;
|
|
3120 |
}
|
|
3121 |
|
|
3122 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteNotifyBatteryInfoChange, battery status: %d", (TInt)iBatteryInfo.iStatus);
|
|
3123 |
|
|
3124 |
//reset req handle. Returns the deleted req handle
|
|
3125 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3126 |
EMultimodePhoneNotifyBatteryInfoChange );
|
|
3127 |
|
|
3128 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
3129 |
{
|
|
3130 |
if ( KErrNone == aErrorCode )
|
|
3131 |
{
|
|
3132 |
*iRetBatteryInfo = iBatteryInfo;
|
|
3133 |
}
|
|
3134 |
iRetBatteryInfo = NULL;
|
|
3135 |
// complete the client request
|
|
3136 |
ReqCompleted( reqHandle, aErrorCode );
|
|
3137 |
}
|
|
3138 |
}
|
|
3139 |
|
|
3140 |
// ---------------------------------------------------------------------------
|
|
3141 |
// CMmPhoneTsy::NotifyBatteryInfoChange
|
|
3142 |
// Cancels an outstanding NotifyBatteryInfoChange request.
|
|
3143 |
// (other items were commented in a header).
|
|
3144 |
// ---------------------------------------------------------------------------
|
|
3145 |
//
|
|
3146 |
TInt CMmPhoneTsy::NotifyBatteryInfoChangeCancel(
|
|
3147 |
const TTsyReqHandle aTsyReqHandle )
|
|
3148 |
{
|
|
3149 |
TFLOGSTRING("TSY: CMmPhoneTsy::NotifyBatteryInfoChangeCancel");
|
|
3150 |
|
|
3151 |
iRetBatteryInfo = NULL;
|
|
3152 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3153 |
EMultimodePhoneNotifyBatteryInfoChange );
|
|
3154 |
|
|
3155 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
3156 |
|
|
3157 |
return KErrNone;
|
|
3158 |
}
|
|
3159 |
|
|
3160 |
// ---------------------------------------------------------------------------
|
|
3161 |
// CMmPhoneTsy::NotifyBatteryInfo
|
|
3162 |
// This method allows a client to be notified if battery info is changed
|
|
3163 |
// (other items were commented in a header).
|
|
3164 |
// ---------------------------------------------------------------------------
|
|
3165 |
//
|
|
3166 |
void CMmPhoneTsy::NotifyBatteryInfo( TInt aErrorCode,
|
|
3167 |
CHWRMPower::TBatteryConsumptionData aBatteryData )
|
|
3168 |
{
|
|
3169 |
if ( iBatteryInfo.iChargeLevel != aBatteryData.iRemainingPercentageCapacity )
|
|
3170 |
{
|
|
3171 |
iBatteryInfo.iChargeLevel = aBatteryData.iRemainingPercentageCapacity;
|
|
3172 |
|
|
3173 |
// reset req handle. Returns the deleted req handle
|
|
3174 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3175 |
EMultimodePhoneNotifyBatteryInfoChange );
|
|
3176 |
|
|
3177 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
3178 |
{
|
|
3179 |
if ( KErrNone == aErrorCode )
|
|
3180 |
{
|
|
3181 |
*iRetBatteryInfo = iBatteryInfo;
|
|
3182 |
}
|
|
3183 |
iRetBatteryInfo = NULL;
|
|
3184 |
// complete the client request
|
|
3185 |
ReqCompleted( reqHandle, aErrorCode );
|
|
3186 |
}
|
|
3187 |
}
|
|
3188 |
}
|
|
3189 |
|
|
3190 |
// ---------------------------------------------------------------------------
|
|
3191 |
// CMmPhoneTsy::NotifyChargingStatus
|
|
3192 |
// This method allows a client to be notified if battery charging status is
|
|
3193 |
// changed
|
|
3194 |
// (other items were commented in a header).
|
|
3195 |
// ---------------------------------------------------------------------------
|
|
3196 |
//
|
|
3197 |
void CMmPhoneTsy::NotifyChargingStatus( TInt aErrorCode,
|
|
3198 |
RMobilePhone::TMobilePhoneBatteryInfoV1 aBatteryInfo )
|
|
3199 |
{
|
|
3200 |
if ( iBatteryInfo.iStatus != aBatteryInfo.iStatus )
|
|
3201 |
{
|
|
3202 |
iBatteryInfo.iStatus = aBatteryInfo.iStatus;
|
|
3203 |
// reset req handle. Returns the deleted req handle
|
|
3204 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3205 |
EMultimodePhoneNotifyBatteryInfoChange );
|
|
3206 |
|
|
3207 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
3208 |
{
|
|
3209 |
if ( KErrNone == aErrorCode )
|
|
3210 |
{
|
|
3211 |
*iRetBatteryInfo = iBatteryInfo;
|
|
3212 |
}
|
|
3213 |
iRetBatteryInfo = NULL;
|
|
3214 |
// complete the client request
|
|
3215 |
ReqCompleted( reqHandle, aErrorCode );
|
|
3216 |
}
|
|
3217 |
}
|
|
3218 |
}
|
|
3219 |
|
|
3220 |
// ---------------------------------------------------------------------------
|
|
3221 |
// CMmPhoneTsy::GetServiceProviderNameL
|
|
3222 |
// Get service provider name
|
|
3223 |
// (other items were commented in a header).
|
|
3224 |
// ---------------------------------------------------------------------------
|
|
3225 |
//
|
|
3226 |
TInt CMmPhoneTsy::GetServiceProviderNameL(
|
|
3227 |
const TTsyReqHandle aTsyReqHandle,
|
|
3228 |
TDes8* aName )
|
|
3229 |
{
|
|
3230 |
TInt ret = KErrNone;
|
|
3231 |
|
|
3232 |
if ( iBootState.iSIMReady )
|
|
3233 |
{
|
|
3234 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetServiceProviderNameL -Sim ready");
|
|
3235 |
|
|
3236 |
if ( sizeof( RMobilePhone::TMobilePhoneServiceProviderNameV2 ) >
|
|
3237 |
aName->MaxLength() )
|
|
3238 |
{
|
|
3239 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetServiceProviderNameL -Invalid parameter!");
|
|
3240 |
ret = KErrArgument;
|
|
3241 |
}
|
|
3242 |
else
|
|
3243 |
{
|
|
3244 |
//Send a request to LTSY if request handle does not exist.
|
|
3245 |
TTsyReqHandle reqhandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
3246 |
EMultimodePhoneGetServiceProviderName );
|
|
3247 |
|
|
3248 |
if( EMultimodePhoneReqHandleUnknown == reqhandle )
|
|
3249 |
{
|
|
3250 |
ret = iMmPhoneExtInterface->GetServiceProviderNameL();
|
|
3251 |
}
|
|
3252 |
}
|
|
3253 |
|
|
3254 |
if ( KErrNone == ret )
|
|
3255 |
{
|
|
3256 |
// save reqhandle to queue
|
|
3257 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetServiceProviderNameL - Client to queue");
|
|
3258 |
RMobilePhone::TMobilePhoneServiceProviderNameV2Pckg* nameV2Pckg =
|
|
3259 |
REINTERPRET_CAST(
|
|
3260 |
RMobilePhone::TMobilePhoneServiceProviderNameV2Pckg*,
|
|
3261 |
aName );
|
|
3262 |
|
|
3263 |
RMobilePhone::TMobilePhoneServiceProviderNameV2*
|
|
3264 |
serviceProviderName = &( ( *nameV2Pckg ) () );
|
|
3265 |
|
|
3266 |
//Save request handle in queue
|
|
3267 |
TServiceProviderNameRequest* req =
|
|
3268 |
new (ELeave) TServiceProviderNameRequest();
|
|
3269 |
req->iReqHandle = aTsyReqHandle;
|
|
3270 |
req->iServiceProviderName = serviceProviderName;
|
|
3271 |
iServiceProviderNameRequests.AppendL( req );
|
|
3272 |
//Save tsy req handle type
|
|
3273 |
iReqHandleType = EMultimodePhoneGetServiceProviderName;
|
|
3274 |
}
|
|
3275 |
}
|
|
3276 |
else
|
|
3277 |
{
|
|
3278 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetServiceProviderNameL - Sim not ready");
|
|
3279 |
ret = KErrNotReady;
|
|
3280 |
}
|
|
3281 |
|
|
3282 |
return ret;
|
|
3283 |
}
|
|
3284 |
|
|
3285 |
// ---------------------------------------------------------------------------
|
|
3286 |
// CMmPhoneTsy::CompleteGetServiceProviderName
|
|
3287 |
// This method completes an outstanding asynchronous
|
|
3288 |
// GetServiceProviderName request
|
|
3289 |
// (other items were commented in a header).
|
|
3290 |
// ---------------------------------------------------------------------------
|
|
3291 |
//
|
|
3292 |
void CMmPhoneTsy::CompleteGetServiceProviderName(
|
|
3293 |
CMmDataPackage* aDataPackage,
|
|
3294 |
TInt aErrorCode )
|
|
3295 |
{
|
|
3296 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteGetServiceProviderName Error %d", aErrorCode );
|
|
3297 |
|
|
3298 |
// reset req handle. Returns the deleted req handle
|
|
3299 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3300 |
EMultimodePhoneGetServiceProviderName );
|
|
3301 |
|
|
3302 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
3303 |
{
|
|
3304 |
RMobilePhone::TMobilePhoneServiceProviderNameV2* name = NULL;
|
|
3305 |
TInt requestCount = iServiceProviderNameRequests.Count();
|
|
3306 |
|
|
3307 |
if ( KErrNone == aErrorCode )
|
|
3308 |
{
|
|
3309 |
aDataPackage->UnPackData( &name );
|
|
3310 |
|
|
3311 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteGetServiceProviderName name: %S", &name->iSPName );
|
|
3312 |
for ( TInt i=0; i < requestCount ; i++ )
|
|
3313 |
{
|
|
3314 |
TServiceProviderNameRequest* req =
|
|
3315 |
iServiceProviderNameRequests[ i ];
|
|
3316 |
*(req->iServiceProviderName) = *name;
|
|
3317 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteGetServiceProviderName client %d", i );
|
|
3318 |
ReqCompleted( req->iReqHandle, aErrorCode );
|
|
3319 |
}
|
|
3320 |
}
|
|
3321 |
else
|
|
3322 |
{
|
|
3323 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteGetServiceProviderName Error %d", aErrorCode );
|
|
3324 |
for ( TInt i=0; i < requestCount ; i++ )
|
|
3325 |
{
|
|
3326 |
TServiceProviderNameRequest* req =
|
|
3327 |
iServiceProviderNameRequests[ i ];
|
|
3328 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteGetServiceProviderName Error queue: %d", i );
|
|
3329 |
ReqCompleted( req->iReqHandle, aErrorCode );
|
|
3330 |
}
|
|
3331 |
}
|
|
3332 |
//Delete array and it's content
|
|
3333 |
iServiceProviderNameRequests.ResetAndDestroy();
|
|
3334 |
|
|
3335 |
}
|
|
3336 |
}
|
|
3337 |
|
|
3338 |
//
|
|
3339 |
// ---------------------------------------------------------------------------
|
|
3340 |
// CMmPhoneTsy::GetServiceProviderNameCancel
|
|
3341 |
// Cancels an outstanding GetServiceProviderName request.
|
|
3342 |
// (other items were commented in a header).
|
|
3343 |
// ---------------------------------------------------------------------------
|
|
3344 |
//
|
|
3345 |
TInt CMmPhoneTsy::GetServiceProviderNameCancel( const TTsyReqHandle aTsyReqHandle )
|
|
3346 |
{
|
|
3347 |
TFLOGSTRING2("TSY: CMmPhoneTsy::GetServiceProviderNameCancel aTsyReqHandle: %d", aTsyReqHandle);
|
|
3348 |
|
|
3349 |
TInt requestCount = iServiceProviderNameRequests.Count();
|
|
3350 |
|
|
3351 |
//reset the req handle if only one req remains
|
|
3352 |
if( 1 == requestCount )
|
|
3353 |
{
|
|
3354 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetCustomerServiceProfileCancel - one req");
|
|
3355 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3356 |
EMultimodePhoneGetServiceProviderName );
|
|
3357 |
}
|
|
3358 |
|
|
3359 |
// qo throw array if several requests and find correct reqhandle to cancel
|
|
3360 |
for ( TInt i = 0; i < requestCount; i++ )
|
|
3361 |
{
|
|
3362 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetServiceProviderNameCancel - queued requests");
|
|
3363 |
|
|
3364 |
TServiceProviderNameRequest* req =
|
|
3365 |
iServiceProviderNameRequests[i];
|
|
3366 |
|
|
3367 |
// find correct handle for cancelling
|
|
3368 |
if( aTsyReqHandle == req->iReqHandle )
|
|
3369 |
{
|
|
3370 |
ReqCompleted( req->iReqHandle, KErrCancel );
|
|
3371 |
// remove correct handle from queue
|
|
3372 |
delete iServiceProviderNameRequests[ i ];
|
|
3373 |
iServiceProviderNameRequests.Remove(i);
|
|
3374 |
break;
|
|
3375 |
}
|
|
3376 |
}
|
|
3377 |
return KErrNone;
|
|
3378 |
}
|
|
3379 |
|
|
3380 |
// ---------------------------------------------------------------------------
|
|
3381 |
// CMmPhoneTsy::GetIdentityCaps
|
|
3382 |
// Gets the identity information capabilities of the phone.
|
|
3383 |
// (other items were commented in a header).
|
|
3384 |
// ---------------------------------------------------------------------------
|
|
3385 |
//
|
|
3386 |
TInt CMmPhoneTsy::GetIdentityCaps(
|
|
3387 |
const TTsyReqHandle aTsyReqHandle,
|
|
3388 |
TUint32* aCaps )
|
|
3389 |
{
|
|
3390 |
*aCaps = KIdentityCaps;
|
|
3391 |
|
|
3392 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
3393 |
|
|
3394 |
return KErrNone;
|
|
3395 |
}
|
|
3396 |
|
|
3397 |
// ---------------------------------------------------------------------------
|
|
3398 |
// CMmPhoneTsy::GetPhoneIdL
|
|
3399 |
// Gets the phone's manufacturer, model, revision and serialNumber. The serial
|
|
3400 |
// number is requested from DOS if currently unknown.
|
|
3401 |
// (other items were commented in a header).
|
|
3402 |
// ---------------------------------------------------------------------------
|
|
3403 |
//
|
|
3404 |
TInt CMmPhoneTsy::GetPhoneIdL(
|
|
3405 |
const TTsyReqHandle aTsyReqHandle,
|
|
3406 |
RMobilePhone::TMobilePhoneIdentityV1* aId )
|
|
3407 |
{
|
|
3408 |
|
|
3409 |
// This is a get request. First check if another request is going through
|
|
3410 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(EMultimodePhoneGetPhoneId);
|
|
3411 |
|
|
3412 |
// if this is not the first request for Phone id information then add it to the
|
|
3413 |
// list of waiting
|
|
3414 |
if(reqHandle > 0)
|
|
3415 |
{
|
|
3416 |
TGetPhoneIdRequest* req = new (ELeave) TGetPhoneIdRequest();
|
|
3417 |
req->iReqHandle = aTsyReqHandle;
|
|
3418 |
req->iRetPhoneId = aId;
|
|
3419 |
CleanupStack::PushL(req);
|
|
3420 |
iGetPhoneIdRequests.AppendL( req );
|
|
3421 |
CleanupStack::Pop(req);
|
|
3422 |
}
|
|
3423 |
else
|
|
3424 |
{
|
|
3425 |
DoGetPhoneIdL(aTsyReqHandle, aId);
|
|
3426 |
}
|
|
3427 |
|
|
3428 |
return KErrNone;
|
|
3429 |
}
|
|
3430 |
|
|
3431 |
// ---------------------------------------------------------------------------
|
|
3432 |
// CMmPhoneTsy::DoGetPhoneId
|
|
3433 |
// Gets the iPhoneIdentitys iSerialNumber and completes GetPhoneId.
|
|
3434 |
// (other items were commented in a header).
|
|
3435 |
// ---------------------------------------------------------------------------
|
|
3436 |
//
|
|
3437 |
void CMmPhoneTsy::DoGetPhoneIdL(const TTsyReqHandle aTsyReqHandle,
|
|
3438 |
RMobilePhone::TMobilePhoneIdentityV1* aId)
|
|
3439 |
{
|
|
3440 |
#ifndef USING_CTSY_DISPATCHER
|
|
3441 |
//ifdefed out as when using the dispatcher all the information is retrieved from the LTSY
|
|
3442 |
#ifdef SYMBIAN_BAFL_SYSUTIL
|
|
3443 |
|
|
3444 |
CDeviceTypeInformation* deviceAtts = SysUtil::GetDeviceTypeInfoL();
|
|
3445 |
CleanupStack::PushL(deviceAtts);
|
|
3446 |
|
|
3447 |
// For manufacturerName, modelName and revisionId we check if there is data
|
|
3448 |
// available in the result given from SysUtil::GetDeviceTypeInfoL. Where data
|
|
3449 |
// is present the default value from initalization is overwritten.
|
|
3450 |
// The retrieved buffers can be 64 characters long but we
|
|
3451 |
// have only got space in iPhoneIdentity for 50 due to the design of
|
|
3452 |
// TMobilePhoneIdentityV1. Therfore we truncate if the buffer is to big to fit.
|
|
3453 |
|
|
3454 |
TPtrC16 manufacturerName;
|
|
3455 |
if(User::LeaveIfError(deviceAtts->GetManufacturerName(manufacturerName)) == KErrNone)
|
|
3456 |
{
|
|
3457 |
if(manufacturerName.Length() != 0)
|
|
3458 |
{
|
|
3459 |
iPhoneIdentity.iManufacturer.Copy(manufacturerName.Left(RMobilePhone::KPhoneManufacturerIdSize));
|
|
3460 |
}
|
|
3461 |
}
|
|
3462 |
|
|
3463 |
TPtrC16 modelName;
|
|
3464 |
if(User::LeaveIfError(deviceAtts->GetModelName(modelName)) == KErrNone)
|
|
3465 |
{
|
|
3466 |
if(modelName.Length() != 0)
|
|
3467 |
{
|
|
3468 |
iPhoneIdentity.iModel.Copy(modelName.Left(RMobilePhone::KPhoneModelIdSize));
|
|
3469 |
}
|
|
3470 |
}
|
|
3471 |
|
|
3472 |
TPtrC16 revisionId;
|
|
3473 |
if(User::LeaveIfError(deviceAtts->GetRevisionID(revisionId)) == KErrNone)
|
|
3474 |
{
|
|
3475 |
if(revisionId.Length() != 0)
|
|
3476 |
{
|
|
3477 |
iPhoneIdentity.iRevision.Copy(revisionId.Left(RMobilePhone::KPhoneRevisionIdSize));
|
|
3478 |
}
|
|
3479 |
}
|
|
3480 |
|
|
3481 |
// delete deviceAtts as its no longer required
|
|
3482 |
CleanupStack::PopAndDestroy();
|
|
3483 |
#endif
|
|
3484 |
#endif //USING_CTSY_DISPATCHER
|
|
3485 |
|
|
3486 |
if (0 == iPhoneIdentity.iSerialNumber.Length())
|
|
3487 |
{
|
|
3488 |
TInt ret = iMessageManager->HandleRequestL(EMobilePhoneGetPhoneId);
|
|
3489 |
|
|
3490 |
if(KErrNone == ret)
|
|
3491 |
{
|
|
3492 |
// DOS call successful, save request handle and return pointer
|
|
3493 |
// for completion
|
|
3494 |
iRetPhoneIdentity = aId;
|
|
3495 |
iReqHandleType = EMultimodePhoneGetPhoneId;
|
|
3496 |
|
|
3497 |
// save request handle in queue
|
|
3498 |
TGetPhoneIdRequest* req = new (ELeave) TGetPhoneIdRequest();
|
|
3499 |
req->iReqHandle = aTsyReqHandle;
|
|
3500 |
req->iRetPhoneId = aId;
|
|
3501 |
iGetPhoneIdRequests.AppendL( req );
|
|
3502 |
}
|
|
3503 |
else
|
|
3504 |
{
|
|
3505 |
// DOS call failed, immediately complete with error
|
|
3506 |
ReqCompleted( aTsyReqHandle, ret );
|
|
3507 |
}
|
|
3508 |
}
|
|
3509 |
else
|
|
3510 |
{
|
|
3511 |
TFLOGSTRING3("TSY: CMmPhoneTsy::GetPhoneIdL - iManufacturer: %S, iModel: %S", &iPhoneIdentity.iManufacturer,
|
|
3512 |
&iPhoneIdentity.iModel );
|
|
3513 |
TFLOGSTRING3("TSY: CMmPhoneTsy::GetPhoneIdL - iRevision: %S, iSerialNumber: %S", &iPhoneIdentity.iRevision,
|
|
3514 |
&iPhoneIdentity.iSerialNumber);
|
|
3515 |
|
|
3516 |
*aId = iPhoneIdentity;
|
|
3517 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
3518 |
}
|
|
3519 |
}
|
|
3520 |
|
|
3521 |
// ---------------------------------------------------------------------------
|
|
3522 |
// CMmPhoneTsy::CompleteGetPhoneId
|
|
3523 |
// Sets iPhoneIdentitys iSerialNumber and completes GetPhoneId.
|
|
3524 |
// (other items were commented in a header).
|
|
3525 |
// ---------------------------------------------------------------------------
|
|
3526 |
//
|
|
3527 |
void CMmPhoneTsy::CompleteGetPhoneId(
|
|
3528 |
TBuf8<KSerialNumberLength> aSerialData,
|
|
3529 |
TInt aError )
|
|
3530 |
{
|
|
3531 |
if ( ( KErrNone == aError ) && ( 0 < aSerialData.Length() ) )
|
|
3532 |
{
|
|
3533 |
// Copy serial number
|
|
3534 |
iPhoneIdentity.iSerialNumber.Copy(aSerialData.Left( aSerialData.Length() ) );
|
|
3535 |
|
|
3536 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompletePhoneSerialNumber - iSerialNumber: %S", &iPhoneIdentity.iSerialNumber );
|
|
3537 |
}
|
|
3538 |
|
|
3539 |
//reset req handle. Returns the deleted req handle
|
|
3540 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(EMultimodePhoneGetPhoneId );
|
|
3541 |
|
|
3542 |
TInt getPhoneIdRequestsCount = iGetPhoneIdRequests.Count();
|
|
3543 |
|
|
3544 |
for ( TInt i=0; i < getPhoneIdRequestsCount ; i++ )
|
|
3545 |
{
|
|
3546 |
TGetPhoneIdRequest* req = iGetPhoneIdRequests[i];
|
|
3547 |
|
|
3548 |
*(req->iRetPhoneId) = iPhoneIdentity;
|
|
3549 |
ReqCompleted(req->iReqHandle, aError);
|
|
3550 |
}
|
|
3551 |
iGetPhoneIdRequests.ResetAndDestroy();
|
|
3552 |
}
|
|
3553 |
|
|
3554 |
// ---------------------------------------------------------------------------
|
|
3555 |
// CMmPhoneTsy::MobilePhoneGetPhoneIdCancel
|
|
3556 |
// Cancels get phone id request
|
|
3557 |
// (other items were commented in a header).
|
|
3558 |
// ---------------------------------------------------------------------------
|
|
3559 |
//
|
|
3560 |
TInt CMmPhoneTsy::MobilePhoneGetPhoneIdCancel(const TTsyReqHandle aTsyReqHandle )
|
|
3561 |
{
|
|
3562 |
TFLOGSTRING("TSY: CMmPhoneTsy::MobilePhoneGetPhoneIdCancel");
|
|
3563 |
|
|
3564 |
TInt reqCount = iGetPhoneIdRequests.Count();
|
|
3565 |
|
|
3566 |
// 1 means that last ongoing request is going to be cancelled.
|
|
3567 |
if ( reqCount == 1 )
|
|
3568 |
{
|
|
3569 |
//Request handle storage is used in this case like a semaphore. When the
|
|
3570 |
//request handle is stored in iTsyReqHandleStore then CTSY knows that
|
|
3571 |
//there is at least one ongoing GetPhoneId request. Code must remove
|
|
3572 |
//GetPhoneId request handle from storage when the last ongoing request
|
|
3573 |
//is cancelled.
|
|
3574 |
iTsyReqHandleStore->ResetTsyReqHandle(EMultimodePhoneGetPhoneId);
|
|
3575 |
}
|
|
3576 |
|
|
3577 |
for ( TInt i = 0; i < reqCount; i++ )
|
|
3578 |
{
|
|
3579 |
if (aTsyReqHandle == iGetPhoneIdRequests[i]->iReqHandle)
|
|
3580 |
{
|
|
3581 |
// remove the request from the queue and destroy it.
|
|
3582 |
TGetPhoneIdRequest* req = iGetPhoneIdRequests[i];
|
|
3583 |
iGetPhoneIdRequests.Remove( i );
|
|
3584 |
delete req;
|
|
3585 |
|
|
3586 |
// cancel the request
|
|
3587 |
ReqCompleted(aTsyReqHandle, KErrCancel);
|
|
3588 |
|
|
3589 |
// end the FOR-loop, there can be only one identical reqhandle
|
|
3590 |
// so there is no reason why the array-loop should continue
|
|
3591 |
break;
|
|
3592 |
}
|
|
3593 |
}
|
|
3594 |
return KErrNone;
|
|
3595 |
}
|
|
3596 |
|
|
3597 |
|
|
3598 |
// ---------------------------------------------------------------------------
|
|
3599 |
// CMmPhoneTsy::GetSubscriberIdL
|
|
3600 |
// Gets the subscriber's identity as described by its IMSI.
|
|
3601 |
// (other items were commented in a header).
|
|
3602 |
// ---------------------------------------------------------------------------
|
|
3603 |
//
|
|
3604 |
TInt CMmPhoneTsy::GetSubscriberIdL(
|
|
3605 |
const TTsyReqHandle aTsyReqHandle,
|
|
3606 |
RMobilePhone::TMobilePhoneSubscriberId* aId )
|
|
3607 |
{
|
|
3608 |
if ( 0 == iSubscriberId.Length() )
|
|
3609 |
{
|
|
3610 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(EMultimodePhoneGetSubscriberId );
|
|
3611 |
if ( reqHandle == EMultimodePhoneReqHandleUnknown )
|
|
3612 |
{
|
|
3613 |
// IMSI has to be asynchronously requested from DOS.
|
|
3614 |
// (no packed parameters)
|
|
3615 |
TInt ret = iMessageManager->HandleRequestL( EMobilePhoneGetSubscriberId );
|
|
3616 |
|
|
3617 |
if ( KErrNone == ret )
|
|
3618 |
{
|
|
3619 |
// DOS call successful, save request handle and return pointer
|
|
3620 |
// for completion
|
|
3621 |
iReqHandleType = EMultimodePhoneGetSubscriberId;
|
|
3622 |
// save request handle in queue
|
|
3623 |
TSubscriberIdRequest* req = new (ELeave) TSubscriberIdRequest();
|
|
3624 |
req->iReqHandle = aTsyReqHandle;
|
|
3625 |
req->iRetSubscrId = aId;
|
|
3626 |
iSubscriberIdRequests.AppendL( req );
|
|
3627 |
}
|
|
3628 |
else
|
|
3629 |
{
|
|
3630 |
// DOS call failed, immediately complete with error
|
|
3631 |
ReqCompleted( aTsyReqHandle, ret );
|
|
3632 |
}
|
|
3633 |
}
|
|
3634 |
else
|
|
3635 |
{
|
|
3636 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetSubscriberIdL - queued requests add req to queue");
|
|
3637 |
TSubscriberIdRequest* req = new (ELeave) TSubscriberIdRequest();
|
|
3638 |
req->iReqHandle = aTsyReqHandle;
|
|
3639 |
req->iRetSubscrId = aId;
|
|
3640 |
iSubscriberIdRequests.AppendL( req );
|
|
3641 |
}
|
|
3642 |
}
|
|
3643 |
else
|
|
3644 |
{
|
|
3645 |
// Complete with current IMSI
|
|
3646 |
*aId = iSubscriberId;
|
|
3647 |
ReqCompleted( aTsyReqHandle, KErrNone );
|
|
3648 |
}
|
|
3649 |
|
|
3650 |
return KErrNone;
|
|
3651 |
}
|
|
3652 |
|
|
3653 |
// ---------------------------------------------------------------------------
|
|
3654 |
// CMmPhoneTsy::GetIndicatorCaps
|
|
3655 |
// Returns the supported indicator capabilities
|
|
3656 |
// (other items were commented in a header).
|
|
3657 |
// ---------------------------------------------------------------------------
|
|
3658 |
//
|
|
3659 |
TInt CMmPhoneTsy::GetIndicatorCaps(
|
|
3660 |
const TTsyReqHandle aTsyReqHandle,
|
|
3661 |
TUint32* aActCaps,
|
|
3662 |
TUint32* aIndCaps )
|
|
3663 |
{
|
|
3664 |
TInt ret( KErrGeneral );
|
|
3665 |
|
|
3666 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetIndicatorCaps" );
|
|
3667 |
if( NULL != aActCaps && NULL != aIndCaps )
|
|
3668 |
{
|
|
3669 |
*aActCaps = RMobilePhone::KCapsGetIndicator |
|
|
3670 |
RMobilePhone::KCapsNotifyIndicatorChange;
|
|
3671 |
*aIndCaps = RMobilePhone::KIndChargerConnected |
|
|
3672 |
RMobilePhone::KIndNetworkAvailable |
|
|
3673 |
RMobilePhone::KIndCallInProgress;
|
|
3674 |
ret = KErrNone;
|
|
3675 |
}
|
|
3676 |
|
|
3677 |
ReqCompleted( aTsyReqHandle, ret );
|
|
3678 |
|
|
3679 |
return ret;
|
|
3680 |
}
|
|
3681 |
|
|
3682 |
// ---------------------------------------------------------------------------
|
|
3683 |
// CMmPhoneTsy::GetIndicators
|
|
3684 |
// Returns the phone indicators information to the client
|
|
3685 |
// (other items were commented in a header).
|
|
3686 |
// ---------------------------------------------------------------------------
|
|
3687 |
//
|
|
3688 |
TInt CMmPhoneTsy::GetIndicators(
|
|
3689 |
const TTsyReqHandle aTsyReqHandle,
|
|
3690 |
TUint32* aIndicators )
|
|
3691 |
{
|
|
3692 |
TFLOGSTRING( "TSY: CMmPhoneTsy::GetIndicators" );
|
|
3693 |
TInt ret( KErrGeneral );
|
|
3694 |
|
|
3695 |
if( aIndicators )
|
|
3696 |
{
|
|
3697 |
*aIndicators = GetIndicatorState();
|
|
3698 |
ret = KErrNone;
|
|
3699 |
}
|
|
3700 |
|
|
3701 |
ReqCompleted( aTsyReqHandle, ret );
|
|
3702 |
|
|
3703 |
return ret;
|
|
3704 |
}
|
|
3705 |
|
|
3706 |
// ---------------------------------------------------------------------------
|
|
3707 |
// CMmPhoneTsy::GetIndicators
|
|
3708 |
// Gets the current indicators state from different components
|
|
3709 |
// (other items were commented in a header).
|
|
3710 |
// ---------------------------------------------------------------------------
|
|
3711 |
//
|
|
3712 |
TUint32 CMmPhoneTsy::GetIndicatorState()
|
|
3713 |
{
|
|
3714 |
TUint32 indicators( 0 );
|
|
3715 |
|
|
3716 |
//Charger connected?
|
|
3717 |
TFLOGSTRING2( "TSY: CMmPhoneTsy::GetIndicatorState charger: %d", (TInt)iBatteryInfo.iStatus );
|
|
3718 |
if( RMobilePhone::EBatteryConnectedButExternallyPowered ==
|
|
3719 |
iBatteryInfo.iStatus )
|
|
3720 |
{
|
|
3721 |
indicators |= RMobilePhone::KIndChargerConnected;
|
|
3722 |
}
|
|
3723 |
|
|
3724 |
//Network available?
|
|
3725 |
if( iMmNetTsy )
|
|
3726 |
{
|
|
3727 |
RMobilePhone::TMobilePhoneRegistrationStatus networkRegStatus =
|
|
3728 |
iMmNetTsy->GetNetworkRegistrationStatus();
|
|
3729 |
if( RMobilePhone::ERegisteredOnHomeNetwork == networkRegStatus ||
|
|
3730 |
RMobilePhone::ERegisteredRoaming == networkRegStatus )
|
|
3731 |
{
|
|
3732 |
indicators |= RMobilePhone::KIndNetworkAvailable;
|
|
3733 |
}
|
|
3734 |
TFLOGSTRING2( "TSY: CMmPhoneTsy::GetIndicatorState network: %d", (TInt)networkRegStatus );
|
|
3735 |
}
|
|
3736 |
|
|
3737 |
//Call in progress?
|
|
3738 |
//-Browses through the call list to find any calls that are currently
|
|
3739 |
//connected
|
|
3740 |
TInt numberOfCallObjects = CallList()->GetNumberOfObjects();
|
|
3741 |
for ( TInt i=0; i<numberOfCallObjects; i++ )
|
|
3742 |
{
|
|
3743 |
CMmCallTsy* mmCall = CallList()->GetMmCallByIndex( i );
|
|
3744 |
if ( RMobileCall::EStatusConnected == mmCall->MobileCallStatus() )
|
|
3745 |
{
|
|
3746 |
TFLOGSTRING3( "TSY: CMmPhoneTsy::GetIndicatorState call id: %d, status: %d", mmCall->CallId(), (TInt)mmCall->MobileCallStatus() );
|
|
3747 |
indicators |= RMobilePhone::KIndCallInProgress;
|
|
3748 |
break;
|
|
3749 |
}
|
|
3750 |
}
|
|
3751 |
TFLOGSTRING2( "TSY: CMmPhoneTsy::GetIndicatorState - ok, Indicators: %d", indicators );
|
|
3752 |
|
|
3753 |
return indicators;
|
|
3754 |
}
|
|
3755 |
|
|
3756 |
// ---------------------------------------------------------------------------
|
|
3757 |
// CMmPhoneTsy::CompleteGetSubscriberIdL
|
|
3758 |
// Completes GetSubscriberId and delivers IMSI to client.
|
|
3759 |
// (other items were commented in a header).
|
|
3760 |
// ---------------------------------------------------------------------------
|
|
3761 |
//
|
|
3762 |
void CMmPhoneTsy::CompleteGetSubscriberIdL(
|
|
3763 |
TBuf8<RMobilePhone::KIMSISize> aImsiData,
|
|
3764 |
TInt aError )
|
|
3765 |
{
|
|
3766 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteGetSubscriberIdL, aError=%d", aError );
|
|
3767 |
|
|
3768 |
// Set the flag to EFalse
|
|
3769 |
iTSYSubscriberIdReq = EFalse;
|
|
3770 |
|
|
3771 |
RMobilePhone::TMobilePhoneSubscriberId subscriberIdTmp;
|
|
3772 |
subscriberIdTmp.Zero();
|
|
3773 |
|
|
3774 |
// Retrieve previous IMSI value from the Central Repository
|
|
3775 |
iCFISPrivateCentRep->Get( KCtsyIMSI, subscriberIdTmp );
|
|
3776 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteGetSubscriberIdL - Get old IMSI from CenRep: %S", &subscriberIdTmp );
|
|
3777 |
|
|
3778 |
if ( ( KErrNone == aError ) && ( 0 < aImsiData.Length() ) )
|
|
3779 |
{
|
|
3780 |
// Copy new IMSI value to the member variable
|
|
3781 |
iSubscriberId.Copy( aImsiData.Left( aImsiData.Length() ) );
|
|
3782 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteGetSubscriberIdL - Copy new IMSI: %S", &iSubscriberId );
|
|
3783 |
}
|
|
3784 |
|
|
3785 |
// check the boot state security, is the security ready (PIN query)
|
|
3786 |
if ( iBootState.iSecReady )
|
|
3787 |
{
|
|
3788 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetSubscriberIdL - Security ready");
|
|
3789 |
|
|
3790 |
// Check has the IMSI changed and is there previous info: or an error
|
|
3791 |
if ( KErrNotFound == subscriberIdTmp.Match( iSubscriberId ) &&
|
|
3792 |
subscriberIdTmp.Length() != 0 ||
|
|
3793 |
KErrNone != aError )
|
|
3794 |
{
|
|
3795 |
// Reset ME ALS info
|
|
3796 |
ResetMEAlsInfo();
|
|
3797 |
//Reset CFIS data from public CR
|
|
3798 |
iCFISCentRep->Reset();
|
|
3799 |
//Reset MWIS data from public CR
|
|
3800 |
iMWISCentRep->Reset();
|
|
3801 |
//Reset private side CR
|
|
3802 |
iCFISPrivateCentRep->Reset();
|
|
3803 |
// Reset MWIS support
|
|
3804 |
iMmSupplServTsy->SetIccSupportForMWIS( ETrue );
|
|
3805 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetSubscriberIdL - Central Repositories have been reseted!");
|
|
3806 |
|
|
3807 |
// intialize the previous SIM related data
|
|
3808 |
if ( iMmCustomTsy )
|
|
3809 |
{
|
|
3810 |
iMmCustomTsy->SetIccCfBootUpFlag( ETrue );
|
|
3811 |
}
|
|
3812 |
iMmSupplServTsy->SetIccMwisBootUpFlag( ETrue );
|
|
3813 |
|
|
3814 |
// get new infromation from lower levels, if sim is ready
|
|
3815 |
if ( iBootState.iSIMReady )
|
|
3816 |
{
|
|
3817 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetSubscriberIdL - SIM ready, retrive intial ICC SIM data.");
|
|
3818 |
|
|
3819 |
// update ALS line information
|
|
3820 |
iMessageManager->HandleRequestL( EMobilePhoneGetALSLine );
|
|
3821 |
// update call forward information
|
|
3822 |
iMessageManager->HandleRequestL(
|
|
3823 |
EMmTsyGetCallForwardingNumberIPC );
|
|
3824 |
// Get Icc call forwarding status
|
|
3825 |
iMessageManager->HandleRequestL(
|
|
3826 |
ECustomGetIccCallForwardingStatusIPC );
|
|
3827 |
// Get message waiting indicators
|
|
3828 |
iMessageManager->HandleRequestL(
|
|
3829 |
EMobilePhoneGetIccMessageWaitingIndicators );
|
|
3830 |
}
|
|
3831 |
}
|
|
3832 |
}
|
|
3833 |
|
|
3834 |
if ( ( KErrNone == aError ) &&
|
|
3835 |
( 0 < aImsiData.Length() ) &&
|
|
3836 |
KErrNotFound == subscriberIdTmp.Match( iSubscriberId ) )
|
|
3837 |
{
|
|
3838 |
// Write new IMSI value to the central repository
|
|
3839 |
iCFISPrivateCentRep->Set( KCtsyIMSI, iSubscriberId );
|
|
3840 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteGetSubscriberIdL - Write new IMSI to the CenRep: %S", &iSubscriberId );
|
|
3841 |
}
|
|
3842 |
|
|
3843 |
//reset req handle. Returns the deleted req handle
|
|
3844 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3845 |
EMultimodePhoneGetSubscriberId );
|
|
3846 |
|
|
3847 |
for ( TInt i=0; i < iSubscriberIdRequests.Count(); i++ )
|
|
3848 |
{
|
|
3849 |
TSubscriberIdRequest* req = iSubscriberIdRequests[ i ];
|
|
3850 |
*(req->iRetSubscrId) = iSubscriberId;
|
|
3851 |
ReqCompleted( req->iReqHandle, aError );
|
|
3852 |
}
|
|
3853 |
|
|
3854 |
iSubscriberIdRequests.ResetAndDestroy();
|
|
3855 |
}
|
|
3856 |
|
|
3857 |
// ---------------------------------------------------------------------------
|
|
3858 |
// CMmPhoneTsy::GetSubscriberIdCancel
|
|
3859 |
// Cancels an outstanding GetSubscriberId request.
|
|
3860 |
// (other items were commented in a header).
|
|
3861 |
// ---------------------------------------------------------------------------
|
|
3862 |
//
|
|
3863 |
TInt CMmPhoneTsy::GetSubscriberIdCancel(
|
|
3864 |
const TTsyReqHandle aTsyReqHandle )
|
|
3865 |
{
|
|
3866 |
// If there is only one request, reset the req handle
|
|
3867 |
if( 1 == iSubscriberIdRequests.Count() )
|
|
3868 |
{
|
|
3869 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3870 |
EMultimodePhoneGetSubscriberId );
|
|
3871 |
}
|
|
3872 |
|
|
3873 |
// Delete and remove cancelled request from the array
|
|
3874 |
for ( TInt i = 0; i < iSubscriberIdRequests.Count(); i++ )
|
|
3875 |
{
|
|
3876 |
TSubscriberIdRequest* req = iSubscriberIdRequests[ i ];
|
|
3877 |
|
|
3878 |
if( aTsyReqHandle == req->iReqHandle )
|
|
3879 |
{
|
|
3880 |
delete iSubscriberIdRequests[ i ];
|
|
3881 |
iSubscriberIdRequests.Remove(i);
|
|
3882 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
3883 |
break;
|
|
3884 |
}
|
|
3885 |
}
|
|
3886 |
|
|
3887 |
return KErrNone;
|
|
3888 |
}
|
|
3889 |
|
|
3890 |
// ---------------------------------------------------------------------------
|
|
3891 |
// CMmPhoneTsy::GetALSLineL
|
|
3892 |
// This method allows a client to find out which voice line is currently
|
|
3893 |
// selected as the active ALS line for outgoing voice calls.
|
|
3894 |
// (other items were commented in a header).
|
|
3895 |
// ---------------------------------------------------------------------------
|
|
3896 |
//
|
|
3897 |
TInt CMmPhoneTsy::GetALSLineL(
|
|
3898 |
const TTsyReqHandle aTsyReqHandle,
|
|
3899 |
RMobilePhone::TMobilePhoneALSLine* aALSLine )
|
|
3900 |
{
|
|
3901 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetALSLineL");
|
|
3902 |
|
|
3903 |
TInt ret ( KErrNone );
|
|
3904 |
TBool alsSupportedBySim;
|
|
3905 |
|
|
3906 |
//Get als support info
|
|
3907 |
iCentRep->Get( KCtsyMEAlsSupported, alsSupportedBySim );
|
|
3908 |
|
|
3909 |
//Get TSY req. handle
|
|
3910 |
TTsyReqHandle phoneGetAlsLineHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
3911 |
EMultimodePhoneGetAlsLine );
|
|
3912 |
|
|
3913 |
//The request is already in processing because of previous request
|
|
3914 |
//Complete request with status value informing the client about
|
|
3915 |
if( EMultimodePhoneReqHandleUnknown != phoneGetAlsLineHandle )
|
|
3916 |
{
|
|
3917 |
TGetAlsLineRequest* req = new (ELeave) TGetAlsLineRequest();
|
|
3918 |
req->iReqHandle = aTsyReqHandle;
|
|
3919 |
req->iALSLine = aALSLine;
|
|
3920 |
iGetAlsLineRequests.AppendL( req );
|
|
3921 |
}
|
|
3922 |
else
|
|
3923 |
{
|
|
3924 |
if ( RMobilePhone::EAlternateLineUnknown == iAlsLine &&
|
|
3925 |
alsSupportedBySim )
|
|
3926 |
{
|
|
3927 |
// no packed parameters for DOS call
|
|
3928 |
ret = iMessageManager->HandleRequestL( EMobilePhoneGetALSLine );
|
|
3929 |
//check success
|
|
3930 |
if ( KErrNone == ret )
|
|
3931 |
{
|
|
3932 |
//save tsy req handle type
|
|
3933 |
iReqHandleType = EMultimodePhoneGetAlsLine;
|
|
3934 |
|
|
3935 |
// save request in queue for completion
|
|
3936 |
TGetAlsLineRequest* req = new (ELeave) TGetAlsLineRequest();
|
|
3937 |
req->iReqHandle = aTsyReqHandle;
|
|
3938 |
req->iALSLine = aALSLine;
|
|
3939 |
iGetAlsLineRequests.AppendL( req );
|
|
3940 |
}
|
|
3941 |
}
|
|
3942 |
|
|
3943 |
else if( RMobilePhone::EAlternateLineUnknown != iAlsLine &&
|
|
3944 |
alsSupportedBySim )
|
|
3945 |
{
|
|
3946 |
// set value in client side
|
|
3947 |
*aALSLine = iAlsLine;
|
|
3948 |
// complete immediately
|
|
3949 |
ReqCompleted ( aTsyReqHandle, KErrNone );
|
|
3950 |
}
|
|
3951 |
|
|
3952 |
else if ( !alsSupportedBySim )
|
|
3953 |
{
|
|
3954 |
TInt tempLine(0);
|
|
3955 |
|
|
3956 |
//Get Default als info from Central Repository
|
|
3957 |
ret = iCentRep->Get( KCtysMEAlsLineInfo, tempLine );
|
|
3958 |
|
|
3959 |
RMobilePhone::TMobilePhoneALSLine alsline = MapMEALSLine( tempLine );
|
|
3960 |
|
|
3961 |
if( KErrNone == ret )
|
|
3962 |
{
|
|
3963 |
// set default value in client side
|
|
3964 |
*aALSLine = alsline;
|
|
3965 |
}
|
|
3966 |
// complete immediately
|
|
3967 |
ReqCompleted ( aTsyReqHandle, ret );
|
|
3968 |
}
|
|
3969 |
}
|
|
3970 |
|
|
3971 |
return ret;
|
|
3972 |
}
|
|
3973 |
|
|
3974 |
// ---------------------------------------------------------------------------
|
|
3975 |
// CMmPhoneTsy::GetAlsLineCancel
|
|
3976 |
// Cancels an outstanding GetAlsLine request.
|
|
3977 |
// (other items were commented in a header).
|
|
3978 |
// ---------------------------------------------------------------------------
|
|
3979 |
//
|
|
3980 |
TInt CMmPhoneTsy::GetAlsLineCancel(
|
|
3981 |
const TTsyReqHandle aTsyReqHandle )
|
|
3982 |
{
|
|
3983 |
|
|
3984 |
//reset the req handle
|
|
3985 |
if( 1 == iGetAlsLineRequests.Count() )
|
|
3986 |
{
|
|
3987 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
3988 |
EMultimodePhoneGetAlsLine );
|
|
3989 |
}
|
|
3990 |
|
|
3991 |
for ( TInt i = 0; i < iGetAlsLineRequests.Count(); i++ )
|
|
3992 |
{
|
|
3993 |
TGetAlsLineRequest* req = iGetAlsLineRequests[ i ];
|
|
3994 |
|
|
3995 |
if( aTsyReqHandle == req->iReqHandle )
|
|
3996 |
{
|
|
3997 |
ReqCompleted( req->iReqHandle, KErrCancel );
|
|
3998 |
delete iGetAlsLineRequests[ i ];
|
|
3999 |
iGetAlsLineRequests.Remove(i);
|
|
4000 |
break;
|
|
4001 |
}
|
|
4002 |
}
|
|
4003 |
|
|
4004 |
return KErrNone;
|
|
4005 |
}
|
|
4006 |
|
|
4007 |
// ---------------------------------------------------------------------------
|
|
4008 |
// CMmPhoneTsy::CompleteGetAlsLine
|
|
4009 |
// Completes a GetAlsLine request
|
|
4010 |
// (other items were commented in a header).
|
|
4011 |
// ---------------------------------------------------------------------------
|
|
4012 |
//
|
|
4013 |
void CMmPhoneTsy::CompleteGetAlsLine(
|
|
4014 |
RMobilePhone::TMobilePhoneALSLine aAlsStatus,
|
|
4015 |
TInt aErrorCode )
|
|
4016 |
{
|
|
4017 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetAlsLine - ALS line" );
|
|
4018 |
|
|
4019 |
//check if value has been updated
|
|
4020 |
if ( aAlsStatus != iAlsLine )
|
|
4021 |
{
|
|
4022 |
//save value in tsy
|
|
4023 |
iAlsLine = aAlsStatus;
|
|
4024 |
iCentRep->Set( KCtysMEAlsLineInfo, aAlsStatus );
|
|
4025 |
}
|
|
4026 |
|
|
4027 |
//reset req handle. Returns the deleted req handle
|
|
4028 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4029 |
EMultimodePhoneGetAlsLine );
|
|
4030 |
|
|
4031 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
4032 |
{
|
|
4033 |
for ( TInt i = 0; i < iGetAlsLineRequests.Count(); i++ )
|
|
4034 |
{
|
|
4035 |
TGetAlsLineRequest* req = iGetAlsLineRequests[ i ];
|
|
4036 |
//set value in client side
|
|
4037 |
*(req->iALSLine) = aAlsStatus;
|
|
4038 |
// Complete the client request
|
|
4039 |
ReqCompleted( req->iReqHandle, aErrorCode );
|
|
4040 |
}
|
|
4041 |
//Destroy Array
|
|
4042 |
iGetAlsLineRequests.ResetAndDestroy();
|
|
4043 |
}
|
|
4044 |
}
|
|
4045 |
|
|
4046 |
// ---------------------------------------------------------------------------
|
|
4047 |
// CMmPhoneTsy::SetALSLineL
|
|
4048 |
// This method allows a client to set which voice line is currently
|
|
4049 |
// selected as the active ALS line for outgoing voice calls.
|
|
4050 |
// (other items were commented in a header).
|
|
4051 |
// ---------------------------------------------------------------------------
|
|
4052 |
//
|
|
4053 |
TInt CMmPhoneTsy::SetALSLineL(
|
|
4054 |
const TTsyReqHandle aTsyReqHandle,
|
|
4055 |
RMobilePhone::TMobilePhoneALSLine* aALSLine )
|
|
4056 |
{
|
|
4057 |
TFLOGSTRING("TSY: CMmPhoneTsy::SetALSLineL");
|
|
4058 |
TInt ret ( KErrNone );
|
|
4059 |
TBool alsSupportedBySim ( EFalse );
|
|
4060 |
|
|
4061 |
//Get als support info
|
|
4062 |
iCentRep->Get( KCtsyMEAlsSupported, alsSupportedBySim );
|
|
4063 |
|
|
4064 |
//check if handle is not used for Get and Set
|
|
4065 |
if ( ( EMultimodePhoneReqHandleUnknown == iTsyReqHandleStore->
|
|
4066 |
GetTsyReqHandle( EMultimodePhoneGetAlsLine ) ) &&
|
|
4067 |
( EMultimodePhoneReqHandleUnknown == iTsyReqHandleStore->
|
|
4068 |
GetTsyReqHandle( EMultimodePhoneSetAlsLine ) )
|
|
4069 |
&& alsSupportedBySim )
|
|
4070 |
{
|
|
4071 |
//save the new ALS value temporarily, will be used in the completion
|
|
4072 |
iTempAlsLine = *aALSLine;
|
|
4073 |
|
|
4074 |
CMmDataPackage data;
|
|
4075 |
data.PackData ( aALSLine );
|
|
4076 |
|
|
4077 |
// parameter for DOS call: RMobilePhone::TMobilePhoneALSLine
|
|
4078 |
ret = iMessageManager->HandleRequestL( EMobilePhoneSetALSLine, &data );
|
|
4079 |
|
|
4080 |
//check success
|
|
4081 |
if ( KErrNone == ret )
|
|
4082 |
{
|
|
4083 |
//save tsy req handle type
|
|
4084 |
iReqHandleType = EMultimodePhoneSetAlsLine;
|
|
4085 |
}
|
|
4086 |
}
|
|
4087 |
else if ( ( EMultimodePhoneReqHandleUnknown == iTsyReqHandleStore->
|
|
4088 |
GetTsyReqHandle( EMultimodePhoneGetAlsLine ) ) &&
|
|
4089 |
( EMultimodePhoneReqHandleUnknown == iTsyReqHandleStore->
|
|
4090 |
GetTsyReqHandle( EMultimodePhoneSetAlsLine ) ) &&
|
|
4091 |
!alsSupportedBySim )
|
|
4092 |
{
|
|
4093 |
//Reset previous Info
|
|
4094 |
iCentRep->Reset();
|
|
4095 |
|
|
4096 |
//ME based ALS is used
|
|
4097 |
ret = iCentRep->Set( KCtysMEAlsLineInfo, *aALSLine );
|
|
4098 |
|
|
4099 |
//Set default ALS Value
|
|
4100 |
if( KErrNone == ret )
|
|
4101 |
{
|
|
4102 |
iAlsLine = *aALSLine;
|
|
4103 |
//NotifyClient about als line change
|
|
4104 |
CompleteNotifyALSLineChange();
|
|
4105 |
ReqCompleted( aTsyReqHandle, ret );
|
|
4106 |
}
|
|
4107 |
else
|
|
4108 |
{
|
|
4109 |
ret = KErrWrite;
|
|
4110 |
}
|
|
4111 |
}
|
|
4112 |
else
|
|
4113 |
{
|
|
4114 |
ret = KErrServerBusy;
|
|
4115 |
}
|
|
4116 |
|
|
4117 |
return ret;
|
|
4118 |
}
|
|
4119 |
|
|
4120 |
// ---------------------------------------------------------------------------
|
|
4121 |
// CMmPhoneTsy::CompleteSetAlsLine
|
|
4122 |
// Completes SetAlsLine request. If notification of ALS line change has been
|
|
4123 |
// requested by the client, the notification is completed as well.
|
|
4124 |
// (other items were commented in a header).
|
|
4125 |
// ---------------------------------------------------------------------------
|
|
4126 |
//
|
|
4127 |
void CMmPhoneTsy::CompleteSetAlsLine(
|
|
4128 |
TInt aErrorCode )
|
|
4129 |
{
|
|
4130 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteSetAlsLine - ALS line: %d", iTempAlsLine );
|
|
4131 |
|
|
4132 |
//reset req handle. Returns the deleted req handle
|
|
4133 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4134 |
EMultimodePhoneSetAlsLine );
|
|
4135 |
|
|
4136 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
4137 |
{
|
|
4138 |
//if operation has been successful
|
|
4139 |
if ( KErrNone == aErrorCode )
|
|
4140 |
{
|
|
4141 |
//save the temporary value in iAlsLine
|
|
4142 |
iAlsLine = iTempAlsLine;
|
|
4143 |
|
|
4144 |
CompleteNotifyALSLineChange();
|
|
4145 |
}
|
|
4146 |
ReqCompleted( reqHandle, aErrorCode );
|
|
4147 |
}
|
|
4148 |
}
|
|
4149 |
|
|
4150 |
// ---------------------------------------------------------------------------
|
|
4151 |
// CMmPhoneTsy::NotifyALSLineChange
|
|
4152 |
// This method allows a client to be notified if the currently selected
|
|
4153 |
// ALS line changes.
|
|
4154 |
// (other items were commented in a header).
|
|
4155 |
// ---------------------------------------------------------------------------
|
|
4156 |
//
|
|
4157 |
TInt CMmPhoneTsy::NotifyALSLineChange(
|
|
4158 |
RMobilePhone::TMobilePhoneALSLine* aALSLine )
|
|
4159 |
{
|
|
4160 |
iRetNotifyALSLine = aALSLine;
|
|
4161 |
//save tsy req handle type
|
|
4162 |
iReqHandleType = EMultimodePhoneNotifyAlsLineChange;
|
|
4163 |
|
|
4164 |
return KErrNone;
|
|
4165 |
}
|
|
4166 |
|
|
4167 |
// ---------------------------------------------------------------------------
|
|
4168 |
// CMmPhoneTsy::NotifyALSLineChangeCancel
|
|
4169 |
// This method cancels an outstanding asynchronous NotifyALSLineChange request
|
|
4170 |
// (other items were commented in a header).
|
|
4171 |
// ---------------------------------------------------------------------------
|
|
4172 |
//
|
|
4173 |
TInt CMmPhoneTsy::NotifyALSLineChangeCancel(
|
|
4174 |
const TTsyReqHandle aTsyReqHandle )
|
|
4175 |
{
|
|
4176 |
iRetNotifyALSLine = NULL;
|
|
4177 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4178 |
EMultimodePhoneNotifyAlsLineChange );
|
|
4179 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
4180 |
|
|
4181 |
return KErrNone;
|
|
4182 |
}
|
|
4183 |
|
|
4184 |
// ---------------------------------------------------------------------------
|
|
4185 |
// CMmPhoneTsy::CompleteNotifyALSLineChange
|
|
4186 |
// This method completes an outstanding asynchronous NotifyALSLineChange
|
|
4187 |
// request.
|
|
4188 |
// (other items were commented in a header).
|
|
4189 |
// ---------------------------------------------------------------------------
|
|
4190 |
//
|
|
4191 |
void CMmPhoneTsy::CompleteNotifyALSLineChange()
|
|
4192 |
{
|
|
4193 |
//reset req handle. Returns the deleted req handle
|
|
4194 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4195 |
EMultimodePhoneNotifyAlsLineChange );
|
|
4196 |
|
|
4197 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
4198 |
{
|
|
4199 |
//copy data in client space
|
|
4200 |
*iRetNotifyALSLine = iAlsLine;
|
|
4201 |
//reset pointer to client space
|
|
4202 |
iRetNotifyALSLine = NULL;
|
|
4203 |
|
|
4204 |
// Complete the client request
|
|
4205 |
ReqCompleted( reqHandle, KErrNone );
|
|
4206 |
}
|
|
4207 |
}
|
|
4208 |
|
|
4209 |
// ---------------------------------------------------------------------------
|
|
4210 |
// CMmPhoneTsy::GetFdnStatusL
|
|
4211 |
// Retrieves the current status of the Fixed Dialling Numbers service.
|
|
4212 |
// (other items were commented in a header).
|
|
4213 |
// ---------------------------------------------------------------------------
|
|
4214 |
//
|
|
4215 |
TInt CMmPhoneTsy::GetFdnStatusL(
|
|
4216 |
const TTsyReqHandle aTsyReqHandle,
|
|
4217 |
RMobilePhone::TMobilePhoneFdnStatus* aFdnStatus )
|
|
4218 |
{
|
|
4219 |
TFLOGSTRING( "TSY: CMmPhoneTsy::GetFdnStatusL" );
|
|
4220 |
|
|
4221 |
TInt ret ( KErrServerBusy );
|
|
4222 |
|
|
4223 |
//check if handle is not in use already
|
|
4224 |
TTsyReqHandle phoneSetLockSettingHandle =
|
|
4225 |
iTsyReqHandleStore->GetTsyReqHandle( EMultimodePhoneGetFdnStatus );
|
|
4226 |
|
|
4227 |
if ( EMultimodePhoneReqHandleUnknown == phoneSetLockSettingHandle )
|
|
4228 |
{
|
|
4229 |
//save the setting information for later use
|
|
4230 |
iRetGetFdnStatus = aFdnStatus;
|
|
4231 |
|
|
4232 |
//call the extension to handle this request
|
|
4233 |
ret = iMmPhoneExtInterface->GetFdnStatusL( );
|
|
4234 |
|
|
4235 |
if ( KErrNone == ret )
|
|
4236 |
{
|
|
4237 |
//Set tsy req handle. Must be done already here so that
|
|
4238 |
//CompleteNotifySecurityEvent can complete request if it
|
|
4239 |
//unable to notify client about the situation.
|
|
4240 |
#ifdef REQHANDLE_TIMER
|
|
4241 |
SetTypeOfResponse( EMultimodePhoneGetFdnStatus, aTsyReqHandle );
|
|
4242 |
#else
|
|
4243 |
// Never comes here. See SetTypeOfResponse.
|
|
4244 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
4245 |
EMultimodePhoneGetFdnStatus, aTsyReqHandle );
|
|
4246 |
#endif // REQHANDLE_TIMER
|
|
4247 |
}
|
|
4248 |
}
|
|
4249 |
|
|
4250 |
return ret;
|
|
4251 |
}
|
|
4252 |
|
|
4253 |
// ---------------------------------------------------------------------------
|
|
4254 |
// CMmPhoneTsy::CompleteGetFdnStatus
|
|
4255 |
// Completes an outstanding asynchronous GetFdnStatus request.
|
|
4256 |
// (other items were commented in a header).
|
|
4257 |
// ---------------------------------------------------------------------------
|
|
4258 |
//
|
|
4259 |
void CMmPhoneTsy::CompleteGetFdnStatus(
|
|
4260 |
CMmDataPackage* aDataPackage,
|
|
4261 |
TInt aErrorCode )
|
|
4262 |
{
|
|
4263 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteGetFdnStatus - Error: %d", aErrorCode );
|
|
4264 |
|
|
4265 |
|
|
4266 |
//reset req handle. Returns the deleted req handle
|
|
4267 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4268 |
EMultimodePhoneGetFdnStatus );
|
|
4269 |
|
|
4270 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
4271 |
{
|
|
4272 |
if( KErrNone == aErrorCode )
|
|
4273 |
{
|
|
4274 |
//unpack the data
|
|
4275 |
RMobilePhone::TMobilePhoneFdnStatus* fdnStatus = NULL;
|
|
4276 |
aDataPackage->UnPackData (&fdnStatus );
|
|
4277 |
*iRetGetFdnStatus = *fdnStatus;
|
|
4278 |
}
|
|
4279 |
|
|
4280 |
//null the pointer to client side
|
|
4281 |
iRetGetFdnStatus = NULL;
|
|
4282 |
// Complete the client request
|
|
4283 |
ReqCompleted( reqHandle, aErrorCode );
|
|
4284 |
}
|
|
4285 |
}
|
|
4286 |
|
|
4287 |
// ---------------------------------------------------------------------------
|
|
4288 |
// CMmPhoneTsy::GetFdnStatusCancel
|
|
4289 |
// This method cancels an outstanding asynchronous GetFdnStatus request
|
|
4290 |
// (other items were commented in a header).
|
|
4291 |
// ---------------------------------------------------------------------------
|
|
4292 |
//
|
|
4293 |
TInt CMmPhoneTsy::GetFdnStatusCancel(
|
|
4294 |
const TTsyReqHandle aTsyReqHandle )
|
|
4295 |
{
|
|
4296 |
TFLOGSTRING( "TSY: CMmPhoneTsy::GetFdnStatusCancel" );
|
|
4297 |
iRetGetFdnStatus = NULL;
|
|
4298 |
|
|
4299 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodePhoneGetFdnStatus );
|
|
4300 |
|
|
4301 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
4302 |
|
|
4303 |
return KErrNone;
|
|
4304 |
}
|
|
4305 |
|
|
4306 |
// ---------------------------------------------------------------------------
|
|
4307 |
// CMmPhoneTsy::SetFdnSettingL
|
|
4308 |
// This method activates (ON) or deactivates (OFF) the Fixed
|
|
4309 |
// Dialling Numbers (FDN) service
|
|
4310 |
// (other items were commented in a header).
|
|
4311 |
// ---------------------------------------------------------------------------
|
|
4312 |
//
|
|
4313 |
TInt CMmPhoneTsy::SetFdnSettingL(
|
|
4314 |
const TTsyReqHandle aTsyReqHandle,
|
|
4315 |
const TDataPackage& aPackage )
|
|
4316 |
{
|
|
4317 |
//PIN2 must be verified prior setting the fdn setting, launch
|
|
4318 |
//a security event to inform the client. Wait until
|
|
4319 |
//VerifySecurityCode is completed
|
|
4320 |
iMmSecurityTsy->CompleteNotifySecurityEventL( RMobilePhone::EPin2Required,
|
|
4321 |
KErrNone );
|
|
4322 |
|
|
4323 |
//save the setting information for later use
|
|
4324 |
iRetFdnSetting = reinterpret_cast<RMobilePhone::TMobilePhoneFdnSetting*>
|
|
4325 |
( aPackage.Ptr1() );
|
|
4326 |
|
|
4327 |
//the SetFdnSetting is already ongoing, save the request type.
|
|
4328 |
//don't wait for DoExtFuncL to store it ( the normal procedure )
|
|
4329 |
//as CompleteNotifySecurityEvent
|
|
4330 |
//will trigger a notification repost and this repost
|
|
4331 |
//will overwrite the internal attribute iReqHandleType
|
|
4332 |
iTsyReqHandleStore->SetTsyReqHandle( EMultimodePhoneSetFdnSetting,
|
|
4333 |
aTsyReqHandle );
|
|
4334 |
return KErrNone;
|
|
4335 |
}
|
|
4336 |
|
|
4337 |
// ---------------------------------------------------------------------------
|
|
4338 |
// CMmPhoneTsy::CompleteSetFdnSettingL
|
|
4339 |
// This method completes an outstanding asynchronous SetFdnSetting request
|
|
4340 |
// (other items were commented in a header).
|
|
4341 |
// ---------------------------------------------------------------------------
|
|
4342 |
//
|
|
4343 |
void CMmPhoneTsy::CompleteSetFdnSettingL(
|
|
4344 |
TInt aErrorCode )
|
|
4345 |
{
|
|
4346 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteSetFdnSettingL - Error: %d",
|
|
4347 |
aErrorCode);
|
|
4348 |
|
|
4349 |
//reset req handle. Returns the deleted req handle
|
|
4350 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4351 |
EMultimodePhoneSetFdnSetting );
|
|
4352 |
|
|
4353 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
4354 |
{
|
|
4355 |
RMobilePhone::TMobilePhoneFdnSetting retFdnSetting = *iRetFdnSetting;
|
|
4356 |
|
|
4357 |
if ( KErrNone == aErrorCode )
|
|
4358 |
{
|
|
4359 |
//trigger the FDN notification completion
|
|
4360 |
CompleteNotifyFdnStatusChange();
|
|
4361 |
|
|
4362 |
//reset pointer to the client space.
|
|
4363 |
iRetFdnSetting = NULL;
|
|
4364 |
|
|
4365 |
//Complete the request before checking if the ADN
|
|
4366 |
//Should be cached, the UI gets freezed for a couple of seconds
|
|
4367 |
//if the ADN is being cached before completeing the Fdn setting
|
|
4368 |
ReqCompleted( reqHandle, KErrNone );
|
|
4369 |
|
|
4370 |
//check if the Fdn has been set off, the ADN cache is not
|
|
4371 |
//done if the phone boots with FDN on, thefore we have to
|
|
4372 |
//cache it at this point
|
|
4373 |
if ( RMobilePhone::EFdnSetOff == retFdnSetting )
|
|
4374 |
{
|
|
4375 |
for( TInt i = 0; i < iPBList->GetNumberOfObjects(); i++ )
|
|
4376 |
{
|
|
4377 |
//Get pbStore object
|
|
4378 |
CMmPhoneBookStoreTsy* pbStore = iPBList->
|
|
4379 |
GetMmPBByIndex( i );
|
|
4380 |
//check if the current phonebook is ADN
|
|
4381 |
if ( 0 == pbStore->PhoneBookName()->CompareF(
|
|
4382 |
KETelIccAdnPhoneBook ) )
|
|
4383 |
{
|
|
4384 |
//Start to cache phonebook entries.
|
|
4385 |
pbStore->CacheEntriesL();
|
|
4386 |
}
|
|
4387 |
}
|
|
4388 |
}
|
|
4389 |
}
|
|
4390 |
else
|
|
4391 |
{
|
|
4392 |
//reset pointer to the client space.
|
|
4393 |
iRetFdnSetting = NULL;
|
|
4394 |
|
|
4395 |
ReqCompleted( reqHandle, aErrorCode );
|
|
4396 |
}
|
|
4397 |
|
|
4398 |
}
|
|
4399 |
}
|
|
4400 |
|
|
4401 |
// ---------------------------------------------------------------------------
|
|
4402 |
// CMmPhoneTsy::NotifyFdnStatusChange
|
|
4403 |
// This request allows a client to be notified when the status
|
|
4404 |
// of the FDN service has changed
|
|
4405 |
// (other items were commented in a header).
|
|
4406 |
// ---------------------------------------------------------------------------
|
|
4407 |
//
|
|
4408 |
TInt CMmPhoneTsy::NotifyFdnStatusChange(
|
|
4409 |
RMobilePhone::TMobilePhoneFdnStatus* aStatus )
|
|
4410 |
{
|
|
4411 |
iRetNotifyFdnStatus = aStatus;
|
|
4412 |
//save tsy req handle type
|
|
4413 |
iReqHandleType = EMultimodePhoneNotifyFdnStatusChange;
|
|
4414 |
|
|
4415 |
return KErrNone;
|
|
4416 |
}
|
|
4417 |
|
|
4418 |
// ---------------------------------------------------------------------------
|
|
4419 |
// CMmPhoneTsy::NotifyFdnStatusChangeCancel
|
|
4420 |
// This method cancels an outstanding asynchronous NotifyFdnStatusChange req.
|
|
4421 |
// (other items were commented in a header).
|
|
4422 |
// ---------------------------------------------------------------------------
|
|
4423 |
//
|
|
4424 |
TInt CMmPhoneTsy::NotifyFdnStatusChangeCancel(
|
|
4425 |
const TTsyReqHandle aTsyReqHandle )
|
|
4426 |
{
|
|
4427 |
|
|
4428 |
iRetNotifyFdnStatus = NULL;
|
|
4429 |
iTsyReqHandleStore->ResetTsyReqHandle
|
|
4430 |
( EMultimodePhoneNotifyFdnStatusChange );
|
|
4431 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
4432 |
|
|
4433 |
|
|
4434 |
return KErrNone;
|
|
4435 |
}
|
|
4436 |
|
|
4437 |
// ---------------------------------------------------------------------------
|
|
4438 |
// CMmPhoneTsy::CompleteNotifyFdnStatusChange
|
|
4439 |
// This method cancels an outstanding asynchronous NotifyFdnStatusChange req.
|
|
4440 |
// (other items were commented in a header).
|
|
4441 |
// ---------------------------------------------------------------------------
|
|
4442 |
//
|
|
4443 |
void CMmPhoneTsy::CompleteNotifyFdnStatusChange()
|
|
4444 |
{
|
|
4445 |
//reset req handle. Returns the deleted req handle
|
|
4446 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4447 |
EMultimodePhoneNotifyFdnStatusChange );
|
|
4448 |
|
|
4449 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
4450 |
{
|
|
4451 |
//map the value of the used in the setting
|
|
4452 |
//we asume first that the status is on
|
|
4453 |
*iRetNotifyFdnStatus = RMobilePhone::EFdnActive;
|
|
4454 |
//if the status is off change the value
|
|
4455 |
if ( RMobilePhone::EFdnSetOff == *iRetFdnSetting )
|
|
4456 |
{
|
|
4457 |
*iRetNotifyFdnStatus = RMobilePhone::EFdnNotActive;
|
|
4458 |
}
|
|
4459 |
// Complete the client request
|
|
4460 |
ReqCompleted( reqHandle, KErrNone );
|
|
4461 |
}
|
|
4462 |
}
|
|
4463 |
|
|
4464 |
// ---------------------------------------------------------------------------
|
|
4465 |
// CMmPhoneTsy::PhoneExtInterface
|
|
4466 |
// This method returns pointer to active phone extension object
|
|
4467 |
// (other items were commented in a header).
|
|
4468 |
// ---------------------------------------------------------------------------
|
|
4469 |
//
|
|
4470 |
CMmPhoneExtInterface* CMmPhoneTsy::PhoneExtInterface()
|
|
4471 |
{
|
|
4472 |
return iMmPhoneExtInterface;
|
|
4473 |
}
|
|
4474 |
|
|
4475 |
// ---------------------------------------------------------------------------
|
|
4476 |
// CMmPhoneTsy::SetConferenceCall
|
|
4477 |
// This method returns a pointer to
|
|
4478 |
// CMmConferenceCallMessHandlerGsmWcdmaExt object
|
|
4479 |
// (other items were commented in a header).
|
|
4480 |
// ---------------------------------------------------------------------------
|
|
4481 |
//
|
|
4482 |
void CMmPhoneTsy::SetConferenceCall(
|
|
4483 |
CMmConferenceCallTsy* aMmConferenceCallTsy )
|
|
4484 |
{
|
|
4485 |
iMmConferenceCall = aMmConferenceCallTsy;
|
|
4486 |
}
|
|
4487 |
|
|
4488 |
// ---------------------------------------------------------------------------
|
|
4489 |
// CMmPhoneTsy::ConferenceCall
|
|
4490 |
// This method returns a pointer to
|
|
4491 |
// CMmConferenceCallMessHandlerGsmWcdmaExt object
|
|
4492 |
// (other items were commented in a header).
|
|
4493 |
// ---------------------------------------------------------------------------
|
|
4494 |
//
|
|
4495 |
CMmConferenceCallTsy* CMmPhoneTsy::ConferenceCall()
|
|
4496 |
{
|
|
4497 |
|
|
4498 |
return iMmConferenceCall;
|
|
4499 |
|
|
4500 |
}
|
|
4501 |
|
|
4502 |
// ---------------------------------------------------------------------------
|
|
4503 |
// CMmPhoneTsy::SmsSession
|
|
4504 |
// Gives pointer to SMS messaging session
|
|
4505 |
// (other items were commented in a header).
|
|
4506 |
// ---------------------------------------------------------------------------
|
|
4507 |
//
|
|
4508 |
CMmSmsTsy* CMmPhoneTsy::SmsSession()
|
|
4509 |
{
|
|
4510 |
return iMmSmsTsy;
|
|
4511 |
}
|
|
4512 |
|
|
4513 |
// ---------------------------------------------------------------------------
|
|
4514 |
// CMmPhoneTsy::SmsService
|
|
4515 |
// Gives pointer to SMS messaging session as a MCtsySatService
|
|
4516 |
// (other items were commented in a header).
|
|
4517 |
// ---------------------------------------------------------------------------
|
|
4518 |
//
|
|
4519 |
MCtsySatService& CMmPhoneTsy::SmsService()
|
|
4520 |
{
|
|
4521 |
return *iMmSmsTsy;
|
|
4522 |
}
|
|
4523 |
|
|
4524 |
// ---------------------------------------------------------------------------
|
|
4525 |
// CMmPhoneTsy::SetSmsSession
|
|
4526 |
// Set SMS messaging session
|
|
4527 |
// (other items were commented in a header).
|
|
4528 |
// ---------------------------------------------------------------------------
|
|
4529 |
//
|
|
4530 |
void CMmPhoneTsy::SetSmsSession(
|
|
4531 |
CMmSmsTsy* aMmSmsTsy )
|
|
4532 |
{
|
|
4533 |
iMmSmsTsy = aMmSmsTsy;
|
|
4534 |
}
|
|
4535 |
|
|
4536 |
// ---------------------------------------------------------------------------
|
|
4537 |
// CMmPhoneTsy::PacketDataSession
|
|
4538 |
// Gives pointer to Packet Data session
|
|
4539 |
// (other items were commented in a header).
|
|
4540 |
// ---------------------------------------------------------------------------
|
|
4541 |
//
|
|
4542 |
CMmPacketServiceTsy* CMmPhoneTsy::PacketDataSession()
|
|
4543 |
{
|
|
4544 |
return iMmPacketServiceTsy;
|
|
4545 |
}
|
|
4546 |
|
|
4547 |
// ---------------------------------------------------------------------------
|
|
4548 |
// CMmPhoneTsy::GetCustomTsy
|
|
4549 |
// Gives pointer to CustomTsy extension
|
|
4550 |
// (other items were commented in a header).
|
|
4551 |
// ---------------------------------------------------------------------------
|
|
4552 |
//
|
|
4553 |
CMmCustomTsy* CMmPhoneTsy::GetCustomTsy()
|
|
4554 |
{
|
|
4555 |
return iMmCustomTsy;
|
|
4556 |
}
|
|
4557 |
|
|
4558 |
// ---------------------------------------------------------------------------
|
|
4559 |
// CMmPhoneTsy::SetCustomTsy
|
|
4560 |
// CustomTsy can set iMmCustomTsy pointer to NULL when it is closed
|
|
4561 |
// (other items were commented in a header).
|
|
4562 |
// ---------------------------------------------------------------------------
|
|
4563 |
//
|
|
4564 |
void CMmPhoneTsy::SetCustomTsy(
|
|
4565 |
CMmCustomTsy* aMmCustomTsy )
|
|
4566 |
{
|
|
4567 |
iMmCustomTsy = aMmCustomTsy;
|
|
4568 |
}
|
|
4569 |
|
|
4570 |
// ---------------------------------------------------------------------------
|
|
4571 |
// CMmPhoneTsy::GetSmsTsy
|
|
4572 |
// Gives pointer to SmsTsy
|
|
4573 |
// (other items were commented in a header).
|
|
4574 |
// ---------------------------------------------------------------------------
|
|
4575 |
//
|
|
4576 |
CMmSmsTsy* CMmPhoneTsy::GetSmsTsy()
|
|
4577 |
{
|
|
4578 |
return iMmSmsTsy;
|
|
4579 |
}
|
|
4580 |
|
|
4581 |
// ---------------------------------------------------------------------------
|
|
4582 |
// CMmPhoneTsy::GetIccAccessCaps
|
|
4583 |
// Get ICC Access Capabilities. ICC capabilities are
|
|
4584 |
// network mode dependent
|
|
4585 |
// (other items were commented in a header).
|
|
4586 |
// ---------------------------------------------------------------------------
|
|
4587 |
//
|
|
4588 |
TInt CMmPhoneTsy::GetIccAccessCaps(
|
|
4589 |
const TTsyReqHandle aTsyReqHandle,
|
|
4590 |
TUint32* aCaps )
|
|
4591 |
{
|
|
4592 |
TInt ret( KErrNone );
|
|
4593 |
|
|
4594 |
//set the default value for the capabilites
|
|
4595 |
*aCaps = 0x0;
|
|
4596 |
|
|
4597 |
// Check mode ICC type
|
|
4598 |
TInt currentIccType( iMmPhoneExtInterface->CurrentICCType() );
|
|
4599 |
|
|
4600 |
// 2G SIM
|
|
4601 |
if ( CMmPhoneGsmWcdmaExt::EICCTypeSim2GGsm == currentIccType)
|
|
4602 |
{
|
|
4603 |
*aCaps = RMobilePhone::KCapsSimAccessSupported;
|
|
4604 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetIccAccessCaps: aCaps = KCapsSimAccessSupported.");
|
|
4605 |
}
|
|
4606 |
// 3G USIM
|
|
4607 |
else if ( CMmPhoneGsmWcdmaExt::EICCTypeSim3G == currentIccType )
|
|
4608 |
{
|
|
4609 |
*aCaps = RMobilePhone::KCapsUSimAccessSupported +
|
|
4610 |
RMobilePhone::KCapsSimAccessSupported;
|
|
4611 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetIccAccessCaps: aCaps = KCapsUSimAccessSupported + KCapsSimAccessSupported.");
|
|
4612 |
}
|
|
4613 |
ReqCompleted( aTsyReqHandle, ret );
|
|
4614 |
|
|
4615 |
return KErrNone;
|
|
4616 |
}
|
|
4617 |
|
|
4618 |
// ---------------------------------------------------------------------------
|
|
4619 |
// CMmPhoneTsy::NotifyIccAccessCapsChange
|
|
4620 |
// Notify Change of ICC Access Caps. ICC capabilities are
|
|
4621 |
// network mode dependent
|
|
4622 |
// (other items were commented in a header).
|
|
4623 |
// ---------------------------------------------------------------------------
|
|
4624 |
//
|
|
4625 |
TInt CMmPhoneTsy::NotifyIccAccessCapsChange(
|
|
4626 |
TUint32* aCaps )
|
|
4627 |
{
|
|
4628 |
iReqHandleType = EMultimodePhoneNotifyIccAccessCapsChange;
|
|
4629 |
iICCCaps = aCaps;
|
|
4630 |
|
|
4631 |
return KErrNone;
|
|
4632 |
}
|
|
4633 |
|
|
4634 |
// ---------------------------------------------------------------------------
|
|
4635 |
// CMmPhoneTsy::NotifyIccAccessCapsChangeCancel
|
|
4636 |
// Cancels an outstanding NotifyIccAccessCapsChange method
|
|
4637 |
// (other items were commented in a header).
|
|
4638 |
// ---------------------------------------------------------------------------
|
|
4639 |
//
|
|
4640 |
TInt CMmPhoneTsy::NotifyIccAccessCapsChangeCancel (
|
|
4641 |
const TTsyReqHandle aTsyReqHandle )
|
|
4642 |
{
|
|
4643 |
// As cancel is called, the client memory address pointed to is no longer
|
|
4644 |
// valid -> NULL it
|
|
4645 |
iICCCaps = NULL;
|
|
4646 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4647 |
EMultimodePhoneNotifyIccAccessCapsChange );
|
|
4648 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
4649 |
|
|
4650 |
return KErrNone;
|
|
4651 |
}
|
|
4652 |
|
|
4653 |
// ---------------------------------------------------------------------------
|
|
4654 |
// CMmPhoneTsy::CompleteNotifyIccAccessCapsChange
|
|
4655 |
// Complete Notify Change of ICC Access Caps. ICC capabilities
|
|
4656 |
// are network mode dependent
|
|
4657 |
// (other items were commented in a header).
|
|
4658 |
// ---------------------------------------------------------------------------
|
|
4659 |
//
|
|
4660 |
void CMmPhoneTsy::CompleteNotifyIccAccessCapsChange()
|
|
4661 |
{
|
|
4662 |
TInt ret ( KErrNone );
|
|
4663 |
|
|
4664 |
// Reset req handle. Returns the deleted req handle
|
|
4665 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4666 |
EMultimodePhoneNotifyIccAccessCapsChange );
|
|
4667 |
|
|
4668 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
4669 |
{
|
|
4670 |
|
|
4671 |
switch ( iMmPhoneExtInterface->CurrentICCType() )
|
|
4672 |
{
|
|
4673 |
case CMmPhoneGsmWcdmaExt::EICCTypeSim2GGsm: // 2G SIM
|
|
4674 |
*iICCCaps = RMobilePhone::KCapsSimAccessSupported;
|
|
4675 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteNotifyIccAccessCapsChange: KCapsSimAccessSupported.");
|
|
4676 |
break;
|
|
4677 |
case CMmPhoneGsmWcdmaExt::EICCTypeSim3G: // 3G USIM
|
|
4678 |
*iICCCaps = RMobilePhone::KCapsUSimAccessSupported;
|
|
4679 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteNotifyIccAccessCapsChange: KCapsUSimAccessSupported.");
|
|
4680 |
break;
|
|
4681 |
|
|
4682 |
default:
|
|
4683 |
*iICCCaps = 0x0;
|
|
4684 |
|
|
4685 |
// If the TSY/ME does not support any ICC access
|
|
4686 |
// then the request should be completed with KErrNotSupported.
|
|
4687 |
ret = KErrNotSupported;
|
|
4688 |
}
|
|
4689 |
|
|
4690 |
// Complete the client request
|
|
4691 |
ReqCompleted( reqHandle, ret );
|
|
4692 |
}
|
|
4693 |
}
|
|
4694 |
|
|
4695 |
// ---------------------------------------------------------------------------
|
|
4696 |
// CMmPhoneTsy::GetServiceTableCheckParametersL
|
|
4697 |
// Check validity of client parameters and pass request to GetServiceTableL().
|
|
4698 |
// (other items were commented in a header).
|
|
4699 |
// ---------------------------------------------------------------------------
|
|
4700 |
//
|
|
4701 |
TInt CMmPhoneTsy::GetServiceTableCheckParametersL(
|
|
4702 |
const TTsyReqHandle aTsyReqHandle,
|
|
4703 |
RMobilePhone::TMobilePhoneServiceTable* aTable,
|
|
4704 |
TDes8* aTableData )
|
|
4705 |
{
|
|
4706 |
TInt ret = KErrArgument;
|
|
4707 |
|
|
4708 |
//Incorrectly packaged parameter or wrong parameter may cause crash in TSY
|
|
4709 |
//when the service table data is copied to aTableData. Check validity of
|
|
4710 |
//parameter delivered by ETel API client.
|
|
4711 |
if ( sizeof( RMobilePhone::TMobilePhoneServiceTableV1 ) <=
|
|
4712 |
aTableData->MaxLength() )
|
|
4713 |
{
|
|
4714 |
RMobilePhone::TMobilePhoneServiceTableV1Pckg* serviceTableV1Pckg =
|
|
4715 |
REINTERPRET_CAST( RMobilePhone::TMobilePhoneServiceTableV1Pckg*,
|
|
4716 |
aTableData );
|
|
4717 |
|
|
4718 |
RMobilePhone::TMobilePhoneServiceTableV1*
|
|
4719 |
serviceTableV1 = &( ( *serviceTableV1Pckg ) () );
|
|
4720 |
|
|
4721 |
ret = GetServiceTableL( aTsyReqHandle, aTable, serviceTableV1 );
|
|
4722 |
}
|
|
4723 |
|
|
4724 |
TFLOGSTRING2("TSY: CMmPhoneTsy::GetServiceTableCheckParametersL - ret:%d",ret);
|
|
4725 |
return ret;
|
|
4726 |
}
|
|
4727 |
|
|
4728 |
// ---------------------------------------------------------------------------
|
|
4729 |
// CMmPhoneTsy::GetServiceTableL
|
|
4730 |
// Request Service Table (SST/UST)
|
|
4731 |
// (other items were commented in a header).
|
|
4732 |
// ---------------------------------------------------------------------------
|
|
4733 |
//
|
|
4734 |
TInt CMmPhoneTsy::GetServiceTableL(
|
|
4735 |
const TTsyReqHandle aTsyReqHandle,
|
|
4736 |
RMobilePhone::TMobilePhoneServiceTable* aTable,
|
|
4737 |
RMobilePhone::TMobilePhoneServiceTableV1* aTableData )
|
|
4738 |
{
|
|
4739 |
TFLOGSTRING2("TSY: CMmPhoneTsy::GetServiceTableL - Handle:%d", aTsyReqHandle);
|
|
4740 |
TInt ret( KErrServerBusy );
|
|
4741 |
|
|
4742 |
TTsyReqHandle serviceTableHandle =
|
|
4743 |
iTsyReqHandleStore->GetTsyReqHandle( EMultimodePhoneGetServiceTable );
|
|
4744 |
|
|
4745 |
if ( 0 < serviceTableHandle || KErrNone != iCacheServiceTableError )
|
|
4746 |
{
|
|
4747 |
//The request is already in processing because of previous request
|
|
4748 |
//Complete request with KErrServerBusy informing the client about
|
|
4749 |
//the situation. Or if cache is failed when called from GetServiceTable
|
|
4750 |
// complete with that error
|
|
4751 |
|
|
4752 |
//Cache failed update return code
|
|
4753 |
if( !iSimRefreshRegisterOk && ( iServiceTableReq->iCaching ) )
|
|
4754 |
{
|
|
4755 |
ret = iCacheServiceTableError;
|
|
4756 |
}
|
|
4757 |
ReqCompleted( aTsyReqHandle, ret );
|
|
4758 |
}
|
|
4759 |
else
|
|
4760 |
{
|
|
4761 |
|
|
4762 |
// check if the request is supported for this service table
|
|
4763 |
// and current mode
|
|
4764 |
switch ( *aTable )
|
|
4765 |
{
|
|
4766 |
case RMobilePhone::ESIMServiceTable:
|
|
4767 |
// SST is always supported
|
|
4768 |
ret = KErrNone;
|
|
4769 |
break;
|
|
4770 |
case RMobilePhone::EUSIMServiceTable:
|
|
4771 |
// KJT
|
|
4772 |
// UST is only supported if the used ICC is USIM.
|
|
4773 |
if ( CMmPhoneGsmWcdmaExt::EICCTypeSim3G ==
|
|
4774 |
iMmPhoneExtInterface->CurrentICCType() )
|
|
4775 |
{
|
|
4776 |
ret = KErrNone;
|
|
4777 |
}
|
|
4778 |
else
|
|
4779 |
{
|
|
4780 |
ret = KErrMMEtelWrongMode;
|
|
4781 |
}
|
|
4782 |
break;
|
|
4783 |
case RMobilePhone::ECDMAServiceTable:
|
|
4784 |
case RMobilePhone::EUSIMEnabledServiceTable:
|
|
4785 |
default: // CDMA and "USIM enabled" service table are not supported
|
|
4786 |
ret = KErrNotFound;
|
|
4787 |
}
|
|
4788 |
|
|
4789 |
if ( KErrNone == ret )
|
|
4790 |
{
|
|
4791 |
// if SIM is not ready, store request and complete it when SIM is ready
|
|
4792 |
if ( !iBootState.iSIMReady )
|
|
4793 |
{
|
|
4794 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetServiceTableL - request when SIM not ready - store req" );
|
|
4795 |
TServiceTableRequests* req = new (ELeave) TServiceTableRequests();
|
|
4796 |
req->iReqHandle = aTsyReqHandle;
|
|
4797 |
req->iTable = aTable;
|
|
4798 |
req->iTableData = aTableData;
|
|
4799 |
iServiceTableRequests.Append( req );
|
|
4800 |
}
|
|
4801 |
else
|
|
4802 |
{
|
|
4803 |
if( RMobilePhone::ESIMServiceTable ==
|
|
4804 |
*aTable && iServiceTableDataCache )
|
|
4805 |
{
|
|
4806 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetServiceTableL ESIMServiceTable returned from cache");
|
|
4807 |
*aTableData = *iServiceTableDataCache;
|
|
4808 |
ReqCompleted( aTsyReqHandle, ret );
|
|
4809 |
return KErrNone;
|
|
4810 |
}
|
|
4811 |
else if ( RMobilePhone::EUSIMServiceTable==
|
|
4812 |
*aTable && iServiceTableUSIMDataCache )
|
|
4813 |
{
|
|
4814 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetServiceTableL EUSIMServiceTable returned from cache");
|
|
4815 |
*aTableData = *iServiceTableUSIMDataCache;
|
|
4816 |
ReqCompleted( aTsyReqHandle, ret );
|
|
4817 |
return KErrNone;
|
|
4818 |
}
|
|
4819 |
else
|
|
4820 |
{
|
|
4821 |
if( !iSimRefreshRegisterOk && !( iServiceTableReq->iCaching ) )
|
|
4822 |
{
|
|
4823 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetServiceTableL sim refresh registration failed - possible old data - cache and complete ");
|
|
4824 |
//Store reguest parameters for completion
|
|
4825 |
iServiceTableReq->iReqHandle = aTsyReqHandle;
|
|
4826 |
iServiceTableReq->iTable = aTable;
|
|
4827 |
iServiceTableReq->iTableData = aTableData;
|
|
4828 |
iServiceTableReq->iCaching = ETrue;
|
|
4829 |
|
|
4830 |
//Do necessary internal intialisation
|
|
4831 |
iCacheServiceTableError = KErrNone;
|
|
4832 |
ret = KErrNone;
|
|
4833 |
iCalledOnGet = ETrue;
|
|
4834 |
iSimCacheQueue = KCacheServiceTable;
|
|
4835 |
iRefreshOngoing = ETrue;
|
|
4836 |
iPendingServiceTableReq = ESIMRequest;
|
|
4837 |
|
|
4838 |
//Request new caching
|
|
4839 |
CacheServiceTablesL();
|
|
4840 |
}
|
|
4841 |
else
|
|
4842 |
{
|
|
4843 |
if( RMobilePhone::ESIMServiceTable == *aTable )
|
|
4844 |
{
|
|
4845 |
iPendingServiceTableReq = ESIMRequest;
|
|
4846 |
}
|
|
4847 |
else
|
|
4848 |
{
|
|
4849 |
iPendingServiceTableReq = EUSIMRequest;
|
|
4850 |
}
|
|
4851 |
|
|
4852 |
// If caching is ongoing do not request service table
|
|
4853 |
if( ENoRequest == iPendingServiceTableCacheReq )
|
|
4854 |
{
|
|
4855 |
// Forward the request to DOS
|
|
4856 |
// packed parameter: RMobilePhone::TMobilePhoneServiceTable
|
|
4857 |
CMmDataPackage dataPackage;
|
|
4858 |
dataPackage.PackData( aTable );
|
|
4859 |
ret = iMessageManager->HandleRequestL(
|
|
4860 |
EMobilePhoneGetServiceTable, &dataPackage );
|
|
4861 |
}
|
|
4862 |
//Ready to process new request
|
|
4863 |
iServiceTableReq->iCaching = EFalse;
|
|
4864 |
}
|
|
4865 |
|
|
4866 |
}
|
|
4867 |
}
|
|
4868 |
|
|
4869 |
// Check the request sending status
|
|
4870 |
if ( KErrNone == ret )
|
|
4871 |
{
|
|
4872 |
// Save last req handle type and return pointer
|
|
4873 |
iReqHandleType = EMultimodePhoneGetServiceTable;
|
|
4874 |
iRetTableData = aTableData;
|
|
4875 |
}
|
|
4876 |
else
|
|
4877 |
{
|
|
4878 |
// Complete request if error occured
|
|
4879 |
ReqCompleted( aTsyReqHandle, ret );
|
|
4880 |
}
|
|
4881 |
}
|
|
4882 |
else
|
|
4883 |
{
|
|
4884 |
ReqCompleted( aTsyReqHandle, ret );
|
|
4885 |
}
|
|
4886 |
}
|
|
4887 |
return KErrNone;
|
|
4888 |
}
|
|
4889 |
|
|
4890 |
// ---------------------------------------------------------------------------
|
|
4891 |
// CMmPhoneTsy::CacheServiceTables
|
|
4892 |
// Starts the service table caching process
|
|
4893 |
// (other items were commented in a header).
|
|
4894 |
// ---------------------------------------------------------------------------
|
|
4895 |
//
|
|
4896 |
void CMmPhoneTsy::CacheServiceTablesL()
|
|
4897 |
{
|
|
4898 |
TFLOGSTRING("TSY: CMmPhoneTsy::CacheServiceTables.");
|
|
4899 |
|
|
4900 |
// Start caching if it is not already ongoing
|
|
4901 |
if ( (((iSimCacheQueue && ( KCacheServiceTable & iSimCacheQueue )) )
|
|
4902 |
&& IsRefreshOngoing()) || !IsRefreshOngoing() )
|
|
4903 |
{
|
|
4904 |
RMobilePhone::TMobilePhoneServiceTable serviceTable =
|
|
4905 |
RMobilePhone::ESIMServiceTable;
|
|
4906 |
|
|
4907 |
iPendingServiceTableCacheReq = ESIMRequest;
|
|
4908 |
|
|
4909 |
// Forward the request to DOS
|
|
4910 |
// packed parameter: RMobilePhone::TMobilePhoneServiceTable
|
|
4911 |
CMmDataPackage dataPackage;
|
|
4912 |
dataPackage.PackData( &serviceTable );
|
|
4913 |
|
|
4914 |
TInt ret = iMessageManager->HandleRequestL( EMobilePhoneGetServiceTable,
|
|
4915 |
&dataPackage );
|
|
4916 |
}
|
|
4917 |
}
|
|
4918 |
|
|
4919 |
// ---------------------------------------------------------------------------
|
|
4920 |
// CMmPhoneTsy::CompleteCacheServiceTables
|
|
4921 |
// Completes the service table caching process
|
|
4922 |
// (other items were commented in a header).
|
|
4923 |
// ---------------------------------------------------------------------------
|
|
4924 |
//
|
|
4925 |
void CMmPhoneTsy::CompleteCacheServiceTablesL( const TInt aError )
|
|
4926 |
{
|
|
4927 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteCacheServiceTablesL Error = %d", aError);
|
|
4928 |
if ( ( iSimCacheQueue && ( KCacheServiceTable & iSimCacheQueue ) )
|
|
4929 |
&& IsRefreshOngoing() )
|
|
4930 |
{
|
|
4931 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteCacheServiceTablesL");
|
|
4932 |
CompleteCacheSimL( KCacheServiceTable, aError );
|
|
4933 |
}
|
|
4934 |
|
|
4935 |
TInt ret = KErrNone;
|
|
4936 |
|
|
4937 |
// check pending requests and proceed if any
|
|
4938 |
TInt serviceTableRequestsCount = iServiceTableRequests.Count();
|
|
4939 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteCacheServiceTablesL - serviceTableRequestsCount: %d", serviceTableRequestsCount );
|
|
4940 |
|
|
4941 |
if ( serviceTableRequestsCount )
|
|
4942 |
{
|
|
4943 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteCacheServiceTablesL - Completing pending ServiceTableRequests");
|
|
4944 |
// check request type for every pending request and complete
|
|
4945 |
for ( TInt i = 0; i < serviceTableRequestsCount; i++ )
|
|
4946 |
{
|
|
4947 |
TServiceTableRequests* req = iServiceTableRequests[ i ];
|
|
4948 |
if ( RMobilePhone::ESIMServiceTable == *req->iTable )
|
|
4949 |
{
|
|
4950 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteCacheServiceTablesL - pending ESIMServiceTableRequest");
|
|
4951 |
*(req->iTableData) = *iServiceTableDataCache;
|
|
4952 |
}
|
|
4953 |
else if ( RMobilePhone::EUSIMServiceTable == *req->iTable )
|
|
4954 |
{
|
|
4955 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteCacheServiceTablesL - pending ESIMServiceTableRequest");
|
|
4956 |
*(req->iTableData) = *iServiceTableUSIMDataCache;
|
|
4957 |
}
|
|
4958 |
else
|
|
4959 |
{
|
|
4960 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteCacheServiceTablesL - pending BadRequest - KErrGeneral");
|
|
4961 |
ret = KErrGeneral;
|
|
4962 |
}
|
|
4963 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteCacheServiceTablesL - ReqCompleted for pending req withHandle:%d", req->iReqHandle);
|
|
4964 |
ReqCompleted(req->iReqHandle, ret);
|
|
4965 |
}
|
|
4966 |
// Reset req handle
|
|
4967 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodePhoneGetServiceTable );
|
|
4968 |
iServiceTableRequests.ResetAndDestroy();
|
|
4969 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteCacheServiceTablesL - Reset and ResetAndDestroy!");
|
|
4970 |
}
|
|
4971 |
|
|
4972 |
if ( ENoRequest != iPendingServiceTableReq )
|
|
4973 |
{
|
|
4974 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteCacheServiceTablesL completing client request");
|
|
4975 |
// Complete client request if pending
|
|
4976 |
|
|
4977 |
// Reset req handle. Returns the deleted req handle
|
|
4978 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
4979 |
EMultimodePhoneGetServiceTable );
|
|
4980 |
|
|
4981 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
4982 |
{
|
|
4983 |
ret = KErrNone;
|
|
4984 |
|
|
4985 |
if( ESIMRequest == iPendingServiceTableReq )
|
|
4986 |
{
|
|
4987 |
if( iServiceTableDataCache )
|
|
4988 |
{
|
|
4989 |
*iRetTableData = *iServiceTableDataCache;
|
|
4990 |
}
|
|
4991 |
else
|
|
4992 |
{
|
|
4993 |
ret = KErrGeneral;
|
|
4994 |
}
|
|
4995 |
}
|
|
4996 |
else
|
|
4997 |
{
|
|
4998 |
if( iServiceTableUSIMDataCache )
|
|
4999 |
{
|
|
5000 |
*iRetTableData = *iServiceTableUSIMDataCache;
|
|
5001 |
}
|
|
5002 |
else
|
|
5003 |
{
|
|
5004 |
ret = KErrGeneral;
|
|
5005 |
}
|
|
5006 |
}
|
|
5007 |
|
|
5008 |
if ( iCalledOnGet && ( iServiceTableReq->iCaching ) )
|
|
5009 |
{
|
|
5010 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteCacheServiceTablesL - Called when reading service tables - ");
|
|
5011 |
iCalledOnGet = EFalse;
|
|
5012 |
iSimCacheQueue = 0;
|
|
5013 |
iRefreshOngoing = EFalse;
|
|
5014 |
GetServiceTableL( iServiceTableReq->iReqHandle,iServiceTableReq->iTable,
|
|
5015 |
iServiceTableReq->iTableData );
|
|
5016 |
iPendingServiceTableReq = ENoRequest;
|
|
5017 |
|
|
5018 |
if( KErrNone != aError )
|
|
5019 |
{
|
|
5020 |
iCacheServiceTableError = KErrNotFound;
|
|
5021 |
}
|
|
5022 |
|
|
5023 |
}
|
|
5024 |
else
|
|
5025 |
{
|
|
5026 |
iPendingServiceTableReq = ENoRequest;
|
|
5027 |
|
|
5028 |
// Complete request if error occured
|
|
5029 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteCacheServiceTablesL - Completing req if error occurred");
|
|
5030 |
ReqCompleted( reqHandle, ret );
|
|
5031 |
}
|
|
5032 |
}
|
|
5033 |
}
|
|
5034 |
}
|
|
5035 |
|
|
5036 |
// ---------------------------------------------------------------------------
|
|
5037 |
// CMmPhoneTsy::CompleteGetServiceTableL
|
|
5038 |
// Returns the Service Table file that is
|
|
5039 |
// stored on the SIM to the client
|
|
5040 |
// (other items were commented in a header).
|
|
5041 |
// ---------------------------------------------------------------------------
|
|
5042 |
//
|
|
5043 |
void CMmPhoneTsy::CompleteGetServiceTableL(
|
|
5044 |
RMobilePhone::TMobilePhoneServiceTableV1 aTableData,
|
|
5045 |
TInt aErrorCode )
|
|
5046 |
{
|
|
5047 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteGetServiceTableL Error = %d", aErrorCode);
|
|
5048 |
// Check if timeout has happend, complete to all pending ServiceTable
|
|
5049 |
// requests and clear queue
|
|
5050 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetServiceTableL");
|
|
5051 |
if ( KErrTimedOut == aErrorCode )
|
|
5052 |
{
|
|
5053 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetServiceTableL - Timeout happened");
|
|
5054 |
// Reset req handle. Returns the deleted req handle
|
|
5055 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5056 |
EMultimodePhoneGetServiceTable );
|
|
5057 |
|
|
5058 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
5059 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetServiceTableL - in EMultimodePhoneReqHandleUnknown != reqHandle" );
|
|
5060 |
{
|
|
5061 |
// count pending requests and proceed if any
|
|
5062 |
TInt serviceTableRequestsCount = iServiceTableRequests.Count();
|
|
5063 |
|
|
5064 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteGetServiceTableL - serviceTableRequestsCount: %d", serviceTableRequestsCount );
|
|
5065 |
if ( serviceTableRequestsCount )
|
|
5066 |
{
|
|
5067 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetServiceTableL - Completing pending ServiceTableRequests");
|
|
5068 |
// complete pending requests
|
|
5069 |
for ( TInt i = 0; i < serviceTableRequestsCount; i++ )
|
|
5070 |
{
|
|
5071 |
TServiceTableRequests* req = iServiceTableRequests[ i ];
|
|
5072 |
|
|
5073 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteGetServiceTableL - ReqCompleted for pending req withHandle:%d", req->iReqHandle);
|
|
5074 |
ReqCompleted(req->iReqHandle, aErrorCode);
|
|
5075 |
}
|
|
5076 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetServiceTableL - in iServiceTableRequests.ResetAndDestroy()" );
|
|
5077 |
iServiceTableRequests.ResetAndDestroy();
|
|
5078 |
}
|
|
5079 |
}
|
|
5080 |
}
|
|
5081 |
|
|
5082 |
if ( ESIMRequest == iPendingServiceTableCacheReq )
|
|
5083 |
{
|
|
5084 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetServiceTableL got Service Table");
|
|
5085 |
|
|
5086 |
delete iServiceTableDataCache;
|
|
5087 |
iServiceTableDataCache = NULL;
|
|
5088 |
|
|
5089 |
if ( KErrNone == aErrorCode )
|
|
5090 |
{
|
|
5091 |
iServiceTableDataCache =
|
|
5092 |
new (ELeave) RMobilePhone::TMobilePhoneServiceTableV1();
|
|
5093 |
|
|
5094 |
*iServiceTableDataCache = aTableData;
|
|
5095 |
}
|
|
5096 |
|
|
5097 |
// Request USIM Service Table
|
|
5098 |
if ( ( CMmPhoneGsmWcdmaExt::EICCTypeSim3G ==
|
|
5099 |
iMmPhoneExtInterface->CurrentICCType() ) &&
|
|
5100 |
ENoRequest != iPendingServiceTableCacheReq )
|
|
5101 |
{
|
|
5102 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetServiceTableL requesting USIM Service Table");
|
|
5103 |
|
|
5104 |
RMobilePhone::TMobilePhoneServiceTable serviceTable =
|
|
5105 |
RMobilePhone::EUSIMServiceTable;
|
|
5106 |
|
|
5107 |
iPendingServiceTableCacheReq = EUSIMRequest;
|
|
5108 |
|
|
5109 |
// Forward the request to DOS
|
|
5110 |
// packed parameter: RMobilePhone::TMobilePhoneServiceTable
|
|
5111 |
CMmDataPackage dataPackage;
|
|
5112 |
dataPackage.PackData( &serviceTable );
|
|
5113 |
TInt ret = iMessageManager->HandleRequestL(
|
|
5114 |
EMobilePhoneGetServiceTable, &dataPackage );
|
|
5115 |
|
|
5116 |
}
|
|
5117 |
// Complete caching if it is ongoing
|
|
5118 |
else
|
|
5119 |
{
|
|
5120 |
iPendingServiceTableCacheReq = ENoRequest;
|
|
5121 |
CompleteCacheServiceTablesL( aErrorCode );
|
|
5122 |
}
|
|
5123 |
|
|
5124 |
}
|
|
5125 |
else if ( EUSIMRequest == iPendingServiceTableCacheReq )
|
|
5126 |
{
|
|
5127 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetServiceTableL got USIM Service Table");
|
|
5128 |
|
|
5129 |
delete iServiceTableUSIMDataCache;
|
|
5130 |
iServiceTableUSIMDataCache = NULL;
|
|
5131 |
|
|
5132 |
if ( KErrNone == aErrorCode )
|
|
5133 |
{
|
|
5134 |
iServiceTableUSIMDataCache =
|
|
5135 |
new (ELeave) RMobilePhone::TMobilePhoneServiceTableV1();
|
|
5136 |
|
|
5137 |
*iServiceTableUSIMDataCache = aTableData;
|
|
5138 |
}
|
|
5139 |
|
|
5140 |
iPendingServiceTableCacheReq = ENoRequest;
|
|
5141 |
|
|
5142 |
// Complete caching if it is ongoing
|
|
5143 |
CompleteCacheServiceTablesL( aErrorCode );
|
|
5144 |
}
|
|
5145 |
|
|
5146 |
// Update data only if caching is not ongoing and client request
|
|
5147 |
// is pending
|
|
5148 |
if ( ENoRequest != iPendingServiceTableReq &&
|
|
5149 |
ENoRequest == iPendingServiceTableCacheReq )
|
|
5150 |
{
|
|
5151 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetServiceTableL completing client request");
|
|
5152 |
// Complete client request if pending
|
|
5153 |
|
|
5154 |
// Reset req handle. Returns the deleted req handle
|
|
5155 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5156 |
EMultimodePhoneGetServiceTable );
|
|
5157 |
|
|
5158 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
5159 |
{
|
|
5160 |
if( ESIMRequest == iPendingServiceTableReq )
|
|
5161 |
{
|
|
5162 |
delete iServiceTableDataCache;
|
|
5163 |
iServiceTableDataCache = NULL;
|
|
5164 |
|
|
5165 |
if( KErrNone == aErrorCode )
|
|
5166 |
{
|
|
5167 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetServiceTableL copy SIM ST data to client");
|
|
5168 |
iServiceTableDataCache = new (ELeave)
|
|
5169 |
RMobilePhone::TMobilePhoneServiceTableV1();
|
|
5170 |
*iServiceTableDataCache = aTableData;
|
|
5171 |
*iRetTableData = aTableData;
|
|
5172 |
}
|
|
5173 |
}
|
|
5174 |
else // EUSIMRequest
|
|
5175 |
{
|
|
5176 |
delete iServiceTableUSIMDataCache;
|
|
5177 |
iServiceTableUSIMDataCache = NULL;
|
|
5178 |
|
|
5179 |
if( KErrNone == aErrorCode )
|
|
5180 |
{
|
|
5181 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetServiceTableL copy USIM ST data to client");
|
|
5182 |
iServiceTableUSIMDataCache = new (ELeave)
|
|
5183 |
RMobilePhone::TMobilePhoneServiceTableV1();
|
|
5184 |
*iServiceTableUSIMDataCache = aTableData;
|
|
5185 |
*iRetTableData = aTableData;
|
|
5186 |
}
|
|
5187 |
}
|
|
5188 |
|
|
5189 |
iPendingServiceTableReq = ENoRequest;
|
|
5190 |
|
|
5191 |
// Complete request if error occured
|
|
5192 |
ReqCompleted( reqHandle, aErrorCode );
|
|
5193 |
}
|
|
5194 |
}
|
|
5195 |
}
|
|
5196 |
|
|
5197 |
// ---------------------------------------------------------------------------
|
|
5198 |
// CMmPhoneTsy::GetServiceTableCancel
|
|
5199 |
// Cancels GetServiceTable request
|
|
5200 |
// (other items were commented in a header).
|
|
5201 |
// ---------------------------------------------------------------------------
|
|
5202 |
//
|
|
5203 |
TInt CMmPhoneTsy::GetServiceTableCancel (
|
|
5204 |
const TTsyReqHandle aTsyReqHandle )
|
|
5205 |
{
|
|
5206 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetServiceTableCancel");
|
|
5207 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodePhoneGetServiceTable );
|
|
5208 |
ReqCompleted( aTsyReqHandle, KErrCancel );
|
|
5209 |
|
|
5210 |
return KErrNone;
|
|
5211 |
}
|
|
5212 |
|
|
5213 |
// ---------------------------------------------------------------------------
|
|
5214 |
// CMmPhoneTsy::SimRefreshRegisterL
|
|
5215 |
// This method registers TSY for receiving the SIM refresh indications.
|
|
5216 |
// Returns KErrNotSupported (?) if the HW does not support this request.
|
|
5217 |
// (other items were commented in a header).
|
|
5218 |
// ---------------------------------------------------------------------------
|
|
5219 |
//
|
|
5220 |
TInt CMmPhoneTsy::SimRefreshRegisterL()
|
|
5221 |
{
|
|
5222 |
TFLOGSTRING( "TSY: CMmPhoneTsy::SimRefreshRegisterL" );
|
|
5223 |
|
|
5224 |
TInt ret( KErrNone );
|
|
5225 |
|
|
5226 |
// Add all supported file types to be registered for refresh
|
|
5227 |
TUint16 filesToRegister = KCacheAdn | KCacheFdn | KCacheServiceTable
|
|
5228 |
| KCacheALSline;
|
|
5229 |
|
|
5230 |
// parameter: files to register
|
|
5231 |
CMmDataPackage dataPackage;
|
|
5232 |
dataPackage.PackData( &filesToRegister );
|
|
5233 |
|
|
5234 |
// send request to DOS (no packed parameters).
|
|
5235 |
ret = iMessageManager->HandleRequestL(
|
|
5236 |
EMmTsySimRefreshRegisterIPC, &dataPackage );
|
|
5237 |
|
|
5238 |
if ( KErrNone != ret )
|
|
5239 |
{
|
|
5240 |
// the sending has failed
|
|
5241 |
TFLOGSTRING( "TSY: CMmPhoneTsy::SimRefreshRegisterL, Registration for Refresh failed" );
|
|
5242 |
}
|
|
5243 |
|
|
5244 |
return ret;
|
|
5245 |
}
|
|
5246 |
|
|
5247 |
// ---------------------------------------------------------------------------
|
|
5248 |
// CMmPhoneTsy::CompleteSimRefreshRegisterL
|
|
5249 |
// This method is called when SIM refresh register is completed
|
|
5250 |
// (other items were commented in a header).
|
|
5251 |
// ---------------------------------------------------------------------------
|
|
5252 |
//
|
|
5253 |
void CMmPhoneTsy::CompleteSimRefreshRegister(
|
|
5254 |
TInt aErrorCode )
|
|
5255 |
{
|
|
5256 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteSimRefreshRegisterL Error = %d", aErrorCode );
|
|
5257 |
|
|
5258 |
if( KErrNone == aErrorCode )
|
|
5259 |
{
|
|
5260 |
iSimRefreshRegisterOk = ETrue;
|
|
5261 |
}
|
|
5262 |
}
|
|
5263 |
|
|
5264 |
//---------------------------------------------------------------------------
|
|
5265 |
// CMmPhoneTsy::GetSimRefreshRegister
|
|
5266 |
// This method returns Sim refresh registration status
|
|
5267 |
// (other items were commented in a header).
|
|
5268 |
// ---------------------------------------------------------------------------
|
|
5269 |
//
|
|
5270 |
TBool CMmPhoneTsy::GetSimRefreshRegister()
|
|
5271 |
{
|
|
5272 |
TFLOGSTRING2( "TSY: CMmPhoneTsy::GetSimRefreshRegister iSimRefreshRegisterOk = %d", iSimRefreshRegisterOk );
|
|
5273 |
|
|
5274 |
return iSimRefreshRegisterOk;
|
|
5275 |
}
|
|
5276 |
|
|
5277 |
// ---------------------------------------------------------------------------
|
|
5278 |
// CMmPhoneTsy::CompleteUpdateLifeTimer
|
|
5279 |
// This method is called on completion update life time request
|
|
5280 |
// ---------------------------------------------------------------------------
|
|
5281 |
//
|
|
5282 |
void CMmPhoneTsy::CompleteUpdateLifeTimer(
|
|
5283 |
TInt aErrorCode )
|
|
5284 |
{
|
|
5285 |
if( KErrNone != aErrorCode)
|
|
5286 |
{
|
|
5287 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteUpdateLifeTimer Error = %d", aErrorCode );
|
|
5288 |
}
|
|
5289 |
}
|
|
5290 |
|
|
5291 |
//---------------------------------------------------------------------------
|
|
5292 |
// CMmPhoneTsy::GetSimRefreshRegister
|
|
5293 |
// This method starts new cache for for specific phonebook
|
|
5294 |
// (other items were commented in a header).
|
|
5295 |
// ---------------------------------------------------------------------------
|
|
5296 |
//
|
|
5297 |
TInt CMmPhoneTsy::StartNewCacheL(
|
|
5298 |
TUint8 aPhoneBookType )
|
|
5299 |
{
|
|
5300 |
|
|
5301 |
TInt ret( KErrNone );
|
|
5302 |
|
|
5303 |
//Check cache by phonebook type
|
|
5304 |
if( KADNPhoneBook == aPhoneBookType )
|
|
5305 |
{
|
|
5306 |
iSimCacheQueue = KCacheAdn;
|
|
5307 |
}
|
|
5308 |
else if( KFDNPhoneBook == aPhoneBookType )
|
|
5309 |
{
|
|
5310 |
iSimCacheQueue = KCacheFdn;
|
|
5311 |
}
|
|
5312 |
else
|
|
5313 |
ret = KErrArgument;
|
|
5314 |
|
|
5315 |
//If Ok Start cache
|
|
5316 |
if( KErrNone == ret )
|
|
5317 |
{
|
|
5318 |
CacheNextL();
|
|
5319 |
}
|
|
5320 |
|
|
5321 |
return ret;
|
|
5322 |
}
|
|
5323 |
|
|
5324 |
// ---------------------------------------------------------------------------
|
|
5325 |
// CMmPhoneTsy::IsRefreshOngoing
|
|
5326 |
// This method is called when it is needed to know whether caching has been
|
|
5327 |
// initialized by SIM (refresh)
|
|
5328 |
// (other items were commented in a header).
|
|
5329 |
// ---------------------------------------------------------------------------
|
|
5330 |
//
|
|
5331 |
TBool CMmPhoneTsy::IsRefreshOngoing()
|
|
5332 |
{
|
|
5333 |
return iRefreshOngoing;
|
|
5334 |
}
|
|
5335 |
|
|
5336 |
// ---------------------------------------------------------------------------
|
|
5337 |
// CMmPhoneTsy::CompleteSimRefreshNowL
|
|
5338 |
// This method is called when "refresh now" indication has been received from
|
|
5339 |
// by SIM and re-caching is needed
|
|
5340 |
// (other items were commented in a header).
|
|
5341 |
// ---------------------------------------------------------------------------
|
|
5342 |
//
|
|
5343 |
void CMmPhoneTsy::CompleteSimRefreshNowL(
|
|
5344 |
TUint16 aFilesToRefresh )
|
|
5345 |
{
|
|
5346 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteSimRefreshNowL filemask: %d", aFilesToRefresh);
|
|
5347 |
|
|
5348 |
// Set flag to indicate that refresh has started
|
|
5349 |
iRefreshOngoing = ETrue;
|
|
5350 |
|
|
5351 |
// Fill cache queue
|
|
5352 |
iSimCacheQueue = aFilesToRefresh;
|
|
5353 |
|
|
5354 |
// Check if the IMSI has changed and reset ME ALS info
|
|
5355 |
GetSubscriberIdForTSYL();
|
|
5356 |
|
|
5357 |
// Cache service tables first
|
|
5358 |
if( iSimCacheQueue && ( KCacheServiceTable & iSimCacheQueue ) )
|
|
5359 |
{
|
|
5360 |
CacheServiceTablesL();
|
|
5361 |
}
|
|
5362 |
|
|
5363 |
// Start caching..
|
|
5364 |
if( iSimCacheQueue && ( KCacheServiceTable != iSimCacheQueue ) )
|
|
5365 |
{
|
|
5366 |
CacheNextL();
|
|
5367 |
}
|
|
5368 |
}
|
|
5369 |
|
|
5370 |
|
|
5371 |
// ---------------------------------------------------------------------------
|
|
5372 |
// CMmPhoneTsy::CacheNextL
|
|
5373 |
// This method is called when SIM caching is needed ( boot or refresh, for now
|
|
5374 |
// this is only implemented for refresh case ) for some SIM file.
|
|
5375 |
//
|
|
5376 |
// The following restriction applies to caching:
|
|
5377 |
// ADN can not be cached if FDN is activated
|
|
5378 |
// (other items were commented in a header).
|
|
5379 |
// ---------------------------------------------------------------------------
|
|
5380 |
//
|
|
5381 |
TBool CMmPhoneTsy::CacheNextL()
|
|
5382 |
{
|
|
5383 |
TBool result(ETrue);
|
|
5384 |
|
|
5385 |
//Some files required for caching?
|
|
5386 |
if( iSimCacheQueue )
|
|
5387 |
{
|
|
5388 |
// REFRESH ADN or FDN
|
|
5389 |
TBuf<0x80> pbRequested;
|
|
5390 |
TUint16 resetFlag(0);
|
|
5391 |
TBool cacheStarted = EFalse;
|
|
5392 |
|
|
5393 |
//FDN requested? (FDN has the first priority)
|
|
5394 |
if( KCacheFdn & iSimCacheQueue )
|
|
5395 |
{
|
|
5396 |
TFLOGSTRING( "TSY: CMmPhoneTsy::CacheNextL - FDN" );
|
|
5397 |
pbRequested = KETelIccFdnPhoneBook;
|
|
5398 |
resetFlag = KCacheFdn;
|
|
5399 |
}
|
|
5400 |
else if( KCacheALSline & iSimCacheQueue )
|
|
5401 |
{
|
|
5402 |
TFLOGSTRING( "TSY: CMmPhoneTsy::CacheNextL - ALS" );
|
|
5403 |
ResetMEAlsInfo();
|
|
5404 |
pbRequested = KNullDesC;
|
|
5405 |
cacheStarted = ETrue;
|
|
5406 |
}
|
|
5407 |
//ADN requested?
|
|
5408 |
else if( KCacheAdn & iSimCacheQueue )
|
|
5409 |
{
|
|
5410 |
TFLOGSTRING( "TSY: CMmPhoneTsy::CacheNextL - ADN" );
|
|
5411 |
//NOTE: Here should be added the checking of FDN active state
|
|
5412 |
pbRequested = KETelIccAdnPhoneBook;
|
|
5413 |
resetFlag = KCacheAdn;
|
|
5414 |
}
|
|
5415 |
//UNKNOWN request (erroneous requests, all valid cases have been
|
|
5416 |
//checked and the queue can be reset)
|
|
5417 |
else
|
|
5418 |
{
|
|
5419 |
TFLOGSTRING( "TSY: CMmPhoneTsy::CacheNextL - Unknown" );
|
|
5420 |
pbRequested = KNullDesC;
|
|
5421 |
resetFlag = iSimCacheQueue;
|
|
5422 |
}
|
|
5423 |
|
|
5424 |
//PHONE BOOK Request: Is there a phonebook available?
|
|
5425 |
if( (pbRequested!=KNullDesC) && (iPBList) )
|
|
5426 |
{
|
|
5427 |
TInt numberOfPBooks = iPBList->GetNumberOfObjects();
|
|
5428 |
TFLOGSTRING2( "TSY: CMmPhoneTsy::CacheNextL - Num Of PBs: %d", numberOfPBooks );
|
|
5429 |
|
|
5430 |
//Browse through the phonebook names for the one required
|
|
5431 |
for( TInt i=0; i < numberOfPBooks; i++ )
|
|
5432 |
{
|
|
5433 |
CMmPhoneBookStoreTsy* pbStore = iPBList->GetMmPBByIndex( i );
|
|
5434 |
|
|
5435 |
//If the correct phonebook is found, cache it's entries
|
|
5436 |
if ( !pbStore->PhoneBookName()->CompareF( pbRequested ) )
|
|
5437 |
{
|
|
5438 |
// Cancel cache first
|
|
5439 |
if ( ( pbRequested == KETelIccFdnPhoneBook ) ||
|
|
5440 |
( pbRequested == KETelIccAdnPhoneBook ) )
|
|
5441 |
{
|
|
5442 |
// Create package
|
|
5443 |
CPhoneBookDataPackage package;
|
|
5444 |
// Set package data
|
|
5445 |
package.SetPhoneBookName( pbRequested );
|
|
5446 |
TRAP_IGNORE( MessageManager()->HandleRequestL(
|
|
5447 |
EMmTsyPhoneBookStoreCacheCancelIPC, &package ); );
|
|
5448 |
|
|
5449 |
#if ( TF_LOGGING_METHOD > 0 )
|
|
5450 |
if ( pbRequested == KETelIccFdnPhoneBook )
|
|
5451 |
{
|
|
5452 |
TFLOGSTRING( "TSY: CMmPhoneTsy::CacheNextL - CancelCache for : KETelIccFdnPhoneBook" );
|
|
5453 |
}
|
|
5454 |
else
|
|
5455 |
{
|
|
5456 |
TFLOGSTRING( "TSY: CMmPhoneTsy::CacheNextL - CancelCache for : KETelIccAdnPhoneBook" );
|
|
5457 |
}
|
|
5458 |
#endif // TF_LOGGING_METHOD
|
|
5459 |
}
|
|
5460 |
// perform the various stages of phonebook
|
|
5461 |
// cache re-initialisation
|
|
5462 |
TFLOGSTRING( "TSY: CMmPhoneTsy::CacheNextL - Resetting cache.");
|
|
5463 |
pbStore->ResetCacheReady();
|
|
5464 |
pbStore->ResetInitialisationStatus();
|
|
5465 |
pbStore->ResetCache();
|
|
5466 |
TFLOGSTRING( "TSY: CMmPhoneTsy::CacheNextL -> Cache entries" );
|
|
5467 |
pbStore->CacheEntriesL();
|
|
5468 |
|
|
5469 |
cacheStarted = ETrue;
|
|
5470 |
break;
|
|
5471 |
}
|
|
5472 |
}
|
|
5473 |
}
|
|
5474 |
|
|
5475 |
//CACHING not started
|
|
5476 |
//phonebook does not exist, or unknown request,
|
|
5477 |
//so the file is removed from the cache queue
|
|
5478 |
if( !cacheStarted )
|
|
5479 |
{
|
|
5480 |
TFLOGSTRING( "TSY: CMmPhoneTsy::CacheNextL - No PB Could be found, or Unknown request" );
|
|
5481 |
CompleteCacheSimL( resetFlag, ETrue ); //complete with error
|
|
5482 |
}
|
|
5483 |
}
|
|
5484 |
//more files in the queue?
|
|
5485 |
result = ( iSimCacheQueue )? ETrue : EFalse;
|
|
5486 |
|
|
5487 |
TFLOGSTRING2( "TSY: CMmPhoneTsy::CacheNextL: (Success/Fail = 1/0) %d",(TInt)result );
|
|
5488 |
return result;
|
|
5489 |
}
|
|
5490 |
|
|
5491 |
|
|
5492 |
// ---------------------------------------------------------------------------
|
|
5493 |
// CMmPhoneTsy::CompleteCacheSimL
|
|
5494 |
// This method is called when caching for any of SIM files is finished. The
|
|
5495 |
// list of files left to be cached is updated here.
|
|
5496 |
// (other items were commented in a header).
|
|
5497 |
// ---------------------------------------------------------------------------
|
|
5498 |
//
|
|
5499 |
void CMmPhoneTsy::CompleteCacheSimL(
|
|
5500 |
TUint8 aFileType,
|
|
5501 |
TBool aReadError)
|
|
5502 |
{
|
|
5503 |
TFLOGSTRING2( "TSY: CMmPhoneTsy::CompleteCacheSimL, FileType: 0x%x", aFileType );
|
|
5504 |
|
|
5505 |
TBool filesInCacheQueue(EFalse); //By default: "no more files in cache"
|
|
5506 |
|
|
5507 |
// Remove file from caching queue
|
|
5508 |
iSimCacheQueue &= ~aFileType;
|
|
5509 |
|
|
5510 |
// Start caching the next on queue, if queue is not empty
|
|
5511 |
// If Service Table cahing is completed and ather caching is ongoing
|
|
5512 |
// do not cache next
|
|
5513 |
#ifdef USING_CTSY_DISPATCHER
|
|
5514 |
//believed to be a defect, comparing to aFileType will cause a call to CacheNextL on a queue
|
|
5515 |
//containing only KCacheServiceTable and result in a Refresh Done IPC, with ETrue as an error
|
|
5516 |
if ( iSimCacheQueue == KCacheServiceTable )
|
|
5517 |
#else
|
|
5518 |
if ( aFileType == KCacheServiceTable )
|
|
5519 |
#endif //USING_CTSY_DISPATCHER
|
|
5520 |
{
|
|
5521 |
filesInCacheQueue = iSimCacheQueue;
|
|
5522 |
}
|
|
5523 |
else
|
|
5524 |
{
|
|
5525 |
filesInCacheQueue = (!iSimCacheQueue)?EFalse:CacheNextL();
|
|
5526 |
}
|
|
5527 |
|
|
5528 |
// Here it must be checked whether caching was finished.
|
|
5529 |
// Server must still be notified for completion. Complete
|
|
5530 |
// also if error occured, this means that caching is
|
|
5531 |
// interrupted
|
|
5532 |
if( ( !filesInCacheQueue || aReadError ) && !(iBootState.iCachingActive) )
|
|
5533 |
{
|
|
5534 |
// Complete the refresh
|
|
5535 |
NotifySimRefreshCompletionL( aReadError );
|
|
5536 |
}
|
|
5537 |
else
|
|
5538 |
{
|
|
5539 |
TFLOGSTRING( "TSY: CMmPhoneTsy::CompleteCacheSimL, caching still in progress." );
|
|
5540 |
}
|
|
5541 |
}
|
|
5542 |
|
|
5543 |
// ---------------------------------------------------------------------------
|
|
5544 |
// CMmPhoneTsy::NotifySimRefreshCompletionL
|
|
5545 |
// Notifying server that refresh has been completed
|
|
5546 |
// (other items were commented in a header).
|
|
5547 |
// ---------------------------------------------------------------------------
|
|
5548 |
//
|
|
5549 |
void CMmPhoneTsy::NotifySimRefreshCompletionL(
|
|
5550 |
TBool aReadError )
|
|
5551 |
{
|
|
5552 |
TFLOGSTRING2( "TSY: CMmPhoneTsy::NotifySimRefreshCompletionL error = %d",aReadError );
|
|
5553 |
|
|
5554 |
// Refresh is finished, update flag
|
|
5555 |
iRefreshOngoing = EFalse;
|
|
5556 |
|
|
5557 |
// Make sure that the list gets empty
|
|
5558 |
iSimCacheQueue = 0;
|
|
5559 |
|
|
5560 |
// Parameter: error indicator
|
|
5561 |
CMmDataPackage dataPackage;
|
|
5562 |
dataPackage.PackData( &aReadError );
|
|
5563 |
|
|
5564 |
// Notify server for completion of refresh
|
|
5565 |
iMessageManager->HandleRequestL(
|
|
5566 |
EMmTsySimRefreshDoneIPC, &dataPackage );
|
|
5567 |
}
|
|
5568 |
|
|
5569 |
// ---------------------------------------------------------------------------
|
|
5570 |
// CMmPhoneTsy::IMSAuthenticationL
|
|
5571 |
// Requests authentication data generatation from input parameters
|
|
5572 |
// (other items were commented in a header).
|
|
5573 |
// ---------------------------------------------------------------------------
|
|
5574 |
//
|
|
5575 |
TInt CMmPhoneTsy::ImsAuthenticationL(
|
|
5576 |
TDes8* aAuthenticationData )
|
|
5577 |
{
|
|
5578 |
TFLOGSTRING("TSY: CMmPhoneTsy::ImsAuthenticationL");
|
|
5579 |
|
|
5580 |
TInt ret = KErrServerBusy;
|
|
5581 |
|
|
5582 |
// Check if request handle already exists
|
|
5583 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
5584 |
EMultimodePhoneIMSAuthenticate );
|
|
5585 |
|
|
5586 |
if ( EMultimodePhoneReqHandleUnknown == reqHandle )
|
|
5587 |
{
|
|
5588 |
ret = KErrArgument;
|
|
5589 |
if ( sizeof( RMobilePhone::TImsAuthenticateDataV5Pckg ) <=
|
|
5590 |
aAuthenticationData->MaxLength() )
|
|
5591 |
{
|
|
5592 |
// Unpack entry parameter
|
|
5593 |
RMobilePhone::TImsAuthenticateDataV5Pckg* entryPckg =
|
|
5594 |
REINTERPRET_CAST
|
|
5595 |
( RMobilePhone::TImsAuthenticateDataV5Pckg*, aAuthenticationData );
|
|
5596 |
RMobilePhone::TImsAuthenticateDataV5& authData = ( *entryPckg )();
|
|
5597 |
|
|
5598 |
if ( KEtelExtMultimodeV5 == authData.ExtensionId() )
|
|
5599 |
{
|
|
5600 |
// Save pointer to client space
|
|
5601 |
iIMSAuthenticationData = aAuthenticationData;
|
|
5602 |
|
|
5603 |
CMmDataPackage authenticationDataPackage;
|
|
5604 |
authenticationDataPackage.PackData( &authData );
|
|
5605 |
|
|
5606 |
ret = ( MessageManager()->HandleRequestL(
|
|
5607 |
EMobilePhoneIMSAuthenticate, &authenticationDataPackage ) );
|
|
5608 |
|
|
5609 |
// Store request handle if KErrNone returned.
|
|
5610 |
if ( KErrNone == ret )
|
|
5611 |
{
|
|
5612 |
iReqHandleType = EMultimodePhoneIMSAuthenticate;
|
|
5613 |
}
|
|
5614 |
}
|
|
5615 |
}
|
|
5616 |
}
|
|
5617 |
|
|
5618 |
return ret;
|
|
5619 |
}
|
|
5620 |
|
|
5621 |
// ---------------------------------------------------------------------------
|
|
5622 |
// CMmPhoneTsy::CompleteImsAuthentication
|
|
5623 |
// Requests authentication data generatation from input parameters
|
|
5624 |
// (other items were commented in a header).
|
|
5625 |
// ---------------------------------------------------------------------------
|
|
5626 |
//
|
|
5627 |
void CMmPhoneTsy::CompleteImsAuthentication(
|
|
5628 |
CMmDataPackage* aDataPackage,
|
|
5629 |
TInt aResult )
|
|
5630 |
{
|
|
5631 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteImsAuthentication");
|
|
5632 |
|
|
5633 |
// reset req handle. Returns the deleted req handle
|
|
5634 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5635 |
EMultimodePhoneIMSAuthenticate );
|
|
5636 |
if ( KErrNone == aResult )
|
|
5637 |
{
|
|
5638 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
5639 |
{
|
|
5640 |
RMobilePhone::TImsAuthenticateDataV5* authenticationData;
|
|
5641 |
|
|
5642 |
aDataPackage->UnPackData( &authenticationData );
|
|
5643 |
|
|
5644 |
RMobilePhone::TImsAuthenticateDataV5Pckg* entryPckg =
|
|
5645 |
REINTERPRET_CAST
|
|
5646 |
( RMobilePhone::TImsAuthenticateDataV5Pckg*,
|
|
5647 |
iIMSAuthenticationData );
|
|
5648 |
RMobilePhone::TImsAuthenticateDataV5& authData = ( *entryPckg )();
|
|
5649 |
|
|
5650 |
// Copy data to client
|
|
5651 |
authData.iRES.Copy( authenticationData->iRES );
|
|
5652 |
authData.iCK.Copy( authenticationData->iCK );
|
|
5653 |
authData.iIK.Copy( authenticationData->iIK );
|
|
5654 |
|
|
5655 |
iIMSAuthenticationData = NULL;
|
|
5656 |
|
|
5657 |
ReqCompleted( reqHandle, aResult );
|
|
5658 |
}
|
|
5659 |
}
|
|
5660 |
else if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
5661 |
{
|
|
5662 |
if ( KErrTimedOut == aResult )
|
|
5663 |
{
|
|
5664 |
iIMSAuthenticationData = NULL;
|
|
5665 |
}
|
|
5666 |
else
|
|
5667 |
{
|
|
5668 |
RMobilePhone::TImsAuthenticateDataV5* authenticationData;
|
|
5669 |
aDataPackage->UnPackData( &authenticationData );
|
|
5670 |
|
|
5671 |
RMobilePhone::TImsAuthenticateDataV5Pckg* entryPckg =
|
|
5672 |
REINTERPRET_CAST
|
|
5673 |
( RMobilePhone::TImsAuthenticateDataV5Pckg*,
|
|
5674 |
iIMSAuthenticationData );
|
|
5675 |
RMobilePhone::TImsAuthenticateDataV5& authData = ( *entryPckg )();
|
|
5676 |
|
|
5677 |
// It is possible that request is completed whithout any data
|
|
5678 |
// inside datapackage
|
|
5679 |
if ( NULL != authenticationData )
|
|
5680 |
{
|
|
5681 |
authData.iAUTS.Copy( authenticationData->iAUTS );
|
|
5682 |
|
|
5683 |
iIMSAuthenticationData = NULL;
|
|
5684 |
}
|
|
5685 |
}
|
|
5686 |
ReqCompleted( reqHandle, aResult );
|
|
5687 |
}
|
|
5688 |
}
|
|
5689 |
|
|
5690 |
// ---------------------------------------------------------------------------
|
|
5691 |
// CMmPhoneTsy::ImsAuthenticationCancel
|
|
5692 |
// Cancels sim authentication request
|
|
5693 |
// (other items were commented in a header).
|
|
5694 |
// ---------------------------------------------------------------------------
|
|
5695 |
//
|
|
5696 |
TInt CMmPhoneTsy::ImsAuthenticationCancel()
|
|
5697 |
{
|
|
5698 |
TFLOGSTRING("TSY: CMmPhoneTsy::ImsAuthenticationCancel");
|
|
5699 |
// reset the reqhandle
|
|
5700 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5701 |
EMultimodePhoneIMSAuthenticate );
|
|
5702 |
|
|
5703 |
// reset pointer to client data
|
|
5704 |
iIMSAuthenticationData = NULL;
|
|
5705 |
|
|
5706 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
5707 |
{
|
|
5708 |
// complete
|
|
5709 |
ReqCompleted( reqHandle, KErrCancel );
|
|
5710 |
}
|
|
5711 |
|
|
5712 |
return KErrNone;
|
|
5713 |
}
|
|
5714 |
|
|
5715 |
// ---------------------------------------------------------------------------
|
|
5716 |
// CMmPhoneTsy::GetMailboxNumbers
|
|
5717 |
// Requests mailbox numbers identifier information
|
|
5718 |
// (other items were commented in a header).
|
|
5719 |
// ---------------------------------------------------------------------------
|
|
5720 |
//
|
|
5721 |
TInt CMmPhoneTsy::GetMailboxNumbersL(
|
|
5722 |
TDes8* aMailBox )
|
|
5723 |
{
|
|
5724 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetMailboxNumbersL");
|
|
5725 |
TInt ret = KErrServerBusy;
|
|
5726 |
|
|
5727 |
// Check if request handle already exists
|
|
5728 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
5729 |
EMultimodePhoneGetMailboxNumbers );
|
|
5730 |
|
|
5731 |
if ( EMultimodePhoneReqHandleUnknown == reqHandle )
|
|
5732 |
{
|
|
5733 |
ret = KErrArgument;
|
|
5734 |
if ( sizeof( RMobilePhone::TMobilePhoneVoicemailIdsV3 ) <=
|
|
5735 |
aMailBox->MaxLength() )
|
|
5736 |
{
|
|
5737 |
// Unpack entry parameter
|
|
5738 |
RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg* entryPckg =
|
|
5739 |
REINTERPRET_CAST
|
|
5740 |
( RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg*, aMailBox );
|
|
5741 |
|
|
5742 |
iMailboxData = ( *entryPckg )();
|
|
5743 |
|
|
5744 |
if ( KETelExtMultimodeV3 == iMailboxData.ExtensionId() )
|
|
5745 |
{
|
|
5746 |
// Save pointer to client space
|
|
5747 |
iMailBoxData = aMailBox;
|
|
5748 |
|
|
5749 |
// Check that VMBX book store was initilized...
|
|
5750 |
TBool found = EFalse;
|
|
5751 |
for( TInt i = 0; (!found) && (i < iPBList->GetNumberOfObjects()); i++ )
|
|
5752 |
{
|
|
5753 |
//Get pbStore object
|
|
5754 |
CMmPhoneBookStoreTsy* pbStore = iPBList->GetMmPBByIndex( i );
|
|
5755 |
//Check if the current PB is the object that we are trying to find.
|
|
5756 |
if ( 0 == pbStore->PhoneBookName()->CompareF( KETelIccVoiceMailBox ) )
|
|
5757 |
{
|
|
5758 |
found = ETrue;
|
|
5759 |
if( !pbStore->IsPBInitDone() )
|
|
5760 |
{
|
|
5761 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetMailboxNumbersL VoiceMailBox initilizing was not complete... Waiting for completion");
|
|
5762 |
iReqHandleType = EMultimodePhoneGetMailboxNumbers;
|
|
5763 |
return KErrNone;
|
|
5764 |
}
|
|
5765 |
}
|
|
5766 |
}
|
|
5767 |
if(!found)
|
|
5768 |
{
|
|
5769 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetMailboxNumbersL VoiceMailBox should be created...");
|
|
5770 |
iMmPhoneBookStoreTsy =
|
|
5771 |
CMmPhoneBookStoreTsy::NewL( this, KETelIccVoiceMailBox );
|
|
5772 |
|
|
5773 |
TInt addPBSucceeded = iPBList->AddObject( iMmPhoneBookStoreTsy );
|
|
5774 |
if( !iMmPhoneBookStoreTsy->IsPBInitDone() )
|
|
5775 |
{
|
|
5776 |
iReqHandleType = EMultimodePhoneGetMailboxNumbers;
|
|
5777 |
return addPBSucceeded;
|
|
5778 |
}
|
|
5779 |
}
|
|
5780 |
|
|
5781 |
|
|
5782 |
CMmDataPackage mailBoxDataPackage;
|
|
5783 |
mailBoxDataPackage.PackData( &iMailboxData );
|
|
5784 |
|
|
5785 |
ret = ( MessageManager()->HandleRequestL(
|
|
5786 |
EMobilePhoneGetMailboxNumbers, &mailBoxDataPackage ) );
|
|
5787 |
|
|
5788 |
// Store request handle if KErrNone
|
|
5789 |
if ( KErrNone == ret )
|
|
5790 |
{
|
|
5791 |
iReqHandleType = EMultimodePhoneGetMailboxNumbers;
|
|
5792 |
}
|
|
5793 |
}
|
|
5794 |
}
|
|
5795 |
}
|
|
5796 |
return ret;
|
|
5797 |
}
|
|
5798 |
|
|
5799 |
// ---------------------------------------------------------------------------
|
|
5800 |
// CMmPhoneTsy::CompleteGetMailboxNumbers
|
|
5801 |
// Completes GetMailboxNumbers request
|
|
5802 |
// (other items were commented in a header).
|
|
5803 |
// ---------------------------------------------------------------------------
|
|
5804 |
//
|
|
5805 |
void CMmPhoneTsy::CompleteGetMailboxNumbers(
|
|
5806 |
CMmDataPackage* aDataPackage,
|
|
5807 |
TInt aResult )
|
|
5808 |
{
|
|
5809 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteGetMailboxNumbers");
|
|
5810 |
|
|
5811 |
// reset req handle. Returns the deleted req handle
|
|
5812 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5813 |
EMultimodePhoneGetMailboxNumbers );
|
|
5814 |
|
|
5815 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
5816 |
{
|
|
5817 |
if ( KErrNone == aResult )
|
|
5818 |
{
|
|
5819 |
RMobilePhone::TMobilePhoneVoicemailIdsV3* mailboxData;
|
|
5820 |
|
|
5821 |
aDataPackage->UnPackData( mailboxData );
|
|
5822 |
|
|
5823 |
RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg* entryPckg =
|
|
5824 |
REINTERPRET_CAST
|
|
5825 |
( RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg*, iMailBoxData );
|
|
5826 |
|
|
5827 |
RMobilePhone::TMobilePhoneVoicemailIdsV3& clientData = ( *entryPckg )();
|
|
5828 |
|
|
5829 |
// Copy data to client
|
|
5830 |
clientData = *mailboxData;
|
|
5831 |
|
|
5832 |
iMailBoxData = NULL;
|
|
5833 |
}
|
|
5834 |
ReqCompleted( reqHandle, aResult );
|
|
5835 |
}
|
|
5836 |
}
|
|
5837 |
|
|
5838 |
// ---------------------------------------------------------------------------
|
|
5839 |
// CMmPhoneTsy::GetMailboxNumbersCancel
|
|
5840 |
// Cancels GetMailboxNumbers request
|
|
5841 |
// (other items were commented in a header).
|
|
5842 |
// ---------------------------------------------------------------------------
|
|
5843 |
//
|
|
5844 |
TInt CMmPhoneTsy::GetMailboxNumbersCancel()
|
|
5845 |
{
|
|
5846 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetMailboxNumbersCancel");
|
|
5847 |
// reset the reqhandle
|
|
5848 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
5849 |
EMultimodePhoneGetMailboxNumbers );
|
|
5850 |
|
|
5851 |
// reset pointer to client data
|
|
5852 |
iMailBoxData = NULL;
|
|
5853 |
|
|
5854 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
5855 |
{
|
|
5856 |
// complete
|
|
5857 |
ReqCompleted( reqHandle, KErrCancel );
|
|
5858 |
}
|
|
5859 |
|
|
5860 |
return KErrNone;
|
|
5861 |
}
|
|
5862 |
|
|
5863 |
// ---------------------------------------------------------------------------
|
|
5864 |
// CMmPhoneTsy::GetStaticExtensionMode
|
|
5865 |
// This method can be used to find out what protocol mode is
|
|
5866 |
// currently active
|
|
5867 |
// (other items were commented in a header).
|
|
5868 |
// ---------------------------------------------------------------------------
|
|
5869 |
//
|
|
5870 |
void CMmPhoneTsy::GetStaticExtensionMode(
|
|
5871 |
RMobilePhone::TMobilePhoneNetworkMode* aMode )
|
|
5872 |
{
|
|
5873 |
iMmPhoneExtInterface->GetStaticExtensionMode( aMode );
|
|
5874 |
}
|
|
5875 |
|
|
5876 |
// ---------------------------------------------------------------------------
|
|
5877 |
// CMmPhoneTsy::RemoveLine
|
|
5878 |
// Marks a line as removed in LineList and recalculates
|
|
5879 |
// phone capablities
|
|
5880 |
// (other items were commented in a header).
|
|
5881 |
// ---------------------------------------------------------------------------
|
|
5882 |
//
|
|
5883 |
void CMmPhoneTsy::RemoveLine(
|
|
5884 |
const TName& aLineName )
|
|
5885 |
{
|
|
5886 |
TUint newCaps ( 0 );
|
|
5887 |
CMmLineTsy* mmLine = NULL;
|
|
5888 |
RMobilePhone::TMobileService lineMode ( RMobilePhone::EServiceUnspecified );
|
|
5889 |
|
|
5890 |
// remove line
|
|
5891 |
iLineList->RemoveLine(aLineName);
|
|
5892 |
|
|
5893 |
// recalculate phone caps
|
|
5894 |
for( TInt i = 0; i < iLineList->GetNumberOfObjects(); i++ )
|
|
5895 |
{
|
|
5896 |
mmLine = REINTERPRET_CAST( CMmLineTsy*,
|
|
5897 |
iLineList->GetObjectByIndex(i) );
|
|
5898 |
if ( mmLine )
|
|
5899 |
{
|
|
5900 |
lineMode = mmLine->LineMode();
|
|
5901 |
if ( RMobilePhone::EVoiceService == lineMode )
|
|
5902 |
{
|
|
5903 |
newCaps += RPhone::KCapsVoice;
|
|
5904 |
}
|
|
5905 |
else if ( RMobilePhone::EAuxVoiceService == lineMode )
|
|
5906 |
{
|
|
5907 |
newCaps += RPhone::KCapsVoice;
|
|
5908 |
}
|
|
5909 |
else if ( RMobilePhone::ECircuitDataService == lineMode )
|
|
5910 |
{
|
|
5911 |
newCaps += RPhone::KCapsData +
|
|
5912 |
RPhone::KCapsEventModemDetection +
|
|
5913 |
RPhone::KCapsStealCommPort;
|
|
5914 |
}
|
|
5915 |
}
|
|
5916 |
}
|
|
5917 |
|
|
5918 |
//Notify caps change if they have changed.
|
|
5919 |
if ( newCaps != iPhoneCaps.iFlags )
|
|
5920 |
{
|
|
5921 |
iPhoneCaps.iFlags = newCaps;
|
|
5922 |
CompleteNotifyCapsChange();
|
|
5923 |
}
|
|
5924 |
}
|
|
5925 |
|
|
5926 |
// ---------------------------------------------------------------------------
|
|
5927 |
// CMmPhoneTsy::MessageManager
|
|
5928 |
// Returns a pointer to iMessageManager object
|
|
5929 |
// (other items were commented in a header).
|
|
5930 |
// ---------------------------------------------------------------------------
|
|
5931 |
//
|
|
5932 |
CMmMessageManagerBase* CMmPhoneTsy::MessageManager()
|
|
5933 |
{
|
|
5934 |
return iMessageManager;
|
|
5935 |
}
|
|
5936 |
|
|
5937 |
#ifdef REQHANDLE_TIMER
|
|
5938 |
|
|
5939 |
// ---------------------------------------------------------------------------
|
|
5940 |
// CMmPhoneTsy::GetTimeStampStore
|
|
5941 |
// Returns pointer to the response timer store
|
|
5942 |
// (other items were commented in a header).
|
|
5943 |
// ---------------------------------------------------------------------------
|
|
5944 |
//
|
|
5945 |
CResponseTimerStore* CMmPhoneTsy::GetTimeStampStore()
|
|
5946 |
{
|
|
5947 |
return iTimeStampStore;
|
|
5948 |
}
|
|
5949 |
|
|
5950 |
// ---------------------------------------------------------------------------
|
|
5951 |
// CMmPhoneTsy::GetTimer
|
|
5952 |
// Returns pointer to the response timer
|
|
5953 |
// (other items were commented in a header).
|
|
5954 |
// ---------------------------------------------------------------------------
|
|
5955 |
//
|
|
5956 |
CResponseTimer* CMmPhoneTsy::GetTimer()
|
|
5957 |
{
|
|
5958 |
return iReqHandleTimer;
|
|
5959 |
}
|
|
5960 |
|
|
5961 |
// ---------------------------------------------------------------------------
|
|
5962 |
// CMmPhoneTsy::TimerExpired
|
|
5963 |
// Completes the request due timer expiration
|
|
5964 |
// (other items were commented in a header).
|
|
5965 |
// ---------------------------------------------------------------------------
|
|
5966 |
//
|
|
5967 |
void CMmPhoneTsy::TimerExpired(
|
|
5968 |
CTelObject *aObject,
|
|
5969 |
TInt aReqHandleType,
|
|
5970 |
TInt aIPC )
|
|
5971 |
{
|
|
5972 |
//Because the timer has expired, send this default error value to
|
|
5973 |
//the compting object.
|
|
5974 |
TInt error( KErrTimedOut );
|
|
5975 |
|
|
5976 |
//Find the correct tsy object and call its' Complete function
|
|
5977 |
|
|
5978 |
//Check if the object is the Phone object
|
|
5979 |
if( this == aObject )
|
|
5980 |
{
|
|
5981 |
TFLOGSTRING("TSY: CMmPhoneTsy::TimerExpired - this == aObject");
|
|
5982 |
//call phone object to complete this request
|
|
5983 |
this->Complete( aReqHandleType, error );
|
|
5984 |
}
|
|
5985 |
|
|
5986 |
//Line does not require timer
|
|
5987 |
TInt i( 0 );
|
|
5988 |
|
|
5989 |
//Check if the object is a Call object
|
|
5990 |
for ( i = 0; i < iCallList->GetNumberOfObjects(); i++ )
|
|
5991 |
{
|
|
5992 |
TFLOGSTRING("TSY: CMmPhoneTsy::TimerExpired - iCallList->GetNumberOfObjects()");
|
|
5993 |
//Get call object
|
|
5994 |
CMmCallTsy* call = iCallList->GetMmCallByIndex( i );
|
|
5995 |
//check if the current call is the object that we are
|
|
5996 |
//trying to find
|
|
5997 |
if( call == aObject )
|
|
5998 |
{
|
|
5999 |
TFLOGSTRING("TSY: CMmPhoneTsy::TimerExpired - call == aObject");
|
|
6000 |
//call the complete method
|
|
6001 |
call->Complete( aReqHandleType, error );
|
|
6002 |
//object found, break
|
|
6003 |
break;
|
|
6004 |
}
|
|
6005 |
}
|
|
6006 |
|
|
6007 |
// Check if the object is a ConferenceCall object
|
|
6008 |
if ( iMmConferenceCall == aObject )
|
|
6009 |
{
|
|
6010 |
TFLOGSTRING("TSY: CMmPhoneTsy::TimerExpired - iMmConferenceCall");
|
|
6011 |
iMmConferenceCall->Complete( aReqHandleType, error );
|
|
6012 |
}
|
|
6013 |
//OTHER MODULES
|
|
6014 |
|
|
6015 |
//Check if the object is a PBStore object
|
|
6016 |
for ( i = 0; i < iPBList->GetNumberOfObjects(); i++ )
|
|
6017 |
{
|
|
6018 |
TFLOGSTRING("TSY: CMmPhoneTsy::TimerExpired - iPBList->GetNumberOfObjects()");
|
|
6019 |
//Get PBStore object
|
|
6020 |
CMmPhoneBookStoreTsy* pbStore = iPBList->GetMmPBByIndex( i );
|
|
6021 |
//check if the current PB is the object that we are
|
|
6022 |
//trying to find
|
|
6023 |
if ( pbStore == aObject )
|
|
6024 |
{
|
|
6025 |
TFLOGSTRING("TSY: CMmPhoneTsy::TimerExpired - aPBStore == aObject");
|
|
6026 |
//call the complete method
|
|
6027 |
pbStore->Complete( aReqHandleType, error );
|
|
6028 |
//object found, break
|
|
6029 |
break;
|
|
6030 |
}
|
|
6031 |
}
|
|
6032 |
|
|
6033 |
// Check if the object is the SMS object
|
|
6034 |
if ( iMmSmsTsy == aObject )
|
|
6035 |
{
|
|
6036 |
TFLOGSTRING("TSY: CMmPhoneTsy::TimerExpired - iMmSmsTsy == aObject");
|
|
6037 |
//call the complete method
|
|
6038 |
iMmSmsTsy->Complete( aReqHandleType, error );
|
|
6039 |
}
|
|
6040 |
// Check if the object is the Broadcast object
|
|
6041 |
else if ( iMmBroadcastTsy == aObject )
|
|
6042 |
{
|
|
6043 |
TFLOGSTRING("TSY: CMmPhoneTsy::TimerExpired - iMmBroadcastTsy == aObject");
|
|
6044 |
//call the complete method
|
|
6045 |
iMmBroadcastTsy->Complete( aReqHandleType, error );
|
|
6046 |
}
|
|
6047 |
// Check if the object is the USSD object
|
|
6048 |
else if ( iMmUssdTsy == aObject )
|
|
6049 |
{
|
|
6050 |
TFLOGSTRING("TSY: CMmPhoneTsy::TimerExpired - iMmUssdTsy == aObject");
|
|
6051 |
//call the complete method
|
|
6052 |
iMmUssdTsy->Complete( aReqHandleType, error );
|
|
6053 |
}
|
|
6054 |
// Check if the object is the ONstore object
|
|
6055 |
else if ( iMmONStoreTsy == aObject )
|
|
6056 |
{
|
|
6057 |
TFLOGSTRING("TSY: CMmPhoneTsy::TimerExpired - iMmONStoreTsy == aObject");
|
|
6058 |
//call the complete method
|
|
6059 |
iMmONStoreTsy->Complete( aReqHandleType, error );
|
|
6060 |
}
|
|
6061 |
// Check if the object is the ENstore object
|
|
6062 |
else if ( iMmENStoreTsy == aObject )
|
|
6063 |
{
|
|
6064 |
TFLOGSTRING("TSY: CMmPhoneTsy::TimerExpired - iMmENStoreTsy == aObject");
|
|
6065 |
//call the complete method
|
|
6066 |
iMmENStoreTsy->Complete( aReqHandleType, error );
|
|
6067 |
}
|
|
6068 |
else if ( iMmCustomTsy == aObject )
|
|
6069 |
{
|
|
6070 |
TFLOGSTRING("TSY: CMmPhoneTsy::TimerExpired - iMmCustomTsy == aObject");
|
|
6071 |
iMmCustomTsy->Complete( aReqHandleType, error , aIPC );
|
|
6072 |
}
|
|
6073 |
|
|
6074 |
//THESE DO NOT USE REQ HANDLE STORE -> CANNOT USE TIMER
|
|
6075 |
// SAT
|
|
6076 |
|
|
6077 |
// If Packet Data is included, complete method from Packet Service TSY
|
|
6078 |
// must be called to handler completes if aObject is part of Packet
|
|
6079 |
// Data session
|
|
6080 |
else if ( NULL != iMmPacketServiceTsy )
|
|
6081 |
{
|
|
6082 |
TFLOGSTRING("TSY: CMmPhoneTsy::TimerExpired - NULL != iMmPacketServiceTsy");
|
|
6083 |
//call the complete method
|
|
6084 |
iMmPacketServiceTsy->Complete( aObject, aReqHandleType, error );
|
|
6085 |
}
|
|
6086 |
else
|
|
6087 |
{
|
|
6088 |
TFLOGSTRING("TSY: CMmPhoneTsy::TimerExpired - else");
|
|
6089 |
}
|
|
6090 |
}
|
|
6091 |
|
|
6092 |
// ---------------------------------------------------------------------------
|
|
6093 |
// CMmPhoneTsy::SetTypeOfResponse
|
|
6094 |
// Sets the type of response for a given Handle. Automatic
|
|
6095 |
// mode includes an automatic response in case of non response
|
|
6096 |
// from the LTSY layer in a specified time
|
|
6097 |
// (other items were commented in a header).
|
|
6098 |
// ---------------------------------------------------------------------------
|
|
6099 |
//
|
|
6100 |
void CMmPhoneTsy::SetTypeOfResponse(
|
|
6101 |
const TInt aReqHandleType,
|
|
6102 |
const TTsyReqHandle aTsyReqHandle )
|
|
6103 |
{
|
|
6104 |
TInt timeOut = 0;
|
|
6105 |
|
|
6106 |
//All possible TSY req handle types are listed in the
|
|
6107 |
//switch case below.
|
|
6108 |
switch ( aReqHandleType )
|
|
6109 |
{
|
|
6110 |
//DTMF
|
|
6111 |
case EMultimodePhoneSendDTMFTones:
|
|
6112 |
timeOut = KMmPhoneSendDTMFTonesTimeOut;
|
|
6113 |
break;
|
|
6114 |
case EMultimodePhoneStartDTMFTone:
|
|
6115 |
timeOut = KMmPhoneStartDTMFToneTimeOut;
|
|
6116 |
break;
|
|
6117 |
case EMultimodePhoneStopDTMFTone:
|
|
6118 |
timeOut = KMmPhoneStopDTMFToneTimeOut;
|
|
6119 |
break;
|
|
6120 |
// All Calls Termination
|
|
6121 |
case EMultimodePhoneTerminateAllCalls:
|
|
6122 |
timeOut = KMmPhoneTerminateAllCallsTimeOut;
|
|
6123 |
break;
|
|
6124 |
// Active Calls Termination
|
|
6125 |
case EMultimodePhoneTerminateActiveCalls:
|
|
6126 |
timeOut = KMmPhoneTerminateActiveCallsTimeOut;
|
|
6127 |
break;
|
|
6128 |
//NET
|
|
6129 |
case EMultimodePhoneSelectNetwork:
|
|
6130 |
timeOut = KMmPhoneSelectNetworkTimeOut;
|
|
6131 |
break;
|
|
6132 |
case EMultimodePhoneSendNetworkServiceRequest:
|
|
6133 |
timeOut = KMmPhoneSendNetworkServiceRequestTimeOut;
|
|
6134 |
break;
|
|
6135 |
case EMultimodePhoneSendNetworkServiceRequestNoFdnCheck:
|
|
6136 |
timeOut = KMmPhoneSendNetworkServiceRequestNoFdnCheckTimeOut;
|
|
6137 |
break;
|
|
6138 |
case EMultimodePhoneGetDetectedNetworksPhase1:
|
|
6139 |
timeOut = KMmPhoneGetDetectedNetworksPhase1TimeOut;
|
|
6140 |
break;
|
|
6141 |
case EMultimodePhoneSetNWSelectionSetting:
|
|
6142 |
timeOut = KMmPhoneSetNWSelectionSettingTimeOut;
|
|
6143 |
break;
|
|
6144 |
case EMultimodePhoneGetCurrentActiveUSimApplication:
|
|
6145 |
timeOut = KMmPhoneGetCurrentActiveUSimApplicationTimeOut;
|
|
6146 |
break;
|
|
6147 |
case EMultimodePhoneGetAuthorizationInfoPhase1:
|
|
6148 |
timeOut = KMmPhoneGetAuthorizationInfoPhase1TimeOut;
|
|
6149 |
break;
|
|
6150 |
|
|
6151 |
//SECURITY
|
|
6152 |
case EMultimodePhoneGetLockInfo:
|
|
6153 |
timeOut = KMmPhoneGetLockInfoTimeOut;
|
|
6154 |
break;
|
|
6155 |
case EMultimodePhoneAbortSecurityCode:
|
|
6156 |
timeOut = KMmPhoneAbortSecurityCodeTimeOut;
|
|
6157 |
break;
|
|
6158 |
case EMultimodePhoneVerifySecurityCode:
|
|
6159 |
timeOut = KMmPhoneVerifySecurityCodeTimeOut;
|
|
6160 |
break;
|
|
6161 |
case EMultimodePhoneChangeSecurityCode:
|
|
6162 |
timeOut = KMmPhoneChangeSecurityCodeTimeOut;
|
|
6163 |
break;
|
|
6164 |
case EMultimodePhoneGetSecurityCodeInfoPin1:
|
|
6165 |
case EMultimodePhoneGetSecurityCodeInfoPin2:
|
|
6166 |
case EMultimodePhoneGetSecurityCodeInfoPuk1:
|
|
6167 |
case EMultimodePhoneGetSecurityCodeInfoPuk2:
|
|
6168 |
case EMultimodePhoneGetSecurityCodeInfoPhonePassword:
|
|
6169 |
case EMultimodePhoneGetSecurityCodeInfoSPC:
|
|
6170 |
case EMultimodePhoneGetSecurityCodeInfoPhonebookHiddenKey:
|
|
6171 |
case EMultimodePhoneGetSecurityCodeInfoUSIMAppPin:
|
|
6172 |
case EMultimodePhoneGetSecurityCodeInfoSecondUSIMAppPin:
|
|
6173 |
case EMultimodePhoneGetSecurityCodeInfoUniversalPin:
|
|
6174 |
case EMultimodePhoneGetSecurityCodeInfoUniversalPuk:
|
|
6175 |
timeOut = KMmPhoneGetSecurityCodeInfoTimeOut;
|
|
6176 |
break;
|
|
6177 |
|
|
6178 |
//SS
|
|
6179 |
case EMultimodePhoneSetCallForwardingStatus:
|
|
6180 |
timeOut = KMmPhoneSetCallForwardingStatusTimeOut;
|
|
6181 |
break;
|
|
6182 |
case EMultimodePhoneSetCallBarringStatus:
|
|
6183 |
timeOut = KMmPhoneSetCallBarringStatusTimeOut;
|
|
6184 |
break;
|
|
6185 |
case EMultimodePhoneGetCallForwardingStatusPhase1:
|
|
6186 |
timeOut = KMmPhoneGetCallForwardingStatusPhase1TimeOut;
|
|
6187 |
break;
|
|
6188 |
case EMultimodePhoneGetCallBarringStatusPhase1:
|
|
6189 |
timeOut = KMmPhoneGetCallBarringStatusPhase1TimeOut;
|
|
6190 |
break;
|
|
6191 |
case EMultimodePhoneGetCallWaitingStatusPhase1:
|
|
6192 |
timeOut = KMmPhoneGetCallWaitingStatusPhase1TimeOut;
|
|
6193 |
break;
|
|
6194 |
case EMultimodePhoneSetSSPassword:
|
|
6195 |
timeOut = KMmPhoneSetSSPasswordTimeOut;
|
|
6196 |
break;
|
|
6197 |
case EMultimodePhoneSetCallWaitingStatus:
|
|
6198 |
timeOut = KMmPhoneSetCallWaitingStatusTimeOut;
|
|
6199 |
break;
|
|
6200 |
case EMultimodePhoneGetIdentityServiceStatus:
|
|
6201 |
timeOut = KMmPhoneGetIdentityServiceStatusTimeOut;
|
|
6202 |
break;
|
|
6203 |
case EMultimodePhoneGetAlsLine:
|
|
6204 |
timeOut = KMmPhoneGetAlsLineTimeOut;
|
|
6205 |
break;
|
|
6206 |
case EMultimodePhoneSetAlsLine:
|
|
6207 |
timeOut = KMmPhoneSetAlsLineTimeOut;
|
|
6208 |
break;
|
|
6209 |
// SIM access and capabilities
|
|
6210 |
case EMultimodePhoneGetServiceTable:
|
|
6211 |
timeOut = KMmPhoneGetServiceTableTimeOut;
|
|
6212 |
break;
|
|
6213 |
case EMultimodePhoneGetCustomerServiceProfile:
|
|
6214 |
timeOut = KMmPhoneGetCustomerServiceProfileTimeOut;
|
|
6215 |
break;
|
|
6216 |
case EMultimodePhoneGetPhoneStoreInfo:
|
|
6217 |
timeOut = KMmPhoneGetPhoneStoreInfoTimeOut;
|
|
6218 |
break;
|
|
6219 |
case EMultimodePhoneGetServiceProviderName:
|
|
6220 |
timeOut = KMmPhoneGetServiceProvicedNameTimeOut;
|
|
6221 |
break;
|
|
6222 |
case EMultimodePhoneIMSAuthenticate:
|
|
6223 |
timeOut = KMmPhoneIMSAuthenticateTimeOut;
|
|
6224 |
break;
|
|
6225 |
case EMultimodePhoneGetMailboxNumbers:
|
|
6226 |
timeOut = KMmPhoneGetMailboxNumbersTimeOut;
|
|
6227 |
break;
|
|
6228 |
case EMultimodePhoneEnumerateAPNEntries:
|
|
6229 |
timeOut = KMmPhoneEnumerateAPNEntriesTimeOut;
|
|
6230 |
break;
|
|
6231 |
case EMultimodePhoneGetAPNname:
|
|
6232 |
timeOut = KMmPhoneGetAPNnameTimeOut;
|
|
6233 |
break;
|
|
6234 |
case EMultimodePhoneGetIccMessageWaitingIndicators:
|
|
6235 |
timeOut = KMmPhoneGetIccMessageWaitingIndicators;
|
|
6236 |
break;
|
|
6237 |
case EMultimodePhoneSetIccMessageWaitingIndicators:
|
|
6238 |
timeOut = KMmPhoneSetIccMessageWaitingIndicators;
|
|
6239 |
break;
|
|
6240 |
case EMultimodePhoneAppendAPNName:
|
|
6241 |
timeOut = KMmPhoneAppendAPNNameTimeOut;
|
|
6242 |
break;
|
|
6243 |
case EMultimodePhoneDeleteAPNName:
|
|
6244 |
timeOut = KMmPhoneDeleteAPNNameTimeOut;
|
|
6245 |
break;
|
|
6246 |
case EMultimodePhoneSetAPNControlListServiceStatus:
|
|
6247 |
timeOut = KMmPhoneSetAPNControlListServiceStatusTimeOut;
|
|
6248 |
break;
|
|
6249 |
case EMultimodePhoneGetAPNControlListServiceStatus:
|
|
6250 |
timeOut = KMmPhoneGetAPNControlListServiceStatusTimeOut;
|
|
6251 |
break;
|
|
6252 |
case EMultimodePhoneGetFdnStatus:
|
|
6253 |
timeOut = KMmPhoneGetFdnStatusTimeOut;
|
|
6254 |
break;
|
|
6255 |
|
|
6256 |
//Do not use timer in these cases
|
|
6257 |
// - all notification requests
|
|
6258 |
//case EMultimodePhoneNotifyModemDetected:
|
|
6259 |
//case EMultimodePhoneCapsChangeNotification:
|
|
6260 |
//case EMultimodePhoneNotifyDTMFCaps:
|
|
6261 |
//case EMultimodePhoneNotifyNetworkRegistrationStatusChange:
|
|
6262 |
//case EMultimodePhoneNotifyModeChange:
|
|
6263 |
//case EMultimodePhoneNotifyCurrentNetworkChange:
|
|
6264 |
//case EMultimodePhoneNotifySignalStrengthChange:
|
|
6265 |
//case EMultimodePhoneNotifyNITZInfoChange:
|
|
6266 |
//case EMultimodePhoneNotifyNWSelectionSettingChange:
|
|
6267 |
//case EMultimodePhoneNotifyNWTimeInfoChange:
|
|
6268 |
//case EMultimodePhoneNotifyCallForwardingStatusChange:
|
|
6269 |
//case EMultimodePhoneNotifyCallBarringStatusChange:
|
|
6270 |
//case EMultimodePhoneNotifyCallWaitingStatusChange:
|
|
6271 |
//case EMultimodePhoneNotifyAlsLineChange:
|
|
6272 |
//case EMultimodePhoneNotifyFdnStatusChange:
|
|
6273 |
//case EMultimodePhoneNotifySecurityCapsChange:
|
|
6274 |
//case EMultimodePhoneNotifyLockInfoChange:
|
|
6275 |
//case EMultimodePhoneNotifySecurityEvent:
|
|
6276 |
//case EMultimodePhoneNotifyBatteryInfoChange:
|
|
6277 |
//case EMultimodePhoneNotifyStopInDTMFString:
|
|
6278 |
//case EMultimodePhoneNotifyCallServiceCapsChange:
|
|
6279 |
//case EMultimodePhoneNotifyCallForwardingActive:
|
|
6280 |
//case EMultimodePhoneNotifyIccAccessCapsChange:
|
|
6281 |
//case EMultimodePhoneNotifyIccMessageWaitingIndicatorsChange:
|
|
6282 |
//case EMultimodePhoneNotifySecurityCodeInfoChange:
|
|
6283 |
//case EMultimodePhoneNotifySendNetworkRequest:
|
|
6284 |
|
|
6285 |
//SS features that require PIN verification. Therefore the
|
|
6286 |
//request is 2-phased which means that possibility for dead-lock
|
|
6287 |
//is so high that timer is not used.
|
|
6288 |
//case EMultimodePhoneSetFdnSetting:
|
|
6289 |
//case EMultimodePhoneSetLockSetting:
|
|
6290 |
|
|
6291 |
default:
|
|
6292 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
6293 |
aReqHandleType,
|
|
6294 |
aTsyReqHandle );
|
|
6295 |
break;
|
|
6296 |
}
|
|
6297 |
|
|
6298 |
//if timeout is requested
|
|
6299 |
if ( timeOut > 0 )
|
|
6300 |
{
|
|
6301 |
//set time out
|
|
6302 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
6303 |
aReqHandleType,
|
|
6304 |
aTsyReqHandle,
|
|
6305 |
timeOut );
|
|
6306 |
}
|
|
6307 |
}
|
|
6308 |
|
|
6309 |
// ---------------------------------------------------------------------------
|
|
6310 |
// CMmPhoneTsy::Complete
|
|
6311 |
// Completes the request due timer expiration
|
|
6312 |
// (other items were commented in a header).
|
|
6313 |
// ---------------------------------------------------------------------------
|
|
6314 |
//
|
|
6315 |
void CMmPhoneTsy::Complete(
|
|
6316 |
TInt aReqHandleType,
|
|
6317 |
TInt aError )
|
|
6318 |
{
|
|
6319 |
CMmDataPackage dataPackage;
|
|
6320 |
RMobilePhone:: TMobilePhoneLockStatus lock;
|
|
6321 |
RMobilePhone::TMobilePhoneLockSetting setting;
|
|
6322 |
RMobilePhone::TMobilePhoneCspFileV1 emptyCspFile;
|
|
6323 |
RMobilePhone::TMobilePhoneServiceTableV1 emptyServiceTable;
|
|
6324 |
RMobilePhoneStore::TMobilePhoneStoreInfoV1 emptyPhoneStoreInfo;
|
|
6325 |
TInt trapError = KErrNone;
|
|
6326 |
TFLOGSTRING2("TSY: CMmPhoneTsy::Complete - ReqHandleType: %d", aReqHandleType);
|
|
6327 |
switch( aReqHandleType )
|
|
6328 |
{
|
|
6329 |
case EMultimodePhoneTerminateAllCalls:
|
|
6330 |
CompleteTerminateAllCallsReq(aError);
|
|
6331 |
break;
|
|
6332 |
case EMultimodePhoneTerminateActiveCalls:
|
|
6333 |
CompleteTerminateActiveCallsReq(aError);
|
|
6334 |
break;
|
|
6335 |
//DTMF
|
|
6336 |
case EMultimodePhoneSendDTMFTones:
|
|
6337 |
case EMultimodePhoneStartDTMFTone:
|
|
6338 |
case EMultimodePhoneStopDTMFTone:
|
|
6339 |
// forward to DTMF Tsy
|
|
6340 |
iMmDtmfTsy->Complete( aReqHandleType, aError );
|
|
6341 |
break;
|
|
6342 |
|
|
6343 |
//SS
|
|
6344 |
case EMultimodePhoneSetCallForwardingStatus:
|
|
6345 |
case EMultimodePhoneGetCallForwardingStatusPhase1:
|
|
6346 |
case EMultimodePhoneGetCallBarringStatusPhase1:
|
|
6347 |
case EMultimodePhoneSetCallBarringStatus:
|
|
6348 |
case EMultimodePhoneSetSSPassword:
|
|
6349 |
case EMultimodePhoneGetCallWaitingStatusPhase1:
|
|
6350 |
case EMultimodePhoneSetCallWaitingStatus:
|
|
6351 |
case EMultimodePhoneGetIdentityServiceStatus:
|
|
6352 |
case EMultimodePhoneSendNetworkServiceRequest:
|
|
6353 |
case EMultimodePhoneSendNetworkServiceRequestNoFdnCheck:
|
|
6354 |
case EMultimodePhoneGetIccMessageWaitingIndicators:
|
|
6355 |
case EMultimodePhoneSetIccMessageWaitingIndicators:
|
|
6356 |
iMmSupplServTsy->Complete( aReqHandleType, aError );
|
|
6357 |
break;
|
|
6358 |
|
|
6359 |
//NET
|
|
6360 |
case EMultimodePhoneSelectNetwork:
|
|
6361 |
iMmNetTsy->CompleteSelectNetwork( aError );
|
|
6362 |
break;
|
|
6363 |
case EMultimodePhoneGetDetectedNetworksPhase1:
|
|
6364 |
// Catch possible leave. If this call leaves, there is nothing
|
|
6365 |
// we can do.
|
|
6366 |
TRAP_IGNORE( iMmNetTsy->ProcessGetDetectedNetworksPhase1L( NULL,
|
|
6367 |
aError ) );
|
|
6368 |
break;
|
|
6369 |
case EMultimodePhoneSetNWSelectionSetting:
|
|
6370 |
iMmNetTsy->CompleteSetNetworkSelectionSetting( aError );
|
|
6371 |
break;
|
|
6372 |
case EMultimodePhoneGetAuthorizationInfoPhase1:
|
|
6373 |
TRAP_IGNORE( iMmNetTsy->ProcessGetAuthorizationInfoPhase1L( NULL,
|
|
6374 |
aError ));
|
|
6375 |
break;
|
|
6376 |
case EMobilePhoneGetCurrentActiveUSimApplication:
|
|
6377 |
break;
|
|
6378 |
|
|
6379 |
//SECURITY
|
|
6380 |
case EMultimodePhoneGetLockInfo:
|
|
6381 |
lock = RMobilePhone::EStatusLockUnknown;
|
|
6382 |
setting = RMobilePhone::ELockSetUnknown;
|
|
6383 |
|
|
6384 |
dataPackage.PackData(&lock, &setting );
|
|
6385 |
iMmSecurityTsy->CompleteGetLockInfo( &dataPackage,
|
|
6386 |
aError );
|
|
6387 |
break;
|
|
6388 |
case EMultimodePhoneAbortSecurityCode:
|
|
6389 |
iMmSecurityTsy->CompleteAbortSecurityCode( aError );
|
|
6390 |
break;
|
|
6391 |
case EMultimodePhoneVerifySecurityCode:
|
|
6392 |
TRAP( trapError,
|
|
6393 |
iMmSecurityTsy->CompleteVerifySecurityCodeL( aError ); );
|
|
6394 |
break;
|
|
6395 |
case EMultimodePhoneChangeSecurityCode:
|
|
6396 |
iMmSecurityTsy->CompleteChangeSecurityCode( aError );
|
|
6397 |
break;
|
|
6398 |
case EMultimodePhoneGetSecurityCodeInfoPin1:
|
|
6399 |
case EMultimodePhoneGetSecurityCodeInfoPin2:
|
|
6400 |
case EMultimodePhoneGetSecurityCodeInfoPuk1:
|
|
6401 |
case EMultimodePhoneGetSecurityCodeInfoPuk2:
|
|
6402 |
case EMultimodePhoneGetSecurityCodeInfoPhonePassword:
|
|
6403 |
case EMultimodePhoneGetSecurityCodeInfoSPC:
|
|
6404 |
case EMultimodePhoneGetSecurityCodeInfoPhonebookHiddenKey:
|
|
6405 |
case EMultimodePhoneGetSecurityCodeInfoUSIMAppPin:
|
|
6406 |
case EMultimodePhoneGetSecurityCodeInfoSecondUSIMAppPin:
|
|
6407 |
case EMultimodePhoneGetSecurityCodeInfoUniversalPin:
|
|
6408 |
case EMultimodePhoneGetSecurityCodeInfoUniversalPuk:
|
|
6409 |
TimeoutGetSecurityCodeInfo(aReqHandleType, aError);
|
|
6410 |
break;
|
|
6411 |
|
|
6412 |
//SS
|
|
6413 |
case EMultimodePhoneGetAlsLine:
|
|
6414 |
CompleteGetAlsLine( RMobilePhone::EAlternateLineNotAvailable,
|
|
6415 |
aError );
|
|
6416 |
break;
|
|
6417 |
case EMultimodePhoneSetAlsLine:
|
|
6418 |
CompleteSetAlsLine( aError );
|
|
6419 |
break;
|
|
6420 |
//SIM access and capabilities
|
|
6421 |
case EMultimodePhoneGetServiceTable:
|
|
6422 |
TRAP_IGNORE( CompleteGetServiceTableL(
|
|
6423 |
emptyServiceTable, aError ); );
|
|
6424 |
break;
|
|
6425 |
case EMultimodePhoneGetCustomerServiceProfile:
|
|
6426 |
CompleteGetCustomerServiceProfile( emptyCspFile, aError );
|
|
6427 |
break;
|
|
6428 |
case EMultimodePhoneGetPhoneStoreInfo:
|
|
6429 |
CompleteGetPhoneStoreInfo( emptyPhoneStoreInfo, aError );
|
|
6430 |
break;
|
|
6431 |
case EMultimodePhoneIMSAuthenticate:
|
|
6432 |
CompleteImsAuthentication( NULL, aError );
|
|
6433 |
break;
|
|
6434 |
case EMultimodePhoneEnumerateAPNEntries:
|
|
6435 |
CompleteEnumerateAPNEntries( NULL, aError );
|
|
6436 |
break;
|
|
6437 |
case EMultimodePhoneGetAPNname:
|
|
6438 |
CompleteGetAPNname( NULL, aError );
|
|
6439 |
break;
|
|
6440 |
case EMultimodePhoneAppendAPNName:
|
|
6441 |
CompleteAppendAPNName( aError );
|
|
6442 |
break;
|
|
6443 |
case EMultimodePhoneDeleteAPNName:
|
|
6444 |
CompleteDeleteAPNName( aError );
|
|
6445 |
break;
|
|
6446 |
case EMultimodePhoneSetAPNControlListServiceStatus:
|
|
6447 |
CompleteSetAPNControlListServiceStatus( aError );
|
|
6448 |
break;
|
|
6449 |
case EMultimodePhoneGetAPNControlListServiceStatus:
|
|
6450 |
CompleteGetAPNControlListServiceStatus( NULL, aError );
|
|
6451 |
break;
|
|
6452 |
case EMultimodePhoneGetServiceProviderName:
|
|
6453 |
CompleteGetServiceProviderName( NULL, aError );
|
|
6454 |
break;
|
|
6455 |
case EMultimodePhoneGetFdnStatus:
|
|
6456 |
CompleteGetFdnStatus( NULL, aError );
|
|
6457 |
break;
|
|
6458 |
default:
|
|
6459 |
TFLOGSTRING("TSY: CMmPhoneTsy::Complete default handle type" );
|
|
6460 |
if ( iTsyReqHandleStore->GetTsyReqHandle(
|
|
6461 |
aReqHandleType ))
|
|
6462 |
{
|
|
6463 |
ReqCompleted( iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6464 |
aReqHandleType ), aError );
|
|
6465 |
}
|
|
6466 |
break;
|
|
6467 |
}
|
|
6468 |
|
|
6469 |
}
|
|
6470 |
|
|
6471 |
// ---------------------------------------------------------------------------
|
|
6472 |
// CMmPhoneTsy::TimeoutGetSecurityCodeInfo
|
|
6473 |
// Sets the security code when the request completes due to timer expiration
|
|
6474 |
// and then it calls the completion function to handle the timeout event.
|
|
6475 |
// (other items were commented in a header).
|
|
6476 |
// ---------------------------------------------------------------------------
|
|
6477 |
//
|
|
6478 |
void CMmPhoneTsy::TimeoutGetSecurityCodeInfo(
|
|
6479 |
const TInt aReqHandleType,
|
|
6480 |
const TInt aError)
|
|
6481 |
{
|
|
6482 |
CMmDataPackage dataPackage;
|
|
6483 |
RMobilePhone::TMobilePhoneSecurityCode secCode;
|
|
6484 |
RMobilePhone::TMobilePhoneSecurityCodeInfoV5 codeV5;
|
|
6485 |
|
|
6486 |
switch (aReqHandleType)
|
|
6487 |
{
|
|
6488 |
case EMultimodePhoneGetSecurityCodeInfoPin1:
|
|
6489 |
secCode = RMobilePhone::ESecurityCodePin1;
|
|
6490 |
break;
|
|
6491 |
case EMultimodePhoneGetSecurityCodeInfoPin2:
|
|
6492 |
secCode = RMobilePhone::ESecurityCodePin2;
|
|
6493 |
break;
|
|
6494 |
case EMultimodePhoneGetSecurityCodeInfoPuk1:
|
|
6495 |
secCode = RMobilePhone::ESecurityCodePuk1;
|
|
6496 |
break;
|
|
6497 |
case EMultimodePhoneGetSecurityCodeInfoPuk2:
|
|
6498 |
secCode = RMobilePhone::ESecurityCodePuk2;
|
|
6499 |
break;
|
|
6500 |
case EMultimodePhoneGetSecurityCodeInfoPhonePassword:
|
|
6501 |
secCode = RMobilePhone::ESecurityCodePhonePassword;
|
|
6502 |
break;
|
|
6503 |
case EMultimodePhoneGetSecurityCodeInfoSPC:
|
|
6504 |
secCode = RMobilePhone::ESecurityCodeSPC;
|
|
6505 |
break;
|
|
6506 |
case EMultimodePhoneGetSecurityCodeInfoPhonebookHiddenKey:
|
|
6507 |
secCode = RMobilePhone::ESecurityHiddenKey;
|
|
6508 |
break;
|
|
6509 |
case EMultimodePhoneGetSecurityCodeInfoUSIMAppPin:
|
|
6510 |
secCode = RMobilePhone::ESecurityUSIMAppPin;
|
|
6511 |
break;
|
|
6512 |
case EMultimodePhoneGetSecurityCodeInfoSecondUSIMAppPin:
|
|
6513 |
secCode = RMobilePhone::ESecuritySecondUSIMAppPin;
|
|
6514 |
break;
|
|
6515 |
case EMultimodePhoneGetSecurityCodeInfoUniversalPin:
|
|
6516 |
secCode = RMobilePhone::ESecurityUniversalPin;
|
|
6517 |
break;
|
|
6518 |
case EMultimodePhoneGetSecurityCodeInfoUniversalPuk:
|
|
6519 |
secCode = RMobilePhone::ESecurityUniversalPuk;
|
|
6520 |
break;
|
|
6521 |
}
|
|
6522 |
dataPackage.PackData(&secCode, &codeV5 );
|
|
6523 |
|
|
6524 |
iMmSecurityTsy->CompleteGetSecurityCodeInfo(
|
|
6525 |
&dataPackage, aError );
|
|
6526 |
}
|
|
6527 |
|
|
6528 |
#endif
|
|
6529 |
|
|
6530 |
|
|
6531 |
#ifdef TF_LOGGING_ENABLED
|
|
6532 |
// ---------------------------------------------------------------------------
|
|
6533 |
// CMmPhoneTsy::ReqCompleted
|
|
6534 |
// Overloads CTelObject::ReqCompleted for logging purposes. It
|
|
6535 |
// prints the aTsyReqHandle and aError variable in the log file and then
|
|
6536 |
// calls CTelObject::ReqCompleted
|
|
6537 |
// (other items were commented in a header).
|
|
6538 |
// ---------------------------------------------------------------------------
|
|
6539 |
//
|
|
6540 |
void CMmPhoneTsy::ReqCompleted(
|
|
6541 |
const TTsyReqHandle aTsyReqHandle,
|
|
6542 |
const TInt aError )
|
|
6543 |
{
|
|
6544 |
TFLOGSTRING3("TSY: CMmPhoneTsy::Request Completed - Handle:%d Error:%d", aTsyReqHandle, aError);
|
|
6545 |
|
|
6546 |
CTelObject::ReqCompleted( aTsyReqHandle, aError );
|
|
6547 |
|
|
6548 |
}
|
|
6549 |
#endif
|
|
6550 |
|
|
6551 |
// ---------------------------------------------------------------------------
|
|
6552 |
// CMmPhoneTsy::SetWaitingCallForData
|
|
6553 |
// Set iMmWaitingDataCall pointer to call object waiting to
|
|
6554 |
// answer incoming call
|
|
6555 |
// (other items were commented in a header).
|
|
6556 |
// ---------------------------------------------------------------------------
|
|
6557 |
//
|
|
6558 |
void CMmPhoneTsy::SetWaitingCallForData(
|
|
6559 |
CMmCallTsy* aMmCall )
|
|
6560 |
{
|
|
6561 |
iMmWaitingDataCall = aMmCall;
|
|
6562 |
}
|
|
6563 |
|
|
6564 |
// ---------------------------------------------------------------------------
|
|
6565 |
// CMmPhoneTsy::WaitingCallForData
|
|
6566 |
// Return WaitingCallForData pointer of call object wishing to
|
|
6567 |
// answer incoming call
|
|
6568 |
// (other items were commented in a header).
|
|
6569 |
// ---------------------------------------------------------------------------
|
|
6570 |
//
|
|
6571 |
CMmCallTsy* CMmPhoneTsy::WaitingCallForData()
|
|
6572 |
{
|
|
6573 |
return iMmWaitingDataCall;
|
|
6574 |
}
|
|
6575 |
|
|
6576 |
// ---------------------------------------------------------------------------
|
|
6577 |
// CMmPhoneTsy::ResetPacketDataSession
|
|
6578 |
// Sets Packet Data pointer to NULL
|
|
6579 |
// (other items were commented in a header).
|
|
6580 |
// ---------------------------------------------------------------------------
|
|
6581 |
//
|
|
6582 |
void CMmPhoneTsy::ResetPacketDataSession()
|
|
6583 |
{
|
|
6584 |
iMmPacketServiceTsy = NULL;
|
|
6585 |
}
|
|
6586 |
|
|
6587 |
// ---------------------------------------------------------------------------
|
|
6588 |
// CMmPhoneTsy::AirTimeTimerCheckStart
|
|
6589 |
// Starts the air time duration timer when the first call is
|
|
6590 |
// in active state. Increases the amount of active calls
|
|
6591 |
// stored in the internal variable iAmountOfActiveCalls
|
|
6592 |
// (other items were commented in a header).
|
|
6593 |
// ---------------------------------------------------------------------------
|
|
6594 |
//
|
|
6595 |
void CMmPhoneTsy::AirTimeTimerCheckStart()
|
|
6596 |
{
|
|
6597 |
//check if any call is active already
|
|
6598 |
if ( 0 == iAmountOfActiveCalls )
|
|
6599 |
{
|
|
6600 |
//this is first call in active state, start the timer
|
|
6601 |
iAirTimeDurationTimer->StartAirTimeDuration();
|
|
6602 |
}
|
|
6603 |
//increase the count of active calls
|
|
6604 |
iAmountOfActiveCalls++;
|
|
6605 |
}
|
|
6606 |
|
|
6607 |
// ---------------------------------------------------------------------------
|
|
6608 |
// CMmPhoneTsy::AirTimeTimerCheckStop
|
|
6609 |
// Stops the air time duration timer when all calls are in idle
|
|
6610 |
// state. Decreases the amount of active calls
|
|
6611 |
// stored in the internal variable iAmountOfActiveCalls
|
|
6612 |
// (other items were commented in a header).
|
|
6613 |
// ---------------------------------------------------------------------------
|
|
6614 |
//
|
|
6615 |
void CMmPhoneTsy::AirTimeTimerCheckStop()
|
|
6616 |
{
|
|
6617 |
//check if any call is active
|
|
6618 |
if( iAmountOfActiveCalls > 0 )
|
|
6619 |
{
|
|
6620 |
//decrease the amount of active calls
|
|
6621 |
iAmountOfActiveCalls--;
|
|
6622 |
}
|
|
6623 |
|
|
6624 |
//check that there are no calls active
|
|
6625 |
if ( 0 == iAmountOfActiveCalls )
|
|
6626 |
{
|
|
6627 |
iAirTimeDurationTimer->Stop();
|
|
6628 |
}
|
|
6629 |
}
|
|
6630 |
|
|
6631 |
// ---------------------------------------------------------------------------
|
|
6632 |
// CMmPhoneTsy::GetAirTimeDuration
|
|
6633 |
// Gets the value of the air time duration timer
|
|
6634 |
// set the number of beats of iAirTimeDurationTimer in aTime
|
|
6635 |
// (other items were commented in a header).
|
|
6636 |
// ---------------------------------------------------------------------------
|
|
6637 |
//
|
|
6638 |
void CMmPhoneTsy::GetAirTimeDuration( TTimeIntervalSeconds &aTime )
|
|
6639 |
{
|
|
6640 |
//number of beats can hold two possible values:
|
|
6641 |
//if at least one call is active it will return the current seconds of the
|
|
6642 |
//ongoing air time. If no call is active, it will return the amount of
|
|
6643 |
//seconds of the last air duration time
|
|
6644 |
|
|
6645 |
aTime = iAirTimeDurationTimer->NumberOfBeats();
|
|
6646 |
}
|
|
6647 |
|
|
6648 |
// ---------------------------------------------------------------------------
|
|
6649 |
// CMmPhoneTsy::GetSatMessaging
|
|
6650 |
// Returns pointer to the SAT service interface.
|
|
6651 |
// (other items were commented in a header).
|
|
6652 |
// ---------------------------------------------------------------------------
|
|
6653 |
//
|
|
6654 |
MStkTsySatService* CMmPhoneTsy::GetSatMessaging()
|
|
6655 |
{
|
|
6656 |
return iTsySatMessaging;
|
|
6657 |
}
|
|
6658 |
|
|
6659 |
// ---------------------------------------------------------------------------
|
|
6660 |
// CMmPhoneTsy::GetRfStateInfo
|
|
6661 |
// Returns StateInfo
|
|
6662 |
// (other items were commented in a header).
|
|
6663 |
// ---------------------------------------------------------------------------
|
|
6664 |
//
|
|
6665 |
TRfStateInfo CMmPhoneTsy::GetRfStateInfo()
|
|
6666 |
{
|
|
6667 |
return iStateInfo;
|
|
6668 |
}
|
|
6669 |
|
|
6670 |
// ---------------------------------------------------------------------------
|
|
6671 |
// CMmPhoneTsy::SetRfStateInfo
|
|
6672 |
// Sets StateInfo
|
|
6673 |
// (other items were commented in a header).
|
|
6674 |
// ---------------------------------------------------------------------------
|
|
6675 |
//
|
|
6676 |
void CMmPhoneTsy::SetRfStateInfo( TRfStateInfo aStateInfo )
|
|
6677 |
{
|
|
6678 |
iStateInfo = aStateInfo;
|
|
6679 |
}
|
|
6680 |
|
|
6681 |
// ---------------------------------------------------------------------------
|
|
6682 |
// CMmPhoneTsy::SetRfStatus
|
|
6683 |
// Sets RfStatus
|
|
6684 |
// (other items were commented in a header).
|
|
6685 |
// ---------------------------------------------------------------------------
|
|
6686 |
//
|
|
6687 |
void CMmPhoneTsy::SetRfStatus(
|
|
6688 |
TRfStatus aRfStatus )
|
|
6689 |
{
|
|
6690 |
iRfStatusFlag = aRfStatus;
|
|
6691 |
}
|
|
6692 |
|
|
6693 |
// ---------------------------------------------------------------------------
|
|
6694 |
// CMmPhoneTsy::GetRfStatus
|
|
6695 |
// Returns RfStatus
|
|
6696 |
// (other items were commented in a header).
|
|
6697 |
// ---------------------------------------------------------------------------
|
|
6698 |
//
|
|
6699 |
TRfStatus CMmPhoneTsy::GetRfStatus()
|
|
6700 |
{
|
|
6701 |
return iRfStatusFlag;
|
|
6702 |
}
|
|
6703 |
|
|
6704 |
// ---------------------------------------------------------------------------
|
|
6705 |
// CMmPhoneTsy::GetNetTsy
|
|
6706 |
// Returns NetTsy instance
|
|
6707 |
// (other items were commented in a header).
|
|
6708 |
// ---------------------------------------------------------------------------
|
|
6709 |
//
|
|
6710 |
CMmNetTsy* CMmPhoneTsy::GetNetTsy()
|
|
6711 |
{
|
|
6712 |
return iMmNetTsy;
|
|
6713 |
}
|
|
6714 |
|
|
6715 |
// ---------------------------------------------------------------------------
|
|
6716 |
// CMmPhoneTsy::GetONStoreTsy
|
|
6717 |
// Returns pointer to CMmONStoreTsy
|
|
6718 |
// (other items were commented in a header).
|
|
6719 |
// ---------------------------------------------------------------------------
|
|
6720 |
//
|
|
6721 |
CMmONStoreTsy* CMmPhoneTsy::GetONStoreTsy()
|
|
6722 |
{
|
|
6723 |
return iMmONStoreTsy;
|
|
6724 |
}
|
|
6725 |
|
|
6726 |
// ---------------------------------------------------------------------------
|
|
6727 |
// CMmPhoneTsy::GetDtmfTsy
|
|
6728 |
// Get pointer to DTMF Tsy.
|
|
6729 |
// (other items were commented in a header).
|
|
6730 |
// ---------------------------------------------------------------------------
|
|
6731 |
//
|
|
6732 |
CMmDtmfTsy* CMmPhoneTsy::GetDtmfTsy()
|
|
6733 |
{
|
|
6734 |
return iMmDtmfTsy;
|
|
6735 |
}
|
|
6736 |
|
|
6737 |
// ---------------------------------------------------------------------------
|
|
6738 |
// CMmPhoneTsy::GetSupplServTsy
|
|
6739 |
// Get pointer to Supplementary Services Tsy.
|
|
6740 |
// (other items were commented in a header).
|
|
6741 |
// ---------------------------------------------------------------------------
|
|
6742 |
//
|
|
6743 |
CMmSupplServTsy* CMmPhoneTsy::GetSupplServTsy()
|
|
6744 |
{
|
|
6745 |
return iMmSupplServTsy;
|
|
6746 |
}
|
|
6747 |
|
|
6748 |
// ---------------------------------------------------------------------------
|
|
6749 |
// CMmPhoneTsy::GetSecurityTsy
|
|
6750 |
// Returns SecurityTsy instance
|
|
6751 |
// (other items were commented in a header).
|
|
6752 |
// ---------------------------------------------------------------------------
|
|
6753 |
//
|
|
6754 |
CMmSecurityTsy* CMmPhoneTsy::GetSecurityTsy()
|
|
6755 |
{
|
|
6756 |
return iMmSecurityTsy;
|
|
6757 |
}
|
|
6758 |
|
|
6759 |
|
|
6760 |
// ---------------------------------------------------------------------------
|
|
6761 |
// CMmPhoneTsy::IsRequestPossibleInOffLine
|
|
6762 |
// Checks wether a ETel request can be performed or not while offline mode is
|
|
6763 |
// enabled'
|
|
6764 |
// (other items were commented in a header).
|
|
6765 |
// ---------------------------------------------------------------------------
|
|
6766 |
//
|
|
6767 |
TBool CMmPhoneTsy::IsRequestPossibleInOffline(
|
|
6768 |
TInt aIpc )
|
|
6769 |
{
|
|
6770 |
// we assume here that most of the requests are possible, thefore
|
|
6771 |
// we switch for the not possible ones, optimizing a bit the checking.
|
|
6772 |
TBool isRequestPossible ( ETrue );
|
|
6773 |
|
|
6774 |
switch ( aIpc )
|
|
6775 |
{
|
|
6776 |
//SS
|
|
6777 |
//case EMobilePhoneGetCallServiceCaps: //OK
|
|
6778 |
//case EMobilePhoneNotifyCallServiceCapsChange://OK
|
|
6779 |
case EMobilePhoneGetCallForwardingStatusPhase1://NO
|
|
6780 |
case EMobilePhoneGetCallForwardingStatusPhase2://NO
|
|
6781 |
case EMobilePhoneSetCallForwardingStatus://NO
|
|
6782 |
//case EMobilePhoneNotifyCallForwardingStatusChange: //OK
|
|
6783 |
//case EMobilePhoneNotifyCallForwardingActive://OK
|
|
6784 |
case EMobilePhoneGetBarringStatusPhase1://NO
|
|
6785 |
case EMobilePhoneGetBarringStatusPhase2://NO
|
|
6786 |
case EMobilePhoneSetCallBarringStatus://NO
|
|
6787 |
//case EMobilePhoneNotifyCallBarringStatusChange: //OK
|
|
6788 |
case EMobilePhoneSetSSPassword://NO
|
|
6789 |
case EMobilePhoneGetWaitingStatusPhase1://NO
|
|
6790 |
case EMobilePhoneGetWaitingStatusPhase2://NO
|
|
6791 |
case EMobilePhoneSetCallWaitingStatus://NO
|
|
6792 |
//case EMobilePhoneNotifyCallWaitingStatusChange://OK
|
|
6793 |
case EMobilePhoneGetIdentityServiceStatus://NO
|
|
6794 |
//case EMobilePhoneSendNetworkServiceRequest://OK
|
|
6795 |
case EMobilePhoneSendNetworkServiceRequestNoFdnCheck: //NO
|
|
6796 |
//case EMobilePhoneNotifyAllSendNetworkServiceRequest: //OK
|
|
6797 |
//case EMobilePhoneGetIccMessageWaitingIndicators://OK
|
|
6798 |
//case EMobilePhoneSetIccMessageWaitingIndicators://OK
|
|
6799 |
//case EMobilePhoneNotifyIccMessageWaitingIndicatorsChange://OK
|
|
6800 |
|
|
6801 |
//NET
|
|
6802 |
//case EMobilePhoneGetNetworkCaps: //ok
|
|
6803 |
//case EMobilePhoneGetNetworkRegistrationStatus: //ok
|
|
6804 |
//case EMobilePhoneNotifyNetworkRegistrationStatusChange: //ok
|
|
6805 |
//case EMobilePhoneGetCurrentMode: //ok
|
|
6806 |
//case EMobilePhoneNotifyModeChange: //ok
|
|
6807 |
//case EMobilePhoneGetCurrentNetwork://ok
|
|
6808 |
//case EMobilePhoneGetCurrentNetworkNoLocation://ok
|
|
6809 |
//case EMobilePhoneNotifyCurrentNetworkChange://ok
|
|
6810 |
// case EMobilePhoneNotifyCurrentNetworkNoLocationChange: ok
|
|
6811 |
//case EMobilePhoneGetHomeNetwork://ok
|
|
6812 |
case EMobilePhoneGetDetectedNetworksV2Phase1: //NO
|
|
6813 |
case EMobilePhoneGetDetectedNetworksV2Phase2: //NO
|
|
6814 |
//case EMobilePhoneGetNetworkSelectionSetting: //ok
|
|
6815 |
//case EMobilePhoneSetNetworkSelectionSetting: //ok
|
|
6816 |
//case EMobilePhoneNotifyNetworkSelectionSettingChange: //ok
|
|
6817 |
case EMobilePhoneSelectNetwork: //NO
|
|
6818 |
//case EMobilePhoneGetNITZInfo: //ok
|
|
6819 |
//case EMobilePhoneNotifyNITZInfoChange: //ok
|
|
6820 |
//case EMobilePhoneGetSignalCaps: //ok
|
|
6821 |
//case EMobilePhoneGetSignalStrength: //ok
|
|
6822 |
//case EMobilePhoneNotifySignalStrengthChange: //ok
|
|
6823 |
//case EMobilePhoneGetNetworkSecurityLevel://ok
|
|
6824 |
//case EMobilePhoneNotifyNetworkSecurityLevelChange: //ok
|
|
6825 |
//case EMobilePhoneGetCipheringIndicatorStatus://ok
|
|
6826 |
|
|
6827 |
//SECURITY
|
|
6828 |
//case EMobilePhoneGetSecurityCaps: //ok
|
|
6829 |
//case EMobilePhoneNotifySecurityCapsChange: //ok
|
|
6830 |
//case EMobilePhoneGetLockInfo: //ok
|
|
6831 |
//case EMobilePhoneNotifyLockInfoChange://ok
|
|
6832 |
//case EMobilePhoneSetLockSetting://ok
|
|
6833 |
//case EMobilePhoneChangeSecurityCode://ok
|
|
6834 |
//case EMobilePhoneNotifySecurityEvent://ok
|
|
6835 |
//case EMobilePhoneVerifySecurityCode://ok
|
|
6836 |
//case EMobilePhoneAbortSecurityCode://ok
|
|
6837 |
//case EMobilePhoneGetSecurityCodeInfo://ok
|
|
6838 |
//case EMobilePhoneNotifySecurityCodeInfoChange://ok
|
|
6839 |
|
|
6840 |
//MISC
|
|
6841 |
//case EMobilePhoneGetServiceProviderName: //ok
|
|
6842 |
//case EMobilePhoneGetIccAccessCaps: //ok
|
|
6843 |
//case EMobilePhoneNotifyIccAccessCapsChange: //ok
|
|
6844 |
//case EMobilePhoneGetCustomerServiceProfile: //ok
|
|
6845 |
//case EMobilePhoneGetServiceTable: //ok
|
|
6846 |
//case EMobilePhoneGetBatteryCaps://ok
|
|
6847 |
//case EMobilePhoneGetBatteryInfo: //ok
|
|
6848 |
//case EMobilePhoneNotifyBatteryInfoChange: //ok
|
|
6849 |
//case EMobilePhoneGetIdentityCaps://ok
|
|
6850 |
//case EMobilePhoneGetPhoneId://ok
|
|
6851 |
//case EMobilePhoneGetSubscriberId://ok
|
|
6852 |
//case EMobilePhoneGetALSLine://ok
|
|
6853 |
//case EMobilePhoneSetALSLine://ok
|
|
6854 |
//case EMobilePhoneNotifyALSLineChange: //ok
|
|
6855 |
//case EMobilePhoneGetFdnStatus: //ok
|
|
6856 |
//case EMobilePhoneSetFdnSetting: //ok
|
|
6857 |
//case EMobilePhoneNotifyFdnStatusChange: //ok
|
|
6858 |
//case EMobilePhoneGetMultimodeCaps: //ok
|
|
6859 |
//case EMobilePhoneGetPhoneStoreInfo: //ok
|
|
6860 |
//case EMobilePhoneNotifyIndicatorChange: //ok
|
|
6861 |
//case EMobilePhoneEnumerateAPNEntries: //ok
|
|
6862 |
//case EMobilePhoneGetAPNname: //ok
|
|
6863 |
//case EMobilePhoneAppendAPNName: //ok
|
|
6864 |
//case EMobilePhoneDeleteAPNName: //ok
|
|
6865 |
//case EMobilePhoneSetAPNControlListServiceStatus: //ok
|
|
6866 |
//case EMobilePhoneGetAPNControlListServiceStatus: //ok
|
|
6867 |
//case EMobilePhoneNotifyAPNListChanged: //ok
|
|
6868 |
//case EMobilePhoneNotifyAPNControlListServiceStatusChange: //ok
|
|
6869 |
|
|
6870 |
// DTMF
|
|
6871 |
//case EMobilePhoneGetDTMFCaps: //ok
|
|
6872 |
//case EMobilePhoneNotifyDTMFCapsChange: //ok
|
|
6873 |
case EMobilePhoneSendDTMFTones: //NO
|
|
6874 |
case EMobilePhoneStartDTMFTone: //NO
|
|
6875 |
case EMobilePhoneStopDTMFTone: //NO
|
|
6876 |
case EMobilePhoneNotifyStopInDTMFString: //NO
|
|
6877 |
case EMobilePhoneContinueDTMFStringSending: //NO
|
|
6878 |
case EMobilePhoneNotifyDTMFEvent: //NO
|
|
6879 |
case EMobilePhoneReadDTMFTones: //NO
|
|
6880 |
{
|
|
6881 |
isRequestPossible = EFalse;
|
|
6882 |
break;
|
|
6883 |
}
|
|
6884 |
|
|
6885 |
default:
|
|
6886 |
break;
|
|
6887 |
}
|
|
6888 |
|
|
6889 |
TFLOGSTRING3("TSY: CMmPhoneTsy::IsRequestPossibleInOffline - IPC:%d, ret:%d", aIpc, isRequestPossible);
|
|
6890 |
return isRequestPossible;
|
|
6891 |
}
|
|
6892 |
|
|
6893 |
// ----------------------------------------------------------------------------
|
|
6894 |
// CMmPhoneTsy::CompleteGetCallForwardingNumber
|
|
6895 |
// Completes when call forwarding number is ready to be written to P&S
|
|
6896 |
// ----------------------------------------------------------------------------
|
|
6897 |
//
|
|
6898 |
void CMmPhoneTsy::CompleteGetCallForwardingNumber(
|
|
6899 |
TInt /*aError*/,
|
|
6900 |
const CMmDataPackage* aDataPackage )
|
|
6901 |
{
|
|
6902 |
//Copy data from package
|
|
6903 |
iCallForwardingNumber.Zero();
|
|
6904 |
aDataPackage->UnPackData( iCallForwardingNumber );
|
|
6905 |
|
|
6906 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteGetCallForwardingNumber number = %S ", &iCallForwardingNumber);
|
|
6907 |
|
|
6908 |
}
|
|
6909 |
|
|
6910 |
// ---------------------------------------------------------------------------
|
|
6911 |
// CMmPhoneTsy::EnumerateAPNEntriesL
|
|
6912 |
// Gets the total number of APN in access point control list (ACL)
|
|
6913 |
// (other items were commented in a header).
|
|
6914 |
// ---------------------------------------------------------------------------
|
|
6915 |
//
|
|
6916 |
TInt CMmPhoneTsy::EnumerateAPNEntriesL(
|
|
6917 |
const TTsyReqHandle aTsyReqHandle,
|
|
6918 |
TUint32* aIndex )
|
|
6919 |
{
|
|
6920 |
TFLOGSTRING("TSY: CMmPhoneTsy::EnumerateAPNEntries");
|
|
6921 |
|
|
6922 |
// Check if request handle already exists
|
|
6923 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
6924 |
EMultimodePhoneEnumerateAPNEntries );
|
|
6925 |
|
|
6926 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
6927 |
{
|
|
6928 |
// The request is already in processing because of previous request.
|
|
6929 |
// Complete request with status value informing the client about
|
|
6930 |
// the situation.
|
|
6931 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
6932 |
}
|
|
6933 |
else
|
|
6934 |
{
|
|
6935 |
iRetAPNEntries = aIndex;
|
|
6936 |
|
|
6937 |
// allow for EMultimodePhoneEnumerateAPNEntries immediate completion
|
|
6938 |
#ifdef REQHANDLE_TIMER
|
|
6939 |
SetTypeOfResponse( EMultimodePhoneEnumerateAPNEntries,
|
|
6940 |
aTsyReqHandle );
|
|
6941 |
#else
|
|
6942 |
// Never comes here. See SetTypeOfResponse.
|
|
6943 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
6944 |
EMultimodePhoneEnumerateAPNEntries, aTsyReqHandle );
|
|
6945 |
#endif // REQHANDLE_TIMER
|
|
6946 |
|
|
6947 |
//Send request to the Domestic OS layer.
|
|
6948 |
TInt ret = MessageManager()->HandleRequestL(
|
|
6949 |
EMobilePhoneEnumerateAPNEntries );
|
|
6950 |
|
|
6951 |
// DOS layer returned with error without completing request
|
|
6952 |
if ( KErrNone != ret )
|
|
6953 |
{
|
|
6954 |
//reset req handle
|
|
6955 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6956 |
EMultimodePhoneEnumerateAPNEntries );
|
|
6957 |
ReqCompleted( aTsyReqHandle, ret );
|
|
6958 |
}
|
|
6959 |
}
|
|
6960 |
|
|
6961 |
return KErrNone;
|
|
6962 |
}
|
|
6963 |
|
|
6964 |
// ---------------------------------------------------------------------------
|
|
6965 |
// CMmPhoneTsy::EnumerateAPNEntriesCancel
|
|
6966 |
// Cancels an outstanding EnumerateAPNEntries request.
|
|
6967 |
// (other items were commented in a header).
|
|
6968 |
// ---------------------------------------------------------------------------
|
|
6969 |
//
|
|
6970 |
TInt CMmPhoneTsy::EnumerateAPNEntriesCancel()
|
|
6971 |
{
|
|
6972 |
TFLOGSTRING("CMmPhoneTsy::EnumerateAPNEntriesCancel");
|
|
6973 |
iRetAPNEntries = NULL;
|
|
6974 |
|
|
6975 |
//reset the req handle
|
|
6976 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
6977 |
EMultimodePhoneEnumerateAPNEntries );
|
|
6978 |
|
|
6979 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
6980 |
{
|
|
6981 |
//complete with cancel
|
|
6982 |
ReqCompleted( reqHandle, KErrCancel );
|
|
6983 |
}
|
|
6984 |
|
|
6985 |
return KErrNone;
|
|
6986 |
}
|
|
6987 |
|
|
6988 |
// ---------------------------------------------------------------------------
|
|
6989 |
// CMmPhoneTsy::CompleteEnumerateAPNEntries
|
|
6990 |
// Completes an outstanding asynchronous EnumerateAPNEntries request
|
|
6991 |
// (other items were commented in a header).
|
|
6992 |
// ---------------------------------------------------------------------------
|
|
6993 |
//
|
|
6994 |
void CMmPhoneTsy::CompleteEnumerateAPNEntries(
|
|
6995 |
CMmDataPackage* aDataPackage,
|
|
6996 |
TInt aErrorCode )
|
|
6997 |
{
|
|
6998 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteEnumerateAPNEntries Error: %d", aErrorCode);
|
|
6999 |
|
|
7000 |
//reset req handle. Returns the deleted req handle
|
|
7001 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
7002 |
EMultimodePhoneEnumerateAPNEntries );
|
|
7003 |
|
|
7004 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7005 |
{
|
|
7006 |
if ( KErrNone == aErrorCode )
|
|
7007 |
{
|
|
7008 |
TUint32* apnEntries( NULL );
|
|
7009 |
aDataPackage->UnPackData( &apnEntries );
|
|
7010 |
*iRetAPNEntries = *apnEntries;
|
|
7011 |
|
|
7012 |
//Complete request to success
|
|
7013 |
ReqCompleted( reqHandle, KErrNone );
|
|
7014 |
}
|
|
7015 |
else
|
|
7016 |
{
|
|
7017 |
// Complete with error
|
|
7018 |
ReqCompleted( reqHandle, aErrorCode );
|
|
7019 |
}
|
|
7020 |
}
|
|
7021 |
}
|
|
7022 |
|
|
7023 |
// ---------------------------------------------------------------------------
|
|
7024 |
// CMmPhoneTsy::GetAPNnameL
|
|
7025 |
// Get the name of APN in access point control list according to index
|
|
7026 |
// (other items were commented in a header).
|
|
7027 |
// ---------------------------------------------------------------------------
|
|
7028 |
//
|
|
7029 |
TInt CMmPhoneTsy::GetAPNnameL(
|
|
7030 |
const TTsyReqHandle aTsyReqHandle,
|
|
7031 |
TUint32* aIndex,
|
|
7032 |
TDes8* aAPN )
|
|
7033 |
{
|
|
7034 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetAPNnameL");
|
|
7035 |
|
|
7036 |
TInt ret = KErrServerBusy;
|
|
7037 |
|
|
7038 |
// Check if request handle already exists
|
|
7039 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
7040 |
EMultimodePhoneGetAPNname );
|
|
7041 |
|
|
7042 |
if ( EMultimodePhoneReqHandleUnknown == reqHandle )
|
|
7043 |
{
|
|
7044 |
if ( sizeof( RMobilePhone::TAPNEntryV3 ) > aAPN->MaxLength() )
|
|
7045 |
{
|
|
7046 |
ret = KErrArgument;
|
|
7047 |
}
|
|
7048 |
else
|
|
7049 |
{
|
|
7050 |
iRetAPNname = aAPN;
|
|
7051 |
|
|
7052 |
// allow for EMobilePhoneGetAPNname immediate completion
|
|
7053 |
#ifdef REQHANDLE_TIMER
|
|
7054 |
SetTypeOfResponse( EMultimodePhoneGetAPNname, aTsyReqHandle );
|
|
7055 |
#else
|
|
7056 |
// Never comes here. See SetTypeOfResponse.
|
|
7057 |
iTsyReqHandleStore->SetTsyReqHandle(
|
|
7058 |
EMultimodePhoneGetAPNname, aTsyReqHandle );
|
|
7059 |
#endif // REQHANDLE_TIMER
|
|
7060 |
|
|
7061 |
CMmDataPackage dataPackage;
|
|
7062 |
dataPackage.PackData( aIndex );
|
|
7063 |
|
|
7064 |
// Send request to the Domestic OS layer.
|
|
7065 |
ret = MessageManager()->HandleRequestL(
|
|
7066 |
EMobilePhoneGetAPNname, &dataPackage );
|
|
7067 |
|
|
7068 |
// In error case reset ReqHandle
|
|
7069 |
if ( KErrNone != ret )
|
|
7070 |
{
|
|
7071 |
//Reset req handle
|
|
7072 |
iTsyReqHandleStore->ResetTsyReqHandle(
|
|
7073 |
EMultimodePhoneGetAPNname );
|
|
7074 |
}
|
|
7075 |
}
|
|
7076 |
}
|
|
7077 |
return ret;
|
|
7078 |
}
|
|
7079 |
|
|
7080 |
// ---------------------------------------------------------------------------
|
|
7081 |
// CMmPhoneTsy::GetAPNnameCancel
|
|
7082 |
// Cancels an outstanding GetAPNname request.
|
|
7083 |
// (other items were commented in a header).
|
|
7084 |
// ---------------------------------------------------------------------------
|
|
7085 |
//
|
|
7086 |
TInt CMmPhoneTsy::GetAPNnameCancel()
|
|
7087 |
{
|
|
7088 |
TFLOGSTRING("CMmPhoneTsy::GetAPNnameCancel");
|
|
7089 |
iRetAPNname = NULL;
|
|
7090 |
|
|
7091 |
//reset the req handle
|
|
7092 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
7093 |
EMultimodePhoneGetAPNname );
|
|
7094 |
|
|
7095 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7096 |
{
|
|
7097 |
//complete with cancel
|
|
7098 |
ReqCompleted( reqHandle, KErrCancel );
|
|
7099 |
}
|
|
7100 |
|
|
7101 |
return KErrNone;
|
|
7102 |
}
|
|
7103 |
|
|
7104 |
// ---------------------------------------------------------------------------
|
|
7105 |
// CMmPhoneTsy::CompleteGetAPNname
|
|
7106 |
// Completes an outstanding asynchronous GetAPNname request
|
|
7107 |
// (other items were commented in a header).
|
|
7108 |
// ---------------------------------------------------------------------------
|
|
7109 |
//
|
|
7110 |
void CMmPhoneTsy::CompleteGetAPNname(
|
|
7111 |
CMmDataPackage* aDataPackage,
|
|
7112 |
TInt aErrorCode )
|
|
7113 |
{
|
|
7114 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteGetAPNname Error: %d", aErrorCode);
|
|
7115 |
|
|
7116 |
//reset req handle. Returns the deleted req handle
|
|
7117 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
7118 |
EMultimodePhoneGetAPNname );
|
|
7119 |
|
|
7120 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7121 |
{
|
|
7122 |
if ( KErrNone == aErrorCode )
|
|
7123 |
{
|
|
7124 |
|
|
7125 |
// APN Entry
|
|
7126 |
RMobilePhone::TAPNEntryV3* apnEntryName;
|
|
7127 |
// Unpack data
|
|
7128 |
aDataPackage->UnPackData( &apnEntryName );
|
|
7129 |
|
|
7130 |
RMobilePhone::TAPNEntryV3Pckg* apnEntryPckg = REINTERPRET_CAST(
|
|
7131 |
RMobilePhone::TAPNEntryV3Pckg*, iRetAPNname );
|
|
7132 |
RMobilePhone::TAPNEntryV3& apnEntry = ( *apnEntryPckg )();
|
|
7133 |
|
|
7134 |
apnEntry.iApn.Copy( apnEntryName->iApn );
|
|
7135 |
|
|
7136 |
//Complete request to success
|
|
7137 |
ReqCompleted( reqHandle, KErrNone );
|
|
7138 |
}
|
|
7139 |
else
|
|
7140 |
{
|
|
7141 |
// Complete with error
|
|
7142 |
ReqCompleted( reqHandle, aErrorCode );
|
|
7143 |
}
|
|
7144 |
}
|
|
7145 |
}
|
|
7146 |
|
|
7147 |
// ---------------------------------------------------------------------------
|
|
7148 |
// CMmPhoneTsy::SetAlsState
|
|
7149 |
// Sets ALS support state
|
|
7150 |
// (other items were commented in a header).
|
|
7151 |
// ---------------------------------------------------------------------------
|
|
7152 |
//
|
|
7153 |
void CMmPhoneTsy::SetAlsState(
|
|
7154 |
TBool aState )
|
|
7155 |
{
|
|
7156 |
TFLOGSTRING2("TSY: CMmPhoneTsy::SetAlsState Error: %d", aState);
|
|
7157 |
|
|
7158 |
// Check where set was called
|
|
7159 |
if( iCspFileAlsSet )
|
|
7160 |
{
|
|
7161 |
// Set Csp file's ALS state
|
|
7162 |
iCspFileALS = aState;
|
|
7163 |
}
|
|
7164 |
else
|
|
7165 |
{
|
|
7166 |
// Set ALS state
|
|
7167 |
iAlsPpSupport = aState;
|
|
7168 |
}
|
|
7169 |
|
|
7170 |
// Check if ALS is supported
|
|
7171 |
if( iCspFileALS || iAlsPpSupport )
|
|
7172 |
{
|
|
7173 |
//Set ALS status to ETrue in Central Repository
|
|
7174 |
iCentRep->Set( KCtsyMEAlsSupported, ETrue );
|
|
7175 |
}
|
|
7176 |
else
|
|
7177 |
{
|
|
7178 |
//Set ALS status to EFalse Central Repository
|
|
7179 |
iCentRep->Set( KCtsyMEAlsSupported, EFalse );
|
|
7180 |
}
|
|
7181 |
|
|
7182 |
}
|
|
7183 |
|
|
7184 |
// ---------------------------------------------------------------------------
|
|
7185 |
// CMmPhoneTsy::MapMEALSLine
|
|
7186 |
// Maps ALS information
|
|
7187 |
// (other items were commented in a header).
|
|
7188 |
// ---------------------------------------------------------------------------
|
|
7189 |
//
|
|
7190 |
RMobilePhone::TMobilePhoneALSLine CMmPhoneTsy::MapMEALSLine(
|
|
7191 |
TInt aAlsLineInfo )
|
|
7192 |
{
|
|
7193 |
TFLOGSTRING("TSY: CMmPhoneTsy::MapMEALSLine");
|
|
7194 |
|
|
7195 |
RMobilePhone::TMobilePhoneALSLine lineInfo;
|
|
7196 |
|
|
7197 |
switch ( aAlsLineInfo )
|
|
7198 |
{
|
|
7199 |
case 0://TInt from CentRep
|
|
7200 |
lineInfo = RMobilePhone::EAlternateLinePrimary;
|
|
7201 |
TFLOGSTRING("TSY: CMmPhoneTsy::MapMEALSInfo Line line = EAlternateLinePrimary");
|
|
7202 |
break;
|
|
7203 |
case 1://TInt from CentRep
|
|
7204 |
lineInfo = RMobilePhone::EAlternateLineAuxiliary;
|
|
7205 |
TFLOGSTRING("TSY: CMmPhoneTsy::MapMEALSLine line = EAlternateLineAuxiliary");
|
|
7206 |
break;
|
|
7207 |
case 2://TInt from CentRep
|
|
7208 |
lineInfo = RMobilePhone::EAlternateLineUnknown;
|
|
7209 |
TFLOGSTRING("TSY: CMmPhoneTsy::MapMEALSLine line = EAlternateLineUnknown");
|
|
7210 |
break;
|
|
7211 |
case 3://TInt from CentRep
|
|
7212 |
lineInfo = RMobilePhone::EAlternateLineNotAvailable;
|
|
7213 |
TFLOGSTRING("TSY: CMmPhoneTsy::MapMEALSLine line = EAlternateLineNotAvailable");
|
|
7214 |
break;
|
|
7215 |
default:
|
|
7216 |
lineInfo = RMobilePhone::EAlternateLineUnknown;
|
|
7217 |
TFLOGSTRING("TSY: CMmPhoneTsy::MapMEALSLine line = EAlternateLineUnknown");
|
|
7218 |
break;
|
|
7219 |
}
|
|
7220 |
|
|
7221 |
return lineInfo;
|
|
7222 |
}
|
|
7223 |
|
|
7224 |
// ---------------------------------------------------------------------------
|
|
7225 |
// CMmPhoneTsy::ResetMEAlsInfo
|
|
7226 |
// Resets ALS information in CentRep.
|
|
7227 |
// (other items were commented in a header).
|
|
7228 |
// ---------------------------------------------------------------------------
|
|
7229 |
//
|
|
7230 |
void CMmPhoneTsy::ResetMEAlsInfo()
|
|
7231 |
{
|
|
7232 |
|
|
7233 |
TFLOGSTRING("TSY: CMmPhoneTsy::ResetMEAlsInfo");
|
|
7234 |
|
|
7235 |
iCentRep->Reset();
|
|
7236 |
|
|
7237 |
if( iSimCacheQueue && ( KCacheALSline & iSimCacheQueue ) )
|
|
7238 |
{
|
|
7239 |
TFLOGSTRING("TSY: CMmPhoneTsy::ResetMEAlsInfo -> CompleteCacheSimL");
|
|
7240 |
// function can leave, so there for it must be trapped, the error
|
|
7241 |
// value is ingnored, because the functionality doesn't depend on it
|
|
7242 |
TRAP_IGNORE( CompleteCacheSimL( KCacheALSline, EFalse ) );
|
|
7243 |
}
|
|
7244 |
|
|
7245 |
}
|
|
7246 |
|
|
7247 |
// ---------------------------------------------------------------------------
|
|
7248 |
// CMmPhoneTsy::GetCfisCenRep
|
|
7249 |
// Returns pointer to CFIS central repository
|
|
7250 |
// (other items were commented in a header).
|
|
7251 |
// ---------------------------------------------------------------------------
|
|
7252 |
//
|
|
7253 |
CRepository* CMmPhoneTsy::GetCfisCenRep()
|
|
7254 |
{
|
|
7255 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetCfisCenRep");
|
|
7256 |
|
|
7257 |
if( iCFISCentRep )
|
|
7258 |
{
|
|
7259 |
return iCFISCentRep;
|
|
7260 |
}
|
|
7261 |
else
|
|
7262 |
return NULL;
|
|
7263 |
}
|
|
7264 |
|
|
7265 |
// ---------------------------------------------------------------------------
|
|
7266 |
// CMmPhoneTsy::GetMwisCenRep
|
|
7267 |
// Returns pointer to MWIS central repository
|
|
7268 |
// (other items were commented in a header).
|
|
7269 |
// ---------------------------------------------------------------------------
|
|
7270 |
//
|
|
7271 |
CRepository* CMmPhoneTsy::GetMwisCenRep()
|
|
7272 |
{
|
|
7273 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetMwisCenRep");
|
|
7274 |
|
|
7275 |
if( iMWISCentRep )
|
|
7276 |
{
|
|
7277 |
return iMWISCentRep;
|
|
7278 |
}
|
|
7279 |
else
|
|
7280 |
return NULL;
|
|
7281 |
}
|
|
7282 |
|
|
7283 |
// ---------------------------------------------------------------------------
|
|
7284 |
// CMmPhoneTsy::GetMwisCenRep
|
|
7285 |
// Returns pointer to MWIS central repository
|
|
7286 |
// (other items were commented in a header).
|
|
7287 |
// ---------------------------------------------------------------------------
|
|
7288 |
//
|
|
7289 |
CRepository* CMmPhoneTsy::GetCfisPRCenRep()
|
|
7290 |
{
|
|
7291 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetCfisPRCenRep");
|
|
7292 |
|
|
7293 |
if( iCFISPrivateCentRep )
|
|
7294 |
{
|
|
7295 |
return iCFISPrivateCentRep;
|
|
7296 |
}
|
|
7297 |
else
|
|
7298 |
return NULL;
|
|
7299 |
}
|
|
7300 |
|
|
7301 |
// ---------------------------------------------------------------------------
|
|
7302 |
// CMmPhoneTsy::GetSubscriberIdForTSYL
|
|
7303 |
// Get IMSI for TSY internal use.
|
|
7304 |
// (other items were commented in a header).
|
|
7305 |
// ---------------------------------------------------------------------------
|
|
7306 |
//
|
|
7307 |
void CMmPhoneTsy::GetSubscriberIdForTSYL()
|
|
7308 |
{
|
|
7309 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetSubscriberIdForTSYL");
|
|
7310 |
|
|
7311 |
// Check if some client has already requested this
|
|
7312 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
7313 |
EMultimodePhoneGetSubscriberId );
|
|
7314 |
|
|
7315 |
if ( EMultimodePhoneReqHandleUnknown == reqHandle
|
|
7316 |
&& !iTSYSubscriberIdReq )
|
|
7317 |
{
|
|
7318 |
iTSYSubscriberIdReq = ETrue;
|
|
7319 |
iMessageManager->HandleRequestL( EMobilePhoneGetSubscriberId );
|
|
7320 |
}
|
|
7321 |
else
|
|
7322 |
{
|
|
7323 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetSubscriberIdForTSYL - Already requested");
|
|
7324 |
}
|
|
7325 |
}
|
|
7326 |
|
|
7327 |
// ---------------------------------------------------------------------------
|
|
7328 |
// CMmPhoneTsy::AppendAPNNameL
|
|
7329 |
// Append an entry to the access point name (APN) control list
|
|
7330 |
// (other items were commented in a header).
|
|
7331 |
// ---------------------------------------------------------------------------
|
|
7332 |
//
|
|
7333 |
TInt CMmPhoneTsy::AppendAPNNameL(
|
|
7334 |
RMobilePhone::TAPNEntryV3* aAPNEntry )
|
|
7335 |
{
|
|
7336 |
TFLOGSTRING("TSY: CMmPhoneTsy::AppendAPNNameL");
|
|
7337 |
|
|
7338 |
TInt ret ( KErrServerBusy );
|
|
7339 |
|
|
7340 |
//check if handle is not in use already
|
|
7341 |
TTsyReqHandle phoneAppendAPNNameHandle =
|
|
7342 |
iTsyReqHandleStore->GetTsyReqHandle(
|
|
7343 |
EMultimodePhoneAppendAPNName );
|
|
7344 |
|
|
7345 |
if ( EMultimodePhoneReqHandleUnknown == phoneAppendAPNNameHandle )
|
|
7346 |
{
|
|
7347 |
RMobilePhone::TAPNEntryV3* apnEntry = aAPNEntry;
|
|
7348 |
CMmDataPackage dataPackage;
|
|
7349 |
dataPackage.PackData( apnEntry );
|
|
7350 |
ret = MessageManager()->HandleRequestL(
|
|
7351 |
EMobilePhoneAppendAPNName, &dataPackage );
|
|
7352 |
if ( KErrNone == ret )
|
|
7353 |
{
|
|
7354 |
// Save the req handle type
|
|
7355 |
iReqHandleType = EMultimodePhoneAppendAPNName;
|
|
7356 |
}
|
|
7357 |
}
|
|
7358 |
return ret;
|
|
7359 |
}
|
|
7360 |
|
|
7361 |
// ---------------------------------------------------------------------------
|
|
7362 |
// CMmPhoneTsy::AppendAPNNameCancel
|
|
7363 |
// Cancel AppendAPNNameL
|
|
7364 |
// (other items were commented in a header).
|
|
7365 |
// ---------------------------------------------------------------------------
|
|
7366 |
//
|
|
7367 |
TInt CMmPhoneTsy::AppendAPNNameCancel()
|
|
7368 |
{
|
|
7369 |
TFLOGSTRING("TSY: CMmPhoneTsy::AppendAPNNameCancel");
|
|
7370 |
// reset the reqhandle
|
|
7371 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
7372 |
EMultimodePhoneAppendAPNName );
|
|
7373 |
|
|
7374 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7375 |
{
|
|
7376 |
// complete
|
|
7377 |
ReqCompleted( reqHandle, KErrCancel );
|
|
7378 |
}
|
|
7379 |
|
|
7380 |
return KErrNone;
|
|
7381 |
}
|
|
7382 |
|
|
7383 |
// ---------------------------------------------------------------------------
|
|
7384 |
// CMmPhoneTsy::CompleteAppendAPNName
|
|
7385 |
// Complete Append APN name request
|
|
7386 |
// (other items were commented in a header).
|
|
7387 |
// ---------------------------------------------------------------------------
|
|
7388 |
//
|
|
7389 |
void CMmPhoneTsy::CompleteAppendAPNName(
|
|
7390 |
TInt aErrorCode )
|
|
7391 |
{
|
|
7392 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteAppendAPNName. Error: %d", aErrorCode);
|
|
7393 |
|
|
7394 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
7395 |
EMultimodePhoneAppendAPNName );
|
|
7396 |
|
|
7397 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7398 |
{
|
|
7399 |
ReqCompleted( reqHandle, aErrorCode );
|
|
7400 |
}
|
|
7401 |
}
|
|
7402 |
|
|
7403 |
// ---------------------------------------------------------------------------
|
|
7404 |
// CMmPhoneTsy::DeleteAPNNameL
|
|
7405 |
// Delete an entry from the access point name (APN) control list
|
|
7406 |
// (other items were commented in a header).
|
|
7407 |
// ---------------------------------------------------------------------------
|
|
7408 |
//
|
|
7409 |
TInt CMmPhoneTsy::DeleteAPNNameL(
|
|
7410 |
const TTsyReqHandle aTsyReqHandle,
|
|
7411 |
TUint32* aIndex )
|
|
7412 |
{
|
|
7413 |
TFLOGSTRING2("TSY: CMmPhoneTsy::DeleteAPNNameL, index = %d", aIndex);
|
|
7414 |
|
|
7415 |
// get the handle
|
|
7416 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
7417 |
EMultimodePhoneDeleteAPNName );
|
|
7418 |
|
|
7419 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7420 |
{
|
|
7421 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
7422 |
}
|
|
7423 |
else
|
|
7424 |
{
|
|
7425 |
CMmDataPackage dataPackage;
|
|
7426 |
dataPackage.PackData( aIndex );
|
|
7427 |
|
|
7428 |
TInt ret = MessageManager()->HandleRequestL(
|
|
7429 |
EMobilePhoneDeleteAPNName, &dataPackage );
|
|
7430 |
|
|
7431 |
if ( KErrNone != ret )
|
|
7432 |
{
|
|
7433 |
ReqCompleted( aTsyReqHandle, ret );
|
|
7434 |
}
|
|
7435 |
else
|
|
7436 |
{
|
|
7437 |
// Save the req handle type
|
|
7438 |
iReqHandleType = EMultimodePhoneDeleteAPNName;
|
|
7439 |
}
|
|
7440 |
}
|
|
7441 |
|
|
7442 |
return KErrNone;
|
|
7443 |
}
|
|
7444 |
|
|
7445 |
// ---------------------------------------------------------------------------
|
|
7446 |
// CMmPhoneTsy::DeleteAPNNameCancel
|
|
7447 |
// Cancel DeleteAPNEntry
|
|
7448 |
// (other items were commented in a header).
|
|
7449 |
// ---------------------------------------------------------------------------
|
|
7450 |
//
|
|
7451 |
TInt CMmPhoneTsy::DeleteAPNNameCancel()
|
|
7452 |
{
|
|
7453 |
TFLOGSTRING("TSY: CMmPhoneTsy::DeleteAPNNameCancel");
|
|
7454 |
// reset the reqhandle
|
|
7455 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
7456 |
EMultimodePhoneDeleteAPNName );
|
|
7457 |
|
|
7458 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7459 |
{
|
|
7460 |
ReqCompleted( reqHandle, KErrCancel );
|
|
7461 |
}
|
|
7462 |
|
|
7463 |
return KErrNone;
|
|
7464 |
}
|
|
7465 |
|
|
7466 |
// ---------------------------------------------------------------------------
|
|
7467 |
// CMmPhoneTsy::CompleteDeleteAPNName
|
|
7468 |
// Complete delete APN entry
|
|
7469 |
// (other items were commented in a header).
|
|
7470 |
// ---------------------------------------------------------------------------
|
|
7471 |
//
|
|
7472 |
void CMmPhoneTsy::CompleteDeleteAPNName(
|
|
7473 |
TInt aErrorCode )
|
|
7474 |
{
|
|
7475 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteDeleteAPNName. Error: %d", aErrorCode);
|
|
7476 |
|
|
7477 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
7478 |
EMultimodePhoneDeleteAPNName );
|
|
7479 |
|
|
7480 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7481 |
{
|
|
7482 |
ReqCompleted( reqHandle, aErrorCode );
|
|
7483 |
}
|
|
7484 |
}
|
|
7485 |
|
|
7486 |
// ---------------------------------------------------------------------------
|
|
7487 |
// CMmPhoneTsy::NotifyAPNListChanged
|
|
7488 |
// This function is used to request to receive notification of when the APN
|
|
7489 |
// control list changes.
|
|
7490 |
// (other items were commented in a header).
|
|
7491 |
// ---------------------------------------------------------------------------
|
|
7492 |
//
|
|
7493 |
TInt CMmPhoneTsy::NotifyAPNListChanged()
|
|
7494 |
{
|
|
7495 |
TFLOGSTRING("TSY: CMmPhoneTsy::NotifyAPNListChanged");
|
|
7496 |
|
|
7497 |
iReqHandleType = EMultimodePhoneNotifyAPNListChange;
|
|
7498 |
|
|
7499 |
return KErrNone;
|
|
7500 |
}
|
|
7501 |
|
|
7502 |
// ---------------------------------------------------------------------------
|
|
7503 |
// CMmPhoneTsy::NotifyAPNListChangedCancel
|
|
7504 |
// This function cancels an outstanding access point name (APN) control list
|
|
7505 |
// change notification request.
|
|
7506 |
// (other items were commented in a header).
|
|
7507 |
// ---------------------------------------------------------------------------
|
|
7508 |
//
|
|
7509 |
TInt CMmPhoneTsy::NotifyAPNListChangedCancel()
|
|
7510 |
{
|
|
7511 |
TFLOGSTRING("TSY: CMmPhoneTsy::NotifyAPNListChangedCancel");
|
|
7512 |
|
|
7513 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->
|
|
7514 |
ResetTsyReqHandle( EMultimodePhoneNotifyAPNListChange );
|
|
7515 |
|
|
7516 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7517 |
{
|
|
7518 |
ReqCompleted( reqHandle, KErrCancel );
|
|
7519 |
}
|
|
7520 |
|
|
7521 |
return KErrNone;
|
|
7522 |
}
|
|
7523 |
|
|
7524 |
// ---------------------------------------------------------------------------
|
|
7525 |
// CMmPhoneTsy::CompleteNotifyAPNListChanged
|
|
7526 |
// Complete notification request
|
|
7527 |
// (other items were commented in a header).
|
|
7528 |
// ---------------------------------------------------------------------------
|
|
7529 |
//
|
|
7530 |
void CMmPhoneTsy::CompleteNotifyAPNListChanged(
|
|
7531 |
TInt aErrorCode )
|
|
7532 |
{
|
|
7533 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteNotifyAPNListChanged");
|
|
7534 |
|
|
7535 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
7536 |
EMultimodePhoneNotifyAPNListChange );
|
|
7537 |
|
|
7538 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7539 |
{
|
|
7540 |
// complete the client request
|
|
7541 |
ReqCompleted( reqHandle, aErrorCode );
|
|
7542 |
}
|
|
7543 |
}
|
|
7544 |
|
|
7545 |
// ---------------------------------------------------------------------------
|
|
7546 |
// CMmPhoneTsy::SetAPNControlListServiceStatusL
|
|
7547 |
// Enabling and disabling the access point name (APN) control list service
|
|
7548 |
// (other items were commented in a header).
|
|
7549 |
// ---------------------------------------------------------------------------
|
|
7550 |
//
|
|
7551 |
TInt CMmPhoneTsy::SetAPNControlListServiceStatusL(
|
|
7552 |
const TTsyReqHandle aTsyReqHandle,
|
|
7553 |
RMobilePhone::TAPNControlListServiceStatus* aAPNControlListServiceStatus )
|
|
7554 |
{
|
|
7555 |
TFLOGSTRING("TSY: CMmPhoneTsy::SetAPNControlListServiceStatusL.");
|
|
7556 |
|
|
7557 |
iSetAclStatus = aAPNControlListServiceStatus;
|
|
7558 |
|
|
7559 |
// get the handle
|
|
7560 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
7561 |
EMultimodePhoneSetAPNControlListServiceStatus );
|
|
7562 |
|
|
7563 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7564 |
{
|
|
7565 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
7566 |
}
|
|
7567 |
else
|
|
7568 |
{
|
|
7569 |
CMmDataPackage dataPackage;
|
|
7570 |
dataPackage.PackData( iSetAclStatus );
|
|
7571 |
|
|
7572 |
TInt ret = MessageManager()->HandleRequestL(
|
|
7573 |
EMobilePhoneSetAPNControlListServiceStatus, &dataPackage );
|
|
7574 |
|
|
7575 |
if ( KErrNone != ret )
|
|
7576 |
{
|
|
7577 |
ReqCompleted( aTsyReqHandle, ret );
|
|
7578 |
}
|
|
7579 |
else
|
|
7580 |
{
|
|
7581 |
// Save the req handle type
|
|
7582 |
iReqHandleType = EMultimodePhoneSetAPNControlListServiceStatus;
|
|
7583 |
}
|
|
7584 |
}
|
|
7585 |
|
|
7586 |
return KErrNone;
|
|
7587 |
}
|
|
7588 |
|
|
7589 |
// ---------------------------------------------------------------------------
|
|
7590 |
// CMmPhoneTsy::SetAPNControlListServiceStatusCancel
|
|
7591 |
// Set ACL Status
|
|
7592 |
// (other items were commented in a header).
|
|
7593 |
// ---------------------------------------------------------------------------
|
|
7594 |
//
|
|
7595 |
TInt CMmPhoneTsy::SetAPNControlListServiceStatusCancel()
|
|
7596 |
{
|
|
7597 |
TFLOGSTRING("TSY: CMmPhoneTsy::SetAPNControlListServiceStatusCancel");
|
|
7598 |
|
|
7599 |
// erase pointer to client data
|
|
7600 |
iSetAclStatus = NULL;
|
|
7601 |
|
|
7602 |
// reset the reqhandle
|
|
7603 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
7604 |
EMultimodePhoneSetAPNControlListServiceStatus );
|
|
7605 |
|
|
7606 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7607 |
{
|
|
7608 |
ReqCompleted( reqHandle, KErrCancel );
|
|
7609 |
}
|
|
7610 |
|
|
7611 |
return KErrNone;
|
|
7612 |
}
|
|
7613 |
|
|
7614 |
// ---------------------------------------------------------------------------
|
|
7615 |
// CMmPhoneTsy::CompleteSetAPNControlListServiceStatus
|
|
7616 |
// Complete Set APN service status
|
|
7617 |
// (other items were commented in a header).
|
|
7618 |
// ---------------------------------------------------------------------------
|
|
7619 |
//
|
|
7620 |
void CMmPhoneTsy::CompleteSetAPNControlListServiceStatus(
|
|
7621 |
TInt aErrorCode )
|
|
7622 |
{
|
|
7623 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteSetAPNControlListServiceStatus. Error: %d", aErrorCode);
|
|
7624 |
|
|
7625 |
//reset req handle. Returns the deleted req handle
|
|
7626 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
7627 |
EMultimodePhoneSetAPNControlListServiceStatus );
|
|
7628 |
|
|
7629 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7630 |
{
|
|
7631 |
ReqCompleted( reqHandle, aErrorCode );
|
|
7632 |
}
|
|
7633 |
iSetAclStatus = NULL;
|
|
7634 |
}
|
|
7635 |
|
|
7636 |
// ---------------------------------------------------------------------------
|
|
7637 |
// CMmPhoneTsy::GetAPNControlListServiceStatusL
|
|
7638 |
// Get the status of the access point name (APN) control list service
|
|
7639 |
// (other items were commented in a header).
|
|
7640 |
// ---------------------------------------------------------------------------
|
|
7641 |
//
|
|
7642 |
TInt CMmPhoneTsy::GetAPNControlListServiceStatusL(
|
|
7643 |
const TTsyReqHandle aTsyReqHandle,
|
|
7644 |
RMobilePhone::TAPNControlListServiceStatus* aAPNControlListServiceStatus )
|
|
7645 |
{
|
|
7646 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetAPNControlListServiceStatusL");
|
|
7647 |
|
|
7648 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
7649 |
EMultimodePhoneGetAPNControlListServiceStatus );
|
|
7650 |
|
|
7651 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7652 |
{
|
|
7653 |
ReqCompleted( aTsyReqHandle, KErrServerBusy );
|
|
7654 |
}
|
|
7655 |
else
|
|
7656 |
{
|
|
7657 |
// save pointer to client data
|
|
7658 |
iRetAclStatus = aAPNControlListServiceStatus;
|
|
7659 |
|
|
7660 |
// call DOS (no packed parameters)
|
|
7661 |
TInt ret = MessageManager()->HandleRequestL(
|
|
7662 |
EMobilePhoneGetAPNControlListServiceStatus );
|
|
7663 |
|
|
7664 |
// check the result of the call
|
|
7665 |
if ( KErrNone != ret )
|
|
7666 |
{
|
|
7667 |
ReqCompleted ( aTsyReqHandle, ret );
|
|
7668 |
}
|
|
7669 |
else
|
|
7670 |
{
|
|
7671 |
// Store the request handle
|
|
7672 |
iReqHandleType = EMultimodePhoneGetAPNControlListServiceStatus;
|
|
7673 |
}
|
|
7674 |
}
|
|
7675 |
|
|
7676 |
return KErrNone;
|
|
7677 |
}
|
|
7678 |
|
|
7679 |
// ---------------------------------------------------------------------------
|
|
7680 |
// CMmPhoneTsy::GetAPNControlListServiceStatusCancel
|
|
7681 |
// Cancel the request to get ACL status
|
|
7682 |
// (other items were commented in a header).
|
|
7683 |
// ---------------------------------------------------------------------------
|
|
7684 |
//
|
|
7685 |
TInt CMmPhoneTsy::GetAPNControlListServiceStatusCancel()
|
|
7686 |
{
|
|
7687 |
TFLOGSTRING("TSY: CMmPhoneTsy::GetAPNControlListServiceStatusCancel");
|
|
7688 |
// reset the reqhandle
|
|
7689 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
7690 |
EMultimodePhoneGetAPNControlListServiceStatus );
|
|
7691 |
|
|
7692 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7693 |
{
|
|
7694 |
ReqCompleted( reqHandle, KErrCancel );
|
|
7695 |
}
|
|
7696 |
|
|
7697 |
return KErrNone;
|
|
7698 |
}
|
|
7699 |
|
|
7700 |
// ---------------------------------------------------------------------------
|
|
7701 |
// CMmPhoneTsy::CompleteGetAPNControlListServiceStatus
|
|
7702 |
// Complete Get APN service status
|
|
7703 |
// (other items were commented in a header).
|
|
7704 |
// ---------------------------------------------------------------------------
|
|
7705 |
//
|
|
7706 |
void CMmPhoneTsy::CompleteGetAPNControlListServiceStatus(
|
|
7707 |
CMmDataPackage* aDataPackage,
|
|
7708 |
TInt aErrorCode )
|
|
7709 |
{
|
|
7710 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteGetAPNControlListServiceStatus. Error %d", aErrorCode);
|
|
7711 |
|
|
7712 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
7713 |
EMultimodePhoneGetAPNControlListServiceStatus );
|
|
7714 |
|
|
7715 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7716 |
{
|
|
7717 |
if ( KErrNone == aErrorCode )
|
|
7718 |
{
|
|
7719 |
RMobilePhone::TAPNControlListServiceStatus aclStatus;
|
|
7720 |
aDataPackage->UnPackData( aclStatus );
|
|
7721 |
|
|
7722 |
// set the information for the client
|
|
7723 |
*iRetAclStatus = aclStatus;
|
|
7724 |
|
|
7725 |
//Complete request to success
|
|
7726 |
ReqCompleted( reqHandle, KErrNone );
|
|
7727 |
}
|
|
7728 |
else
|
|
7729 |
{
|
|
7730 |
// Complete with error
|
|
7731 |
ReqCompleted( reqHandle, aErrorCode );
|
|
7732 |
}
|
|
7733 |
|
|
7734 |
// reset the internal variable
|
|
7735 |
iRetAclStatus = NULL;
|
|
7736 |
}
|
|
7737 |
}
|
|
7738 |
|
|
7739 |
// ---------------------------------------------------------------------------
|
|
7740 |
// CMmPhoneTsy::NotifyAPNControlListServiceStatusChange
|
|
7741 |
// This function is used to request to receive notification of when the
|
|
7742 |
// status of the APN control list service changes.
|
|
7743 |
// (other items were commented in a header).
|
|
7744 |
// ---------------------------------------------------------------------------
|
|
7745 |
//
|
|
7746 |
TInt CMmPhoneTsy::NotifyAPNControlListServiceStatusChange(
|
|
7747 |
RMobilePhone::TAPNControlListServiceStatus* aAPNControlListServiceStatus )
|
|
7748 |
{
|
|
7749 |
TFLOGSTRING("TSY: CMmPhoneTsy::NotifyAPNControlListServiceStatusChange");
|
|
7750 |
|
|
7751 |
iRetNotifyAclStatus = aAPNControlListServiceStatus;
|
|
7752 |
iReqHandleType = EMultimodePhoneNotifyAPNControlListServiceStatusChange;
|
|
7753 |
|
|
7754 |
return KErrNone;
|
|
7755 |
}
|
|
7756 |
|
|
7757 |
// ---------------------------------------------------------------------------
|
|
7758 |
// CMmPhoneTsy::NotifyAPNControlListServiceStatusChangeCancel
|
|
7759 |
// This function cancels an outstanding access point name (APN) control list
|
|
7760 |
// service status change notification request.
|
|
7761 |
// (other items were commented in a header).
|
|
7762 |
// ---------------------------------------------------------------------------
|
|
7763 |
//
|
|
7764 |
TInt CMmPhoneTsy::NotifyAPNControlListServiceStatusChangeCancel()
|
|
7765 |
{
|
|
7766 |
TFLOGSTRING("TSY: CMmPhoneTsy::NotifyAPNControlListServiceStatusChangeCancel");
|
|
7767 |
|
|
7768 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
7769 |
EMultimodePhoneNotifyAPNControlListServiceStatusChange );
|
|
7770 |
|
|
7771 |
|
|
7772 |
if ( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7773 |
{
|
|
7774 |
ReqCompleted( reqHandle, KErrCancel );
|
|
7775 |
iRetNotifyAclStatus = NULL;
|
|
7776 |
}
|
|
7777 |
|
|
7778 |
return KErrNone;
|
|
7779 |
}
|
|
7780 |
|
|
7781 |
// ---------------------------------------------------------------------------
|
|
7782 |
// CMmPhoneTsy::CompleteNotifyAPNControlListServiceStatusChange
|
|
7783 |
// Complete service status notification
|
|
7784 |
// (other items were commented in a header).
|
|
7785 |
// ---------------------------------------------------------------------------
|
|
7786 |
//
|
|
7787 |
void CMmPhoneTsy::CompleteNotifyAPNControlListServiceStatusChange(
|
|
7788 |
CMmDataPackage* aDataPackage,
|
|
7789 |
TInt aErrorCode )
|
|
7790 |
{
|
|
7791 |
TFLOGSTRING("TSY: CMmPhoneTsy::CompleteNotifyAPNControlListServiceStatusChange");
|
|
7792 |
|
|
7793 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
|
|
7794 |
EMultimodePhoneNotifyAPNControlListServiceStatusChange );
|
|
7795 |
|
|
7796 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
7797 |
{
|
|
7798 |
if ( KErrNone == aErrorCode )
|
|
7799 |
{
|
|
7800 |
RMobilePhone::TAPNControlListServiceStatus aclStatus;
|
|
7801 |
aDataPackage->UnPackData( aclStatus );
|
|
7802 |
|
|
7803 |
// set the information for the client
|
|
7804 |
*iRetNotifyAclStatus = aclStatus;
|
|
7805 |
|
|
7806 |
//Complete request to success
|
|
7807 |
ReqCompleted( reqHandle, KErrNone );
|
|
7808 |
}
|
|
7809 |
else
|
|
7810 |
{
|
|
7811 |
// Complete with error
|
|
7812 |
ReqCompleted( reqHandle, aErrorCode );
|
|
7813 |
}
|
|
7814 |
|
|
7815 |
// reset the internal variable
|
|
7816 |
iRetNotifyAclStatus = NULL;
|
|
7817 |
}
|
|
7818 |
}
|
|
7819 |
|
|
7820 |
// ---------------------------------------------------------------------------
|
|
7821 |
// CMmPhoneTsy::SetAlsQueryInBoot
|
|
7822 |
// Sets internal boolean, which indicates is als query done during boot.
|
|
7823 |
// (other items were commented in a header).
|
|
7824 |
// ---------------------------------------------------------------------------
|
|
7825 |
//
|
|
7826 |
void CMmPhoneTsy::SetAlsQueryInBoot( TBool aInBoot )
|
|
7827 |
{
|
|
7828 |
iAlsQueryInBoot = aInBoot;
|
|
7829 |
}
|
|
7830 |
|
|
7831 |
// ---------------------------------------------------------------------------
|
|
7832 |
// CMmPhoneTsy::GetAlsQueryInBoot
|
|
7833 |
// Sets internal boolean, which indicates is als query done during boot.
|
|
7834 |
// (other items were commented in a header).
|
|
7835 |
// ---------------------------------------------------------------------------
|
|
7836 |
//
|
|
7837 |
TBool CMmPhoneTsy::GetAlsQueryInBoot()
|
|
7838 |
{
|
|
7839 |
return iAlsQueryInBoot;
|
|
7840 |
}
|
|
7841 |
|
|
7842 |
// ---------------------------------------------------------------------------
|
|
7843 |
// CMmPhoneTsy::GetHomeZoneParamsChecked
|
|
7844 |
// Returns value of iViagHomeZoneParamsChecked.
|
|
7845 |
// (other items were commented in a header).
|
|
7846 |
// ---------------------------------------------------------------------------
|
|
7847 |
//
|
|
7848 |
TBool CMmPhoneTsy::GetHomeZoneParamsChecked()
|
|
7849 |
{
|
|
7850 |
return iViagHomeZoneParamsChecked;
|
|
7851 |
}
|
|
7852 |
|
|
7853 |
// ---------------------------------------------------------------------------
|
|
7854 |
// CMmPhoneTsy::SetHomeZoneParamsChecked
|
|
7855 |
// Sets internal boolean, which indicates is HomeZoneParams
|
|
7856 |
// query done in SimStatusReady
|
|
7857 |
// (other items were commented in a header).
|
|
7858 |
// ---------------------------------------------------------------------------
|
|
7859 |
//
|
|
7860 |
void CMmPhoneTsy::SetHomeZoneParamsChecked( TBool aHomeZoneChecked )
|
|
7861 |
{
|
|
7862 |
iViagHomeZoneParamsChecked = aHomeZoneChecked;
|
|
7863 |
}
|
|
7864 |
|
|
7865 |
// ---------------------------------------------------------------------------
|
|
7866 |
// CMmPhoneTsy::CompleteNotifyCallDurationChange
|
|
7867 |
// Complete notification when duration changes (every 10sec). Timer causes calling of
|
|
7868 |
// this completion every 10 second.
|
|
7869 |
// ---------------------------------------------------------------------------
|
|
7870 |
//
|
|
7871 |
void CMmPhoneTsy::CompleteNotifyCallDurationChange()
|
|
7872 |
{
|
|
7873 |
TUint32 duration = KLifeTimeUpdateInterval;
|
|
7874 |
CMmDataPackage dataPackage;
|
|
7875 |
dataPackage.PackData( &duration );
|
|
7876 |
|
|
7877 |
TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteNotifyCallDurationChange - \
|
|
7878 |
duration: %d", duration);
|
|
7879 |
|
|
7880 |
#ifdef USING_CTSY_DISPATCHER
|
|
7881 |
TRAP_IGNORE(iMessageManager->HandleRequestL(
|
|
7882 |
ECtsyUpdateLifeTimeReq, &dataPackage );
|
|
7883 |
);
|
|
7884 |
#else
|
|
7885 |
TRAP_IGNORE(iMessageManager->HandleRequestL(
|
|
7886 |
EMmTsyUpdateLifeTimeIPC, &dataPackage );
|
|
7887 |
);
|
|
7888 |
#endif //USING_CTSY_DISPATCHER
|
|
7889 |
}
|
|
7890 |
|
|
7891 |
// ---------------------------------------------------------------------------
|
|
7892 |
// CMmPhoneTsy::NotifyTelephonyAudioControlError
|
|
7893 |
// Receives error notifications from Telephony audio control
|
|
7894 |
// ---------------------------------------------------------------------------
|
|
7895 |
//
|
|
7896 |
#if TF_LOGGING_METHOD == 1
|
|
7897 |
void CMmPhoneTsy::NotifyTelephonyAudioControlError( const TName& aCallName,
|
|
7898 |
const TInt& aError )
|
|
7899 |
{
|
|
7900 |
TFLOGSTRING3("TSY: CMmPhoneTsy::NotifyAudioControlError. Call name:%S, Error code %d", &aCallName, aError );
|
|
7901 |
#else
|
|
7902 |
void CMmPhoneTsy::NotifyTelephonyAudioControlError( const TName& /*aCallName*/,
|
|
7903 |
const TInt& /*aError*/ )
|
|
7904 |
{
|
|
7905 |
#endif // TF_LOGGING_METHOD
|
|
7906 |
|
|
7907 |
TInt callCount( iCallList->GetNumberOfObjects() );
|
|
7908 |
// find all the audio calls and hang up them all
|
|
7909 |
for ( TInt i = callCount; 0 < i; i-- )
|
|
7910 |
{
|
|
7911 |
CMmCallTsy* call = iCallList->GetMmCallById( i );
|
|
7912 |
if ( NULL != call )
|
|
7913 |
{
|
|
7914 |
if ( RMobilePhone::EVoiceService == call->CallMode() ||
|
|
7915 |
RMobilePhone::EAuxVoiceService == call->CallMode() )
|
|
7916 |
{
|
|
7917 |
call->HangUp( CMmCallTsy::EMultimodeCallReqHandleUnknown );
|
|
7918 |
}
|
|
7919 |
}
|
|
7920 |
}
|
|
7921 |
|
|
7922 |
}
|
|
7923 |
|
|
7924 |
// ---------------------------------------------------------------------------
|
|
7925 |
// CMmPhoneTsy::SetPBInitActiveStatus
|
|
7926 |
// Is PB intitialization active.
|
|
7927 |
// (other items were commented in a header).
|
|
7928 |
// ---------------------------------------------------------------------------
|
|
7929 |
//
|
|
7930 |
void CMmPhoneTsy::SetPBInitActiveStatus( TBool aIsInitializationActive )
|
|
7931 |
{
|
|
7932 |
TFLOGSTRING2("TSY: CMmPhoneTsy::SetPBInitActiveStatus: - prev.status %i", iIsInitializationActive);
|
|
7933 |
TFLOGSTRING2("TSY: CMmPhoneTsy::SetPBInitActiveStatus: %i", aIsInitializationActive);
|
|
7934 |
|
|
7935 |
iIsInitializationActive = aIsInitializationActive;
|
|
7936 |
}
|
|
7937 |
|
|
7938 |
// ---------------------------------------------------------------------------
|
|
7939 |
// CMmPhoneTsy::IsPBInitActive
|
|
7940 |
// Is PB intitialization active.
|
|
7941 |
// (other items were commented in a header).
|
|
7942 |
// ---------------------------------------------------------------------------
|
|
7943 |
//
|
|
7944 |
TBool CMmPhoneTsy::IsPBInitActive()
|
|
7945 |
{
|
|
7946 |
TFLOGSTRING2("TSY: CMmPhoneTsy::IsPBInitActive: %i", iIsInitializationActive);
|
|
7947 |
|
|
7948 |
return iIsInitializationActive;
|
|
7949 |
}
|
|
7950 |
|
|
7951 |
// ---------------------------------------------------------------------------
|
|
7952 |
// CMmPhoneTsy::IsHWRMSupported
|
|
7953 |
// availability of Hareware Resource Manager in the current ROM
|
|
7954 |
// Returns TTrue indicate HWRM is available. TFalse indicate it is unavailable
|
|
7955 |
// ---------------------------------------------------------------------------
|
|
7956 |
//
|
|
7957 |
TBool CMmPhoneTsy::IsHWRMSupported()
|
|
7958 |
{
|
|
7959 |
#ifdef __EABI__
|
|
7960 |
return KHWRMIsSupported != 0;
|
|
7961 |
#else // WINSCW
|
|
7962 |
// for the emulator the SecureId of Master phone application is patched via the epoc32\data\epoc.ini file
|
|
7963 |
// for example, define
|
|
7964 |
// ctsy_KHWRMIsSupported 1
|
|
7965 |
TInt HWRMSupported = 0;
|
|
7966 |
UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalIntProperty,(TAny*)"ctsy_KHWRMIsSupported", &HWRMSupported);
|
|
7967 |
return HWRMSupported != 0;
|
|
7968 |
#endif
|
|
7969 |
}
|
|
7970 |
|
|
7971 |
// ---------------------------------------------------------------------------
|
|
7972 |
// CMmPhoneTsy::IsSIMReady
|
|
7973 |
// Is SIM ready for query.
|
|
7974 |
// (other items were commented in a header).
|
|
7975 |
// ---------------------------------------------------------------------------
|
|
7976 |
//
|
|
7977 |
TBool CMmPhoneTsy::IsSIMReady()
|
|
7978 |
{
|
|
7979 |
TFLOGSTRING2("TSY: CMmPhoneTsy::IsSIMReady: %i", iBootState.iSIMReady);
|
|
7980 |
return iBootState.iSIMReady;
|
|
7981 |
}
|
|
7982 |
|
|
7983 |
// ---------------------------------------------------------------------------
|
|
7984 |
// CMmPhoneTsy::SaveFdnInfoDetails
|
|
7985 |
// FDN details saved in case of FDN Pb not created but info received
|
|
7986 |
// (other items were commented in a header).
|
|
7987 |
// ---------------------------------------------------------------------------
|
|
7988 |
//
|
|
7989 |
void CMmPhoneTsy::SaveFdnInfoDetails( TInt aResult, CMmDataPackage* aDataPackage )
|
|
7990 |
{
|
|
7991 |
TFLOGSTRING2("TSY: CMmPhoneTsy::SaveFdnInfoDetails aResult: %d", aResult );
|
|
7992 |
|
|
7993 |
// Store FDN info only in successfull case
|
|
7994 |
if ( KErrNone == aResult )
|
|
7995 |
{
|
|
7996 |
TPBFdnInfo pbFdnInfo;
|
|
7997 |
aDataPackage->UnPackData( pbFdnInfo );
|
|
7998 |
iPhoneBookState->iFDNNumOfEntries = pbFdnInfo.iFDNNumOfEntries;
|
|
7999 |
iPhoneBookState->iFDNNumberLengthMax = pbFdnInfo.iFDNNumberLengthMax;
|
|
8000 |
iPhoneBookState->iFDNTextLengthMax = pbFdnInfo.iFDNTextLengthMax;
|
|
8001 |
|
|
8002 |
TFLOGSTRING2("TSY: CMmPhoneTsy::SaveFdnInfoDetails - iFDNNumOfEntries: %i",iPhoneBookState->iFDNNumOfEntries );
|
|
8003 |
TFLOGSTRING2("TSY: CMmPhoneTsy::SaveFdnInfoDetails - iFDNNumberLengthMax: %i",iPhoneBookState->iFDNNumberLengthMax );
|
|
8004 |
TFLOGSTRING2("TSY: CMmPhoneTsy::SaveFdnInfoDetails - iFDNTextLengthMax: %i",iPhoneBookState->iFDNTextLengthMax );
|
|
8005 |
}
|
|
8006 |
}
|
|
8007 |
|
|
8008 |
// ---------------------------------------------------------------------------
|
|
8009 |
// CMmPhoneTsy::IsModemStatusReady
|
|
8010 |
// Is modem status ready
|
|
8011 |
// (other items were commented in a header).
|
|
8012 |
// ---------------------------------------------------------------------------
|
|
8013 |
//
|
|
8014 |
TBool CMmPhoneTsy::IsModemStatusReady() const
|
|
8015 |
{
|
|
8016 |
TFLOGSTRING2("TSY: CMmPhoneTsy::IsModemStatusReady: %i", iIsModemReady );
|
|
8017 |
|
|
8018 |
return iIsModemReady;
|
|
8019 |
}
|
|
8020 |
|
|
8021 |
// ---------------------------------------------------------------------------
|
|
8022 |
// CMmPhoneTsy::PhoneBookStoreInitCompleteL
|
|
8023 |
// The phone book store initilization was complete
|
|
8024 |
// (other items were commented in a header).
|
|
8025 |
// ---------------------------------------------------------------------------
|
|
8026 |
//
|
|
8027 |
void CMmPhoneTsy::PhoneBookStoreInitCompleteL(TInt aError)
|
|
8028 |
{
|
|
8029 |
TFLOGSTRING("TSY: CMmPhoneTsy::PhoneBookStoreInitCompleteL ");
|
|
8030 |
TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
|
|
8031 |
EMultimodePhoneGetMailboxNumbers );
|
|
8032 |
if( EMultimodePhoneReqHandleUnknown != reqHandle )
|
|
8033 |
{
|
|
8034 |
if( KErrNone != aError )
|
|
8035 |
{
|
|
8036 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodePhoneGetMailboxNumbers );
|
|
8037 |
ReqCompleted(reqHandle, aError);
|
|
8038 |
return;
|
|
8039 |
}
|
|
8040 |
CMmDataPackage mailBoxDataPackage;
|
|
8041 |
mailBoxDataPackage.PackData( &iMailboxData );
|
|
8042 |
|
|
8043 |
TInt ret = ( MessageManager()->HandleRequestL(
|
|
8044 |
EMobilePhoneGetMailboxNumbers, &mailBoxDataPackage ) );
|
|
8045 |
if(ret != KErrNone)
|
|
8046 |
{
|
|
8047 |
iTsyReqHandleStore->ResetTsyReqHandle( EMultimodePhoneGetMailboxNumbers );
|
|
8048 |
ReqCompleted(reqHandle, ret);
|
|
8049 |
}
|
|
8050 |
|
|
8051 |
}
|
|
8052 |
if(GetONStoreTsy() != NULL)
|
|
8053 |
{
|
|
8054 |
GetONStoreTsy()->PhoneBookStoreInitCompleteL(aError);
|
|
8055 |
}
|
|
8056 |
}
|
|
8057 |
|
|
8058 |
// End of File
|
|
8059 |
|