#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 : 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
CMsgActive
- No description.
CMsvPlainBodyText
- This class encapsulates plainbody text information for storage within the Messag...
Members
Defined in CMsvPlainBodyText
:
CharacterSet()
Returns the charset for the plain text part
CommitL()
Commit the file and the store after it is written and and also closes the file.
DefaultCharacterSet()
Returns the default charset for the plain text part
DoCancel()
Cancel the file read operation and set the filepointer to the current position o...
DoRunL()
Asynchronously retrives the body text chunks.If body is stored as 8bit, converts...
NextChunkL(TDes16 &)
Retrieve the next chunk of the plain body text. If body is stored as 8bit, conve...
NextChunkL(TDes16 &,TRequestStatus &)
Retrieve the next chunk of the plain body text. If body is stored as 8bit, the c...
NextChunkL(TDes8 &)
Retrieve the next chunk of the plain body text.
NextChunkL(TDes8 &,TRequestStatus &)
Retrieve the next chunk of the plain body text.
PreviousChunkL(TDes16 &)
Retrieve the Previouschunk of the plain body text. If body is stored as 8bit, co...
PreviousChunkL(TDes16 &,TRequestStatus &)
Retrieve the previous chunk of the plain body text asynchronously.DoRunl convert...
PreviousChunkL(TDes8 &)
Retrieve the previous chunk of the plain body text.
PreviousChunkL(TDes8 &,TRequestStatus &)
Retrieve the previous chunk of the plain body text asynchronously.
SetCharacterSetL(const TUint)
Set iCharsetId to aCharset if body text of the message was downloaded as 8 bit. ...
Size()
Returns the size of body text in bytes.
StoreChunkL(const TDesC16 &)
Store the body part in chunks(16 bit synchronous version).
StoreChunkL(const TDesC16 &,TRequestStatus &)
Store the body part in chunks(16 bit version).
StoreChunkL(const TDesC8 &)
Store the plain body text part in chunks,synchronous version.
StoreChunkL(const TDesC8 &,TRequestStatus &)
Store the plain body text part in chunks.
StoreRichTextAsPlainTextL(CRichText &)
Converts and stores the CRichText contents to a plain text.
~CMsvPlainBodyText()
Destructor
Construction and destruction
IMPORT_C ~CMsvPlainBodyText();
Description
Destructor
StoreChunkL(const TDesC8 &,TRequestStatus &)
IMPORT_C void StoreChunkL(const TDesC8 &aChunk, TRequestStatus &aStatus);
Description
Store the plain body text part in chunks.
Parameters
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
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
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.
|
|
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
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.
|
|
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.
|
|
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
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.
|
|
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
Leave codes
KErrNotSupported |
If CMsvStore was opened in Write mode.
|
KErrUnderflow |
If aChunk MaxLength is less than iChunkMaxLength.
|
Other |
Standard system-wide error codes.
|
|
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.
|
|
IMPORT_C TUint CharacterSet();
Description
Returns the charset for the plain text part
Return value
IMPORT_C TUint DefaultCharacterSet();
Description
Returns the default charset for the plain text part
Return value
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.
|
|
private: virtual void DoRunL();
Description
Asynchronously retrives the body text chunks.If body is stored as 8bit, converts the chunk to Unicode.
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