supl/locationomasuplpostester/epos_comasuplpostestermodulecfg/inc/epos_comasuplpostesterlogger.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Provides logging utility.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_COMASUPLPOSTESTERLOGGER_H
       
    20 #define C_COMASUPLPOSTESTERLOGGER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <e32des8.h>
       
    24 #include <epos_comasuplvelocity.h>
       
    25 #include "epos_comasuplpostestercategory.h"
       
    26 class CImplementationInformation;
       
    27 class CStifLogger;
       
    28 class TTime;
       
    29 class COMASuplReqAsstData;
       
    30 class TOMASuplNavigationModel;
       
    31 class COMASuplSETCapabilities;
       
    32 class TOMASuplPosTechnology;   
       
    33 class TOMASuplPrefMethod;
       
    34 class TOMASuplPosProtocol;
       
    35 class TOMASuplSatelliteInfoElement;
       
    36 class COMASuplPosition;
       
    37 class TOMASuplUtcTime;
       
    38 class TOMASuplPositionEstimate;
       
    39 class COMASuplVelocity;
       
    40 class COMASuplHorizAndVertVelocity;
       
    41 class COMASuplHorizUncertVelocity;
       
    42 class COMASuplHorizAndVertUncertVelocity;
       
    43 class COMASuplPosPayload;
       
    44 class COMASuplInfoRequestList;
       
    45 class TOMASuplUncertainty;
       
    46 class TOMASuplAltitudeInfo;
       
    47 
       
    48 /** Maximum length of the buffer holding date and time. */
       
    49 const TInt KDateTimeLength = 32;
       
    50 
       
    51 /** Maximum length of the buffer holding time difference. */
       
    52 const TInt KTimeDiffLength = 64;
       
    53 
       
    54 /** Maximum length of the buffer on stack. */
       
    55 const TInt KMaxBufLength = 512;
       
    56 
       
    57 /** Maximum length of the buffer holding class name. */
       
    58 const TInt KClassNameLength = 512;
       
    59 
       
    60 /** Maximum length of the buffer that can be used as extra buffer */
       
    61 const TInt KExtraBuffer = 32;
       
    62 
       
    63 /** Value user to initialize integers */
       
    64 const TUint16 KNoValue16 = 9999;
       
    65 const TInt KNoValue = -99999;
       
    66 const TUint8 KNoValue8 = 127;
       
    67 
       
    68 /** Maximum length of the buffer holding a hexadecimal value for an ASCII */
       
    69 const TInt KMaxHexSize = 6;
       
    70 
       
    71 /** Provides a buffer to hold class name. */
       
    72 typedef TBuf8<KClassNameLength> TClassName;
       
    73 
       
    74 /** Provides a buffer to hold list of all parent classes in the hierarchy. */
       
    75 typedef TBuf8<KMaxBufLength> TContainer;
       
    76 
       
    77 /** Provides a buffer to hold hexadecimal equivalent of an ASCII*/
       
    78 typedef TBuf8<KMaxHexSize> THexVal;
       
    79 
       
    80 /** Path for log file.*/
       
    81 _LIT(KLoggingDir, "c:\\logs\\postester\\");
       
    82 
       
    83 /** Path for log folder relative to c:\logs.*/
       
    84 _LIT(KDirName, "postester");
       
    85 
       
    86 /** Separator between two objects logged in the file. */
       
    87 _LIT8(KReqLogObjEnd, "+++++++++++++++++++++++++++++++++++++++++++++++++++");
       
    88 
       
    89 /** End of request list logged in the file. */
       
    90 _LIT8(KReqLogEnd, "***************************************************");
       
    91 
       
    92 /** Constant used for logging*/
       
    93 _LIT8(KSendingPosMsg, "Info: Sending POS Message to Message plugin.");
       
    94 
       
    95 /** Constant used for logging*/
       
    96 _LIT8(KSessionInitialized, "Info: POS Session Initialized.");
       
    97 
       
    98 /** Constant used for logging*/
       
    99 _LIT8(KInitializingSession, "Info: Initializing POS Session.");
       
   100 
       
   101 /** Constant used for logging*/
       
   102 _LIT8(KInitializingHandler, "Info: Initializing POS Handler.");
       
   103 
       
   104 _LIT8(KInitializedHandler, "Info: PosHandler Initialized.");
       
   105 
       
   106 /** Constant used for logging*/
       
   107 _LIT8(KSessionInitializeFail, "Error: Could not initialize POS Session.");
       
   108 
       
   109 /** Constant used for logging*/
       
   110 _LIT8(KHandlerCreateFail, "Error: Could not create POS Handler.");
       
   111 
       
   112 /** Constant used for logging*/
       
   113 _LIT8(KHandlerInitFail, "Error: Could not initialize POS Handler.");
       
   114 
       
   115 /** Constant used for logging*/
       
   116 _LIT8(KSessionCreated, "Info: POS Session Created.");
       
   117 
       
   118 /** Constant used for logging*/
       
   119 _LIT8(KCreatingSession, "Info: Creating POS Session.");
       
   120 
       
   121 /** Constant used for logging*/
       
   122 _LIT8(KCreatingSessionFail,  "Error: Could not Create New Session." );
       
   123 
       
   124 /** Constant used for logging*/
       
   125 _LIT8(KSpace, " ");
       
   126 
       
   127 /** Constant used for logging*/
       
   128 _LIT8(KComma, ",");
       
   129 
       
   130 /** Constant used formatting ASCII to hexadecimal*/
       
   131 _LIT8(KHexFormat, "%03x");
       
   132 
       
   133 /** Constant used for logging*/
       
   134 _LIT8(KNotSet, " Not Set");
       
   135 
       
   136 /** Constant used for logging*/
       
   137 _LIT8(KErrCode, " Code = ");
       
   138 
       
   139 /** Constant used for logging*/
       
   140 _LIT8(KTrue, " True");
       
   141 
       
   142 /** Constant used for logging*/
       
   143 _LIT8(KFalse, " False");
       
   144 
       
   145 /** Constant used for logging*/
       
   146 _LIT8(KScope, "::");
       
   147 
       
   148 /** Constant used for logging*/
       
   149 _LIT8(KEquals, " = ");
       
   150 
       
   151 /** Constant used for logging*/
       
   152 _LIT8(KHour, " Hours, ");
       
   153 
       
   154 /** Constant used for logging*/
       
   155 _LIT8(KMins, " Mins, ");
       
   156 
       
   157 /** Constant used for logging*/
       
   158 _LIT8(KSecs, " Secs, ");
       
   159 
       
   160 /** Constant used for logging*/
       
   161 _LIT8(KMicroSecs, " MicroSecs ");
       
   162 
       
   163 /** Constant used for logging*/
       
   164 _LIT8(KNULL, "");
       
   165 
       
   166 /** Constant used for logging*/
       
   167 _LIT8(KExclamation, "!");
       
   168 
       
   169 /** Constant used for logging*/
       
   170 _LIT8(KUserCancelsTest, "Info: Testing canceled by user.");
       
   171 
       
   172 /** Constant used for logging*/
       
   173 _LIT8(KExecHandlerNewL, "Info: Execution Time of COMASuplPosHandlerBase::NewL()");
       
   174 
       
   175 /** Constant used for logging*/
       
   176 _LIT8(KExecCreateNewSessionL, "Info: Execution Time of COMASuplPosHandlerBase::CreateNewSessionL()");
       
   177 
       
   178 /** Constant used for logging*/
       
   179 _LIT8(KTestAbored, "Test Aborted.");
       
   180 
       
   181 /** Constant used for logging*/
       
   182 _LIT8(KSessionEnd, "Info: Ending POS Session.");
       
   183 
       
   184 /** Constant used for logging status of test*/
       
   185 _LIT8(KTestNotStarted, "Test Not Started");
       
   186 
       
   187 /** Constant used for logging information about test*/
       
   188 _LIT8(KInitializeErrStatus, "Error: COMASuplPosSessionBase::InitializeL completed with ");
       
   189 
       
   190 /** Constant used for logging status of test*/
       
   191 _LIT8(KTestComplete, "Testing Complete");
       
   192 
       
   193 /** Constant used for logging status of test*/
       
   194 _LIT8(KTestCanceled, "Testing Canceled");
       
   195 
       
   196 /** Constant used for logging status of test*/
       
   197 _LIT8(KTestAborted, "Error: Testing Aborted");
       
   198 
       
   199 /** Constant used for logging.*/
       
   200 _LIT8(KPosSessionInActive, "Warning: POS Session Inactive.");
       
   201 
       
   202 /** Constant used for logging.*/
       
   203 _LIT8(KMsgFileMsgExhausted, "Error: Messages in the Message file exhausted.");
       
   204 
       
   205 /** Constant used for logging.*/
       
   206 _LIT8(KEndingSession, "Info: Ending POS Session.");
       
   207 
       
   208 /** Constant used for logging.*/
       
   209 _LIT8(KCouldNotWrite, "Could not write data.");
       
   210 
       
   211 /** Constant used for logging.*/
       
   212 _LIT8(KLeaveInHandlerCreation,"Error: Leave occured in POS Handler creation.\
       
   213  Leave");
       
   214 
       
   215 /** Constant used for logging.*/
       
   216 _LIT8(KLeaveInHandlerInit,"Error: Leave occured in POS Handler Initialization\
       
   217 . Leave");
       
   218 
       
   219 /** Constant used for logging.*/
       
   220 _LIT8(KLeaveInCreateNewSession,"Error: Leave occured in POS Session creation\
       
   221 . Leave");
       
   222 
       
   223 /** Constant used for logging.*/
       
   224 _LIT8(KLeaveOccured,"Error: Leave occured. Leave");
       
   225 
       
   226 /** Constant used for logging.*/
       
   227 _LIT8(KLeaveRequestListCreation,"Error: Leave occured while creating request\
       
   228  list. Leave");
       
   229  
       
   230  /** Constant used for logging.*/
       
   231 _LIT8(KLeaveResettingPosition,"Error: Leave occured while resetting Position\
       
   232 . Leave");
       
   233 
       
   234 /** Constant used for logging.*/
       
   235 _LIT8(KLeaveInSessionInit,"Error: Leave occured in POS Session \
       
   236 Initialization. Leave");
       
   237 
       
   238 /** Constant used for logging.*/
       
   239 _LIT8(KLeaveInGetSuplInfo,"Error: Leave occured in GetSuplInfoL(). Leave");
       
   240 
       
   241 /** Constant used for logging.*/
       
   242 _LIT8(KLeaveInGetPosition,"Error: Leave occured in GetPositionL(). Leave");
       
   243 
       
   244 /** Constant used for logging.*/
       
   245 _LIT8(KReqCompWith,"Request completed with code: ");
       
   246 
       
   247 /** Constant used for logging.*/
       
   248 _LIT8(KSessionInitResult, "Session Initialization completed with ");
       
   249 
       
   250 /** Constant used for logging.*/
       
   251 _LIT8(KInfo,"Info: ");
       
   252 
       
   253 /** Constant used for logging.*/
       
   254 _LIT8(KWarning,"Warning: ");
       
   255 
       
   256 /** Constant used for logging.*/
       
   257 _LIT8(KError,"Error: ");
       
   258 
       
   259 /** Constant used for logging.*/
       
   260 _LIT8(KSessionId,"--SessionId: ");
       
   261 /**
       
   262  *  Provides logging facility.
       
   263  *
       
   264  *  Provides functionality to log parameters, messages and result.
       
   265  *
       
   266  *  @lib epos_comasuplpostestermodulecfg.lib
       
   267  *  @since S60 v3,1u
       
   268  */
       
   269 class COMASuplPosTesterLogger: public CBase
       
   270 	{
       
   271 	public:	// Constructors and destructor
       
   272 
       
   273 		 static COMASuplPosTesterLogger* NewL(const TDesC& aLogFile);
       
   274 		 virtual ~COMASuplPosTesterLogger();
       
   275 		
       
   276 	public:		//New functions
       
   277 
       
   278 		/**
       
   279 	     * Converts 8 bit ASCII information to Hexadecimal.
       
   280 	     *
       
   281 	     * @since S60 v3.1u
       
   282 	     * @param aAscii Data in ASCII.
       
   283 	     * @param aHex Data in Hexadecimal.
       
   284 	     * @return TInt Error code.
       
   285 	     */
       
   286 
       
   287 		 TInt ConvertAsciiToHex(const TDesC8& aAscii, HBufC8*& aHex);
       
   288 		 
       
   289 		/**
       
   290 	     * Converts 8 bit ASCII character to Hexadecimal.
       
   291 	     *
       
   292 	     * @since S60 v3.1u
       
   293 	     * @param aAsciiChar Character in ASCII.
       
   294 	     * @param aHexVal  Hexadecimal value of aAsciiChar.
       
   295 	     * @return TInt Error code.
       
   296 	     */
       
   297          TInt ConvertCharToHex(TUint8 aAsciiChar, THexVal& aHexVal);
       
   298 
       
   299 		/**
       
   300 	     * Writes DisplayName, Uid & Version of implementation into the logfile.
       
   301 	     *
       
   302 	     * @since S60 v3.1u
       
   303 	     * @param aImplementationInfo An implementation to be logged.
       
   304 	     * @return void
       
   305 	     */
       
   306 		 void WriteImplementationInfoL(
       
   307 		 			const CImplementationInformation& aImplementationInfo);
       
   308 		
       
   309 		/**	
       
   310 	     * Writes information in resource file into logfile .
       
   311 	     *
       
   312 	     * @since S60 v3.1u
       
   313 	     * @return void
       
   314 	     */
       
   315          void WritePosTesterParametersL();
       
   316         
       
   317 		/**
       
   318 	     * Writes summary of testing into the logfile.
       
   319 	     *
       
   320 	     * @since S60 v3.1u
       
   321 	     * @param aErrors Number of errors messages.
       
   322 	     * @param aWarnings Number of warnings messages.
       
   323 	     * @param aInfo Number of info messages.
       
   324 	     * @return void
       
   325 	     */
       
   326 		 void WriteSummaryL(TTestingStatus aTestStatus, TInt aInfo
       
   327 		 					, TInt aWarnings, TInt aErrors);
       
   328 		
       
   329 		/**
       
   330 	     * Gets current date & time into the argument.
       
   331 	     *
       
   332 	     * @since S60 v3.1u
       
   333 	     * @param aDateAndTime Gets current date an time.
       
   334 	     * @return void
       
   335 	     */
       
   336          void GetCurrentDateAndTime(TDes8& aDateAndTime);
       
   337 
       
   338         /**
       
   339 	     * Converts TDateTime object into a descriptor.
       
   340 	     *
       
   341 	     * @since S60 v3.1u
       
   342 	     * @param aDateAndTime Gets aDateTime as a string.
       
   343 	     * @param aDateAndTime TDateTime object whose data is required as a string.
       
   344 	     * @return void
       
   345 	     */
       
   346          void PrepareDateAndTimeString(TDes8& aDateAndTime
       
   347  										, TDateTime& aDateTime);
       
   348         
       
   349 		/**
       
   350 	     * Gets LogFile logger.
       
   351 	     *
       
   352 	     * @since S60 v3.1u
       
   353 	     * @return CStifLogger& Reference to StifLogger.
       
   354 	     */
       
   355          CStifLogger& GetLogFileLogger();
       
   356         
       
   357 		/**
       
   358 	     * Writes a line to file. If enough spcce is provided, appends
       
   359 	     * aSessionId to aLine.
       
   360 	     *
       
   361 	     * @since S60 v3.1u
       
   362 	     * @param aLine Line to be written in the log file.
       
   363 	     * @param aSessionId Session number. Used for multiple session test.
       
   364 	     * @return void
       
   365 	     */
       
   366          void WriteLine(const TDesC8& aLine, TInt aSessionId = 0);
       
   367          
       
   368         /**
       
   369 	     * Writes a "aLine Error code = ErrCode" to file.
       
   370 	     *
       
   371 	     * @since S60 v3.1u
       
   372 	     * @param aLine Line to be written in the log file.
       
   373 	     * @param aErrCode Error code to be logged.
       
   374 	     * @return void
       
   375 	     */
       
   376          void WriteStatus(const TDesC8& aLine, TInt aErrCode
       
   377          							, TInt aSessionId = 0
       
   378          							, const TDesC8* aCode = &KErrCode());
       
   379          
       
   380         /**
       
   381 	     * Writes a "aContainer::aVar = aData" to file.
       
   382 	     *
       
   383 	     * @since S60 v3.1u
       
   384 	     * @param aContainer Descriptor to be written in the log file.
       
   385 	     * @param aVar Name of the variable to be written in the log file.
       
   386 	     * @param aData Integer value of the variable.
       
   387 	     * @return void
       
   388 	     */
       
   389          void LogData(const TDesC8& aContainer
       
   390          							, const TDesC8& aVar, TInt aData);
       
   391 
       
   392         /**
       
   393 	     * Writes a "aContainer::aVar = aData" to file.
       
   394 	     *
       
   395 	     * @since S60 v3.1u
       
   396 	     * @param aContainer Descriptor to be written in the log file.
       
   397 	     * @param aVar Name of the variable to be written in the log file.
       
   398 	     * @param aData Descriptor value to be written in the log file.
       
   399 	     * @return void
       
   400 	     */
       
   401 		 void LogData(const TDesC8& aContainer, const TDesC8& aVar
       
   402 					, const TDesC8& aData);
       
   403 
       
   404 		/**
       
   405 	     * Provides a descriptor containing "aContainer::aVar".
       
   406 	     *
       
   407 	     * @since S60 v3.1u
       
   408 	     * @param aContainer Descriptor to be written in the log file.
       
   409 	     * @param aVar Name of the variable to be written in the log file.
       
   410 	     * @param aString Descriptor containing "aContainer::aVar".
       
   411 	     * @return void
       
   412 	     */
       
   413 		 void CreateStringL(const TDesC8& aContainer
       
   414 									, const TDesC8& aVar, HBufC8*& aString);
       
   415 
       
   416 		/**
       
   417 	     * Provides a descriptor containing "aContainer::aVar".
       
   418 	     *
       
   419 	     * @since S60 v3.1u
       
   420 	     * @param aContainer Descriptor to be written in the log file.
       
   421 	     * @param aVar Name of the variable to be written in the log file.
       
   422 	     * @param aString Descriptor containing "aContainer::aVar". If the
       
   423 	     * length of the descriptor is less than length(aContainer + aVar + 4)
       
   424 	     * it only contains aVar.
       
   425 	     * @return void
       
   426 	     */
       
   427 		 void CreateString(const TDesC8& aContainer
       
   428 							, const TDesC8& aVar, TClassName& aString);
       
   429 
       
   430 		/**
       
   431 	     * Provides a descriptor containing "aParent::aClass".
       
   432 	     *
       
   433 	     * @since S60 v3.1u
       
   434 	     * @param aParent Descriptor to be written in the log file.
       
   435 	     * @param aClass Name of the variable to be written in the log file.
       
   436 	     * @param aContainer Descriptor containing "aParent::aClass".
       
   437 	     * @return void
       
   438 	     */
       
   439 		 void CreateContainer(const TDesC8& aParent
       
   440 							, const TDesC8& aClass, TContainer& aContainer);
       
   441          
       
   442          /**
       
   443 	     * Logs an object of COMASuplReqAsstData.
       
   444 	     *
       
   445 	     * @since S60 v3.1u
       
   446 	     * @param aData Object to be written in the log file.
       
   447 	     * @return void
       
   448 	     */
       
   449          void LogSuplReqAsstData(COMASuplReqAsstData* aData);
       
   450 
       
   451 		/**
       
   452 	     * Logs an object of TOMASuplNavigationModel.
       
   453 	     *
       
   454 	     * @since S60 v3.1u
       
   455 	     * @param aContainer Name of object containing aNavModel.
       
   456 	     * @param aNavModel Object to be written in the log file.
       
   457 	     * @return void
       
   458 	     */
       
   459          void LogSuplNavigationModel(const TDesC8& aContainer
       
   460          							, TOMASuplNavigationModel& aNavModel);
       
   461 
       
   462 		/**
       
   463 	     * Logs an object of TOMASuplSatelliteInfoElement.
       
   464 	     *
       
   465 	     * @since S60 v3.1u
       
   466 	     * @param aContainer Name of object containing aSatInfo.
       
   467 	     * @param aSatInfo Object to be written in the log file.
       
   468 	     * @return void
       
   469 	     */
       
   470          void LogSuplSatelliteInfoElement(const TDesC8& aContainer
       
   471          						, TOMASuplSatelliteInfoElement& aSatInfo);
       
   472 
       
   473         /**
       
   474 	     * Logs an object of COMASuplSETCapabilities.
       
   475 	     *
       
   476 	     * @since S60 v3.1u
       
   477 	     * @param aSetCap Object to be written in the log file.
       
   478 	     * @return void
       
   479 	     */
       
   480          void LogSuplSETCapabilities(COMASuplSETCapabilities* aSetCap);
       
   481 
       
   482 		/**
       
   483 	     * Logs an object of TOMASuplPosTechnology.
       
   484 	     *
       
   485 	     * @since S60 v3.1u
       
   486 	     * @param aContainer Name of object containing aPosTech.
       
   487 	     * @param aPosTech Object to be written in the log file.
       
   488 	     * @return void
       
   489 	     */
       
   490          void LogSuplPosTechnology(const TDesC8& aContainer
       
   491          							, TOMASuplPosTechnology& aPosTech);
       
   492 
       
   493 		/**
       
   494 	     * Logs enum COMASuplSETCapabilities::TOMASuplPrefMethod.
       
   495 	     *
       
   496 	     * @since S60 v3.1u
       
   497 	     * @param aContainer Name of object containing aPosTech.
       
   498 	     * @param aPrefMethod Enum value to be written in the log file.
       
   499 	     * @return void
       
   500 	     */
       
   501          void LogSuplPrefMethod(const TDesC8& aContainer
       
   502          		, TInt aPrefMethod);
       
   503 
       
   504 		/**
       
   505 	     * Logs an object of TOMASuplPosProtocol.
       
   506 	     *
       
   507 	     * @since S60 v3.1u
       
   508 	     * @param aContainer Name of object containing aProtocol.
       
   509 	     * @param aProtocol Object to be written in the log file.
       
   510 	     * @return void
       
   511 	     */
       
   512          void LogSuplPosProtocol(const TDesC8& aContainer
       
   513          						, TOMASuplPosProtocol& aProtocol);
       
   514          
       
   515         /**
       
   516 	     * Logs an object of COMASuplPosition.
       
   517 	     *
       
   518 	     * @since S60 v3.1u
       
   519 	     * @param aPosition Object to be written in the log file.
       
   520 	     * @return void
       
   521 	     */
       
   522          void LogSuplPosition(COMASuplPosition* aPosition);
       
   523         
       
   524         /**
       
   525 	     * Logs an object of TOMASuplUtcTime.
       
   526 	     *
       
   527 	     * @since S60 v3.1u
       
   528 	     * @param aContainer Name of object containing aUtcTime.
       
   529 	     * @param aUtcTime Object to be written in the log file.
       
   530 	     * @return void
       
   531 	     */
       
   532          void LogSuplUtcTime(const TDesC8& aContainer
       
   533          					, TOMASuplUtcTime& aUtcTime);
       
   534 
       
   535         /**
       
   536 	     * Logs an object of TOMASuplPositionEstimate.
       
   537 	     *
       
   538 	     * @since S60 v3.1u
       
   539 	     * @param aContainer Name of object containing aPosEstimate.
       
   540 	     * @param aPosEstimate Object to be written in the log file.
       
   541 	     * @return void
       
   542 	     */
       
   543          void LogSuplPositionEstimate(const TDesC8& aContainer
       
   544          				, TOMASuplPositionEstimate& aPosEstimate);
       
   545 
       
   546 		/**
       
   547 	     * Logs an object of TOMASuplUncertainty.
       
   548 	     *
       
   549 	     * @since S60 v3.1u
       
   550 	     * @param aContainer Name of object containing aUncertainty.
       
   551 	     * @param aUncertainty Object to be written in the log file.
       
   552 	     * @return void
       
   553 	     */
       
   554          void LogUncertainty(const TDesC8& aContainer
       
   555 								, TOMASuplUncertainty& aUncertainty);
       
   556 
       
   557 		/**
       
   558 	     * Logs an object of TOMASuplAltitudeInfo.
       
   559 	     *
       
   560 	     * @since S60 v3.1u
       
   561 	     * @param aContainer Name of object containing aAltInfo.
       
   562 	     * @param aAltInfo Object to be written in the log file.
       
   563 	     * @return void
       
   564 	     */
       
   565 		void LogAltitudeInfo(const TDesC8& aContainer
       
   566 								, TOMASuplAltitudeInfo& aAltInfo);
       
   567 
       
   568 		/**
       
   569 	     * Logs elements in an object of TOMASuplAltitudeInfo.
       
   570 	     *
       
   571 	     * @since S60 v3.1u
       
   572 	     * @param aContainer Name of object containing aAltInfo.
       
   573 	     * @param aLatitudeSign Value is either 0 or 1.
       
   574 	     * @param aLatitude Value of latitude.
       
   575 	     * @param aLongitude Value of longitude.
       
   576 	     * @return void
       
   577 	     */
       
   578 		void LogLatLongLatSign(const TDesC8& aContainer, TInt& aLatitudeSign
       
   579 									, TInt& aLatitude, TInt& aLongitude);
       
   580 
       
   581 		/**
       
   582 	     * Logs an object of COMASuplVelocity.
       
   583 	     *
       
   584 	     * @since S60 v3.1u
       
   585 	     * @param aContainer Name of object containing aVelocity.
       
   586 	     * @param aVelocity Object to be written in the log file.
       
   587 	     * @return void
       
   588 	     */
       
   589          void LogSuplVelocity(const TDesC8& aContainer
       
   590          							, COMASuplVelocity* aVelocity);
       
   591          
       
   592         /**
       
   593 	     * Logs an enum TOMASuplVelocityType.
       
   594 	     *
       
   595 	     * @since S60 v3.1u
       
   596 	     * @param aContainer Name of object containing aVelocityType.
       
   597 	     * @param aVelocityType Object to be written in the log file.
       
   598 	     * @return void
       
   599 	     */
       
   600          void LogSuplVelocityType(const TDesC8& aContainer
       
   601          				, TOMASuplVelocityType aVelocityType);
       
   602 
       
   603         /**
       
   604 	     * Logs an object of COMASuplHorizVelocity.
       
   605 	     *
       
   606 	     * @since S60 v3.1u
       
   607 	     * @param aContainer Name of object containing aVelocity.
       
   608 	     * @param aVelocity Object to be written in the log file.
       
   609 	     * @return void
       
   610 	     */ 				
       
   611          void LogHorizVelocity(const TDesC8& aContainer
       
   612 								, COMASuplHorizVelocity* aVelocity);
       
   613 
       
   614 		/**
       
   615 	     * Logs an object of COMASuplHorizAndVertVelocity.
       
   616 	     *
       
   617 	     * @since S60 v3.1u
       
   618 	     * @param aContainer Name of object containing aVelocity.
       
   619 	     * @param aVelocity Object to be written in the log file.
       
   620 	     * @return void
       
   621 	     */
       
   622          void LogSuplHorizAndVertVelocity(const TDesC8& aContainer
       
   623          		, COMASuplHorizAndVertVelocity* aVelocity);
       
   624 
       
   625 		/**
       
   626 	     * Logs an object of COMASuplHorizUncertVelocity.
       
   627 	     *
       
   628 	     * @since S60 v3.1u
       
   629 	     * @param aContainer Name of object containing aVelocity.
       
   630 	     * @param aVelocity Object to be written in the log file.
       
   631 	     * @return void
       
   632 	     */
       
   633          void LogSuplHorizUncertVelocity(const TDesC8& aContainer
       
   634          						, COMASuplHorizUncertVelocity* aVelocity);
       
   635 
       
   636 		/**
       
   637 	     * Logs an object of COMASuplHorizAndVertUncertVelocity.
       
   638 	     *
       
   639 	     * @since S60 v3.1u
       
   640 	     * @param aContainer Name of object containing aVelocity.
       
   641 	     * @param aVelocity Object to be written in the log file.
       
   642 	     * @return void
       
   643 	     */
       
   644          void LogSuplHorizAndVertUncertVelocity(const TDesC8& aContainer
       
   645          				, COMASuplHorizAndVertUncertVelocity* aVelocity);
       
   646          
       
   647         /**
       
   648 	     * Logs an object of COMASuplPosPayload, after converting 
       
   649 	     * it to Hexadecimal.
       
   650 	     *
       
   651 	     * @since S60 v3.1u
       
   652 	     * @param aPayload Object to be written in the log file.
       
   653 	     * @return void
       
   654 	     */
       
   655          void LogPayload(COMASuplPosPayload* aPayload);
       
   656 
       
   657         /**
       
   658 	     * Logs an object of COMASuplPosPayload.
       
   659 	     *
       
   660 	     * @since S60 v3.1u
       
   661 	     * @param aPayload Object to be written in the log file.
       
   662 	     * @return void
       
   663 	     */
       
   664          void LogPayloadSent(COMASuplPosPayload* aPayload);
       
   665 
       
   666 
       
   667         /**
       
   668 	     * Logs an object of COMASuplInfoRequestList.
       
   669 	     *
       
   670 	     * @since S60 v3.1u
       
   671 	     * @param aPayload Object to be written in the log file.
       
   672 	     * @return void
       
   673 	     */ 
       
   674          void LogRequestList(COMASuplInfoRequestList& aReqList);
       
   675 
       
   676         /**
       
   677 	     * Logs an object of COMASuplInfoRequest.
       
   678 	     *
       
   679 	     * @since S60 v3.1u
       
   680 	     * @param aPayload Object to be written in the log file.
       
   681 	     * @return void
       
   682 	     */ 
       
   683          void LogRequest(COMASuplInfoRequest* aReq);
       
   684 
       
   685         
       
   686 	private:
       
   687 	
       
   688         COMASuplPosTesterLogger();
       
   689         void ConstructL(const TDesC& aLogFile);
       
   690     public:
       
   691     	/**
       
   692 	     * It should be called just before issuing a Synchronous request.
       
   693 	     * Initializes iRequestStartTime with the current time.
       
   694 	     *
       
   695 	     * @since S60 v3.1u
       
   696 	     * @return void
       
   697 	     */
       
   698         void GetRequestStartTime();
       
   699         
       
   700         /**
       
   701 	     * It should be called just after the Synchronous request.
       
   702 	     * Initializes iRequestEndTime with the current time.
       
   703 	     *
       
   704 	     * @since S60 v3.1u
       
   705 	     * @return void
       
   706 	     */
       
   707         void RequestExecuted();
       
   708         
       
   709         /**
       
   710 	     * Gets the difference between time obtained by GetRequestStartTime().
       
   711 	     * and RequestExecuted into aDiff.
       
   712 	     * @since S60 v3.1u
       
   713 	     * @param aLine Line to be written in the log file.
       
   714 	     * @return void
       
   715 	     */
       
   716         void GetTimeDifference(TTime& aDiff);
       
   717         
       
   718         /**
       
   719 	     * Logs aTime into the log file.
       
   720 	     *
       
   721 	     * @since S60 v3.1u
       
   722 	     * @param aLine Line to be written in the log file.
       
   723 	     * @return void
       
   724 	     */
       
   725         void LogTime(const TDesC8& aMsg, TTime& aTime);
       
   726         
       
   727         /**
       
   728 	     * Calculates time difference between iRequestStartTime and 
       
   729 	     * iRequestEndTime and logs the difference into a log file.
       
   730 	     *
       
   731 	     * @since S60 v3.1u
       
   732 	     * @param aLine Line to be written in the log file.
       
   733 	     * @return void
       
   734 	     */
       
   735         void LogExecutionTime(const TDesC8& aMsg);
       
   736         
       
   737         /**
       
   738 	     * Writes a test header into the log file.
       
   739 	     *
       
   740 	     * @since S60 v3.1u
       
   741 	     * @param aLine Line to be written in the log file.
       
   742 	     * @return void
       
   743 	     */
       
   744         void WriteTestHeader(const TDesC8& aTestHeader, TInt aSessionId = 0);
       
   745 
       
   746 	private:
       
   747 		/**
       
   748          * Object for Logfile operations.
       
   749          * Own.
       
   750          */
       
   751         CStifLogger* iLogFileLogger;
       
   752         
       
   753         /**
       
   754      	* ETrue if Start time is recorded.
       
   755      	*/
       
   756         TBool iSyncRequestGiven;
       
   757         
       
   758         /**
       
   759      	* Start time of request.
       
   760      	*/
       
   761         TTime iRequestStartTime;
       
   762         
       
   763         /**
       
   764      	* End time of request.
       
   765      	*/
       
   766         TTime iRequestEndTime;
       
   767 
       
   768 	};
       
   769 #endif