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 ( TMethod aMethod ) [private]

Constructor.

Parameters

TMethod aMethod enum value of type TMethod.

~CAuthentication()

IMPORT_C ~CAuthentication ( )

Destructor

Member Functions Documentation

ConstructL(const TDesC8 &, const TDesC8 &)

void ConstructL ( 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 & aName A descriptor to be allocated initialised with.
const TDesC8 & aPassword A descriptor to be allocated initialised with.

ConstructL(const TUriC8 &)

void ConstructL ( 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 & aUri The URI with a userinfo component.

Method()

IMPORT_C TMethod Method ( ) 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,
TMethod aMethod = EDigest
) [static]

Creates a new instance of CAuthentication .

leave
KErrNoMemory

Parameters

const TDesC8 & aName The new user name. A local copy of descriptor is created. Can be a null descriptor.
const TDesC8 & aPassword The new password. A local copy of descriptor is created. Can be a null descriptor.
TMethod aMethod = EDigest the method type of either basic or digest. Defaults to digest.

NewL(const TUriC8 &, TMethod)

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

Creates a new instance of CAuthentication .

leave
KErrNotFound If there is no userinfo component.
leave
KErrNoMemory

Parameters

const TUriC8 & aUri The URI with a userinfo component.
TMethod aMethod = EDigest the method type of either basic or digest. Defaults to digest.

Password()

IMPORT_C const TDesC8 & Password ( ) const

Gets the password.

SetMethod(TMethod)

IMPORT_C void SetMethod ( TMethod aMethod )

Sets the method type.

Parameters

TMethod aMethod The new authentication method type.

SetNameL(const TDesC8 &)

IMPORT_C void SetNameL ( const TDesC8 & aName )

Sets the username.

leave
KErrNoMemory

Parameters

const TDesC8 & aName Reference to the new username descriptor.

SetPasswordL(const TDesC8 &)

IMPORT_C void SetPasswordL ( const TDesC8 & aPassword )

Sets the password.

leave
KErrNoMemory

Parameters

const TDesC8 & aPassword Reference 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.