Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

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

Class TAuthorityC8

class TAuthorityC8;

Description

Dependencies : TAuthorityComponent. Comments : Provides non-modifying functionality on the components of an authority object as defined in RFC2396. There are 3 components; userinfo, host and port.

The object holds descriptor pointers to the parsed authority components and a descriptor pointer to the authority. It is non-owning. It uses 8-bit descriptors.

The functionality provided by this API allows the authority components to be extracted from the parsed authority, checked for their presence in the authority and be compared with those in another TAuthorityC8 object.

Members

Defined in TAuthorityC8:


Construction and destruction


TAuthorityC8()

protected: IMPORT_C TAuthorityC8();

Description

Constructor.

[Top]


Member functions


Extract(TAuthorityComponent)const

IMPORT_C const TDesC8& Extract(TAuthorityComponent aComponent) const;

Description

Retrieves the specified component in the authority.

Parameters

TAuthorityComponent aComponent

The enum specifying the component.

Return value

const TDesC8 &

A constant reference to a descriptor pointer to the specified component.


IsPresent(TAuthorityComponent)const

IMPORT_C TBool IsPresent(TAuthorityComponent aComponent) const;

Description

Indicates whether the specified component is present in the authority.

Parameters

TAuthorityComponent aComponent

The enum specifying the component.

Return value

TBool

A boolean value of ETrue if the desired component is present, or EFalse if the desired component is not present.


Compare(const TAuthorityC8 &,TAuthorityComponent)const

IMPORT_C TInt Compare(const TAuthorityC8 &aAuthority, TAuthorityComponent aComponent) const;

Description

Compares the specified component against the one in the authority passed in.

Parameters

const TAuthorityC8 &aAuthority

The authority to compare components against.

TAuthorityComponent aComponent

The enum specifying the component to compare.

Return value

TInt

An integer value of zero if the components are the same, any other value if the components are not the same.


AuthorityDes()const

IMPORT_C const TDesC8& AuthorityDes() const;

Description

Retrieves the descriptor for the entire authority.

Return value

const TDesC8 &

A const reference to a descriptor pointer to the authority.


DisplayFormL(TAuthorityComponent)const

IMPORT_C HBufC* DisplayFormL(TAuthorityComponent aComponent=EAuthorityComplete) const;

Description

Create a new HBufC descriptor containing the desired component or the full Authority.

Parameters

TAuthorityComponent aComponent

The component to convert into Unicode (EAuthorityScheme - EAuthorityFragment) or the full authority (EAuthorityComplete -- the default)).

Return value

HBufC16 *

the descriptor containing the desired component.

[Top]


Member data


iComponent

protected: TPtrC8 iComponent[EAuthorityMaxComponents];

Description

The array of descriptor pointers to the authority components.


iAuthorityDes

protected: TPtrC8 iAuthorityDes;

Description

The descriptor pointer to the authority.