os/ossrv/genericservices/httputils/Test/t_uriparser/TextUtilsTestCommon.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericservices/httputils/Test/t_uriparser/TextUtilsTestCommon.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,67 @@
     1.4 +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __TEXTUTILSTESTCOMMON_H__
    1.20 +#define __TEXTUTILSTESTCOMMON_H__
    1.21 +
    1.22 +// System includes
    1.23 +//
    1.24 +#include <e32base.h>
    1.25 +
    1.26 +template<class TPtrCType, class TDesCType>
    1.27 +LOCAL_C TInt DoTestTextUtilsRemove(const TDesCType& aBase, const TDesCType& aRemoveLeft, TInt aConsumedLeft,
    1.28 +								   const TDesCType& aRemoveRight, TInt aConsumedRight,
    1.29 +								   const TDesCType& aRemoveBoth, TInt aConsumedBoth);
    1.30 +
    1.31 +template<class TDesCType>
    1.32 +LOCAL_C TInt DoTestTextUtilsDesToIntConversion(const TDesCType& aDes, TInt aInt, TBool aValid);
    1.33 +
    1.34 +template<class HBufCType, class TDesCType>
    1.35 +LOCAL_C TInt DoTestTextUtilsIntToDesConversion(TInt aInt, const TDesCType& aDes);
    1.36 +
    1.37 +template<class TDesCType>
    1.38 +LOCAL_C TInt DoTestTextUtilsDesToHexConversion(const TDesCType& aDes, TInt aHex, TBool aValid);
    1.39 +
    1.40 +template<class HBufCType, class TDesCType>
    1.41 +LOCAL_C TInt DoTestTextUtilsHexToDesConversion(TInt aHex, const TDesCType& aDes);
    1.42 +
    1.43 +template<class TPtrCType, class TDesCType>
    1.44 +LOCAL_C TInt DoTestExtractQuotedStringL(
    1.45 +									   const TDesCType& aBuffer, 
    1.46 +									   const TDesCType& aString, 
    1.47 +									   const TDesCType& aRemainder,
    1.48 +									   TInt				aExpectedError
    1.49 +									   );
    1.50 +
    1.51 +template<class TPtrCType, class TDesCType>
    1.52 +LOCAL_C TInt DoExtractTokenFromListMultipleSeparator(
    1.53 +												const TDesCType& aBuffer,
    1.54 +												const TDesCType& aToken0,
    1.55 +												const TDesCType& aToken1,
    1.56 +												const TDesCType& aToken2,
    1.57 +												const TDesCType& aRemainder,
    1.58 +												const TDesCType& aSeparator
    1.59 +												);
    1.60 +
    1.61 +template<class TPtrCType, class TDesCType>
    1.62 +LOCAL_C TInt DoExtractTokenFromListSingleSeparator(
    1.63 +												const TDesCType&	aBuffer,
    1.64 +												const TDesCType&	aToken0,
    1.65 +												const TDesCType&	aToken1,
    1.66 +												const TDesCType&	aToken2,
    1.67 +												const TDesCType&	aRemainder,
    1.68 +												TChar				aSeparator
    1.69 +												);
    1.70 +#endif	// __TEXTUTILSTESTCOMMON_H__