UriUtils Class Reference

class UriUtils

Comments :

Public Member Functions
IMPORT_C CUri16 *ConvertToDisplayFormL(const TUriC8 &)
IMPORT_C CUri8 *ConvertToInternetFormL(const TUriC16 &)
IMPORT_C CAuthority8 *CreateAuthorityL(const TDesC &)
IMPORT_C CUri8 *CreateUriL(const TDesC &)
IMPORT_C TBoolHasInvalidChars(const TDesC8 &)
IMPORT_C TBoolHasInvalidChars(const TDesC16 &)
IMPORT_C TUriHostTypeHostType(const TDesC8 &)
IMPORT_C TUriHostTypeHostType(const TDesC16 &)
IMPORT_C CUri8 *NormaliseUriL(const TUriC8 &)
Public Member Enumerations
enumTUriHostType { EIPv6Host, EIPv4Host, ETextHost }

Member Functions Documentation

ConvertToDisplayFormL(const TUriC8 &)

IMPORT_C CUri16 *ConvertToDisplayFormL(const TUriC8 &aUri)[static]

Converts an 8-bit format uri its into display form. Any escape tripes are decoded and sets of Utf8 format characters are converted into Unicode.

Since
6.0
Deprecated in 9.1
leave
KUriUtilsCannotConvert. When the input data cannot be converted.

Parameters

const TUriC8 & aUriThe 8-bit format uri.

ConvertToInternetFormL(const TUriC16 &)

IMPORT_C CUri8 *ConvertToInternetFormL(const TUriC16 &aUri)[static]

Converts a 16-bit format uri into its internet form. Any Unicode characters are converted into Utf8 representation and then any excluded characters are escape encoded. Reserved characters specified in RFC2396 will not be escape encoded however, these include ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | ",". For example http://localhost will not be encoded to http3A2F2Flocalhost.

Since
6.0
Deprecated in 9.1
leave
KUriUtilsCannotConvert. When the input data cannot be converted.
leave
KUriUtilsErr16BitChar. When the input data has a 16-Bit character to be escape encoded.

Parameters

const TUriC16 & aUriThe 16-bit format uri.

CreateAuthorityL(const TDesC &)

IMPORT_C CAuthority8 *CreateAuthorityL(const TDesC &aAuthority)[static]

Create a new CAuthority8 object from a Unicode descriptor.

leave
EUriUtilsParserErrInvalidUri if the descriptor is an invalid Authority.

Parameters

const TDesC & aAuthoritya Unicode string containing the Authority to parse.

CreateUriL(const TDesC &)

IMPORT_C CUri8 *CreateUriL(const TDesC &aUri)[static]

Create a new CUri8 object from a Unicode descriptor.

leave
EUriUtilsParserErrInvalidUri if the descriptor is an invalid URI.

Parameters

const TDesC & aUria Unicode string containing the URI to parse.

HasInvalidChars(const TDesC8 &)

IMPORT_C TBoolHasInvalidChars(const TDesC8 &aData)[static]

Checks a descriptor for excluded (invalid) characters. Excluded characters include all control characters (values 0x00 to 0x1F and greater than 0x7F), space (0x20), delimiter characters ('<', '>', '#', '', '"') and unwise characters ('{', '}', '|', '\', '^', '[', ']', '`').

Since
6.0

Parameters

const TDesC8 & aDataThe descriptor to be checked.

HasInvalidChars(const TDesC16 &)

IMPORT_C TBoolHasInvalidChars(const TDesC16 &aData)[static]

Checks a descriptor for excluded (invalid) characters. Excluded characters include all control characters (values 0x00 to 0x1F and greater than 0x7F), space (0x20), delimiter characters ('<', '>', '#', '','"') and unwise characters ('{', '}', '|', '\', '^', '[', ']', '`').

Since
6.0

Parameters

const TDesC16 & aDataThe descriptor to be checked.

HostType(const TDesC8 &)

IMPORT_C TUriHostTypeHostType(const TDesC8 &aHost)[static]

Checks the supplied host for an IPv4, IPv6 or text format host

Since
7.0

Parameters

const TDesC8 & aHostThe descriptor containing the host to check

HostType(const TDesC16 &)

IMPORT_C TUriHostTypeHostType(const TDesC16 &aHost)[static]

Checks the supplied host for an IPv4, IPv6 or text format host

Since
7.0

Parameters

const TDesC16 & aHostThe descriptor containing the host to check

NormaliseUriL(const TUriC8 &)

IMPORT_C CUri8 *NormaliseUriL(const TUriC8 &aUri)[static]

Supports Syntax-Based Normalization as specifed in section 6.2.2 of RFC3986. returns a new CUri8 object containing a normalised URI from a parsed URI object.

leave
KErrNoMemory

Parameters

const TUriC8 & aUriA reference to a parsed uri object.

Member Enumerations Documentation

Enum TUriHostType

Enum defining a flag used to indicate host type.
Since
9.1

Enumerators

EIPv6Host

Indicates host is of type IPv6. Example: 1080:0:0:0:8:800:200C:417A

EIPv4Host

Indicates host is of type IPv4. Example: 192.168.202.18

ETextHost

Indicates host is in text form. Example: www.mypage.com