644 // COMASuplStartState::LocationIDRequestCompleted |
644 // COMASuplStartState::LocationIDRequestCompleted |
645 // Gets called when location request completed |
645 // Gets called when location request completed |
646 // (other items were commented in a header). |
646 // (other items were commented in a header). |
647 // ----------------------------------------------------------------------------- |
647 // ----------------------------------------------------------------------------- |
648 // |
648 // |
649 void COMASuplStartState::LocationIDRequestCompletedL(COMASuplLocationId* aLocationId, |
649 void COMASuplStartState::LocationIDRequestCompletedL( |
650 TInt aErrorCode) |
650 COMASuplLocationId* aLocationId, TInt aErrorCode) |
651 { |
651 { |
652 iTrace->Trace(_L("COMASuplStartState::LocationIDRequestCompleted..."), KTraceFileName, __LINE__); |
652 delete iLocationId; |
653 iGenerationStatus = EFalse; |
653 iLocationId = NULL; |
654 if(aErrorCode!=KErrNone) |
654 iLocationId = aLocationId; |
655 { |
655 iTrace->Trace(_L("COMASuplStartState::LocationIDRequestCompleted..."), |
656 iTrace->Trace(_L("COMASuplStartState::LocationRequestFailed"), KTraceFileName, __LINE__); |
656 KTraceFileName, __LINE__); |
657 if(iMsgStateObserver) |
657 iGenerationStatus = EFalse; |
658 { |
658 if (aErrorCode != KErrNone) |
659 iMsgStateObserver->OperationCompleteL(aErrorCode); |
659 { |
660 return; |
660 iTrace->Trace(_L("COMASuplStartState::LocationRequestFailed"), |
661 } |
661 KTraceFileName, __LINE__); |
662 } |
662 if (iMsgStateObserver) |
663 |
663 { |
664 COMASuplGSMCellInfo* cellInfo = COMASuplGSMCellInfo::NewL(); |
664 iMsgStateObserver->OperationCompleteL(aErrorCode); |
665 COMASuplLocationId::TOMASuplStatus status; |
665 return; |
666 TInt err = aLocationId->SuplLocationId(cellInfo, status); |
666 } |
667 |
667 } |
668 if(err == KErrNone) |
668 |
669 { |
669 COMASuplGSMCellInfo* cellInfo = COMASuplGSMCellInfo::NewL(); |
670 TInt refMNC,refMCC,refCI,refLac; |
670 COMASuplLocationId::TOMASuplStatus status; |
671 cellInfo->SuplGSMCellInfo(refMNC,refMCC,refCI,refLac); |
671 TInt err = aLocationId->SuplLocationId(cellInfo, status); |
672 |
672 |
673 COMASuplGSMCellInfo* cellInfoClone = COMASuplGSMCellInfo::NewL(); |
673 if (err == KErrNone) |
674 cellInfoClone->SetSuplGSMCellInfo(refMNC,refMCC,refCI,refLac); |
674 { |
675 iLocationId2->SetSuplLocationId(cellInfoClone, status); |
675 TInt refMNC, refMCC, refCI, refLac; |
676 |
676 cellInfo->SuplGSMCellInfo(refMNC, refMCC, refCI, refLac); |
677 iLocationId = aLocationId; |
677 |
678 |
678 COMASuplGSMCellInfo* cellInfoClone = COMASuplGSMCellInfo::NewL(); |
679 if(iECId) |
679 cellInfoClone->SetSuplGSMCellInfo(refMNC, refMCC, refCI, refLac); |
680 { |
680 iLocationId2->SetSuplLocationId(cellInfoClone, status); |
681 iTrace->Trace(_L("COMASuplStartState::LocationIDRequestCompletedL...Retrive E-CellId"), KTraceFileName, __LINE__); |
681 |
682 iGenerationStatus = ETrue; |
682 if (iECId) |
683 iLocationIDRequestor->GetECellID(); |
683 { |
684 } |
684 iTrace->Trace( |
685 else |
685 _L("COMASuplStartState::LocationIDRequestCompletedL...Retrive E-CellId"), |
686 { |
686 KTraceFileName, __LINE__); |
687 GetAssistceDataFromPluginL(aErrorCode); |
687 iGenerationStatus = ETrue; |
688 } |
688 iLocationIDRequestor->GetECellID(); |
689 } |
689 } |
690 } |
690 else |
|
691 { |
|
692 GetAssistceDataFromPluginL(aErrorCode); |
|
693 } |
|
694 } |
|
695 } |
691 |
696 |
692 // ----------------------------------------------------------------------------- |
697 // ----------------------------------------------------------------------------- |
693 // COMASuplStartState::LocationECellIdRequestCompletedL |
698 // COMASuplStartState::LocationECellIdRequestCompletedL |
694 // Gets called when E-Cell Id location request completed |
699 // Gets called when E-Cell Id location request completed |
695 // (other items were commented in a header). |
700 // (other items were commented in a header). |