CMsvPlainBodyText Class Reference

#include <mw/cmsvplainbodytext.h>

class CMsvPlainBodyText : public CMsgActive

Inherits from

Public Member Functions
~CMsvPlainBodyText()
IMPORT_C TUintCharacterSet()
IMPORT_C voidCommitL()
IMPORT_C TUintDefaultCharacterSet()
CMsvPlainBodyText *NewL(MMsvStoreManager &, CMsvStore &, TBool, TUint, TUint, TMsvId, RFs &)
CMsvPlainBodyText *NewL(MMsvStoreManager &, CMsvStore &, TMsvId, RFs &, TInt)
IMPORT_C voidNextChunkL(TDes8 &, TRequestStatus &)
IMPORT_C voidNextChunkL(TDes8 &)
IMPORT_C voidNextChunkL(TDes16 &, TRequestStatus &)
IMPORT_C voidNextChunkL(TDes16 &)
IMPORT_C voidPreviousChunkL(TDes8 &, TRequestStatus &)
IMPORT_C voidPreviousChunkL(TDes8 &)
IMPORT_C voidPreviousChunkL(TDes16 &, TRequestStatus &)
IMPORT_C voidPreviousChunkL(TDes16 &)
IMPORT_C voidSetCharacterSetL(const TUint)
IMPORT_C TIntSize()
IMPORT_C voidStoreChunkL(const TDesC8 &, TRequestStatus &)
IMPORT_C voidStoreChunkL(const TDesC8 &)
IMPORT_C voidStoreChunkL(const TDesC16 &, TRequestStatus &)
IMPORT_C voidStoreChunkL(const TDesC16 &)
IMPORT_C voidStoreRichTextAsPlainTextL(CRichText &)
Inherited Attributes
CActive::iStatus
Inherited Enumerations
CActive:TPriority
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()

Detailed Description

This class encapsulates plainbody text information for storage within the Message Store.It also populates a CRichText object with the 8 bit data decoded to the specified character set.If a character set is not specified, then the default character set is used.

Constructor & Destructor Documentation

~CMsvPlainBodyText ( )

IMPORT_C~CMsvPlainBodyText()

Destructor

Member Function Documentation

CharacterSet ( )

IMPORT_C TUintCharacterSet()

Returns the charset for the plain text part

Return Value
TUint

CommitL ( )

IMPORT_C voidCommitL()

Commit the file and the store after it is written and and also closes the file.

DefaultCharacterSet ( )

IMPORT_C TUintDefaultCharacterSet()

Returns the default charset for the plain text part

Return Value
TUint

NewL ( MMsvStoreManager &, CMsvStore &, TBool, TUint, TUint, TMsvId, RFs & )

CMsvPlainBodyText *NewL(MMsvStoreManager &aMsvStoreManager,
CMsvStore &aStore,
TBoolaIs8Bit,
TUintaCharsetId,
TUintaDefaultCharsetId,
TMsvIdaMessageId,
RFs &aFs
)[static]

The NewL factory function for Write operation.

Parameters
aMsvStoreManagerThe MMsvStoreManager reference to call Store related RFile APIs
aStoreThe CMsvStore object.
aIs8BitTBool indicating whether to store bdy text as 8/16 bit.
aCharsetIdThe charset of the body part.
aDefaultCharsetIdThe default charset of the system.
aMessageIdThe Id of the message that is to be stored.
aFsThe RFs for handling RFile related operations.
Return Value
CMsvPlainBodyText.

NewL ( MMsvStoreManager &, CMsvStore &, TMsvId, RFs &, TInt )

CMsvPlainBodyText *NewL(MMsvStoreManager &aMsvStoreManager,
CMsvStore &aStore,
TMsvIdaMessageId,
RFs &aFs,
TIntaChunkLength
)[static]

Overloaded NewL for Read operation.

Parameters
aMsvStoreManagerThe MMsvStoreManager reference to call Store related RFile APIs
aStoreThe CMsvStore object.
aMessageIdThe Id of the message that is to be stored.
aFsThe RFs for handling RFile related operations.
aChunkLengthThe length of the chunk that will be stored/restored in single operaion
Return Value
CMsvPlainBodyText.

NextChunkL ( TDes8 &, TRequestStatus & )

IMPORT_C voidNextChunkL(TDes8 &aChunk,
TRequestStatus &aStatus
)
Retrieve the next chunk of the plain body text.
Parameters
aChunkThe output parameter contains the requested chunk.
Return Value
void
Leave Codes
KErrAccessDeniedIf
KErrNotSupportedIf 16-bit storage is enabled.
KErrUnderflowIf aChunk MaxLength is less than iChunkMaxLength.
OtherStandard system-wide error codes.

NextChunkL ( TDes8 & )

IMPORT_C voidNextChunkL(TDes8 &aChunk)
Retrieve the next chunk of the plain body text.
Parameters
aChunkThe output parameter contains the requested chunk.
Return Value
void
Leave Codes
KErrNotSupportedIf
KErrNotSupportedIf 16-bit storage is enabled.
KErrUnderflowIf aChunk MaxLength is less than iChunkMaxLength.
OtherStandard system-wide error codes.

NextChunkL ( TDes16 &, TRequestStatus & )

IMPORT_C voidNextChunkL(TDes16 &aChunk,
TRequestStatus &aStatus
)
Retrieve the next chunk of the plain body text. If body is stored as 8bit, the chunk is converted to unicode.Unconverted bytes will be converted while reading the next chunk.
Parameters
aChunkThe output parameter contains the requested chunk.If no more data is in Store this contains NULL descriptor.
aStatusThe TRequestStatus for this request.
Return Value
void
Leave Codes
KErrAccessDeniedIf
KErrUnderflowIf aChunk MaxLength is less than iChunkMaxLength.
OtherStandard system-wide error codes.

NextChunkL ( TDes16 & )

IMPORT_C voidNextChunkL(TDes16 &aChunk)
Retrieve the next chunk of the plain body text. If body is stored as 8bit, convert the chunk to Unicode. Unconverted bytes will be converted while reading the next chunk.
Parameters
aChunkThe output parameter contains the requested chunk.If no more data is in Store this contains NULL descriptor.
Return Value
void
Leave Codes
KErrAccessDeniedIf
KErrUnderflowIf aChunk MaxLength is less than iChunkMaxLength.
OtherStandard system-wide error codes.

PreviousChunkL ( TDes8 &, TRequestStatus & )

IMPORT_C voidPreviousChunkL(TDes8 &aChunk,
TRequestStatus &aStatus
)
Retrieve the previous chunk of the plain body text asynchronously.
Parameters
aChunkThe output parameter containing the requested chunk on completion.
aStatusThe TRequestStatus for this request.
Return Value
void
Leave Codes
KErrNotSupportedIf 16-bit storage is enabled.
KErrAccessDeniedIf
KErrUnderflowIf aChunk MaxLength is less than iChunkMaxLength.
OtherStandard system-wide error codes.

PreviousChunkL ( TDes8 & )

IMPORT_C voidPreviousChunkL(TDes8 &aChunk)
Retrieve the previous chunk of the plain body text.
Parameters
aChunkThe output parameter containing the requested chunk.
Return Value
void
Leave Codes
KErrNotSupportedIf 16-bit storage is enabled.
KErrAccessDeniedIf
KErrUnderflowIf aChunk MaxLength is less than iChunkMaxLength.
OtherStandard system-wide error codes.

PreviousChunkL ( TDes16 &, TRequestStatus & )

IMPORT_C voidPreviousChunkL(TDes16 &aChunk,
TRequestStatus &aStatus
)
Retrieve the previous chunk of the plain body text asynchronously.DoRunl converts the chunk to unicode.
Parameters
aChunkThe output parameter containing the requested chunk on completion.
aStatusThe TRequestStatus for this request.
Return Value
void
Leave Codes
KErrNotSupportedIf
KErrUnderflowIf aChunk MaxLength is less than iChunkMaxLength.
OtherStandard system-wide error codes.

PreviousChunkL ( TDes16 & )

IMPORT_C voidPreviousChunkL(TDes16 &aChunk)
Retrieve the Previouschunk of the plain body text. If body is stored as 8bit, convert the chunk to Unicode.
Parameters
aChunkThe output parameter contains the requested chunk.
Return Value
void
Leave Codes
KErrNotSupportedIf
KErrUnderflowIf aChunk MaxLength is less than iChunkMaxLength.
OtherStandard system-wide error codes.

SetCharacterSetL ( const TUint )

IMPORT_C voidSetCharacterSetL(const TUintaCharset)

Set iCharsetId to aCharset if body text of the message was downloaded as 8 bit. This can be used to override the charset with which a message was downloaded, when the body text is opened for reading.

Parameters
aCharsetThe new charset with which it needs to be converted.
Return Value
void.

Size ( )

IMPORT_C TIntSize()

Returns the size of body text in bytes.

Return Value
TInt The size of the plain body text stored in bytes.

StoreChunkL ( const TDesC8 &, TRequestStatus & )

IMPORT_C voidStoreChunkL(const TDesC8 &aChunk,
TRequestStatus &aStatus
)
Store the plain body text part in chunks.
Return Value
void.
Leave Codes
KErrAccessDenied.If
OtherStandard system-wide error codes.

StoreChunkL ( const TDesC8 & )

IMPORT_C voidStoreChunkL(const TDesC8 &aChunk)
Store the plain body text part in chunks,synchronous version.
Return Value
void.
Leave Codes
KErrAccessDenied.If
OtherStandard system-wide error codes.

StoreChunkL ( const TDesC16 &, TRequestStatus & )

IMPORT_C voidStoreChunkL(const TDesC16 &aChunk,
TRequestStatus &aStatus
)
Store the body part in chunks(16 bit version).
Parameters
aChunkThe 16 bit chunk that is to be stored.
aStatusThe TRequestStatus parameter for this request.
Return Value
void
Leave Codes
KErrNotSupportedIf the 8-bit storage was enabled.
KErrAccessDeniedIf
OtherStandard system-wide error codes.

StoreChunkL ( const TDesC16 & )

IMPORT_C voidStoreChunkL(const TDesC16 &aChunk)
Store the body part in chunks(16 bit synchronous version).
Parameters
aChunkThe 16 bit chunk that is to be stored.
Return Value
void
Leave Codes
KErrNotSupportedIf the 8-bit storage was enabled.
KErrAccessDeniedIf
OtherStandard system-wide error codes.

StoreRichTextAsPlainTextL ( CRichText & )

IMPORT_C voidStoreRichTextAsPlainTextL(CRichText &aRichText)
Converts and stores the CRichText contents to a plain text.
Parameters
aRichTextThe CRichText object that will be stored as plain body text.
Return Value
void.
Leave Codes
KErrNotSupportedIf
OtherStandard system-wide error codes.