Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: csmsemailfields.h
Link against: smcm.lib

Class CSmsEmailFields

class CSmsEmailFields : public CBase;

Description

Encapsulates the address and subject fields for Email sent over SMS.

Derivation

Members

Defined in CSmsEmailFields:
AddAddressL(), Addresses(), HasAddress(), Length(), NewL(), NewL(), RemoveAddress(), Reset(), SetSubjectL(), Subject(), ~CSmsEmailFields()

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


Construction and destruction


NewL()

static IMPORT_C CSmsEmailFields *NewL();

Description

Factory constructor.

Return value

CSmsEmailFields *

An empty email fields object.


NewL()

static IMPORT_C CSmsEmailFields *NewL(const CSmsEmailFields &aEmailFields);

Description

Factory copy constructor.

Parameters

const CSmsEmailFields &aEmailFields

The orginal email fields object from which a copy is made.

Return value

CSmsEmailFields *

A copy of aEmailFields.


~CSmsEmailFields()

virtual IMPORT_C ~CSmsEmailFields();

Description

Destructor.

[Top]


Member functions


Reset()

IMPORT_C void Reset();

Description

Resets the contents of the email fields object.


Length()

IMPORT_C TInt Length() const;

Description

The number of characters in the email fields.

Calculates the number of characters that will be pre-pended to an SMS message when SMS is set for interworking with email. The address and subject fields are only valid if the their length is greater than zero.

The address field is a comma separated list of addresses.

It assumes that a subject will be added with the following format.

    <address>(<subject>)<message>

No validation of the contents of the fields is performed.

Return value

TInt

The number of characters in the email fields.


HasAddress()

IMPORT_C TBool HasAddress() const;

Description

Indicates whether the address field contains at least one address

Return value

TBool

A value of true if the address field contains at least one address, false if the address field is empty.


AddAddressL()

IMPORT_C void AddAddressL(const TDesC &aAddress);

Description

Adds the address to the list of addresses.

The address to be added must have a non-zero length. A zero-length address will not be added to the address list.

Parameters

const TDesC &aAddress

The address to be added.


RemoveAddress()

IMPORT_C void RemoveAddress(TInt aIndex);

Description

Removes the specified address.

Parameters

TInt aIndex

The index for the address to be remvoed.


Addresses()

IMPORT_C const MDesC16Array &Addresses() const;

Description

The array of email addresses.

Return value

const MDesC16Array &

An array of email addresses.


SetSubjectL()

IMPORT_C void SetSubjectL(const TDesC &aSubject);

Description

Sets the email subject field.

Copies the contents of subject as the email subject field. If the copy is unsuccessful the current contents is left unchanged.

Parameters

const TDesC &aSubject

The subject to be copied into the email field.


Subject()

IMPORT_C const TDesC &Subject() const;

Description

The subject field.

Return value

const TDesC &

The subject field.