os/ossrv/genericservices/httputils/Test/t_uriparser/TextUtilsTestCommon.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
#ifndef __TEXTUTILSTESTCOMMON_H__
sl@0
    17
#define __TEXTUTILSTESTCOMMON_H__
sl@0
    18
sl@0
    19
// System includes
sl@0
    20
//
sl@0
    21
#include <e32base.h>
sl@0
    22
sl@0
    23
template<class TPtrCType, class TDesCType>
sl@0
    24
LOCAL_C TInt DoTestTextUtilsRemove(const TDesCType& aBase, const TDesCType& aRemoveLeft, TInt aConsumedLeft,
sl@0
    25
								   const TDesCType& aRemoveRight, TInt aConsumedRight,
sl@0
    26
								   const TDesCType& aRemoveBoth, TInt aConsumedBoth);
sl@0
    27
sl@0
    28
template<class TDesCType>
sl@0
    29
LOCAL_C TInt DoTestTextUtilsDesToIntConversion(const TDesCType& aDes, TInt aInt, TBool aValid);
sl@0
    30
sl@0
    31
template<class HBufCType, class TDesCType>
sl@0
    32
LOCAL_C TInt DoTestTextUtilsIntToDesConversion(TInt aInt, const TDesCType& aDes);
sl@0
    33
sl@0
    34
template<class TDesCType>
sl@0
    35
LOCAL_C TInt DoTestTextUtilsDesToHexConversion(const TDesCType& aDes, TInt aHex, TBool aValid);
sl@0
    36
sl@0
    37
template<class HBufCType, class TDesCType>
sl@0
    38
LOCAL_C TInt DoTestTextUtilsHexToDesConversion(TInt aHex, const TDesCType& aDes);
sl@0
    39
sl@0
    40
template<class TPtrCType, class TDesCType>
sl@0
    41
LOCAL_C TInt DoTestExtractQuotedStringL(
sl@0
    42
									   const TDesCType& aBuffer, 
sl@0
    43
									   const TDesCType& aString, 
sl@0
    44
									   const TDesCType& aRemainder,
sl@0
    45
									   TInt				aExpectedError
sl@0
    46
									   );
sl@0
    47
sl@0
    48
template<class TPtrCType, class TDesCType>
sl@0
    49
LOCAL_C TInt DoExtractTokenFromListMultipleSeparator(
sl@0
    50
												const TDesCType& aBuffer,
sl@0
    51
												const TDesCType& aToken0,
sl@0
    52
												const TDesCType& aToken1,
sl@0
    53
												const TDesCType& aToken2,
sl@0
    54
												const TDesCType& aRemainder,
sl@0
    55
												const TDesCType& aSeparator
sl@0
    56
												);
sl@0
    57
sl@0
    58
template<class TPtrCType, class TDesCType>
sl@0
    59
LOCAL_C TInt DoExtractTokenFromListSingleSeparator(
sl@0
    60
												const TDesCType&	aBuffer,
sl@0
    61
												const TDesCType&	aToken0,
sl@0
    62
												const TDesCType&	aToken1,
sl@0
    63
												const TDesCType&	aToken2,
sl@0
    64
												const TDesCType&	aRemainder,
sl@0
    65
												TChar				aSeparator
sl@0
    66
												);
sl@0
    67
#endif	// __TEXTUTILSTESTCOMMON_H__