CAuthority8 Class Reference

class CAuthority8 : public CBase

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

The object holds parsed authority information. It is owning. It uses 8-bit descriptors.

The functionality provided by this API allows the authority components to be set or removed from this parsed authority. Also, it provides a reference to TAuthorityC8 object so that the non-modifying functionality can be used.
Since
6.0

Inherits from

Constructor & Destructor Documentation

CAuthority8(const TAuthorityC8 &)

CAuthority8(const TAuthorityC8 &aAuthority)[private]

Constructor. First phase of two-phase construction method. Does non-allocating construction.

Since
6.0

Parameters

const TAuthorityC8 & aAuthorityThe parsed authority component information from which to create the authority.

~CAuthority8()

IMPORT_C~CAuthority8()

Destructor.

Since
6.0

Member Functions Documentation

Authority()

IMPORT_C const TAuthorityC8 &Authority()const

Provides a reference to the parsed authority. Allows access to the non-modifying API for TAuthorityC8.

Since
6.0

ConstructL()

voidConstructL()[private]

Second phase of two-phase construction method. Does any allocations required to fully construct the object.

Since
6.0
Pre-condition
First phase of construction is complete.
Post-condition
The object is fully constructed and initialized.

FormAuthorityL()

voidFormAuthorityL()[private]

Forms the authority from the parsed authority information. A copy of the parsed authority is created. The parsed authority is changed to refer to the copy.

Since
6.0
Pre-condition
The parsed authority information is set.
Post-condition
The authority buffer is a copy of the parsed authority, and the parsed authority now refers to the copy.

NewL(const TAuthorityC8 &)

IMPORT_C CAuthority8 *NewL(const TAuthorityC8 &aAuthority)[static]

Static factory constructor. Uses two phase construction and leaves nothing on the CleanupStack. Creates an authority object which is a copy of the input parameter aAuthority.

Since
6.0
Post-condition
A fully constructed and initialized CAuthority8 object.

Parameters

const TAuthorityC8 & aAuthorityA reference to a parsed authority object.

NewL()

IMPORT_C CAuthority8 *NewL()[static]

Static factory constructor. Uses two phase construction and leaves nothing on the CleanupStack. Creates an authority object which is empty.

Since
6.0
Post-condition
A fully constructed and initialized CAuthority8 object.

NewLC(const TAuthorityC8 &)

IMPORT_C CAuthority8 *NewLC(const TAuthorityC8 &aAuthority)[static]

Static factory constructor. Uses two phase construction and leaves a pointer to created object on the CleanupStack. Creates an authority object which is a copy of the input parameter aAuthority.

Since
6.0
Post-condition
A fully constructed and initialized CAuthority8 object.

Parameters

const TAuthorityC8 & aAuthorityA reference to a parsed authority object.

NewLC()

IMPORT_C CAuthority8 *NewLC()[static]

Static factory constructor. Uses two phase construction and leaves a pointer to created object on the CleanupStack. Creates an authority object which is empty.

Since
6.0
Post-condition
A fully constructed and initialized CAuthority8 object.

RemoveComponentL(TAuthorityComponent)

IMPORT_C voidRemoveComponentL(TAuthorityComponentaComponent)

Removes the specified component from the authority. If the component does not exist then this function does nothing.

Since
6.0
Pre-condition
Object is fully constructed.
Post-condition
The authority is updated to exclude the specified component.

Parameters

TAuthorityComponent aComponentAn enum specifying the component to be removed.

SetAndEscapeComponentL(const TDesC8 &, TAuthorityComponent)

IMPORT_C voidSetAndEscapeComponentL(const TDesC8 &aData,
TAuthorityComponentaComponent
)

Escape encodes the component then sets the specified component in the authority. The component is set to the value given in the argument aData. If the specified component already exists then it is replaced with the new value.

Since
6.0
Pre-condition
Object is fully constructed.
Post-condition
The authority has the specified component set to the new value.

Parameters

const TDesC8 & aDataA descriptor pointer to the new value for the authority component.
TAuthorityComponent aComponentAn enum specifying the component to be set.

SetComponentL(const TDesC8 &, TAuthorityComponent)

IMPORT_C voidSetComponentL(const TDesC8 &aData,
TAuthorityComponentaComponent
)

Sets the specified component in the authority. The component is set to the value given in the argument aData. If the specified component already exists then it is replaced with the new value.

Since
6.0
Pre-condition
Object is fully constructed.
Post-condition
The authority has the specified component set to the new value. KErrArgument If aComponent goes out of range.

Parameters

const TDesC8 & aDataA descriptor pointer to the new value for the authority component.
TAuthorityComponent aComponentAn enum specifying the component to be set.

Member Data Documentation

TAuthorityC8 iAuthority

TAuthorityC8 iAuthority[private]

The parsed authority object.

HBufC8 * iAuthorityBuf

HBufC8 *iAuthorityBuf[private]

The descriptor buffer that contains the authority.