lbstest/lbstestproduct/lbshybridmultiple/src/ctlbshybridmultipletest.cpp
changeset 0 9cfd9a3ee49c
child 57 3267d9ea3e98
equal deleted inserted replaced
-1:000000000000 0:9cfd9a3ee49c
       
     1 // Copyright (c) 2007-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 // Runs the actual multiple test step
       
    15 //
       
    16 
       
    17 // LBS includes. 
       
    18 #include <lbs/lbsnetprotocolbase.h>
       
    19 #include <lbs/lbsassistancedatabuilderset.h>
       
    20 
       
    21 // LBS test includes.
       
    22 #include "ctlbshybridmultipletest.h"
       
    23 #include <lbs/test/tlbsutils.h>
       
    24 #include "argutils.h"
       
    25 #include <lbs/test/activeyield.h>
       
    26 
       
    27 
       
    28 /**
       
    29 Static Constructor
       
    30 */
       
    31 CT_LbsHybridMultipleTest* CT_LbsHybridMultipleTest::New(CT_LbsHybridMultipleServer& aParent)
       
    32 	{
       
    33 	// Note that we do not use ELeave.
       
    34 	// This means that having insufficient memory will return NULL;
       
    35 	CT_LbsHybridMultipleTest* testStep = new CT_LbsHybridMultipleTest(aParent);
       
    36 	if (testStep)
       
    37 		{
       
    38 		TInt err = KErrNone;
       
    39 
       
    40 		TRAP(err, testStep->ConstructL());
       
    41 		if (err)
       
    42 			{
       
    43 			delete testStep;
       
    44 			testStep = NULL;
       
    45 			}
       
    46 		}
       
    47 	return testStep;
       
    48 	}
       
    49 
       
    50 
       
    51 /**
       
    52  * Constructor
       
    53  */
       
    54 CT_LbsHybridMultipleTest::CT_LbsHybridMultipleTest(CT_LbsHybridMultipleServer& aParent) : CT_LbsHybridMultipleStep(aParent),
       
    55 iCheckForNewSequencesToStart(ETrue)
       
    56 	{
       
    57 	SetTestStepName(KLbsHybridMultipleTest);
       
    58 	}
       
    59 
       
    60 
       
    61 void CT_LbsHybridMultipleTest::ConstructL()
       
    62 	{
       
    63 	// Create the base class objects.
       
    64 	CT_LbsHybridMultipleStep::ConstructL();
       
    65 	iController = CLbsPrivacyController::NewL(*this);
       
    66 	iCheckNewSequenceIdle = CIdle::NewL(CActive::EPriorityStandard);
       
    67 	}
       
    68 
       
    69 /**
       
    70  * Destructor
       
    71  */
       
    72 CT_LbsHybridMultipleTest::~CT_LbsHybridMultipleTest()
       
    73 	{
       
    74 	if(iCheckNewSequenceIdle)
       
    75 		{
       
    76 		iCheckNewSequenceIdle->Cancel();
       
    77 		delete iCheckNewSequenceIdle;
       
    78 		}
       
    79 	delete iController;
       
    80 	}
       
    81 
       
    82 /** Actual test step, which starts the test on the first sequence
       
    83  */
       
    84 TVerdict CT_LbsHybridMultipleTest::doTestStepL()
       
    85 	{
       
    86 	INFO_PRINTF1(_L(""));
       
    87 	INFO_PRINTF1(_L("---------------------------------- Starting Test ----------------------------------"));
       
    88 	
       
    89 	//Start off the master sequence; sequence 0
       
    90 	iActiveSequences = 1;
       
    91 	iSequences[0]->SignalCallbackIdleStart();
       
    92 	//This will cause the sequence to start its session; sending and receiving messages to LBS.  The other
       
    93 	// sequences should start as this sequence progresses.
       
    94 
       
    95 	//Wait for the test to complete.  When all the sequences have finished, the active scheduler will
       
    96 	// be stopped (from StopTest()) causing this test to complete.
       
    97 	CActiveScheduler::Start();
       
    98 	
       
    99 	return TestStepResult();
       
   100 	}
       
   101 
       
   102 /** Stops the active scheduler causing the test to finish
       
   103  * 
       
   104  * @param aError If less than KErrNone, it will set the test step result to fail
       
   105  */
       
   106 void CT_LbsHybridMultipleTest::StopTest(TInt aError)
       
   107 	{
       
   108 	//Check to see if we are ending the test in error
       
   109 	if(aError < 0)
       
   110 		{		
       
   111 		//Fail the test step
       
   112 		SetTestStepResult(EFail);
       
   113 		}
       
   114 	
       
   115 	CActiveScheduler::Stop();
       
   116 	}
       
   117 
       
   118 /** Finds out which sequence relates to the session ID and checks that the received message was expected
       
   119  * 
       
   120  * @param aSessionId Session ID that was past into the message
       
   121  * @param aMessageType ID of the message that was received by the PM
       
   122  * 
       
   123  * @return The ID of the sequence that this message relates to, or KErrNotFound
       
   124  */
       
   125 TInt CT_LbsHybridMultipleTest::WasMessageExpectedSessionId(TInt aSessionId, TNetProtocolResponseType aMessageType)
       
   126 	{	
       
   127 	//Loop through all the sequences
       
   128 	for(TInt i=0; i<iSequences.Count(); ++i)
       
   129 		{
       
   130 		//Get the session id and the current sequence action
       
   131 		TLbsNetSessionId sessionId = iSequences[i]->GetSessionId();
       
   132 		TInt currentAction = iSequences[i]->GetCurrentAction();
       
   133 		
       
   134 		//Check the session ID of any sequence that is currently active with the session id past in
       
   135 		if((sessionId.SessionNum() == aSessionId) && (currentAction != KErrArgument))
       
   136 			{
       
   137 			//Found the sequence with the requested session id, now check if the message type was expected
       
   138 			if(currentAction == aMessageType)
       
   139 				{
       
   140 				//Message type was found, return sequence number
       
   141 				return i;
       
   142 				}
       
   143 			else
       
   144 				{
       
   145 				//Message not expected by this sequence
       
   146 				INFO_PRINTF3(_L("Error - Received unexpected message %d for session Id: %d"), aMessageType, aSessionId);
       
   147 				INFO_PRINTF3(_L(" -> On Sequence: %d, at position: %d"), i , iSequences[i]->GetCurrentPosition());
       
   148 				return KErrNotFound;
       
   149 				}
       
   150 			}
       
   151 		}
       
   152 	
       
   153 	//Error, session ID not found in any sequence
       
   154 	INFO_PRINTF3(_L("Error - Received unexpected session Id (%d) for message: %d"), aSessionId, aMessageType);
       
   155 	
       
   156 	return KErrNotFound;
       
   157 	}
       
   158 
       
   159 
       
   160 /** Finds out whether any of the sequences (using aPmId) expected the following message
       
   161  * 
       
   162  * @param aPmId ID of the PM that the message was received on (on sequences related to this id are checked)
       
   163  * @param aMessageType ID of the message that was received by the PM
       
   164  * 
       
   165  * @return The ID of the sequence that this message relates to, or KErrNotFound
       
   166  */
       
   167 TInt CT_LbsHybridMultipleTest::WasMessageExpectedPmId(TInt aPmId, TNetProtocolResponseType aMessageType)
       
   168 	{
       
   169 	//Loop through all sequences
       
   170 	for(TInt i=0; i<iSequences.Count(); ++i)
       
   171 		{
       
   172 		//Check to see whether any sequences the are using PM ID, aPmId, are expecting this message
       
   173 		if((iSequences[i]->GetPmId() == aPmId) && (iSequences[i]->GetCurrentAction() == aMessageType))
       
   174 			{
       
   175 			//Return the sequenceId
       
   176 			return i;
       
   177 			}
       
   178 		}
       
   179 	
       
   180 	//Error, message was not found in any of the sequences
       
   181 	INFO_PRINTF2(_L("Was not expecting message %d in any sequence"), aMessageType);
       
   182 	return KErrNotFound;
       
   183 	}
       
   184 
       
   185 /* Called when one of the stub PM's receives a message from the NG
       
   186  * 
       
   187  * @param aPmId The ID of the PM that received this message
       
   188  * @param aMessageType The ID of the message type received from the PM
       
   189  */
       
   190 void CT_LbsHybridMultipleTest::OnHandleNGMessage(TUint aPmId, TInt aMessageType)
       
   191 	{
       
   192 	//Get the correct proxy
       
   193 	CLbsTestNgMessageHandler* proxy = LookupProtocolModuleProxy(aPmId);
       
   194 	if (!proxy)
       
   195 	    {
       
   196         INFO_PRINTF2(_L("ERROR: No NG proxy setup for PM%d"), aPmId);
       
   197 	    User::Leave(KErrNotFound);
       
   198 	    }
       
   199 	
       
   200 	TInt cleanupCnt;
       
   201 	TInt sequenceId = KErrNotFound;
       
   202 	
       
   203 	//For each of the different message types, find out whether the message type was expected by the
       
   204 	// sequence (if a session Id is sent with the message) or by any sequence (if the session Id is not
       
   205 	// present).  Then confirm the message parameters are expected and then move the correct sequence
       
   206 	// onto the next message.
       
   207 	switch(aMessageType)
       
   208 		{	
       
   209 		// >> AdviceSystemStatus() [2009]
       
   210 		case ENetMsgGetCurrentCapabilitiesResponse:
       
   211 			{
       
   212 			sequenceId = WasMessageExpectedPmId(aPmId, ENetMsgGetCurrentCapabilitiesResponse);
       
   213 			INFO_PRINTF2(_L("-> AdviceSystemStatus() [2009] Sq: %d"), sequenceId);
       
   214 			
       
   215 			if(sequenceId != KErrNotFound)
       
   216 				{
       
   217 				CLbsNetworkProtocolBase::TLbsSystemStatus status;
       
   218 				cleanupCnt = proxy->ProtocolProxy()->GetArgsLC(ENetMsgGetCurrentCapabilitiesResponse, &status);
       
   219 				TESTL(status == CLbsNetworkProtocolBase::ESystemStatusNone);
       
   220 				CleanupStack::PopAndDestroy(cleanupCnt);
       
   221 				}
       
   222 			
       
   223 			break;
       
   224 			}
       
   225 		
       
   226 		// >> RespondPrivacyRequest() [2000]
       
   227 		case ENetMsgRespondPrivacyRequest:
       
   228 			{						
       
   229 			TLbsNetSessionId* getSessionId = NULL;
       
   230 			CLbsNetworkProtocolBase::TLbsPrivacyResponse getPrivacy;
       
   231 			cleanupCnt = proxy->ProtocolProxy()->GetArgsLC(ENetMsgRespondPrivacyRequest, &getSessionId, &getPrivacy);
       
   232 			
       
   233 			sequenceId = WasMessageExpectedSessionId(getSessionId->SessionNum(), ENetMsgRespondPrivacyRequest);
       
   234 			INFO_PRINTF3(_L("-> RespondPrivacyRequest(%d) [2000] Sq: %d"), getPrivacy, sequenceId);
       
   235 			
       
   236 			if(sequenceId != KErrNotFound)
       
   237 				{
       
   238 				iSequences[sequenceId]->CheckRespondPrivacyRequest(getPrivacy);
       
   239 				}
       
   240 			CleanupStack::PopAndDestroy(cleanupCnt);//getSessionId
       
   241 				
       
   242 			break;
       
   243 			}
       
   244 		
       
   245 		// >> RequestAssistanceData() [2004]
       
   246 		case ENetMsgRequestAssistanceData:
       
   247 			{
       
   248 			sequenceId = WasMessageExpectedPmId(aPmId, ENetMsgRequestAssistanceData);
       
   249 			
       
   250 			//Request Assistance Data is a special case.  Depending upon the timing of when the messages
       
   251 			// will be sent/received, it is not possible to predict in advance whether this message will
       
   252 			// always arrive in some of the later sequences.  As such, a RequestAssistanceData message can
       
   253 			// arrive and even if it is not expected by any of the sequences, it will not fail the test.
       
   254 			
       
   255 			if(sequenceId != KErrNotFound)
       
   256 				{
       
   257 				INFO_PRINTF2(_L("-> RequestAssistanceData() [2004] Sq: %d"), sequenceId);
       
   258 				TLbsAsistanceDataGroup dataGroup;
       
   259 				cleanupCnt = proxy->ProtocolProxy()->GetArgsLC(ENetMsgRequestAssistanceData, &dataGroup);
       
   260 				CleanupStack::PopAndDestroy(cleanupCnt);
       
   261 				}
       
   262 			else
       
   263 				{
       
   264 				//Message was not expected by any sequence.  Manually set the Net Proxy off listening
       
   265 				// again, so the sequence can receive the message it expected.
       
   266 				INFO_PRINTF2(_L("-> RequestAssistanceData() [2004] Sq: unknown, PM: %d"), aPmId);
       
   267 				proxy->WaitForResponseL(60 * 1000 * 1000);
       
   268 				
       
   269 				//Break out of the function now
       
   270 				return;
       
   271 				}
       
   272 			
       
   273 			break;
       
   274 			}
       
   275 			
       
   276 		// >> ResponsdLocationRequest() [2001]
       
   277 		case ENetMsgRespondLocationRequest:
       
   278 			{
       
   279 			TLbsNetSessionId* getSessionId = NULL;
       
   280 			getSessionId = NULL;
       
   281 			TInt getReason = KErrNone;
       
   282 			TPositionSatelliteInfo* getPositionInfo = NULL;
       
   283 			cleanupCnt = proxy->ProtocolProxy()->GetArgsLC(ENetMsgRespondLocationRequest, &getSessionId, &getReason, &getPositionInfo);
       
   284 			sequenceId = WasMessageExpectedSessionId(getSessionId->SessionNum(), ENetMsgRespondLocationRequest);
       
   285 			INFO_PRINTF3(_L("-> RespondLocationRequest(%d) [2001] Sq: %d"), getReason, sequenceId);
       
   286 			CleanupStack::PopAndDestroy(cleanupCnt);
       
   287 			break;
       
   288 			}
       
   289 			
       
   290 		// >> RequestSelfLocation() [2005]
       
   291 		case ENetMsgRequestSelfLocation:
       
   292 			{
       
   293 			TLbsNetSessionId* sessionId = NULL;
       
   294 			TLbsNetPosRequestOptionsAssistance*	opts = NULL;
       
   295 			cleanupCnt = proxy->ProtocolProxy()->GetArgsLC(ENetMsgRequestSelfLocation, &sessionId, &opts);
       
   296 
       
   297 			sequenceId = WasMessageExpectedPmId(aPmId, ENetMsgRequestSelfLocation);
       
   298 			INFO_PRINTF2(_L("-> RequestSelfLocation() [2005] Sq: %d"), sequenceId);
       
   299 			
       
   300 			if(sequenceId != KErrNotFound)
       
   301 				{
       
   302 				iSequences[sequenceId]->CheckSelfLocationRequest(sessionId);
       
   303 				}
       
   304 			
       
   305 			CleanupStack::PopAndDestroy(cleanupCnt);
       
   306 			break;
       
   307 			}
       
   308 			
       
   309 		// >> CancelSelfLocation() [2006]
       
   310 		case ENetMsgCancelSelfLocation:
       
   311 			{
       
   312 			TLbsNetSessionId* sessionId = NULL;
       
   313 			TInt reason = 0;
       
   314 			cleanupCnt = proxy->ProtocolProxy()->GetArgsLC(ENetMsgCancelSelfLocation, &sessionId, &reason);
       
   315 			
       
   316 			sequenceId = WasMessageExpectedSessionId(sessionId->SessionNum(), ENetMsgRequestSelfLocation);
       
   317 			INFO_PRINTF2(_L("-> CancelSelfLocation() [2006] Sq: %d"), sequenceId);
       
   318 
       
   319 			CleanupStack::PopAndDestroy(cleanupCnt);
       
   320 			
       
   321 			break;
       
   322 			}
       
   323 			
       
   324 		// >> RequestTransmitLocation() [2002]
       
   325 		case ENetMsgRequestTransmitLocation:
       
   326 			{
       
   327 			HBufC16* getThirdParty = NULL;
       
   328 			TLbsNetSessionId* getSessionId = NULL;
       
   329 			TInt getPriority(0);
       
   330 			TInt cleanupCnt;
       
   331 			cleanupCnt = proxy->ProtocolProxy()->GetArgsLC(ENetMsgRequestTransmitLocation, &getSessionId, &getThirdParty, &getPriority);
       
   332 			
       
   333 			sequenceId = WasMessageExpectedPmId(aPmId, ENetMsgRequestTransmitLocation);
       
   334 			INFO_PRINTF2(_L("-> RequestTransmitLocation() [2002] Sq: %d"), sequenceId);
       
   335 			
       
   336 			if(sequenceId != KErrNotFound)
       
   337 				{
       
   338 				iSequences[sequenceId]->CheckRequestTransmitLocation(getSessionId, getPriority, *getThirdParty);
       
   339 				}
       
   340 			
       
   341 			CleanupStack::PopAndDestroy(cleanupCnt);
       
   342 			break;
       
   343 			}
       
   344 			
       
   345 		// >> CancelTransmitLocation() [2003]
       
   346 		case ENetMsgCancelTransmitLocation:
       
   347 			{
       
   348 			TLbsNetSessionId* sessionId = NULL;
       
   349 			TInt reason = 0;
       
   350 			
       
   351 			cleanupCnt = proxy->ProtocolProxy()->GetArgsLC(ENetMsgCancelTransmitLocation, &sessionId, &reason);
       
   352 			
       
   353 			sequenceId = WasMessageExpectedSessionId(sessionId->SessionNum(), ENetMsgCancelTransmitLocation);
       
   354 			INFO_PRINTF2(_L("-> CancelTransmitLocation() [2003] Sq: %d"), sequenceId);
       
   355 
       
   356 			CleanupStack::PopAndDestroy(cleanupCnt);
       
   357 			
       
   358 			break;
       
   359 			}
       
   360 			
       
   361 		// >> RequestNetworkLocation() [2007]
       
   362 		case ENetMsgRequestNetworkLocation:
       
   363 			{
       
   364             TLbsNetSessionId* sessionId = NULL;
       
   365             TLbsNetPosRequestOptionsAssistance* opts = NULL;
       
   366             cleanupCnt = proxy->ProtocolProxy()->GetArgsLC(ENetMsgRequestNetworkLocation, &sessionId, &opts);
       
   367 
       
   368             sequenceId = WasMessageExpectedPmId(aPmId, ENetMsgRequestNetworkLocation);
       
   369 			
       
   370 			INFO_PRINTF2(_L("-> RequestNetworkLocation() [2007] Sq: %d"), sequenceId);
       
   371 			
       
   372             if(sequenceId != KErrNotFound)
       
   373                 {
       
   374                 iSequences[sequenceId]->CheckNetworkLocationRequest(sessionId);
       
   375                 }
       
   376 			
       
   377 			break;
       
   378 			}
       
   379 			
       
   380 		// >> CancelNetworkLocation [2008]
       
   381 		case ENetMsgCancelNetworkLocation:
       
   382 			{
       
   383 			sequenceId = WasMessageExpectedPmId(aPmId, ENetMsgCancelNetworkLocation);
       
   384 			
       
   385 			INFO_PRINTF2(_L("-> CancelNetworkLocation() [2008] Sq: %d"), sequenceId);
       
   386 			
       
   387 			//NOTE: Currently no handling implemented for this message type
       
   388 			
       
   389 			break;
       
   390 			}
       
   391 			
       
   392 		// Timeout occurred waiting for a NG Message
       
   393 		case -1000:
       
   394 			{
       
   395 			INFO_PRINTF2(_L("Error - Timeout occurred waiting for NG message on PM: %d"), aPmId);
       
   396 			break;
       
   397 			}
       
   398 			
       
   399 		//Error occurred, not a recognised message.  Fail the test.
       
   400 		default:
       
   401 			{
       
   402 			INFO_PRINTF3(_L("Error - Received invalid NG message: %d on PM: %d"), aMessageType, aPmId);
       
   403 			return StopTest(KErrArgument);
       
   404 			}
       
   405 		}
       
   406 	
       
   407 	//If the message was expected, continue the test
       
   408 	if(sequenceId != KErrNotFound)
       
   409 		{
       
   410 		iSequences[sequenceId]->SignalCallbackIdleStart();
       
   411 		}
       
   412 	else
       
   413 		{
       
   414 		// when an unexpected message arrives merley ignore and wait for next one!
       
   415 		proxy->WaitForResponseL(60 * 1000 * 1000);
       
   416 		}
       
   417 	}
       
   418 
       
   419 /** Checks to see whether any of the other sequences should be started.
       
   420  */
       
   421 void CT_LbsHybridMultipleTest::CheckForNewSequenceToStart()
       
   422 	{
       
   423 	TBool check = EFalse;
       
   424 	//Check for other sequences to start
       
   425 	for(TInt i=1; i<iSequences.Count(); ++i)
       
   426 		{
       
   427 		//Check to see whether this sequence has been started
       
   428 		TInt currentPosition = iSequences[i]->GetCurrentPosition();
       
   429 		if(iSequences[i]->GetCurrentPosition() >= 0)
       
   430 			{
       
   431 			//Sequence is started, move onto next sequence
       
   432 			continue;
       
   433 			}
       
   434 		
       
   435 		//There are still sequences that need to be started, keep checking for new sequences
       
   436 		check = ETrue;
       
   437 		
       
   438 		//Check to see whether this sequence needs to be started
       
   439 		if(iSequences[0]->GetCurrentPosition() >= iSequences[i]->GetStartPosition())
       
   440 			{
       
   441 			iActiveSequences++;
       
   442 			iSequences[i]->SignalCallbackIdleStart();
       
   443 			//Break, don't check any other sequences.  This sequence has to be given a chance
       
   444 			//  to start before trying to start any other sequences.
       
   445 			break;
       
   446 			}
       
   447 		}
       
   448 	
       
   449 	// Set the check bool for future checks.  If check is not set to ETrue above then no sequences
       
   450 	//  are still waiting to be started, so there is no point in checking anymore.
       
   451 	iCheckForNewSequencesToStart = check;
       
   452 	}
       
   453 
       
   454 
       
   455 TInt CT_LbsHybridMultipleTest::HandlerCompleteCallback(TAny* aAny)
       
   456     {
       
   457     reinterpret_cast<CT_LbsHybridMultipleTest*>(aAny)->HandlerCompleteNotify();
       
   458         
       
   459     return KErrNone;
       
   460     }
       
   461 
       
   462 
       
   463 /** Handler Complete
       
   464  */
       
   465 void CT_LbsHybridMultipleTest::HandlerCompleteNotify()
       
   466     {
       
   467     CheckForNewSequenceToStart();
       
   468     }
       
   469 
       
   470 /** Uses the TestExecute logger to allow the CTestSessionSequence class to log messages to
       
   471  *    the TestExecute log file.
       
   472  * 
       
   473  * @param aMessage Contains the message that should be logged
       
   474  */
       
   475 void CT_LbsHybridMultipleTest::LogTestStatement(const TDesC& aMessage)
       
   476 	{
       
   477 	INFO_PRINTF2(_L("%S"), &aMessage);
       
   478 	}
       
   479 
       
   480 /** Signals the the sequence has finished.  Check to see if the test should now end
       
   481  */
       
   482 void CT_LbsHybridMultipleTest::SequenceFinished()
       
   483 	{
       
   484 	//This sequence is finished
       
   485 	iActiveSequences--;
       
   486 	//Check to see whether any other sequences are active
       
   487 	if(iActiveSequences > 0)
       
   488 		{
       
   489 		return;
       
   490 		}
       
   491 	else
       
   492 		{
       
   493 		//No active sequences, end the test
       
   494 		return StopTest(0);
       
   495 		}
       
   496 	}
       
   497 
       
   498 /** Signal from the Test Sequence that the test should check for more sequences to start
       
   499  */
       
   500 void CT_LbsHybridMultipleTest::SignalCheckForNewSequences()
       
   501 	{
       
   502 	if(iCheckForNewSequencesToStart)
       
   503 		{
       
   504 		iCheckNewSequenceIdle->Start(TCallBack(HandlerCompleteCallback, this));
       
   505 		}
       
   506 	}
       
   507 
       
   508 /* >> ProcessNetworkLocationRequest()
       
   509 */
       
   510 void CT_LbsHybridMultipleTest::ProcessNetworkLocationRequest(TUint aRequestId, const TLbsExternalRequestInfo& /*aRequestInfo*/, const TNotificationType& /*aNotificationType*/)
       
   511 	{
       
   512 	//Loop through the sequences identifying which sequence this privacy request belongs to
       
   513 	TInt i;
       
   514 	for(i=0; i<iSequences.Count(); ++i)
       
   515 		{
       
   516 		if(iSequences[i]->GetSessionId().SessionNum() == aRequestId)
       
   517 			{
       
   518 			INFO_PRINTF2(_L("--> ProcessNetworkLocationRequest() [3000] Sq: %d"), i);
       
   519 			
       
   520 			if(iSequences[i]->GetCurrentAction() == EProcessNetworkLocationRequest)
       
   521 				{
       
   522 				iSequences[i]->SignalCallbackIdleStart();
       
   523 				}
       
   524 			
       
   525 			break;
       
   526 			}
       
   527 		}
       
   528 	
       
   529 	INFO_PRINTF2(_L("<-- RespondNetworkLocationRequest() Sq: %d"), i);
       
   530 	iController->RespondNetworkLocationRequest(aRequestId, CLbsPrivacyController::ERequestAccepted);
       
   531 	}
       
   532    
       
   533 /** >> ProcessNetworkLocationUpdate()
       
   534  */
       
   535 void CT_LbsHybridMultipleTest::ProcessNetworkPositionUpdate(TUint aRequestId, const TPositionInfo& /*aPosInfo*/)
       
   536 	{
       
   537 	for(TInt i=0; i<iSequences.Count(); ++i)
       
   538 		{
       
   539 		if(iSequences[i]->GetSessionId().SessionNum() == aRequestId)
       
   540 			{
       
   541 			INFO_PRINTF2(_L("--> ProcessNetworkPositionUpdate() [3001] Sq: %d"), i);
       
   542 			
       
   543 			if(iSequences[i]->GetCurrentAction() == EProcessNetworkPositionUpdate)
       
   544 				{
       
   545 				iSequences[i]->SignalCallbackIdleStart();
       
   546 				}
       
   547 			break;
       
   548 			}
       
   549 		}
       
   550 	}
       
   551 
       
   552 /** >> ProcessRequestComplete()
       
   553  */
       
   554 void CT_LbsHybridMultipleTest::ProcessRequestComplete(TUint aRequestId, TInt aReason)
       
   555 	{	
       
   556 	for(TInt i=0; i<iSequences.Count(); ++i)
       
   557 		{
       
   558 		if(iSequences[i]->GetSessionId().SessionNum() == aRequestId)
       
   559 			{
       
   560 			INFO_PRINTF3(_L("--> ProcessRequestComplete(%d) [3002] Sq: %d"), aReason, i);
       
   561 			
       
   562 			if(iSequences[i]->GetCurrentAction() == EProcessRequestComplete)
       
   563 				{
       
   564 				iSequences[i]->SignalCallbackIdleStart();
       
   565 				}
       
   566 			break;
       
   567 			}
       
   568 		}
       
   569 	}