|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include <etelmm.h> |
|
20 #include "cmmphonegsmwcdmaext.h" |
|
21 #include "cmmphonetsy.h" |
|
22 #include "cmmlinetsy.h" |
|
23 #include "cmmcalltsy.h" |
|
24 #include "cmmcalllist.h" |
|
25 #include "CMmCommonStaticUtility.h" |
|
26 #include "MmTsy_conf.h" |
|
27 #include <ctsy/serviceapi/mmtsy_ipcdefs.h> |
|
28 #include "cmmmessagemanagerbase.h" |
|
29 #include <ctsy/pluginapi/cmmdatapackage.h> |
|
30 #include "cmmsecuritytsy.h" |
|
31 |
|
32 |
|
33 // ======== MEMBER FUNCTIONS ======== |
|
34 |
|
35 CMmPhoneGsmWcdmaExt::CMmPhoneGsmWcdmaExt() |
|
36 { |
|
37 } |
|
38 |
|
39 CMmPhoneGsmWcdmaExt::~CMmPhoneGsmWcdmaExt() |
|
40 { |
|
41 if ( iCurrentNwInfo ) |
|
42 { |
|
43 delete iCurrentNwInfo; |
|
44 } |
|
45 iCurrentNwInfo = NULL; |
|
46 |
|
47 if ( iCurrentLocationArea ) |
|
48 { |
|
49 delete iCurrentLocationArea; |
|
50 } |
|
51 iCurrentLocationArea = NULL; |
|
52 |
|
53 if ( iGsmHomeNetwork ) |
|
54 { |
|
55 delete iGsmHomeNetwork; |
|
56 } |
|
57 iGsmHomeNetwork = NULL; |
|
58 |
|
59 iMmPhoneTsy = NULL; |
|
60 iMessageManager = NULL; |
|
61 } |
|
62 |
|
63 CMmPhoneGsmWcdmaExt* CMmPhoneGsmWcdmaExt::NewL( |
|
64 CMmPhoneTsy* aMmPhoneTsy, |
|
65 CMmMessageManagerBase* aMessageManager ) |
|
66 { |
|
67 |
|
68 CMmPhoneGsmWcdmaExt* phoneGsmWcdmaExt = new( ELeave ) |
|
69 CMmPhoneGsmWcdmaExt(); |
|
70 |
|
71 CleanupStack::PushL( phoneGsmWcdmaExt ); |
|
72 phoneGsmWcdmaExt->iMmPhoneTsy = aMmPhoneTsy; |
|
73 phoneGsmWcdmaExt->iMessageManager = aMessageManager; |
|
74 phoneGsmWcdmaExt->ConstructL(); |
|
75 CleanupStack::Pop(); |
|
76 |
|
77 return phoneGsmWcdmaExt; |
|
78 |
|
79 } |
|
80 |
|
81 void CMmPhoneGsmWcdmaExt::ConstructL() |
|
82 { |
|
83 |
|
84 iCurrentNwInfo = new ( ELeave ) RMobilePhone::TMobilePhoneNetworkInfoV8; |
|
85 iCurrentLocationArea = new ( ELeave ) |
|
86 RMobilePhone::TMobilePhoneLocationAreaV1; |
|
87 |
|
88 iGsmHomeNetwork = new ( ELeave ) RMobilePhone::TMobilePhoneNetworkInfoV8; |
|
89 iNitzInfo.iNitzFieldsUsed = 0x00; |
|
90 |
|
91 iAdnEnabled = EFalse; |
|
92 iAdnStatusFetched = EFalse; |
|
93 iFdnStatusFetched = EFalse; |
|
94 |
|
95 // empty buffer is used in various places when sending isi service request |
|
96 // into network |
|
97 iEmptyBuffer.Set( KNullDesC ); |
|
98 |
|
99 //set initial security capability values |
|
100 iSecurityCaps = KMultimodeTsyGsmSecurityInitCaps; |
|
101 |
|
102 //set initial lock status and setting |
|
103 iPhoneDeviceStatus = RMobilePhone::EStatusLockUnknown; |
|
104 iPhoneDeviceSetting = RMobilePhone::ELockSetUnknown; |
|
105 iICCStatus = RMobilePhone::EStatusLockUnknown; |
|
106 iICCSetting = RMobilePhone::ELockSetUnknown; |
|
107 iPhoneToICCStatus = RMobilePhone::EStatusLockUnknown; |
|
108 iPhoneToICCSetting = RMobilePhone::ELockSetUnknown; |
|
109 |
|
110 // set initial card generation type to unknown |
|
111 iCurrentICCType = EICCTypeSimUnknown; |
|
112 |
|
113 //initialize password value |
|
114 iSecCode.Zero(); |
|
115 //set intial value for flag about home network information |
|
116 iIsHomeNetworkInfoAvailable = EFalse; |
|
117 |
|
118 // below it's checked if all multimode api call services are supported |
|
119 // by tsy |
|
120 #pragma warning( disable : 4127 ) |
|
121 //Warning caused by configurational constants in if case. This is not |
|
122 //really error but acts as a flag. This warning is purely informational as |
|
123 //can be seen from the explanation of Visual C++ help: |
|
124 //Compiler Warning (level 4) C4127 |
|
125 //conditional expression is constant. The controlling expression of an |
|
126 //if statement or while loop evaluated to a constant. As a result, the |
|
127 //code in the body of the if statement or while loop either always |
|
128 //executes or never executes. This warning is informational. |
|
129 if ( KVoice1LineSupported && |
|
130 KDataLineSupported && |
|
131 KFaxLineSupported && |
|
132 KVoice2LineSupported && |
|
133 KSmsMessagingSupported && |
|
134 KGprsLineSupported ) |
|
135 { |
|
136 iCallServicesSupportedAll = ETrue; |
|
137 } |
|
138 else |
|
139 { |
|
140 iCallServicesSupportedAll = EFalse; |
|
141 } |
|
142 #pragma warning( default : 4127 ) |
|
143 |
|
144 } |
|
145 |
|
146 |
|
147 // --------------------------------------------------------------------------- |
|
148 // CMmPhoneGsmWcdmaExt::InitSimL |
|
149 // Called as part of the boot sequence. This method request the sim related |
|
150 // information required as part of the TSY's boot sequence |
|
151 // (other items were commented in a header). |
|
152 // --------------------------------------------------------------------------- |
|
153 // |
|
154 TInt CMmPhoneGsmWcdmaExt::InitSimL() |
|
155 { |
|
156 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::InitSimL"); |
|
157 |
|
158 TInt ret( KErrGeneral ); |
|
159 |
|
160 //get the home network information in boot-up |
|
161 iMessageManager->HandleRequestL( EMobilePhoneGetHomeNetwork ); |
|
162 |
|
163 // Check whether is possible to disable PIN |
|
164 iMessageManager->HandleRequestL( EMmTsyPhoneGetPin1DisableSupportedIPC ); |
|
165 |
|
166 // Register for SIM refresh (supported only in 3.0) |
|
167 iMmPhoneTsy->SimRefreshRegisterL(); |
|
168 |
|
169 return ret; |
|
170 } |
|
171 |
|
172 // --------------------------------------------------------------------------- |
|
173 // CMmPhoneGsmWcdmaExt::GetNetworkCaps |
|
174 // Gets static GSM network capabilities |
|
175 // (other items were commented in a header). |
|
176 // --------------------------------------------------------------------------- |
|
177 // |
|
178 TInt CMmPhoneGsmWcdmaExt::GetNetworkCaps( |
|
179 TUint32* aCaps ) |
|
180 { |
|
181 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::GetNetworkCaps"); |
|
182 |
|
183 *aCaps = RMobilePhone::KCapsGetRegistrationStatus |
|
184 | RMobilePhone::KCapsNotifyRegistrationStatus |
|
185 | RMobilePhone::KCapsGetCurrentMode |
|
186 | RMobilePhone::KCapsNotifyMode |
|
187 | RMobilePhone::KCapsGetCurrentNetwork |
|
188 | RMobilePhone::KCapsNotifyCurrentNetwork |
|
189 | RMobilePhone::KCapsGetHomeNetwork |
|
190 | RMobilePhone::KCapsGetDetectedNetworks |
|
191 | RMobilePhone::KCapsManualNetworkSelection |
|
192 | RMobilePhone::KCapsNotifyNITZInfo |
|
193 | RMobilePhone::KCapsGetNITZInfo; |
|
194 |
|
195 return KErrNone; |
|
196 } |
|
197 |
|
198 // --------------------------------------------------------------------------- |
|
199 // CMmPhoneGsmWcdmaExt::GetCurrentNetworkV1 |
|
200 // Gets the current network's information (mode, status, etc) and the |
|
201 // location area, use the version 1 specified information fields |
|
202 // (other items were commented in a header). |
|
203 // --------------------------------------------------------------------------- |
|
204 // |
|
205 TInt CMmPhoneGsmWcdmaExt::GetCurrentNetworkV1( |
|
206 RMobilePhone::TMobilePhoneNetworkInfoV1* aNetInfo, |
|
207 RMobilePhone::TMobilePhoneLocationAreaV1* aArea ) |
|
208 { |
|
209 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::GetCurrentNetworkV1"); |
|
210 |
|
211 if ( NULL != aNetInfo ) |
|
212 { |
|
213 // version 1 information, copy the values |
|
214 aNetInfo->iMode = iCurrentNwInfo->iMode; |
|
215 aNetInfo->iStatus = iCurrentNwInfo->iStatus; |
|
216 aNetInfo->iBandInfo = iCurrentNwInfo->iBandInfo; |
|
217 aNetInfo->iCountryCode = iCurrentNwInfo->iCountryCode; |
|
218 aNetInfo->iCdmaSID = iCurrentNwInfo->iCdmaSID; |
|
219 aNetInfo->iAnalogSID = iCurrentNwInfo->iAnalogSID; |
|
220 aNetInfo->iNetworkId = iCurrentNwInfo->iNetworkId; |
|
221 aNetInfo->iDisplayTag = iCurrentNwInfo->iDisplayTag; |
|
222 aNetInfo->iShortName = iCurrentNwInfo->iShortName; |
|
223 aNetInfo->iLongName = iCurrentNwInfo->iLongName; |
|
224 } |
|
225 if ( NULL != aArea ) |
|
226 { |
|
227 // iCurrentLocationArea can't be NULL |
|
228 *aArea = *iCurrentLocationArea; |
|
229 } |
|
230 |
|
231 return KErrNone; |
|
232 } |
|
233 |
|
234 // --------------------------------------------------------------------------- |
|
235 // CMmPhoneGsmWcdmaExt::GetCurrentNetworkV2 |
|
236 // Gets the current network's information (mode, status, etc) and the |
|
237 // location area, use the version 2 specified information fields |
|
238 // (other items were commented in a header). |
|
239 // --------------------------------------------------------------------------- |
|
240 // |
|
241 TInt CMmPhoneGsmWcdmaExt::GetCurrentNetworkV2( |
|
242 RMobilePhone::TMobilePhoneNetworkInfoV2* aNetInfo, |
|
243 RMobilePhone::TMobilePhoneLocationAreaV1* aArea ) |
|
244 { |
|
245 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::GetCurrentNetworkV2"); |
|
246 |
|
247 if ( NULL != aNetInfo ) |
|
248 { |
|
249 // version 1 information |
|
250 aNetInfo->iMode = iCurrentNwInfo->iMode; |
|
251 aNetInfo->iStatus = iCurrentNwInfo->iStatus; |
|
252 aNetInfo->iBandInfo = iCurrentNwInfo->iBandInfo; |
|
253 aNetInfo->iCountryCode = iCurrentNwInfo->iCountryCode; |
|
254 aNetInfo->iCdmaSID = iCurrentNwInfo->iCdmaSID; |
|
255 aNetInfo->iAnalogSID = iCurrentNwInfo->iAnalogSID; |
|
256 aNetInfo->iNetworkId = iCurrentNwInfo->iNetworkId; |
|
257 aNetInfo->iDisplayTag = iCurrentNwInfo->iDisplayTag; |
|
258 aNetInfo->iShortName = iCurrentNwInfo->iShortName; |
|
259 aNetInfo->iLongName = iCurrentNwInfo->iLongName; |
|
260 // extended version 2 information |
|
261 aNetInfo->iAccess = iCurrentNwInfo->iAccess; |
|
262 } |
|
263 if ( NULL != aArea ) |
|
264 { |
|
265 // iCurrentLocationArea can't be NULL |
|
266 *aArea = *iCurrentLocationArea; |
|
267 } |
|
268 |
|
269 return KErrNone; |
|
270 } |
|
271 |
|
272 // --------------------------------------------------------------------------- |
|
273 // CMmPhoneGsmWcdmaExt::GetCurrentNetworkV5 |
|
274 // Gets the current network's information (mode, status, etc) and the |
|
275 // location area, use the version 5 information. |
|
276 // (other items were commented in a header). |
|
277 // --------------------------------------------------------------------------- |
|
278 // |
|
279 TInt CMmPhoneGsmWcdmaExt::GetCurrentNetworkV5( |
|
280 RMobilePhone::TMobilePhoneNetworkInfoV5* aNetInfo, |
|
281 RMobilePhone::TMobilePhoneLocationAreaV1* aArea ) |
|
282 { |
|
283 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::GetCurrentNetworkV5" ); |
|
284 |
|
285 if ( NULL != aNetInfo ) |
|
286 { |
|
287 // version 1 information |
|
288 aNetInfo->iMode = iCurrentNwInfo->iMode; |
|
289 aNetInfo->iStatus = iCurrentNwInfo->iStatus; |
|
290 aNetInfo->iBandInfo = iCurrentNwInfo->iBandInfo; |
|
291 aNetInfo->iCountryCode = iCurrentNwInfo->iCountryCode; |
|
292 aNetInfo->iCdmaSID = iCurrentNwInfo->iCdmaSID; |
|
293 aNetInfo->iAnalogSID = iCurrentNwInfo->iAnalogSID; |
|
294 aNetInfo->iNetworkId = iCurrentNwInfo->iNetworkId; |
|
295 aNetInfo->iDisplayTag = iCurrentNwInfo->iDisplayTag; |
|
296 aNetInfo->iShortName = iCurrentNwInfo->iShortName; |
|
297 aNetInfo->iLongName = iCurrentNwInfo->iLongName; |
|
298 // extended version 2 information |
|
299 aNetInfo->iAccess = iCurrentNwInfo->iAccess; |
|
300 // extended version 5 information |
|
301 aNetInfo->iHsdpaAvailableIndicator = |
|
302 iCurrentNwInfo->iHsdpaAvailableIndicator; |
|
303 aNetInfo->iEgprsAvailableIndicator = |
|
304 iCurrentNwInfo->iEgprsAvailableIndicator; |
|
305 } |
|
306 if ( NULL != aArea ) |
|
307 { |
|
308 // iCurrentLocationArea can't be NULL |
|
309 *aArea = *iCurrentLocationArea; |
|
310 } |
|
311 |
|
312 return KErrNone; |
|
313 } |
|
314 |
|
315 // --------------------------------------------------------------------------- |
|
316 // CMmPhoneGsmWcdmaExt::GetCurrentNetwork |
|
317 // Gets the current network's information (mode, status, etc) and the |
|
318 // location area, use the default version 8 information. |
|
319 // (other items were commented in a header). |
|
320 // --------------------------------------------------------------------------- |
|
321 // |
|
322 TInt CMmPhoneGsmWcdmaExt::GetCurrentNetwork( |
|
323 RMobilePhone::TMobilePhoneNetworkInfoV8* aNetInfo, |
|
324 RMobilePhone::TMobilePhoneLocationAreaV1* aArea ) |
|
325 { |
|
326 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::GetCurrentNetwork" ); |
|
327 |
|
328 if ( NULL != aNetInfo ) |
|
329 { |
|
330 // version 1 information |
|
331 aNetInfo->iMode = iCurrentNwInfo->iMode; |
|
332 aNetInfo->iStatus = iCurrentNwInfo->iStatus; |
|
333 aNetInfo->iBandInfo = iCurrentNwInfo->iBandInfo; |
|
334 aNetInfo->iCountryCode = iCurrentNwInfo->iCountryCode; |
|
335 aNetInfo->iCdmaSID = iCurrentNwInfo->iCdmaSID; |
|
336 aNetInfo->iAnalogSID = iCurrentNwInfo->iAnalogSID; |
|
337 aNetInfo->iNetworkId = iCurrentNwInfo->iNetworkId; |
|
338 aNetInfo->iDisplayTag = iCurrentNwInfo->iDisplayTag; |
|
339 aNetInfo->iShortName = iCurrentNwInfo->iShortName; |
|
340 aNetInfo->iLongName = iCurrentNwInfo->iLongName; |
|
341 // extended version 2 information |
|
342 aNetInfo->iAccess = iCurrentNwInfo->iAccess; |
|
343 // extended version 5 information |
|
344 aNetInfo->iHsdpaAvailableIndicator = |
|
345 iCurrentNwInfo->iHsdpaAvailableIndicator; |
|
346 aNetInfo->iEgprsAvailableIndicator = |
|
347 iCurrentNwInfo->iEgprsAvailableIndicator; |
|
348 // extended version 8 information |
|
349 aNetInfo->iHsupaAvailableIndicator = |
|
350 iCurrentNwInfo->iHsupaAvailableIndicator; |
|
351 } |
|
352 if ( NULL != aArea ) |
|
353 { |
|
354 // iCurrentLocationArea can't be NULL |
|
355 *aArea = *iCurrentLocationArea; |
|
356 } |
|
357 |
|
358 return KErrNone; |
|
359 } |
|
360 |
|
361 // --------------------------------------------------------------------------- |
|
362 // CMmPhoneGsmWcdmaExt::GetCurrentNetworkNoLocationV1 |
|
363 // Gets the current network's information (mode, status, etc), but not the |
|
364 // location area, use the version 1 specified information fields |
|
365 // (other items were commented in a header). |
|
366 // --------------------------------------------------------------------------- |
|
367 // |
|
368 TInt CMmPhoneGsmWcdmaExt::GetCurrentNetworkNoLocationV1( |
|
369 RMobilePhone::TMobilePhoneNetworkInfoV1* aNetInfo ) |
|
370 { |
|
371 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::GetCurrentNetworkNoLocationV1" ); |
|
372 |
|
373 if ( NULL != aNetInfo ) |
|
374 { |
|
375 // version 1 network information |
|
376 aNetInfo->iMode = iCurrentNwInfo->iMode; |
|
377 aNetInfo->iStatus = iCurrentNwInfo->iStatus; |
|
378 aNetInfo->iBandInfo = iCurrentNwInfo->iBandInfo; |
|
379 aNetInfo->iCountryCode = iCurrentNwInfo->iCountryCode; |
|
380 aNetInfo->iCdmaSID = iCurrentNwInfo->iCdmaSID; |
|
381 aNetInfo->iAnalogSID = iCurrentNwInfo->iAnalogSID; |
|
382 aNetInfo->iNetworkId = iCurrentNwInfo->iNetworkId; |
|
383 aNetInfo->iDisplayTag = iCurrentNwInfo->iDisplayTag; |
|
384 aNetInfo->iShortName = iCurrentNwInfo->iShortName; |
|
385 aNetInfo->iLongName = iCurrentNwInfo->iLongName; |
|
386 } |
|
387 |
|
388 return KErrNone; |
|
389 } |
|
390 |
|
391 // --------------------------------------------------------------------------- |
|
392 // CMmPhoneGsmWcdmaExt::GetCurrentNetworkNoLocationV2 |
|
393 // Gets the current network's information (mode, status, etc), but not the |
|
394 // location area, use the version 2 specified info. |
|
395 // (other items were commented in a header). |
|
396 // --------------------------------------------------------------------------- |
|
397 // |
|
398 TInt CMmPhoneGsmWcdmaExt::GetCurrentNetworkNoLocationV2( |
|
399 RMobilePhone::TMobilePhoneNetworkInfoV2* aNetInfo ) |
|
400 { |
|
401 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::GetCurrentNetworkNoLocationV2" ); |
|
402 |
|
403 if ( NULL != aNetInfo ) |
|
404 { |
|
405 // version 1 information |
|
406 aNetInfo->iMode = iCurrentNwInfo->iMode; |
|
407 aNetInfo->iStatus = iCurrentNwInfo->iStatus; |
|
408 aNetInfo->iBandInfo = iCurrentNwInfo->iBandInfo; |
|
409 aNetInfo->iCountryCode = iCurrentNwInfo->iCountryCode; |
|
410 aNetInfo->iCdmaSID = iCurrentNwInfo->iCdmaSID; |
|
411 aNetInfo->iAnalogSID = iCurrentNwInfo->iAnalogSID; |
|
412 aNetInfo->iNetworkId = iCurrentNwInfo->iNetworkId; |
|
413 aNetInfo->iDisplayTag = iCurrentNwInfo->iDisplayTag; |
|
414 aNetInfo->iShortName = iCurrentNwInfo->iShortName; |
|
415 aNetInfo->iLongName = iCurrentNwInfo->iLongName; |
|
416 // extended version 2 information |
|
417 aNetInfo->iAccess = iCurrentNwInfo->iAccess; |
|
418 } |
|
419 |
|
420 return KErrNone; |
|
421 } |
|
422 |
|
423 // --------------------------------------------------------------------------- |
|
424 // CMmPhoneGsmWcdmaExt::GetCurrentNetworkNoLocationV5 |
|
425 // Gets the current network's information (mode, status, etc), but not the |
|
426 // location area, use the version 5 information. |
|
427 // (other items were commented in a header). |
|
428 // --------------------------------------------------------------------------- |
|
429 // |
|
430 TInt CMmPhoneGsmWcdmaExt::GetCurrentNetworkNoLocationV5( |
|
431 RMobilePhone::TMobilePhoneNetworkInfoV5* aNetInfo ) |
|
432 { |
|
433 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::GetCurrentNetworkNoLocationV5" ); |
|
434 |
|
435 if ( NULL != aNetInfo ) |
|
436 { |
|
437 // version 1 information |
|
438 aNetInfo->iMode = iCurrentNwInfo->iMode; |
|
439 aNetInfo->iStatus = iCurrentNwInfo->iStatus; |
|
440 aNetInfo->iBandInfo = iCurrentNwInfo->iBandInfo; |
|
441 aNetInfo->iCountryCode = iCurrentNwInfo->iCountryCode; |
|
442 aNetInfo->iCdmaSID = iCurrentNwInfo->iCdmaSID; |
|
443 aNetInfo->iAnalogSID = iCurrentNwInfo->iAnalogSID; |
|
444 aNetInfo->iNetworkId = iCurrentNwInfo->iNetworkId; |
|
445 aNetInfo->iDisplayTag = iCurrentNwInfo->iDisplayTag; |
|
446 aNetInfo->iShortName = iCurrentNwInfo->iShortName; |
|
447 aNetInfo->iLongName = iCurrentNwInfo->iLongName; |
|
448 // extended version 2 information |
|
449 aNetInfo->iAccess = iCurrentNwInfo->iAccess; |
|
450 // extended version 5 information |
|
451 aNetInfo->iHsdpaAvailableIndicator = |
|
452 iCurrentNwInfo->iHsdpaAvailableIndicator; |
|
453 aNetInfo->iEgprsAvailableIndicator = |
|
454 iCurrentNwInfo->iEgprsAvailableIndicator; |
|
455 } |
|
456 |
|
457 return KErrNone; |
|
458 } |
|
459 |
|
460 // --------------------------------------------------------------------------- |
|
461 // CMmPhoneGsmWcdmaExt::GetCurrentNetworkNoLocation |
|
462 // Gets the current network's information (mode, status, etc), but not the |
|
463 // location area, use the default version 8 information. |
|
464 // (other items were commented in a header). |
|
465 // --------------------------------------------------------------------------- |
|
466 // |
|
467 TInt CMmPhoneGsmWcdmaExt::GetCurrentNetworkNoLocation( |
|
468 RMobilePhone::TMobilePhoneNetworkInfoV8* aNetInfo ) |
|
469 { |
|
470 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::GetCurrentNetworkNoLocation" ); |
|
471 |
|
472 if ( NULL != aNetInfo ) |
|
473 { |
|
474 // version 1 information |
|
475 aNetInfo->iMode = iCurrentNwInfo->iMode; |
|
476 aNetInfo->iStatus = iCurrentNwInfo->iStatus; |
|
477 aNetInfo->iBandInfo = iCurrentNwInfo->iBandInfo; |
|
478 aNetInfo->iCountryCode = iCurrentNwInfo->iCountryCode; |
|
479 aNetInfo->iCdmaSID = iCurrentNwInfo->iCdmaSID; |
|
480 aNetInfo->iAnalogSID = iCurrentNwInfo->iAnalogSID; |
|
481 aNetInfo->iNetworkId = iCurrentNwInfo->iNetworkId; |
|
482 aNetInfo->iDisplayTag = iCurrentNwInfo->iDisplayTag; |
|
483 aNetInfo->iShortName = iCurrentNwInfo->iShortName; |
|
484 aNetInfo->iLongName = iCurrentNwInfo->iLongName; |
|
485 // extended version 2 information |
|
486 aNetInfo->iAccess = iCurrentNwInfo->iAccess; |
|
487 // extended version 5 information |
|
488 aNetInfo->iHsdpaAvailableIndicator = |
|
489 iCurrentNwInfo->iHsdpaAvailableIndicator; |
|
490 aNetInfo->iEgprsAvailableIndicator = |
|
491 iCurrentNwInfo->iEgprsAvailableIndicator; |
|
492 // extended version 8 information |
|
493 aNetInfo->iHsupaAvailableIndicator = |
|
494 iCurrentNwInfo->iHsupaAvailableIndicator; |
|
495 } |
|
496 |
|
497 return KErrNone; |
|
498 } |
|
499 |
|
500 // --------------------------------------------------------------------------- |
|
501 // CMmPhoneGsmWcdmaExt::SetCurrentNetwork |
|
502 // Updates the value of the internal attributes iCurrentNwInfo and |
|
503 // iCurrentLocationArea with new values |
|
504 // (other items were commented in a header). |
|
505 // --------------------------------------------------------------------------- |
|
506 // |
|
507 TInt CMmPhoneGsmWcdmaExt::SetCurrentNetwork( |
|
508 const RMobilePhone::TMobilePhoneNetworkInfoV8& aNetInfo, |
|
509 const RMobilePhone::TMobilePhoneLocationAreaV1& aArea ) |
|
510 |
|
511 { |
|
512 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::SetCurrentNetwork" ); |
|
513 |
|
514 *iCurrentNwInfo = aNetInfo; |
|
515 *iCurrentLocationArea = aArea; |
|
516 |
|
517 return KErrNone; |
|
518 } |
|
519 |
|
520 // --------------------------------------------------------------------------- |
|
521 // CMmPhoneGsmWcdmaExt::GetNITZInfo |
|
522 // Gets current NITZ info |
|
523 // (other items were commented in a header). |
|
524 // --------------------------------------------------------------------------- |
|
525 // |
|
526 TInt CMmPhoneGsmWcdmaExt::GetNITZInfo( |
|
527 RMobilePhone::TMobilePhoneNITZ* aNwtTimeInfo ) |
|
528 { |
|
529 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::GetNITZInfo" ); |
|
530 |
|
531 TInt ret( KErrNotFound ); |
|
532 |
|
533 // If time is valid, copy it to client side |
|
534 if ( 0 != iNitzInfo.iNitzFieldsUsed ) |
|
535 { |
|
536 *aNwtTimeInfo = iNitzInfo; |
|
537 //MIE: is the code below absolutely necessary? |
|
538 //don't think so. Make sure about this. |
|
539 if ( 0 != iCurrentNwInfo->iShortName.Length() ) |
|
540 { |
|
541 aNwtTimeInfo->iShortNetworkId.Copy( |
|
542 iCurrentNwInfo->iShortName ); |
|
543 |
|
544 // Short NW name is available |
|
545 aNwtTimeInfo->iNitzFieldsUsed |= |
|
546 RMobilePhone::KCapsShortNameAvailable; |
|
547 } |
|
548 if ( 0 != iCurrentNwInfo->iLongName.Length() ) |
|
549 { |
|
550 aNwtTimeInfo->iLongNetworkId.Copy( |
|
551 iCurrentNwInfo->iLongName ); |
|
552 |
|
553 // Long NW name is available |
|
554 aNwtTimeInfo->iNitzFieldsUsed |= |
|
555 RMobilePhone::KCapsLongNameAvailable; |
|
556 } |
|
557 ret = KErrNone; |
|
558 } |
|
559 return ret; |
|
560 } |
|
561 |
|
562 // --------------------------------------------------------------------------- |
|
563 // CMmPhoneGsmWcdmaExt::ReceivedNITZInfo |
|
564 // Updates internal attribute iNitzInfo with received NITZ info parameters |
|
565 // (other items were commented in a header). |
|
566 // --------------------------------------------------------------------------- |
|
567 // |
|
568 void CMmPhoneGsmWcdmaExt::ReceivedNITZInfo( |
|
569 RMobilePhone::TMobilePhoneNITZ& aNITZInfo ) |
|
570 { |
|
571 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::ReceivedNITZInfo" ); |
|
572 |
|
573 // This information is not necessarily available if network time |
|
574 // indication is received only once in bootup, before registration to NW. |
|
575 if ( 0 != iCurrentNwInfo->iShortName.Length() ) |
|
576 { |
|
577 aNITZInfo.iShortNetworkId.Copy( |
|
578 iCurrentNwInfo->iShortName ); |
|
579 |
|
580 // Short NW name is available |
|
581 aNITZInfo.iNitzFieldsUsed |= RMobilePhone::KCapsShortNameAvailable; |
|
582 } |
|
583 if ( 0 != iCurrentNwInfo->iLongName.Length() ) |
|
584 { |
|
585 aNITZInfo.iLongNetworkId.Copy( |
|
586 iCurrentNwInfo->iLongName ); |
|
587 |
|
588 // Long NW name is available |
|
589 aNITZInfo.iNitzFieldsUsed |= RMobilePhone::KCapsLongNameAvailable; |
|
590 } |
|
591 |
|
592 // Then update info into internal member |
|
593 iNitzInfo = aNITZInfo; |
|
594 } |
|
595 |
|
596 // --------------------------------------------------------------------------- |
|
597 // CMmPhoneGsmWcdmaExt::GetCellInfoL |
|
598 // Send a GetCellInfo request to the LTSY |
|
599 // (other items were commented in a header). |
|
600 // --------------------------------------------------------------------------- |
|
601 // |
|
602 TInt CMmPhoneGsmWcdmaExt::GetCellInfoL() |
|
603 { |
|
604 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::GetCellInfoL" ); |
|
605 TInt ret = iMessageManager->HandleRequestL( ECtsyPhoneCellInfoReq ); |
|
606 return ret; |
|
607 } |
|
608 |
|
609 // --------------------------------------------------------------------------- |
|
610 // CMmPhoneGsmWcdmaExt::NotifyCellInfoChangeL |
|
611 // Ask LTSY to register a CellInfoChange notification |
|
612 // (other items were commented in a header). |
|
613 // --------------------------------------------------------------------------- |
|
614 // |
|
615 TInt CMmPhoneGsmWcdmaExt::NotifyCellInfoChangeL() |
|
616 { |
|
617 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::NotifyCellInfoChangeL" ); |
|
618 TInt ret = iMessageManager->HandleRequestL( ECtsyPhoneCellInfoIndReq ); |
|
619 return ret; |
|
620 } |
|
621 |
|
622 // --------------------------------------------------------------------------- |
|
623 // CMmPhoneGsmWcdmaExt::CompleteNotifyNetworkRegistrationStatusChange |
|
624 // Network registration status changed, check if we need to |
|
625 // update internal information, which happens if we drop out of network. |
|
626 // (other items were commented in a header). |
|
627 // --------------------------------------------------------------------------- |
|
628 // |
|
629 void CMmPhoneGsmWcdmaExt::CompleteNotifyNetworkRegistrationStatusChange( |
|
630 RMobilePhone::TMobilePhoneRegistrationStatus aRegistrationStatus ) |
|
631 // New registration status from network |
|
632 { |
|
633 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::CompleteNotifyNetworkRegistrationStatusChange" ); |
|
634 |
|
635 // If registration status not registered, then reset network information |
|
636 switch( aRegistrationStatus ) |
|
637 { |
|
638 case RMobilePhone::ERegistrationUnknown: |
|
639 case RMobilePhone::ENotRegisteredNoService: |
|
640 case RMobilePhone::ENotRegisteredEmergencyOnly: |
|
641 case RMobilePhone::ENotRegisteredSearching: |
|
642 case RMobilePhone::ERegistrationDenied: |
|
643 iCurrentNwInfo->iCountryCode.FillZ( 0 ); |
|
644 iCurrentNwInfo->iNetworkId.FillZ( 0 ); |
|
645 iCurrentNwInfo->iShortName.FillZ( 0 ); |
|
646 iCurrentNwInfo->iLongName.FillZ( 0 ); |
|
647 iCurrentLocationArea->iAreaKnown = EFalse; |
|
648 iCurrentLocationArea->iLocationAreaCode = 0x0; |
|
649 iCurrentLocationArea->iCellId = 0x0; |
|
650 break; |
|
651 // all the other statuses are ok. |
|
652 case RMobilePhone::ERegisteredBusy: |
|
653 case RMobilePhone::ERegisteredOnHomeNetwork: |
|
654 case RMobilePhone::ERegisteredRoaming: |
|
655 default: |
|
656 break; |
|
657 } |
|
658 } |
|
659 |
|
660 // --------------------------------------------------------------------------- |
|
661 // CMmPhoneGsmWcdmaExt::GetHomeNetworkV1 |
|
662 // Gets GSM home network information |
|
663 // (other items were commented in a header). |
|
664 // --------------------------------------------------------------------------- |
|
665 // |
|
666 TInt CMmPhoneGsmWcdmaExt::GetHomeNetworkV1( |
|
667 RMobilePhone::TMobilePhoneNetworkInfoV1* aHomeNetInfo ) |
|
668 { |
|
669 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::GetHomeNetworkV1" ); |
|
670 |
|
671 TInt ret( KErrNone ); |
|
672 |
|
673 // If the home network info is available.. |
|
674 if ( iIsHomeNetworkInfoAvailable ) |
|
675 { |
|
676 // version 1 information |
|
677 aHomeNetInfo->iMode = iGsmHomeNetwork->iMode; |
|
678 aHomeNetInfo->iStatus = iGsmHomeNetwork->iStatus; |
|
679 aHomeNetInfo->iBandInfo = iGsmHomeNetwork->iBandInfo; |
|
680 aHomeNetInfo->iCountryCode = iGsmHomeNetwork->iCountryCode; |
|
681 aHomeNetInfo->iCdmaSID = iGsmHomeNetwork->iCdmaSID; |
|
682 aHomeNetInfo->iAnalogSID = iGsmHomeNetwork->iAnalogSID; |
|
683 aHomeNetInfo->iNetworkId = iGsmHomeNetwork->iNetworkId; |
|
684 aHomeNetInfo->iDisplayTag = iGsmHomeNetwork->iDisplayTag; |
|
685 aHomeNetInfo->iShortName = iGsmHomeNetwork->iShortName; |
|
686 aHomeNetInfo->iLongName = iGsmHomeNetwork->iLongName; |
|
687 } |
|
688 // If home network object has not been created, return suitable |
|
689 // error code so that phone can request information again. |
|
690 else |
|
691 { |
|
692 ret = KErrNotFound; |
|
693 } |
|
694 |
|
695 return ret; |
|
696 } |
|
697 |
|
698 // --------------------------------------------------------------------------- |
|
699 // CMmPhoneGsmWcdmaExt::GetHomeNetworkV2 |
|
700 // Gets GSM home network information |
|
701 // (other items were commented in a header). |
|
702 // --------------------------------------------------------------------------- |
|
703 // |
|
704 TInt CMmPhoneGsmWcdmaExt::GetHomeNetworkV2( |
|
705 RMobilePhone::TMobilePhoneNetworkInfoV2* aHomeNetInfo ) |
|
706 { |
|
707 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::GetHomeNetworkV2" ); |
|
708 |
|
709 TInt ret( KErrNone ); |
|
710 |
|
711 // If the home network info is available.. |
|
712 if ( iIsHomeNetworkInfoAvailable ) |
|
713 { |
|
714 // version 1 network information |
|
715 aHomeNetInfo->iMode = iGsmHomeNetwork->iMode; |
|
716 aHomeNetInfo->iStatus = iGsmHomeNetwork->iStatus; |
|
717 aHomeNetInfo->iBandInfo = iGsmHomeNetwork->iBandInfo; |
|
718 aHomeNetInfo->iCountryCode = iGsmHomeNetwork->iCountryCode; |
|
719 aHomeNetInfo->iCdmaSID = iGsmHomeNetwork->iCdmaSID; |
|
720 aHomeNetInfo->iAnalogSID = iGsmHomeNetwork->iAnalogSID; |
|
721 aHomeNetInfo->iNetworkId = iGsmHomeNetwork->iNetworkId; |
|
722 aHomeNetInfo->iDisplayTag = iGsmHomeNetwork->iDisplayTag; |
|
723 aHomeNetInfo->iShortName = iGsmHomeNetwork->iShortName; |
|
724 aHomeNetInfo->iLongName = iGsmHomeNetwork->iLongName; |
|
725 // extended version 2 information |
|
726 aHomeNetInfo->iAccess = iGsmHomeNetwork->iAccess; |
|
727 } |
|
728 // If home network object has not been created, return suitable |
|
729 // error code so that phone can request information again. |
|
730 else |
|
731 { |
|
732 ret = KErrNotFound; |
|
733 } |
|
734 |
|
735 return ret; |
|
736 } |
|
737 |
|
738 // --------------------------------------------------------------------------- |
|
739 // CMmPhoneGsmWcdmaExt::GetHomeNetworkV5 |
|
740 // Gets GSM home network information |
|
741 // (other items were commented in a header). |
|
742 // --------------------------------------------------------------------------- |
|
743 // |
|
744 TInt CMmPhoneGsmWcdmaExt::GetHomeNetworkV5( |
|
745 RMobilePhone::TMobilePhoneNetworkInfoV5* aHomeNetInfo ) |
|
746 // pointer to HomeNetInfo |
|
747 { |
|
748 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::GetHomeNetworkV5" ); |
|
749 |
|
750 TInt ret( KErrNone ); |
|
751 |
|
752 // If the home network info is available.. |
|
753 if ( iIsHomeNetworkInfoAvailable ) |
|
754 { |
|
755 // version 1 network information |
|
756 aHomeNetInfo->iMode = iGsmHomeNetwork->iMode; |
|
757 aHomeNetInfo->iStatus = iGsmHomeNetwork->iStatus; |
|
758 aHomeNetInfo->iBandInfo = iGsmHomeNetwork->iBandInfo; |
|
759 aHomeNetInfo->iCountryCode = iGsmHomeNetwork->iCountryCode; |
|
760 aHomeNetInfo->iCdmaSID = iGsmHomeNetwork->iCdmaSID; |
|
761 aHomeNetInfo->iAnalogSID = iGsmHomeNetwork->iAnalogSID; |
|
762 aHomeNetInfo->iNetworkId = iGsmHomeNetwork->iNetworkId; |
|
763 aHomeNetInfo->iDisplayTag = iGsmHomeNetwork->iDisplayTag; |
|
764 aHomeNetInfo->iShortName = iGsmHomeNetwork->iShortName; |
|
765 aHomeNetInfo->iLongName = iGsmHomeNetwork->iLongName; |
|
766 // extended version 2 information |
|
767 aHomeNetInfo->iAccess = iGsmHomeNetwork->iAccess; |
|
768 // extended version 5 information |
|
769 aHomeNetInfo->iHsdpaAvailableIndicator = |
|
770 iGsmHomeNetwork->iHsdpaAvailableIndicator; |
|
771 aHomeNetInfo->iEgprsAvailableIndicator = |
|
772 iGsmHomeNetwork->iEgprsAvailableIndicator; |
|
773 } |
|
774 // If home network object has not been created, return suitable |
|
775 // error code so that phone can request information again. |
|
776 else |
|
777 { |
|
778 ret = KErrNotFound; |
|
779 } |
|
780 |
|
781 return ret; |
|
782 } |
|
783 |
|
784 // --------------------------------------------------------------------------- |
|
785 // CMmPhoneGsmWcdmaExt::GetHomeNetwork |
|
786 // Gets GSM home network information |
|
787 // (other items were commented in a header). |
|
788 // --------------------------------------------------------------------------- |
|
789 // |
|
790 TInt CMmPhoneGsmWcdmaExt::GetHomeNetwork( |
|
791 RMobilePhone::TMobilePhoneNetworkInfoV8* aHomeNetInfo ) |
|
792 // pointer to HomeNetInfo |
|
793 { |
|
794 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::GetHomeNetwork" ); |
|
795 |
|
796 TInt ret( KErrNone ); |
|
797 |
|
798 // If the home network info is available.. |
|
799 if ( iIsHomeNetworkInfoAvailable ) |
|
800 { |
|
801 // version 1 network information |
|
802 aHomeNetInfo->iMode = iGsmHomeNetwork->iMode; |
|
803 aHomeNetInfo->iStatus = iGsmHomeNetwork->iStatus; |
|
804 aHomeNetInfo->iBandInfo = iGsmHomeNetwork->iBandInfo; |
|
805 aHomeNetInfo->iCountryCode = iGsmHomeNetwork->iCountryCode; |
|
806 aHomeNetInfo->iCdmaSID = iGsmHomeNetwork->iCdmaSID; |
|
807 aHomeNetInfo->iAnalogSID = iGsmHomeNetwork->iAnalogSID; |
|
808 aHomeNetInfo->iNetworkId = iGsmHomeNetwork->iNetworkId; |
|
809 aHomeNetInfo->iDisplayTag = iGsmHomeNetwork->iDisplayTag; |
|
810 aHomeNetInfo->iShortName = iGsmHomeNetwork->iShortName; |
|
811 aHomeNetInfo->iLongName = iGsmHomeNetwork->iLongName; |
|
812 // extended version 2 information |
|
813 aHomeNetInfo->iAccess = iGsmHomeNetwork->iAccess; |
|
814 // extended version 5 information |
|
815 aHomeNetInfo->iHsdpaAvailableIndicator = |
|
816 iGsmHomeNetwork->iHsdpaAvailableIndicator; |
|
817 aHomeNetInfo->iEgprsAvailableIndicator = |
|
818 iGsmHomeNetwork->iEgprsAvailableIndicator; |
|
819 // extended version 8 information |
|
820 aHomeNetInfo->iHsupaAvailableIndicator = |
|
821 iGsmHomeNetwork->iHsupaAvailableIndicator; |
|
822 } |
|
823 // If home network object has not been created, return suitable |
|
824 // error code so that phone can request information again. |
|
825 else |
|
826 { |
|
827 ret = KErrNotFound; |
|
828 } |
|
829 |
|
830 return ret; |
|
831 } |
|
832 |
|
833 // --------------------------------------------------------------------------- |
|
834 // CMmPhoneGsmWcdmaExt::GetFdnStatusL |
|
835 // This method gets current fixed dialling numbers service status |
|
836 // (other items were commented in a header). |
|
837 // --------------------------------------------------------------------------- |
|
838 // |
|
839 TInt CMmPhoneGsmWcdmaExt::GetFdnStatusL() |
|
840 { |
|
841 return iMessageManager->HandleRequestL( EMobilePhoneGetFdnStatus ); |
|
842 } |
|
843 |
|
844 // --------------------------------------------------------------------------- |
|
845 // CMmPhoneGsmWcdmaExt::SetFdnSetting |
|
846 // This method sets current fixed dialling numbers service status |
|
847 // (other items were commented in a header). |
|
848 // --------------------------------------------------------------------------- |
|
849 // |
|
850 TInt CMmPhoneGsmWcdmaExt::SetFdnSetting( |
|
851 RMobilePhone::TMobilePhoneFdnSetting* aFdnSetting ) |
|
852 { |
|
853 TInt ret( KErrNotFound ); |
|
854 |
|
855 CMmDataPackage dataPackage; |
|
856 dataPackage.PackData( aFdnSetting ); |
|
857 |
|
858 TRAPD( trapError, |
|
859 ret = iMessageManager->HandleRequestL( |
|
860 EMobilePhoneSetFdnSetting, &dataPackage ); |
|
861 ); |
|
862 |
|
863 if ( KErrNone != trapError ) |
|
864 { |
|
865 ret = trapError; |
|
866 } |
|
867 |
|
868 return ret; |
|
869 |
|
870 } |
|
871 // --------------------------------------------------------------------------- |
|
872 // CMmPhoneGsmWcdmaExt::GetServiceProviderNameL |
|
873 // This method requests service provider name |
|
874 // (other items were commented in a header). |
|
875 // --------------------------------------------------------------------------- |
|
876 // |
|
877 TInt CMmPhoneGsmWcdmaExt::GetServiceProviderNameL() |
|
878 { |
|
879 return iMessageManager->HandleRequestL( |
|
880 EMobilePhoneGetServiceProviderName ); |
|
881 } |
|
882 |
|
883 // --------------------------------------------------------------------------- |
|
884 // CMmPhoneGsmWcdmaExt::GetICCTypeL |
|
885 // This method requests the type of SIM card in use (SIM/USIM) |
|
886 // (other items were commented in a header). |
|
887 // --------------------------------------------------------------------------- |
|
888 // |
|
889 TInt CMmPhoneGsmWcdmaExt::GetICCTypeL() |
|
890 { |
|
891 return iMessageManager->HandleRequestL( EMmTsySimGetICCType ); |
|
892 } |
|
893 |
|
894 // --------------------------------------------------------------------------- |
|
895 // CMmPhoneGsmWcdmaExt::CompleteGetICCType |
|
896 // This method sets the received ICC type (SIM/USIM/Unknown) into |
|
897 // iCurrentICCType and requests the state of the PIN code (in USIM's case it |
|
898 // can be either the PIN or the UPIN code) |
|
899 // (other items were commented in a header). |
|
900 // --------------------------------------------------------------------------- |
|
901 // |
|
902 void CMmPhoneGsmWcdmaExt::CompleteGetICCType( |
|
903 CMmDataPackage* aDataPackage ) // data package |
|
904 { |
|
905 //unpack the data |
|
906 TICCType* aType = NULL; |
|
907 aDataPackage->UnPackData( &aType ); |
|
908 |
|
909 //set the new ICC type |
|
910 iCurrentICCType = *aType; |
|
911 |
|
912 // If the current ICC is USIM, first make a request for getting the active |
|
913 // PIN code, after that we make another request whether the PIN is enabled |
|
914 // or not. Othwerwise just request whether PIN is enabled. Can't do |
|
915 // nothing if adaptation returns error so return value is not handled here |
|
916 SimActivePinState( ); |
|
917 } |
|
918 |
|
919 // --------------------------------------------------------------------------- |
|
920 // CMmPhoneGsmWcdmaExt::NotifySimStatusReady |
|
921 // This method requests the DOS Tsy to inform the LTSY when the SIM is ready |
|
922 // so it's information is accessible. |
|
923 // (other items were commented in a header). |
|
924 // --------------------------------------------------------------------------- |
|
925 // |
|
926 TInt CMmPhoneGsmWcdmaExt::NotifySimStatusReadyL() |
|
927 { |
|
928 return iMessageManager->HandleRequestL( |
|
929 EMmTsyBootNotifySimStatusReadyIPC ); |
|
930 } |
|
931 |
|
932 // --------------------------------------------------------------------------- |
|
933 // CMmPhoneGsmWcdmaExt::MtcStateQueryL |
|
934 // This method requests the MTC status |
|
935 // (other items were commented in a header). |
|
936 // --------------------------------------------------------------------------- |
|
937 // |
|
938 TInt CMmPhoneGsmWcdmaExt::MtcStateQueryL() |
|
939 { |
|
940 return iMessageManager->HandleRequestL ( EMmTsyBootGetRFStatusIPC ); |
|
941 } |
|
942 // --------------------------------------------------------------------------- |
|
943 // CMmPhoneGsmWcdmaExt::UpdateSecurityCaps |
|
944 // Updates security capabilities based on received security Event |
|
945 // (other items were commented in a header). |
|
946 // --------------------------------------------------------------------------- |
|
947 // |
|
948 TInt CMmPhoneGsmWcdmaExt::UpdateSecurityCaps( |
|
949 RMobilePhone::TMobilePhoneSecurityEvent aEvent ) |
|
950 { |
|
951 |
|
952 // Store old capabilities |
|
953 TUint32 oldSecurityCaps = iSecurityCaps; |
|
954 |
|
955 iSecurityCaps = 0; |
|
956 |
|
957 // Read capabilities |
|
958 switch( aEvent ) |
|
959 { |
|
960 case RMobilePhone::ENoICCFound: |
|
961 case RMobilePhone::EICCTerminated: |
|
962 // if these capabilities already exist, they remain in this case |
|
963 if ( oldSecurityCaps & RMobilePhone::KCapsLockPhone ) |
|
964 { |
|
965 iSecurityCaps |= RMobilePhone::KCapsLockPhone; |
|
966 } |
|
967 if ( oldSecurityCaps & RMobilePhone::KCapsAccessPhonePassword ) |
|
968 { |
|
969 iSecurityCaps |= RMobilePhone::KCapsAccessPhonePassword; |
|
970 } |
|
971 break; |
|
972 case RMobilePhone::EPin1Required: |
|
973 case RMobilePhone::EPuk1Required: |
|
974 case RMobilePhone::EPin2Required: |
|
975 case RMobilePhone::EPuk2Required: |
|
976 // if these capabilities already exist, they may remain in this |
|
977 // case |
|
978 if ( oldSecurityCaps & RMobilePhone::KCapsLockPhone ) |
|
979 { |
|
980 iSecurityCaps |= RMobilePhone::KCapsLockPhone; |
|
981 } |
|
982 if ( oldSecurityCaps & RMobilePhone::KCapsAccessPhonePassword ) |
|
983 { |
|
984 iSecurityCaps |= RMobilePhone::KCapsAccessPhonePassword; |
|
985 } |
|
986 if ( oldSecurityCaps & RMobilePhone::KCapsLockPhoneToICC ) |
|
987 { |
|
988 iSecurityCaps |= RMobilePhone::KCapsLockPhoneToICC; |
|
989 } |
|
990 break; |
|
991 case RMobilePhone::EPhonePasswordRequired: |
|
992 // if these capabilities already exist, they may remain in this |
|
993 // case |
|
994 if ( oldSecurityCaps & RMobilePhone::KCapsLockICC ) |
|
995 { |
|
996 iSecurityCaps |= RMobilePhone::KCapsLockICC; |
|
997 } |
|
998 // Access to PIN1 |
|
999 if ( oldSecurityCaps & RMobilePhone::KCapsAccessPin1 ) |
|
1000 { |
|
1001 iSecurityCaps |= RMobilePhone::KCapsAccessPin1; |
|
1002 } |
|
1003 // Access to PIN2 |
|
1004 if ( oldSecurityCaps & RMobilePhone::KCapsAccessPin2 ) |
|
1005 { |
|
1006 iSecurityCaps |= RMobilePhone::KCapsAccessPin2; |
|
1007 } |
|
1008 break; |
|
1009 case RMobilePhone::EPin1Verified: |
|
1010 case RMobilePhone::EPin2Verified: |
|
1011 case RMobilePhone::EPuk1Verified: |
|
1012 case RMobilePhone::EPuk2Verified: |
|
1013 // These capabilities exist for sure in this case |
|
1014 iSecurityCaps = RMobilePhone::KCapsLockICC | |
|
1015 RMobilePhone::KCapsAccessPin1 | |
|
1016 RMobilePhone::KCapsAccessPin2; |
|
1017 // if these capabilities already exist, they may remain in this |
|
1018 // case |
|
1019 if ( oldSecurityCaps & RMobilePhone::KCapsLockPhone ) |
|
1020 { |
|
1021 iSecurityCaps |= RMobilePhone::KCapsLockPhone; |
|
1022 } |
|
1023 if ( oldSecurityCaps & RMobilePhone::KCapsAccessPhonePassword ) |
|
1024 { |
|
1025 iSecurityCaps |= RMobilePhone::KCapsAccessPhonePassword; |
|
1026 } |
|
1027 if ( oldSecurityCaps & RMobilePhone::KCapsLockPhoneToICC ) |
|
1028 { |
|
1029 iSecurityCaps |= RMobilePhone::KCapsLockPhoneToICC; |
|
1030 } |
|
1031 break; |
|
1032 case RMobilePhone::EPhonePasswordVerified: |
|
1033 // These capabilities exist for sure in this case |
|
1034 iSecurityCaps = RMobilePhone::KCapsLockPhone | |
|
1035 RMobilePhone::KCapsAccessPhonePassword | |
|
1036 RMobilePhone::KCapsLockPhoneToICC; |
|
1037 // If these capabilities already exist for sure in this case |
|
1038 if ( oldSecurityCaps & RMobilePhone::KCapsLockICC ) |
|
1039 { |
|
1040 iSecurityCaps |= RMobilePhone::KCapsLockICC; |
|
1041 } |
|
1042 if ( oldSecurityCaps & RMobilePhone::KCapsAccessPin1 ) |
|
1043 { |
|
1044 iSecurityCaps |= RMobilePhone::KCapsAccessPin1; |
|
1045 } |
|
1046 if ( oldSecurityCaps & RMobilePhone::KCapsAccessPin2 ) |
|
1047 { |
|
1048 iSecurityCaps|= RMobilePhone::KCapsAccessPin2; |
|
1049 } |
|
1050 break; |
|
1051 default: |
|
1052 break; |
|
1053 //lint -e{788} don't warn about missing cases |
|
1054 } |
|
1055 |
|
1056 // Additional caps if UPIN and UPUK are supported in SIM |
|
1057 if ( iCurrentICCType == EICCTypeSim3G ) |
|
1058 { |
|
1059 // Read capabilities |
|
1060 switch( aEvent ) |
|
1061 { |
|
1062 case RMobilePhone::EUniversalPinRequired: |
|
1063 case RMobilePhone::EUniversalPukRequired: |
|
1064 // if these capabilities already exist, they may remain in |
|
1065 // this case |
|
1066 if ( oldSecurityCaps & RMobilePhone::KCapsLockPhone ) |
|
1067 { |
|
1068 iSecurityCaps |= RMobilePhone::KCapsLockPhone; |
|
1069 } |
|
1070 if ( oldSecurityCaps & |
|
1071 RMobilePhone::KCapsAccessPhonePassword ) |
|
1072 { |
|
1073 iSecurityCaps |= RMobilePhone::KCapsAccessPhonePassword; |
|
1074 } |
|
1075 if ( oldSecurityCaps & RMobilePhone::KCapsLockPhoneToICC ) |
|
1076 { |
|
1077 iSecurityCaps |= RMobilePhone::KCapsLockPhoneToICC; |
|
1078 } |
|
1079 break; |
|
1080 case RMobilePhone::EPhonePasswordRequired: |
|
1081 // Access to Universal PIN |
|
1082 if ( oldSecurityCaps & RMobilePhone::KCapsAccessUniversalPin ) |
|
1083 { |
|
1084 iSecurityCaps |= RMobilePhone::KCapsAccessUniversalPin; |
|
1085 } |
|
1086 // Access to hidden key (phonebook) |
|
1087 if ( oldSecurityCaps & RMobilePhone::KCapsAccessHiddenKey ) |
|
1088 { |
|
1089 iSecurityCaps |= RMobilePhone::KCapsAccessHiddenKey; |
|
1090 } |
|
1091 // Access to USIM app. PIN (files referenced in accesss rules) |
|
1092 if ( oldSecurityCaps & RMobilePhone::KCapsAccessUSIMAppPin ) |
|
1093 { |
|
1094 iSecurityCaps |= RMobilePhone::KCapsAccessUSIMAppPin; |
|
1095 } |
|
1096 // Access to USIM app. PIN (files referenced in accesss rules) |
|
1097 if ( oldSecurityCaps & |
|
1098 RMobilePhone::KCapsAccessUSIMAppSecondPin ) |
|
1099 { |
|
1100 iSecurityCaps |= |
|
1101 RMobilePhone::KCapsAccessUSIMAppSecondPin; |
|
1102 } |
|
1103 break; |
|
1104 case RMobilePhone::EUniversalPinVerified: |
|
1105 case RMobilePhone::EUniversalPukVerified: |
|
1106 // These capabilities exist for sure in this case |
|
1107 iSecurityCaps = RMobilePhone::KCapsLockICC | |
|
1108 RMobilePhone::KCapsAccessPin1 | |
|
1109 RMobilePhone::KCapsAccessPin2 | |
|
1110 RMobilePhone::KCapsAccessUniversalPin; |
|
1111 // if these capabilities already exist, |
|
1112 // they may remain in this case |
|
1113 if ( RMobilePhone::KCapsLockPhone == |
|
1114 ( oldSecurityCaps & RMobilePhone::KCapsLockPhone ) ) |
|
1115 { |
|
1116 iSecurityCaps |= RMobilePhone::KCapsLockPhone; |
|
1117 } |
|
1118 if ( oldSecurityCaps & |
|
1119 RMobilePhone::KCapsAccessPhonePassword ) |
|
1120 { |
|
1121 iSecurityCaps |= RMobilePhone::KCapsAccessPhonePassword; |
|
1122 } |
|
1123 if ( oldSecurityCaps & RMobilePhone::KCapsLockPhoneToICC ) |
|
1124 { |
|
1125 iSecurityCaps |= RMobilePhone::KCapsLockPhoneToICC; |
|
1126 } |
|
1127 break; |
|
1128 case RMobilePhone::EPhonePasswordVerified: |
|
1129 // If these capabilities already exist, |
|
1130 // they also remain in this case |
|
1131 if ( oldSecurityCaps & RMobilePhone::KCapsAccessUniversalPin ) |
|
1132 { |
|
1133 iSecurityCaps |= RMobilePhone::KCapsAccessUniversalPin; |
|
1134 } |
|
1135 // Access to hidden key (phonebook) |
|
1136 if ( oldSecurityCaps & RMobilePhone::KCapsAccessHiddenKey ) |
|
1137 { |
|
1138 iSecurityCaps |= RMobilePhone::KCapsAccessHiddenKey; |
|
1139 } |
|
1140 // Access to USIM app. PIN (files referenced in accesss rules) |
|
1141 if ( oldSecurityCaps & RMobilePhone::KCapsAccessUSIMAppPin ) |
|
1142 { |
|
1143 iSecurityCaps |= RMobilePhone::KCapsAccessUSIMAppPin; |
|
1144 } |
|
1145 // Access to USIM app. PIN (files referenced in accesss rules) |
|
1146 if ( oldSecurityCaps & |
|
1147 RMobilePhone::KCapsAccessUSIMAppSecondPin ) |
|
1148 { |
|
1149 iSecurityCaps |= |
|
1150 RMobilePhone::KCapsAccessUSIMAppSecondPin; |
|
1151 } |
|
1152 break; |
|
1153 default: |
|
1154 break; |
|
1155 //lint -e{788} don't warn about missing cases |
|
1156 } // end switch |
|
1157 |
|
1158 } // end if 3G SIM |
|
1159 |
|
1160 |
|
1161 // Check if capabilities have changed |
|
1162 if ( iSecurityCaps != oldSecurityCaps ) |
|
1163 { |
|
1164 // Notify client about the change |
|
1165 iMmPhoneTsy->GetSecurityTsy()->CompleteNotifySecurityCapsChange( |
|
1166 iSecurityCaps ); |
|
1167 } |
|
1168 |
|
1169 return KErrNone; |
|
1170 |
|
1171 } |
|
1172 |
|
1173 // --------------------------------------------------------------------------- |
|
1174 // CMmPhoneGsmWcdmaExt::ChangeSecurityCodeL |
|
1175 // Request a security Change code to the DOS TSY layer |
|
1176 // (other items were commented in a header). |
|
1177 // --------------------------------------------------------------------------- |
|
1178 // |
|
1179 TInt CMmPhoneGsmWcdmaExt::ChangeSecurityCodeL( |
|
1180 const TDataPackage& aPackage ) |
|
1181 { |
|
1182 return iMessageManager->HandleRequestL ( EMobilePhoneChangeSecurityCode, |
|
1183 &aPackage ); |
|
1184 } |
|
1185 |
|
1186 // --------------------------------------------------------------------------- |
|
1187 // CMmPhoneGsmWcdmaExt::ChangeSecurityCode |
|
1188 // Request a security code verification to the DOS TSY layer |
|
1189 // (other items were commented in a header). |
|
1190 // --------------------------------------------------------------------------- |
|
1191 // |
|
1192 TInt CMmPhoneGsmWcdmaExt::VerifySecurityCodeL( |
|
1193 const TDataPackage& aPackage ) |
|
1194 { |
|
1195 return iMessageManager->HandleRequestL( EMobilePhoneVerifySecurityCode, |
|
1196 &aPackage ); |
|
1197 } |
|
1198 |
|
1199 // --------------------------------------------------------------------------- |
|
1200 // CMmPhoneGsmWcdmaExt::AbortSecurityCodeL |
|
1201 // Request aborting of an ongoing security related request to the DOS TSY |
|
1202 // (other items were commented in a header). |
|
1203 // --------------------------------------------------------------------------- |
|
1204 // |
|
1205 TInt CMmPhoneGsmWcdmaExt::AbortSecurityCodeL( |
|
1206 const TDataPackage& aPackage ) |
|
1207 { |
|
1208 return iMessageManager->HandleRequestL( EMobilePhoneAbortSecurityCode, |
|
1209 &aPackage ); |
|
1210 } |
|
1211 |
|
1212 // --------------------------------------------------------------------------- |
|
1213 // CMmPhoneGsmWcdmaExt::GetSecurityCaps |
|
1214 // This function returns current security capabilities |
|
1215 // (other items were commented in a header). |
|
1216 // --------------------------------------------------------------------------- |
|
1217 // |
|
1218 TInt CMmPhoneGsmWcdmaExt::GetSecurityCaps( |
|
1219 TUint32* aCaps ) |
|
1220 { |
|
1221 *aCaps = iSecurityCaps; |
|
1222 |
|
1223 return KErrNone; |
|
1224 } |
|
1225 |
|
1226 // --------------------------------------------------------------------------- |
|
1227 // CMmPhoneGsmWcdmaExt::DeliverCode |
|
1228 // Copies the deliverd code into the internal attribute iSecCode |
|
1229 // (other items were commented in a header). |
|
1230 // --------------------------------------------------------------------------- |
|
1231 // |
|
1232 TInt CMmPhoneGsmWcdmaExt::DeliverCode( |
|
1233 RMobilePhone::TCodeAndUnblockCode aCodes ) |
|
1234 { |
|
1235 iSecCode.Copy( aCodes.iCode ); |
|
1236 |
|
1237 TFLOGSTRING2( "TSY: CMmPhoneGsmWcdmaExt::DeliverCode iSecCode: %S", &iSecCode ); |
|
1238 |
|
1239 return KErrNone; |
|
1240 } |
|
1241 |
|
1242 // --------------------------------------------------------------------------- |
|
1243 // CMmPhoneGsmWcdmaExt::DeliverCode |
|
1244 // Updates security lock info based on received security Event |
|
1245 // (other items were commented in a header). |
|
1246 // --------------------------------------------------------------------------- |
|
1247 // |
|
1248 TInt CMmPhoneGsmWcdmaExt::UpdateLockInfo( |
|
1249 RMobilePhone::TMobilePhoneLockStatus aStatus, |
|
1250 RMobilePhone::TMobilePhoneLockSetting aSetting, |
|
1251 RMobilePhone::TMobilePhoneLock aLock ) |
|
1252 { |
|
1253 |
|
1254 TInt ret = KErrNotSupported; |
|
1255 |
|
1256 // Read settings and status |
|
1257 switch( aLock ) |
|
1258 { |
|
1259 case RMobilePhone::ELockPhoneDevice: |
|
1260 if ( iPhoneDeviceSetting != aSetting ) |
|
1261 { |
|
1262 ret = KErrNone; |
|
1263 iPhoneDeviceSetting = aSetting; |
|
1264 } |
|
1265 if ( iPhoneDeviceStatus != aStatus ) |
|
1266 { |
|
1267 ret = KErrNone; |
|
1268 iPhoneDeviceStatus = aStatus; |
|
1269 } |
|
1270 break; |
|
1271 case RMobilePhone::ELockICC: |
|
1272 if ( iICCSetting != aSetting ) |
|
1273 { |
|
1274 ret = KErrNone; |
|
1275 iICCSetting = aSetting; |
|
1276 } |
|
1277 if ( iICCStatus != aStatus ) |
|
1278 { |
|
1279 ret = KErrNone; |
|
1280 iICCStatus = aStatus; |
|
1281 } |
|
1282 break; |
|
1283 case RMobilePhone::ELockPhoneToICC: |
|
1284 if ( iPhoneToICCSetting != aSetting ) |
|
1285 { |
|
1286 ret = KErrNone; |
|
1287 iPhoneToICCSetting = aSetting; |
|
1288 } |
|
1289 if ( iPhoneToICCStatus != aStatus ) |
|
1290 { |
|
1291 ret = KErrNone; |
|
1292 iPhoneToICCStatus = aStatus; |
|
1293 } |
|
1294 break; |
|
1295 case RMobilePhone::ELockUniversalPin: |
|
1296 if ( EICCTypeSim3G == iCurrentICCType ) |
|
1297 { |
|
1298 // When multiapplication support added check here if UPIN |
|
1299 // in use for this application before setting status/setting. |
|
1300 // Do the same for all applications. |
|
1301 if ( iICCSetting != aSetting ) |
|
1302 { |
|
1303 ret = KErrNone; |
|
1304 iICCSetting = aSetting; |
|
1305 } |
|
1306 if ( iICCStatus != aStatus ) |
|
1307 { |
|
1308 ret = KErrNone; |
|
1309 iICCStatus = aStatus; |
|
1310 } |
|
1311 } |
|
1312 break; |
|
1313 case RMobilePhone::ELockPhoneToFirstICC: |
|
1314 case RMobilePhone::ELockOTA: |
|
1315 default: |
|
1316 break; |
|
1317 //lint -e{788} don't warn about missing cases |
|
1318 } |
|
1319 |
|
1320 return ret; |
|
1321 |
|
1322 } |
|
1323 |
|
1324 // --------------------------------------------------------------------------- |
|
1325 // CMmPhoneGsmWcdmaExt::SimActivePinState |
|
1326 // Requests the state of the currently active PIN from DOS TSY layer |
|
1327 // (other items were commented in a header). |
|
1328 // --------------------------------------------------------------------------- |
|
1329 // |
|
1330 TInt CMmPhoneGsmWcdmaExt::SimActivePinState() |
|
1331 { |
|
1332 |
|
1333 TInt ret( KErrNone ); |
|
1334 |
|
1335 TRAPD( trapError, |
|
1336 ret = iMessageManager->HandleRequestL( |
|
1337 EMmTsySecurityGetSimActivePinStateIPC ); |
|
1338 ); |
|
1339 |
|
1340 if ( KErrNone != trapError ) |
|
1341 { |
|
1342 ret = trapError; |
|
1343 } |
|
1344 |
|
1345 return ret; |
|
1346 } |
|
1347 |
|
1348 // --------------------------------------------------------------------------- |
|
1349 // CMmPhoneGsmWcdmaExt::SetLockSettingL |
|
1350 // Requests the DOS tsy layer to set a new lock setting |
|
1351 // (other items were commented in a header). |
|
1352 // --------------------------------------------------------------------------- |
|
1353 // |
|
1354 TInt CMmPhoneGsmWcdmaExt::SetLockSettingL( |
|
1355 CMmDataPackage* aPackage ) |
|
1356 { |
|
1357 TFLOGSTRING("LTSY: CMmPhoneGsmWcdmaExt::SetLockSettingL" ); |
|
1358 |
|
1359 TLockAndSetting lockAndSetting; |
|
1360 aPackage->UnPackData( &lockAndSetting.iLock, &lockAndSetting.iSetting ); |
|
1361 |
|
1362 //check if there is a code available for this message |
|
1363 //some lock settings requires code |
|
1364 if ( iSecCode.Length() != 0 ) |
|
1365 { |
|
1366 //re-package the original package and |
|
1367 //include the code |
|
1368 aPackage->PackData(&lockAndSetting, &iSecCode ); |
|
1369 } |
|
1370 else |
|
1371 { |
|
1372 //pack only the lock and the setting, the code will be null |
|
1373 aPackage->PackData( &lockAndSetting ); |
|
1374 } |
|
1375 TInt ret = iMessageManager->HandleRequestL( EMobilePhoneSetLockSetting, |
|
1376 aPackage ); |
|
1377 |
|
1378 //code is not required anymore, reset the value |
|
1379 iSecCode.Zero(); |
|
1380 |
|
1381 return ret; |
|
1382 |
|
1383 } |
|
1384 |
|
1385 // --------------------------------------------------------------------------- |
|
1386 // CMmPhoneGsmWcdmaExt::GetStaticExtensionMode |
|
1387 // Returns the mode that this extension supports. |
|
1388 // (other items were commented in a header). |
|
1389 // --------------------------------------------------------------------------- |
|
1390 // |
|
1391 TInt CMmPhoneGsmWcdmaExt::GetStaticExtensionMode( |
|
1392 RMobilePhone::TMobilePhoneNetworkMode* aMode ) |
|
1393 { |
|
1394 |
|
1395 *aMode = RMobilePhone::ENetworkModeGsm; |
|
1396 return KErrNone; |
|
1397 |
|
1398 } |
|
1399 |
|
1400 // --------------------------------------------------------------------------- |
|
1401 // CMmPhoneGsmWcdmaExt::SetNetworkModeInExtensionPhone |
|
1402 // Sets a network mode into iCurrentNwInfo.iMode variable. |
|
1403 // (other items were commented in a header). |
|
1404 // --------------------------------------------------------------------------- |
|
1405 // |
|
1406 void CMmPhoneGsmWcdmaExt::SetNetworkModeInExtensionPhone( |
|
1407 RMobilePhone::TMobilePhoneNetworkMode aMode ) |
|
1408 { |
|
1409 iCurrentNwInfo->iMode = aMode; |
|
1410 } |
|
1411 |
|
1412 // --------------------------------------------------------------------------- |
|
1413 // CMmPhoneGsmWcdmaExt:: GetDetectedNetworksPhase1L |
|
1414 // Gets the list of available networks |
|
1415 // (other items were commented in a header). |
|
1416 // --------------------------------------------------------------------------- |
|
1417 // |
|
1418 |
|
1419 TInt CMmPhoneGsmWcdmaExt::GetDetectedNetworksPhase1L() |
|
1420 { |
|
1421 return iMessageManager->HandleRequestL( |
|
1422 EMobilePhoneGetDetectedNetworksV2Phase1 ); |
|
1423 } |
|
1424 |
|
1425 // --------------------------------------------------------------------------- |
|
1426 // CMmPhoneGsmWcdmaExt:: SelectNetworkL |
|
1427 // Selects a network either manually or automatically |
|
1428 // (other items were commented in a header). |
|
1429 // --------------------------------------------------------------------------- |
|
1430 // |
|
1431 TInt CMmPhoneGsmWcdmaExt::SelectNetworkL( |
|
1432 const TDataPackage& aDataPackage ) |
|
1433 { |
|
1434 return iMessageManager->HandleRequestL( EMobilePhoneSelectNetwork, |
|
1435 &aDataPackage ); |
|
1436 } |
|
1437 |
|
1438 // --------------------------------------------------------------------------- |
|
1439 // CMmPhoneGsmWcdmaExt:: SelectNetworkCancelL |
|
1440 // Cancels an outgoing network selection |
|
1441 // (other items were commented in a header). |
|
1442 // --------------------------------------------------------------------------- |
|
1443 // |
|
1444 TInt CMmPhoneGsmWcdmaExt::SelectNetworkCancelL() |
|
1445 { |
|
1446 return iMessageManager->HandleRequestL( EMobilePhoneSelectNetworkCancel ); |
|
1447 } |
|
1448 |
|
1449 // --------------------------------------------------------------------------- |
|
1450 // CMmPhoneGsmWcdmaExt:: GetDetectedNetworksCancelL |
|
1451 // Cancels an outgoing available network search |
|
1452 // (other items were commented in a header). |
|
1453 // --------------------------------------------------------------------------- |
|
1454 // |
|
1455 TInt CMmPhoneGsmWcdmaExt::GetDetectedNetworksCancelL() |
|
1456 { |
|
1457 return iMessageManager->HandleRequestL( |
|
1458 EMobilePhoneGetDetectedNetworksCancel ); |
|
1459 } |
|
1460 |
|
1461 // --------------------------------------------------------------------------- |
|
1462 // CMmPhoneGsmWcdmaExt:: GetIccAccessCaps |
|
1463 // This methods gets the ICC Access capabilites |
|
1464 // (other items were commented in a header). |
|
1465 // --------------------------------------------------------------------------- |
|
1466 // |
|
1467 TInt CMmPhoneGsmWcdmaExt::GetIccAccessCaps( |
|
1468 TUint32* aCaps ) //Ptr to the capabilites |
|
1469 { |
|
1470 //set the capabilites |
|
1471 *aCaps = RMobilePhone::KCapsSimAccessSupported; |
|
1472 |
|
1473 return KErrNone; |
|
1474 |
|
1475 } |
|
1476 |
|
1477 // --------------------------------------------------------------------------- |
|
1478 // CMmPhoneGsmWcdmaExt::SetNetworkSelectionSettingL |
|
1479 // Sets a network selection setting (Automatic, manual) |
|
1480 // (other items were commented in a header). |
|
1481 // --------------------------------------------------------------------------- |
|
1482 // |
|
1483 TInt CMmPhoneGsmWcdmaExt::SetNetworkSelectionSettingL( |
|
1484 const TDataPackage& aDataPackage ) |
|
1485 { |
|
1486 return iMessageManager->HandleRequestL( |
|
1487 EMobilePhoneSetNetworkSelectionSetting, &aDataPackage ); |
|
1488 } |
|
1489 |
|
1490 // --------------------------------------------------------------------------- |
|
1491 // CMmPhoneGsmWcdmaExt::GetNetworkRegistrationStatusL |
|
1492 // Gets the network registration status from the DOS TSY layer |
|
1493 // (other items were commented in a header). |
|
1494 // --------------------------------------------------------------------------- |
|
1495 // |
|
1496 TInt CMmPhoneGsmWcdmaExt::GetNetworkRegistrationStatusL() |
|
1497 { |
|
1498 return iMessageManager->HandleRequestL( |
|
1499 EMobilePhoneGetNetworkRegistrationStatus ); |
|
1500 } |
|
1501 |
|
1502 // --------------------------------------------------------------------------- |
|
1503 // CMmPhoneGsmWcdmaExt::CompleteGetHomeNetwork |
|
1504 // Completes a GetHomeNetwork request, saves the home network information into |
|
1505 // the internal attribute iGsmHomeNetwork and set the flag |
|
1506 // iIsHomeNetworkInfoAvailable ON. |
|
1507 // (other items were commented in a header). |
|
1508 // --------------------------------------------------------------------------- |
|
1509 // |
|
1510 void CMmPhoneGsmWcdmaExt::CompleteGetHomeNetwork( |
|
1511 CMmDataPackage* aDataPackage ) |
|
1512 { |
|
1513 TFLOGSTRING("TSY: CMmPhoneGsmWcdmaExt::CompleteGetHomeNetwork" ); |
|
1514 |
|
1515 RMobilePhone::TMobilePhoneNetworkInfoV8* homeInfo = NULL; |
|
1516 aDataPackage->UnPackData ( &homeInfo ); |
|
1517 if ( KEtelExtMultimodeV8 == homeInfo->ExtensionId() ) |
|
1518 { |
|
1519 *iGsmHomeNetwork = *homeInfo; |
|
1520 } |
|
1521 else |
|
1522 { |
|
1523 // only in version 8 |
|
1524 iGsmHomeNetwork->iHsupaAvailableIndicator = EFalse; |
|
1525 |
|
1526 // Version 1 info |
|
1527 iGsmHomeNetwork->iMode = homeInfo->iMode; |
|
1528 iGsmHomeNetwork->iStatus = homeInfo->iStatus; |
|
1529 iGsmHomeNetwork->iBandInfo = homeInfo->iBandInfo; |
|
1530 iGsmHomeNetwork->iCountryCode = homeInfo->iCountryCode; |
|
1531 iGsmHomeNetwork->iCdmaSID = homeInfo->iCdmaSID; |
|
1532 iGsmHomeNetwork->iAnalogSID = homeInfo->iAnalogSID; |
|
1533 iGsmHomeNetwork->iNetworkId = homeInfo->iNetworkId; |
|
1534 iGsmHomeNetwork->iDisplayTag = homeInfo->iDisplayTag; |
|
1535 iGsmHomeNetwork->iShortName = homeInfo->iShortName; |
|
1536 iGsmHomeNetwork->iLongName = homeInfo->iLongName; |
|
1537 |
|
1538 if ( KETelExtMultimodeV1 == homeInfo->ExtensionId() ) |
|
1539 { |
|
1540 // Version 2 onward info default |
|
1541 iGsmHomeNetwork->iAccess = RMobilePhone::ENetworkAccessUnknown; |
|
1542 iGsmHomeNetwork->iHsdpaAvailableIndicator = EFalse; |
|
1543 iGsmHomeNetwork->iEgprsAvailableIndicator = EFalse; |
|
1544 } |
|
1545 else |
|
1546 { |
|
1547 // Version 2 info |
|
1548 iGsmHomeNetwork->iAccess = homeInfo->iAccess; |
|
1549 if ( KETelExtMultimodeV2 == homeInfo->ExtensionId() ) |
|
1550 { |
|
1551 // version 5 info default |
|
1552 iGsmHomeNetwork->iHsdpaAvailableIndicator = EFalse; |
|
1553 iGsmHomeNetwork->iEgprsAvailableIndicator = EFalse; |
|
1554 } |
|
1555 else |
|
1556 { |
|
1557 // version 5 info |
|
1558 iGsmHomeNetwork->iHsdpaAvailableIndicator = homeInfo->iHsdpaAvailableIndicator; |
|
1559 iGsmHomeNetwork->iEgprsAvailableIndicator = homeInfo->iEgprsAvailableIndicator; |
|
1560 } |
|
1561 } |
|
1562 } |
|
1563 |
|
1564 //Enable flag, home network information is available |
|
1565 iIsHomeNetworkInfoAvailable = ETrue; |
|
1566 } |
|
1567 |
|
1568 // --------------------------------------------------------------------------- |
|
1569 // CMmPhoneGsmWcdmaExt::GetNetworkSecurityLevel |
|
1570 // Gets cached network's security level (encription level). |
|
1571 // (other items were commented in a header). |
|
1572 // --------------------------------------------------------------------------- |
|
1573 // |
|
1574 TInt CMmPhoneGsmWcdmaExt::GetNetworkSecurityLevel ( |
|
1575 RMobilePhone::TMobilePhoneNetworkSecurity& aNetworkSecurity ) const |
|
1576 // network security paramater |
|
1577 { |
|
1578 aNetworkSecurity = iNetworkSecurity; |
|
1579 return KErrNone; |
|
1580 } |
|
1581 |
|
1582 // --------------------------------------------------------------------------- |
|
1583 // CMmPhoneGsmWcdmaExt::SetNetworkSecurityLevel |
|
1584 // Sets cached network's security level (encription level) |
|
1585 // (other items were commented in a header). |
|
1586 // --------------------------------------------------------------------------- |
|
1587 // |
|
1588 TInt CMmPhoneGsmWcdmaExt::SetNetworkSecurityLevel( |
|
1589 RMobilePhone::TMobilePhoneNetworkSecurity& aNetworkSecurity ) |
|
1590 { |
|
1591 iNetworkSecurity = aNetworkSecurity; |
|
1592 return KErrNone; |
|
1593 } |
|
1594 // --------------------------------------------------------------------------- |
|
1595 // CMmPhoneGsmWcdmaExt::GetCipheringIndicatorStatusL |
|
1596 // Gets the status of the ciphering indicator |
|
1597 // (other items were commented in a header). |
|
1598 // --------------------------------------------------------------------------- |
|
1599 // |
|
1600 TInt CMmPhoneGsmWcdmaExt::GetCipheringIndicatorStatusL( |
|
1601 const TDataPackage* aDataPackage ) |
|
1602 { |
|
1603 return iMessageManager->HandleRequestL ( |
|
1604 EMobilePhoneGetCipheringIndicatorStatus, aDataPackage ); |
|
1605 } |
|
1606 |
|
1607 // --------------------------------------------------------------------------- |
|
1608 // CMmPhoneGsmWcdmaExt::CurrentICCType |
|
1609 // This methods returns the currently active SIM card type |
|
1610 // (other items were commented in a header). |
|
1611 // --------------------------------------------------------------------------- |
|
1612 // |
|
1613 TInt CMmPhoneGsmWcdmaExt::CurrentICCType() |
|
1614 { |
|
1615 return iCurrentICCType; |
|
1616 } |
|
1617 |
|
1618 // --------------------------------------------------------------------------- |
|
1619 // CMmPhoneGsmWcdmaExt::GetLockInfoL |
|
1620 // Requests the information of a given security lock |
|
1621 // (other items were commented in a header). |
|
1622 // --------------------------------------------------------------------------- |
|
1623 // |
|
1624 TInt CMmPhoneGsmWcdmaExt::GetLockInfoL( |
|
1625 const TDataPackage& aPackage ) |
|
1626 { |
|
1627 return iMessageManager->HandleRequestL( |
|
1628 EMobilePhoneGetLockInfo, &aPackage ); |
|
1629 } |
|
1630 |
|
1631 |
|
1632 // End of File |