common/tools/ats/smoketest/lbs/common/inc/ctlbsstepverifyloginfo.h
changeset 748 e13acd883fbe
child 872 17498133d9ad
equal deleted inserted replaced
747:76f9aaeefbab 748:e13acd883fbe
       
     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 the License "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // @file ctlbsstepverifyloginfo.h
       
    15 // This contains the header file for verify position info array test step.
       
    16 // 
       
    17 //
       
    18 
       
    19 #ifndef __CT_LBS_VERIFY_LOG_INFO_H__
       
    20 #define __CT_LBS_VERIFY_LOG_INFO_H__
       
    21 
       
    22 #include "ctlbsstep.h"
       
    23 #include "ctlbsserver.h"
       
    24 
       
    25 // From test implementation
       
    26 #include "lbstransmitlocationlogevent.h"
       
    27 //#include "Te_LbsLoggingSuiteStepBase.h"
       
    28 
       
    29 #include "lbslogger.h"
       
    30 #include <logcli.h>
       
    31 #include <logview.h>
       
    32 #include <logwrap.h>
       
    33 
       
    34 #include "tlbsutils.h"
       
    35 #include "ctlbsasyncwaiter.h"
       
    36 
       
    37 // Includes for Log Comparison
       
    38 #include <lbslogevent.h>
       
    39 #include <lbsselflocatelogevent.h>
       
    40 #include <lbsexternallocatelogevent.h>
       
    41 #include <lbstransmitlocationlogevent.h>
       
    42 #include <lbsnetworklocatelogevent.h>
       
    43 #include <lbsassistancedatalogevent.h>
       
    44 
       
    45 // Literals used
       
    46 _LIT(KLbsStep_VerifyLogInfo, "LbsStep_VerifyLogInfo");
       
    47 _LIT(KDest, "07712345678");
       
    48 
       
    49 #define REFPOS_LAT				52.2
       
    50 #define REFPOS_LONG				0.2
       
    51 #define REFPOS_ALT				10
       
    52 #define REFPOS_HORZ_ACCURACY	100
       
    53 #define REFPOS_VERT_ACCURACY	100
       
    54 
       
    55 #define REFPOS_LAT_OTHER		49.2
       
    56 #define REFPOS_LONG_OTHER		3.5
       
    57 #define REFPOS_ALT_OTHER		50.0
       
    58 #define REFPOS_HORZ_ACCURACY_OTHER	2.0
       
    59 #define REFPOS_VERT_ACCURACY_OTHER	3.0
       
    60 
       
    61 class CT_LbsStep_VerifyLogInfo : public CT_LbsStep
       
    62 	{
       
    63 public:
       
    64 	static CT_LbsStep_VerifyLogInfo* New(CT_LbsServer& aParent);
       
    65 	static CT_LbsStep_VerifyLogInfo* NewL(CT_LbsServer& aParent);
       
    66 	~CT_LbsStep_VerifyLogInfo();
       
    67 	CT_LbsStep_VerifyLogInfo();
       
    68 
       
    69 	TVerdict doTestStepPreambleL();
       
    70 	TVerdict doTestStepPostambleL();
       
    71 
       
    72 
       
    73 	virtual TVerdict doTestStepL();
       
    74 	static TInt SelfLocateLogEventTimestampCompare(const CLbsSelfLocateLogEvent& aLog1,
       
    75 										  const CLbsSelfLocateLogEvent& aLog2);
       
    76 
       
    77 
       
    78 	enum TLogType
       
    79 	{
       
    80 	/** Logging an Autonomous self Locate location request 3.3.1 */
       
    81 	EAutonomousSelfLocateRequest = 0,
       
    82 	
       
    83 	/** Logging an MO-LR Self Locate location request 3.3.2 */
       
    84 	EMOLRSelfLocateRequest,
       
    85 
       
    86 	/** Logging an MO-LR Cell Based location request 3.3.3 */
       
    87 	EMOLRCellBasedLocationRequest,
       
    88 
       
    89 	/** Logging an MO-LR Transmit to 3rd Party Location 3.3.4 */
       
    90 	EMOLRTransmitTo3rdPartyLocationRequest,
       
    91 
       
    92 	/** Logging a Mobile Terminated Location Request 3.3.5 */
       
    93 	EMTLR,
       
    94 	
       
    95 	/** Logging MO-LR Tracking Location Requests 3.3.6 */
       
    96 	EMOLRTrackingLocationRequest,
       
    97 	
       
    98 	/** Logging Autonomous Tracking Location Requests 3.3.7 */
       
    99 	EAutonomousTrackingLocationRequest,
       
   100 	
       
   101 	/** Update an existing Event log entry 3.3.8 */
       
   102 	EUpdateExistingEventLogEntry,
       
   103 		
       
   104 	};
       
   105 
       
   106 
       
   107 private:
       
   108 	CT_LbsStep_VerifyLogInfo(CT_LbsServer& aParent);
       
   109 	
       
   110 	TVerdict ReadFromLogL(TInt aUidForTheLogType);
       
   111 	void ClearLog();
       
   112 	void InitialiseRHS();
       
   113 	void InitialiseRHSforMTLR();
       
   114 	TPositionInfo* CommonPositionInfo();
       
   115 	
       
   116 	//5 log type test mechanisms
       
   117 	void SelfLocateLogTest();
       
   118 	void NetworkLocateLogTest();
       
   119 	void ExternalLocateLogTest();
       
   120 	void X3PLocateLogTest();
       
   121 	void AssistanceDataLogTest();
       
   122 	
       
   123 	//Top level functionality
       
   124 	void AutonomousSelfLocateLogTest();
       
   125 	void MOLRSelfLocateRequest();
       
   126 	void MOLRCellBasedLocationRequest();
       
   127 	void MOLRTransmitTo3rdPartyLocationRequest();
       
   128 	void MTLR();
       
   129 	void MOLRTrackingLocationRequest();
       
   130 	void AutonomousTrackingLocationRequest();
       
   131 	void SecondPositionFromArray(TPositionInfo* aPosInfoSecond);
       
   132 	
       
   133 	
       
   134 	TInt iLogType; // Can be defined in ENums
       
   135 	T_LbsUtils iUtils;
       
   136 	
       
   137 	// Member variables for Log reading
       
   138 	RFs itheFs;
       
   139 	CLogClient* iclient;
       
   140 	CLogViewEvent* iview;
       
   141 	CT_LbsAsyncWaiter* iActiveWaiter;
       
   142 	TPositionInfo* iRefPosTwo;
       
   143 		
       
   144 	// Right hand sides of comparisons
       
   145 	CLbsSelfLocateLogEvent*			iSelfLocateLogIntiailisedFromValues;
       
   146 	CLbsExternalLocateLogEvent*		iExternalLocateLogIntiailisedFromValues;
       
   147 	CLbsTransmitLocationLogEvent*	iX3PLogIntiailisedFromValues;
       
   148 	CLbsNetworkLocateLogEvent*		iNetworkLocateLogIntiailisedFromValues;
       
   149 	CLbsAssistanceDataLogEvent*		iAssistanceDataLogIntiailisedFromValuesFirst; 
       
   150 	
       
   151 	
       
   152 	// Comparison accuracy
       
   153 	T_LbsUtils::TComparisonAccuracyType iWhatAccuracyToUse;
       
   154 	
       
   155 
       
   156 
       
   157 
       
   158 protected:
       
   159 	void ConstructL();
       
   160 
       
   161 	};
       
   162 
       
   163 #endif //__CT_LBS_VERIFY_LOG_INFO_H__