RSendAsMessage Class Reference

class RSendAsMessage : public RSubSessionBase

Encapsulates creating and sending a message. This class requires a connected RSendAs session.

A client application can have several RSendAsMessage objects created simultaneously. Each RSendAsMessage object corresponds to a single message.

With the RSendAsMessage class, a client application can perform the following operations:

-Creating and managing a message

-Modifying a message created using SendAs

-Sending a message

-Launching a message editor

Client applications do not require any capabilities in order to use the RSendAs and RSendAsMessage APIs. However, if an application does not have the necessary security capabilities to send a message, the SendAs server ensures that a message is only sent after the user's authorization.

A message created using RSendAsMessage can be saved, sent, or passed to the appropriate message editor. There are two types of send operation:

-A confirmed send is forwarded to the UI MTM for the message type. Typically this results in the user being asked to confirm that the message should be sent.

-An unconfirmed send fails if the client application does not have the required capabilities to use the server MTM for the message type.

There are asynchronous and synchronous forms of these sending methods. Progress information for sending is available when the asynchronous forms are used. The synchronous forms, and the methods for saving the message and for launching it in a message editor, all close the handle to the RSendAsMessage, so the message cannot be further accessed through the API.

Inherits from

Public Member Functions
IMPORT_C voidAddAttachment(const TDesC &, const TDesC8 &, TUint, TRequestStatus &)
IMPORT_C voidAddAttachment(const TDesC &, const TDesC8 &, TRequestStatus &)
IMPORT_C voidAddAttachment(const TDesC &, TRequestStatus &)
IMPORT_C voidAddAttachment(RFile &, const TDesC8 &, TUint, TRequestStatus &)
IMPORT_C voidAddAttachment(RFile &, const TDesC8 &, TRequestStatus &)
IMPORT_C voidAddAttachment(RFile &, TRequestStatus &)
IMPORT_C voidAddLinkedAttachment(const TDesC &, const TDesC8 &, TUint, TRequestStatus &)
IMPORT_C voidAddLinkedAttachment(const TDesC &, const TDesC8 &, TRequestStatus &)
IMPORT_C voidAddLinkedAttachment(const TDesC &, TRequestStatus &)
IMPORT_C voidAddRecipientL(const TDesC &, TSendAsRecipientType)
IMPORT_C voidAddRecipientL(const TDesC &, const TDesC &, TSendAsRecipientType)
IMPORT_C voidCancel()
IMPORT_C voidClose()
IMPORT_C voidCreateAttachmentL(const TDesC &, RFile &)
IMPORT_C voidCreateAttachmentL(const TDesC &, RFile &, const TDesC8 &)
IMPORT_C voidCreateAttachmentL(const TDesC &, RFile &, const TDesC8 &, TUint)
IMPORT_C voidCreateL(RSendAs &, TSendAsAccount)
IMPORT_C voidCreateL(RSendAs &, TUid)
IMPORT_C voidLaunchEditorAndCloseL()
IMPORT_C voidProgressL(TSendAsProgress &)
IMPORT_C voidSaveMessageAndCloseL()
IMPORT_C voidSendMessage(TRequestStatus &)
IMPORT_C voidSendMessageAndCloseL()
IMPORT_C voidSendMessageConfirmed(TRequestStatus &)
IMPORT_C voidSendMessageConfirmedAndCloseL()
IMPORT_C voidSetBioTypeL(TUid)
IMPORT_C voidSetBodyTextL(const CRichText &)
IMPORT_C voidSetBodyTextL(const TDesC &)
IMPORT_C voidSetCharacterSetL(const TUint)
IMPORT_C voidSetSubjectL(const TDesC &)
Inherited Functions
RSubSessionBase::CloseSubSession(TInt)
RSubSessionBase::CreateAutoCloseSubSession(RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::RSubSessionBase()
RSubSessionBase::Send(TInt)const
RSubSessionBase::Send(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt)const
RSubSessionBase::SendReceive(TInt,TRequestStatus &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSubSessionBase::Session()const
RSubSessionBase::SubSessionHandle()const
Public Member Enumerations
enumTSendAsRecipientType { ESendAsRecipientTo = EMsvRecipientTo, ESendAsRecipientCc, ESendAsRecipientBcc }
Private Attributes
TAny *iAny

Member Functions Documentation

AddAttachment(const TDesC &, const TDesC8 &, TUint, TRequestStatus &)

IMPORT_C voidAddAttachment(const TDesC &aFilePath,
const TDesC8 &aMimeType,
TUintaCharset,
TRequestStatus &aStatus
)

Parameters

const TDesC & aFilePath
const TDesC8 & aMimeType
TUint aCharset
TRequestStatus & aStatus

AddAttachment(const TDesC &, const TDesC8 &, TRequestStatus &)

IMPORT_C voidAddAttachment(const TDesC &aFilePath,
const TDesC8 &aMimeType,
TRequestStatus &aStatus
)

Parameters

const TDesC & aFilePath
const TDesC8 & aMimeType
TRequestStatus & aStatus

AddAttachment(const TDesC &, TRequestStatus &)

IMPORT_C voidAddAttachment(const TDesC &aFilePath,
TRequestStatus &aStatus
)

Parameters

const TDesC & aFilePath
TRequestStatus & aStatus

AddAttachment(RFile &, const TDesC8 &, TUint, TRequestStatus &)

IMPORT_C voidAddAttachment(RFile &aFile,
const TDesC8 &aMimeType,
TUintaCharset,
TRequestStatus &aStatus
)

Parameters

RFile & aFile
const TDesC8 & aMimeType
TUint aCharset
TRequestStatus & aStatus

AddAttachment(RFile &, const TDesC8 &, TRequestStatus &)

IMPORT_C voidAddAttachment(RFile &aFile,
const TDesC8 &aMimeType,
TRequestStatus &aStatus
)

Parameters

RFile & aFile
const TDesC8 & aMimeType
TRequestStatus & aStatus

AddAttachment(RFile &, TRequestStatus &)

IMPORT_C voidAddAttachment(RFile &aFile,
TRequestStatus &aStatus
)

Parameters

RFile & aFile
TRequestStatus & aStatus

AddLinkedAttachment(const TDesC &, const TDesC8 &, TUint, TRequestStatus &)

IMPORT_C voidAddLinkedAttachment(const TDesC &aFilePath,
const TDesC8 &aMimeType,
TUintaCharset,
TRequestStatus &aStatus
)

Parameters

const TDesC & aFilePath
const TDesC8 & aMimeType
TUint aCharset
TRequestStatus & aStatus

AddLinkedAttachment(const TDesC &, const TDesC8 &, TRequestStatus &)

IMPORT_C voidAddLinkedAttachment(const TDesC &aFilePath,
const TDesC8 &aMimeType,
TRequestStatus &aStatus
)

Parameters

const TDesC & aFilePath
const TDesC8 & aMimeType
TRequestStatus & aStatus

AddLinkedAttachment(const TDesC &, TRequestStatus &)

IMPORT_C voidAddLinkedAttachment(const TDesC &aFilePath,
TRequestStatus &aStatus
)

Parameters

const TDesC & aFilePath
TRequestStatus & aStatus

AddRecipientL(const TDesC &, TSendAsRecipientType)

IMPORT_C voidAddRecipientL(const TDesC &aAddress,
TSendAsRecipientTypeaRecipientType
)

Parameters

const TDesC & aAddress
TSendAsRecipientType aRecipientType

AddRecipientL(const TDesC &, const TDesC &, TSendAsRecipientType)

IMPORT_C voidAddRecipientL(const TDesC &aAddress,
const TDesC &aAlias,
TSendAsRecipientTypeaRecipientType
)

Parameters

const TDesC & aAddress
const TDesC & aAlias
TSendAsRecipientType aRecipientType

Cancel()

IMPORT_C voidCancel()

Close()

IMPORT_C voidClose()

CreateAttachmentL(const TDesC &, RFile &)

IMPORT_C voidCreateAttachmentL(const TDesC &aFileName,
RFile &aAttachmentFile
)

Parameters

const TDesC & aFileName
RFile & aAttachmentFile

CreateAttachmentL(const TDesC &, RFile &, const TDesC8 &)

IMPORT_C voidCreateAttachmentL(const TDesC &aFileName,
RFile &aAttachmentFile,
const TDesC8 &aMimeType
)

Parameters

const TDesC & aFileName
RFile & aAttachmentFile
const TDesC8 & aMimeType

CreateAttachmentL(const TDesC &, RFile &, const TDesC8 &, TUint)

IMPORT_C voidCreateAttachmentL(const TDesC &aFileName,
RFile &aAttachmentFile,
const TDesC8 &aMimeType,
TUintaCharset
)

Parameters

const TDesC & aFileName
RFile & aAttachmentFile
const TDesC8 & aMimeType
TUint aCharset

CreateL(RSendAs &, TSendAsAccount)

IMPORT_C voidCreateL(RSendAs &aSendAs,
TSendAsAccountaAccount
)

Parameters

RSendAs & aSendAs
TSendAsAccount aAccount

CreateL(RSendAs &, TUid)

IMPORT_C voidCreateL(RSendAs &aSendAs,
TUidaMessageType
)

Parameters

RSendAs & aSendAs
TUid aMessageType

LaunchEditorAndCloseL()

IMPORT_C voidLaunchEditorAndCloseL()

ProgressL(TSendAsProgress &)

IMPORT_C voidProgressL(TSendAsProgress &aProgress)

Parameters

TSendAsProgress & aProgress

SaveMessageAndCloseL()

IMPORT_C voidSaveMessageAndCloseL()

SendMessage(TRequestStatus &)

IMPORT_C voidSendMessage(TRequestStatus &aStatus)

Parameters

TRequestStatus & aStatus

SendMessageAndCloseL()

IMPORT_C voidSendMessageAndCloseL()

SendMessageConfirmed(TRequestStatus &)

IMPORT_C voidSendMessageConfirmed(TRequestStatus &aStatus)

Parameters

TRequestStatus & aStatus

SendMessageConfirmedAndCloseL()

IMPORT_C voidSendMessageConfirmedAndCloseL()

SetBioTypeL(TUid)

IMPORT_C voidSetBioTypeL(TUidaBioType)

Parameters

TUid aBioType

SetBodyTextL(const CRichText &)

IMPORT_C voidSetBodyTextL(const CRichText &aBody)

Parameters

const CRichText & aBody

SetBodyTextL(const TDesC &)

IMPORT_C voidSetBodyTextL(const TDesC &aBody)

Parameters

const TDesC & aBody

SetCharacterSetL(const TUint)

IMPORT_C voidSetCharacterSetL(const TUintaCharset)

Sets the character encoding value. The character encoding value options are 7-bit, 8-bit and 16-Bit Unicode. By default the character set encoding is 7 bit encoding.

Parameters

const TUint aCharset

SetSubjectL(const TDesC &)

IMPORT_C voidSetSubjectL(const TDesC &aSubject)

Parameters

const TDesC & aSubject

Member Enumerations Documentation

Enum TSendAsRecipientType

Defines the recipient types available when adding a recipient to a message

Enumerators

ESendAsRecipientTo = EMsvRecipientTo

Designates a 'To' recipient.

ESendAsRecipientCc

Designates a 'Cc' recipient.

ESendAsRecipientBcc

Designates a 'Bcc' recipient.

Member Data Documentation

TAny * iAny

TAny *iAny[private]