//! @File
//! @SYMTestSuiteName	SF-LBS-HYBRIDMTLR-GPSOPTIONS
//! @SYMScriptTestEnvironment TEF

// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//

LOAD_SUITE SfLbsHybridMTLRTestServer -SharedData

PRINT Run SfLbsHybridMTLRTestServer


// Before we start LBS, select the test A-GPS integration module to use.
PREFIX RUN_UTILS
MkDir c:\private\10282253\
MkDir c:\private\10282253\lbs\
MkDir c:\private\10282253\lbs\locmods\
CopyFile c:\testdata\configs\ctagpshybridmoduledatasource_tb.ini  c:\private\10282253\lbs\locmods\agpsintegmodule.ini
CopyFile c:\testdata\configs\lbstestconfig.txt c:\config.txt
REMOVE_PREFIX

// NOTE: When the network asks for TA it doesn't typically provide a reference position - need to update scripts + test framework to deal with that!

// Reset admin (reset will give us the EGpsPreferTerminalBased).
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_ResetDefaultAdmin

// Select MTLR privacy controller.
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_SetPrivacyHandler c:\testdata\configs\sf_lbs_mtlr.ini PrivHandler

// Use hybrid protocol module
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_SetupProtocolStub


//--------------------------------------------------------------- Module Caps = TB -----------------------------------------------------------------------

RUN_UTILS CopyFile c:\testdata\configs\ctagpshybridmoduledatasource_tb.ini  c:\private\10282253\lbs\locmods\agpsintegmodule.ini
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs


PRINT ----------------------------------------------------------------------------------------------------------------------------------------------------



START_TESTCASE                SFLBS-MTLR-TBCAP-TBNETWORK-001
//! @SYMTestCaseID              SFLBS-MTLR-TBCAP-TBNETWORK-001
//! @SYMTestCaseDesc            MT-LR request with:
//!                             mod caps = TB
//!                             network wants TB
//! @SYMTestPriority            Medium
//! @SYMTestActions             Get device capabilities - TB
//!                             Read network request mode from test config - TB
//!                             Read 'position originator' (network/module) from test config - module
//!                             create the protocol module proxy
//!                             Verify AdviceSystemStatus (LBS-->PM)       >> AdviceSystemStatus(ESystemStatusNone)
//!                             Send Status Update for MTLR (PM-->LBS)      << ProcessStatusUpdate(EServiceMobileTerminated)
//!                             Send Privacy Request        << ProcessPrivacyRequest()
//!                             Verify ProcessNetworkLocationRequest() (LBS->Privacy App)   >> ProcessNetworkLocationRequest()
//!                             Verify Privacy Request accepted (LBS->PM)     >> RespondPrivacyRequest(EPrivacyResponseAccepted)
//!                             Send MC  (PM->LBS):
//!                             Send Ref Position        << ProcessLocationUpdate(ref pos)
//!                             Send Assistance Data        << ProcessAssistanceData(EAssistanceDataReferenceLocation)
//!                             Send Location Request        << ProcessLocationRequest(TB, alpha2 timeout)
//!                             Verify Privacy App gets RefPos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(Ref pos)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response  (LBS-->PM)       >> RespondLocationRequest(gps pos)
//!                             Verify Privacy App gets gps Pos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(gps pos)
//!                             Send SessionComplete (PM-->LBS)       << ProcessSessionComplete(KErrNone)
//!                             Send Status Update (PM-->LBS)       << ProcessStatusUpdate(EServiceNone)
//!                             Verify Privacy App gets RequestComplete (LBS->Privacy App)   >> ProcessRequestComplete(KErrNone)
//! @SYMTestExpectedResults     GPS module is asked to run in PTB mode. Module will return the position; privacy app notified of gps position with techtype 'terminal based'
//! @SYMTestType                CIT
//! @SYMTESTSTATUS              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBCAP-TBNET
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsMTLRGpsOptions c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBCAP-TBNET
END_TESTCASE SFLBS-MTLR-TBCAP-TBNETWORK-001


// Note: Currently all the tests cases check for a SystemStatus update being sent by lbs. But this only happens on startup.
// Alternative would be to remove Stop Start and not have all tests checking for status update...?
RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs

PRINT ----------------------------------------------------------------------------------------------------------------------------------------------------


START_TESTCASE                SFLBS-MTLR-TBCAP-TBTANET-001
//! @SYMTestCaseID              SFLBS-MTLR-TBCAP-TBTANET-001
//! @SYMTestCaseDesc            MT-LR request with:
//!                             mod caps = TB
//!                             network wants TB+TA
//! @SYMTestPriority            Medium
//! @SYMTestActions             Get device capabilities - TB
//!                             Read network request mode from test config - TB+TA
//!                             Read 'position originator' (network/module) from test config - module
//!                             create the protocol module proxy
//!                             Verify AdviceSystemStatus (LBS-->PM)       >> AdviceSystemStatus(ESystemStatusNone)
//!                             Send Status Update for MTLR (PM-->LBS)      << ProcessStatusUpdate(EServiceMobileTerminated)
//!                             Send Privacy Request        << ProcessPrivacyRequest()
//!                             Verify ProcessNetworkLocationRequest() (LBS->Privacy App)   >> ProcessNetworkLocationRequest()
//!                             Verify Privacy Request accepted (LBS->PM)     >> RespondPrivacyRequest(EPrivacyResponseAccepted)
//!                             Send MC  (PM->LBS):
//!                             Send Ref Position        << ProcessLocationUpdate(ref pos)
//!                             Send Assistance Data        << ProcessAssistanceData(EAssistanceDataReferenceLocation)
//!                             Send Location Request        << ProcessLocationRequest(TB+TA, alpha2 timeout)
//!                             Verify Privacy App gets RefPos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(Ref pos)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response  (LBS-->PM)       >> RespondLocationRequest(gps pos)
//!                             Verify Privacy App gets gps Pos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(gps pos)
//!                             Send SessionComplete (PM-->LBS)       << ProcessSessionComplete(KErrNone)
//!                             Send Status Update (PM-->LBS)       << ProcessStatusUpdate(EServiceNone)
//!                             Verify Privacy App gets RequestComplete (LBS->Privacy App)   >> ProcessRequestComplete(KErrNone)
//! @SYMTestExpectedResults     GPS module is asked to run in PTB mode. Module will return the position; privacy app notified of gps position with techtype 'terminal based'
//! @SYMTestType                CIT
//! @SYMTESTSTATUS              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBCAP-TBTANET
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsMTLRGpsOptions c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBCAP-TBTANET
END_TESTCASE SFLBS-MTLR-TBCAP-TBTANET-001


// Note: Currently all the tests cases check for a SystemStatus update being sent by lbs. But this only happens on startup.
// Alternative would be to remove Stop Start and not have all tests checking for status update...?
RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs


PRINT ----------------------------------------------------------------------------------------------------------------------------------------------------


START_TESTCASE                SFLBS-MTLR-TBCAP-TANET-001
//! @SYMTestCaseID              SFLBS-MTLR-TBCAP-TANET-001
//! @SYMTestCaseDesc            MT-LR request with:
//!                             mod caps = TB
//!                             network wants TA
//!                             Rejected by NRH
//! @SYMTestPriority            Medium
//! @SYMTestActions             Get device capabilities - TB
//!                             Read network request mode from test config - TA
//!                             Read 'position originator' (network/module) from test config - not used
//!                             Verify AdviceSystemStatus (LBS-->PM)       >> AdviceSystemStatus(ESystemStatusNone)
//!                             Send Status Update for MTLR (PM-->LBS)      << ProcessStatusUpdate(EServiceMobileTerminated)
//!                             Send Privacy Request        << ProcessPrivacyRequest()
//!                             Verify ProcessNetworkLocationRequest() (LBS->Privacy App)   >> ProcessNetworkLocationRequest()
//!                             Verify Privacy Request accepted (LBS->PM)     >> RespondPrivacyRequest(EPrivacyResponseAccepted)
//!                             Send MC  (PM->LBS):
//!                             Send Ref Position        << ProcessLocationUpdate(ref pos)
//!                             Send Assistance Data        << ProcessAssistanceData(EAssistanceDataReferenceLocation)
//!                             Send Location Request        << ProcessLocationRequest(TA, alpha2 timeout)
//!                             Verify Privacy App gets RefPos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(Ref pos)
//!                             Verify Location Response with KErrNotSupported (LBS->PM)   >> RespondLocationRequest(KErrNotSupported)
//!                             Send SessionComplete (PM-->LBS)       << ProcessSessionComplete(KErrNotSupported)
//!                             Send Status Update (PM-->LBS)       << ProcessStatusUpdate(EServiceNone)
//!                             Verify Privacy App gets RequestComplete with KErrNotSupported(LBS->Privacy App) >> ProcessRequestComplete(KErrNotSupported)
//! @SYMTestExpectedResults     Location Request from Network is rejected with KErrNotSupported. Privacy App gets RequestComplete with KErrNotSupported.
//! @SYMTestType                CIT
//! @SYMTESTSTATUS              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBCAP-TANET
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsMTLRGpsOptions c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBCAP-TANET
END_TESTCASE SFLBS-MTLR-TBCAP-TANET-001


// Note: Currently all the tests cases check for a SystemStatus update being sent by lbs. But this only happens on startup.
// Alternative would be to remove Stop Start and not have all tests checking for status update...?
RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs

PRINT ----------------------------------------------------------------------------------------------------------------------------------------------------


START_TESTCASE                SFLBS-MTLR-TBCAP-TATBNET-001
//! @SYMTestCaseID              SFLBS-MTLR-TBCAP-TATBNET-001
//! @SYMTestCaseDesc            MT-LR request with:
//!                             mod caps = TB
//!                             network wants TA+TB
//!                             module supplies an accurate position
//! @SYMTestPriority            Medium
//! @SYMTestActions             Get device capabilities - TB
//!                             Read network request mode from test config - TA+TB
//!                             Read 'position originator' (network/module) from test config - module
//!                             create the protocol module proxy
//!                             Verify AdviceSystemStatus (LBS-->PM)       >> AdviceSystemStatus(ESystemStatusNone)
//!                             Send Status Update for MTLR (PM-->LBS)      << ProcessStatusUpdate(EServiceMobileTerminated)
//!                             Send Privacy Request        << ProcessPrivacyRequest()
//!                             Verify ProcessNetworkLocationRequest() (LBS->Privacy App)   >> ProcessNetworkLocationRequest()
//!                             Verify Privacy Request accepted (LBS->PM)     >> RespondPrivacyRequest(EPrivacyResponseAccepted)
//!                             Send MC  (PM->LBS):
//!                             Send Ref Position        << ProcessLocationUpdate(ref pos)
//!                             Send Assistance Data        << ProcessAssistanceData(EAssistanceDataReferenceLocation)
//!                             Send Location Request        << ProcessLocationRequest(TA+TB, alpha2 timeout)
//!                             Verify Privacy App gets RefPos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(Ref pos)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response  (LBS-->PM)       >> RespondLocationRequest(gps pos)
//!                             Verify Privacy App gets gps Pos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(gps pos)
//!                             Send SessionComplete (PM-->LBS)       << ProcessSessionComplete(KErrNone)
//!                             Send Status Update (PM-->LBS)       << ProcessStatusUpdate(EServiceNone)
//!                             Verify Privacy App gets RequestComplete (LBS->Privacy App)   >> ProcessRequestComplete(KErrNone)
//! @SYMTestExpectedResults     GPS module is asked to run in PTB mode. Module will return the position; privacy app notified of gps position with techtype 'terminal based'
//! @SYMTestType                CIT
//! @SYMTESTSTATUS              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBCAP-TATBNET
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsMTLRGpsOptions c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBCAP-TATBNET
END_TESTCASE SFLBS-MTLR-TBCAP-TATBNET-001


//--------------------------------------------------------------- Module Caps = TA -----------------------------------------------------------------------

// Change module caps to TA only:
RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_UTILS CopyFile c:\testdata\configs\ctagpshybridmoduledatasource_ta.ini  c:\private\10282253\lbs\locmods\agpsintegmodule.ini
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs


PRINT ----------------------------------------------------------------------------------------------------------------------------------------------------


START_TESTCASE                SFLBS-MTLR-TACAP-TBNET-001
//! @SYMTestCaseID              SFLBS-MTLR-TACAP-TBNET-001
//! @SYMTestCaseDesc            MT-LR request with:
//!                             mod caps = TA
//!                             network wants TB
//! @SYMTestPriority            Medium
//! @SYMTestActions             Get device capabilities - TA
//!                             Read network request mode from test config - TB (not used)
//!                             Read 'position originator' (network/module) from test config - module (not used)
//!                             Verify AdviceSystemStatus (LBS-->PM)       >> AdviceSystemStatus(ESystemStatusNone)
//!                             Send Status Update for MTLR (PM-->LBS)      << ProcessStatusUpdate(EServiceMobileTerminated)
//!                             Send Privacy Request        << ProcessPrivacyRequest()
//!                             Verify ProcessNetworkLocationRequest() (LBS->Privacy App)   >> ProcessNetworkLocationRequest()
//!                             Verify Privacy Request accepted (LBS->PM)     >> RespondPrivacyRequest(EPrivacyResponseAccepted)
//!                             Send MC  (PM->LBS):
//!                             Send Ref Position        << ProcessLocationUpdate(ref pos)
//!                             Send Assistance Data        << ProcessAssistanceData(EAssistanceDataReferenceLocation)
//!                             Send Location Request        << ProcessLocationRequest(TB, alpha2 timeout)
//!                             Verify Privacy App gets RefPos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(Ref pos)
//!                             Verify Location Response with KErrNotSupported (LBS->PM)   >> RespondLocationRequest(KErrNotSupported)
//!                             Send SessionComplete (PM-->LBS)       << ProcessSessionComplete(KErrNotSupported)
//!                             Send Status Update (PM-->LBS)       << ProcessStatusUpdate(EServiceNone)
//!                             Verify Privacy App gets RequestComplete with KErrNotSupported(LBS->Privacy App) >> ProcessRequestComplete(KErrNotSupported)
//! @SYMTestExpectedResults     Location Request from Network is rejected with KErrNotSupported. Privacy App gets RequestComplete with KErrNotSupported.
//! @SYMTestType                CIT
//! @SYMTESTSTATUS              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TACAP-TBNET
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsMTLRGpsOptions c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TACAP-TBNET
END_TESTCASE SFLBS-MTLR-TACAP-TBNET-001


// Note: Currently all the tests cases check for a SystemStatus update being sent by lbs. But this only happens on startup.
// Alternative would be to remove Stop Start and not have all tests checking for status update...?
RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs


PRINT ----------------------------------------------------------------------------------------------------------------------------------------------------


START_TESTCASE                SFLBS-MTLR-TACAP-TBTANET-001
//! @SYMTestCaseID              SFLBS-MTLR-TACAP-TBTANET-001
//! @SYMTestCaseDesc            MT-LR request with:
//!                             mod caps = TA
//!                             network wants TBTA
//! @SYMTestPriority            Medium
//! @SYMTestActions             Get device capabilities - TA
//!                             Read network request mode from test config - TBTA
//!                             Read 'position originator' (network/module) from test config - network
//!                             create the protocol module proxy
//!                             Verify AdviceSystemStatus (LBS-->PM)       >> AdviceSystemStatus(ESystemStatusNone)
//!                             Send Status Update for MTLR (PM-->LBS)      << ProcessStatusUpdate(EServiceMobileTerminated)
//!                             Send Privacy Request        << ProcessPrivacyRequest()
//!                             Verify ProcessNetworkLocationRequest() (LBS->Privacy App)   >> ProcessNetworkLocationRequest()
//!                             Verify Privacy Request accepted (LBS->PM)     >> RespondPrivacyRequest(EPrivacyResponseAccepted)
//!                             Send MC  (PM->LBS):
//!                             Send Ref Position        << ProcessLocationUpdate(ref pos)
//!                             Send Assistance Data        << ProcessAssistanceData(EAssistanceDataReferenceLocation)
//!                             Send Location Request        << ProcessLocationRequest(TB+TA, alpha2 timeout)
//!                             Verify Privacy App gets RefPos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(Ref pos)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response with measurement (LBS-->PM)     >> RespondLocationRequest(meas)
//!                             Send Location Request  (PM->LBS)      << ProcessLocationRequest(TB+TA, t timeout)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response with measurement (LBS-->PM)     >> RespondLocationRequest(meas)
//!                             Send SessionComplete (PM-->LBS)       << ProcessSessionComplete(KErrNone)
//!                             Send Status Update (PM-->LBS)       << ProcessStatusUpdate(EServiceNone)
//!                             Verify Privacy App gets RequestComplete (LBS->Privacy App)   >> ProcessRequestComplete(KErrNone)
//! @SYMTestExpectedResults     GPS module is asked to run in PTA mode. Module will return measurements. Privacy App gets RequestComplete with KErrNone.
//!                             Note that privacy app does not see final gps position calculated by network.
//! @SYMTestType                CIT
//! @SYMTESTSTATUS              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TACAP-TBTANET
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsMTLRGpsOptions c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TACAP-TBTANET
END_TESTCASE SFLBS-MTLR-TACAP-TBTANET-001


// Note: Currently all the tests cases check for a SystemStatus update being sent by lbs. But this only happens on startup.
// Alternative would be to remove Stop Start and not have all tests checking for status update...?
RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs


PRINT ----------------------------------------------------------------------------------------------------------------------------------------------------


START_TESTCASE                SFLBS-MTLR-TACAP-TANET-001
//! @SYMTestCaseID              SFLBS-MTLR-TACAP-TANET-001
//! @SYMTestCaseDesc            MT-LR request with:
//!                             mod caps = TA
//!                             network wants TA
//! @SYMTestPriority            Medium
//! @SYMTestActions             Get device capabilities - TA
//!                             Read network request mode from test config - TA
//!                             Read 'position originator' (network/module) from test config - network
//!                             Verify AdviceSystemStatus (LBS-->PM)       >> AdviceSystemStatus(ESystemStatusNone)
//!                             Send Status Update for MTLR (PM-->LBS)      << ProcessStatusUpdate(EServiceMobileTerminated)
//!                             Send Privacy Request        << ProcessPrivacyRequest()
//!                             Verify ProcessNetworkLocationRequest() (LBS->Privacy App)   >> ProcessNetworkLocationRequest()
//!                             Verify Privacy Request accepted (LBS->PM)     >> RespondPrivacyRequest(EPrivacyResponseAccepted)
//!                             Send MC  (PM->LBS):
//!                             Send Ref Position        << ProcessLocationUpdate(ref pos)
//!                             Send Assistance Data        << ProcessAssistanceData(EAssistanceDataReferenceLocation)
//!                             Send Location Request        << ProcessLocationRequest(TA, alpha2 timeout)
//!                             Verify Privacy App gets RefPos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(Ref pos)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response with measurement (LBS-->PM)     >> RespondLocationRequest(meas)
//!                             Send Location Request  (PM->LBS)      << ProcessLocationRequest(TA, t timeout)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response with measurement (LBS-->PM)     >> RespondLocationRequest(meas)
//!                             Send SessionComplete (PM-->LBS)       << ProcessSessionComplete(KErrNone)
//!                             Send Status Update (PM-->LBS)       << ProcessStatusUpdate(EServiceNone)
//!                             Verify Privacy App gets RequestComplete (LBS->Privacy App)   >> ProcessRequestComplete(KErrNone)
//! @SYMTestExpectedResults     GPS module is asked to run in PTA mode. Module will return measurements. Privacy App gets RequestComplete with KErrNone.
//!                             Note that privacy app does not see final gps position calculated by network.
//! @SYMTestType                CIT
//! @SYMTESTSTATUS              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TACAP-TANET
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsMTLRGpsOptions c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TACAP-TANET
END_TESTCASE SFLBS-MTLR-TACAP-TANET-001


// Note: Currently all the tests cases check for a SystemStatus update being sent by lbs. But this only happens on startup.
// Alternative would be to remove Stop Start and not have all tests checking for status update...?
RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs


PRINT ----------------------------------------------------------------------------------------------------------------------------------------------------


START_TESTCASE                SFLBS-MTLR-TACAP-TATBNET-001
//! @SYMTestCaseID              SFLBS-MTLR-TACAP-TATBNET-001
//! @SYMTestCaseDesc            MT-LR request with:
//!                             mod caps = TA
//!                             network wants TATB
//! @SYMTestPriority            Medium
//! @SYMTestActions             Get device capabilities - TA
//!                             Read network request mode from test config - TATB
//!                             Read 'position originator' (network/module) from test config - network
//!                             Verify AdviceSystemStatus (LBS-->PM)       >> AdviceSystemStatus(ESystemStatusNone)
//!                             Send Status Update for MTLR (PM-->LBS)      << ProcessStatusUpdate(EServiceMobileTerminated)
//!                             Send Privacy Request        << ProcessPrivacyRequest()
//!                             Verify ProcessNetworkLocationRequest() (LBS->Privacy App)   >> ProcessNetworkLocationRequest()
//!                             Verify Privacy Request accepted (LBS->PM)     >> RespondPrivacyRequest(EPrivacyResponseAccepted)
//!                             Send MC  (PM->LBS):
//!                             Send Ref Position        << ProcessLocationUpdate(ref pos)
//!                             Send Assistance Data        << ProcessAssistanceData(EAssistanceDataReferenceLocation)
//!                             Send Location Request        << ProcessLocationRequest(TA+TB, alpha2 timeout)
//!                             Verify Privacy App gets RefPos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(Ref pos)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response with measurement (LBS-->PM)     >> RespondLocationRequest(meas)
//!                             Send Location Request  (PM->LBS)      << ProcessLocationRequest(TA+TB, t timeout)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response with measurement (LBS-->PM)     >> RespondLocationRequest(meas)
//!                             Send SessionComplete (PM-->LBS)       << ProcessSessionComplete(KErrNone)
//!                             Send Status Update (PM-->LBS)       << ProcessStatusUpdate(EServiceNone)
//!                             Verify Privacy App gets RequestComplete (LBS->Privacy App)   >> ProcessRequestComplete(KErrNone)
//! @SYMTestExpectedResults     GPS module is asked to run in PTA mode. Module will return measurements. Privacy App gets RequestComplete with KErrNone.
//!                             Note that privacy app does not see final gps position calculated by network.
//! @SYMTestType                CIT
//! @SYMTESTSTATUS              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TACAP-TATBNET
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsMTLRGpsOptions c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TACAP-TATBNET
END_TESTCASE SFLBS-MTLR-TACAP-TATBNET-001


//--------------------------------------------------------------- Module Caps = TB || TA -----------------------------------------------------------------------

// Change module caps to TA || TB:
RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_UTILS CopyFile c:\testdata\configs\ctagpshybridmoduledatasource_exclusive.ini  c:\private\10282253\lbs\locmods\agpsintegmodule.ini
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs

PRINT ----------------------------------------------------------------------------------------------------------------------------------------------------


START_TESTCASE                SFLBS-MTLR-TBORTACAP-TBNET-001
//! @SYMTestCaseID              SFLBS-MTLR-TBORTACAP-TBNET-001
//! @SYMTestCaseDesc            MT-LR request with:
//!                             mod caps = TB||TA
//!                             network wants TB
//! @SYMTestPriority            Medium
//! @SYMTestActions             Get device capabilities - TB||TA
//!                             Read network request mode from test config - TB
//!                             Read 'position originator' (network/module) from test config - module
//!                             create the protocol module proxy
//!                             Verify AdviceSystemStatus (LBS-->PM)       >> AdviceSystemStatus(ESystemStatusNone)
//!                             Send Status Update for MTLR (PM-->LBS)      << ProcessStatusUpdate(EServiceMobileTerminated)
//!                             Send Privacy Request        << ProcessPrivacyRequest()
//!                             Verify ProcessNetworkLocationRequest() (LBS->Privacy App)   >> ProcessNetworkLocationRequest()
//!                             Verify Privacy Request accepted (LBS->PM)     >> RespondPrivacyRequest(EPrivacyResponseAccepted)
//!                             Send MC  (PM->LBS):
//!                             Send Ref Position        << ProcessLocationUpdate(ref pos)
//!                             Send Assistance Data        << ProcessAssistanceData(EAssistanceDataReferenceLocation)
//!                             Send Location Request        << ProcessLocationRequest(TB, alpha2 timeout)
//!                             Verify Privacy App gets RefPos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(Ref pos)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response  (LBS-->PM)       >> RespondLocationRequest(gps pos)
//!                             Verify Privacy App gets gps Pos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(gps pos)
//!                             Send SessionComplete (PM-->LBS)       << ProcessSessionComplete(KErrNone)
//!                             Send Status Update (PM-->LBS)       << ProcessStatusUpdate(EServiceNone)
//!                             Verify Privacy App gets RequestComplete (LBS->Privacy App)   >> ProcessRequestComplete(KErrNone)
//! @SYMTestExpectedResults     GPS module is asked to run in PTB mode. Module will return the position; privacy app notified of gps position with techtype 'terminal based'
//! @SYMTestType                CIT
//! @SYMTESTSTATUS              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBORTACAP-TBNET
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsMTLRGpsOptions c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBORTACAP-TBNET
END_TESTCASE SFLBS-MTLR-TBORTACAP-TBNET-001



// Note: Currently all the tests cases check for a SystemStatus update being sent by lbs. But this only happens on startup.
// Alternative would be to remove Stop Start and not have all tests checking for status update...?
RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs


//PRINT ----------------------------------------------------------------------------------------------------------------------------------------------------


START_TESTCASE                SFLBS-MTLR-TBORTACAP-TBTANET-001
//! @SYMTestCaseID              SFLBS-MTLR-TBORTACAP-TBTANET-001
//! @SYMTestCaseDesc            MT-LR request with:
//!                             mod caps = TB||TA
//!                             network wants TB+TA
//!                             module supplies an accurate position
//! @SYMTestPriority            Medium
//! @SYMTestActions             Get device capabilities - TB||TA
//!                             Read network request mode from test config - TB+TA (hybrid)
//!                             Read 'position originator' (network/module) from test config - module
//!                             create the protocol module proxy
//!                             Verify AdviceSystemStatus (LBS-->PM)       >> AdviceSystemStatus(ESystemStatusNone)
//!                             Send Status Update for MTLR (PM-->LBS)      << ProcessStatusUpdate(EServiceMobileTerminated)
//!                             Send Privacy Request        << ProcessPrivacyRequest()
//!                             Verify ProcessNetworkLocationRequest() (LBS->Privacy App)   >> ProcessNetworkLocationRequest()
//!                             Verify Privacy Request accepted (LBS->PM)     >> RespondPrivacyRequest(EPrivacyResponseAccepted)
//!                             Send MC  (PM->LBS):
//!                             Send Ref Position        << ProcessLocationUpdate(ref pos)
//!                             Send Assistance Data        << ProcessAssistanceData(EAssistanceDataReferenceLocation)
//!                             Send Location Request        << ProcessLocationRequest(TB+TA, alpha2 timeout)
//!                             Verify Privacy App gets RefPos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(Ref pos)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response  (LBS-->PM)       >> RespondLocationRequest(gps pos)
//!                             Verify Privacy App gets gps Pos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(gps pos)
//!                             Send SessionComplete (PM-->LBS)       << ProcessSessionComplete(KErrNone)
//!                             Send Status Update (PM-->LBS)       << ProcessStatusUpdate(EServiceNone)
//!                             Verify Privacy App gets RequestComplete (LBS->Privacy App)   >> ProcessRequestComplete(KErrNone)
//! @SYMTestExpectedResults     GPS module is asked to run in PTB mode. Module will return the position; privacy app notified of gps position with techtype 'terminal based'
//! @SYMTestType                CIT
//! @SYMTESTSTATUS              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBORTACAP-TBTANET
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsMTLRGpsOptions c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBORTACAP-TBTANET
END_TESTCASE SFLBS-MTLR-TBORTACAP-TBTANET-001


// Note: Currently all the tests cases check for a SystemStatus update being sent by lbs. But this only happens on startup.
// Alternative would be to remove Stop Start and not have all tests checking for status update...?
RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs


PRINT ----------------------------------------------------------------------------------------------------------------------------------------------------


START_TESTCASE                SFLBS-MTLR-TBORTACAP-TANETWORK-001
//! @SYMTestCaseID              SFLBS-MTLR-TBORTACAP-TANETWORK-001
//! @SYMTestCaseDesc            MT-LR request with:
//!                             mod caps = TB || TA
//!                             network wants TA
//!                             module supplies measurements
//! @SYMTestPriority            Medium
//! @SYMTestActions             Get device capabilities - TB || TA
//!                             Read network request mode from test config - TA
//!                             Read 'position originator' (network/module) from test config - network
//!                             create the protocol module proxy
//!                             Verify AdviceSystemStatus (LBS-->PM)       >> AdviceSystemStatus(ESystemStatusNone)
//!                             Send Status Update for MTLR (PM-->LBS)      << ProcessStatusUpdate(EServiceMobileTerminated)
//!                             Send Privacy Request        << ProcessPrivacyRequest()
//!                             Verify ProcessNetworkLocationRequest() (LBS->Privacy App)   >> ProcessNetworkLocationRequest()
//!                             Verify Privacy Request accepted (LBS->PM)     >> RespondPrivacyRequest(EPrivacyResponseAccepted)
//!                             Send MC  (PM->LBS):
//!                             Send Ref Position        << ProcessLocationUpdate(ref pos)
//!                             Send Assistance Data        << ProcessAssistanceData(EAssistanceDataReferenceLocation)
//!                             Send Location Request        << ProcessLocationRequest(TA, alpha2 timeout)
//!                             Verify Privacy App gets RefPos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(Ref pos)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response with measurement (LBS-->PM)     >> RespondLocationRequest(meas)
//!                             Send Location Request  (PM->LBS)      << ProcessLocationRequest(TA, t timeout)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response with measurement (LBS-->PM)     >> RespondLocationRequest(meas)
//!                             Send SessionComplete (PM-->LBS)       << ProcessSessionComplete(KErrNone)
//!                             Send Status Update (PM-->LBS)       << ProcessStatusUpdate(EServiceNone)
//!                             Verify Privacy App gets RequestComplete (LBS->Privacy App)   >> ProcessRequestComplete(KErrNone)
//! @SYMTestExpectedResults     GPS module is asked to run in PTA mode. Module will return measurements. Privacy App gets RequestComplete with KErrNone.
//!                             Note that privacy app does not see final gps position calculated by network.
//! @SYMTestType                CIT
//! @SYMTESTSTATUS              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBORTACAP-TANET
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsMTLRGpsOptions c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBORTACAP-TANET
END_TESTCASE SFLBS-MTLR-TBORTACAP-TANETWORK-001


// Note: Currently all the tests cases check for a SystemStatus update being sent by lbs. But this only happens on startup.
// Alternative would be to remove Stop Start and not have all tests checking for status update...?
RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs


PRINT ----------------------------------------------------------------------------------------------------------------------------------------------------


START_TESTCASE                SFLBS-MTLR-TBORTACAP-TATBNET-001
//! @SYMTestCaseID              SFLBS-MTLR-TBORTACAP-TATBNET-001
//! @SYMTestCaseDesc            MT-LR request with:
//!                             mod caps = TB||TA
//!                             network wants TA+TB
//!                             module supplies an accurate position
//! @SYMTestPriority            Medium
//! @SYMTestActions             Get device capabilities - TB||TA
//!                             Read network request mode from test config - TA+TB (hybrid)
//!                             Read 'position originator' (network/module) from test config - network
//!                             create the protocol module proxy
//!                             Verify AdviceSystemStatus (LBS-->PM)       >> AdviceSystemStatus(ESystemStatusNone)
//!                             Send Status Update for MTLR (PM-->LBS)      << ProcessStatusUpdate(EServiceMobileTerminated)
//!                             Send Privacy Request        << ProcessPrivacyRequest()
//!                             Verify ProcessNetworkLocationRequest() (LBS->Privacy App)   >> ProcessNetworkLocationRequest()
//!                             Verify Privacy Request accepted (LBS->PM)     >> RespondPrivacyRequest(EPrivacyResponseAccepted)
//!                             Send MC  (PM->LBS):
//!                             Send Ref Position        << ProcessLocationUpdate(ref pos)
//!                             Send Assistance Data        << ProcessAssistanceData(EAssistanceDataReferenceLocation)
//!                             Send Location Request        << ProcessLocationRequest(TB+TA, alpha2 timeout)
//!                             Verify Privacy App gets RefPos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(Ref pos)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response with measurement (LBS-->PM)     >> RespondLocationRequest(meas)
//!                             Send Location Request  (PM->LBS)      << ProcessLocationRequest(TB+TA, t timeout)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response with measurement (LBS-->PM)     >> RespondLocationRequest(meas)
//!                             Send SessionComplete (PM-->LBS)       << ProcessSessionComplete(KErrNone)
//!                             Send Status Update (PM-->LBS)       << ProcessStatusUpdate(EServiceNone)
//!                             Verify Privacy App gets RequestComplete (LBS->Privacy App)   >> ProcessRequestComplete(KErrNone)
//! @SYMTestExpectedResults     GPS module is asked to run in PTB mode. Module will return the position; privacy app notified of gps position with techtype 'terminal based'
//! @SYMTestType                CIT
//! @SYMTESTSTATUS              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBORTACAP-TATBNET
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsMTLRGpsOptions c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBORTACAP-TATBNET
END_TESTCASE SFLBS-MTLR-TBORTACAP-TATBNET-001

//--------------------------------------------------------------- Module Caps = TB && TA -----------------------------------------------------------------------

// Change module caps to Hybrid (TA && TB):
RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_UTILS CopyFile c:\testdata\configs\ctagpshybridmoduledatasource.ini  c:\private\10282253\lbs\locmods\agpsintegmodule.ini
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs


PRINT ----------------------------------------------------------------------------------------------------------------------------------------------------


START_TESTCASE                SFLBS-MTLR-TBANDTACAP-TBNETWORK-001
//! @SYMTestCaseID              SFLBS-MTLR-TBANDTACAP-TBNETWORK-001
//! @SYMTestCaseDesc            MT-LR request with:
//!                             mod caps = TB && TA
//!                             network wants TB
//!                             module supplies accurate position
//! @SYMTestPriority            Medium
//! @SYMTestActions             Get device capabilities - TB && TA
//!                             Read network request mode from test config - TB
//!                             Read 'position originator' (network/module) from test config - module
//!                             create the protocol module proxy
//!                             Verify AdviceSystemStatus (LBS-->PM)       >> AdviceSystemStatus(ESystemStatusNone)
//!                             Send Status Update for MTLR (PM-->LBS)      << ProcessStatusUpdate(EServiceMobileTerminated)
//!                             Send Privacy Request        << ProcessPrivacyRequest()
//!                             Verify ProcessNetworkLocationRequest() (LBS->Privacy App)   >> ProcessNetworkLocationRequest()
//!                             Verify Privacy Request accepted (LBS->PM)     >> RespondPrivacyRequest(EPrivacyResponseAccepted)
//!                             Send MC  (PM->LBS):
//!                             Send Ref Position        << ProcessLocationUpdate(ref pos)
//!                             Send Assistance Data        << ProcessAssistanceData(EAssistanceDataReferenceLocation)
//!                             Send Location Request        << ProcessLocationRequest(TB, alpha2 timeout)
//!                             Verify Privacy App gets RefPos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(Ref pos)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response  (LBS-->PM)       >> RespondLocationRequest(gps pos)
//!                             Verify Privacy App gets gps Pos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(gps pos)
//!                             Send SessionComplete (PM-->LBS)       << ProcessSessionComplete(KErrNone)
//!                             Send Status Update (PM-->LBS)       << ProcessStatusUpdate(EServiceNone)
//!                             Verify Privacy App gets RequestComplete (LBS->Privacy App)   >> ProcessRequestComplete(KErrNone)
//! @SYMTestExpectedResults     GPS module is asked to run in PTB mode. Module will return the position; privacy app notified of gps position with techtype 'terminal based'
//! @SYMTestType                CIT
//! @SYMTESTSTATUS              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBANDTACAP-TBNET
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsMTLRGpsOptions c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBANDTACAP-TBNET
END_TESTCASE SFLBS-MTLR-TBANDTACAP-TBNETWORK-001


// Note: Currently all the tests cases check for a SystemStatus update being sent by lbs. But this only happens on startup.
// Alternative would be to remove Stop Start and not have all tests checking for status update...?
RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs



PRINT ----------------------------------------------------------------------------------------------------------------------------------------------------


START_TESTCASE                SFLBS-MTLR-TBANDTACAP-TBTANETWORK-001
//! @SYMTestCaseID              SFLBS-MTLR-TBANDTACAP-TBTANETWORK-001
//! @SYMTestCaseDesc            MT-LR request with:
//!                             mod caps = TB && TA
//!                             network wants TB+TA
//!                             module supplies 2 sets of measurements then a position
//! @SYMTestPriority            Medium
//! @SYMTestActions             Get device capabilities - TB && TA
//!                             Read network request mode from test config - TB+TA
//!                             Read 'position originator' (network/module) from test config - module
//!                             create the protocol module proxy
//!                             Verify AdviceSystemStatus (LBS-->PM)       >> AdviceSystemStatus(ESystemStatusNone)
//!                             Send Status Update for MTLR (PM-->LBS)      << ProcessStatusUpdate(EServiceMobileTerminated)
//!                             Send Privacy Request        << ProcessPrivacyRequest()
//!                             Verify ProcessNetworkLocationRequest() (LBS->Privacy App)   >> ProcessNetworkLocationRequest()
//!                             Verify Privacy Request accepted (LBS->PM)     >> RespondPrivacyRequest(EPrivacyResponseAccepted)
//!                             Send MC  (PM->LBS):
//!                             Send Ref Position        << ProcessLocationUpdate(ref pos)
//!                             Send Assistance Data        << ProcessAssistanceData(EAssistanceDataReferenceLocation)
//!                             Send Location Request        << ProcessLocationRequest(TB+TA, alpha2 timeout)
//!                             Verify Privacy App gets RefPos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(Ref pos)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response with measurement (LBS-->PM)     >> RespondLocationRequest(meas)
//!                             Send Location Request  (PM->LBS)      << ProcessLocationRequest(TB+TA, t timeout)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response with measurement (LBS-->PM)     >> RespondLocationRequest(meas)
//!                             Send Location Request  (PM->LBS)      << ProcessLocationRequest(TB+TA, t timeout)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response  (LBS-->PM)       >> RespondLocationRequest(gps pos)
//!                             Verify Privacy App gets gps Pos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(gps pos)
//!                             Send SessionComplete (PM-->LBS)       << ProcessSessionComplete(KErrNone)
//!                             Send Status Update (PM-->LBS)       << ProcessStatusUpdate(EServiceNone)
//!                             Verify Privacy App gets RequestComplete (LBS->Privacy App)   >> ProcessRequestComplete(KErrNone)
//! @SYMTestExpectedResults     GPS module is asked to run in Hybrid mode. Module will return measurements and then a position; privacy app notified of gps position with techtype 'terminal based'
//! @SYMTestType                CIT
//! @SYMTESTSTATUS              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBANDTACAP-TBTANET
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsMTLRGpsOptions c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBANDTACAP-TBTANET
END_TESTCASE SFLBS-MTLR-TBANDTACAP-TBTANETWORK-001


// Note: Currently all the tests cases check for a SystemStatus update being sent by lbs. But this only happens on startup.
// Alternative would be to remove Stop Start and not have all tests checking for status update...?
RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs


PRINT ----------------------------------------------------------------------------------------------------------------------------------------------------


START_TESTCASE                SFLBS-MTLR-TBANDTACAP-TANETWORK-001
//! @SYMTestCaseID              SFLBS-MTLR-TBANDTACAP-TANETWORK-001
//! @SYMTestCaseDesc            MT-LR request with:
//!                             mod caps = TB && TA
//!                             network wants TA
//! @SYMTestPriority            Medium
//! @SYMTestActions             Get device capabilities - TB && TA
//!                             Read network request mode from test config - TA
//!                             Read 'position originator' (network/module) from test config - network
//!                             create the protocol module proxy
//!                             Verify AdviceSystemStatus (LBS-->PM)       >> AdviceSystemStatus(ESystemStatusNone)
//!                             Send Status Update for MTLR (PM-->LBS)      << ProcessStatusUpdate(EServiceMobileTerminated)
//!                             Send Privacy Request        << ProcessPrivacyRequest()
//!                             Verify ProcessNetworkLocationRequest() (LBS->Privacy App)   >> ProcessNetworkLocationRequest()
//!                             Verify Privacy Request accepted (LBS->PM)     >> RespondPrivacyRequest(EPrivacyResponseAccepted)
//!                             Send MC  (PM->LBS):
//!                             Send Ref Position        << ProcessLocationUpdate(ref pos)
//!                             Send Assistance Data        << ProcessAssistanceData(EAssistanceDataReferenceLocation)
//!                             Send Location Request        << ProcessLocationRequest(TA, alpha2 timeout)
//!                             Verify Privacy App gets RefPos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(Ref pos)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response with measurement (LBS-->PM)     >> RespondLocationRequest(meas)
//!                             Send Location Request  (PM->LBS)      << ProcessLocationRequest(TA, t timeout)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response with measurement (LBS-->PM)     >> RespondLocationRequest(meas)
//!                             Send SessionComplete (PM-->LBS)       << ProcessSessionComplete(KErrNone)
//!                             Send Status Update (PM-->LBS)       << ProcessStatusUpdate(EServiceNone)
//!                             Verify Privacy App gets RequestComplete (LBS->Privacy App)   >> ProcessRequestComplete(KErrNone)
//! @SYMTestExpectedResults     GPS module is asked to run in PTA mode. Module will return measurements. Privacy App gets RequestComplete with KErrNone.
//!                             Note that privacy app does not see final gps position calculated by network.
//! @SYMTestType                CIT
//! @SYMTESTSTATUS              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBANDTACAP-TANET
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsMTLRGpsOptions c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBANDTACAP-TANET
END_TESTCASE SFLBS-MTLR-TBANDTACAP-TANETWORK-001

// Note: Currently all the tests cases check for a SystemStatus update being sent by lbs. But this only happens on startup.
// Alternative would be to remove Stop Start and not have all tests checking for status update...?
RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs


PRINT ----------------------------------------------------------------------------------------------------------------------------------------------------


START_TESTCASE                SFLBS-MTLR-TBANDTACAP-TATBNETWORK-001
//! @SYMTestCaseID              SFLBS-MTLR-TBANDTACAP-TATBNETWORK-001
//! @SYMTestCaseDesc            MT-LR request with:
//!                             mod caps = TB && TA
//!                             network wants TA+TB
//!                             module supplies one (complete) position
//! @SYMTestPriority            Medium
//! @SYMTestActions             Get device capabilities - TB && TA
//!                             Read network request mode from test config - TA+TB
//!                             Read 'position originator' (network/module) from test config - module
//!                             create the protocol module proxy
//!                             Verify AdviceSystemStatus (LBS-->PM)       >> AdviceSystemStatus(ESystemStatusNone)
//!                             Send Status Update for MTLR (PM-->LBS)      << ProcessStatusUpdate(EServiceMobileTerminated)
//!                             Send Privacy Request        << ProcessPrivacyRequest()
//!                             Verify ProcessNetworkLocationRequest() (LBS->Privacy App)   >> ProcessNetworkLocationRequest()
//!                             Verify Privacy Request accepted (LBS->PM)     >> RespondPrivacyRequest(EPrivacyResponseAccepted)
//!                             Send MC  (PM->LBS):
//!                             Send Ref Position        << ProcessLocationUpdate(ref pos)
//!                             Send Assistance Data        << ProcessAssistanceData(EAssistanceDataReferenceLocation)
//!                             Send Location Request        << ProcessLocationRequest(TA+TB, alpha2 timeout)
//!                             Verify Privacy App gets RefPos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(Ref pos)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response with measurement (LBS-->PM)     >> RespondLocationRequest(meas)
//!                             Send Location Request  (PM->LBS)      << ProcessLocationRequest(TA+TB, t timeout)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response with measurement (LBS-->PM)     >> RespondLocationRequest(meas)
//!                             Send Location Request  (PM->LBS)      << ProcessLocationRequest(TA+TB, t timeout)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response  (LBS-->PM)       >> RespondLocationRequest(gps pos)
//!                             Verify Privacy App gets gps Pos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(gps pos)
//!                             Send SessionComplete (PM-->LBS)       << ProcessSessionComplete(KErrNone)
//!                             Send Status Update (PM-->LBS)       << ProcessStatusUpdate(EServiceNone)
//!                             Verify Privacy App gets RequestComplete (LBS->Privacy App)   >> ProcessRequestComplete(KErrNone)
//! @SYMTestExpectedResults     GPS module is asked to run in Hybrid mode. Module will return measurements and then a position; privacy app notified of gps position with techtype 'terminal based'
//! @SYMTestType                CIT
//! @SYMTESTSTATUS              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBANDTACAP-TATBNET
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsMTLRGpsOptions c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBANDTACAP-TATBNET
END_TESTCASE SFLBS-MTLR-TBANDTACAP-TATBNETWORK-001

RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_SetPTBMode

// Note: Currently all the tests cases check for a SystemStatus update being sent by lbs. But this only happens on startup.
// Alternative would be to remove Stop Start and not have all tests checking for status update...?
RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs

PRINT ----------------------------------------------------------------------------------------------------------------------------------------------------


START_TESTCASE                SFLBS-MTLR-TBANDTACAP-NOTSPECIFIEDNETWORK-001
//! @SYMTestCaseID              SFLBS-MTLR-TBANDTACAP-NOTSPECIFIEDNETWORK-001
//! @SYMTestCaseDesc            MT-LR request with:
//!                             mod caps = TB && TA
//!                             network doesn't specify mode
//!                             module supplies accurate position
//! @SYMTestPriority            Medium
//! @SYMTestActions             Get device capabilities - TB && TA
//!                             Read network request mode from test config - unspecified
//!                             Read 'position originator' (network/module) from test config - module
//!                             create the protocol module proxy
//!                             Verify AdviceSystemStatus (LBS-->PM)       >> AdviceSystemStatus(ESystemStatusNone)
//!                             Send Status Update for MTLR (PM-->LBS)      << ProcessStatusUpdate(EServiceMobileTerminated)
//!                             Send Privacy Request        << ProcessPrivacyRequest()
//!                             Verify ProcessNetworkLocationRequest() (LBS->Privacy App)   >> ProcessNetworkLocationRequest()
//!                             Verify Privacy Request accepted (LBS->PM)     >> RespondPrivacyRequest(EPrivacyResponseAccepted)
//!                             Send MC  (PM->LBS):
//!                             Send Ref Position        << ProcessLocationUpdate(ref pos)
//!                             Send Assistance Data        << ProcessAssistanceData(EAssistanceDataReferenceLocation)
//!                             Send Location Request        << ProcessLocationRequest(TB, alpha2 timeout)
//!                             Verify Privacy App gets RefPos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(Ref pos)
//!                             Verify Assistance data request (LBS-->PM)     >> RequestAssistanceData(0)
//!                             Verify Location Response  (LBS-->PM)       >> RespondLocationRequest(gps pos)
//!                             Verify Privacy App gets gps Pos (LBS->Privacy App)    >> ProcessNetworkPositionUpdate(gps pos)
//!                             Send SessionComplete (PM-->LBS)       << ProcessSessionComplete(KErrNone)
//!                             Send Status Update (PM-->LBS)       << ProcessStatusUpdate(EServiceNone)
//!                             Verify Privacy App gets RequestComplete (LBS->Privacy App)   >> ProcessRequestComplete(KErrNone)
//! @SYMTestExpectedResults     GPS module is asked to run in PTB mode (default admin setting). Module will return the position; privacy app notified of gps position with techtype 'terminal based'
//! @SYMTestType                CIT
//! @SYMTESTSTATUS              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBANDTACAP-NOTSPECIFIEDNET
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsMTLRGpsOptions c:\testdata\configs\sf_lbs_mtlr.ini MTLR-TBANDTACAP-NOTSPECIFIEDNET
END_TESTCASE SFLBS-MTLR-TBANDTACAP-NOTSPECIFIEDNETWORK-001




//--------------------------------------------------------------------- END TESTS - Tidyup ---------------------------------------------------------------------

RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs

RUN_UTILS DeleteFile c:\private\10282253\lbs\locmods\agpsintegmodule.ini


