CMsvBodyText Class Reference

class CMsvBodyText : public CBase

This class encapsulates 8 bit data and character set 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.

Inherits from

Constructor & Destructor Documentation

CMsvBodyText()

CMsvBodyText ( ) [private]

Private constructor.

~CMsvBodyText()

IMPORT_C ~CMsvBodyText ( ) [virtual]

Deallocates and destroys the body text object.

Member Functions Documentation

CharacterSet()

IMPORT_C TUint CharacterSet ( ) const

Retrieves the character set unique id that will be used when decoding the 8 bit data stream.

DefaultCharacterSet()

IMPORT_C TUint DefaultCharacterSet ( ) const

Retrieves the default character set unique id that will be used when decoding the 8 bit data stream if the character set unique id has not been specified.

GetBodyLengthL(CMsvStore &)

IMPORT_C TInt GetBodyLengthL ( CMsvStore & aStore )

Parameters

CMsvStore & aStore

GetBodyTextL(RFs &, CMsvStore &, CRichText &)

IMPORT_C void GetBodyTextL ( RFs & aFs,
CMsvStore & aStore,
CRichText & aBodyText
)

Decodes the encoded 8 bit body text data into the correct character set and adds the decoded output to the richtext object owned by the client. If the character set is not specified, then the default character set is used. If the character set is specified but not installed on the system then the default character set is used instead.

Pre-condition
The store must contain encoded 8 bit body text data.
leave
KErrNotSupported The character set used to decode the 8 bit data cannot be found on the system.
leave
KErrNotFound The store does not contain encoded 8 bit body text data.

Parameters

RFs & aFs A connected file system handle. It is used to search for installed character set decoders.
CMsvStore & aStore The store can be opened in read-only or read-write (edit) mode.
CRichText & aBodyText The rich text object that will be appended with the decoded text.

GetBodyTextL(CMsvStore &, TDes8 &)

IMPORT_C void GetBodyTextL ( CMsvStore & aStore,
TDes8 & aBufer
)

Parameters

CMsvStore & aStore
TDes8 & aBufer

IsPresentL(const CMsvStore &)

IMPORT_C TBool IsPresentL ( const CMsvStore & aStore ) const

Tests to see if the store contains 8 bit body text data.

Parameters

const CMsvStore & aStore The store can be open in read-only or read-write (edit) mode.

NewL()

IMPORT_C CMsvBodyText * NewL ( ) [static]

Allocates and constructs an empty body text object.

NewLC()

IMPORT_C CMsvBodyText * NewLC ( ) [static]

Allocates and constructs an empty body text object. The object is put on the cleanup stack.

RemoveL(CMsvStore &)

IMPORT_C void RemoveL ( CMsvStore & aStore )

Removes the 8 bit data body text data from the store cache.

Pre-condition
The store must be in read-write (edit) mode.
leave
KErrAccessedDenied The message store is not in read-write (edit) mode.

Parameters

CMsvStore & aStore

RestoreL(CMsvStore &)

IMPORT_C void RestoreL ( CMsvStore & aStore )

Retrieves the character set unique ids and 8 bit data stream from the message store.

leave
KErrNotFound The store does not contain 8 bit encoded body text data.

Parameters

CMsvStore & aStore A store in read-only or read-write (edit) mode.

SetCharacterSet(const TUint)

IMPORT_C void SetCharacterSet ( const TUint aCharacterSetIdentifier )

Sets the character set unique id to be used when decoding the 8 bit data stream.

Parameters

const TUint aCharacterSetIdentifier

SetDefaultCharacterSet(const TUint)

IMPORT_C void SetDefaultCharacterSet ( const TUint aCharacterSetIdentifier )

Sets the default character set to use when decoding the 8 bit data if the character set unique id has not been specified.

Parameters

const TUint aCharacterSetIdentifier

StoreL(CMsvStore &)

IMPORT_C void StoreL ( CMsvStore & aStore )

Just adds the character set identifiers to the store cache.

Pre-condition
The store must be in read-write (edit) mode.
leave
KErrAccessedDenied The message store is not in read-write (edit) mode.

Parameters

CMsvStore & aStore The store must be open in read-write (edit) mode.

StoreL(CMsvStore &, const CBufBase &)

IMPORT_C void StoreL ( CMsvStore & aStore,
const CBufBase & aData
)

Adds the character identifiers and 8 bit encoded body text data to the store cache.

Pre-condition
The store must be in read-write (edit) mode.
leave
KErrAccessedDenied The message store is not in read-write (edit) mode.

Parameters

CMsvStore & aStore The store must be open in read-write (edit) mode.
const CBufBase & aData 8 bit encoded body text data to be added to the store.

Member Data Documentation

TUint iCharSet

TUint iCharSet [private]

TUint iDefaultCharSet

TUint iDefaultCharSet [private]