Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: SMTCMTM.H
Link against: imcm.lib

Class CSmtpClientMtm

class CSmtpClientMtm : public CBaseMtm;

Description

SMTP client MTM interface.

Most of the functions in this class are implementations of the virtual functions defined by the base class CBaseMtm.

Derivation

Members

Defined in CSmtpClientMtm:
AddAddresseeL(), AddAddresseeL(), AddAddresseeL(), AddAddresseeL(), AddAttachmentL(), AddAttachmentL(), AddEntryAsAttachmentL(), AddLinkedAttachmentL(), CancelAttachmentOperation(), ChangeDefaultServiceL(), ContextEntrySwitched(), CreateAttachmentL(), CreateMessageL(), DefaultServiceL(), Find(), ForwardL(), InvokeAsyncFunctionL(), InvokeSyncFunctionL(), LoadMessageL(), QueryCapability(), RemoveAddressee(), RemoveDefaultServiceL(), ReplyL(), RestoreSettingsL(), SaveMessageL(), SetSettingsL(), SetSubjectL(), Settings(), StoreSettingsL(), SubjectL(), ValidateMessage()

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

Inherited from CBaseMtm:
AddresseeList(), BioTypeChangedL(), Body(), Entry(), Filler1(), Filler2(), GetInterface(), HandleEntryEventL(), HasContext(), RestoreBodyL(), Session(), SetCurrentEntryL(), StoreBodyL(), SwitchCurrentEntryL(), Type(), iAddresseeList, iCharFormatLayer, iMsvEntry, iParaFormatLayer

Inherited from MMsvEntryObserver:
EMsvChildrenChanged, EMsvChildrenInvalid, EMsvChildrenMissing, EMsvContextInvalid, EMsvDeletedChildren, EMsvEntryChanged, EMsvEntryDeleted, EMsvEntryMoved, EMsvNewChildren, TMsvEntryEvent


Member functions


SaveMessageL()

virtual void SaveMessageL();

Description

Commits cached changes to the current message context to the storage controlled by the Message Server.


LoadMessageL()

virtual void LoadMessageL();

Description

Loads the cache with the message data for the current context.


StoreSettingsL()

IMPORT_C void StoreSettingsL();

Description

Stores the current service settings from the object's cache in to the Central Repository for the current entry.

The current entry must be a service.


RestoreSettingsL()

IMPORT_C void RestoreSettingsL();

Description

Loads into the object's cache the service settings from the Central Repository for the current entry.


ReplyL()

virtual CMsvOperation *ReplyL(TMsvId aReplyEntryId, TMsvPartList aPartlist, TRequestStatus &aCompletionStatus);

Description

Creates a reply message to the current message context.

Parameters

TMsvId aReplyEntryId

The entry to which to assign the reply

TMsvPartList aPartlist

Defines the parts that are to be copied from the original message into the reply

TRequestStatus &aCompletionStatus

The request status to be completed when the operation has finished

Return value

CMsvOperation *

If successful, this is an asynchronously completing reply operation. If failed, this is a completed operation, with status set to the relevant error code.


ForwardL()

virtual CMsvOperation *ForwardL(TMsvId aForwardEntryId, TMsvPartList aPartList, TRequestStatus &aCompletionStatus);

Description

Creates a forwarded message from the current message context.

Parameters

TMsvId aForwardEntryId

The entry to which to assign the forwarded message

TMsvPartList aPartList

Defines the parts that are to be copied from the original message into the forwarded message

TRequestStatus &aCompletionStatus

The request status to be completed when the operation has finished

Return value

CMsvOperation *

If successful, this is an asynchronously completing forward message operation. If failed, this is a completed operation, with status set to the relevant error code.


ValidateMessage()

virtual TMsvPartList ValidateMessage(TMsvPartList aPartList);

Description

Validates the current message context.

The addresses for the message are checked to be well-formed email addresses.

Parameters

TMsvPartList aPartList

Indicates the message parts for which validation is requested

Return value

TMsvPartList

If valid, KErrNone If invalid, identifies the invalid part(s). The error value is the bitmask of the TMsvPartList IDs for each invalid part


Find()

virtual TMsvPartList Find(const TDesC &aTextToFind, TMsvPartList aPartList);

Description

Searches the specified message part(s) for the plain-text version of the text to be found.

Parameters

const TDesC &aTextToFind

The plain-text version of the text to be found.

TMsvPartList aPartList

Indicates the message parts which should be searched.

Return value

TMsvPartList

If the text was not found, or searching is unsupported, 0. If the text was found, a bitmask of the TMsvPartList IDs for each part in which the text was present.


AddAddresseeL()

virtual void AddAddresseeL(const TDesC &aRealAddress);

Description

Adds an addressee for the current context.

Parameters

const TDesC &aRealAddress

String representing an address to be added to the list for the current message


AddAddresseeL()

virtual void AddAddresseeL(const TDesC &aRealAddress, const TDesC &aAlias);

Description

Adds an addressee with an alias for the current context.

Parameters

const TDesC &aRealAddress

String representing an address to be added to the list for the current message

const TDesC &aAlias

Alias information


AddAddresseeL()

virtual void AddAddresseeL(TMsvRecipientType aType, const TDesC &aRealAddress);

Description

Parameters

TMsvRecipientType aType

const TDesC &aRealAddress


AddAddresseeL()

virtual void AddAddresseeL(TMsvRecipientType aType, const TDesC &aRealAddress, const TDesC &aAlias);

Description

Parameters

TMsvRecipientType aType

const TDesC &aRealAddress

const TDesC &aAlias


RemoveAddressee()

virtual void RemoveAddressee(TInt aIndex);

Description

Removes an address from the current address list.

Parameters

TInt aIndex

Index of address to be removed


SetSettingsL()

IMPORT_C void SetSettingsL(const CImSmtpSettings &aSettings);

Description

Copies the specified service settings to the cached service settings.

Parameters

const CImSmtpSettings &aSettings

New service settings


Settings()

IMPORT_C const CImSmtpSettings &Settings() const;

Description

Gets the current cached service settings.

Return value

const CImSmtpSettings &

The current cached service settings


SetSubjectL()

virtual IMPORT_C void SetSubjectL(const TDesC &aSubject);

Description

Sets the message context's subject text.

Parameters

const TDesC &aSubject

Subject text


SubjectL()

virtual IMPORT_C const TPtrC SubjectL() const;

Description

Gets the message context's subject text.

Return value

const TPtrC

Subject text


QueryCapability()

virtual TInt QueryCapability(TUid aCapability, TInt &aResponse);

Description

Queries if the MTM supports a particular capability, specified by a UID.

Parameters

TUid aCapability

UID of capability to be queried

TInt &aResponse

Response value. The format of the response varies according to the capability.

Return value

TInt

KErrNone: aCapability is a recognised value and a response is returned KErrNotSupported: aCapability is not a recognised value


InvokeSyncFunctionL()

virtual void InvokeSyncFunctionL(TInt aFunctionId, const CMsvEntrySelection &aSelection, TDes8 &aParameter);

Description

Invokes a synchronous SMTP-specific operation.

Parameters

TInt aFunctionId

Specifies which operation to perform. The only valid ID is KSMTPMTMIsConnected.

const CMsvEntrySelection &aSelection

A selection of messages for the operation.

TDes8 &aParameter

Not used


InvokeAsyncFunctionL()

virtual CMsvOperation *InvokeAsyncFunctionL(TInt aFunctionId, const CMsvEntrySelection &aSelection, TDes8 &aParameter, TRequestStatus &aCompletionStatus);

Description

Invokes asynchronous SMTP-specific operations.

Parameters

TInt aFunctionId

Specifies which operation to perform e.g. connect, copy new mail etc. The specific operations are defined by the TSmtpCmds enumeration.

const CMsvEntrySelection &aSelection

A selection of messages that need to be copied/moved to a local folder. The first entry in this selection MUST be the service.

TDes8 &aParameter

Not used

TRequestStatus &aCompletionStatus

The status when the operation completes.

Return value

CMsvOperation *

If successful, this is an asynchronously completing operation. If failed, this is a completed operation, with status set to the relevant error code.

Leave codes

KErrNotFound

The selection of email to be moved or copied is empty

KErrNotSupported

The specified operation is not recognised

See also:


AddAttachmentL()

virtual IMPORT_C void AddAttachmentL(const TDesC &aFilePath, const TDesC8 &aMimeType, TUint aCharset, TRequestStatus &aStatus);

Description

Parameters

const TDesC &aFilePath

const TDesC8 &aMimeType

TUint aCharset

TRequestStatus &aStatus


AddAttachmentL()

virtual IMPORT_C void AddAttachmentL(RFile &aFile, const TDesC8 &aMimeType, TUint aCharset, TRequestStatus &aStatus);

Description

Parameters

RFile &aFile

const TDesC8 &aMimeType

TUint aCharset

TRequestStatus &aStatus


AddLinkedAttachmentL()

virtual IMPORT_C void AddLinkedAttachmentL(const TDesC &aFilePath, const TDesC8 &aMimeType, TUint aCharset, TRequestStatus &aStatus);

Description

Parameters

const TDesC &aFilePath

const TDesC8 &aMimeType

TUint aCharset

TRequestStatus &aStatus


AddEntryAsAttachmentL()

virtual IMPORT_C void AddEntryAsAttachmentL(TMsvId aAttachmentId, TRequestStatus &aStatus);

Description

Parameters

TMsvId aAttachmentId

TRequestStatus &aStatus


CreateAttachmentL()

virtual IMPORT_C void CreateAttachmentL(const TDesC &aFileName, RFile &aAttachmentFile, const TDesC8 &aMimeType, TUint aCharset, TRequestStatus &aStatus);

Description

Parameters

const TDesC &aFileName

RFile &aAttachmentFile

const TDesC8 &aMimeType

TUint aCharset

TRequestStatus &aStatus


CreateMessageL()

virtual IMPORT_C void CreateMessageL(TMsvId aServiceId);

Description

Creates a new message entry as a child of the current context.

Parameters

TMsvId aServiceId

ID of the service to own the entry.


DefaultServiceL()

virtual IMPORT_C TMsvId DefaultServiceL() const;

Description

Gets the default SMTP service.

KErrNotFound If default service setting does not exist.

Return value

TMsvId

The default service

Leave codes


RemoveDefaultServiceL()

virtual IMPORT_C void RemoveDefaultServiceL();

Description

Removes the default SMTP service.


ChangeDefaultServiceL()

virtual IMPORT_C void ChangeDefaultServiceL(const TMsvId &aService);

Description

Sets the default SMTP service.

Parameters

const TMsvId &aService

The default service


CancelAttachmentOperation()

virtual IMPORT_C void CancelAttachmentOperation();

Description

Cancels the current attachment operation.


ContextEntrySwitched()

protected: virtual void ContextEntrySwitched();

Description

Called by the base class functions SwitchCurrentEntryL() and SetCurrentEntryL() when the context is changed to another entry.

Client applications do not use this function. It is relevant only to implementers of derived classes.

Requirements:

An implementation should clear:

1. address data stored in iAddresseeList

2. any caches of MTM-specific entry data relating to a previous context. For example, if the implementation has a private buffer storing a message subject, for access through Subject(), this buffer should be cleared.