Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: csendasaccounts.h
Link against: sendas2.lib

Class CSendAsAccounts

class CSendAsAccounts : public CBase;

Description

Provides human-readable names and IDs for the list of accounts for a given message type.

Derivation

Members

Defined in CSendAsAccounts:
Account(), AccountFromNameL(), AccountNames(), AppendAccountL(), Count(), MessageType(), NameFromAccountL(), NewL(), RemoveAccount(), Reset(), SetMessageType(), Size(), ~CSendAsAccounts()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


NewL()

static IMPORT_C CSendAsAccounts *NewL();

Description

Create a new CSendAsAccount.

Return value

CSendAsAccounts *

If the function succeeds, this is a pointer to a newly allocated and initialised object.


~CSendAsAccounts()

virtual IMPORT_C ~CSendAsAccounts();

Description

Destructor.

[Top]


Member functions


MessageType()

IMPORT_C TUid MessageType() const;

Description

The UID of the message type.

Return value

TUid

The UID of the message type.


SetMessageType()

IMPORT_C void SetMessageType(TUid aMessageType);

Description

Sets UID of the message type.

Parameters

TUid aMessageType

The UID of the message type.


AccountNames()

IMPORT_C const MDesC16Array &AccountNames() const;

Description

The array of names of accounts for this message type.

Return value

const MDesC16Array &

An array of name of accounts.


Account()

IMPORT_C TSendAsAccount Account(TInt aIndex) const;

Description

The account specified by the index argument.

Parameters

TInt aIndex

The index of the specified account.

Return value

TSendAsAccount

The account specified by the index argument.


NameFromAccountL()

IMPORT_C TPtrC NameFromAccountL(const TSendAsAccount aAccount) const;

Description

The name associated with the given account.

Parameters

const TSendAsAccount aAccount

The account whose associated name is to be returned.

Return value

TPtrC

A descriptor holding the associated name.


AccountFromNameL()

IMPORT_C TSendAsAccount AccountFromNameL(const TDesC &aName) const;

Description

The account associated with the given name.

Parameters

const TDesC &aName

The associated name for the account to be returned.

Return value

TSendAsAccount

An account for the associated name.

Leave codes

KErrNotFound

An account with the given name cannot be found.


Count()

IMPORT_C TInt Count() const;

Description

The number of accounts for this message type.

Return value

TInt

The number of accounts.


Reset()

IMPORT_C void Reset();

Description

Deletes all elements from the array.


AppendAccountL()

IMPORT_C void AppendAccountL(const TDesC &aAccountName, TSendAsAccount aAccount);

Description

Appends a new account and associated name pair.

Parameters

const TDesC &aAccountName

The human readable name with which to associate with the given account.

TSendAsAccount aAccount

The account to add.


RemoveAccount()

IMPORT_C void RemoveAccount(TInt aIndex);

Description

Removes an existing account and associated name pair.

Parameters

TInt aIndex

The index of the entry to remove.


Size()

IMPORT_C TInt Size() const;

Description

Gives the size of the accounts collection.

Return value

TInt

The size of the accounts collection.