CAuthentication Class Reference

class CAuthentication : public CBase

CAuthentication encapsulates username and login information. Uses 8-bit descriptors. Unicode text must be tranformed into UTF8 for storage.

Inherits from

Constructor & Destructor Documentation

CAuthentication(TMethod)

CAuthentication(TMethodaMethod)[private]

Constructor.

Parameters

TMethod aMethodenum value of type TMethod.

~CAuthentication()

IMPORT_C~CAuthentication()

Destructor

Member Functions Documentation

ConstructL(const TDesC8 &, const TDesC8 &)

voidConstructL(const TDesC8 &aName,
const TDesC8 &aPassword
)[private]

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

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

Parameters

const TDesC8 & aNameA descriptor to be allocated initialised with.
const TDesC8 & aPasswordA descriptor to be allocated initialised with.

ConstructL(const TUriC8 &)

voidConstructL(const TUriC8 &aUri)[private]

Second phase of two-phase construction method. Does any allocations required to fully construct the object. Must set both user name and password to at least an empty string.

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

Parameters

const TUriC8 & aUriThe URI with a userinfo component.

Method()

IMPORT_C TMethodMethod()const

Gets the method type.

Name()

IMPORT_C const TDesC8 &Name()const

Gets the user name.

NewL(const TDesC8 &, const TDesC8 &, TMethod)

IMPORT_C CAuthentication *NewL(const TDesC8 &aName,
const TDesC8 &aPassword,
TMethodaMethod = EDigest
)[static]

Creates a new instance of CAuthentication.

leave
KErrNoMemory

Parameters

const TDesC8 & aNameThe new user name. A local copy of descriptor is created. Can be a null descriptor.
const TDesC8 & aPasswordThe new password. A local copy of descriptor is created. Can be a null descriptor.
TMethod aMethod = EDigestthe method type of either basic or digest. Defaults to digest.

NewL(const TUriC8 &, TMethod)

IMPORT_C CAuthentication *NewL(const TUriC8 &aUri,
TMethodaMethod = EDigest
)[static]

Creates a new instance of CAuthentication.

leave
KErrNotFound If there is no userinfo component.
leave
KErrNoMemory

Parameters

const TUriC8 & aUriThe URI with a userinfo component.
TMethod aMethod = EDigestthe method type of either basic or digest. Defaults to digest.

Password()

IMPORT_C const TDesC8 &Password()const

Gets the password.

SetMethod(TMethod)

IMPORT_C voidSetMethod(TMethodaMethod)

Sets the method type.

Parameters

TMethod aMethodThe new authentication method type.

SetNameL(const TDesC8 &)

IMPORT_C voidSetNameL(const TDesC8 &aName)

Sets the username.

leave
KErrNoMemory

Parameters

const TDesC8 & aNameReference to the new username descriptor.

SetPasswordL(const TDesC8 &)

IMPORT_C voidSetPasswordL(const TDesC8 &aPassword)

Sets the password.

leave
KErrNoMemory

Parameters

const TDesC8 & aPasswordReference to the new password descriptor.

Member Enumerations Documentation

Enum TMethod

enum for TMethod

Enumerators

EBasic

Basic

EDigest

Digest

Member Data Documentation

TMethod iMethodType

TMethod iMethodType[private]

The enum of type TMethod.

HBufC8 * iName

HBufC8 *iName[private]

The descriptor buffer that contains the Name.

HBufC8 * iPassword

HBufC8 *iPassword[private]

The descriptor buffer that contains the Password.