CImEmailMessage Class Reference

class CImEmailMessage : public CMsgActive

This class can be used to manipulate new emails that have been created using CImEmailOperation when composing a message.

Use an instance of this class to add attachments, MHTML parts, body text, and existing messages to a new message before it is to be sent.

This class can also be used to retrieve the body text, list of attachments, and embedded messages from emails that have been downloaded and stored within the message store.

If the store_8bit_body_text flag in imcm.rss is enabled, an instance of this class can be used to retrieve the original body text character set for a particular message. It can also be used to override the original body text character set so it will be decoded in a new character set next time it is viewed.

CImEmailOperation

Inherits from

Public Member Functions
~CImEmailMessage ()
void AddAttachmentL (const TDesC &, CMsvAttachment *, TRequestStatus &)
void AddLinkedAttachmentL (const TDesC &, CMsvAttachment *, TRequestStatus &)
void AppendEntryAttachmentInfoL ()
const RPointerArray < CMsvAttachment > & AttachmentInfoSelection ()
IMPORT_C MMsvAttachmentManager & AttachmentManager ()
void CheckEntryAndResetStoreMessageL ( TMsvId )
CMsvMimeHeaders * ConvertToMsvMimeHeadersL ( CImMimeHeader *)
void CreateAttachmentL (const TDesC &, RFile &, CMsvAttachment *, TRequestStatus &)
void DoGetAttachmentsListL ( TMsvId , TImAttachmentType , TImEmailEntryType )
void DoGetBodyTextInitL ( TMsvId , TImEmailEntryType , CRichText &, CParaFormatLayer &, CCharFormatLayer &)
void DoSetActive ( TRequestStatus &)
TMsvId EmailEntryId ()
IMPORT_C void FindFirstHTMLPageL ( TMsvId , TRequestStatus &)
IMPORT_C void FindUniversalResourceIdentifierFileHandleL ( TMsvId , const TDesC &, const TDesC &, TRequestStatus &)
IMPORT_C void FindUniversalResourceIdentifierL ( TMsvId , const TDesC &, const TDesC &, TRequestStatus &)
IMPORT_C void GetAttachmentsListL ( TRequestStatus &, TMsvId , TImAttachmentType , TImEmailEntryType )
IMPORT_C void GetAttachmentsListL ( TMsvId , TImAttachmentType , TImEmailEntryType )
IMPORT_C void GetBodyTextEntryIdL ( TRequestStatus &, TMsvId , TImEmailEntryType )
IMPORT_C void GetBodyTextEntryIdL ( TMsvId , TImEmailEntryType )
IMPORT_C void GetBodyTextL ( TRequestStatus &, TMsvId , TImEmailEntryType , CRichText &, CParaFormatLayer &, CCharFormatLayer &)
IMPORT_C void GetBodyTextL ( TMsvId , TImEmailEntryType , CRichText &, CParaFormatLayer &, CCharFormatLayer &)
IMPORT_C void GetMessageDigestEntriesL ( TRequestStatus &, TMsvId )
IMPORT_C TInt GetUniversalResourceIdentifierFileHandle ( TMsvId &, RFile &)
IMPORT_C HBufC * GetUniversalResourceIdentifierL ( TMsvId &, TBool &)
IMPORT_C CImEmailMessage * NewL ( CMsvEntry &)
IMPORT_C CImEmailMessage * NewLC ( CMsvEntry &)
IMPORT_C CImPlainBodyText * OpenPlainBodyTextForReadL ( TImEmailEntryType , TInt )
IMPORT_C CImPlainBodyText * OpenPlainBodyTextForWriteL ()
IMPORT_C const TDesC8 & ProgressL ()
void RemoveAttachedMessageL ( TMsvAttachmentId , TRequestStatus &)
void RemoveAttachmentL ( TMsvAttachmentId , TRequestStatus &)
IMPORT_C const CMsvEntrySelection & Selection ()
IMPORT_C void SetCharacterSetL ( TMsvId , TUint )
IMPORT_C void StoreBodyTextL ( TMsvId , CRichText &, TRequestStatus &)
IMPORT_C void StoreBodyTextL ( TMsvId , CRichText &, TRequestStatus &, TBool )
IMPORT_C void StoreBodyTextWithMimeHeaderL ( TMsvId , CRichText &, const CImMimeHeader &, TRequestStatus &)
Private Member Functions
void AppendAttachmentL ()
void AttachmentInfoL ()
void CheckAndInitialiseL ( TMsvId )
void CompareChildrenAndPopulateSelL ()
void ConstructL ()
void DoCancel ()
void DoComplete ( TInt &)
void DoGetBodyTextEntryIdL ( TMsvId , TImEmailEntryType )
void DoRunL ()
void DoStateL ()
CImMimeHeader * FindAttachmentMimeHeaderL ()
TInt FindFilename (const CImMimeHeader &, TPtrC8 &)
void FindFilenameDecodeL (const CImMimeHeader &, TFileName &, TUint )
void FindFirstBodyTextPartL ( TMsvId , TBool &)
TMsvEntry FindIdEntryL ( TMsvId )
TBool GetBodyTextCharacterSetL ()
TUint GetOverrideCharacterSetL ()
void GetTextForRelatedFolderL ()
TBool HandleDifferentFolderTypesL ()
TBool MessageDigestEntry ()
void Reset ()
void SetBodyTextCharacterSetL ( TMsvId , TUint8 )
void Start ( TRequestStatus &)
void StartL ()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::RunError(TInt)
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CMsgActive::CMsgActive(TInt)
CMsgActive::Complete(TInt)
CMsgActive::Queue(TRequestStatus &)
CMsgActive::~CMsgActive()
Public Member Enumerations
enum TImAttachmentType {
EAllAttachments  = 0, EVCards , EVCalendars , EVEntries , EEncrypted , ESigned , ESecure , EICalendars
}
enum TImEmailEntryType { EThisMessageOnly , EThisMessageAndEmbeddedMessages }
Private Member Enumerations
enum TImAttachmentStates { ENoAttachment  = 0, EAddAttachment , EDeleteAttachment , ECreateAttachment }
enum TImEmailMessageStates {
EIdle  = 0, ETextForThisMsg , ETextForMsgDigest , ETextEntryIdForThisMsg , ETextEntryIdMsgDigest , ETextForThisMsgGetCharacterSet , EAttachmentsForThisMsg , EAttachmentsForMsgDigest , EMsgDigestEntries , EResolveURI , EStoreMessagePart , ERemoveMessagePart , EFinished
}
Inherited Enumerations
CActive:TPriority
Private Attributes
CImAttachmentManager * iAttachmentManager
CDesCArray * iAttachmentNameList
TInt iAttachmentState
TImAttachmentType iAttachmentType
CCharFormatLayer * iCharLayer
TUint iCharacterSetId
CMsvEntry & iClientEntry
CMsvEntrySelection * iCompleteSel
TMsvId iEmailEntryId
TMsvEmailEntry iEntry
TImEmailEntryType iEntryType
RFs iFs
TBool iIsAMHTMLmessage
CParaFormatLayer * iParaLayer
TMsvId iParentMsgId
TPckgBuf < TMsvId > iProgress
CImRemoveMessagePart * iRemoveMessagePart
CMsvEntrySelection * iResultSel
CRichText * iRichText
TImEmailMessageStates iState
CMsvStore * iStore
CImStoreMessagePart * iStoreMessagePart
TBool iUriFileFound
CImMhtmlUriResolver * iUriResolver
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

~CImEmailMessage()

IMPORT_C ~CImEmailMessage ( )

Destructor.

Member Functions Documentation

AddAttachmentL(const TDesC &, CMsvAttachment *, TRequestStatus &)

void AddAttachmentL ( const TDesC & aFilePath,
CMsvAttachment * aAttachmentInfo,
TRequestStatus & aStatus
)

Parameters

const TDesC & aFilePath
CMsvAttachment * aAttachmentInfo
TRequestStatus & aStatus

AddLinkedAttachmentL(const TDesC &, CMsvAttachment *, TRequestStatus &)

void AddLinkedAttachmentL ( const TDesC & aFilePath,
CMsvAttachment * aAttachmentInfo,
TRequestStatus & aStatus
)

Parameters

const TDesC & aFilePath
CMsvAttachment * aAttachmentInfo
TRequestStatus & aStatus

AppendAttachmentL()

void AppendAttachmentL ( ) [private]

Walking the tree attachments added as found.

AppendEntryAttachmentInfoL()

void AppendEntryAttachmentInfoL ( )

AttachmentInfoL()

void AttachmentInfoL ( ) [private]

AttachmentInfoSelection()

const RPointerArray < CMsvAttachment > & AttachmentInfoSelection ( ) const

Returns a list of attachment information pointers ( CMsvAttachment ) populated by a call to GetAttachmentsListL() .

Pre-condition
The attachment information list must first be populated by calling GetAttachmentsListL() .

AttachmentManager()

IMPORT_C MMsvAttachmentManager & AttachmentManager ( ) const

CheckAndInitialiseL(TMsvId)

void CheckAndInitialiseL ( TMsvId aMessageId ) [private]

Parameters

TMsvId aMessageId

CheckEntryAndResetStoreMessageL(TMsvId)

void CheckEntryAndResetStoreMessageL ( TMsvId aMessageId )

Parameters

TMsvId aMessageId

CompareChildrenAndPopulateSelL()

void CompareChildrenAndPopulateSelL ( ) [private]

ConstructL()

void ConstructL ( ) [private]

ConvertToMsvMimeHeadersL(CImMimeHeader *)

CMsvMimeHeaders * ConvertToMsvMimeHeadersL ( CImMimeHeader * aMimeHeader )

Parameters

CImMimeHeader * aMimeHeader

CreateAttachmentL(const TDesC &, RFile &, CMsvAttachment *, TRequestStatus &)

void CreateAttachmentL ( const TDesC & aFileName,
RFile & aAttachmentFile,
CMsvAttachment * aAttachmentInfo,
TRequestStatus & aStatus
)

Parameters

const TDesC & aFileName
RFile & aAttachmentFile
CMsvAttachment * aAttachmentInfo
TRequestStatus & aStatus

DoCancel()

void DoCancel ( ) [private, virtual]

Implements cancellation of an outstanding request.

This function is called as part of the active object's Cancel() .

It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.

DoCancel() must not wait for event completion; this is handled by Cancel() .

CActive::Cancel

DoComplete(TInt &)

void DoComplete ( TInt & ) [private, virtual]

Parameters

TInt &

DoGetAttachmentsListL(TMsvId, TImAttachmentType, TImEmailEntryType)

void DoGetAttachmentsListL ( TMsvId aMessageId,
TImAttachmentType aAttachmentType,
TImEmailEntryType aEntryType
)

Parameters

TMsvId aMessageId
TImAttachmentType aAttachmentType
TImEmailEntryType aEntryType

DoGetBodyTextEntryIdL(TMsvId, TImEmailEntryType)

void DoGetBodyTextEntryIdL ( TMsvId aMessageId,
TImEmailEntryType aEntryType
) [private]

Parameters

TMsvId aMessageId
TImEmailEntryType aEntryType

DoGetBodyTextInitL(TMsvId, TImEmailEntryType, CRichText &, CParaFormatLayer &, CCharFormatLayer &)

void DoGetBodyTextInitL ( TMsvId aMessageId,
TImEmailEntryType aEntryType,
CRichText & aRichText,
CParaFormatLayer & aParaLayer,
CCharFormatLayer & aCharLayer
)

Parameters

TMsvId aMessageId
TImEmailEntryType aEntryType
CRichText & aRichText
CParaFormatLayer & aParaLayer
CCharFormatLayer & aCharLayer

DoRunL()

void DoRunL ( ) [private, virtual]

DoSetActive(TRequestStatus &)

void DoSetActive ( TRequestStatus & aStatus )

Parameters

TRequestStatus & aStatus

DoStateL()

void DoStateL ( ) [private]

EmailEntryId()

TMsvId EmailEntryId ( )

FindAttachmentMimeHeaderL()

CImMimeHeader * FindAttachmentMimeHeaderL ( ) [private]

FindFilename(const CImMimeHeader &, TPtrC8 &)

TInt FindFilename ( const CImMimeHeader & aMimeInfo,
TPtrC8 & aFilename
) [private]

Parameters

const CImMimeHeader & aMimeInfo
TPtrC8 & aFilename

FindFilenameDecodeL(const CImMimeHeader &, TFileName &, TUint)

void FindFilenameDecodeL ( const CImMimeHeader & aMimeInfo,
TFileName & aFileName,
TUint aCharset
) [private]

Parameters

const CImMimeHeader & aMimeInfo
TFileName & aFileName
TUint aCharset

FindFirstBodyTextPartL(TMsvId, TBool &)

void FindFirstBodyTextPartL ( TMsvId aEntryId,
TBool & found
) [private]

Parameters

TMsvId aEntryId
TBool & found

FindFirstHTMLPageL(TMsvId, TRequestStatus &)

IMPORT_C void FindFirstHTMLPageL ( TMsvId aMessageId,
TRequestStatus & aStatus
)

Asynchronously searches for the starting MHTML part embedded in a multipart/related email message.

Used when retrieving specific parts of an MHTML message, such as inline images that are referenced as MHTML anchors within the HTML part of a message. Refer to RFC 2557 - "MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)" for information about MHTML email messages.

If the starting MHTML part cannot be located, then the first HTML part that occurs within the multipart/related message is located.

The result of the search is retrieved by calling GetUniversalResourceIdentifierL() after this methods has completed.

leave
KErrNotFound aMessageId entry could not be located.
panic
imcm 10 aMessageId is not of type KUidMsvMessageEntry.

Parameters

TMsvId aMessageId The entry Id of the email message that will be searched.
TRequestStatus & aStatus Asynchronous status object (TRequestStatus) that is signalled when the operation completes. aStatus should be checked by the caller to ensure that the operation was successful.

FindIdEntryL(TMsvId)

TMsvEntry FindIdEntryL ( TMsvId aMessageId ) [private]

Parameters

TMsvId aMessageId

FindUniversalResourceIdentifierFileHandleL(TMsvId, const TDesC &, const TDesC &, TRequestStatus &)

IMPORT_C void FindUniversalResourceIdentifierFileHandleL ( TMsvId aMessageId,
const TDesC & aBase,
const TDesC & aURI,
TRequestStatus & aStatus
)

Parameters

TMsvId aMessageId
const TDesC & aBase
const TDesC & aURI
TRequestStatus & aStatus

FindUniversalResourceIdentifierL(TMsvId, const TDesC &, const TDesC &, TRequestStatus &)

IMPORT_C void FindUniversalResourceIdentifierL ( TMsvId aMessageId,
const TDesC & aBase,
const TDesC & aURI,
TRequestStatus & aStatus
) [virtual]

Asynchronously searches a message entry for an MHTML URI, and resolves it to the message entry that contains the message part specified by the URI.

Used when retrieving specific parts of an MHTML message, such as inline images that are referenced as MHTML anchors within the HTML part of a message. Refer to RFC 2557 - "MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)" for information about MHTML email messages.

The result of the search is retrieved by calling GetUniversalResourceIdentifierL() after this method has completed.

leave
KErrNotFound aMessageId entry could not be located.
panic
imcm 10 aMessageId is not of type KUidMsvMessageEntry.

Parameters

TMsvId aMessageId The message Id of the body part that is to be searched for the URI. In the first instance, this value should be the starting MHTML entry Id that was located by calling FindFirstHTMLPageL().
const TDesC & aBase The base URI to use when searching for aURI if aURI is relative. If aBase is empty, and aURI is relative, then the Content-location MIME header contained within the HTML part specified by aMessageId is used as a base. If the Content-location header does not exist or is not absolute, then just the relative aURI is searched for.
const TDesC & aURI The absolute or relative URI to resolve. If aURI is absolute, then aBase is ignored and this method completes faster. If aURI is relative, then aBase is used as a base to resolve the relative URI. If aBase is empty and aURI is relative, then the Content-location MIME header contained within the HTML part specified by aMessageId is used as the base. If the Content-location header does not exist or is not absolute, then just the relative aURI is searched for.
TRequestStatus & aStatus Asynchronous status object (TRequestStatus) that is signalled when the operation completes. aStatus should be checked by the caller to ensure that the operation was successful.

GetAttachmentsListL(TRequestStatus &, TMsvId, TImAttachmentType, TImEmailEntryType)

IMPORT_C void GetAttachmentsListL ( TRequestStatus & aStatus,
TMsvId aMessageId,
TImAttachmentType aAttachmentType,
TImEmailEntryType aEntryType
)

Asynchronously populates a list containing all the attachment entry Ids found that are of a specified type belonging to the specified message. After this function has completed, call AttachmentSelection() to get the list of found attachments.

If the email's character set has been overridden by a prior call to SetCharacterSetL() , the attachment names are decoded with the new character set.

leave
KErrNotFound aMessageId entry could not be located.
panic
imcm 10 aMessageId is not of type KUidMsvMessageEntry.
leave
KErrNotSupported aEntryType is not EThisMessageOnly or EThisMessageAndEmbeddedMessages.

Parameters

TRequestStatus & aStatus Asynchronous status object (TRequestStatus) that is signalled when the operation completes. aStatus should be checked by the caller to ensure that the operation was successful.
TMsvId aMessageId The entry Id of the email message that the body text is to be retrieved from. The entry must be of type KUidMsvMessageEntry.
TImAttachmentType aAttachmentType The type of attachment to find. Supported attachment types are EAllAttachments, which would get all attachments for the message, EVCards that would get all attachments that are VCards, EVCalendars that would get VCalenders, EICalendar that would get ICalendars, and EVEntries which would get attachments that are either VCards, VCalendars or ICalendars. EEncrypted, ESigned and ESecure are currently not supported.
TImEmailEntryType aEntryType Specifies whether to search just the email message (EThisMessageOnly), or to search within any embedded messages it may contain (EThisMessageAndEmbeddedMessages).

GetAttachmentsListL(TMsvId, TImAttachmentType, TImEmailEntryType)

IMPORT_C void GetAttachmentsListL ( TMsvId aMessageId,
TImAttachmentType aAttachmentType,
TImEmailEntryType aEntryType
)

Parameters

TMsvId aMessageId
TImAttachmentType aAttachmentType
TImEmailEntryType aEntryType

GetBodyTextCharacterSetL()

TBool GetBodyTextCharacterSetL ( ) [private]

GetBodyTextEntryIdL(TRequestStatus &, TMsvId, TImEmailEntryType)

IMPORT_C void GetBodyTextEntryIdL ( TRequestStatus & aStatus,
TMsvId aMessageId,
TImEmailEntryType aEntryType
)

Parameters

TRequestStatus & aStatus
TMsvId aMessageId
TImEmailEntryType aEntryType

GetBodyTextEntryIdL(TMsvId, TImEmailEntryType)

IMPORT_C void GetBodyTextEntryIdL ( TMsvId aMessageId,
TImEmailEntryType aEntryType
)

Parameters

TMsvId aMessageId
TImEmailEntryType aEntryType

GetBodyTextL(TRequestStatus &, TMsvId, TImEmailEntryType, CRichText &, CParaFormatLayer &, CCharFormatLayer &)

IMPORT_C void GetBodyTextL ( TRequestStatus & aStatus,
TMsvId aMessageId,
TImEmailEntryType aEntryType,
CRichText & aRichText,
CParaFormatLayer & aParaLayer,
CCharFormatLayer & aCharLayer
)

Asynchronously retrieves the body text for a specified message. If the email's character set has been overridden by a prior call to SetCharacterSetL() , the body text is decoded with the new character set before it is inserted into the rich text object. A list containing the entry Ids for each body text part within the specified message is created during this call. The list can be retrieved after this call has completed by calling Selection() .

leave
KErrNotFound aMessageId entry could not be located.
panic
imcm 10 aMessageId is not of type KUidMsvMessageEntry.

Parameters

TRequestStatus & aStatus Asynchronous status object (TRequestStatus) that is signalled when the operation completes. aStatus should be checked by the caller to ensure that the operation was successful.
TMsvId aMessageId The entry Id of the email message that the body text is to be retrieved from. The entry must be of type KUidMsvMessageEntry.
TImEmailEntryType aEntryType Specifies whether to search just the email message (EThisMessageOnly), or to search within any embedded messages it may contain (EThisMessageAndEmbeddedMessages).
CRichText & aRichText Upon completion, returns the aRichText object that contains the message body text of all text parts found for the message entry specified by aMessageId. If the body text was not found, then aRichText will be unchanged.
CParaFormatLayer & aParaLayer Paragraph format layer for the rich text object specified by aRichText.
CCharFormatLayer & aCharLayer Character format layer for the rich text object specified by aRichText.

GetBodyTextL(TMsvId, TImEmailEntryType, CRichText &, CParaFormatLayer &, CCharFormatLayer &)

IMPORT_C void GetBodyTextL ( TMsvId aMessageId,
TImEmailEntryType aEntryType,
CRichText & aRichText,
CParaFormatLayer & aParaLayer,
CCharFormatLayer & aCharLayer
)

Parameters

TMsvId aMessageId
TImEmailEntryType aEntryType
CRichText & aRichText
CParaFormatLayer & aParaLayer
CCharFormatLayer & aCharLayer

GetMessageDigestEntriesL(TRequestStatus &, TMsvId)

IMPORT_C void GetMessageDigestEntriesL ( TRequestStatus & aStatus,
TMsvId aMessageId
)

Parameters

TRequestStatus & aStatus
TMsvId aMessageId

GetOverrideCharacterSetL()

TUint GetOverrideCharacterSetL ( ) [private]

Returns the character set id of the email message entry if it exists. This method assumes that the context is set to the top level message entry.

GetTextForRelatedFolderL()

void GetTextForRelatedFolderL ( ) [private]

GetUniversalResourceIdentifierFileHandle(TMsvId &, RFile &)

IMPORT_C TInt GetUniversalResourceIdentifierFileHandle ( TMsvId & aLinkedEntryId,
RFile & aFile
) const [virtual]

Gets the results from FindUniversalResourceIdentifierFileHandleL() or FindFirstHTMLPageFileHandleL() method calls when they have completed.

Used when retrieving specific parts of an MHTML message, such as inline images that are referenced as MHTML anchors within the HTML part of a message. Refer to RFC 2557 - "MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)" for information about MHTML email messages.

Pre-condition
FindUniversalResourceIdentifierFileHandleL() or FindFirstHTMLPageFileHandleL() must have been called prior and completed successfully.

Parameters

TMsvId & aLinkedEntryId Returns the message Id of the message entry that contains the resolved body part, providing one is found. Note that you should keep a record of the returned message Id as it is required for resolving any URI's that may be found in the resolved body part.
RFile & aFile Returns the file handle of the file containing the HTML,image, or other such content stored in the message store if the URI has been resolved. If not then this argument is not valid. Ownership is transferred. The caller must close the file handle.

GetUniversalResourceIdentifierL(TMsvId &, TBool &)

IMPORT_C HBufC * GetUniversalResourceIdentifierL ( TMsvId & aLinkedEntryId,
TBool & aFileFound
) const [virtual]

Gets the results from FindUniversalResourceIdentifierL() or FindFirstHTMLPageL() method calls when they have completed.

Used when retrieving specific parts of an MHTML message, such as inline images that are referenced as MHTML anchors within the HTML part of a message. Refer to RFC 2557 - "MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)" for information about MHTML email messages.

Pre-condition
FindUniversalResourceIdentifierL() or FindFirstHTMLPageL() must have been called prior and completed successfully.

Parameters

TMsvId & aLinkedEntryId Returns the message Id of the message entry that contains the resolved body part, providing one is found. Note that you should keep a record of the returned message Id as it is required for resolving any URI's that may be found in the resolved body part.
TBool & aFileFound Returns ETrue if the URI has been resolved and the message entry containing the MHTML part has been located. Returns EFalse otherwise.

HandleDifferentFolderTypesL()

TBool HandleDifferentFolderTypesL ( ) [private]

MessageDigestEntry()

TBool MessageDigestEntry ( ) [private]

NewL(CMsvEntry &)

IMPORT_C CImEmailMessage * NewL ( CMsvEntry & aEntry ) [static]

Allocates and creates a new CImEmailMessage object.

CMsvEntry

Parameters

CMsvEntry & aEntry A CMsvEntry object that relates to a message server entry. This object is used by CImEmailMessage to perform operations on particular message server entries. It does not matter what context aEntry happens to be focused on.

NewLC(CMsvEntry &)

IMPORT_C CImEmailMessage * NewLC ( CMsvEntry & aEntry ) [static]

Allocates and creates a new CImEmailMessage object, leaving the object on the cleanup stack.

CMsvEntry

Parameters

CMsvEntry & aEntry A CMsvEntry object that relates to a message server entry. This object is used by CImEmailMessage to perform operations on particular message server entries. It does not matter what context aEntry happens to be focused on.

OpenPlainBodyTextForReadL(TImEmailEntryType, TInt)

IMPORT_C CImPlainBodyText * OpenPlainBodyTextForReadL ( TImEmailEntryType aEntryType,
TInt aChunkLength
)

This returns a object of CImPlainBodyText.This needs to be called when bodytext needs to be restored in chunks for Read operation.

Parameters

TImEmailEntryType aEntryType The TImEmailEntryType for this message.
TInt aChunkLength

OpenPlainBodyTextForWriteL()

IMPORT_C CImPlainBodyText * OpenPlainBodyTextForWriteL ( )

This returns a object of CImPlainBodyText.This needs to be called when bodytext needs to be created in chunks.

ProgressL()

IMPORT_C const TDesC8 & ProgressL ( ) const

RemoveAttachedMessageL(TMsvAttachmentId, TRequestStatus &)

void RemoveAttachedMessageL ( TMsvAttachmentId aAttachmentId,
TRequestStatus & aStatus
)

Parameters

TMsvAttachmentId aAttachmentId
TRequestStatus & aStatus

RemoveAttachmentL(TMsvAttachmentId, TRequestStatus &)

void RemoveAttachmentL ( TMsvAttachmentId aAttachmentId,
TRequestStatus & aStatus
)

Parameters

TMsvAttachmentId aAttachmentId
TRequestStatus & aStatus

Reset()

void Reset ( ) [private]

Selection()

IMPORT_C const CMsvEntrySelection & Selection ( ) const

Returns a selection of entries. The entries are either the results of GetMessageDigestEntriesL() , or of GetBodyTextL() .

Pre-condition
GetMessageDigestEntriesL() or GetBodyTextL() must be called prior and successfully completed.

SetBodyTextCharacterSetL(TMsvId, TUint8)

void SetBodyTextCharacterSetL ( TMsvId aEntryId,
TUint8 aNewCharacterSetId
) [private]

Parameters

TMsvId aEntryId
TUint8 aNewCharacterSetId

SetCharacterSetL(TMsvId, TUint)

IMPORT_C void SetCharacterSetL ( TMsvId aMessageId,
TUint aCharacterSetId
)

Stores the new character set that the message will be displayed as next time it is viewed.

Pre-condition
The store_8bit_body_text flag in imcm.rss should be enabled. This is done at build time by the manufacturer.
leave
KErrNotFound aMessageId entry can not be located in the message store, or the character set information can not be located. If the character set information cannot be located, it could be because it was not stored when downloaded. To enable this functionality set the store_8bit_body_text flag in imcm.rss. It is also possible that a call to StoreBodyTextL() has overwritten the original character set stored when the message was downloaded.
panic
imcm 10 aMessageId is not of type KUidMsvMessageEntry.

Parameters

TMsvId aMessageId The entry Id of the email message that the character set will be returned from. The entry must be of type KUidMsvMessageEntry.
TUint aCharacterSetId The character set Id to be stored in the message store. Setting this value to zero will cause the message to be displayed in its original character set when it was viewed for the first time after it was downloaded.

Start(TRequestStatus &)

void Start ( TRequestStatus & aStatus ) [private]

Parameters

TRequestStatus & aStatus

StartL()

void StartL ( ) [private]

StoreBodyTextL(TMsvId, CRichText &, TRequestStatus &)

IMPORT_C void StoreBodyTextL ( TMsvId aMessageId,
CRichText & aRichText,
TRequestStatus & aStatus
)

Asynchronously stores a body text part for the specified message. After the call has completed, calling ProgressL() will return the Id of the message entry for which the body text was stored.

Pre-condition
This function should only be used on messages created using CImEmailOperation .
leave
KErrNotFound aMessageId entry could not be located.
panic
imcm 10 aMessageId is not of type KUidMsvMessageEntry.

Parameters

TMsvId aMessageId The entry Id of the email message that the body text will be stored in. The entry must be of type KUidMsvMessageEntry.
CRichText & aRichText A rich text object (CRichText) that contains the message body text.
TRequestStatus & aStatus Asynchronous status object (TRequestStatus) that is signalled when the operation completes. aStatus should be checked by the caller to ensure that the operation was successful.

StoreBodyTextL(TMsvId, CRichText &, TRequestStatus &, TBool)

IMPORT_C void StoreBodyTextL ( TMsvId aMessageId,
CRichText & aRichText,
TRequestStatus & aStatus,
TBool aUsePlainTextStorage
)

Parameters

TMsvId aMessageId
CRichText & aRichText
TRequestStatus & aStatus
TBool aUsePlainTextStorage

StoreBodyTextWithMimeHeaderL(TMsvId, CRichText &, const CImMimeHeader &, TRequestStatus &)

IMPORT_C void StoreBodyTextWithMimeHeaderL ( TMsvId aMessageId,
CRichText & aRichText,
const CImMimeHeader & aMimeHeader,
TRequestStatus & aStatus
)

Asynchronously stores a body text part for the specified message. A Mime header is created with the passed in the CImMimeHeader object passed. After the call has completed, calling ProgressL() will return the Id of the message entry for which the body text was stored.

Pre-condition
This function should only be used on messages created using CImEmailOperation .
leave
KErrNotFound aMessageId entry could not be located.
panic
imcm 10 aMessageId is not of type KUidMsvMessageEntry.

Parameters

TMsvId aMessageId The entry Id of the email message that the body text will be stored in. The entry must be of type KUidMsvMessageEntry.
CRichText & aRichText A rich text object (CRichText) that contains the message body text.
const CImMimeHeader & aMimeHeader A MIME header object (CImMimeHeader) that contains the content-type etc.
TRequestStatus & aStatus Asynchronous status object (TRequestStatus) that is signalled when the operation completes. aStatus should be checked by the caller to ensure that the operation was successful.

Member Enumerations Documentation

Enum TImAttachmentStates

Enumerators

ENoAttachment = 0
EAddAttachment
EDeleteAttachment
ECreateAttachment

Enum TImAttachmentType

Flags to specify types of attachment.

Enumerators

EAllAttachments = 0

All attachments.

EVCards

VCards.

EVCalendars

VCalendars.

EVEntries

VCards, VCalendars and ICalendars.

EEncrypted

Encrypted.

ESigned

Signed.

ESecure

Secure.

EICalendars

ICalendars.

Enum TImEmailEntryType

Flags that specify to process on any messages embedded in this message.

Enumerators

EThisMessageOnly

Do not process embedded messages.

EThisMessageAndEmbeddedMessages

Process embedded messages.

Enum TImEmailMessageStates

Enumerators

EIdle = 0
ETextForThisMsg
ETextForMsgDigest
ETextEntryIdForThisMsg
ETextEntryIdMsgDigest
ETextForThisMsgGetCharacterSet
EAttachmentsForThisMsg
EAttachmentsForMsgDigest
EMsgDigestEntries
EResolveURI
EStoreMessagePart
ERemoveMessagePart
EFinished

Member Data Documentation

CImAttachmentManager * iAttachmentManager

CImAttachmentManager * iAttachmentManager [private]

CDesCArray * iAttachmentNameList

CDesCArray * iAttachmentNameList [private]

TInt iAttachmentState

TInt iAttachmentState [private]

TImAttachmentType iAttachmentType

TImAttachmentType iAttachmentType [private]

CCharFormatLayer * iCharLayer

CCharFormatLayer * iCharLayer [private]

TUint iCharacterSetId

TUint iCharacterSetId [private]

CMsvEntry & iClientEntry

CMsvEntry & iClientEntry [private]

CMsvEntrySelection * iCompleteSel

CMsvEntrySelection * iCompleteSel [private]

TMsvId iEmailEntryId

TMsvId iEmailEntryId [private]

TMsvEmailEntry iEntry

TMsvEmailEntry iEntry [private]

TImEmailEntryType iEntryType

TImEmailEntryType iEntryType [private]

RFs iFs

RFs iFs [private]

TBool iIsAMHTMLmessage

TBool iIsAMHTMLmessage [private]

CParaFormatLayer * iParaLayer

CParaFormatLayer * iParaLayer [private]

TMsvId iParentMsgId

TMsvId iParentMsgId [private]

TPckgBuf< TMsvId > iProgress

TPckgBuf < TMsvId > iProgress [private]

CImRemoveMessagePart * iRemoveMessagePart

CImRemoveMessagePart * iRemoveMessagePart [private]

CMsvEntrySelection * iResultSel

CMsvEntrySelection * iResultSel [private]

CRichText * iRichText

CRichText * iRichText [private]

TImEmailMessageStates iState

TImEmailMessageStates iState [private]

CMsvStore * iStore

CMsvStore * iStore [private]

CImStoreMessagePart * iStoreMessagePart

CImStoreMessagePart * iStoreMessagePart [private]

TBool iUriFileFound

TBool iUriFileFound [private]

CImMhtmlUriResolver * iUriResolver

CImMhtmlUriResolver * iUriResolver [private]