lbstest/lbstestproduct/lbsconflict/src/ctlbsmolrstepnewclient.cpp
changeset 0 9cfd9a3ee49c
equal deleted inserted replaced
-1:000000000000 0:9cfd9a3ee49c
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // @file ctlbsmolrstepnewclient.cpp
       
    15 // This is the class implementation for the MoLr New Client Tests
       
    16 // EPOC includes.
       
    17 // 
       
    18 //
       
    19 
       
    20 // LBS includes. 
       
    21 #include <lbs.h>
       
    22 #include <lbs/lbsnetcommon.h>
       
    23 #include <lbssatellite.h>
       
    24 #include <lbs/lbsnetprotocolbase.h>
       
    25 #include <lbs/lbsassistancedatabuilderset.h>
       
    26 #include <e32math.h>
       
    27 
       
    28 // LBS test includes.
       
    29 #include "ctlbsmolrstepnewclient.h"
       
    30 #include <lbs/test/tlbsutils.h>
       
    31 
       
    32 
       
    33 /**
       
    34 Static Constructor
       
    35 */
       
    36 CT_LbsMolrStep_NewClient* CT_LbsMolrStep_NewClient::New(CT_LbsConflictServer& aParent)
       
    37 	{
       
    38 	// Note the lack of ELeave.
       
    39 	// This means that having insufficient memory will return NULL;
       
    40 	CT_LbsMolrStep_NewClient* testStep = new CT_LbsMolrStep_NewClient(aParent);
       
    41 	if (testStep)
       
    42 		{
       
    43 		TInt err = KErrNone;
       
    44 
       
    45 		TRAP(err, testStep->ConstructL());
       
    46 		if (err)
       
    47 			{
       
    48 			delete testStep;
       
    49 			testStep = NULL;
       
    50 			}
       
    51 		}
       
    52 	return testStep;
       
    53 	}
       
    54 
       
    55 
       
    56 /**
       
    57  * Constructor
       
    58  */
       
    59 CT_LbsMolrStep_NewClient::CT_LbsMolrStep_NewClient(CT_LbsConflictServer& aParent) : CT_LbsConflictStep(aParent)
       
    60 	{
       
    61 	SetTestStepName(KLbsMolrStep_NewClient);
       
    62 	}
       
    63 
       
    64 
       
    65 void CT_LbsMolrStep_NewClient::ConstructL()
       
    66 	{
       
    67 	// Create the base class objects.
       
    68 	CT_LbsConflictStep::ConstructL();
       
    69 	
       
    70 	// Self locate async wrapper.
       
    71 	iDoPosUpdate = CT_LbsDoPosUpdate::NewL(this);
       
    72 
       
    73 	}
       
    74 
       
    75 /**
       
    76  * Destructor
       
    77  */
       
    78 CT_LbsMolrStep_NewClient::~CT_LbsMolrStep_NewClient()
       
    79 	{
       
    80 	iDoPosUpdate->Cancel();
       
    81 	delete iDoPosUpdate;
       
    82 	}
       
    83 
       
    84 
       
    85 
       
    86 /** A standard TEF test case doTestStepL, this SHOULD only support a single test case.
       
    87 	Typically the function will look much like this.
       
    88  */
       
    89 TVerdict CT_LbsMolrStep_NewClient::doTestStepL()
       
    90 	{
       
    91 	// Generic test step used to test the LBS Client Notify position update API.
       
    92 	INFO_PRINTF1(_L("&gt;&gt;CT_LbsMolrStep_NewClient::doTestStepL()"));
       
    93 
       
    94 	CLbsAdmin* lbsAdminApi = CLbsAdmin::NewL();
       
    95 	CleanupStack::PushL(lbsAdminApi);
       
    96 
       
    97 	if (TestStepResult() == EPass)
       
    98 		{		
       
    99 		// Carry out unique test actions.
       
   100 		iPosUpdateFlag = ETrue;
       
   101 		
       
   102 		if (GetIntFromConfig(ConfigSection(), KTestCaseId, iTestCaseId))
       
   103 			{
       
   104 			switch (iTestCaseId)
       
   105 				{
       
   106 				case 01:
       
   107 					{
       
   108 					CLbsAdmin::TGpsMode gpsMode = CLbsAdmin::EGpsAutonomous;
       
   109 					lbsAdminApi->Set(KLbsSettingHomeGpsMode,gpsMode);
       
   110 					}
       
   111 					break;
       
   112 				
       
   113 				case 02:
       
   114 					{
       
   115 					CLbsAdmin::TGpsMode gpsMode = CLbsAdmin::EGpsPreferTerminalBased;
       
   116 					lbsAdminApi->Set(KLbsSettingHomeGpsMode,gpsMode);
       
   117 
       
   118 					//We dont check for EClient_Got_PosUpdate_Complete event as we not sure when it will come
       
   119 					//But we do make sure that EClient_Got_PosUpdate_Complete is called appropriate number of times
       
   120 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyRegisterLcsMoLr);				// --> To Net
       
   121 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementControlLocation);		// <-- From Net
       
   122 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementReportLocation);		// --> To Net
       
   123 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyFacilityLcsMoLrResult);			// 
       
   124 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyReleaseLcsMoLr);				// --> To Net
       
   125 					}
       
   126 					break;
       
   127 				
       
   128 				case 03:
       
   129 				case 04:
       
   130 					{
       
   131 					CLbsAdmin::TGpsMode gpsMode = CLbsAdmin::EGpsPreferTerminalBased;
       
   132 					lbsAdminApi->Set(KLbsSettingHomeGpsMode,gpsMode);
       
   133 					
       
   134 					//We dont check for EClient_Got_PosUpdate_Complete event as we not sure when it will come
       
   135 					//But we do make sure that EClient_Got_PosUpdate_Complete is called appropriate number of times
       
   136 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyRegisterLcsMoLr);				// --> To Net
       
   137 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementControlLocation);		// <-- From Net
       
   138 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementReportLocation);		// --> To Net
       
   139 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyFacilityLcsMoLrResult);			// 
       
   140 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyReleaseLcsMoLr);				// --> To Net
       
   141 
       
   142 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyRegisterLcsMoLr);				// --> To Net
       
   143 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementControlLocation);		// <-- From Net
       
   144 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementReportLocation);		// --> To Net
       
   145 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyFacilityLcsMoLrResult);			// 
       
   146 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyReleaseLcsMoLr);				// --> To Net
       
   147 					}
       
   148 					break;
       
   149 
       
   150 				case 05:
       
   151 					{
       
   152 					CLbsAdmin::TGpsMode gpsMode = CLbsAdmin::EGpsPreferTerminalBased;
       
   153 					lbsAdminApi->Set(KLbsSettingHomeGpsMode,gpsMode);
       
   154 					
       
   155 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyRegisterLcsMoLr);				// --> To Net
       
   156 					//SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementControlLocation);		// <-- From Net
       
   157 					}
       
   158 					break;
       
   159 
       
   160 				case 06:
       
   161 					{
       
   162 					T_LbsUtils utils;
       
   163 					TModuleDataIn modDataIn; // Used to send test information to the test module.
       
   164 					modDataIn.iRequestType = TModuleDataIn::EModuleRequestTestMode;
       
   165 					modDataIn.iAssDataEventType = TModuleDataIn::EAssDataEventExpectSingle;
       
   166 					modDataIn.iAssDataTestMode = TModuleDataIn::EModuleTestModeAssDataOn_SomeDataNotAvailable;
       
   167 					
       
   168 					utils.NotifyModuleOfConfigChangeL(modDataIn);
       
   169 
       
   170 					//We dont check for EClient_Got_PosUpdate_Complete event as we not sure when it will come
       
   171 					//But we do make sure that EClient_Got_PosUpdate_Complete is called appropriate number of times
       
   172 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyRegisterLcsMoLr);				// --> To Net
       
   173 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementControlLocation);		// <-- From Net
       
   174 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementReportRequestMoreAssistanceData);		// --> To Net
       
   175 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementControlLocation);		// <-- From Net
       
   176 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementReportLocation);		// --> To Net
       
   177 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyFacilityLcsMoLrResult);			// 
       
   178 					SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyReleaseLcsMoLr);				// --> To Net
       
   179 					}
       
   180 					break;
       
   181 				
       
   182 				default:
       
   183 					{
       
   184 					User::Panic(KLbsMolrStep_NewClient, KErrUnknown);
       
   185 					}					
       
   186 				}
       
   187 			}
       
   188 
       
   189 		// Open and setup net sim.
       
   190 		OpenNetSim(this);
       
   191 
       
   192 		// Kick off the test abort and keep alive timers.
       
   193 		TTimeIntervalMicroSeconds32 abortInterval(KLbsAbortPeriod);
       
   194 		TTimeIntervalMicroSeconds32 keepAliveInterval(KLbsKeepAlivePeriod);
       
   195 
       
   196 		iAbortTimer->SetTimer(abortInterval);
       
   197 		iKeepAliveTimer->SetTimer(keepAliveInterval);
       
   198 
       
   199 		// Kick off test.
       
   200 		CActiveScheduler::Start();
       
   201 
       
   202 		// Verify location data.
       
   203 		VerifyPosInfos();
       
   204 
       
   205 		// Clean up.
       
   206 		CloseNetSim();
       
   207 		}
       
   208 
       
   209 	CleanupStack::PopAndDestroy(lbsAdminApi);
       
   210 
       
   211 	INFO_PRINTF1(_L("&lt;&lt;CT_LbsMolrStep_NewClient::doTestStepL()"));
       
   212 
       
   213 	return TestStepResult();
       
   214 	}
       
   215 
       
   216 
       
   217 void CT_LbsMolrStep_NewClient::VerifyPosInfos()
       
   218 	{
       
   219 	T_LbsUtils utils;
       
   220     RPointerArray<TAny>& verifyPosInfoArr = iParent.iSharedData->iVerifyPosInfoArr;
       
   221 	RPointerArray<TAny>& currPosInfoArr = iParent.iSharedData->iCurrentPosInfoArr;
       
   222 	//TPositionInfo* currPosInfo;
       
   223 	
       
   224 
       
   225 	//If we get Netsim callbacks, the first position in iCurrentPosInfoArr is reference position from Netsim
       
   226 	
       
   227 
       
   228 	if(verifyPosInfoArr.Count() == currPosInfoArr.Count())
       
   229 		{
       
   230 		TPositionInfo* verifyPosInfo;
       
   231 		TPositionInfo* currPosInfo;
       
   232 		
       
   233 		for(TInt count = 0; count < verifyPosInfoArr.Count(); count++)
       
   234 			{
       
   235 			if(iTestCaseId ==1 || iTestCaseId==5) //Autonomous mode
       
   236 				{
       
   237 				verifyPosInfo = reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[count]);
       
   238 				currPosInfo = reinterpret_cast<TPositionInfo*>(currPosInfoArr[count]);
       
   239 				if (!utils.Compare_PosInfo(*verifyPosInfo, *currPosInfo))
       
   240 					{
       
   241 					INFO_PRINTF1(_L("Failed test, Positions incorrect."));
       
   242 					SetTestStepResult(EFail);
       
   243 					}
       
   244 				}
       
   245 			else if(iTestCaseId==3 || iTestCaseId==4)
       
   246 				{
       
   247 				currPosInfo = reinterpret_cast<TPositionInfo*>(currPosInfoArr[count]);
       
   248 				TPositionInfo *refPosition = new(ELeave) TPositionInfo();
       
   249 				refPosition->SetPosition(iRefPos);
       
   250 				if (!utils.Compare_PosInfo(*refPosition, *currPosInfo))
       
   251 					{
       
   252 					INFO_PRINTF1(_L("Failed test, Positions incorrect."));
       
   253 					SetTestStepResult(EFail);
       
   254 					}
       
   255 				
       
   256 				delete refPosition;
       
   257 				}
       
   258 			else	//Preferred Terminal mode
       
   259 				{
       
   260 				if(count==0)
       
   261 					{
       
   262 					currPosInfo = reinterpret_cast<TPositionInfo*>(currPosInfoArr[count]);
       
   263 					TPositionInfo *refPosition = new(ELeave) TPositionInfo();
       
   264 					refPosition->SetPosition(iRefPos);
       
   265 					if (!utils.Compare_PosInfo(*refPosition, *currPosInfo))
       
   266 						{
       
   267 						INFO_PRINTF1(_L("Failed test, Positions incorrect."));
       
   268 						SetTestStepResult(EFail);
       
   269 						}
       
   270 					
       
   271 					delete refPosition;
       
   272 					}
       
   273 				else
       
   274 					{
       
   275 					verifyPosInfo = reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0]);
       
   276 					currPosInfo = reinterpret_cast<TPositionInfo*>(currPosInfoArr[count]);
       
   277 					if (!utils.Compare_PosInfo(*verifyPosInfo, *currPosInfo))
       
   278 						{
       
   279 						INFO_PRINTF1(_L("Failed test, Positions incorrect."));
       
   280 						SetTestStepResult(EFail);
       
   281 						}
       
   282 					}
       
   283 				}
       
   284 
       
   285 			}
       
   286 		}
       
   287 	else
       
   288 		{
       
   289 		INFO_PRINTF1(_L("Failed test, Positions incorrect."));
       
   290 		SetTestStepResult(EFail);
       
   291 		}
       
   292 	}
       
   293 
       
   294 
       
   295 
       
   296 /** NetSim callbacks given for a MoLr, which we invoke as a result of the notify position update.
       
   297 */
       
   298 void CT_LbsMolrStep_NewClient::Connected()
       
   299 	{
       
   300 	// Call base implementation.
       
   301 	CT_LbsConflictStep::Connected();
       
   302 	
       
   303 	// Kick off first pos update.
       
   304 	
       
   305 	// Create a posinfo and store in our shared array for later verification.
       
   306 	RPointerArray<TAny>& posInfoArr = iParent.iSharedData->iCurrentPosInfoArr;
       
   307 
       
   308 	T_LbsUtils utils;
       
   309 	utils.ResetAndDestroy_PosInfoArr(posInfoArr);	// Clear previous entries before new entry is appended.
       
   310 	iPosInfo1 = new(ELeave) TPositionInfo();
       
   311 	posInfoArr.Append(iPosInfo1);
       
   312 	iPosInfo2 = new(ELeave) TPositionInfo();
       
   313 	posInfoArr.Append(iPosInfo2);
       
   314 
       
   315 	// Kick off pos update.
       
   316 	iDoPosUpdate->StartL(*iPosInfo1);
       
   317 	}
       
   318 
       
   319 
       
   320 void CT_LbsMolrStep_NewClient::Disconnected()
       
   321 	{
       
   322 	// Call base implementation.
       
   323 	CT_LbsConflictStep::Disconnected();
       
   324 	}
       
   325 
       
   326 void CT_LbsMolrStep_NewClient::NotifyRegisterLcsMoLr(const TDesC& aData)
       
   327 	{
       
   328 	if (aData != KNullDesC)
       
   329 		{
       
   330 		INFO_PRINTF1(_L("Got unexpected - NetSim Notify Register Lcs MoLr - Event."));
       
   331 		SetTestStepResult(EFail);
       
   332 		}
       
   333 	else
       
   334 		INFO_PRINTF1(_L("Got - NetSim Notify Register Lcs MoLr - Callback Event."));
       
   335 
       
   336 	if(iTestCaseId==5)
       
   337 		{
       
   338 		if(!iNetSim.SetResponseError(RLbsNetSimTest::KNetSimNetworkNotAvailable, ETrue))
       
   339 			{
       
   340 			INFO_PRINTF1(_L("CT_LbsClientStep_CellBasedNotifyPosUpdate::doTestStepL() Failed: Can't set NetSim's response error."));
       
   341 			SetTestStepResult(EFail);
       
   342 			}
       
   343 		}
       
   344 	SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyRegisterLcsMoLr);
       
   345 	}
       
   346 
       
   347 
       
   348 void CT_LbsMolrStep_NewClient::NotifyReleaseLcsMoLr(TInt aReason)
       
   349 	{
       
   350 	(void)aReason;
       
   351 
       
   352 	INFO_PRINTF1(_L("Got - NetSim Notify Release Lcs MoLr - Callback Event."));
       
   353 	SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyReleaseLcsMoLr);
       
   354 
       
   355 	switch(iTestCaseId)
       
   356 		{
       
   357 		case 02:
       
   358 			{
       
   359 			// Kick off pos update.
       
   360 			iDoPosUpdate->StartL(*iPosInfo2);
       
   361 			}
       
   362 			break;
       
   363 			
       
   364 		case 03:
       
   365 			{
       
   366 			if(iPosUpdateFlag)
       
   367 				{
       
   368 				//Close the connection first
       
   369 				iDoPosUpdate->ClosePositioner();
       
   370 				
       
   371 				//Open new connection
       
   372 				iDoPosUpdate->OpenPositioner();
       
   373 				
       
   374 				// Kick off pos update.
       
   375 				iDoPosUpdate->StartL(*iPosInfo2);
       
   376 				
       
   377 				iPosUpdateFlag=EFalse;
       
   378 				}
       
   379 			else
       
   380 				iState = EWaiting;
       
   381 				
       
   382 			}
       
   383 			break;
       
   384 		
       
   385 		case 04:
       
   386 			{
       
   387 			if(iPosUpdateFlag)
       
   388 				{
       
   389 				//Close the connection first
       
   390 				iDoPosUpdate->ClosePositioner();
       
   391 				iDoPosUpdate->CloseServer();
       
   392 				
       
   393 				//Open new connection
       
   394 				iDoPosUpdate->ConnectServer();
       
   395 				iDoPosUpdate->OpenPositioner();
       
   396 			
       
   397 				// Kick off pos update.
       
   398 				iDoPosUpdate->StartL(*iPosInfo2);
       
   399 				iPosUpdateFlag=EFalse;
       
   400 				}
       
   401 			else
       
   402 				iState = EWaiting;
       
   403 			}
       
   404 			break;
       
   405 			
       
   406 		default:
       
   407 			break;
       
   408 			
       
   409 		}
       
   410 	}
       
   411 
       
   412 
       
   413 void CT_LbsMolrStep_NewClient::NotifyMeasurementControlLocation(const TPositionInfo& aPosition, 
       
   414 															  const RLbsAssistanceDataBuilderSet& aData, 
       
   415 															  const TLbsNetPosRequestQuality& aQuality)
       
   416 	{
       
   417 	(void)aPosition;
       
   418 	(void)aData;
       
   419 	(void)aQuality;
       
   420 
       
   421 	INFO_PRINTF1(_L("Got - NetSim Notify Measurement Control Location - Callback Event."));
       
   422 	
       
   423 	//if(iTestCaseId==5)
       
   424 	//	{
       
   425 	//	if(!iNetSim.SetResponseError(RLbsNetSimTest::KNetSimNetworkNotAvailable, ETrue))
       
   426 	//		{
       
   427 	//		INFO_PRINTF1(_L("CT_LbsClientStep_CellBasedNotifyPosUpdate::doTestStepL() Failed: Can't set NetSim's response error."));
       
   428 	//		SetTestStepResult(EFail);
       
   429 	//		}
       
   430 	//	}
       
   431 	SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementControlLocation);
       
   432 	}
       
   433 
       
   434 
       
   435 void CT_LbsMolrStep_NewClient::NotifyReleaseLcsLocationNotification(const CLbsNetworkProtocolBase::TLbsPrivacyResponse& aResult)
       
   436 	{
       
   437 	(void)aResult;
       
   438 
       
   439 	INFO_PRINTF1(_L("Got - NetSim Notify Release Lcs Location Notification - Callback Event."));
       
   440 	SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyReleaseLcsLocationNotification);
       
   441 	}
       
   442 
       
   443 
       
   444 void CT_LbsMolrStep_NewClient::NotifyFacilityLcsMoLrResult(TInt aReason, const TPositionInfo& aPosition)
       
   445 	{
       
   446 	(void)aReason;
       
   447 	(void)aPosition;
       
   448 
       
   449 	INFO_PRINTF1(_L("Got - NetSim Notify Facility Lcs MoLr Result - Callback Event."));
       
   450 	SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyFacilityLcsMoLrResult);
       
   451 	}
       
   452 
       
   453 
       
   454 void CT_LbsMolrStep_NewClient::NotifyMeasurementReportLocation(const TPositionInfo& aPosition)
       
   455 	{
       
   456 	(void)aPosition;
       
   457 
       
   458 	INFO_PRINTF1(_L("Got - Net Sim Notify Measurement Report - Callback Event."));
       
   459 	SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementReportLocation);
       
   460 	}
       
   461 
       
   462 
       
   463 void CT_LbsMolrStep_NewClient::NotifyMeasurementReportRequestMoreAssistanceData(const TLbsAssistanceDataGroup& aFilter)
       
   464 	{
       
   465 	(void)aFilter;
       
   466 
       
   467 	INFO_PRINTF1(_L("Got - Net Sim Notify Measurement Report Request More Assistance Data - Callback Event."));
       
   468 	SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementReportRequestMoreAssistanceData);
       
   469 	}
       
   470 
       
   471 
       
   472 void CT_LbsMolrStep_NewClient::NotifyMeasurementReportControlFailure(TInt aReason)
       
   473 	{
       
   474 	(void)aReason;
       
   475 
       
   476 	INFO_PRINTF2(_L("Got - Net Sim Notify Measurement Report Control Failure - Callback Event. Reason = %d"), aReason);
       
   477 	SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementReportControlFailure);
       
   478 	}
       
   479 
       
   480 
       
   481 /**	Notify position update callback.
       
   482 	The notify position update has completed.
       
   483 */
       
   484 void CT_LbsMolrStep_NewClient::MT_LbsDoPosUpdateCallback(TRequestStatus& aStatus)
       
   485 	{
       
   486 	INFO_PRINTF1(_L("Got - Client Notify Update Complete - Callback Event."));
       
   487 	
       
   488 
       
   489 	if(iTestCaseId==3 || iTestCaseId==4)
       
   490 		{
       
   491 		if(KErrNone != aStatus.Int())
       
   492 			{
       
   493 			INFO_PRINTF1(_L("<FONT><B>Request should have returned KErrNone</B></FONT>"));
       
   494 			SetTestStepResult(EFail);
       
   495 			}
       
   496 		return;
       
   497 		}
       
   498 
       
   499 	if(iPosUpdateFlag)
       
   500 		{
       
   501 		switch(iTestCaseId)
       
   502 			{
       
   503 			case 01:
       
   504 			case 06:
       
   505 				{
       
   506 				if(KErrNone != aStatus.Int())
       
   507 					{
       
   508 					INFO_PRINTF1(_L("aStatus is not KErrNone"));
       
   509 					SetTestStepResult(EFail);
       
   510 					}
       
   511 					
       
   512 				iDoPosUpdate->StartL(*iPosInfo2);
       
   513 				}
       
   514 				break;
       
   515 
       
   516 			case 05:
       
   517 				{
       
   518 				if(KErrTimedOut != aStatus.Int() && KErrNone != aStatus.Int())
       
   519 					{
       
   520 					INFO_PRINTF1(_L("<FONT><B>Request should have returned KErrTimedOut</B></FONT>"));
       
   521 					SetTestStepResult(EFail);	
       
   522 					}
       
   523 				else				
       
   524 					iDoPosUpdate->StartL(*iPosInfo2);
       
   525 				}
       
   526 				break;
       
   527 			
       
   528 			default:
       
   529 				{
       
   530 				if(KErrNone != aStatus.Int())
       
   531 					{
       
   532 					INFO_PRINTF1(_L("aStatus is not KErrNone"));
       
   533 					SetTestStepResult(EFail);
       
   534 					}
       
   535 				}
       
   536 				break;
       
   537 			}
       
   538 
       
   539 		iPosUpdateFlag = EFalse;
       
   540 		}
       
   541 	else
       
   542 		iState = EWaiting;
       
   543 	}