lbstest/lbstestproduct/lbsx3p/inc/ctlbsx3psteptransmitconcurrent.h
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 ctlbsx3psteptransmitconcurrent.h
       
    15 // This contains the header file for Location Data Source Tests
       
    16 // 
       
    17 //
       
    18 
       
    19 #ifndef __CT_LBS_X3P_STEP_TRANSMIT_CONCURRENT__
       
    20 #define __CT_LBS_X3P_STEP_TRANSMIT_CONCURRENT__
       
    21 
       
    22 /**
       
    23  * LBS includes.
       
    24  */
       
    25 #include <lbs.h>
       
    26 #include <lbscommon.h>
       
    27 #include <lbs/lbslocerrors.h>
       
    28 
       
    29  /**
       
    30   * LBS test includes.
       
    31   */
       
    32 #include "ctlbsx3pserver.h"
       
    33 #include <lbs/test/tlbsutils.h>
       
    34 #include "ctlbsx3pdotransmitpos.h"
       
    35  
       
    36  /**
       
    37   * Literals and constants used
       
    38   */  
       
    39 _LIT(KLbsX3PStep_Transmit_Concurrent, "LbsX3PStep_Transmit_Concurrent");
       
    40 _LIT(KConcurrentDestination, "07712345678");
       
    41 const TUint KConcurrentTransmitPriority = X3P_PRIORITY_PUSH;
       
    42 
       
    43 
       
    44 /**
       
    45  * The CT_LbsX3PStep_Transmit_Concurrent class was written
       
    46  * with the intention of running concurrently using TEF commands.
       
    47  * It performs the common tasks of installing a scheduler, creating
       
    48  * verifiable position info, performing an X3P task, verifying recieved 
       
    49  * positions and finally verifying log info.
       
    50  * 
       
    51  * \author Peter Turner
       
    52  */
       
    53 class CT_LbsX3PStep_Transmit_Concurrent :public CTestStep,
       
    54 											  CActive,
       
    55 											  MT_LbsX3PDoTransmitPosObserver
       
    56 	{
       
    57 public:
       
    58 	/**
       
    59 	 * Standard constructors, destructors and test step entry point.
       
    60 	 */
       
    61 	~CT_LbsX3PStep_Transmit_Concurrent();
       
    62 	static CT_LbsX3PStep_Transmit_Concurrent* New();
       
    63 	void ConstructL();
       
    64 	
       
    65 	virtual TVerdict doTestStepL();
       
    66 
       
    67 
       
    68 	void MT_LbsX3PDoRefPosCallback(const TRequestStatus& aStatus,const TPositionInfo& aRefPosInfo);
       
    69 	void MT_LbsX3PDoTransmitPosCallback(TRequestStatus& aStatus, CT_LbsX3PDoTransmitPos* aDoTransmitPosAO);
       
    70 
       
    71 private:
       
    72 	CT_LbsX3PStep_Transmit_Concurrent();
       
    73 	
       
    74 	/**
       
    75 	 * These methods perform the functions normally found in other test steps.
       
    76 	 * This functionality had to be copied into methods to run correctly
       
    77 	 * in a concurrent fashion.
       
    78 	 */
       
    79 	void CreateVerifyPositionInfoL();
       
    80 	void VerifyPosInfo();
       
    81 	// VerifyLogInfo
       
    82 	TInt OpenNetSim();
       
    83 	
       
    84 	/**
       
    85 	 * Current test case value initialised from the ini files value.
       
    86 	 */
       
    87 	TInt iTestCaseId;
       
    88 	
       
    89 	/**
       
    90 	 * Network Simulator, to allow MT-LRs and to monitor network messages.
       
    91 	 */
       
    92 	RLbsNetSimTest iNetSim;
       
    93 	
       
    94 	/**
       
    95 	 * This objects active scheduler
       
    96 	 */
       
    97 	CActiveScheduler* iScheduler;
       
    98 
       
    99 	/**
       
   100 	 * Server and session used during the tests.
       
   101 	 */
       
   102 	RLbsTransmitPositionServer iServer;
       
   103 	RLbsTransmitPosition iPositionTransmitter;
       
   104 	CT_LbsX3pRefLocWaiter* iRefLocWaiter;
       
   105 	
       
   106 	/**
       
   107 	 * Position quality used to setup Net sim.
       
   108 	 */
       
   109 	TLbsNetPosRequestQuality iNetPosQuality;
       
   110 
       
   111 	/** 
       
   112 	 * Reference position used to setup Net sim and later verification.#
       
   113 	 */
       
   114 	TPosition iRefPos;
       
   115 	
       
   116 	/** 
       
   117 	 * Shared data to store positions from ini file. CONCURRENT test step
       
   118 	 * command does not work when the -SharedData parameter is used on the server.
       
   119 	 * The -SharedData functionality is internalised here.
       
   120 	 */
       
   121 	RPointerArray<TAny>	iVerifyPosInfoArr;
       
   122 	RPointerArray<TAny>	iCurrentPosInfoArr;
       
   123 	
       
   124 	/** 
       
   125 	 * Flag used to indicate if the A-GPS integration test module is being used during testing.
       
   126 	 */
       
   127 	TBool iTestModuleInUse;
       
   128 	
       
   129 protected:
       
   130 	/** 
       
   131 	 * Functions from CActive:
       
   132 	 */
       
   133 	virtual void DoCancel();
       
   134 	virtual void RunL();
       
   135 	virtual TInt RunError(TInt aError);
       
   136 	
       
   137 	};
       
   138 
       
   139 #endif //__CT_LBS_X3P_STEP_TRANSMIT_CONCURRENT__