22 #include <lbtcommon.h> |
22 #include <lbtcommon.h> |
23 #include <EPos_CPosModules.h> |
23 #include <EPos_CPosModules.h> |
24 #include <EPos_CPosModuleIdList.h> |
24 #include <EPos_CPosModuleIdList.h> |
25 #include <EPos_CPosModuleUpdate.h> |
25 #include <EPos_CPosModuleUpdate.h> |
26 |
26 |
|
27 // AGPS psy module UID |
|
28 const TUid KAGPSPsyModuleID = |
|
29 { |
|
30 0x101fe98c |
|
31 }; |
|
32 // NPP Psy module UID |
|
33 const TUid KNPPPsyModuleID = |
|
34 { |
|
35 0x10206915 |
|
36 }; |
|
37 |
27 //--------------------------------------------------------------------- |
38 //--------------------------------------------------------------------- |
28 // PosSettingsEnginePrivate::PosSettingsEnginePrivate() |
39 // PosSettingsEnginePrivate::PosSettingsEnginePrivate() |
29 // (other items were commented in a header). |
40 // (other items were commented in a header). |
30 //--------------------------------------------------------------------- |
41 //--------------------------------------------------------------------- |
31 PosSettingsEnginePrivate::PosSettingsEnginePrivate( |
42 PosSettingsEnginePrivate::PosSettingsEnginePrivate( |
254 // PosSettingsEnginePrivate::populatePsyModuleInfoListL() |
265 // PosSettingsEnginePrivate::populatePsyModuleInfoListL() |
255 // (other items were commented in a header). |
266 // (other items were commented in a header). |
256 //--------------------------------------------------------------------- |
267 //--------------------------------------------------------------------- |
257 void PosSettingsEnginePrivate::populatePsyModuleInfoListL() |
268 void PosSettingsEnginePrivate::populatePsyModuleInfoListL() |
258 { |
269 { |
|
270 TBool agpsState = EFalse; |
|
271 TBool nppState = EFalse; |
259 CPosModuleIdList* idList = mPosModules->ModuleIdListLC(); |
272 CPosModuleIdList* idList = mPosModules->ModuleIdListLC(); |
260 TInt cnt = idList->Count(); |
273 TInt cnt = idList->Count(); |
261 for ( TInt i = 0; i < cnt; ++i ) |
274 for ( TInt i = 0; i < cnt; ++i ) |
262 { |
275 { |
263 TPositionModuleInfo moduleInfo; |
276 TPositionModuleInfo moduleInfo; |
283 |
296 |
284 // Set state of Psy. |
297 // Set state of Psy. |
285 if( moduleInfo.IsAvailable() ) |
298 if( moduleInfo.IsAvailable() ) |
286 { |
299 { |
287 psyModuleInfo.mState = StateEnable; |
300 psyModuleInfo.mState = StateEnable; |
|
301 // capture the state of the agps psy module |
|
302 if (moduleInfo.ModuleId() == KAGPSPsyModuleID) |
|
303 { |
|
304 agpsState = ETrue; |
|
305 } |
|
306 // capture the state of npp psy module |
|
307 if (moduleInfo.ModuleId() == KNPPPsyModuleID) |
|
308 { |
|
309 nppState = ETrue; |
|
310 } |
|
311 |
288 } |
312 } |
289 else |
313 else |
290 { |
314 { |
291 psyModuleInfo.mState = StateDisable; |
315 psyModuleInfo.mState = StateDisable; |
292 } |
316 // capture the state of the agps psy module |
293 |
317 if (moduleInfo.ModuleId() == KAGPSPsyModuleID) |
294 mPsyModuleInfoList.Append( psyModuleInfo ); |
318 { |
295 } |
319 agpsState = EFalse; |
296 CleanupStack::PopAndDestroy( idList ); |
320 } |
|
321 // capture the state of npp psy module |
|
322 if (moduleInfo.ModuleId() == KNPPPsyModuleID) |
|
323 { |
|
324 nppState = EFalse; |
|
325 } |
|
326 } |
|
327 |
|
328 mPsyModuleInfoList.AppendL( psyModuleInfo ); |
|
329 } |
|
330 // Check if the state of both agps & npp psy are disabled then turn off the supl trigger status |
|
331 // else turn it back on again even if either is enabled |
|
332 if (!agpsState && !nppState) |
|
333 { |
|
334 User::LeaveIfError(mSuplSettings->SetSuplTriggeredServiceStatus( |
|
335 CSuplSettings::ESuplTriggerOff)); |
|
336 } |
|
337 else |
|
338 { |
|
339 User::LeaveIfError(mSuplSettings->SetSuplTriggeredServiceStatus( |
|
340 CSuplSettings::ESuplTriggerOn)); |
|
341 } |
|
342 |
|
343 CleanupStack::PopAndDestroy(idList); |
297 } |
344 } |
298 |
345 |
299 |
346 |
300 //--------------------------------------------------------------------- |
347 //--------------------------------------------------------------------- |
301 // PosSettingsEnginePrivate::GetBackGroundPositioingStateL() |
348 // PosSettingsEnginePrivate::GetBackGroundPositioingStateL() |