#include <MIUTMSG.H>
Link against:
imcm.lib
class CImEmailMessage : public CMsgActive, public MImURITranslator;
Description
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.
Derivation
MImURITranslator
- Translates a URI in an MHTML message into a message body part file name.
CMsgActive
- No description.
CImEmailMessage
- This class can be used to manipulate new emails that have been created using CIm...
Members
Defined in CImEmailMessage
:
AddRelatedPartL(TMsvId,const TDesC &,TRequestStatus &,TMsvId,const TDesC8 &)
Adds a file to a specified message as a MIME multipart/related part. After the c...
AttachmentManager()const
DoCancel()
Implements cancellation of an outstanding request.
DoComplete(TInt &)
DoRunL()
EAllAttachments
All attachments.
EEncrypted
Encrypted.
EICalendars
ICalendars.
ESecure
Secure.
ESigned
Signed.
EThisMessageAndEmbeddedMessages
Process embedded messages.
EThisMessageOnly
Do not process embedded messages.
EVCalendars
VCalendars.
EVCards
VCards.
EVEntries
VCards, VCalendars and ICalendars.
FindFirstHTMLPageFileHandleL(TMsvId,TRequestStatus &)
Asynchronously searches for the starting MHTML part embedded in a multipart/rela...
FindFirstHTMLPageL(TMsvId,TRequestStatus &)
Asynchronously searches for the starting MHTML part embedded in a multipart/rela...
FindUniversalResourceIdentifierFileHandleL(TMsvId,const TDesC &,const TDesC &,TRequestStatus &)
Asynchronously searches a message entry for an MHTML URI, and resolves it to the...
FindUniversalResourceIdentifierL(TMsvId,const TDesC &,const TDesC &,TRequestStatus &)
Asynchronously searches a message entry for an MHTML URI, and resolves it to the...
GetAttachmentsListL(TMsvId,TImAttachmentType,TImEmailEntryType)
Populates a list containing all the attachment entry Ids found that are of a spe...
GetAttachmentsListL(TRequestStatus &,TMsvId,TImAttachmentType,TImEmailEntryType)
Asynchronously populates a list containing all the attachment entry Ids found th...
GetBodyTextEntryIdL(TMsvId,TImEmailEntryType)
GetBodyTextEntryIdL(TRequestStatus &,TMsvId,TImEmailEntryType)
GetBodyTextL(TMsvId,TImEmailEntryType,CRichText &,CParaFormatLayer &,CCharFormatLayer &)
Retrieves the body text for a specified message. If the email's character set ha...
GetBodyTextL(TRequestStatus &,TMsvId,TImEmailEntryType,CRichText &,CParaFormatLayer &,CCharFormatLayer &)
Asynchronously retrieves the body text for a specified message. If the email's c...
GetCharacterSetL(TMsvId,TUint &,TBool &)
Returns the character set Id that the body text will be decoded in when it is re...
GetMessageDigestEntriesL(TRequestStatus &,TMsvId)
Asynchronously populates a list of embedded message entries contained within the...
GetUniversalResourceIdentifierFileHandle(TMsvId &,RFile &)const
Gets the results from CImEmailMessage::FindUniversalResourceIdentifierFileHandle...
GetUniversalResourceIdentifierL(TMsvId &,TBool &)const
Gets the results from CImEmailMessage::FindUniversalResourceIdentifierL(TMsvId,c...
NewL(CMsvEntry &)
Allocates and creates a new CImEmailMessage object.
NewLC(CMsvEntry &)
Allocates and creates a new CImEmailMessage object, leaving the object on the cl...
OpenPlainBodyTextForReadL(TImEmailEntryType,TInt)
This returns a object of CImPlainBodyText.This needs to be called when bodytext ...
OpenPlainBodyTextForWriteL()
This returns a object of CImPlainBodyText.This needs to be called when bodytext ...
ProgressL()const
Returns a message entry Id as a type-safe package buffer (TPckg<TMsvId>). ...
Selection()const
Returns a selection of entries. The entries are either the results of CImEmailMe...
SetCharacterSetL(TMsvId,TUint)
Stores the new character set that the message will be displayed as next time it ...
StoreBodyTextL(TMsvId,CRichText &,TRequestStatus &)
Asynchronously stores a body text part for the specified message. After the call...
StoreBodyTextL(TMsvId,CRichText &,TRequestStatus &,TBool)
Asynchronously stores a body text part for the specified message. After the call...
StoreBodyTextWithMimeHeaderL(TMsvId,CRichText &,const CImMimeHeader &,TRequestStatus &)
Asynchronously stores a body text part for the specified message. A Mime header ...
TImAttachmentType
Flags to specify types of attachment.
TImEmailEntryType
Flags that specify to process on any messages embedded in this message.
~CImEmailMessage()
Destructor.
See also:
CImEmailOperation
Provides simple email messages creation functions, including creation of new mes...
Construction and destruction
IMPORT_C static CImEmailMessage* NewL(CMsvEntry &aEntry);
Description
Allocates and creates a new CImEmailMessage object.
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.
|
|
Return value
See also:
CMsvEntry
Accesses and acts upon a particular Message Server entry. The current entry that...
IMPORT_C static CImEmailMessage* NewLC(CMsvEntry &aEntry);
Description
Allocates and creates a new CImEmailMessage object, leaving the object on the cleanup stack.
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.
|
|
Return value
See also:
CMsvEntry
Accesses and acts upon a particular Message Server entry. The current entry that...
IMPORT_C ~CImEmailMessage();
Description
Destructor.
GetAttachmentsListL(TRequestStatus &,TMsvId,TImAttachmentType,TImEmailEntryType)
IMPORT_C void GetAttachmentsListL(TRequestStatus &aStatus, TMsvId aMessageId, TImAttachmentType aAttachmentType, TImEmailEntryType
aEntryType);
Description
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 CImEmailMessage::SetCharacterSetL(TMsvId,TUint)
, the attachment names are decoded with the new character set.
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.
|
CImEmailMessage::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.
|
CImEmailMessage::TImEmailEntryType aEntryType |
Specifies whether to search just the email message (EThisMessageOnly), or to search within any embedded messages it may contain
(EThisMessageAndEmbeddedMessages).
|
|
Leave codes
KErrNotFound |
aMessageId entry could not be located.
|
KErrNotSupported |
aEntryType is not EThisMessageOnly or EThisMessageAndEmbeddedMessages.
|
|
Panic codes
imcm |
10 aMessageId is not of type KUidMsvMessageEntry.
|
|
GetAttachmentsListL(TMsvId,TImAttachmentType,TImEmailEntryType)
IMPORT_C void GetAttachmentsListL(TMsvId aMessageId, TImAttachmentType aAttachmentType, TImEmailEntryType aEntryType);
Description
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 CImEmailMessage::SetCharacterSetL(TMsvId,TUint)
, the attachment names are decoded with the new character set.
Parameters
TMsvId aMessageId |
The entry Id of the email message that the attachment list is to be populated. The entry must be of type KUidMsvMessageEntry.
|
CImEmailMessage::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.
|
CImEmailMessage::TImEmailEntryType aEntryType |
Specifies whether to search just the email message (EThisMessageOnly), or to search within any embedded messages it may contain
(EThisMessageAndEmbeddedMessages).
|
|
Leave codes
KErrNotFound |
aMessageId entry could not be located.
|
KErrNotSupported |
aEntryType is not EThisMessageOnly or EThisMessageAndEmbeddedMessages.
|
|
Panic codes
imcm |
10 aMessageId is not of type KUidMsvMessageEntry.
|
|
FindFirstHTMLPageL(TMsvId,TRequestStatus &)
IMPORT_C void FindFirstHTMLPageL(TMsvId aMessageId, TRequestStatus &aStatus);
Description
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 CImEmailMessage::GetUniversalResourceIdentifierL(TMsvId &,TBool &)const
after this methods has completed.
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.
|
|
Leave codes
KErrNotFound |
aMessageId entry could not be located.
|
|
Panic codes
imcm |
10 aMessageId is not of type KUidMsvMessageEntry.
|
|
IMPORT_C const CMsvEntrySelection& Selection() const;
Pre-Condition
CImEmailMessage::GetMessageDigestEntriesL(TRequestStatus &,TMsvId)
or CImEmailMessage::GetBodyTextL(TRequestStatus &,TMsvId,TImEmailEntryType,CRichText &,CParaFormatLayer &,CCharFormatLayer &)
must be called prior and successfully completed.
Description
Returns a selection of entries. The entries are either the results of CImEmailMessage::GetMessageDigestEntriesL(TRequestStatus &,TMsvId)
, or of CImEmailMessage::GetBodyTextL(TRequestStatus &,TMsvId,TImEmailEntryType,CRichText &,CParaFormatLayer &,CCharFormatLayer &)
.
Return value
IMPORT_C const TDesC8& ProgressL() const;
Pre-Condition
Call this method after the following asynchronous calls have completed to check progress. CImEmailMessage::AddAttachmentL(const TDesC &,CMsvAttachment *,TRequestStatus &)
AddMessageAsAttachmentL() CImEmailMessage::AddRelatedPartL(TMsvId,const TDesC &,TRequestStatus &,TMsvId,const TDesC8 &)
DeleteAttachmentL() DeleteAttachedMessageL() CImEmailMessage::StoreBodyTextL(TMsvId,CRichText &,TRequestStatus &)
Description
Returns a message entry Id as a type-safe package buffer (TPckg<TMsvId>). The meaning of the Id depends on the request as
follows:
CImEmailMessage::AddAttachmentL(const TDesC &,CMsvAttachment *,TRequestStatus &)
, AddMessageAsAttachmentL(), and CImEmailMessage::AddRelatedPartL(TMsvId,const TDesC &,TRequestStatus &,TMsvId,const TDesC8 &)
: While the attachment, message, or related part is being added, a null Id (KMsvNullIndexEntryId); Once the attachment, message,
or related part has been added, the entry Id of the newly created attachment, message, or related part.
DeleteAttachmentL() and DeleteAttachedMessageL(): While the attachment or attached message is being removed, a null Id (KMsvNullIndexEntryId);
Once the attachment or attached message has been removed, the Id of the message from which the attachment or attached message
was removed.
CImEmailMessage::StoreBodyTextL(TMsvId,CRichText &,TRequestStatus &)
: While the body text is being stored, a null Id (KMsvNullIndexEntryId); Once the text has been stored, the Id of the message
for which the body text was stored.
// Example code demonstrating how to retrieve the progress.
// Create and initialise a temporary TPckg object that can hold a message Id.
TMsvId msgId;
TPckg<TMsvId> param(msgId);
// Copy the message Id returned from the ProgressL() call into the
// temporary TPckg object.
param.Copy(emailMsg->ProgressL()); // where emailMsg is of type CImEmailMessage.
// Check the value of the returned message Id in the TPckg object.
if (msgId != KMsvNullIndexEntryId)
{
// More code...
}
Return value
const TDesC8 & |
The entry Id as a type-safe packaged buffer (TPckg<TMsvId>).
|
|
GetBodyTextL(TRequestStatus &,TMsvId,TImEmailEntryType,CRichText &,CParaFormatLayer &,CCharFormatLayer &)
IMPORT_C void GetBodyTextL(TRequestStatus &aStatus, TMsvId aMessageId, TImEmailEntryType aEntryType, CRichText &aRichText,
CParaFormatLayer &aParaLayer, CCharFormatLayer &aCharLayer);
Description
Asynchronously retrieves the body text for a specified message. If the email's character set has been overridden by a prior
call to CImEmailMessage::SetCharacterSetL(TMsvId,TUint)
, 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 CImEmailMessage::Selection()const
.
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.
|
CImEmailMessage::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.
|
|
Leave codes
KErrNotFound |
aMessageId entry could not be located.
|
|
Panic codes
imcm |
10 aMessageId is not of type KUidMsvMessageEntry.
|
|
GetBodyTextL(TMsvId,TImEmailEntryType,CRichText &,CParaFormatLayer &,CCharFormatLayer &)
IMPORT_C void GetBodyTextL(TMsvId aMessageId, TImEmailEntryType aEntryType, CRichText &aRichText, CParaFormatLayer &aParaLayer,
CCharFormatLayer &aCharLayer);
Description
Retrieves the body text for a specified message. If the email's character set has been overridden by a prior call to CImEmailMessage::SetCharacterSetL(TMsvId,TUint)
, 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 by calling
CImEmailMessage::Selection()const
.
Parameters
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.
|
CImEmailMessage::TImEmailEntryType aEntryType |
Specifies whether to search just the email message (EThisMessageOnly), or to search within any embedded messages it may contain
(EThisMessageAndEmbeddedMessages).
|
CRichText &aRichText |
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.
|
|
Leave codes
KErrNotFound |
aMessageId entry could not be located.
|
|
Panic codes
imcm |
10 aMessageId is not of type KUidMsvMessageEntry.
|
|
GetBodyTextEntryIdL(TRequestStatus &,TMsvId,TImEmailEntryType)
IMPORT_C void GetBodyTextEntryIdL(TRequestStatus &aStatus, TMsvId aMessageId, TImEmailEntryType aEntryType);
Description
Parameters
GetBodyTextEntryIdL(TMsvId,TImEmailEntryType)
IMPORT_C void GetBodyTextEntryIdL(TMsvId aMessageId, TImEmailEntryType aEntryType);
Description
Parameters
OpenPlainBodyTextForWriteL()
IMPORT_C CImPlainBodyText* OpenPlainBodyTextForWriteL();
Description
This returns a object of CImPlainBodyText.This needs to be called when bodytext needs to be created in chunks.
Return value
OpenPlainBodyTextForReadL(TImEmailEntryType,TInt)
IMPORT_C CImPlainBodyText* OpenPlainBodyTextForReadL(TImEmailEntryType aEntryType, TInt aChunkLength);
Description
This returns a object of CImPlainBodyText.This needs to be called when bodytext needs to be restored in chunks for Read operation.
Parameters
Return value
FindUniversalResourceIdentifierL(TMsvId,const TDesC &,const TDesC &,TRequestStatus &)
IMPORT_C virtual void FindUniversalResourceIdentifierL(TMsvId aMessageId, const TDesC &aBase, const TDesC &aURI, TRequestStatus
&aStatus);
Description
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 CImEmailMessage::GetUniversalResourceIdentifierL(TMsvId &,TBool &)const
after this method has completed.
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 CImEmailMessage::FindFirstHTMLPageL(TMsvId,TRequestStatus &) .
|
const TDesC16 &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 TDesC16 &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.
|
|
Leave codes
KErrNotFound |
aMessageId entry could not be located.
|
|
Panic codes
imcm |
10 aMessageId is not of type KUidMsvMessageEntry.
|
|
GetUniversalResourceIdentifierL(TMsvId &,TBool &)const
IMPORT_C virtual HBufC* GetUniversalResourceIdentifierL(TMsvId &aLinkedEntryId, TBool &aFileFound) const;
Pre-Condition
CImEmailMessage::FindUniversalResourceIdentifierL(TMsvId,const TDesC &,const TDesC &,TRequestStatus &)
or CImEmailMessage::FindFirstHTMLPageL(TMsvId,TRequestStatus &)
must have been called prior and completed successfully.
Description
Gets the results from CImEmailMessage::FindUniversalResourceIdentifierL(TMsvId,const TDesC &,const TDesC &,TRequestStatus &)
or CImEmailMessage::FindFirstHTMLPageL(TMsvId,TRequestStatus &)
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.
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.
|
|
Return value
HBufC16 *
|
If the URI is resolved, returns the full path specification and file name of the file containing the HTML, image, or other
such content stored in the message store. If no file can be located, the absolute URI is returned instead.
|
|
FindUniversalResourceIdentifierFileHandleL(TMsvId,const TDesC &,const TDesC &,TRequestStatus &)
IMPORT_C virtual void FindUniversalResourceIdentifierFileHandleL(TMsvId aMessageId, const TDesC &aBase, const TDesC &aURI,
TRequestStatus &aStatus);
Description
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 CImEmailMessage::GetUniversalResourceIdentifierFileHandle(TMsvId &,RFile &)const
after this method has completed.
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 CImEmailMessage::FindFirstHTMLPageFileHandleL(TMsvId,TRequestStatus &) .
|
const TDesC16 &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 TDesC16 &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.
|
|
Leave codes
KErrNotFound |
aMessageId entry could not be located.
|
|
Panic codes
imcm |
10 aMessageId is not of type KUidMsvMessageEntry.
|
|
FindFirstHTMLPageFileHandleL(TMsvId,TRequestStatus &)
IMPORT_C void FindFirstHTMLPageFileHandleL(TMsvId aMessageId, TRequestStatus &aStatus);
Description
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 CImEmailMessage::GetUniversalResourceIdentifierFileHandle(TMsvId &,RFile &)const
after this methods has completed.
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.
|
|
Leave codes
KErrNotFound |
aMessageId entry could not be located.
|
|
Panic codes
imcm |
10 aMessageId is not of type KUidMsvMessageEntry.
|
|
GetUniversalResourceIdentifierFileHandle(TMsvId &,RFile &)const
IMPORT_C virtual TInt GetUniversalResourceIdentifierFileHandle(TMsvId &aLinkedEntryId, RFile &aFile) const;
Pre-Condition
CImEmailMessage::FindUniversalResourceIdentifierFileHandleL(TMsvId,const TDesC &,const TDesC &,TRequestStatus &)
or CImEmailMessage::FindFirstHTMLPageFileHandleL(TMsvId,TRequestStatus &)
must have been called prior and completed successfully.
Description
Gets the results from CImEmailMessage::FindUniversalResourceIdentifierFileHandleL(TMsvId,const TDesC &,const TDesC &,TRequestStatus &)
or CImEmailMessage::FindFirstHTMLPageFileHandleL(TMsvId,TRequestStatus &)
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.
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.
|
|
Return value
TInt
|
If the URI is resolved, returns KErrNone. The output argument aFile is the file handle to the content. If no file is located
the KErrNotFound is returned and aFile is not valid.
|
|
IMPORT_C MMsvAttachmentManager& AttachmentManager() const;
Description
Return value
AddRelatedPartL(TMsvId,const TDesC &,TRequestStatus &,TMsvId,const TDesC8 &)
IMPORT_C void AddRelatedPartL(TMsvId aMessageId, const TDesC &aAttachmentFullName, TRequestStatus &aStatus, TMsvId aRelatedPartId,
const TDesC8 &aContentId);
Pre-Condition
This function should only be used on messages created using CImEmailOperation
.
Description
Adds a file to a specified message as a MIME multipart/related part. After the call has completed, calling CImEmailMessage::ProgressL()const
will return the Id of the newly created related part entry.
Used when adding 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.
Parameters
TMsvId aMessageId |
The entry Id of the email message that the related part will be added to. The entry must be of type KUidMsvMessageEntry.
|
const TDesC16 &aAttachmentFullName |
The full path and file name of the related part file to be copied to the message store. If the file cannot be located, this
call completes with KErrNotFound.
|
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 aRelatedPartId |
The entry Id of the MHTML message part that the file being added is referenced from.
|
const TDesC8 &aContentId |
The Content-Id of the related part.
|
|
Leave codes
KErrNotFound |
aMessageId entry could not be located.
|
|
Panic codes
imcm |
10 aMessageId is not of type KUidMsvMessageEntry.
|
|
StoreBodyTextL(TMsvId,CRichText &,TRequestStatus &)
IMPORT_C void StoreBodyTextL(TMsvId aMessageId, CRichText &aRichText, TRequestStatus &aStatus);
Pre-Condition
This function should only be used on messages created using CImEmailOperation
.
Description
Asynchronously stores a body text part for the specified message. After the call has completed, calling CImEmailMessage::ProgressL()const
will return the Id of the message entry for which the body text was stored.
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.
|
|
Leave codes
KErrNotFound |
aMessageId entry could not be located.
|
|
Panic codes
imcm |
10 aMessageId is not of type KUidMsvMessageEntry.
|
|
StoreBodyTextL(TMsvId,CRichText &,TRequestStatus &,TBool)
IMPORT_C void StoreBodyTextL(TMsvId aMessageId, CRichText &aRichText, TRequestStatus &aStatus, TBool aUsePlainTextStorage);
Pre-Condition
This function should only be used on messages created using CImEmailOperation
.
Description
Asynchronously stores a body text part for the specified message. After the call has completed, calling CImEmailMessage::ProgressL()const
will return the Id of the message entry for which the body text was stored.
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.
|
TBool aUsePlainTextStorage |
if set to ETrue inidcates that the new message entry needs to be created as plain text if set to EFalse indicates that message
will be created as richtext entry.
|
|
Leave codes
KErrNotFound |
aMessageId entry could not be located.
|
|
Panic codes
imcm |
10 aMessageId is not of type KUidMsvMessageEntry.
|
|
GetMessageDigestEntriesL(TRequestStatus &,TMsvId)
IMPORT_C void GetMessageDigestEntriesL(TRequestStatus &aStatus, TMsvId aMessageId);
Description
Asynchronously populates a list of embedded message entries contained within the specified message. Note that any embedded
messages within embedded messages are not included in the list. Call CImEmailMessage::Selection()const
to get the results of the search after it has completed.
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 will be searched for embedded messages. The entry must be of type KUidMsvMessageEntry.
|
|
Leave codes
KErrNotFound |
aMessageId entry could not be located.
|
|
Panic codes
imcm |
10 aMessageId is not of type KUidMsvMessageEntry.
|
|
GetCharacterSetL(TMsvId,TUint &,TBool &)
IMPORT_C void GetCharacterSetL(TMsvId aMessageId, TUint &aCharacterSetId, TBool &aOverride);
Pre-Condition
The store_8bit_body_text flag in imcm.rss should be enabled. This is done at build time by the manufacturer.
Description
Returns the character set Id that the body text will be decoded in when it is returned in the call to CImEmailMessage::GetBodyTextL(TRequestStatus &,TMsvId,TImEmailEntryType,CRichText &,CParaFormatLayer &,CCharFormatLayer &)
. It also indicates whether the original character set has been overridden by calling CImEmailMessage::SetCharacterSetL(TMsvId,TUint)
.
Parameters
TMsvId aMessageId |
The entry Id of the email message that the character set Id is to be retrieved from. The entry must be of type KUidMsvMessageEntry.
|
TUint &aCharacterSetId |
Returns the character set Id that the message will be displayed when it is viewed. If aCharacterSetId is zero and aOverride
is EFalse, the store_8bit_body_text flag in imcm.rss has not been enabled.
|
TBool &aOverride |
Returns ETrue if the message's original character set has been overridden (changed) via the call to CImEmailMessage::SetCharacterSetL(TMsvId,TUint) . If aCharacterSetId is zero and aOverride is EFalse, the store_8bit_body_text flag in imcm.rss has not been enabled.
|
|
Leave codes
KErrNotFound |
aMessageId entry could not be located.
|
|
Panic codes
imcm |
10 aMessageId is not of type KUidMsvMessageEntry.
|
|
SetCharacterSetL(TMsvId,TUint)
IMPORT_C void SetCharacterSetL(TMsvId aMessageId, TUint aCharacterSetId);
Pre-Condition
The store_8bit_body_text flag in imcm.rss should be enabled. This is done at build time by the manufacturer.
Description
Stores the new character set that the message will be displayed as next time it is viewed.
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.
|
|
Leave codes
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 codes
imcm |
10 aMessageId is not of type KUidMsvMessageEntry.
|
|
StoreBodyTextWithMimeHeaderL(TMsvId,CRichText &,const CImMimeHeader &,TRequestStatus &)
IMPORT_C void StoreBodyTextWithMimeHeaderL(TMsvId aMessageId, CRichText &aRichText, const CImMimeHeader &aMimeHeader, TRequestStatus
&aStatus);
Pre-Condition
This function should only be used on messages created using CImEmailOperation
.
Description
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 CImEmailMessage::ProgressL()const
will return the Id of the message entry for which the body text was stored.
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.
|
|
Leave codes
KErrNotFound |
aMessageId entry could not be located.
|
|
Panic codes
imcm |
10 aMessageId is not of type KUidMsvMessageEntry.
|
|
private: virtual void DoRunL();
Description
private: virtual void DoCancel();
Description
Implements cancellation of an outstanding request.
This function is called as part of the active object's CActive::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.
CImEmailMessage::DoCancel()
must not wait for event completion; this is handled by CActive::Cancel()
.
See also:
private: virtual void DoComplete(TInt &);
Description
Parameters
TImEmailEntryType
Description
Flags that specify to process on any messages embedded in this message.
TImAttachmentType
Description
Flags to specify types of attachment.