CImPlainBodyText Class Reference

class CImPlainBodyText : public CMsgActive

This class is a wrapper over CMsvPlainBodyText class of message server. The pointer to this class can be obtained by calling OpenPlainBodyTextForReadL or OpenPlainBodyTextForWriteL API of the CImEmailMessage class. This can be used to store/restore a email message created by using the CImEmailOperation class.

CImEmailMessage , CImEmailOperation

Inherits from

Public Member Functions
~CImPlainBodyText ()
IMPORT_C void CommitL ( TRequestStatus &)
IMPORT_C void CommitL ( TRequestStatus &, CImMimeHeader &)
CImPlainBodyText * NewL ( CImEmailMessage &, CMsvEntry &, CImEmailMessage::TImEmailEntryType , TInt , TBool )
IMPORT_C void NextChunkL ( TDes8 &, TRequestStatus &)
IMPORT_C void NextChunkL ( TDes8 &)
IMPORT_C void NextChunkL ( TDes16 &, TRequestStatus &)
IMPORT_C void NextChunkL ( TDes16 &)
IMPORT_C void PreviousChunkL ( TDes8 &, TRequestStatus &)
IMPORT_C void PreviousChunkL ( TDes8 &)
IMPORT_C void PreviousChunkL ( TDes16 &, TRequestStatus &)
IMPORT_C void PreviousChunkL ( TDes16 &)
IMPORT_C void StoreChunkL (const TDesC8 &, TRequestStatus &)
IMPORT_C void StoreChunkL (const TDesC8 &)
IMPORT_C void StoreChunkL (const TDesC16 &, TRequestStatus &)
IMPORT_C void StoreChunkL (const TDesC16 &)
IMPORT_C void StoreRichTextAsPlainTextL ( CRichText &)
Private Member Functions
CImPlainBodyText ( CImEmailMessage &, CMsvEntry &)
void ConstructL ( TInt , CImEmailMessage::TImEmailEntryType , TBool )
void DoCancel ()
void DoRunL ()
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()
Private Member Enumerations
enum TChunkRetrievalState { EIdleState , ENextChunk8Bit , ENextChunk16Bit , EPreviousChunk8Bit , EPreviousChunk16Bit }
Inherited Enumerations
CActive:TPriority
Private Attributes
TDes16 * iChunk16
TDes8 * iChunk8
enum CImPlainBodyText::TChunkRetrievalState iChunkRetrievalState
CImEmailMessage & iEmailMessage
TInt iIndex
TMsvId iMessageId
CMsvEntry & iMsvEntry
RPointerArray < CMsvPlainBodyText > iPlainTextArray
CMsvStore * iStore
CImStoreMessagePart * iStoreMessagePart
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CImPlainBodyText(CImEmailMessage &, CMsvEntry &)

CImPlainBodyText ( CImEmailMessage & aEmailMessage,
CMsvEntry & aMsvEntry
) [private]

Constructor

Parameters

CImEmailMessage & aEmailMessage
CMsvEntry & aMsvEntry

~CImPlainBodyText()

IMPORT_C ~CImPlainBodyText ( )

Destructor

Member Functions Documentation

CommitL(TRequestStatus &)

IMPORT_C void CommitL ( TRequestStatus & aStatus )

Commits the email message after it has been completed.

Parameters

TRequestStatus & aStatus The TRequestStatus parameter for this request.

CommitL(TRequestStatus &, CImMimeHeader &)

IMPORT_C void CommitL ( TRequestStatus & aStatus,
CImMimeHeader & aMimeHeader
)

Commits the email message after it has been completed along with mime header for this message.

Parameters

TRequestStatus & aStatus The TRequestStatus parameter for this request.
CImMimeHeader & aMimeHeader The CMimeHeader for this message.

ConstructL(TInt, CImEmailMessage::TImEmailEntryType, TBool)

void ConstructL ( TInt aChunkLength,
CImEmailMessage::TImEmailEntryType aEntryType,
TBool aEditMode
) [private]

The 2nd Phase construction.

Parameters

TInt aChunkLength
CImEmailMessage::TImEmailEntryType aEntryType
TBool aEditMode

DoCancel()

void DoCancel ( ) [private, virtual]

Cancels the relavent CMsvPlainBodyText object

DoRunL()

void DoRunL ( ) [private, virtual]

NewL(CImEmailMessage &, CMsvEntry &, CImEmailMessage::TImEmailEntryType, TInt, TBool)

CImPlainBodyText * NewL ( CImEmailMessage & aEmailMessage,
CMsvEntry & aMsvEntry,
CImEmailMessage::TImEmailEntryType aEntryType,
TInt aChunkLength,
TBool aEditMode
) [static]

NewL Factory method.

Parameters

CImEmailMessage & aEmailMessage
CMsvEntry & aMsvEntry
CImEmailMessage::TImEmailEntryType aEntryType
TInt aChunkLength
TBool aEditMode

NextChunkL(TDes8 &, TRequestStatus &)

IMPORT_C void NextChunkL ( TDes8 & aChunk,
TRequestStatus & aStatus
)
Retrieve the next chunk of the plain body text.
leave
KErrAccessDenied If CMsvStore was opened in Write mode.
leave
KErrNotSupported If 16-bit storage is enabled.
leave
KErrUnderflow If aChunk MaxLength is less than iChunkMaxLength.
leave
Other Standard system-wide error codes.

Parameters

TDes8 & aChunk The output parameter contains the requested chunk.
TRequestStatus & aStatus

NextChunkL(TDes8 &)

IMPORT_C void NextChunkL ( TDes8 & aChunk )
Retrieve the next chunk of the plain body text.
leave
KErrNotSupported If CMsvStore was opened in Write mode.
leave
KErrNotSupported If 16-bit storage is enabled.
leave
KErrUnderflow If aChunk MaxLength is less than iChunkMaxLength.
leave
Other Standard system-wide error codes.

Parameters

TDes8 & aChunk The output parameter contains the requested chunk.

NextChunkL(TDes16 &, TRequestStatus &)

IMPORT_C void NextChunkL ( TDes16 & aChunk,
TRequestStatus & aStatus
)
Restore the plain body text into chunks.
leave
KErrNotSupported If CMsvStore was opened in Write mode.
leave
KErrUnderflow If aChunk MaxLength is less than iChunkMaxLength.
leave
Other Standard system-wide error codes.

Parameters

TDes16 & aChunk The output parameter contains the requested chunk on completion.
TRequestStatus & aStatus The TRequestStatus parameter for this request.

NextChunkL(TDes16 &)

IMPORT_C void NextChunkL ( TDes16 & aChunk )
Restores the plain body text into chunks.
leave
KErrNotSupported If CMsvStore was opened in Write mode.
leave
KErrUnderflow If aChunk MaxLength is less than iChunkMaxLength.
leave
Other Standard system-wide error codes.

Parameters

TDes16 & aChunk The output parameter contains the requested chunk on completion.

PreviousChunkL(TDes8 &, TRequestStatus &)

IMPORT_C void PreviousChunkL ( TDes8 & aChunk,
TRequestStatus & aStatus
)
Retrieve the next chunk of the plain body text.
leave
KErrNotSupported If CMsvStore was opened in Write mode.
leave
KErrNotSupported If 16-bit storage is enabled.
leave
KErrUnderflow If aChunk MaxLength is less than iChunkMaxLength.
leave
Other Standard system-wide error codes.

Parameters

TDes8 & aChunk The output parameter contains the requested chunk.
TRequestStatus & aStatus

PreviousChunkL(TDes8 &)

IMPORT_C void PreviousChunkL ( TDes8 & aChunk )
Retrieve the next chunk of the plain body text.
leave
KErrNotSupported If CMsvStore was opened in Write mode.
leave
KErrNotSupported If 16-bit storage is enabled.
leave
KErrUnderflow If aChunk MaxLength is less than iChunkMaxLength.
leave
Other Standard system-wide error codes.

Parameters

TDes8 & aChunk The output parameter contains the requested chunk.

PreviousChunkL(TDes16 &, TRequestStatus &)

IMPORT_C void PreviousChunkL ( TDes16 & aChunk,
TRequestStatus & aStatus
)
Restore the plain body text into chunks.
leave
KErrNotSupported If CMsvStore was opened in Write mode.
leave
KErrUnderflow If aChunk MaxLength is less than iChunkMaxLength.
leave
Other Standard system-wide error codes.

Parameters

TDes16 & aChunk The output parameter contains the requested chunk on completion.
TRequestStatus & aStatus The TRequestStatus parameter for this request.

PreviousChunkL(TDes16 &)

IMPORT_C void PreviousChunkL ( TDes16 & aChunk )
Restore the plain body text into chunks.
leave
KErrNotSupported If CMsvStore was opened in Write mode.
leave
KErrUnderflow If aChunk MaxLength is less than iChunkMaxLength.
leave
Other Standard system-wide error codes.

Parameters

TDes16 & aChunk The output parameter contains the requested chunk on completion.

StoreChunkL(const TDesC8 &, TRequestStatus &)

IMPORT_C void StoreChunkL ( const TDesC8 & aChunk,
TRequestStatus & aStatus
)
Store the plain body text part in chunks.
leave
KErrAccessDenied. If CMsvStore was opened in Read mode or If CommitL is already called.
leave
Other Standard system-wide error codes.

Parameters

const TDesC8 & aChunk
TRequestStatus & aStatus

StoreChunkL(const TDesC8 &)

IMPORT_C void StoreChunkL ( const TDesC8 & aChunk )
Store the plain body text part in chunks,synchronous version.
leave
KErrAccessDenied. If CMsvStore was opened in Read mode or If CommitL is already called.
leave
Other Standard system-wide error codes.

Parameters

const TDesC8 & aChunk

StoreChunkL(const TDesC16 &, TRequestStatus &)

IMPORT_C void StoreChunkL ( const TDesC16 & aChunk,
TRequestStatus & aStatus
)
Store the body part in chunks(16 bit version).
leave
KErrNotSupported If the 8-bit storage was enabled.
leave
KErrAccessDenied If CMsvStore was opened in Read mode or IfCommitL is already called.
leave
Other Standard system-wide error codes.

Parameters

const TDesC16 & aChunk The 16 bit chunk that is to be stored.
TRequestStatus & aStatus The TRequestStatus parameter for this request.

StoreChunkL(const TDesC16 &)

IMPORT_C void StoreChunkL ( const TDesC16 & aChunk )
Store the body part in chunks(16 bit synchronous version).
leave
KErrNotSupported If the 8-bit storage was enabled.
leave
KErrAccessDenied If CMsvStore was opened in Read mode or If CommitL is already called.
leave
Other Standard system-wide error codes.

Parameters

const TDesC16 & aChunk The 16 bit chunk that is to be stored.

StoreRichTextAsPlainTextL(CRichText &)

IMPORT_C void StoreRichTextAsPlainTextL ( CRichText & aRichText )
Converts and stores the CRichText contents to a plain text.
leave
KErrNotSupported If the 8-bit storage was enabled.
leave
KErrAccessDenied If CMsvStore was opened in Read mode or If CommitL is already called.
leave
Other Standard system-wide error codes.

Parameters

CRichText & aRichText The CRichText object that will be stored as plain body text.

Member Enumerations Documentation

Enum TChunkRetrievalState

Enum indicating which asynchronous chunk retrieving method resulted in a call to DoRunl.

Enumerators

EIdleState
ENextChunk8Bit
ENextChunk16Bit
EPreviousChunk8Bit
EPreviousChunk16Bit

Member Data Documentation

TDes16 * iChunk16

TDes16 * iChunk16 [private]

The 16-bit pointer to a chunk that will be populated with data when asynchronous 16-bit versions of NextChunkL / PreviousChunkL returns.

TDes8 * iChunk8

TDes8 * iChunk8 [private]

The 8-bit pointer to a chunk that will be populated with data when asynchronous 8-bit versions of NextChunkL / PreviousChunkL returns.

enum CImPlainBodyText::TChunkRetrievalState iChunkRetrievalState

enum CImPlainBodyText::TChunkRetrievalState iChunkRetrievalState [private]

Enum indicating which asynchronous chunk retrieving method resulted in a call to DoRunl.

CImEmailMessage & iEmailMessage

CImEmailMessage & iEmailMessage [private]

TInt iIndex

TInt iIndex [private]

For indexing the plaintext array

TMsvId iMessageId

TMsvId iMessageId [private]

The id of the message.

CMsvEntry & iMsvEntry

CMsvEntry & iMsvEntry [private]

The CMsvEntry associated with the message being stored/restored.

RPointerArray< CMsvPlainBodyText > iPlainTextArray

RPointerArray < CMsvPlainBodyText > iPlainTextArray [private]

The array of framework/server class to store/restore body text in chunks.

CMsvStore * iStore

CMsvStore * iStore [private]

The Store associated with the message being stored/restored.

CImStoreMessagePart * iStoreMessagePart

CImStoreMessagePart * iStoreMessagePart [private]