void CT_LbsATAEarlyComplete::OnNotifyPositionUpdate(TInt32 aErr, const TPositionInfoBase& aPosInfo) { // Verify position. if (iState == EInitializing) { INFO_PRINTF2(_L("OnNotifyPositionUpdate, Expecting KPositionQualityLoss and got err %d."), aErr); TEST(aErr == KPositionQualityLoss); TInt testCaseId; if (GetIntFromConfig(ConfigSection(), KTestCaseId, testCaseId)) { T_LbsUtils utils; TPositionInfo networkPosInfo = ArgUtils::MolrNetworkPositionInfo(); TEST(utils.Compare_PosInfo(aPosInfo, networkPosInfo)); TEST(aPosInfo.PositionMode() == (TPositionModuleInfo::ETechnologyNetwork | TPositionModuleInfo::ETechnologyAssisted)); TEST(aPosInfo.PositionClassType() == EPositionInfoClass); TEST(aPosInfo.ModuleId() == TUid::Uid(0x10281D43)); // id of NetLocManager } iState = EGotCompleteRequestPosition; } else if (iState == EGotCompleteRequestPosition) { TEST(aErr == KPositionEarlyComplete); T_LbsUtils utils; TPositionInfo networkPosInfo = ArgUtils::MolrNetworkPositionInfo(); TEST(utils.Compare_PosInfo(aPosInfo, networkPosInfo)); TEST(aPosInfo.PositionMode() == (TPositionModuleInfo::ETechnologyNetwork | TPositionModuleInfo::ETechnologyAssisted)); TEST(aPosInfo.PositionClassType() == EPositionInfoClass); TEST(aPosInfo.ModuleId() == TUid::Uid(0x10281D43)); // id of NetLocManager iState = EDone; } else if (iState == EDone) { // not used } else { TEST(EFalse); } ReturnToTestStep(); }
void CT_LbsClientPosTp2::RequestL(TPositionInfoBase& aInfoBase) { _LIT(KService, "service"); TInt err = PerformSyncRequest(KService, &aInfoBase); if (err != KErrNone) { _LIT(KErrorRequest, "The request was not completed with KErrorNone, errCode = %d"); TBuf<100> buf; buf.Format(KErrorRequest, err); LogErrorAndLeaveL(buf); } _LIT(KIncorrectPsySyncRequestError, "TP2. Position from wrong PSY received (sync request)."); AssertTrueL(iUidMultiPsy == aInfoBase.ModuleId(), KIncorrectPsySyncRequestError); }