testexecmdw/tef/tef/test/regressiontest/logger/inc/tefloggertestwrapper.h
branchRCL_3
changeset 3 9397a16b6eb8
parent 1 6edeef394eb7
equal deleted inserted replaced
1:6edeef394eb7 3:9397a16b6eb8
     1 /*
       
     2 * Copyright (c) 2005-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 * @file
       
    16 * This contains CTEFLoggerTestWrapper
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 /**
       
    23  @test
       
    24  @internalComponent
       
    25 */
       
    26 
       
    27 #if (!defined __TEF_INTEGRATION_TEST_WRAPPER_H__)
       
    28 #define __TEF_INTEGRATION_TEST_WRAPPER_H__
       
    29 
       
    30 
       
    31 #include <test/datawrapper.h>
       
    32 
       
    33 class CTEFLoggerTestWrapper : public CDataWrapper
       
    34 	{
       
    35 public:
       
    36 	CTEFLoggerTestWrapper();
       
    37 	~CTEFLoggerTestWrapper();
       
    38 	
       
    39 	static	CTEFLoggerTestWrapper*	NewL();
       
    40 
       
    41 	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
       
    42 	virtual TAny*	GetObject() { return iObject; }
       
    43 	inline virtual void	SetObjectL(TAny* aObject)
       
    44 		{
       
    45 		DestroyData();
       
    46 		iObject	= static_cast<TInt*> (aObject);
       
    47 		}
       
    48 		
       
    49 	inline virtual void	DisownObjectL() 
       
    50 		{
       
    51 		iObject = NULL;
       
    52 		}
       
    53 
       
    54 	void DestroyData()
       
    55 		{
       
    56 		delete iObject;
       
    57 		iObject=NULL;
       
    58 		}
       
    59 		
       
    60 	inline virtual TCleanupOperation CleanupOperation()
       
    61 		{
       
    62 		return CleanupOperation;
       
    63 		}
       
    64 
       
    65 	void RunL(CActive* aActive, TInt aIndex);
       
    66 protected:
       
    67 	void ConstructL();
       
    68 private:
       
    69 	static void CleanupOperation(TAny* aAny)
       
    70 		{
       
    71 		TInt* number = static_cast<TInt*>(aAny);
       
    72 		delete number;
       
    73 		}
       
    74 	
       
    75 	// commands
       
    76 	inline void DoCmdNewL(const TDesC& aEntry);
       
    77 	inline void DoCmdModifyByName(const TDesC& aEntry);
       
    78 	inline void DoCmdGetDataObject(const TDesC& aSection);
       
    79 	inline void DoCmdLogSeverity(const TDesC& aEntry);
       
    80 	inline void DoCmdPrint(const TDesC& aEntry);
       
    81 	inline void DoCmdPrintNoVALIST(const TDesC& aEntry);
       
    82 	void DoCmdKUnCoveredFuntions(const TDesC& aSection);
       
    83 	void DoCmdKGetCPPModuleName();
       
    84 	void GetLongSectionName(const TDesC& aSection);
       
    85 	void GetLongKeyName(const TDesC& aSection);
       
    86 	// utilities
       
    87 	TBool GetVerdictFromConfig(const TDesC& aSection, const TDesC& aParameterName, TVerdict& aVerdict);
       
    88 
       
    89 protected:
       
    90 	CActiveCallback*	iActiveCallback;
       
    91 	TInt*				iObject;
       
    92 	RTimer*				iActiveObject;
       
    93 private:
       
    94 	TTime				iTimerStart;
       
    95 	};
       
    96 
       
    97 #endif /* __TEF_INTEGRATION_TEST_WRAPPER_H__ */
       
    98