lbstest/lbstestproduct/lbsconflict/src/ctlbsconflictstepselflocatex3ppush.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 ctlbsassdatastepselflocatex3ppush.cpp
       
    15 // This is the class implementation for the Module Information 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 "ctlbsconflictstepselflocatex3ppush.h"
       
    30 #include <lbs/test/tlbsutils.h>
       
    31 
       
    32 
       
    33 /**	Test case development notes
       
    34 	===========================
       
    35 
       
    36 	It was decided to aid readablity each test class shall only support a single test case.
       
    37 	This example has been produced to show how a typical conflict test case should be coded.
       
    38 
       
    39 
       
    40 	Net Sim and Sequence Events
       
    41 	---------------------------
       
    42 	Every test case implementation will use the ctlbsconflictstep class which supports Net Sim
       
    43 	interactions and a way to ensure Net Sim events and client completion events have a occured
       
    44 	in the correct order. An array is used to hold the expected sequence event values, and a second
       
    45 	array contains the actual events produced during the test. Once the test moves into the EWaiting
       
    46 	state typically after all the client requests have been made, the event arrays are compared to
       
    47 	ensure the correct events were given.
       
    48 
       
    49 	To set the expected sequence events populate the array in the SetExpectedSeq() function.
       
    50 	
       
    51 
       
    52 	Async wappers
       
    53 	-------------
       
    54 	Each Lbs client async request is wappared in a active object class, to allow a number of
       
    55 	outstanding async requests during the test. Any async calls you wish to make should also
       
    56 	be wrapped in the same way, see CT_LbsDoX3P and CT_LbsDoPosUpdate for examples.
       
    57 	These classes are constructed in the test class ConstructL, and maybe started or cancelled
       
    58 	during the test at any point.
       
    59 	
       
    60 
       
    61 	Verify Position Information
       
    62 	---------------------------
       
    63 	A test should verify each client call which expected a location to be returned. The
       
    64 	location data should be validation to ensure it's correct. See VerifyPosInfos.
       
    65 */
       
    66 
       
    67 
       
    68 /**
       
    69 Static Constructor
       
    70 */
       
    71 CT_LbsConflictStep_selflocatex3ppush* CT_LbsConflictStep_selflocatex3ppush::New(CT_LbsConflictServer& aParent)
       
    72 	{
       
    73 	// Note the lack of ELeave.
       
    74 	// This means that having insufficient memory will return NULL;
       
    75 	CT_LbsConflictStep_selflocatex3ppush* testStep = new CT_LbsConflictStep_selflocatex3ppush(aParent);
       
    76 	if (testStep)
       
    77 		{
       
    78 		TInt err = KErrNone;
       
    79 
       
    80 		TRAP(err, testStep->ConstructL());
       
    81 		if (err)
       
    82 			{
       
    83 			delete testStep;
       
    84 			testStep = NULL;
       
    85 			}
       
    86 		}
       
    87 	return testStep;
       
    88 	}
       
    89 
       
    90 
       
    91 /**
       
    92  * Constructor
       
    93  */
       
    94 CT_LbsConflictStep_selflocatex3ppush::CT_LbsConflictStep_selflocatex3ppush(CT_LbsConflictServer& aParent) : CT_LbsConflictStep(aParent)
       
    95 	{
       
    96 	SetTestStepName(KLbsConflictStepselflocatex3ppush);
       
    97 	}
       
    98 
       
    99 
       
   100 void CT_LbsConflictStep_selflocatex3ppush::ConstructL()
       
   101 	{
       
   102 	// Create the base class objects.
       
   103 	CT_LbsConflictStep::ConstructL();
       
   104 	
       
   105 	// Self locate async wrapper.
       
   106 	iDoPosUpdate = CT_LbsDoPosUpdate::NewL(this);
       
   107 
       
   108 	// X3P async wrapper.
       
   109 	iDoX3P = CT_LbsDoX3P::NewL(this);
       
   110 	}
       
   111 
       
   112 
       
   113 /**
       
   114  * Destructor
       
   115  */
       
   116 CT_LbsConflictStep_selflocatex3ppush::~CT_LbsConflictStep_selflocatex3ppush()
       
   117 	{
       
   118 	iDoPosUpdate->Cancel();
       
   119 	delete iDoPosUpdate;
       
   120 
       
   121 	iDoX3P->Cancel();
       
   122 	delete iDoX3P;
       
   123 	}
       
   124 
       
   125 
       
   126 /** Called at the start of the test...
       
   127 
       
   128 	Each test case MUST implement this.
       
   129 
       
   130 	The table below describes the expcted order that the callbacks should be called
       
   131 	during the test.
       
   132 	
       
   133 	Note that the tests deliberateley do NOT check the order that the client requests
       
   134 	are completed. This is because the delivery order is not guaranteed by LBS.
       
   135 	The tests will check that all client requests are completed with the correct error
       
   136 	code and position at the end of the test.
       
   137 */
       
   138 void CT_LbsConflictStep_selflocatex3ppush::SetExpectedSeq()
       
   139 	{
       
   140 	// Self locate MOLR (iState = ERegPosUpdate)
       
   141 	SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyRegisterLcsMoLr);				// --> To Net
       
   142 	SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyReleaseLcsMoLr);				// --> To Net
       
   143 	
       
   144 	// followed by a X3P MOLR (after X3P register iState = ERegX3P),
       
   145 	SetVerifySeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyRegisterLcsMoLr);				// --> To Net	
       
   146 	SetVerifySeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyMeasurementControlLocation);	// <-- From Net
       
   147 	SetVerifySeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyMeasurementReportLocation);	// --> To Net
       
   148 	SetVerifySeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyFacilityLcsMoLrResult);
       
   149 
       
   150 	SetVerifySeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyReleaseLcsMoLr);				// --> To Net
       
   151 
       
   152 	// (after X3P release iState = EWaiting).
       
   153 
       
   154 	SetVerifyAdhocEvent(EClient_Got_PosUpdate_Complete);
       
   155 	SetVerifyAdhocEvent(EClient_Got_X3P_Complete);
       
   156 
       
   157 	}
       
   158 
       
   159 
       
   160 
       
   161 /** Called at the end of the test to verify the correct position data has been returned to the
       
   162 	client.
       
   163 	
       
   164 	Each test case SHOULD implement a version of this.
       
   165 */
       
   166 void CT_LbsConflictStep_selflocatex3ppush::VerifyPosInfos()
       
   167 	{
       
   168 	T_LbsUtils utils;
       
   169     RPointerArray<TAny>& verifyPosInfoArr = iParent.iSharedData->iVerifyPosInfoArr;
       
   170 	RPointerArray<TAny>& currPosInfoArr = iParent.iSharedData->iCurrentPosInfoArr;
       
   171 	TPositionInfo* currPosInfo;
       
   172 
       
   173    	// Verify both the self locate and X3P MOLR position information.
       
   174 	
       
   175 	// Actually, Don't bother with the self locate for now - it's not been set anyway
       
   176 
       
   177 	// Verify entry 1 for the X3P. We expect a real location value, compare using the data
       
   178 	// sent to the test APGS module.
       
   179 	TPositionInfo* verifyPosInfo = reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0]);
       
   180 	currPosInfo = reinterpret_cast<TPositionInfo*>(currPosInfoArr[1]);
       
   181 	if (!utils.Compare_PosInfo(*verifyPosInfo, *currPosInfo))
       
   182 		{
       
   183 		INFO_PRINTF1(_L("Failed test, X3P position incorrect."));
       
   184 		SetTestStepResult(EFail);
       
   185 		}
       
   186 	}
       
   187 
       
   188 
       
   189 /** A standard TEF test case doTestStepL, this SHOULD only support a single test case.
       
   190 
       
   191 	Typically the function will look much like this.
       
   192  */
       
   193 TVerdict CT_LbsConflictStep_selflocatex3ppush::doTestStepL()
       
   194 	{
       
   195 	// Generic test step used to test the LBS Client Notify position update API.
       
   196 	INFO_PRINTF1(_L("&gt;&gt;CT_LbsConflictStep_selflocatex3ppush::doTestStepL()"));
       
   197 
       
   198 	if (TestStepResult() == EPass)
       
   199 		{		
       
   200 		// Setup the expected sequence events for the test.
       
   201 		SetExpectedSeq();
       
   202 				
       
   203 		// Open and setup net sim.
       
   204 		OpenNetSim(this);
       
   205 
       
   206 		// Kick off the test abort and keep alive timers.
       
   207 		TTimeIntervalMicroSeconds32 abortInterval(KLbsAbortPeriod);
       
   208 		TTimeIntervalMicroSeconds32 keepAliveInterval(KLbsKeepAlivePeriod);
       
   209 
       
   210 		iKeepAliveTimer->SetTimer(keepAliveInterval);
       
   211 
       
   212 		// Set up test module so there's a delay in responding to request for fix:
       
   213 		TModuleDataIn modDataInTimeout; // Used to send test information to the test module.
       
   214 		const TInt KLbsTestModuleTimeOut = 3000000;	// 3 sec delay
       
   215 		// The module request type - time out value.
       
   216 		modDataInTimeout.iRequestType = TModuleDataIn::EModuleRequestTimeOut;
       
   217 		// Micro seconds time value to delay the return position update from the module.
       
   218 		modDataInTimeout.iTimeOut = KLbsTestModuleTimeOut;
       
   219 		T_LbsUtils utils;
       
   220 		utils.NotifyModuleOfConfigChangeL(modDataInTimeout);
       
   221 		
       
   222 		// Kick off test.
       
   223 		CActiveScheduler::Start();
       
   224 
       
   225 		// Verify location data.
       
   226 		VerifyPosInfos();
       
   227 
       
   228 		// Clean up.
       
   229 		CloseNetSim();
       
   230 		}
       
   231 
       
   232 	INFO_PRINTF1(_L("&lt;&lt;CT_LbsConflictStep_selflocatex3ppush::doTestStepL()"));
       
   233 
       
   234 	return TestStepResult();
       
   235 	}
       
   236 
       
   237 
       
   238 /** NetSim callbacks given for a MoLr, which we invoke as a result of the notify position update.
       
   239 */
       
   240 void CT_LbsConflictStep_selflocatex3ppush::Connected()
       
   241 	{
       
   242 	// Call base implementation.
       
   243 	CT_LbsConflictStep::Connected();
       
   244 	
       
   245 	// Kick off first pos update.
       
   246 	
       
   247 	// Create a posinfo and store in our shared array for later verification.
       
   248 	RPointerArray<TAny>& posInfoArr = iParent.iSharedData->iCurrentPosInfoArr;
       
   249 	TPositionInfo* posInfo = new(ELeave) TPositionInfo();
       
   250 
       
   251 	T_LbsUtils utils;
       
   252 	utils.ResetAndDestroy_PosInfoArr(posInfoArr);	// Clear previous entries before new entry is appended.
       
   253 
       
   254 	posInfoArr.Append(posInfo);
       
   255 
       
   256 	// Kick off pos update.
       
   257 	TInt testCaseId;
       
   258 	if (GetIntFromConfig(ConfigSection(), KTestCaseId, testCaseId))
       
   259 		{
       
   260 			switch (testCaseId)
       
   261 			{
       
   262 			// Test case LBS-UpdateOptions-001
       
   263 			case 7:
       
   264 				{
       
   265 				TPositionUpdateOptions optsA;
       
   266 				TTimeIntervalMicroSeconds interval = 30 * 1000000; // tracking!
       
   267 
       
   268 				optsA.SetUpdateInterval(interval);
       
   269 				iDoPosUpdate->SetOptions(optsA);
       
   270 				break;
       
   271 				}
       
   272 				
       
   273 			}
       
   274 		}
       
   275 			
       
   276 	iDoPosUpdate->StartL(*posInfo);
       
   277 	iState = EReqPosUpdate;
       
   278 	}
       
   279 
       
   280 
       
   281 void CT_LbsConflictStep_selflocatex3ppush::Disconnected()
       
   282 	{
       
   283 	// Call base implementation.
       
   284 	CT_LbsConflictStep::Disconnected();
       
   285 	}
       
   286 
       
   287 
       
   288 void CT_LbsConflictStep_selflocatex3ppush::NotifyRegisterLcsMoLr(const TDesC& aData)
       
   289 	{
       
   290 	// Determine and record the sequence event. A blank aData indicates a self locate
       
   291 	// MOLR, otherwise we have a X3P MOLR. Also the current test state indicates which
       
   292 	// type MOLR is being carried out.
       
   293 	
       
   294 	if (aData != KNullDesC)
       
   295 		{
       
   296 		INFO_PRINTF1(_L("Got - X3P MOLR - NetSim Notify Register Lcs MoLr - Event."));
       
   297 		SetCurrentSeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyRegisterLcsMoLr);
       
   298 				
       
   299 		// Verify telephone number.
       
   300 		if (aData.Compare(KTransmitPushDestination))
       
   301 			{
       
   302 			INFO_PRINTF1(_L("Failed test, bad X3P register data."));
       
   303 			SetTestStepResult(EFail);
       
   304 			}
       
   305 		// Mark as started now it has, to ensure the self MOLR are not recorded incorrectly.
       
   306 		iState = EReqX3P;
       
   307 		
       
   308 		}
       
   309 
       
   310 	else if ((aData == KNullDesC) && (iState == EReqPosUpdate))
       
   311 		{
       
   312 		INFO_PRINTF1(_L("Got - Self MOLR - NetSim Notify Register Lcs MoLr - Event."));
       
   313 		SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyRegisterLcsMoLr);
       
   314 		}
       
   315 	
       
   316 	// Start the X3P
       
   317 	if (iState == EReqPosUpdate)
       
   318 		{
       
   319 		// Create a posinfo and store in our shared array for later verification
       
   320 		RPointerArray<TAny>& posInfoArr = iParent.iSharedData->iCurrentPosInfoArr;
       
   321 		TPositionInfo* posInfo = new(ELeave) TPositionInfo();
       
   322 	
       
   323 		posInfoArr.Append(posInfo);
       
   324 
       
   325 		// Start X3P.
       
   326 		TLbsTransmitPositionOptions transOpts;
       
   327 		
       
   328 		INFO_PRINTF1(_L("Starting X3P"));
       
   329 		iDoX3P->SetOptions(transOpts);	// Set timeout value to 0, to disable the timeout.
       
   330 		iDoX3P->StartL(KTransmitPushDestination, KTransmitPushPriority, *posInfo);
       
   331 		}
       
   332 	}
       
   333 
       
   334 
       
   335 void CT_LbsConflictStep_selflocatex3ppush::NotifyReleaseLcsMoLr(TInt aReason)
       
   336 	{
       
   337 	TInt expectedErr = KErrNone;
       
   338 
       
   339 	// Determine and set sequence event.
       
   340 	if (iState == EReqPosUpdate)
       
   341 		{
       
   342 		INFO_PRINTF1(_L("Got - Self MOLR - NetSim Notify Release Lcs MoLr - Event."));
       
   343 		SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyReleaseLcsMoLr);
       
   344 		
       
   345 		expectedErr = KErrPositionHighPriorityReceive;
       
   346 		}
       
   347 		
       
   348 	else if(iState == EReqX3P)
       
   349 		{
       
   350 		INFO_PRINTF1(_L("Got - X3P MOLR - NetSim Notify Release Lcs MoLr - Event."));
       
   351 		SetCurrentSeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyReleaseLcsMoLr);
       
   352 
       
   353 		iState = EWaiting; // End of test.
       
   354 		}
       
   355 	
       
   356 	// Verify reason code.
       
   357 	if (aReason != expectedErr)
       
   358 		{	
       
   359 		INFO_PRINTF2(_L("Failed test, bad release reason %d."), aReason);
       
   360 		SetTestStepResult(EFail);
       
   361 		}
       
   362 	}
       
   363 
       
   364 
       
   365 void CT_LbsConflictStep_selflocatex3ppush::NotifyMeasurementControlLocation(const TPositionInfo& aPosition, 
       
   366 															  const RLbsAssistanceDataBuilderSet& aData, 
       
   367 															  const TLbsNetPosRequestQuality& aQuality)
       
   368 	{
       
   369 	T_LbsUtils utils;	
       
   370 	TInt err;
       
   371 	
       
   372 	// Determine and record sequence event.
       
   373 	if (iState == EReqPosUpdate)
       
   374 		{
       
   375 		INFO_PRINTF1(_L("Got - Self MOLR - NetSim Notify Measurement Control Location - Event."));
       
   376 		// cannot record this event since it may/maynot occur depending on timing but ...
       
   377 		//		SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementControlLocation);
       
   378 		// ... if we do get one of these, we must get a failure message so add that to adhoc list
       
   379 		SetVerifyAdhocEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementReportControlFailure);
       
   380 		}
       
   381 		
       
   382 	else if(iState == EReqX3P)
       
   383 		{
       
   384 		INFO_PRINTF1(_L("Got - X3P MOLR - NetSim Notify Measurement Control Location - Event."));
       
   385 		SetCurrentSeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyMeasurementControlLocation);
       
   386 		}
       
   387 
       
   388 	// Verify the reference position.
       
   389 	TPositionInfo verifyRefPosInfo;
       
   390 	
       
   391 	verifyRefPosInfo.SetPosition(iRefPos);
       
   392 	if (!utils.Compare_PosInfo(verifyRefPosInfo, aPosition))
       
   393 		{
       
   394 		INFO_PRINTF1(_L("Failed test, position incorrect."));
       
   395 		SetTestStepResult(EFail);
       
   396 		}
       
   397 
       
   398    
       
   399     // Verify the assistance data.	
       
   400 	RLbsAssistanceDataBuilderSet& data = const_cast<RLbsAssistanceDataBuilderSet&>(aData);
       
   401 	RUEPositioningGpsReferenceTimeBuilder* refTimeBuilder = NULL;
       
   402 	
       
   403 	data.GetDataBuilder(refTimeBuilder);
       
   404 
       
   405 	// Create a reader from the builder's data to allow us to verify the actual
       
   406 	// assistance data.
       
   407 	RUEPositioningGpsReferenceTimeReader refTimeReader;
       
   408 		
       
   409 	TRAP(err, refTimeReader.OpenL());
       
   410 	if (err == KErrNone)
       
   411 		{
       
   412 		refTimeReader.DataBuffer() = refTimeBuilder->DataBuffer();
       
   413 		
       
   414 		if (!utils.VerifySimpleAssistanceData(refTimeReader))
       
   415 			{
       
   416 			INFO_PRINTF1(_L("Failed test, assistance data incorrect."));
       
   417 			SetTestStepResult(EFail);
       
   418 			}
       
   419 		refTimeReader.Close();
       
   420 		}
       
   421 			
       
   422 	else
       
   423 		{
       
   424 		INFO_PRINTF2(_L("Failed test, assistance data reader err %d."), err);
       
   425 		SetTestStepResult(EFail);
       
   426 		}
       
   427 
       
   428 
       
   429 	// TODO: Check if we can verify aQuality in any way.
       
   430 	(void)aQuality;
       
   431 	}
       
   432 
       
   433 
       
   434 void CT_LbsConflictStep_selflocatex3ppush::NotifyReleaseLcsLocationNotification(const CLbsNetworkProtocolBase::TLbsPrivacyResponse& aResult)
       
   435 	{
       
   436 	(void)aResult;
       
   437 
       
   438 	// Unexpected callback for this test log the sequence event to fail test.
       
   439 	if (iState == EReqPosUpdate)
       
   440 		{
       
   441 		INFO_PRINTF1(_L("Got - Self MOLR - NetSim Notify Release Lcs Location Notification - Event."));
       
   442 		SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyReleaseLcsLocationNotification);
       
   443 		}
       
   444 		
       
   445 	else
       
   446 		{
       
   447 		INFO_PRINTF1(_L("Got - X3P MOLR - NetSim Notify Release Lcs Location Notification - Event."));
       
   448 		SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyReleaseLcsLocationNotification);
       
   449 		}
       
   450 	}
       
   451 
       
   452 
       
   453 void CT_LbsConflictStep_selflocatex3ppush::NotifyFacilityLcsMoLrResult(TInt aReason, const TPositionInfo& aPosition)
       
   454 	{
       
   455 	// Determine and record sequence event.
       
   456 	if (iState == EReqPosUpdate)
       
   457 		{
       
   458 		INFO_PRINTF1(_L("Got - Self MOLR - NetSim Notify Facility Lcs MoLr Result - Event."));
       
   459 		SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyFacilityLcsMoLrResult);
       
   460 		}
       
   461 		
       
   462 	else
       
   463 		{
       
   464 		INFO_PRINTF1(_L("Got - X3P MOLR - NetSim Notify Facility Lcs MoLr Result - Event."));
       
   465 		SetCurrentSeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyFacilityLcsMoLrResult);
       
   466 		}
       
   467 
       
   468 	// Verify reason code..	
       
   469 	if (aReason != KErrNone)
       
   470 		{	
       
   471 		INFO_PRINTF2(_L("Failed test, bad release reason %d."), aReason);
       
   472 		SetTestStepResult(EFail);
       
   473 		}
       
   474 
       
   475 	// Verify the real position returned from the network, this will be the same position
       
   476 	// we sent to the network as the result of the MO-LR, thus use the entry given by
       
   477 	// the test module.
       
   478 	T_LbsUtils utils;
       
   479 	RPointerArray<TAny>& verifyPosInfoArr = iParent.iSharedData->iVerifyPosInfoArr;
       
   480 	TPositionInfo* verifyRealPosInfo = reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0]);
       
   481 	
       
   482 	if (!utils.Compare_PosInfo(*verifyRealPosInfo, aPosition))
       
   483 		{
       
   484 		INFO_PRINTF1(_L("Failed test, position incorrect."));
       
   485 		SetTestStepResult(EFail);
       
   486 	    } 
       
   487 	}
       
   488 
       
   489 
       
   490 void CT_LbsConflictStep_selflocatex3ppush::NotifyMeasurementReportLocation(const TPositionInfo& aPosition)
       
   491 	{	
       
   492 	// Determine and record sequence event.
       
   493 	if (iState == EReqPosUpdate)
       
   494 		{
       
   495 		INFO_PRINTF1(_L("Got - Self MOLR - NetSim Notify Measurement Report - Event."));
       
   496 		SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementReportLocation);
       
   497 		}
       
   498 		
       
   499 	else if(iState == EReqX3P)
       
   500 		{
       
   501 		INFO_PRINTF1(_L("Got - X3P MOLR - NetSim Notify Measurement Report - Event."));
       
   502 		SetCurrentSeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyMeasurementReportLocation);
       
   503 		}
       
   504 
       
   505 		
       
   506 	// Verify the real position given to the network, this will be the same position
       
   507 	// returned as the result of the MO-LR, thus use the entry given by
       
   508 	// the test module.	
       
   509 	T_LbsUtils utils;
       
   510     RPointerArray<TAny>& verifyPosInfoArr = iParent.iSharedData->iVerifyPosInfoArr;
       
   511 	TPositionInfo* verifyRealPosInfo = reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0]);
       
   512 	
       
   513 	if (!utils.Compare_PosInfo(*verifyRealPosInfo, aPosition))
       
   514 		{
       
   515 		INFO_PRINTF1(_L("Failed test, position incorrect."));
       
   516 		SetTestStepResult(EFail);
       
   517 		} 
       
   518     }
       
   519 
       
   520 
       
   521 void CT_LbsConflictStep_selflocatex3ppush::NotifyMeasurementReportRequestMoreAssistanceData(const TLbsAssistanceDataGroup& aFilter)
       
   522 	{
       
   523 	(void)aFilter;
       
   524 
       
   525 	// Unexpected callback for this test, record the sequence event to fail test.
       
   526 	if (iState == EReqPosUpdate)
       
   527 		{
       
   528 		INFO_PRINTF1(_L("Got - Self MOLR - NetSim Notify Measurement Report Request More Assistance Data - Event."));
       
   529 		SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementReportRequestMoreAssistanceData);
       
   530 		}
       
   531 		
       
   532 	else
       
   533 		{
       
   534 		INFO_PRINTF1(_L("Got - X3P(PUSH) MOLR - NetSim Notify Measurement Report Request More Assistance Data - Event."));
       
   535 		SetCurrentSeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyMeasurementReportRequestMoreAssistanceData);
       
   536 		}
       
   537 	}
       
   538 
       
   539 
       
   540 void CT_LbsConflictStep_selflocatex3ppush::NotifyMeasurementReportControlFailure(TInt aReason)
       
   541 	{
       
   542 	// Unexpected callback for this test, record the sequence event to fail test.
       
   543 	if (iState == EReqPosUpdate)
       
   544 		{
       
   545 		INFO_PRINTF2(_L("Got - Self MOLR - Net Sim Notify Measurement Report Control Failure - Event. Reason = %d"), aReason);
       
   546 		SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementReportControlFailure);
       
   547 		if(aReason != KErrPositionHighPriorityReceive)
       
   548 			{
       
   549 			SetTestStepResult(EFail);
       
   550 			}
       
   551 		}
       
   552 		
       
   553 	else
       
   554 		{
       
   555 		INFO_PRINTF2(_L("Got - X3P MOLR(PUSH) - Net Sim Notify Measurement Report Control Failure - Event. Reason = %d"), aReason);
       
   556 		SetCurrentSeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyMeasurementReportControlFailure);
       
   557 		}
       
   558 	}
       
   559 
       
   560 
       
   561 /**	Notify position update callback.
       
   562 
       
   563 	The notify position update has completed.
       
   564 */
       
   565 void CT_LbsConflictStep_selflocatex3ppush::MT_LbsDoPosUpdateCallback(TRequestStatus& aStatus)
       
   566 	{
       
   567 	INFO_PRINTF1(_L("Got - Client Notify Update Complete - Callback Event."));
       
   568 	SetCurrentSeqEvent(EClient_Got_PosUpdate_Complete);
       
   569 
       
   570 	// Expect the self locate MOLR to be stopped because of the X3P
       
   571 	if (KErrPositionHighPriorityReceive != aStatus.Int())
       
   572 		{
       
   573 		INFO_PRINTF2(_L("Failed test, pos info request err = %d."), aStatus.Int());
       
   574 		SetTestStepResult(EFail);
       
   575 		}
       
   576 	else
       
   577 		{
       
   578 		INFO_PRINTF2(_L("Got KErrPositionHighPriorityReceive err = %d."), aStatus.Int());
       
   579 		}
       
   580    	}	
       
   581 
       
   582 
       
   583 /** X3P transmit callback.
       
   584 
       
   585 	The X3P transmit request has completed.
       
   586 */	
       
   587 void CT_LbsConflictStep_selflocatex3ppush::MT_LbsDoX3PCallback(TInt aTransmitId, TRequestStatus& aStatus)
       
   588 	{
       
   589 	(void)aTransmitId;
       
   590 
       
   591 	INFO_PRINTF1(_L("Got - Client X3P Complete - Callback Event."));
       
   592 	SetCurrentSeqEvent(EClient_Got_X3P_Complete);
       
   593 	
       
   594 	if (KErrNone != aStatus.Int())
       
   595 		{
       
   596 		INFO_PRINTF2(_L("Failed test, X3P transmit request err = %d."), aStatus.Int());
       
   597 		SetTestStepResult(EFail);
       
   598 		}
       
   599 		else
       
   600 		{
       
   601 		INFO_PRINTF2(_L("Got KErrNone err = %d."), aStatus.Int());
       
   602 		}
       
   603 	}
       
   604 		
       
   605