Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <CMsvPlainBodyText.h>
Link against: msgs.lib
Link against: msgs_autoshutdown.lib
This item is not part of the S60 5th Edition SDK

Class CMsvPlainBodyText

class CMsvPlainBodyText : public CMsgActive;

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.

Derivation

Members

Defined in CMsvPlainBodyText:


Construction and destruction


~CMsvPlainBodyText()

IMPORT_C ~CMsvPlainBodyText();

Description

Destructor

[Top]


Member functions


StoreChunkL(const TDesC8 &,TRequestStatus &)

IMPORT_C void StoreChunkL(const TDesC8 &aChunk, TRequestStatus &aStatus);

Description

Store the plain body text part in chunks.

Parameters

const TDesC8 &aChunk

TRequestStatus &aStatus

Leave codes

KErrAccessDenied.

If CMsvStore was opened in Read mode or If CommitL is already called.

Other

Standard system-wide error codes.


StoreChunkL(const TDesC8 &)

IMPORT_C void StoreChunkL(const TDesC8 &aChunk);

Description

Store the plain body text part in chunks,synchronous version.

Parameters

const TDesC8 &aChunk

Leave codes

KErrAccessDenied.

If CMsvStore was opened in Read mode or If CommitL is already called.

Other

Standard system-wide error codes.


StoreChunkL(const TDesC16 &,TRequestStatus &)

IMPORT_C void StoreChunkL(const TDesC16 &aChunk, TRequestStatus &aStatus);

Description

Store the body part in chunks(16 bit version).

Parameters

const TDesC16 &aChunk

The 16 bit chunk that is to be stored.

TRequestStatus &aStatus

The TRequestStatus parameter for this request.

Leave codes

KErrNotSupported

If the 8-bit storage was enabled.

KErrAccessDenied

If CMsvStore was opened in Read mode or IfCommitL is already called.

Other

Standard system-wide error codes.


StoreChunkL(const TDesC16 &)

IMPORT_C void StoreChunkL(const TDesC16 &aChunk);

Description

Store the body part in chunks(16 bit synchronous version).

Parameters

const TDesC16 &aChunk

The 16 bit chunk that is to be stored.

Leave codes

KErrNotSupported

If the 8-bit storage was enabled.

KErrAccessDenied

If CMsvStore was opened in Read mode or If CommitL is already called.

Other

Standard system-wide error codes.


StoreRichTextAsPlainTextL(CRichText &)

IMPORT_C void StoreRichTextAsPlainTextL(CRichText &aRichText);

Description

Converts and stores the CRichText contents to a plain text.

Parameters

CRichText &aRichText

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

Leave codes

KErrNotSupported

If CMsvStore was opened in Read mode or If CommitL is already called.

Other

Standard system-wide error codes.


CommitL()

IMPORT_C void CommitL();

Description

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


NextChunkL(TDes8 &,TRequestStatus &)

IMPORT_C void NextChunkL(TDes8 &aChunk, TRequestStatus &aStatus);

Description

Retrieve the next chunk of the plain body text.

Parameters

TDes8 &aChunk

The output parameter contains the requested chunk.

TRequestStatus &aStatus

Leave codes

KErrAccessDenied

If CMsvStore was opened in Write mode.

KErrNotSupported

If 16-bit storage is enabled.

KErrUnderflow

If aChunk MaxLength is less than iChunkMaxLength.

Other

Standard system-wide error codes.


NextChunkL(TDes8 &)

IMPORT_C void NextChunkL(TDes8 &aChunk);

Description

Retrieve the next chunk of the plain body text.

Parameters

TDes8 &aChunk

The output parameter contains the requested chunk.

Leave codes

KErrNotSupported

If CMsvStore was opened in Write mode.

KErrNotSupported

If 16-bit storage is enabled.

KErrUnderflow

If aChunk MaxLength is less than iChunkMaxLength.

Other

Standard system-wide error codes.


NextChunkL(TDes16 &,TRequestStatus &)

IMPORT_C void NextChunkL(TDes16 &aChunk, TRequestStatus &aStatus);

Description

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

TDes16 &aChunk

The output parameter contains the requested chunk.If no more data is in Store this contains NULL descriptor.

TRequestStatus &aStatus

The TRequestStatus for this request.

Leave codes

KErrAccessDenied

If CMsvStore was opened in Write mode.

KErrUnderflow

If aChunk MaxLength is less than iChunkMaxLength.

Other

Standard system-wide error codes.


NextChunkL(TDes16 &)

IMPORT_C void NextChunkL(TDes16 &aChunk);

Description

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

TDes16 &aChunk

The output parameter contains the requested chunk.If no more data is in Store this contains NULL descriptor.

Leave codes

KErrAccessDenied

If CMsvStore was opened in Write mode.

KErrUnderflow

If aChunk MaxLength is less than iChunkMaxLength.

Other

Standard system-wide error codes.


PreviousChunkL(TDes8 &,TRequestStatus &)

IMPORT_C void PreviousChunkL(TDes8 &aChunk, TRequestStatus &aStatus);

Description

Retrieve the previous chunk of the plain body text asynchronously.

Parameters

TDes8 &aChunk

The output parameter containing the requested chunk on completion.

TRequestStatus &aStatus

The TRequestStatus for this request.

Leave codes

KErrNotSupported

If 16-bit storage is enabled.

KErrAccessDenied

If CMsvStore was opened in Write mode.

KErrUnderflow

If aChunk MaxLength is less than iChunkMaxLength.

Other

Standard system-wide error codes.


PreviousChunkL(TDes8 &)

IMPORT_C void PreviousChunkL(TDes8 &aChunk);

Description

Retrieve the previous chunk of the plain body text.

Parameters

TDes8 &aChunk

The output parameter containing the requested chunk.

Leave codes

KErrNotSupported

If 16-bit storage is enabled.

KErrAccessDenied

If CMsvStore was opened in Write mode.

KErrUnderflow

If aChunk MaxLength is less than iChunkMaxLength.

Other

Standard system-wide error codes.


PreviousChunkL(TDes16 &,TRequestStatus &)

IMPORT_C void PreviousChunkL(TDes16 &aChunk, TRequestStatus &aStatus);

Description

Retrieve the previous chunk of the plain body text asynchronously.DoRunl converts the chunk to unicode.

Parameters

TDes16 &aChunk

The output parameter containing the requested chunk on completion.

TRequestStatus &aStatus

The TRequestStatus for this request.

Leave codes

KErrNotSupported

If CMsvStore was opened in Write mode.

KErrUnderflow

If aChunk MaxLength is less than iChunkMaxLength.

Other

Standard system-wide error codes.


PreviousChunkL(TDes16 &)

IMPORT_C void PreviousChunkL(TDes16 &aChunk);

Description

Retrieve the Previouschunk of the plain body text. If body is stored as 8bit, convert the chunk to Unicode.

Parameters

TDes16 &aChunk

The output parameter contains the requested chunk.

Leave codes

KErrNotSupported

If CMsvStore was opened in Write mode.

KErrUnderflow

If aChunk MaxLength is less than iChunkMaxLength.

Other

Standard system-wide error codes.


SetCharacterSetL(const TUint)

IMPORT_C void SetCharacterSetL(const TUint aCharset);

Description

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

const TUint aCharset

The new charset with which it needs to be converted.


CharacterSet()

IMPORT_C TUint CharacterSet();

Description

Returns the charset for the plain text part

Return value

TUint

TUint


DefaultCharacterSet()

IMPORT_C TUint DefaultCharacterSet();

Description

Returns the default charset for the plain text part

Return value

TUint

TUint


Size()

IMPORT_C TInt Size();

Description

Returns the size of body text in bytes.

Return value

TInt

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


DoRunL()

private: virtual void DoRunL();

Description

Asynchronously retrives the body text chunks.If body is stored as 8bit, converts the chunk to Unicode.


DoCancel()

private: virtual void DoCancel();

Description

Cancel the file read operation and set the filepointer to the current position of the file so that next call to CMsvPlainBodyText::NextChunkL(TDes8 &,TRequestStatus &) will attempt to read the same chunk that was cancelled