class CMsvPlainBodyText : public CMsgActive |
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.
Public Member Functions | |
---|---|
~CMsvPlainBodyText() | |
IMPORT_C TUint | CharacterSet() |
IMPORT_C void | CommitL() |
IMPORT_C TUint | DefaultCharacterSet() |
CMsvPlainBodyText * | NewL(MMsvStoreManager &, CMsvStore &, TBool, TUint, TUint, TMsvId, RFs &) |
CMsvPlainBodyText * | NewL(MMsvStoreManager &, CMsvStore &, TMsvId, RFs &, TInt) |
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 | SetCharacterSetL(const TUint) |
IMPORT_C TInt | Size() |
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 | |
---|---|
CMsvPlainBodyText(MMsvStoreManager &, CMsvStore &, TBool, TUint, TUint, TMsvId, RFs &) | |
CMsvPlainBodyText(MMsvStoreManager &, CMsvStore &, TMsvId, RFs &, TInt) | |
void | ConstructReadL() |
void | ConstructWriteL() |
TInt | ConvertChunkToUnicodeForRestoreL() |
void | ConvertChunkToUnicodeForStoreL(const TDesC8 &) |
void | DoCancel() |
void | DoComplete() |
void | DoRunL() |
void | ExtractNextChunkFromRichText(TDes16 &) |
void | ExtractPreviousChunkFromRichText(TDes16 &) |
void | PrepareToConvertL() |
void | RevertL() |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Inherited Attributes | |
---|---|
CActive::iStatus |
CMsvPlainBodyText | ( | MMsvStoreManager & | aMsvStoreManager, |
CMsvStore & | aStore, | ||
TBool | aIs8Bit, | ||
TUint | aCharsetId, | ||
TUint | aDefaultCharsetId, | ||
TMsvId | aMessageId, | ||
RFs & | aFs | ||
) | [private] |
Default Constructor for write operation.
CMsvPlainBodyText | ( | MMsvStoreManager & | aMsvStoreManager, |
CMsvStore & | aStore, | ||
TMsvId | aMessageId, | ||
RFs & | aFs, | ||
TInt | aChunkLength | ||
) | [private] |
Default Constructor called for Read operation..
MMsvStoreManager & aMsvStoreManager | |
CMsvStore & aStore | |
TMsvId aMessageId | |
RFs & aFs | |
TInt aChunkLength |
IMPORT_C void | CommitL | ( | ) |
Commit the file and the store after it is written and and also closes the file.
void | ConstructWriteL | ( | ) | [private] |
ConstructWriteL for creating and writing to the plain bodytext file.
TInt | ConvertChunkToUnicodeForRestoreL | ( | ) | [private] |
Converts the 8 bit chunk to unicode.When this is called iRfileReadBuf8 will have the 8-bit data that needs to be converted to unicode.8 bit data that is not converted is copied to iRemainingUnConvertedData, which is used in conversion when this is called again. TInt Number of bytes in Current Chunk.
void | ConvertChunkToUnicodeForStoreL | ( | const TDesC8 & | aChunk | ) | [private] |
Converts the 8 bit chunk to Unicode. void.
const TDesC8 & aChunk | The 8bit chunk to be converted. |
IMPORT_C TUint | DefaultCharacterSet | ( | ) |
Returns the default charset for the plain text part TUint
void | DoCancel | ( | ) | [private, virtual] |
Cancel the file read operation and set the filepointer to the current position of the file so that next call to NextChunkL() will attempt to read the same chunk that was cancelled void.
void | DoRunL | ( | ) | [private, virtual] |
Asynchronously retrives the body text chunks.If body is stored as 8bit, converts the chunk to Unicode.
void | ExtractNextChunkFromRichText | ( | TDes16 & | aChunk | ) | [private] |
Extracts a chunk of iChunkMaxLength or less, from the CRichText object.
TDes16 & aChunk |
void | ExtractPreviousChunkFromRichText | ( | TDes16 & | aChunk | ) | [private] |
Extracts a chunk of iChunkMaxLength or less, from the CRichText object.
TDes16 & aChunk |
CMsvPlainBodyText * | NewL | ( | MMsvStoreManager & | aMsvStoreManager, |
CMsvStore & | aStore, | |||
TBool | aIs8Bit, | |||
TUint | aCharsetId, | |||
TUint | aDefaultCharsetId, | |||
TMsvId | aMessageId, | |||
RFs & | aFs | |||
) | [static] |
The NewL factory function for Write operation. CMsvPlainBodyText.
MMsvStoreManager & aMsvStoreManager | The MMsvStoreManager reference to call Store related RFile APIs |
CMsvStore & aStore | The CMsvStore object. |
TBool aIs8Bit | TBool indicating whether to store bdy text as 8/16 bit. |
TUint aCharsetId | The charset of the body part. |
TUint aDefaultCharsetId | The default charset of the system. |
TMsvId aMessageId | The Id of the message that is to be stored. |
RFs & aFs | The RFs for handling RFile related operations. |
CMsvPlainBodyText * | NewL | ( | MMsvStoreManager & | aMsvStoreManager, |
CMsvStore & | aStore, | |||
TMsvId | aMessageId, | |||
RFs & | aFs, | |||
TInt | aChunkLength | |||
) | [static] |
Overloaded NewL for Read operation. CMsvPlainBodyText.
MMsvStoreManager & aMsvStoreManager | The MMsvStoreManager reference to call Store related RFile APIs |
CMsvStore & aStore | The CMsvStore object. |
TMsvId aMessageId | The Id of the message that is to be stored. |
RFs & aFs | The RFs for handling RFile related operations. |
TInt aChunkLength | The length of the chunk that will be stored/restored in single operaion |
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.
void
TDes8 & aChunk | The output parameter contains the requested chunk. |
TRequestStatus & aStatus |
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.
void
TDes8 & aChunk | The output parameter contains the requested chunk. |
IMPORT_C void | NextChunkL | ( | 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. leave
KErrAccessDenied If CMsvStore was opened in Write mode.
leave
KErrUnderflow If aChunk MaxLength is less than iChunkMaxLength.
leave
Other Standard system-wide error codes.
void
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. |
IMPORT_C void | NextChunkL | ( | 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. leave
KErrAccessDenied If CMsvStore was opened in Write mode.
leave
KErrUnderflow If aChunk MaxLength is less than iChunkMaxLength.
leave
Other Standard system-wide error codes.
void
TDes16 & aChunk | The output parameter contains the requested chunk.If no more data is in Store this contains NULL descriptor. |
void | PrepareToConvertL | ( | ) | [private] |
Creates the character converter and specifies the character set to convert to or from. Leaves if the specified or default character set is not available. void.
IMPORT_C void | PreviousChunkL | ( | TDes8 & | aChunk, |
TRequestStatus & | aStatus | |||
) |
Retrieve the previous chunk of the plain body text asynchronously. leave
KErrNotSupported If 16-bit storage is enabled.
leave
KErrAccessDenied If CMsvStore was opened in Write mode.
leave
KErrUnderflow If aChunk MaxLength is less than iChunkMaxLength.
leave
Other Standard system-wide error codes.
void
TDes8 & aChunk | The output parameter containing the requested chunk on completion. |
TRequestStatus & aStatus | The TRequestStatus for this request. |
IMPORT_C void | PreviousChunkL | ( | TDes8 & | aChunk | ) |
Retrieve the previous chunk of the plain body text. leave
KErrNotSupported If 16-bit storage is enabled.
leave
KErrAccessDenied If CMsvStore was opened in Write mode.
leave
KErrUnderflow If aChunk MaxLength is less than iChunkMaxLength.
leave
Other Standard system-wide error codes.
void
TDes8 & aChunk | The output parameter containing the requested chunk. |
IMPORT_C void | PreviousChunkL | ( | TDes16 & | aChunk, |
TRequestStatus & | aStatus | |||
) |
Retrieve the previous chunk of the plain body text asynchronously.DoRunl converts the chunk to unicode. 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.
void
TDes16 & aChunk | The output parameter containing the requested chunk on completion. |
TRequestStatus & aStatus | The TRequestStatus for this request. |
IMPORT_C void | PreviousChunkL | ( | TDes16 & | aChunk | ) |
Retrieve the Previouschunk of the plain body text. If body is stored as 8bit, convert the chunk to Unicode. 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.
void
TDes16 & aChunk | The output parameter contains the requested chunk. |
IMPORT_C void | SetCharacterSetL | ( | const TUint | aCharset | ) |
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. void.
const TUint aCharset | The new charset with which it needs to be converted. |
IMPORT_C TInt | Size | ( | ) |
Returns the size of body text in bytes. TInt The size of the plain body text stored in bytes.
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.
void.
const TDesC8 & aChunk | |
TRequestStatus & aStatus |
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.
void.
const TDesC8 & aChunk |
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.
void
const TDesC16 & aChunk | The 16 bit chunk that is to be stored. |
TRequestStatus & aStatus | The TRequestStatus parameter for this request. |
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.
void
const TDesC16 & aChunk | The 16 bit chunk that is to be stored. |
IMPORT_C void | StoreRichTextAsPlainTextL | ( | CRichText & | aRichText | ) |
CRichText & aRichText | The CRichText object that will be stored as plain body text. |
CCnvCharacterSetConverter::TAvailability | iAvailable | [private] |
TDes16 * | iChunk16 | [private] |
Pointer to a 16 bit chunk that is being read from the store.
TInt | iChunkMaxLength | [private] |
Contains the size of the chunk that will be read or write in the RFile
CCnvCharacterSetConverter * | iConverter | [private] |
Character converter for 8 to 16 bit conversion.
enum CMsvPlainBodyText::@70 | iMsvFileStatus | [private] |
Enum indicating if RFile is being written or read
MMsvStoreManager & | iMsvStoreManager | [private] |
To access APIs related to RFile operations.
TBool | iPrevChunk | [private] |
Indicates whether call to DoRunl was initiated by PreviousChunkL method.
RBuf16 | iRemainingConvertedData | [private] |
Contains the remaining converted Unicode Data
HBufC8 * | iRemainingUnConvertedData | [private] |
Contains the remaining unconverted Unicode Data
TBool | iRetrieving8bit | [private] |
Indicates whether call to DoRunl was initiated by 8 bit PreviousChunkL and NextChunkL methods.
TPtrC8 | iRfileWritePtr8 | [private] |
Pointer to 8-bit buffer that needs to be written to RFile.
RArray< TInt > | iStartPosOfEachChunkInFile | [private] |
Array that stores the start positions of each chunk,in Rfile
TInt | iStartPosOfNextChunk | [private] |
Contains the start position of the next chunk
RBuf16 | iTempChunk16 | [private] |
Temporary buffer created to Store chunk while it is being written aynchronously.