1 inetprottextutils.h |
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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 // |
|
16 // |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 @file inetprottextutils.h |
|
22 @publishedAll |
|
23 @released |
|
24 */ |
|
25 |
|
26 #ifndef __INETPROTTEXTUTILS_H__ |
|
27 #define __INETPROTTEXTUTILS_H__ |
|
28 |
|
29 #include <e32base.h> |
|
30 |
|
31 /** |
|
32 Comments : |
|
33 @publishedAll |
|
34 @released |
|
35 */ |
|
36 class InetProtTextUtils |
|
37 { |
|
38 public: // Enums |
|
39 |
|
40 /** |
|
41 enum TRemoveMode |
|
42 Enum defining whitespace removal modes. |
|
43 */ |
|
44 enum TRemoveMode |
|
45 { |
|
46 /** |
|
47 Specifies removal any contiguous whitespace characters at the |
|
48 beginning of some data. |
|
49 */ |
|
50 ERemoveLeft = 0, |
|
51 /** |
|
52 Specifies removal any contiguous whitespace characters at the end of |
|
53 some data. |
|
54 */ |
|
55 ERemoveRight, |
|
56 /** |
|
57 Specifies removal any contiguous whitespace characters at the |
|
58 beginning and end of some data. |
|
59 */ |
|
60 ERemoveBoth |
|
61 }; |
|
62 |
|
63 public: // Methods |
|
64 |
|
65 IMPORT_C static TInt RemoveWhiteSpace(TPtrC8& aData, TRemoveMode aMode); |
|
66 IMPORT_C static TInt RemoveWhiteSpace(TPtrC16& aData, TRemoveMode aMode); |
|
67 |
|
68 IMPORT_C static void ConvertIntToDescriptorL(TInt aInt, HBufC8*& aBuffer); |
|
69 IMPORT_C static void ConvertIntToDescriptorL(TInt aInt, HBufC16*& aBuffer); |
|
70 |
|
71 IMPORT_C static void ConvertHexToDescriptorL(TInt aHex, HBufC8*& aBuffer); |
|
72 IMPORT_C static void ConvertHexToDescriptorL(TInt aHex, HBufC16*& aBuffer); |
|
73 |
|
74 IMPORT_C static TInt ConvertDescriptorToInt(const TDesC8& aData, TInt& aInt); |
|
75 IMPORT_C static TInt ConvertDescriptorToInt(const TDesC16& aData, TInt& aInt); |
|
76 |
|
77 IMPORT_C static TInt ConvertDescriptorToHex(const TDesC8& aData, TInt& aHex); |
|
78 IMPORT_C static TInt ConvertDescriptorToHex(const TDesC16& aData, TInt& aHex); |
|
79 |
|
80 IMPORT_C static TInt ExtractNextTokenFromList(TPtrC8& aBuffer, TPtrC8& aToken, TChar aSeparator); |
|
81 IMPORT_C static TInt ExtractNextTokenFromList(TPtrC16& aBuffer, TPtrC16& aToken, TChar aSeparator); |
|
82 |
|
83 IMPORT_C static TInt ExtractNextTokenFromList(TPtrC8& aBuffer, TPtrC8& aToken, const TDesC8& aSeparators); |
|
84 IMPORT_C static TInt ExtractNextTokenFromList(TPtrC16& aBuffer, TPtrC16& aToken, const TDesC16& aSeparators); |
|
85 |
|
86 IMPORT_C static TInt ExtractQuotedStringL(TPtrC8& aBuffer, TPtrC8& aQuotedString); |
|
87 IMPORT_C static TInt ExtractQuotedStringL(TPtrC16& aBuffer, TPtrC16& aQuotedString); |
|
88 |
|
89 IMPORT_C static TInt ExtractIntegerValueL(TPtrC8& aBuffer, TInt& aIntVal, TBool aAllowNonWsTerminator); |
|
90 }; |
|
91 |
|
92 #endif // __INETPROTTEXTUTILS_H__ |