EscapeUtils Class Reference
Comments : Provides an API to allow data to be escape encoded and decoded. Also provide an API for converting a UNICODE data (16-bit descriptor) into UTF8 data (8-bit descriptor) and vice-verse.
- Since
- 6.0
Member Functions Documentation
ConvertFromUnicodeToUtf8L(const TDesC &)
IMPORT_C HBufC8 * | ConvertFromUnicodeToUtf8L | ( | const TDesC & | aData | ) | [static] |
Converts UNICODE data into UTF8 format.
- Since
- 6.0
-
leave
- KUriUtilsCannotConvert. When the input data cannot be converted.
Parameters
const TDesC & aData | A descriptor with the data to convert. |
ConvertToUnicodeFromUtf8L(const TDesC8 &)
IMPORT_C HBufC * | ConvertToUnicodeFromUtf8L | ( | const TDesC8 & | aData | ) | [static] |
Converts UTF8 format into UNICODE data.
- Since
- 6.0
-
leave
- KUriUtilsCannotConvert. When the input data cannot be converted.
Parameters
const TDesC8 & aData | A descriptor with the data to convert. |
DummyForwardingFunctionForCompatibility(const TDesC8 &, const TDesC8 &)
IMPORT_C HBufC8 * | DummyForwardingFunctionForCompatibility | ( | const TDesC8 & | aData, |
| const TDesC8 & | aCharsToEscape |
| ) | [private, static] |
The Dummy API is used to redirect to SpecificEscapeEncodeL() API in order to preserve BC and is made private to ensure no-one else starts using it.
EscapeDecodeL(const TDesC8 &)
Parameters
const TDesC8 & aData | A descriptor with the data to decode. |
EscapeDecodeL(const TDesC16 &)
Parameters
const TDesC16 & aData | A descriptor with the data to decode. |
EscapeEncodeL(const TDesC8 &, TEscapeMode)
Escape encodes excluded and reserved characters in the data as escape triples. The reserved characters are defined by the escape mode. These characters and the set of excluded characters specified by RFC2396 form the entire set of excluded data.
- Since
- 6.0
-
leave
- KUriUtilsErr16BitChar. A 16-Bit character was found in the data to be escape encoded.
Parameters
const TDesC8 & aData | A descriptor with the data to encode. |
TEscapeMode aMode | An enum specifying the escape mode. |
EscapeEncodeL(const TDesC16 &, TEscapeMode)
Escape encodes excluded and reserved characters in the data as escape triples. The reserved characters are defined by the escape mode. These characters and the set of excluded characters specified by RFC2396 form the entire set of excluded data.
- Since
- 6.0
-
leave
- KUriUtilsErr16BitChar. A 16-Bit character was found in the data to be escape encoded.
Parameters
const TDesC16 & aData | A descriptor with the data to encode. |
TEscapeMode aMode | An enum specifying the escape mode. |
EscapeEncodeL(const TDesC8 &, const TDesC8 &)
IMPORT_C HBufC8 * | EscapeEncodeL | ( | const TDesC8 & | aData, |
| const TDesC8 & | aReservedChars |
| ) | [static] |
Escape encodes excluded and reserved characters in the data as escape triples. These characters and the set of excluded characters specified by RFC2396 form the entire set of excluded data.
- Since
- 6.0
-
leave
- KUriUtilsErr16BitChar. A 16-Bit character was found in the data to be escape encoded.
Parameters
const TDesC8 & aData | A descriptor with the data to encode. |
const TDesC8 & aReservedChars | A descriptor with the reserved characters. |
EscapeEncodeL(const TDesC16 &, const TDesC16 &)
Escape encodes excluded and reserved characters in the data as escape triples. These characters and the set of excluded characters specified by RFC2396 form the entire set of excluded data.
- Since
- 6.0
-
leave
- KUriUtilsErr16BitChar. A 16-Bit character was found in the data to be escape encoded.
Parameters
const TDesC16 & aData | A descriptor with the data to encode. |
const TDesC16 & aReservedChars | A descriptor with the reserved characters. |
IsEscapeTriple(const TDesC8 &, TInt &)
IMPORT_C TBool | IsEscapeTriple | ( | const TDesC8 & | aData, |
| TInt & | aHexValue |
| ) | [static] |
Checks for an escape triple at the start of the input descriptor. If there is a triple its value is calculated and returned through the output argument aHexValue. If there is no escape triple then this argument is left unchanged.
Parameters
const TDesC8 & aData | The descriptor to be checked for an escape triple. |
TInt & aHexValue | The output argument with the value of the escape triple if it exists. |
IsEscapeTriple(const TDesC16 &, TInt &)
Checks for an escape triple at the start of the input descriptor. If there is a triple its value is calculated and returned through the output argument aHexValue. If there is no escape triple then this argument is left unchanged.
Parameters
const TDesC16 & aData | The descriptor to be checked for an escape triple. |
TInt & aHexValue | The output argument with the value of the escape triple if it exists. |
IsExcludedChar(TChar)
Checks to see if the input argument is excluded.
Parameters
TChar aChar | The character to be checked. |
ReEscapeEncodeL(const TDesC8 &)
escape encode only those characters that cannot be in a URI. assume all hh are encoded already.
Parameters
const TDesC8 & aData | The descriptor buffer to be escape encoded. |
SpecificEscapeEncodeL(const TDesC8 &, const TDesC8 &)
IMPORT_C HBufC8 * | SpecificEscapeEncodeL | ( | const TDesC8 & | aData, |
| const TDesC8 & | aCharsToEscape |
| ) | [static] |
returns the escape encoded descriptor output. This checks the every character of aData against aCharsToEscape and if it exist then it escape encodes that character.
Parameters
const TDesC8 & aData | The descriptor to be checked against escaping set of characters. |
const TDesC8 & aCharsToEscape | The set of escape characters. |
Member Enumerations Documentation
Enum TEscapeMode
enum TEscapeMode Enum defining escaping modes. Each mode has a different set of reserved characters. These are based on various uri components, as decribed in RFC2396.
Enumerators
EEscapeNormal = 0 |
Default mode, which has no reserved characters
|
EEscapeQuery |
Mode specifying reserved characters in a uri query - ;/?:&=+$,[]
|
EEscapePath |
Mode specifying reserved characters in a uri path - /;=?[]
|
EEscapeAuth |
Mode specifying reserved characters in a uri authority - /;:@?[]
|
EEscapeUrlEncoded |
Mode specifying reserved characters in a URL ;/?:&=+$[]!\'()~
|
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.