os/kernelhwsrv/baseapitest/basesvs/common/inc/DataWrapperBase.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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 *
    16 */
    17 
    18 
    19 
    20 #if (!defined __DATA_WRAPPER_BASE__)
    21 #define __DATA_WRAPPER_BASE__
    22 
    23 //	EPOC includes
    24 #include <test/datawrapper.h>
    25 
    26 class CDataWrapperBase : public CDataWrapper
    27 	{
    28 public:
    29 	virtual ~CDataWrapperBase();
    30 
    31 	TBool	GetBoolFromConfig(const TDesC& aSectName,const TDesC& aKeyName,TBool& aResult);
    32 	TBool	GetIntFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult);
    33 	TBool   GetInt64FromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt64& aResult);
    34 	TBool	GetStringFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult);
    35 	TBool	GetHexFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult);
    36 	virtual void	InitialiseL();
    37 
    38 protected:
    39 	CDataWrapperBase();
    40 
    41 	TBool	GetCommandStringParameter(const TDesC& aParameterName, const TDesC& aSection, TPtrC& aResult, TText8 *aFileName, TInt aLine, TBool aMandatory);
    42 	TBool	GetCommandIntParameter(const TDesC& aParameterName, const TDesC& aSection, TInt& aResult, TText8 *aFileName, TInt aLine, TBool aMandatory);
    43 	TBool	GetCommandInt64Parameter(const TDesC& aParameterName, const TDesC& aSection, TInt64& aResult, TText8 *aFileName, TInt aLine, TBool aMandatory);
    44 	TBool	GetCommandBoolParameter(const TDesC& aParameterName, const TDesC& aSection, TBool& aResult, TText8 *aFileName, TInt aLine, TBool aMandatory);
    45 
    46 private:
    47 	TBool	GetCommandStringParameterL(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult);
    48 
    49 private:
    50 	// Included ini files
    51 	RPointerArray<CIniData>	iInclude;
    52 	RPointerArray<HBufC>	iBuffer;
    53 	};
    54 
    55 #endif /* __DATA_WRAPPER_BASE__ */