epoc32/include/inetprottextutils.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // 
    15 // 
    16 //
    17 
    18 /**
    19  @file inetprottextutils.h
    20  @publishedAll
    21  @released
    22 */
    23 
    24 #ifndef __INETPROTTEXTUTILS_H__
    25 #define __INETPROTTEXTUTILS_H__
    26 
    27 #include <e32base.h>
    28 
    29 /**
    30 	Comments :
    31 @publishedAll
    32 @released
    33 */
    34 class InetProtTextUtils
    35 	{
    36 public:	// Enums
    37 
    38 /**	
    39 	enum TRemoveMode
    40 	Enum defining whitespace removal modes.
    41  */
    42 	enum TRemoveMode
    43 		{
    44 		/** 
    45 			Specifies removal any contiguous whitespace characters at the 
    46 			beginning of some data.
    47 		*/ 
    48 		ERemoveLeft		= 0,
    49 		/** 
    50 			Specifies removal any contiguous whitespace characters at the end of
    51 			some data.
    52 		*/ 
    53 		ERemoveRight,
    54 		/** 
    55 			Specifies removal any contiguous whitespace characters at the 
    56 			beginning and end of some data.
    57 		*/ 
    58 		ERemoveBoth
    59 		};
    60 
    61 public:	// Methods
    62 	
    63 	IMPORT_C static TInt RemoveWhiteSpace(TPtrC8& aData, TRemoveMode aMode);
    64 	IMPORT_C static TInt RemoveWhiteSpace(TPtrC16& aData, TRemoveMode aMode);
    65 
    66 	IMPORT_C static void ConvertIntToDescriptorL(TInt aInt, HBufC8*& aBuffer);
    67 	IMPORT_C static void ConvertIntToDescriptorL(TInt aInt, HBufC16*& aBuffer);
    68 
    69 	IMPORT_C static void ConvertHexToDescriptorL(TInt aHex, HBufC8*& aBuffer);
    70 	IMPORT_C static void ConvertHexToDescriptorL(TInt aHex, HBufC16*& aBuffer);
    71 
    72 	IMPORT_C static TInt ConvertDescriptorToInt(const TDesC8& aData, TInt& aInt);
    73 	IMPORT_C static TInt ConvertDescriptorToInt(const TDesC16& aData, TInt& aInt);
    74 
    75 	IMPORT_C static TInt ConvertDescriptorToHex(const TDesC8& aData, TInt& aHex);
    76 	IMPORT_C static TInt ConvertDescriptorToHex(const TDesC16& aData, TInt& aHex);
    77 
    78 	IMPORT_C static TInt ExtractNextTokenFromList(TPtrC8& aBuffer, TPtrC8& aToken, TChar aSeparator);
    79 	IMPORT_C static TInt ExtractNextTokenFromList(TPtrC16& aBuffer, TPtrC16& aToken, TChar aSeparator);
    80 
    81 	IMPORT_C static TInt ExtractNextTokenFromList(TPtrC8& aBuffer, TPtrC8& aToken, const TDesC8& aSeparators);
    82 	IMPORT_C static TInt ExtractNextTokenFromList(TPtrC16& aBuffer, TPtrC16& aToken, const TDesC16& aSeparators);
    83 
    84 	IMPORT_C static TInt ExtractQuotedStringL(TPtrC8& aBuffer, TPtrC8& aQuotedString);
    85 	IMPORT_C static TInt ExtractQuotedStringL(TPtrC16& aBuffer, TPtrC16& aQuotedString);
    86 
    87 	IMPORT_C static TInt ExtractIntegerValueL(TPtrC8& aBuffer, TInt& aIntVal, TBool aAllowNonWsTerminator);
    88 	};
    89 
    90 #endif	// __INETPROTTEXTUTILS_H__