genericservices/httputils/Test/t_uriparser/TextUtilsTestCommon.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 14 May 2010 17:34:04 +0300
changeset 24 8aa38fd255c2
parent 0 e4d67989cc36
permissions -rw-r--r--
Revision: 201019 Kit: 201019

// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//

#ifndef __TEXTUTILSTESTCOMMON_H__
#define __TEXTUTILSTESTCOMMON_H__

// System includes
//
#include <e32base.h>

template<class TPtrCType, class TDesCType>
LOCAL_C TInt DoTestTextUtilsRemove(const TDesCType& aBase, const TDesCType& aRemoveLeft, TInt aConsumedLeft,
								   const TDesCType& aRemoveRight, TInt aConsumedRight,
								   const TDesCType& aRemoveBoth, TInt aConsumedBoth);

template<class TDesCType>
LOCAL_C TInt DoTestTextUtilsDesToIntConversion(const TDesCType& aDes, TInt aInt, TBool aValid);

template<class HBufCType, class TDesCType>
LOCAL_C TInt DoTestTextUtilsIntToDesConversion(TInt aInt, const TDesCType& aDes);

template<class TDesCType>
LOCAL_C TInt DoTestTextUtilsDesToHexConversion(const TDesCType& aDes, TInt aHex, TBool aValid);

template<class HBufCType, class TDesCType>
LOCAL_C TInt DoTestTextUtilsHexToDesConversion(TInt aHex, const TDesCType& aDes);

template<class TPtrCType, class TDesCType>
LOCAL_C TInt DoTestExtractQuotedStringL(
									   const TDesCType& aBuffer, 
									   const TDesCType& aString, 
									   const TDesCType& aRemainder,
									   TInt				aExpectedError
									   );

template<class TPtrCType, class TDesCType>
LOCAL_C TInt DoExtractTokenFromListMultipleSeparator(
												const TDesCType& aBuffer,
												const TDesCType& aToken0,
												const TDesCType& aToken1,
												const TDesCType& aToken2,
												const TDesCType& aRemainder,
												const TDesCType& aSeparator
												);

template<class TPtrCType, class TDesCType>
LOCAL_C TInt DoExtractTokenFromListSingleSeparator(
												const TDesCType&	aBuffer,
												const TDesCType&	aToken0,
												const TDesCType&	aToken1,
												const TDesCType&	aToken2,
												const TDesCType&	aRemainder,
												TChar				aSeparator
												);
#endif	// __TEXTUTILSTESTCOMMON_H__