CFSMailMessagePart Class Reference

class CFSMailMessagePart : public CFSMailMessageBase

email parts handling class

FSFWCommonLib
Since
S60 v3.1

Inherits from

Public Member Functions
~CFSMailMessagePart()
IMPORT_C CFSMailMessagePart *AddNewAttachmentL(const TDesC &, const TFSMailMsgId, const TDesC &)
IMPORT_C voidAppendAttachmentsL(RPointerArray< CFSMailMessagePart > &)
IMPORT_C TDesC &AttachmentNameL()
IMPORT_C CFSMailMessagePart *ChildPartL(const TFSMailMsgId)
IMPORT_C voidChildPartsL(RPointerArray< CFSMailMessagePart > &)
IMPORT_C const TDesC &ContentDescription()
IMPORT_C const TDesC &ContentDisposition()
IMPORT_C CDesCArray &ContentDispositionParameters()
IMPORT_C const TDesC &ContentID()
IMPORT_C TUintContentSize()
IMPORT_C TBoolContentTypeMatches(const TDesC &)
IMPORT_C CDesCArray &ContentTypeParameters()
IMPORT_C voidCopyContentFileL(const TDesC &)
IMPORT_C CFSMailMessagePart *CopyMessageAsChildPartL(TFSMailMsgId, CFSMailMessage *)
IMPORT_C TFSPartFetchStateFetchLoadState()
IMPORT_C TIntFetchMessagePartL(const TFSMailMsgId, MFSMailRequestObserver &, const TUint)
IMPORT_C TIntFetchMessagesPartsL(const RArray< TFSMailMsgId > &, MFSMailRequestObserver &, const TUint)
IMPORT_C TUintFetchedContentSize()
IMPORT_C CFSMailMessagePart *FindBodyPartL(const TDesC &)
IMPORT_C const TDesC &GetContentClass()
IMPORT_C RFileGetContentFileL()
IMPORT_C voidGetContentToBufferL(TDes16 &, TUint)
IMPORT_C const TDesC &GetContentType()
IMPORT_C MMRInfoObject &GetMRInfo()
IMPORT_C TFSMailMsgIdGetPartId()
IMPORT_C TBoolIsMRInfoSet()
IMPORT_C TBoolIsMessageL()
IMPORT_C CFSMailMessagePart *NewChildPartL(const TFSMailMsgId, const TDesC &)
IMPORT_C CFSMailMessagePart *NewL(TFSMailMsgId, TFSMailMsgId)
IMPORT_C CFSMailMessagePart *NewLC(TFSMailMsgId, TFSMailMsgId)
IMPORT_C TUintReadOnlyPartSize()
IMPORT_C voidRemoveChildPartL(TFSMailMsgId)
IMPORT_C voidRemoveContentL()
IMPORT_C voidRemoveDownLoadedAttachmentsL()
IMPORT_C voidSaveL()
IMPORT_C voidSetAttachmentNameL(const TDesC &)
IMPORT_C voidSetContent(TDes16 &)
IMPORT_C voidSetContentClass(const TDesC &)
IMPORT_C voidSetContentDescription(const TDesC &)
IMPORT_C voidSetContentDisposition(const TDesC &)
IMPORT_C voidSetContentFromFileL(const TDesC &)
IMPORT_C voidSetContentIDL(const TDesC &)
IMPORT_C voidSetContentSize(const TUint)
IMPORT_C voidSetContentType(const TDesC &)
IMPORT_C voidSetFetchedContentSize(TUint)
IMPORT_C voidSetMRInfo(MMRInfoObject *)
IMPORT_C voidSetMessagePartsStatus(TFSPartFetchState)
IMPORT_C voidSetReadOnlyPartSize(const TUint)
Protected Member Functions
CFSMailMessagePart()
voidClearPartsArray(TBool)
voidDoAttachmentListL(RPointerArray< CFSMailMessagePart > &)
TFSMailMsgId FindBodyPartIdL(const TDesC &)
voidListMessagePartsL(RPointerArray< CFSMailMessagePart > &)
Private Member Functions
voidConstructL(TFSMailMsgId, TFSMailMsgId)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
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()
CFSMailMessageBase::AppendBCCRecipient(CFSMailAddress *)
CFSMailMessageBase::AppendCCRecipient(CFSMailAddress *)
CFSMailMessageBase::AppendToRecipient(CFSMailAddress *)
CFSMailMessageBase::CFSMailMessageBase()
CFSMailMessageBase::ClearBccRecipients()
CFSMailMessageBase::ClearCcRecipients()
CFSMailMessageBase::ClearToRecipients()
CFSMailMessageBase::ExtensionL(const TUid &)
CFSMailMessageBase::GetBCCRecipients()
CFSMailMessageBase::GetCCRecipients()
CFSMailMessageBase::GetDate()const
CFSMailMessageBase::GetFlags()const
CFSMailMessageBase::GetFolderId()const
CFSMailMessageBase::GetMailBoxId()const
CFSMailMessageBase::GetMessageId()const
CFSMailMessageBase::GetReplyToAddress()
CFSMailMessageBase::GetSender()const
CFSMailMessageBase::GetSubject()const
CFSMailMessageBase::GetToRecipients()
CFSMailMessageBase::IsFlagSet(const TInt)const
CFSMailMessageBase::IsRelatedTo()const
CFSMailMessageBase::NewL(const TFSMailMsgId)
CFSMailMessageBase::NewLC(const TFSMailMsgId)
CFSMailMessageBase::ReleaseExtension(CEmailExtension *)
CFSMailMessageBase::RequestHandler()
CFSMailMessageBase::ResetFlag(const TInt)
CFSMailMessageBase::SetDate(const TTime)
CFSMailMessageBase::SetFlag(const TInt)
CFSMailMessageBase::SetFolderId(const TFSMailMsgId)
CFSMailMessageBase::SetMailBoxId(const TFSMailMsgId)
CFSMailMessageBase::SetRelatedTo(const TFSMailMsgId)
CFSMailMessageBase::SetReplyToAddress(CFSMailAddress *)
CFSMailMessageBase::SetSender(CFSMailAddress *)
CFSMailMessageBase::SetSubject(const TDesC &)
CFSMailMessageBase::~CFSMailMessageBase()
Protected Attributes
HBufC *iContentType
RPointerArray< CFSMailMessagePart >iMessageParts
TFSPartFetchState iMessagePartsStatus
TBool iReadMessageParts
Private Attributes
HBufC *iAttachmentName
HBufC *iContentClass
HBufC *iContentDescription
HBufC *iContentDisposition
CDesCArray *iContentDispositionParams
HBufC *iContentID
TUint iContentSize
CDesCArray *iContentTypeParams
TInt iFetchedContentSize
RFile iFile
TBool iIsFetched
MMRInfoObject *iMeetingRequest
TFSMailMsgId iMessagePartId
TUint iReadOnlyPartSize
Inherited Attributes
CExtendableEmail::iExtensions
CFSMailMessageBase::iMessageId
CFSMailMessageBase::iRequestHandler

Constructor & Destructor Documentation

CFSMailMessagePart()

CFSMailMessagePart()[protected]

constructor

~CFSMailMessagePart()

IMPORT_C~CFSMailMessagePart()[virtual]

destructor

Member Functions Documentation

AddNewAttachmentL(const TDesC &, const TFSMailMsgId, const TDesC &)

IMPORT_C CFSMailMessagePart *AddNewAttachmentL(const TDesC &aFilePath,
const TFSMailMsgIdaInsertBefore,
const TDesC &aContentType
)

Adds new attachment to this email (part).

Parameters

const TDesC & aFilePathfull path of new attachment.
const TFSMailMsgId aInsertBeforedefines position of new attachment, if NullId then new attachment is created as last part.
const TDesC & aContentTypeattachment content type

AppendAttachmentsL(RPointerArray< CFSMailMessagePart > &)

IMPORT_C voidAppendAttachmentsL(RPointerArray< CFSMailMessagePart > &aParts)

creates a list containing all email / email part subparts

Parameters

RPointerArray< CFSMailMessagePart > & aPartsemail part list given/owned by user

AttachmentNameL()

IMPORT_C TDesC &AttachmentNameL()

returns email part attachment name

ChildPartL(const TFSMailMsgId)

IMPORT_C CFSMailMessagePart *ChildPartL(const TFSMailMsgIdaPartId)

Returns child part of this part identified by part id.

Parameters

const TFSMailMsgId aPartIddefines parent part id

ChildPartsL(RPointerArray< CFSMailMessagePart > &)

IMPORT_C voidChildPartsL(RPointerArray< CFSMailMessagePart > &aParts)

lists all direct child parts of this email part

Parameters

RPointerArray< CFSMailMessagePart > & aPartstable containing list of child parts owned by user

ClearPartsArray(TBool)

voidClearPartsArray(TBoolaClearAll)[protected]

clears internal part array

Parameters

TBool aClearAll

ConstructL(TFSMailMsgId, TFSMailMsgId)

voidConstructL(TFSMailMsgIdaMessageId,
TFSMailMsgIdaMessagePartId
)[private]

Two-phased constructor

Parameters

TFSMailMsgId aMessageId
TFSMailMsgId aMessagePartId

ContentDescription()

IMPORT_C const TDesC &ContentDescription()

Returns email Content-Description value, includes also parameters, if any.

ContentDisposition()

IMPORT_C const TDesC &ContentDisposition()

Returns email Content-Disposition value, includes also parameters, if any.

ContentDispositionParameters()

IMPORT_C CDesCArray &ContentDispositionParameters()

Returns email Content-Disposition Parameters and their associated values. Updating/setting values should be done by first getting the array and then modifying it's contents.

ContentID()

IMPORT_C const TDesC &ContentID()

email Content-Id accessor.

ContentSize()

IMPORT_C TUintContentSize()const

returns email part full content size (in bytes)

ContentTypeMatches(const TDesC &)

IMPORT_C TBoolContentTypeMatches(const TDesC &aContentType)

Checks that content type matches given.

Parameters

const TDesC & aContentTypebody part content type to be checked

ContentTypeParameters()

IMPORT_C CDesCArray &ContentTypeParameters()

Returns content-type parameters and their associated values. Updating/setting values should be done by first getting the array and then modifying it's contents.

CopyContentFileL(const TDesC &)

IMPORT_C voidCopyContentFileL(const TDesC &aContentLocation)

copies contents of this message part to given file

Parameters

const TDesC & aContentLocationdefines file location as a) directory, when plugin finds out corresponding file name related to this part id, in this case last character should be '/' b) directory & filename, when both directory and file name are given by user

CopyMessageAsChildPartL(TFSMailMsgId, CFSMailMessage *)

IMPORT_C CFSMailMessagePart *CopyMessageAsChildPartL(TFSMailMsgIdaInsertBefore,
CFSMailMessage *aMessage
)

Copies given email object as new child part of this email part or email.

Parameters

TFSMailMsgId aInsertBeforedefines place of where new child part is created, if aInsertBefore is NULL id then new part is added as last.
CFSMailMessage * aMessagemessage to be copied as child part

DoAttachmentListL(RPointerArray< CFSMailMessagePart > &)

voidDoAttachmentListL(RPointerArray< CFSMailMessagePart > &aParts)[protected, virtual]

Returns a flat list of message parts that can be handled as attachments. Excludes message parts that are multipart and parts that are considered plain text or html body.

Parameters

RPointerArray< CFSMailMessagePart > & aPartscontains flat list of attachments

FetchLoadState()

IMPORT_C TFSPartFetchStateFetchLoadState()const

returns email part content current fetch state Intended as utility function for UI. If (0 == FetchedContentSize()) return EFSNone; else if (FetchedContentSize() < ContentSize()) then return EFSPartial else return EFSFull

FetchMessagePartL(const TFSMailMsgId, MFSMailRequestObserver &, const TUint)

IMPORT_C TIntFetchMessagePartL(const TFSMailMsgIdaMessagePartId,
MFSMailRequestObserver &aOperationObserver,
const TUintaPreferredByteCount
)

starts email part fetching from email server

Parameters

const TFSMailMsgId aMessagePartIdmessage part id of email part to be fetched
MFSMailRequestObserver & aOperationObserverobserver to forward fetching progress events to user
const TUint aPreferredByteCountindicates how much more content for part(s) user wants to fetch. Default value zero indicates that all content should be fetched. Actual amount of data fetched may differ from requested (possibly all fetched in any case).

FetchMessagesPartsL(const RArray< TFSMailMsgId > &, MFSMailRequestObserver &, const TUint)

IMPORT_C TIntFetchMessagesPartsL(const RArray< TFSMailMsgId > &aMessagePartIds,
MFSMailRequestObserver &aOperationObserver,
const TUintaPreferredByteCount
)

starts email parts fetching from email server

Parameters

const RArray< TFSMailMsgId > & aMessagePartIdsmessage part ids of email parts to be fetched
MFSMailRequestObserver & aOperationObserverobserver to forward fetching progress events to user
const TUint aPreferredByteCountindicates how much more content for part(s) user wants to fetch. Default value zero indicates that all content should be fetched. Actual amount of data fetched may differ from requested (possibly all fetched in any case).

FetchedContentSize()

IMPORT_C TUintFetchedContentSize()const

returns email part currently fetched (local) content size (in bytes).

FindBodyPartIdL(const TDesC &)

TFSMailMsgId FindBodyPartIdL(const TDesC &aContentType)[protected]

finds id of body part

Parameters

const TDesC & aContentType

FindBodyPartL(const TDesC &)

IMPORT_C CFSMailMessagePart *FindBodyPartL(const TDesC &aContentType)

finds email body part based on given content type (plain text or html body part of email message)

Parameters

const TDesC & aContentTypebody part content type to be searched

GetContentClass()

IMPORT_C const TDesC &GetContentClass()

email Content-Class accessor

GetContentFileL()

IMPORT_C RFileGetContentFileL()

Retrieves a read-only file handle for the content file of this message part. The caller must close the file handle.

GetContentToBufferL(TDes16 &, TUint)

IMPORT_C voidGetContentToBufferL(TDes16 &aBuffer,
TUintaStartOffset
)

copies email part contents to buffer given by user

Parameters

TDes16 & aBufferbuffer owned by user
TUint aStartOffsetoffset from content begin

GetContentType()

IMPORT_C const TDesC &GetContentType()

email part content-type accessor (e.g. "text/plain")

GetMRInfo()

IMPORT_C MMRInfoObject &GetMRInfo()

meeting request accessor if email part is a meeting request

GetPartId()

IMPORT_C TFSMailMsgIdGetPartId()const

email part id accessor

IsMRInfoSet()

IMPORT_C TBoolIsMRInfoSet()

method checks if MRInfo exists

IsMessageL()

IMPORT_C TBoolIsMessageL()const [virtual]

Returns ETrue if this email part is actually an email, so it's safe to cast this part to CFSMailMessage

ListMessagePartsL(RPointerArray< CFSMailMessagePart > &)

voidListMessagePartsL(RPointerArray< CFSMailMessagePart > &aParts)[protected]

lists subparts

Parameters

RPointerArray< CFSMailMessagePart > & aParts

NewChildPartL(const TFSMailMsgId, const TDesC &)

IMPORT_C CFSMailMessagePart *NewChildPartL(const TFSMailMsgIdaInsertBefore,
const TDesC &aContentType
)

Creates and adds a new child part to this email part

Parameters

const TFSMailMsgId aInsertBeforedefines place where new child part is created, if aInsertBefore is NULL id then new part is added as last.
const TDesC & aContentTypecontent type of the new child part

NewL(TFSMailMsgId, TFSMailMsgId)

IMPORT_C CFSMailMessagePart *NewL(TFSMailMsgIdaMessageId,
TFSMailMsgIdaMessagePartId
)[static]

Two-phased constructor.

Parameters

TFSMailMsgId aMessageIdmessage id in plugin containing email
TFSMailMsgId aMessagePartIdmessage part id in plugin containing email

NewLC(TFSMailMsgId, TFSMailMsgId)

IMPORT_C CFSMailMessagePart *NewLC(TFSMailMsgIdaMessageId,
TFSMailMsgIdaMessagePartId
)[static]

Two-phased constructor.

Parameters

TFSMailMsgId aMessageIdmessage id in plugin containing email
TFSMailMsgId aMessagePartIdmessage part id in plugin containing email

ReadOnlyPartSize()

IMPORT_C TUintReadOnlyPartSize()const

read only part size accessor (character or byte count)

RemoveChildPartL(TFSMailMsgId)

IMPORT_C voidRemoveChildPartL(TFSMailMsgIdaPartId)

Removes child part (and it's children, if any) from this email part

Parameters

TFSMailMsgId aPartIdpart id of the email part to be removed

RemoveContentL()

IMPORT_C voidRemoveContentL()

Removes from message store fetched contents of this part and possible child parts

RemoveDownLoadedAttachmentsL()

IMPORT_C voidRemoveDownLoadedAttachmentsL()

removes attachment downloaded contents from local/terminal memory

SaveL()

IMPORT_C voidSaveL()

saves this message part

SetAttachmentNameL(const TDesC &)

IMPORT_C voidSetAttachmentNameL(const TDesC &aFilePath)

Sets attachment name for email part. Full path can be given as input even though only filename is saved.

Parameters

const TDesC & aFilePathattachment name

SetContent(TDes16 &)

IMPORT_C voidSetContent(TDes16 &aBuffer)

copies email part contents from buffer given by user

Parameters

TDes16 & aBufferbuffer given by user

SetContentClass(const TDesC &)

IMPORT_C voidSetContentClass(const TDesC &aContentClass)

email Content-Class mutator

Parameters

const TDesC & aContentClassnew email Content-Class value

SetContentDescription(const TDesC &)

IMPORT_C voidSetContentDescription(const TDesC &aContentDesctiption)

Stores email Content-Description value, parameters can be included, if any.

Parameters

const TDesC & aContentDesctiption

SetContentDisposition(const TDesC &)

IMPORT_C voidSetContentDisposition(const TDesC &aContentDesctiption)

Stores email Content-Disposition value, parameters can be included, if any.

Parameters

const TDesC & aContentDesctiption

SetContentFromFileL(const TDesC &)

IMPORT_C voidSetContentFromFileL(const TDesC &aFilePath)

Sets email part contents from given file, possible old contents are replaced.

Parameters

const TDesC & aFilePathdefines the target file

SetContentIDL(const TDesC &)

IMPORT_C voidSetContentIDL(const TDesC &aContentID)

email Content-Id mutator

Parameters

const TDesC & aContentIDnew email Content-Id value

SetContentSize(const TUint)

IMPORT_C voidSetContentSize(const TUintaContentSize)

Sets email part full content size (in bytes)

Parameters

const TUint aContentSizecontent size to be set

SetContentType(const TDesC &)

IMPORT_C voidSetContentType(const TDesC &aContentType)

email part content-type mutator

Parameters

const TDesC & aContentTypenew content type value

SetFetchedContentSize(TUint)

IMPORT_C voidSetFetchedContentSize(TUintaContentSize)

Sets email part currently fetched (local) content size (in bytes).

Parameters

TUint aContentSizecontent size to be set

SetMRInfo(MMRInfoObject *)

IMPORT_C voidSetMRInfo(MMRInfoObject *aMeetingRequest)

stores given meeting request object as email part

Parameters

MMRInfoObject * aMeetingRequestmeeting request object

SetMessagePartsStatus(TFSPartFetchState)

IMPORT_C voidSetMessagePartsStatus(TFSPartFetchStateaMessagePartStatus)

sets email part fetch status

Parameters

TFSPartFetchState aMessagePartStatus(EFSMessagePartsKnown)

SetReadOnlyPartSize(const TUint)

IMPORT_C voidSetReadOnlyPartSize(const TUintaReadOnlyPartSize)

read only part size mutator

Parameters

const TUint aReadOnlyPartSizeread only size to be set (character or byte count)

Member Data Documentation

HBufC * iAttachmentName

HBufC *iAttachmentName[private]

attachment name

HBufC * iContentClass

HBufC *iContentClass[private]

email content class

HBufC * iContentDescription

HBufC *iContentDescription[private]

email content decription

HBufC * iContentDisposition

HBufC *iContentDisposition[private]

email content disposition

CDesCArray * iContentDispositionParams

CDesCArray *iContentDispositionParams[private]

content disposition parameters

HBufC * iContentID

HBufC *iContentID[private]

email content id

TUint iContentSize

TUint iContentSize[private]

email part content size

HBufC * iContentType

HBufC *iContentType[protected]

message part MIME type

CDesCArray * iContentTypeParams

CDesCArray *iContentTypeParams[private]

content type parameters

TInt iFetchedContentSize

TInt iFetchedContentSize[private]

email part fetched content size

RFile iFile

RFile iFile[private]

TBool iIsFetched

TBool iIsFetched[private]

fetched from email server indication

MMRInfoObject * iMeetingRequest

MMRInfoObject *iMeetingRequest[private]

meeting request object

TFSMailMsgId iMessagePartId

TFSMailMsgId iMessagePartId[private]

message part id

RPointerArray< CFSMailMessagePart > iMessageParts

RPointerArray< CFSMailMessagePart >iMessageParts[protected]

message parts array

TFSPartFetchState iMessagePartsStatus

TFSPartFetchState iMessagePartsStatus[protected]

email fetch from email server status

TBool iReadMessageParts

TBool iReadMessageParts[protected]

TUint iReadOnlyPartSize

TUint iReadOnlyPartSize[private]

read only part size