dbgsrv/coredumpserver/test/automatictests/tcds_app/inc/SELFusersidetrace.h
changeset 0 c6b0df440bee
equal deleted inserted replaced
-1:000000000000 0:c6b0df440bee
       
     1 /**
       
     2 * Copyright (c) 2002-2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 /**
       
    21  @file SELFusersidetrace.h
       
    22  @internalTechnology
       
    23 */
       
    24 #if (!defined __SELF_USER_SIDE_TRACE_H__)
       
    25 #define ___SELF_USER_SIDE_TRACE_H__
       
    26 #include <TestExecuteStepBase.h>
       
    27 #include <symbianelfdefs.h>
       
    28 #include <bafindf.h>
       
    29 #include <crashdefs.h>
       
    30 
       
    31 #include "tcoredumpserversuitestepbase.h"
       
    32 #include "tcoredumpcommon.h"
       
    33 
       
    34 
       
    35 _LIT(KSELFUserSideTrace,"SELFUserSideTrace");
       
    36 
       
    37 //Maximum Number of DHDR expected in the SELF File
       
    38 const TInt MAXNUMBEROFDHDR = 200;
       
    39 
       
    40 _LIT( KCreateTraceData, "How much Trace data to capture (Kb)" );
       
    41 
       
    42 
       
    43 class CSELFUserSideTrace : public CTe_coredumpserverSuiteStepBase
       
    44 	{
       
    45 public:
       
    46 	CSELFUserSideTrace();
       
    47 	~CSELFUserSideTrace();
       
    48 	virtual TVerdict doTestStepPreambleL();
       
    49 	virtual TVerdict doTestStepL();
       
    50 	virtual TVerdict doTestStepPostambleL();
       
    51 
       
    52 // Please add/modify your class members here:
       
    53 private:
       
    54 
       
    55 	//session object to the Core Dump Server
       
    56 	RCoreDumpSession iCoreDumpSession;
       
    57 	//File Server session    
       
    58 	RFs iFsSession;
       
    59 	//File Handle for the ELF File
       
    60 	RFile iSELFFile;
       
    61 	//SELF File name
       
    62 	TBufC<KMaxFileName> iSELFFileName; 
       
    63 	//stores the SELF Program Header
       
    64 	TUint8* iSELFPHHeader;
       
    65 	//Number of Program Header Entries 
       
    66 	TInt iPHEntries;
       
    67 	//Program Header Offset 
       
    68 	TInt iPHOffset;
       
    69 	//stores the DHDR Buffers
       
    70 	TUint8* iDHDRBuffer[MAXNUMBEROFDHDR];
       
    71 	//actual SELF DHDR strcuture Sym32_dhdr
       
    72 	Sym32_dhdr* idhdr[MAXNUMBEROFDHDR];
       
    73 	//offset to the String section
       
    74 	TInt iOffsetStringSection;
       
    75 	//size of String section
       
    76 	TInt iSizeofStringSection;
       
    77 	//flag to determine whether there is trace or not
       
    78 	TBool iTraceFlag;
       
    79 	
       
    80 	void ClientAppL();
       
    81 	
       
    82 	//Tests
       
    83 	void HandleCrashL();
       
    84 	
       
    85 	void DoTestTraceSectionSELFFileL(TBool );
       
    86 	
       
    87 	void ValidateHeaderELFFileL();
       
    88 	
       
    89 	void ValidateProgramHeaderELFFileL();
       
    90 	
       
    91 	void ValidateTraceSectionELFFileL(TBool );
       
    92 	
       
    93 	void ValidateTraceBufferL(const TDesC8&  );
       
    94 
       
    95 	
       
    96 	//Utility functions
       
    97 	
       
    98 	void DoCmdLoadPluginsL();
       
    99 	
       
   100 	void DoCmdConfigurePluginsL( );
       
   101 	
       
   102 	void ConfigureSELF(TBool );
       
   103 
       
   104 	void MonitorProgressL();
       
   105 	
       
   106     void DoConfigureL( const TUint32& aIndex, 
       
   107 					  const TUint32& aUID, 
       
   108 					  const COptionConfig::TParameterSource& aSource, 
       
   109 					  const COptionConfig::TOptionType& aType, 
       
   110 					  const TDesC& aPrompt, 
       
   111 					  const TUint32& aNumOptions,
       
   112 					  const TDesC& aOptions,
       
   113 					  const TInt32& aVal, 
       
   114 					  const TDesC& aStrValue,
       
   115                       const TUint aInstance );
       
   116     
       
   117     void CleanupMethod(const TDesC& );
       
   118 
       
   119 
       
   120 	};
       
   121 
       
   122 
       
   123 
       
   124 #endif