87 { |
87 { |
88 if(iTrace) |
88 if(iTrace) |
89 iTrace->Trace(_L("COMASuplStartState::~COMASuplStartState..."), KTraceFileName, __LINE__); |
89 iTrace->Trace(_L("COMASuplStartState::~COMASuplStartState..."), KTraceFileName, __LINE__); |
90 |
90 |
91 delete iLocationIDRequestor; |
91 delete iLocationIDRequestor; |
92 if(iTrace) |
92 iTrace->Trace(_L("Deleted iLocationIDRequestor..."), KTraceFileName, __LINE__); |
93 iTrace->Trace(_L("Deleted iLocationIDRequestor..."), KTraceFileName, __LINE__); |
|
94 |
93 |
95 if(iPosRequestor) |
94 if(iPosRequestor) |
96 { |
95 { |
97 iPosRequestor->DestroyList(); |
96 iPosRequestor->DestroyList(); |
98 } |
97 } |
99 else |
98 else |
100 { |
99 { |
101 delete iSETCapabilities ; |
100 delete iSETCapabilities ; |
102 if(iTrace) |
101 iTrace->Trace(_L("Deleted iSETCapabilities ..."), KTraceFileName, __LINE__); |
103 iTrace->Trace(_L("Deleted iSETCapabilities ..."), KTraceFileName, __LINE__); |
|
104 } |
102 } |
105 |
103 |
106 delete iAllowedCapabilities; |
104 delete iAllowedCapabilities; |
107 |
105 iTrace->Trace(_L("Deleted iAllowedCapabilities..."), KTraceFileName, __LINE__); |
108 if(iTrace) |
|
109 iTrace->Trace(_L("Deleted iAllowedCapabilities..."), KTraceFileName, __LINE__); |
|
110 |
106 |
111 if(iLocationId) |
107 if(iLocationId) |
112 { |
108 { |
113 if(iTrace) |
109 iTrace->Trace(_L("Deleted iLocationId..."), KTraceFileName, __LINE__); |
114 iTrace->Trace(_L("Deleted iLocationId..."), KTraceFileName, __LINE__); |
|
115 delete iLocationId; |
110 delete iLocationId; |
116 iLocationId=NULL; |
111 iLocationId=NULL; |
117 } |
112 } |
118 } |
113 } |
119 |
114 |
244 posTechnology2.SetPosTechnology(aGpsSetAssisted, aGpsSetBased, autonomousGps, AFLT, EOTD, OTDOA); |
239 posTechnology2.SetPosTechnology(aGpsSetAssisted, aGpsSetBased, autonomousGps, AFLT, EOTD, OTDOA); |
245 |
240 |
246 TBool tia801, rrlp, rrc; |
241 TBool tia801, rrlp, rrc; |
247 posProtocol.GetPosProtocol(tia801, rrlp, rrc); |
242 posProtocol.GetPosProtocol(tia801, rrlp, rrc); |
248 posProtocol2.SetPosProtocol(tia801, rrlp, rrc); |
243 posProtocol2.SetPosProtocol(tia801, rrlp, rrc); |
249 if(iSETCapabilities2) |
244 |
250 iSETCapabilities2->SetSETCapabilities(posTechnology2, prefMethod2, posProtocol2); |
245 iSETCapabilities2->SetSETCapabilities(posTechnology2, prefMethod2, posProtocol2); |
251 } |
246 } |
252 OMASuplStart->SetMessageBase(aSuplVersion,aSessionId); |
247 OMASuplStart->SetMessageBase(aSuplVersion,aSessionId); |
253 |
248 |
254 // Add trigger capability to SET Capabilities |
249 // Add trigger capability to SET Capabilities |
255 // Services supported |
250 // Services supported |
289 serviceCaps.SetSuplSessionCapabilities(sessionCaps); |
284 serviceCaps.SetSuplSessionCapabilities(sessionCaps); |
290 |
285 |
291 // Set SET Capability extn |
286 // Set SET Capability extn |
292 TOMAVer2SetCapExtn setCapsExtn; |
287 TOMAVer2SetCapExtn setCapsExtn; |
293 setCapsExtn.SetServiceCaps(serviceCaps); |
288 setCapsExtn.SetServiceCaps(serviceCaps); |
294 iTrace->Trace(_L("SetVer2SetCapExtn"), KTraceFileName, __LINE__); |
289 iTrace->Trace(_L("SetVer2SetCapExtn"), KTraceFileName, __LINE__); |
295 // Set SET Capabilities |
290 // Set SET Capabilities |
296 if(iSETCapabilities2) |
291 iSETCapabilities2->SetVer2SetCapExtn(setCapsExtn); |
297 iSETCapabilities2->SetVer2SetCapExtn(setCapsExtn); |
|
298 //iLocationId ownership will be with SUPL start class |
292 //iLocationId ownership will be with SUPL start class |
299 OMASuplStart->SetSuplStart(iSETCapabilities2,iLocationId2,iECId); |
293 OMASuplStart->SetSuplStart(iSETCapabilities2,iLocationId2,iECId); |
300 if(iECId) |
294 if(iECId) |
301 { |
295 { |
302 OMASuplStart->SetECellId(iMmCellInfo); |
296 OMASuplStart->SetECellId(iMmCellInfo); |
644 // COMASuplStartState::LocationIDRequestCompleted |
638 // COMASuplStartState::LocationIDRequestCompleted |
645 // Gets called when location request completed |
639 // Gets called when location request completed |
646 // (other items were commented in a header). |
640 // (other items were commented in a header). |
647 // ----------------------------------------------------------------------------- |
641 // ----------------------------------------------------------------------------- |
648 // |
642 // |
649 void COMASuplStartState::LocationIDRequestCompletedL( |
643 void COMASuplStartState::LocationIDRequestCompletedL(COMASuplLocationId* aLocationId, |
650 COMASuplLocationId* aLocationId, TInt aErrorCode) |
644 TInt aErrorCode) |
651 { |
645 { |
652 delete iLocationId; |
646 iTrace->Trace(_L("COMASuplStartState::LocationIDRequestCompleted..."), KTraceFileName, __LINE__); |
653 iLocationId = NULL; |
647 iGenerationStatus = EFalse; |
654 iLocationId = aLocationId; |
648 if(aErrorCode!=KErrNone) |
655 iTrace->Trace(_L("COMASuplStartState::LocationIDRequestCompleted..."), |
649 { |
656 KTraceFileName, __LINE__); |
650 iTrace->Trace(_L("COMASuplStartState::LocationRequestFailed"), KTraceFileName, __LINE__); |
657 iGenerationStatus = EFalse; |
651 if(iMsgStateObserver) |
658 if (aErrorCode != KErrNone) |
652 { |
659 { |
653 iMsgStateObserver->OperationCompleteL(aErrorCode); |
660 iTrace->Trace(_L("COMASuplStartState::LocationRequestFailed"), |
654 return; |
661 KTraceFileName, __LINE__); |
655 } |
662 if (iMsgStateObserver) |
656 } |
663 { |
657 |
664 iMsgStateObserver->OperationCompleteL(aErrorCode); |
658 COMASuplGSMCellInfo* cellInfo = COMASuplGSMCellInfo::NewL(); |
665 return; |
659 COMASuplLocationId::TOMASuplStatus status; |
666 } |
660 TInt err = aLocationId->SuplLocationId(cellInfo, status); |
667 } |
661 |
668 |
662 if(err == KErrNone) |
669 COMASuplGSMCellInfo* cellInfo = COMASuplGSMCellInfo::NewL(); |
663 { |
670 COMASuplLocationId::TOMASuplStatus status; |
664 TInt refMNC,refMCC,refCI,refLac; |
671 TInt err = aLocationId->SuplLocationId(cellInfo, status); |
665 cellInfo->SuplGSMCellInfo(refMNC,refMCC,refCI,refLac); |
672 |
666 |
673 if (err == KErrNone) |
667 COMASuplGSMCellInfo* cellInfoClone = COMASuplGSMCellInfo::NewL(); |
674 { |
668 cellInfoClone->SetSuplGSMCellInfo(refMNC,refMCC,refCI,refLac); |
675 TInt refMNC, refMCC, refCI, refLac; |
669 iLocationId2->SetSuplLocationId(cellInfoClone, status); |
676 cellInfo->SuplGSMCellInfo(refMNC, refMCC, refCI, refLac); |
670 |
677 |
671 iLocationId = aLocationId; |
678 COMASuplGSMCellInfo* cellInfoClone = COMASuplGSMCellInfo::NewL(); |
672 |
679 cellInfoClone->SetSuplGSMCellInfo(refMNC, refMCC, refCI, refLac); |
673 if(iECId) |
680 iLocationId2->SetSuplLocationId(cellInfoClone, status); |
674 { |
681 |
675 iTrace->Trace(_L("COMASuplStartState::LocationIDRequestCompletedL...Retrive E-CellId"), KTraceFileName, __LINE__); |
682 if (iECId) |
676 iGenerationStatus = ETrue; |
683 { |
677 iLocationIDRequestor->GetECellID(); |
684 iTrace->Trace( |
678 } |
685 _L("COMASuplStartState::LocationIDRequestCompletedL...Retrive E-CellId"), |
679 else |
686 KTraceFileName, __LINE__); |
680 { |
687 iGenerationStatus = ETrue; |
681 GetAssistceDataFromPluginL(aErrorCode); |
688 iLocationIDRequestor->GetECellID(); |
682 } |
689 } |
683 } |
690 else |
684 } |
691 { |
|
692 GetAssistceDataFromPluginL(aErrorCode); |
|
693 } |
|
694 } |
|
695 } |
|
696 |
685 |
697 // ----------------------------------------------------------------------------- |
686 // ----------------------------------------------------------------------------- |
698 // COMASuplStartState::LocationECellIdRequestCompletedL |
687 // COMASuplStartState::LocationECellIdRequestCompletedL |
699 // Gets called when E-Cell Id location request completed |
688 // Gets called when E-Cell Id location request completed |
700 // (other items were commented in a header). |
689 // (other items were commented in a header). |