142 TPtrC8 countryCode,networkIdentify,displayTag,longName,shortName; |
136 TPtrC8 countryCode,networkIdentify,displayTag,longName,shortName; |
143 TInt status; |
137 TInt status; |
144 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,countryCode); |
138 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,countryCode); |
145 if(ret!=KErrNone) |
139 if(ret!=KErrNone) |
146 { |
140 { |
147 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_2, "WARNING - CONFIGURATION FILE PARSING - Reading element COUNTRYCODE returned %d (element no. %d) from tag %s.",ret,0,KNetworkInfo); |
141 LOGPARSERR("countryCode",ret,0,&KNetworkInfo); |
148 continue; |
142 continue; |
149 } |
143 } |
150 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,networkIdentify); |
144 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,networkIdentify); |
151 if(ret!=KErrNone) |
145 if(ret!=KErrNone) |
152 { |
146 { |
153 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_3, "WARNING - CONFIGURATION FILE PARSING - Reading element NETWORKIDENTIFY returned %d (element no. %d) from tag %S.",ret,1,KNetworkInfo); |
147 LOGPARSERR("networkIdentify",ret,1,&KNetworkInfo); |
154 continue; |
148 continue; |
155 } |
149 } |
156 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,displayTag); |
150 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,displayTag); |
157 if(ret!=KErrNone) |
151 if(ret!=KErrNone) |
158 { |
152 { |
159 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_4, "WARNING - CONFIGURATION FILE PARSING - Reading element DISPLAYTAG returned %d (element no. %d) from tag %s.",ret,2,KNetworkInfo); |
153 LOGPARSERR("displayTag",ret,2,&KNetworkInfo); |
160 continue; |
154 continue; |
161 } |
155 } |
162 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,shortName); |
156 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,shortName); |
163 if(ret!=KErrNone) |
157 if(ret!=KErrNone) |
164 { |
158 { |
165 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_5, "WARNING - CONFIGURATION FILE PARSING - Reading element SHORTNAME returned %d (element no. %d) from tag %s.",ret,3,KNetworkInfo); |
159 LOGPARSERR("shortName",ret,3,&KNetworkInfo); |
166 continue; |
160 continue; |
167 } |
161 } |
168 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,longName); |
162 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,longName); |
169 if(ret!=KErrNone) |
163 if(ret!=KErrNone) |
170 { |
164 { |
171 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_6, "WARNING - CONFIGURATION FILE PARSING - Reading element LONGNAME returned %d (element no. %d) from tag %s.",ret,4,KNetworkInfo); |
165 LOGPARSERR("longName",ret,4,&KNetworkInfo); |
172 continue; |
166 continue; |
173 } |
167 } |
174 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,status); |
168 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,status); |
175 if(ret!=KErrNone) |
169 if(ret!=KErrNone) |
176 { |
170 { |
177 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_7, "WARNING - CONFIGURATION FILE PARSING - Reading element STATUS returned %d (element no. %d) from tag %s.",ret,5,KNetworkInfo); |
171 LOGPARSERR("status",ret,5,&KNetworkInfo); |
178 continue; |
172 continue; |
179 } |
173 } |
180 RMobilePhone::TMobilePhoneNetworkInfoV2 networkInfo; |
174 RMobilePhone::TMobilePhoneNetworkInfoV2 networkInfo; |
181 RMobilePhone::TMobilePhoneNetworkInfoV8 networkInfoV8; |
175 RMobilePhone::TMobilePhoneNetworkInfoV8 networkInfoV8; |
182 |
176 |
237 |
231 |
238 TInt duration,regStat,networkIndex; |
232 TInt duration,regStat,networkIndex; |
239 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,duration); |
233 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,duration); |
240 if(ret!=KErrNone) |
234 if(ret!=KErrNone) |
241 { |
235 { |
242 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_8, "WARNING - CONFIGURATION FILE PARSING - Reading element DURATION returned %d (element no. %d) from tag %s.",ret,0,KRegStatus); |
236 LOGPARSERR("duration",ret,0,&KRegStatus); |
243 continue; |
237 continue; |
244 } |
238 } |
245 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,regStat); |
239 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,regStat); |
246 if(ret!=KErrNone) |
240 if(ret!=KErrNone) |
247 { |
241 { |
248 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_9, "WARNING - CONFIGURATION FILE PARSING - Reading element REGSTAT returned %d (element no. %d) from tag %s.",ret,1,KRegStatus); |
242 LOGPARSERR("regStat",ret,1,&KRegStatus); |
249 continue; |
243 continue; |
250 } |
244 } |
251 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,networkIndex); |
245 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,networkIndex); |
252 if(ret!=KErrNone) |
246 if(ret!=KErrNone) |
253 networkIndex=KErrNotFound; // Network Index is optional. |
247 networkIndex=KErrNotFound; // Network Index is optional. |
270 TInt duration,radioStatus; |
264 TInt duration,radioStatus; |
271 |
265 |
272 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,duration); |
266 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,duration); |
273 if(ret!=KErrNone) |
267 if(ret!=KErrNone) |
274 { |
268 { |
275 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_10, "WARNING - CONFIGURATION FILE PARSING - Reading element DURATION returned %d (element no. %d) from tag %s.",ret,0,KRadioMode); |
269 LOGPARSERR("duration",ret,0,&KRadioMode); |
276 continue; |
270 continue; |
277 } |
271 } |
278 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,radioStatus); |
272 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,radioStatus); |
279 if(ret!=KErrNone) |
273 if(ret!=KErrNone) |
280 { |
274 { |
281 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_11, "WARNING - CONFIGURATION FILE PARSING - Reading element RADIOSTATUS returned %d (element no. %d) from tag %s.",ret,1,KRadioMode); |
275 LOGPARSERR("radioStatus",ret,1,&KRadioMode); |
282 continue; |
276 continue; |
283 } |
277 } |
284 |
278 |
285 |
279 |
286 TRadioMode radioMode; |
280 TRadioMode radioMode; |
300 |
294 |
301 TInt duration,year,month,day,hour,min,sec,microsec,tz,dst; |
295 TInt duration,year,month,day,hour,min,sec,microsec,tz,dst; |
302 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,duration); |
296 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,duration); |
303 if(ret!=KErrNone) |
297 if(ret!=KErrNone) |
304 { |
298 { |
305 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_12, "WARNING - CONFIGURATION FILE PARSING - Reading element DURATION returned %d (element no. %d) from tag %s.",ret,0,KNitzInfo); |
299 LOGPARSERR("duration",ret,0,&KNitzInfo); |
306 continue; |
300 continue; |
307 } |
301 } |
308 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,year); |
302 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,year); |
309 if(ret!=KErrNone) |
303 if(ret!=KErrNone) |
310 { |
304 { |
311 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_13, "WARNING - CONFIGURATION FILE PARSING - Reading element YEAR returned %d (element no. %d) from tag %s.",ret,1,KNitzInfo); |
305 LOGPARSERR("year",ret,1,&KNitzInfo); |
312 continue; |
306 continue; |
313 } |
307 } |
314 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,month); |
308 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,month); |
315 if(ret!=KErrNone) |
309 if(ret!=KErrNone) |
316 { |
310 { |
317 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_14, "WARNING - CONFIGURATION FILE PARSING - Reading element MONTH returned %d (element no. %d) from tag %s.",ret,2,KNitzInfo); |
311 LOGPARSERR("month",ret,2,&KNitzInfo); |
318 continue; |
312 continue; |
319 } |
313 } |
320 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,day); |
314 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,day); |
321 if(ret!=KErrNone) |
315 if(ret!=KErrNone) |
322 { |
316 { |
323 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_15, "WARNING - CONFIGURATION FILE PARSING - Reading element DAY returned %d (element no. %d) from tag %s.",ret,3,KNitzInfo); |
317 LOGPARSERR("day",ret,3,&KNitzInfo); |
324 continue; |
318 continue; |
325 } |
319 } |
326 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,hour); |
320 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,hour); |
327 if(ret!=KErrNone) |
321 if(ret!=KErrNone) |
328 { |
322 { |
329 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_16, "WARNING - CONFIGURATION FILE PARSING - Reading element HOUR returned %d (element no. %d) from tag %s.",ret,4,KNitzInfo); |
323 LOGPARSERR("hour",ret,4,&KNitzInfo); |
330 continue; |
324 continue; |
331 } |
325 } |
332 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,min); |
326 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,min); |
333 if(ret!=KErrNone) |
327 if(ret!=KErrNone) |
334 { |
328 { |
335 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_17, "WARNING - CONFIGURATION FILE PARSING - Reading element MIN returned %d (element no. %d) from tag %s.",ret,5,KNitzInfo); |
329 LOGPARSERR("min",ret,5,&KNitzInfo); |
336 continue; |
330 continue; |
337 } |
331 } |
338 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,6,sec); |
332 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,6,sec); |
339 if(ret!=KErrNone) |
333 if(ret!=KErrNone) |
340 { |
334 { |
341 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_18, "WARNING - CONFIGURATION FILE PARSING - Reading element SEC returned %d (element no. %d) from tag %s.",ret,6,KNitzInfo); |
335 LOGPARSERR("sec",ret,6,&KNitzInfo); |
342 continue; |
336 continue; |
343 } |
337 } |
344 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,7,microsec); |
338 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,7,microsec); |
345 if(ret!=KErrNone) |
339 if(ret!=KErrNone) |
346 { |
340 { |
347 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_19, "WARNING - CONFIGURATION FILE PARSING - Reading element MICROSEC returned %d (element no. %d) from tag %s.",ret,7,KNitzInfo); |
341 LOGPARSERR("microsec",ret,7,&KNitzInfo); |
348 continue; |
342 continue; |
349 } |
343 } |
350 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,8,tz); |
344 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,8,tz); |
351 if(ret!=KErrNone) |
345 if(ret!=KErrNone) |
352 { |
346 { |
353 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_20, "WARNING - CONFIGURATION FILE PARSING - Reading element TZ returned %d (element no. %d) from tag %s.",ret,8,KNitzInfo); |
347 LOGPARSERR("tz",ret,8,&KNitzInfo); |
354 continue; |
348 continue; |
355 } |
349 } |
356 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,9,dst); |
350 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,9,dst); |
357 if(ret!=KErrNone) |
351 if(ret!=KErrNone) |
358 { |
352 { |
359 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_21, "WARNING - CONFIGURATION FILE PARSING - Reading element DST returned %d (element no. %d) from tag %s.",ret,9,KNitzInfo); |
353 LOGPARSERR("dst",ret,9,&KNitzInfo); |
360 continue; |
354 continue; |
361 } |
355 } |
362 |
356 |
363 RMobilePhone::TMobilePhoneNITZ nitzInfo(year,(TMonth)month,day,hour,min,sec,microsec); |
357 RMobilePhone::TMobilePhoneNITZ nitzInfo(year,(TMonth)month,day,hour,min,sec,microsec); |
364 nitzInfo.iTimeZone=tz; |
358 nitzInfo.iTimeZone=tz; |
384 |
378 |
385 TInt duration,mode,cellId,timingAdvance,cellInfoStatus; |
379 TInt duration,mode,cellId,timingAdvance,cellInfoStatus; |
386 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,duration); |
380 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,duration); |
387 if(ret!=KErrNone) |
381 if(ret!=KErrNone) |
388 { |
382 { |
389 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_22, "WARNING - CONFIGURATION FILE PARSING - Reading element DURATION returned %d (element no. %d) from tag %s.",ret,0,KCellInfo); |
383 LOGPARSERR("duration",ret,0,&KCellInfo); |
390 continue; |
384 continue; |
391 } |
385 } |
392 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,mode); |
386 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,mode); |
393 if(ret!=KErrNone) |
387 if(ret!=KErrNone) |
394 { |
388 { |
395 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_23, "WARNING - CONFIGURATION FILE PARSING - Reading element MODE returned %d (element no. %d) from tag %s.",ret,1,KCellInfo); |
389 LOGPARSERR("mode",ret,1,&KCellInfo); |
396 continue; |
390 continue; |
397 } |
391 } |
398 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,cellId); |
392 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,cellId); |
399 if(ret!=KErrNone) |
393 if(ret!=KErrNone) |
400 { |
394 { |
401 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_24, "WARNING - CONFIGURATION FILE PARSING - Reading element CELLID returned %d (element no. %d) from tag %s.",ret,2,KCellInfo); |
395 LOGPARSERR("cellId",ret,2,&KCellInfo); |
402 continue; |
396 continue; |
403 } |
397 } |
404 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,timingAdvance); |
398 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,timingAdvance); |
405 if(ret!=KErrNone) |
399 if(ret!=KErrNone) |
406 { |
400 { |
407 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_25, "WARNING - CONFIGURATION FILE PARSING - Reading element TIMINGADVANCE returned %d (element no. %d) from tag %s.",ret,3,KCellInfo); |
401 LOGPARSERR("timingAdvance",ret,3,&KCellInfo); |
408 continue; |
402 continue; |
409 } |
403 } |
410 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,cellInfoStatus); |
404 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,cellInfoStatus); |
411 if(ret!=KErrNone) |
405 if(ret!=KErrNone) |
412 { |
406 { |
413 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_26, "WARNING - CONFIGURATION FILE PARSING - Reading element CELLINFOSTATUS returned %d (element no. %d) from tag %s.",ret,3,KCellInfo); |
407 LOGPARSERR("cellInfoStatus",ret,3,&KCellInfo); |
414 continue; |
408 continue; |
415 } |
409 } |
416 |
410 |
417 TCellInfoAndDuration cellInfoAndDuration; |
411 TCellInfoAndDuration cellInfoAndDuration; |
418 cellInfoAndDuration.iInfo.iMode = static_cast<RMobilePhone::TCellMode>(mode); |
412 cellInfoAndDuration.iInfo.iMode = static_cast<RMobilePhone::TCellMode>(mode); |
455 locationArea.iAreaKnown = areaKnown; |
449 locationArea.iAreaKnown = areaKnown; |
456 locationArea.iLocationAreaCode = locationAreaCode; |
450 locationArea.iLocationAreaCode = locationAreaCode; |
457 locationArea.iCellId= cellId; |
451 locationArea.iCellId= cellId; |
458 iLocationArea->AppendL(locationArea); |
452 iLocationArea->AppendL(locationArea); |
459 } |
453 } |
460 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_27, "...Finished parsing Network Status config parameters..."); |
454 LOGNETWORK1("...Finished parsing Network Status config parameters..."); |
461 |
455 |
462 // If present load the first registration status settings and start the registration |
456 // If present load the first registration status settings and start the registration |
463 // status timer. |
457 // status timer. |
464 if(iRegStatusInfo->Count()!=0) |
458 if(iRegStatusInfo->Count()!=0) |
465 { |
459 { |
466 iRegStatIndex=0; |
460 iRegStatIndex=0; |
467 iCurrentRegStatus=iRegStatusInfo->At(0).iRegStatus; |
461 iCurrentRegStatus=iRegStatusInfo->At(0).iRegStatus; |
468 iCurrentNetworkIndex=iRegStatusInfo->At(0).iNetworkInfoIndex; |
462 iCurrentNetworkIndex=iRegStatusInfo->At(0).iNetworkInfoIndex; |
469 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_28, "Starting ETimerIdNtwkStatRegStat for duration:%d", iRegStatusInfo->At(0).iDuration); |
463 LOGNETWORK2("Starting ETimerIdNtwkStatRegStat for duration:%d", iRegStatusInfo->At(0).iDuration); |
470 iRegStatTimer->Start(iRegStatusInfo->At(0).iDuration,this,ETimerIdNtwkStatRegStat); |
464 iRegStatTimer->Start(iRegStatusInfo->At(0).iDuration,this,ETimerIdNtwkStatRegStat); |
471 } |
465 } |
472 |
466 |
473 // If present load the first NITZ settings and start the NITZ timer. |
467 // If present load the first NITZ settings and start the NITZ timer. |
474 if(iNitzInfo->Count()!=0) |
468 if(iNitzInfo->Count()!=0) |
491 iRadioModeIndex=0; |
485 iRadioModeIndex=0; |
492 iRadioMode.iRadioOn=iRadioModeInfo->At(0).iRadioOn; |
486 iRadioMode.iRadioOn=iRadioModeInfo->At(0).iRadioOn; |
493 if(iRadioMode.iRadioOn==EFalse) |
487 if(iRadioMode.iRadioOn==EFalse) |
494 { |
488 { |
495 RProperty::Set(KUidSystemCategory, KUidPhonePwrValue, ESAPhoneOff); |
489 RProperty::Set(KUidSystemCategory, KUidPhonePwrValue, ESAPhoneOff); |
496 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_29, "Radio Mode = OFF (from config)"); |
490 LOGNETWORK1("Radio Mode = OFF (from config)"); |
497 } |
491 } |
498 else |
492 else |
499 { |
493 { |
500 RProperty::Set(KUidSystemCategory, KUidPhonePwrValue, ESAPhoneOn); |
494 RProperty::Set(KUidSystemCategory, KUidPhonePwrValue, ESAPhoneOn); |
501 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_30, "Radio Mode = ON (from config)"); |
495 LOGNETWORK1("Radio Mode = ON (from config)"); |
502 } |
496 } |
503 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_31, "Radio Mode duration = %d (from config)", iRadioModeInfo->At(0).iDuration); |
497 LOGNETWORK2("Radio Mode duration = %d (from config)", iRadioModeInfo->At(0).iDuration); |
504 |
498 |
505 iRadioModeTimer->Start(iRadioModeInfo->At(0).iDuration,this,ETimerIdNtwkStatRadioMode); |
499 iRadioModeTimer->Start(iRadioModeInfo->At(0).iDuration,this,ETimerIdNtwkStatRadioMode); |
506 } |
500 } |
507 else |
501 else |
508 { |
502 { |
509 //default to on |
503 //default to on |
510 RProperty::Set(KUidSystemCategory, KUidPhonePwrValue, ESAPhoneOn); |
504 RProperty::Set(KUidSystemCategory, KUidPhonePwrValue, ESAPhoneOn); |
511 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_32, "Radio Mode = ON (no config)"); |
505 LOGNETWORK1("Radio Mode = ON (no config)"); |
512 } |
506 } |
513 |
507 |
514 //If present read in Service Provider settings |
508 //If present read in Service Provider settings |
515 TPtrC8 spname, plmnfield; |
509 TPtrC8 spname, plmnfield; |
516 TInt displayreq; |
510 TInt displayreq; |
518 if (item) |
512 if (item) |
519 { |
513 { |
520 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,displayreq); |
514 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,displayreq); |
521 if(ret!=KErrNone) |
515 if(ret!=KErrNone) |
522 { |
516 { |
523 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_33, "WARNING - CONFIGURATION FILE PARSING - Reading element DISPLAYREQ returned %d (element no. %d) from tag %s.",ret,0,KServiceProviderName); |
517 LOGPARSERR("displayreq",ret,0,&KServiceProviderName); |
524 } |
518 } |
525 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,spname); |
519 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,spname); |
526 if(ret!=KErrNone) |
520 if(ret!=KErrNone) |
527 { |
521 { |
528 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_34, "WARNING - CONFIGURATION FILE PARSING - Reading element SPNAME returned %d (element no. %d) from tag %s.",ret,1,KServiceProviderName); |
522 LOGPARSERR("spname",ret,1,&KServiceProviderName); |
529 } |
523 } |
530 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,plmnfield); |
524 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,plmnfield); |
531 if(ret!=KErrNone) |
525 if(ret!=KErrNone) |
532 { |
526 { |
533 OstTraceDefExt3(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_CONSTRUCTL_35, "WARNING - CONFIGURATION FILE PARSING - Reading element PLMNFIELD returned %d (element no. %d) from tag %s.",ret,2,KServiceProviderName); |
527 LOGPARSERR("plmnfield",ret,2,&KServiceProviderName); |
534 } |
528 } |
535 iServiceProvider.iDisplayReq = static_cast<RMobilePhone::TDisplayRequirements>(displayreq); |
529 iServiceProvider.iDisplayReq = static_cast<RMobilePhone::TDisplayRequirements>(displayreq); |
536 |
530 |
537 TInt maxLength = iServiceProvider.iSPName.MaxLength(); |
531 TInt maxLength = iServiceProvider.iSPName.MaxLength(); |
538 if (spname.Length() > maxLength) |
532 if (spname.Length() > maxLength) |
1491 } |
1485 } |
1492 iCurrentNetworkChangeLocationAreaNotificationPending=EFalse; |
1486 iCurrentNetworkChangeLocationAreaNotificationPending=EFalse; |
1493 } |
1487 } |
1494 if(iCurrNetChangeV1NotificationPending) |
1488 if(iCurrNetChangeV1NotificationPending) |
1495 { |
1489 { |
1496 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_TIMERCALLBACKREGSTAT_1, "CSimNetworkStatus::TimerCallBackRegStat() - completing NotifyCurrentNetworkChange TMobilePhoneNetworkInfoV1"); |
1490 LOGNETWORK1("CSimNetworkStatus::TimerCallBackRegStat() - completing NotifyCurrentNetworkChange TMobilePhoneNetworkInfoV1"); |
1497 iCurrNetChangeV1NotificationPending = EFalse; |
1491 iCurrNetChangeV1NotificationPending = EFalse; |
1498 RMobilePhone::TMobilePhoneNetworkInfoV1* changeNetInfoV1 = reinterpret_cast<RMobilePhone::TMobilePhoneNetworkInfoV1*>(iCurrNetChangeV1NotificationNetInfo); |
1492 RMobilePhone::TMobilePhoneNetworkInfoV1* changeNetInfoV1 = reinterpret_cast<RMobilePhone::TMobilePhoneNetworkInfoV1*>(iCurrNetChangeV1NotificationNetInfo); |
1499 |
1493 |
1500 PopulateNetworkInfoV1(iCurrentNetworkIndex,*changeNetInfoV1); |
1494 PopulateNetworkInfoV1(iCurrentNetworkIndex,*changeNetInfoV1); |
1501 iPhone->ReqCompleted(iCurrNetChangeV1NotificationReqHandle,KErrNone); |
1495 iPhone->ReqCompleted(iCurrNetChangeV1NotificationReqHandle,KErrNone); |
1502 } |
1496 } |
1503 |
1497 |
1504 if(iCurrNetChangeV2NotificationPending) |
1498 if(iCurrNetChangeV2NotificationPending) |
1505 { |
1499 { |
1506 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_TIMERCALLBACKREGSTAT_2, "CSimNetworkStatus::TimerCallBackRegStat() - completing NotifyCurrentNetworkChange TMobilePhoneNetworkInfoV2"); |
1500 LOGNETWORK1("CSimNetworkStatus::TimerCallBackRegStat() - completing NotifyCurrentNetworkChange TMobilePhoneNetworkInfoV2"); |
1507 iCurrNetChangeV2NotificationPending = EFalse; |
1501 iCurrNetChangeV2NotificationPending = EFalse; |
1508 RMobilePhone::TMobilePhoneNetworkInfoV2* changeNetInfoV2 = reinterpret_cast<RMobilePhone::TMobilePhoneNetworkInfoV2*>(iCurrNetChangeV2NotificationNetInfo); |
1502 RMobilePhone::TMobilePhoneNetworkInfoV2* changeNetInfoV2 = reinterpret_cast<RMobilePhone::TMobilePhoneNetworkInfoV2*>(iCurrNetChangeV2NotificationNetInfo); |
1509 PopulateNetworkInfoV1(iCurrentNetworkIndex,*changeNetInfoV2); |
1503 PopulateNetworkInfoV1(iCurrentNetworkIndex,*changeNetInfoV2); |
1510 //also set v2 paramaters |
1504 //also set v2 paramaters |
1511 changeNetInfoV2->iAccess = iNetworkInfo->At(iCurrentNetworkIndex).iAccess; |
1505 changeNetInfoV2->iAccess = iNetworkInfo->At(iCurrentNetworkIndex).iAccess; |
1512 iPhone->ReqCompleted(iCurrNetChangeV2NotificationReqHandle,KErrNone); |
1506 iPhone->ReqCompleted(iCurrNetChangeV2NotificationReqHandle,KErrNone); |
1513 } |
1507 } |
1514 |
1508 |
1515 if(iCurrNetChangeV5NotificationPending) |
1509 if(iCurrNetChangeV5NotificationPending) |
1516 { |
1510 { |
1517 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_TIMERCALLBACKREGSTAT_3, "CSimNetworkStatus::TimerCallBackRegStat() - completing NotifyCurrentNetworkChange TMobilePhoneNetworkInfoV5"); |
1511 LOGNETWORK1("CSimNetworkStatus::TimerCallBackRegStat() - completing NotifyCurrentNetworkChange TMobilePhoneNetworkInfoV5"); |
1518 iCurrNetChangeV5NotificationPending = EFalse; |
1512 iCurrNetChangeV5NotificationPending = EFalse; |
1519 RMobilePhone::TMobilePhoneNetworkInfoV5* changeNetInfoV5 = reinterpret_cast<RMobilePhone::TMobilePhoneNetworkInfoV5*>(iCurrNetChangeV5NotificationNetInfo); |
1513 RMobilePhone::TMobilePhoneNetworkInfoV5* changeNetInfoV5 = reinterpret_cast<RMobilePhone::TMobilePhoneNetworkInfoV5*>(iCurrNetChangeV5NotificationNetInfo); |
1520 PopulateNetworkInfoV1(iCurrentNetworkIndex,*changeNetInfoV5); |
1514 PopulateNetworkInfoV1(iCurrentNetworkIndex,*changeNetInfoV5); |
1521 //also set v5 paramaters |
1515 //also set v5 paramaters |
1522 changeNetInfoV5->iAccess = iNetworkInfoV8->At(0).iAccess; |
1516 changeNetInfoV5->iAccess = iNetworkInfoV8->At(0).iAccess; |
1539 iPhone->ReqCompleted(iCurrNetChangeV8NotificationReqHandle,KErrNone); |
1533 iPhone->ReqCompleted(iCurrNetChangeV8NotificationReqHandle,KErrNone); |
1540 } |
1534 } |
1541 |
1535 |
1542 if(iCurrNetChangeEtelIsvNotificationPending) |
1536 if(iCurrNetChangeEtelIsvNotificationPending) |
1543 { |
1537 { |
1544 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_TIMERCALLBACKREGSTAT_5, "CSimNetworkStatus::TimerCallBackRegStat() - completing NotifyCurrentNetworkChange TEtel3rdPartyMobileNetworkInfoV1"); |
1538 LOGNETWORK1("CSimNetworkStatus::TimerCallBackRegStat() - completing NotifyCurrentNetworkChange TEtel3rdPartyMobileNetworkInfoV1"); |
1545 iCurrNetChangeEtelIsvNotificationPending = EFalse; |
1539 iCurrNetChangeEtelIsvNotificationPending = EFalse; |
1546 RMobilePhone::TEtel3rdPartyMobileNetworkInfoV1* changeNetInfoEtelIsv = reinterpret_cast<RMobilePhone::TEtel3rdPartyMobileNetworkInfoV1*>(iCurrNetChangeEtelIsvNotificationNetInfo); |
1540 RMobilePhone::TEtel3rdPartyMobileNetworkInfoV1* changeNetInfoEtelIsv = reinterpret_cast<RMobilePhone::TEtel3rdPartyMobileNetworkInfoV1*>(iCurrNetChangeEtelIsvNotificationNetInfo); |
1547 |
1541 |
1548 PopulateEtel3rdPartyNetworkInfoV1(iCurrentNetworkIndex, *changeNetInfoEtelIsv); |
1542 PopulateEtel3rdPartyNetworkInfoV1(iCurrentNetworkIndex, *changeNetInfoEtelIsv); |
1549 iPhone->ReqCompleted(iCurrNetChangeEtelIsvNotificationReqHandle,KErrNone); |
1543 iPhone->ReqCompleted(iCurrNetChangeEtelIsvNotificationReqHandle,KErrNone); |
1550 } |
1544 } |
1551 if(iCurrNetChangeNoLocV1NotificationPending) |
1545 if(iCurrNetChangeNoLocV1NotificationPending) |
1552 { |
1546 { |
1553 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_TIMERCALLBACKREGSTAT_6, "CSimNetworkStatus::TimerCallBackRegStat() - completing NotifyCurrentNetworkChange TMobilePhoneNetworkInfoV1 (No Location)"); |
1547 LOGNETWORK1("CSimNetworkStatus::TimerCallBackRegStat() - completing NotifyCurrentNetworkChange TMobilePhoneNetworkInfoV1 (No Location)"); |
1554 iCurrNetChangeNoLocV1NotificationPending = EFalse; |
1548 iCurrNetChangeNoLocV1NotificationPending = EFalse; |
1555 RMobilePhone::TMobilePhoneNetworkInfoV1* changeNetInfoV1 = reinterpret_cast<RMobilePhone::TMobilePhoneNetworkInfoV1*>(iCurrNetChangeNoLocV1NotificationNetInfo); |
1549 RMobilePhone::TMobilePhoneNetworkInfoV1* changeNetInfoV1 = reinterpret_cast<RMobilePhone::TMobilePhoneNetworkInfoV1*>(iCurrNetChangeNoLocV1NotificationNetInfo); |
1556 |
1550 |
1557 PopulateNetworkInfoV1(iCurrentNetworkIndex,*changeNetInfoV1); |
1551 PopulateNetworkInfoV1(iCurrentNetworkIndex,*changeNetInfoV1); |
1558 iPhone->ReqCompleted(iCurrNetChangeNoLocV1NotificationReqHandle,KErrNone); |
1552 iPhone->ReqCompleted(iCurrNetChangeNoLocV1NotificationReqHandle,KErrNone); |
1559 } |
1553 } |
1560 |
1554 |
1561 if(iCurrNetChangeNoLocV2NotificationPending) |
1555 if(iCurrNetChangeNoLocV2NotificationPending) |
1562 { |
1556 { |
1563 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_TIMERCALLBACKREGSTAT_7, "CSimNetworkStatus::TimerCallBackRegStat() - completing NotifyCurrentNetworkChange TMobilePhoneNetworkInfoV2 (No Location)"); |
1557 LOGNETWORK1("CSimNetworkStatus::TimerCallBackRegStat() - completing NotifyCurrentNetworkChange TMobilePhoneNetworkInfoV2 (No Location)"); |
1564 iCurrNetChangeNoLocV2NotificationPending = EFalse; |
1558 iCurrNetChangeNoLocV2NotificationPending = EFalse; |
1565 RMobilePhone::TMobilePhoneNetworkInfoV2* changeNetInfoV2 = reinterpret_cast<RMobilePhone::TMobilePhoneNetworkInfoV2*>(iCurrNetChangeNoLocV2NotificationNetInfo); |
1559 RMobilePhone::TMobilePhoneNetworkInfoV2* changeNetInfoV2 = reinterpret_cast<RMobilePhone::TMobilePhoneNetworkInfoV2*>(iCurrNetChangeNoLocV2NotificationNetInfo); |
1566 |
1560 |
1567 PopulateNetworkInfoV1(iCurrentNetworkIndex,*changeNetInfoV2); |
1561 PopulateNetworkInfoV1(iCurrentNetworkIndex,*changeNetInfoV2); |
1568 //also set v2 paramaters |
1562 //also set v2 paramaters |
1633 /** |
1627 /** |
1634 * The RadioMode timer callback function. This function will be called when the RadioMode timer |
1628 * The RadioMode timer callback function. This function will be called when the RadioMode timer |
1635 * completes. |
1629 * completes. |
1636 */ |
1630 */ |
1637 { |
1631 { |
1638 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_TIMERCALLBACKRADIOMODEL_1, "CSimNetworkStatus::TimerCallBackRadioModeL"); |
1632 LOGNETWORK1("CSimNetworkStatus::TimerCallBackRadioModeL"); |
1639 iRadioModeIndex++; |
1633 iRadioModeIndex++; |
1640 if(iRadioModeInfo->Count()<=iRadioModeIndex) |
1634 if(iRadioModeInfo->Count()<=iRadioModeIndex) |
1641 { |
1635 { |
1642 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_TIMERCALLBACKRADIOMODEL_2, "CSimNetworkStatus::TimerCallBackRadioModeL returning, no more config"); |
1636 LOGNETWORK1("CSimNetworkStatus::TimerCallBackRadioModeL returning, no more config"); |
1643 return; |
1637 return; |
1644 } |
1638 } |
1645 |
1639 |
1646 iRadioMode=iRadioModeInfo->At(iRadioModeIndex); |
1640 iRadioMode=iRadioModeInfo->At(iRadioModeIndex); |
1647 if(iRadioMode.iRadioOn==EFalse) |
1641 if(iRadioMode.iRadioOn==EFalse) |
1648 { |
1642 { |
1649 RProperty::Set(KUidSystemCategory, KUidPhonePwrValue, ESAPhoneOff); |
1643 RProperty::Set(KUidSystemCategory, KUidPhonePwrValue, ESAPhoneOff); |
1650 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_TIMERCALLBACKRADIOMODEL_3, "Radio Mode = OFF (config duration passed)"); |
1644 LOGNETWORK1("Radio Mode = OFF (config duration passed)"); |
1651 } |
1645 } |
1652 else |
1646 else |
1653 { |
1647 { |
1654 RProperty::Set(KUidSystemCategory, KUidPhonePwrValue, ESAPhoneOn); |
1648 RProperty::Set(KUidSystemCategory, KUidPhonePwrValue, ESAPhoneOn); |
1655 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_TIMERCALLBACKRADIOMODEL_4, "Radio Mode = ON (config duration passed)"); |
1649 LOGNETWORK1("Radio Mode = ON (config duration passed)"); |
1656 } |
1650 } |
1657 |
1651 |
1658 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSIMNETWORKSTATUS_TIMERCALLBACKRADIOMODEL_5, "Next radio Mode duration = %d (from config)", iRadioModeInfo->At(iRadioModeIndex).iDuration); |
1652 LOGNETWORK2("Next radio Mode duration = %d (from config)", iRadioModeInfo->At(iRadioModeIndex).iDuration); |
1659 iRadioModeTimer->Start(iRadioModeInfo->At(iRadioModeIndex).iDuration,this,ETimerIdNtwkStatRadioMode); |
1653 iRadioModeTimer->Start(iRadioModeInfo->At(iRadioModeIndex).iDuration,this,ETimerIdNtwkStatRadioMode); |
1660 } |
1654 } |
1661 |
1655 |
1662 void CSimNetworkStatus::PopulateNetworkInfoV1(TInt aIndex,RMobilePhone::TMobilePhoneNetworkInfoV1& aNetInfo) |
1656 void CSimNetworkStatus::PopulateNetworkInfoV1(TInt aIndex,RMobilePhone::TMobilePhoneNetworkInfoV1& aNetInfo) |
1663 /** |
1657 /** |