#include <escapeutils.h>
class EscapeUtils |
Public Member Enumerations | |
---|---|
enum | TEscapeMode { EEscapeNormal, EEscapeQuery, EEscapePath, EEscapeAuth, EEscapeUrlEncoded } |
Public Member Functions | |
---|---|
IMPORT_C HBufC8 * | ConvertFromUnicodeToUtf8L(const TDesC &) |
IMPORT_C HBufC * | ConvertToUnicodeFromUtf8L(const TDesC8 &) |
IMPORT_C HBufC8 * | EscapeDecodeL(const TDesC8 &) |
IMPORT_C HBufC16 * | EscapeDecodeL(const TDesC16 &) |
IMPORT_C HBufC8 * | EscapeEncodeL(const TDesC8 &, TEscapeMode) |
IMPORT_C HBufC16 * | EscapeEncodeL(const TDesC16 &, TEscapeMode) |
IMPORT_C HBufC8 * | EscapeEncodeL(const TDesC8 &, const TDesC8 &) |
IMPORT_C HBufC16 * | EscapeEncodeL(const TDesC16 &, const TDesC16 &) |
IMPORT_C TBool | IsEscapeTriple(const TDesC8 &, TInt &) |
IMPORT_C TBool | IsEscapeTriple(const TDesC16 &, TInt &) |
IMPORT_C TBool | IsExcludedChar(TChar) |
HBufC8 * | ReEscapeEncodeL(const TDesC8 &) |
IMPORT_C HBufC8 * | SpecificEscapeEncodeL(const TDesC8 &, const TDesC8 &) |
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.
Enumerator | Value | Description |
---|---|---|
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 ;/?:&=+$[]!\'()~ |
Converts UNICODE data into UTF8 format.
Parameters | |
---|---|
aData | A descriptor with the data to convert. |
Leave Codes | |
---|---|
KUriUtilsCannotConvert. | When the input data cannot be converted. |
Converts UTF8 format into UNICODE data.
Parameters | |
---|---|
aData | A descriptor with the data to convert. |
Leave Codes | |
---|---|
KUriUtilsCannotConvert. | When the input data cannot be converted. |
IMPORT_C HBufC8 * | EscapeEncodeL | ( | const TDesC8 & | aData, |
TEscapeMode | aMode | |||
) | [static] |
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.
Parameters | |
---|---|
aData | A descriptor with the data to encode. |
aMode | An enum specifying the escape mode. |
Leave Codes | |
---|---|
KUriUtilsErr16BitChar. | A 16-Bit character was found in the data to be escape encoded. |
IMPORT_C HBufC16 * | EscapeEncodeL | ( | const TDesC16 & | aData, |
TEscapeMode | aMode | |||
) | [static] |
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.
Parameters | |
---|---|
aData | A descriptor with the data to encode. |
aMode | An enum specifying the escape mode. |
Leave Codes | |
---|---|
KUriUtilsErr16BitChar. | A 16-Bit character was found in the data to be escape encoded. |
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.
Parameters | |
---|---|
aData | A descriptor with the data to encode. |
aReservedChars | A descriptor with the reserved characters. |
Leave Codes | |
---|---|
KUriUtilsErr16BitChar. | A 16-Bit character was found in the data to be escape encoded. |
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.
Parameters | |
---|---|
aData | A descriptor with the data to encode. |
aReservedChars | A descriptor with the reserved characters. |
Leave Codes | |
---|---|
KUriUtilsErr16BitChar. | A 16-Bit character was found in the data to be escape encoded. |
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 | |
---|---|
aData | The descriptor to be checked for an escape triple. |
aHexValue | The output argument with the value of the escape triple if it exists. |
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 | |
---|---|
aData | The descriptor to be checked for an escape triple. |
aHexValue | The output argument with the value of the escape triple if it exists. |
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 | |
---|---|
aData | The descriptor to be checked against escaping set of characters. |
aCharsToEscape | The set of escape characters. |