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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
19 @file inetprottextutils.h
24 #ifndef __INETPROTTEXTUTILS_H__
25 #define __INETPROTTEXTUTILS_H__
34 class InetProtTextUtils
40 Enum defining whitespace removal modes.
45 Specifies removal any contiguous whitespace characters at the
46 beginning of some data.
50 Specifies removal any contiguous whitespace characters at the end of
55 Specifies removal any contiguous whitespace characters at the
56 beginning and end of some data.
63 IMPORT_C static TInt RemoveWhiteSpace(TPtrC8& aData, TRemoveMode aMode);
64 IMPORT_C static TInt RemoveWhiteSpace(TPtrC16& aData, TRemoveMode aMode);
66 IMPORT_C static void ConvertIntToDescriptorL(TInt aInt, HBufC8*& aBuffer);
67 IMPORT_C static void ConvertIntToDescriptorL(TInt aInt, HBufC16*& aBuffer);
69 IMPORT_C static void ConvertHexToDescriptorL(TInt aHex, HBufC8*& aBuffer);
70 IMPORT_C static void ConvertHexToDescriptorL(TInt aHex, HBufC16*& aBuffer);
72 IMPORT_C static TInt ConvertDescriptorToInt(const TDesC8& aData, TInt& aInt);
73 IMPORT_C static TInt ConvertDescriptorToInt(const TDesC16& aData, TInt& aInt);
75 IMPORT_C static TInt ConvertDescriptorToHex(const TDesC8& aData, TInt& aHex);
76 IMPORT_C static TInt ConvertDescriptorToHex(const TDesC16& aData, TInt& aHex);
78 IMPORT_C static TInt ExtractNextTokenFromList(TPtrC8& aBuffer, TPtrC8& aToken, TChar aSeparator);
79 IMPORT_C static TInt ExtractNextTokenFromList(TPtrC16& aBuffer, TPtrC16& aToken, TChar aSeparator);
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);
84 IMPORT_C static TInt ExtractQuotedStringL(TPtrC8& aBuffer, TPtrC8& aQuotedString);
85 IMPORT_C static TInt ExtractQuotedStringL(TPtrC16& aBuffer, TPtrC16& aQuotedString);
87 IMPORT_C static TInt ExtractIntegerValueL(TPtrC8& aBuffer, TInt& aIntVal, TBool aAllowNonWsTerminator);
90 #endif // __INETPROTTEXTUTILS_H__