Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <UriUtils.h>
Link against: inetprotutil.lib

Class UriUtils

class UriUtils;

Description

Comments :

Members

Defined in UriUtils:


Member functions


ConvertToInternetFormL(const TUriC16 &)

Interface status: deprecated Deprecated in 9.1

IMPORT_C static CUri8* ConvertToInternetFormL(const TUriC16 &aUri);

Description

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 http%3A%2F%2Flocalhost.

Parameters

const TUriC16 &aUri

The 16-bit format uri.

Return value

CUri8 *

A pointer to a newly created 8-bit uri.

Leave codes

KUriUtilsCannotConvert.

When the input data cannot be converted.

KUriUtilsErr16BitChar.

When the input data has a 16-Bit character to be escape encoded.


ConvertToDisplayFormL(const TUriC8 &)

Interface status: deprecated Deprecated in 9.1

IMPORT_C static CUri16* ConvertToDisplayFormL(const TUriC8 &aUri);

Description

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.

Parameters

const TUriC8 &aUri

The 8-bit format uri.

Return value

CUri16 *

A pointer to a newly created 16-bit uri.

Leave codes

KUriUtilsCannotConvert.

When the input data cannot be converted.


CreateUriL(const TDesC &)

IMPORT_C static CUri8* CreateUriL(const TDesC &aUri);

Description

Create a new CUri8 object from a Unicode descriptor.

Parameters

const TDesC16 &aUri

a Unicode string containing the URI to parse.

Return value

CUri8 *

the new CUri8 object

Leave codes

EUriUtilsParserErrInvalidUri

if the descriptor is an invalid URI.


CreateAuthorityL(const TDesC &)

IMPORT_C static CAuthority8* CreateAuthorityL(const TDesC &aAuthority);

Description

Create a new CAuthority8 object from a Unicode descriptor.

Parameters

const TDesC16 &aAuthority

a Unicode string containing the Authority to parse.

Return value

CAuthority8 *

the new CAuthority8 object

Leave codes

EUriUtilsParserErrInvalidUri

if the descriptor is an invalid Authority.


HasInvalidChars(const TDesC8 &)

IMPORT_C static TBool HasInvalidChars(const TDesC8 &aData);

Description

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 ('{', '}', '|', '\', '^', '[', ']', '`').

Parameters

const TDesC8 &aData

The descriptor to be checked.

Return value

TBool

A boolean value of ETrue if the descriptor contains invalid characters, otherwise EFalse.


HasInvalidChars(const TDesC16 &)

IMPORT_C static TBool HasInvalidChars(const TDesC16 &aData);

Description

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 ('{', '}', '|', '\', '^', '[', ']', '`').

Parameters

const TDesC16 &aData

The descriptor to be checked.

Return value

TBool

A boolean value of ETrue if the descriptor contains invalid characters, otherwise EFalse.


HostType(const TDesC8 &)

IMPORT_C static TUriHostType HostType(const TDesC8 &aHost);

Description

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

Parameters

const TDesC8 &aHost

The descriptor containing the host to check

Return value

UriUtils::TUriHostType

A TUriHostType enum of either EIPv6, EIPv4, EText or EUnknown


HostType(const TDesC16 &)

IMPORT_C static TUriHostType HostType(const TDesC16 &aHost);

Description

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

Parameters

const TDesC16 &aHost

The descriptor containing the host to check

Return value

UriUtils::TUriHostType

A TUriHostType enum of either EIPv6, EIPv4, EText or EUnknown

[Top]


Member enumerations


Enum TUriHostType

TUriHostType

Description

Enum defining a flag used to indicate host type.

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