CMsvStore Class Reference

class CMsvStore : public CBase

Provides an interface over the message store that is associated with a message entry. It is similar to the dictionary store in supporting the concept of streams referenced by UID.

This class is intended for use by MTM implementations. Message client applications access the store through the higher-level functions provided by Client-side and User Interface MTMs.

A CMsvStore object is created by a CMsvEntry object and passed to a client process. The client process then becomes responsible for deleting the CMsvStore object. The store can be opened in two modes, read or edit, and only one CMsvStore object can have edit access to a store.

CMsvStore provides functions for general manipulation of the store, and for accessing the standard body text stream. RMsvReadStream and RMsvWriteStream must be used to access other streams.

Inherits from

Public Member Functions
~CMsvStore()
IMPORT_C MMsvAttachmentManagerSync &AttachmentManagerExtensionsL()
IMPORT_C MMsvAttachmentManager &AttachmentManagerL()
IMPORT_C TIntCommit()
IMPORT_C voidCommitL()
IMPORT_C voidCreateShareProtectedAttachmentL(const TDesC &, RFile &, CMsvAttachment *)
IMPORT_C voidDeleteBodyTextL()
IMPORT_C voidDeleteL()
IMPORT_C TBoolHasBodyTextL()
IMPORT_C CMsvPlainBodyText *InitialisePlainBodyTextForReadL(TInt)
IMPORT_C CMsvPlainBodyText *InitialisePlainBodyTextForWriteL(TBool, TUint, TUint)
IMPORT_C TBoolIsNullL()
IMPORT_C TBoolIsPresentL(TUid)
IMPORT_C voidRemove(TUid)
IMPORT_C voidRemoveL(TUid)
voidRestore8BitBodyTextL(RFileReadStream &)
IMPORT_C voidRestoreBodyTextL(CRichText &)
IMPORT_C voidRestoreBodyTextL(CRichText &, TUint)
IMPORT_C voidRevert()
IMPORT_C voidRevertL()
IMPORT_C TIntSizeL()
IMPORT_C voidStoreBodyTextL(const CRichText &)
Protected Member Functions
CMsvStore(MMsvStoreObserver &, RFs &, TMsvId, MMsvStoreManager &)
IMPORT_C CMsvStore *OpenForReadL(MMsvStoreObserver &, RFs &, MMsvStoreManager &, TMsvId)
IMPORT_C CMsvStore *OpenForWriteL(MMsvStoreObserver &, RFs &, MMsvStoreManager &, TMsvId)
Private Member Functions
voidConstructL(TBool)
voidConvert8BitToRichTextL(RFile &, CRichText &, TUint, TUint)
voidGetRichTextFrom16BitL(RFile &, CRichText &)
voidGetRichTextFrom8BitL(RFile &, CRichText &, TUint, TUint)
voidLock()
voidRestorePlainBodyTextL(CRichText &, TUint)
const CMsvCachedStore &Store()
CMsvCachedStore &Store()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
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()
Private Attributes
CMsvAttachmentManager *iAttachmentManager
CMsvBodyText *iBodyText
TBool iConstructed
RFs &iFs
const TMsvIdiId
enum CMsvStore::@52iLockStatus
MMsvStoreObserver &iObserver
CMsvCachedStore *iStore
MMsvStoreManager &iStoreManager

Constructor & Destructor Documentation

CMsvStore(MMsvStoreObserver &, RFs &, TMsvId, MMsvStoreManager &)

IMPORT_CCMsvStore(MMsvStoreObserver &aObserver,
RFs &aFs,
TMsvIdaId,
MMsvStoreManager &aStoreManager
)[protected]

Parameters

MMsvStoreObserver & aObserver
RFs & aFs
TMsvId aId
MMsvStoreManager & aStoreManager

~CMsvStore()

IMPORT_C~CMsvStore()

Member Functions Documentation

AttachmentManagerExtensionsL()

IMPORT_C MMsvAttachmentManagerSync &AttachmentManagerExtensionsL()

AttachmentManagerL()

IMPORT_C MMsvAttachmentManager &AttachmentManagerL()

Commit()

IMPORT_C TIntCommit()

CommitL()

IMPORT_C voidCommitL()

ConstructL(TBool)

voidConstructL(TBoolaReadOnly)[private]

Parameters

TBool aReadOnly

Convert8BitToRichTextL(RFile &, CRichText &, TUint, TUint)

voidConvert8BitToRichTextL(RFile &aBodyTextFile,
CRichText &aRichText,
TUintaCharSet,
TUintaDefaultCharSet
)[private]

Parameters

RFile & aBodyTextFile
CRichText & aRichText
TUint aCharSet
TUint aDefaultCharSet

CreateShareProtectedAttachmentL(const TDesC &, RFile &, CMsvAttachment *)

IMPORT_C voidCreateShareProtectedAttachmentL(const TDesC &aFileName,
RFile &aAttachmentFile,
CMsvAttachment *aAttachmentInfo
)

Parameters

const TDesC & aFileName
RFile & aAttachmentFile
CMsvAttachment * aAttachmentInfo

DeleteBodyTextL()

IMPORT_C voidDeleteBodyTextL()

DeleteL()

IMPORT_C voidDeleteL()

GetRichTextFrom16BitL(RFile &, CRichText &)

voidGetRichTextFrom16BitL(RFile &aBodyTextFile,
CRichText &aRichText
)[private]

Parameters

RFile & aBodyTextFile
CRichText & aRichText

GetRichTextFrom8BitL(RFile &, CRichText &, TUint, TUint)

voidGetRichTextFrom8BitL(RFile &aBodyTextFile,
CRichText &aRichText,
TUintaCharSet,
TUintaDefaultCharSet
)[private]

Parameters

RFile & aBodyTextFile
CRichText & aRichText
TUint aCharSet
TUint aDefaultCharSet

HasBodyTextL()

IMPORT_C TBoolHasBodyTextL()const

InitialisePlainBodyTextForReadL(TInt)

IMPORT_C CMsvPlainBodyText *InitialisePlainBodyTextForReadL(TIntaChunkLength)

Parameters

TInt aChunkLength

InitialisePlainBodyTextForWriteL(TBool, TUint, TUint)

IMPORT_C CMsvPlainBodyText *InitialisePlainBodyTextForWriteL(TBoolaIs8Bit,
TUintaCharsetId,
TUintaDefaultCharsetId
)

Parameters

TBool aIs8Bit
TUint aCharsetId
TUint aDefaultCharsetId

IsNullL()

IMPORT_C TBoolIsNullL()const

IsPresentL(TUid)

IMPORT_C TBoolIsPresentL(TUidaUid)const

Parameters

TUid aUid

Lock()

voidLock()[private]

OpenForReadL(MMsvStoreObserver &, RFs &, MMsvStoreManager &, TMsvId)

IMPORT_C CMsvStore *OpenForReadL(MMsvStoreObserver &aObserver,
RFs &aFs,
MMsvStoreManager &aStoreManager,
TMsvIdaId
)[protected, static]

Parameters

MMsvStoreObserver & aObserver
RFs & aFs
MMsvStoreManager & aStoreManager
TMsvId aId

OpenForWriteL(MMsvStoreObserver &, RFs &, MMsvStoreManager &, TMsvId)

IMPORT_C CMsvStore *OpenForWriteL(MMsvStoreObserver &aObserver,
RFs &aFs,
MMsvStoreManager &aStoreManager,
TMsvIdaId
)[protected, static]

Parameters

MMsvStoreObserver & aObserver
RFs & aFs
MMsvStoreManager & aStoreManager
TMsvId aId

Remove(TUid)

IMPORT_C voidRemove(TUidaUid)

Parameters

TUid aUid

RemoveL(TUid)

IMPORT_C voidRemoveL(TUidaUid)

Parameters

TUid aUid

Restore8BitBodyTextL(RFileReadStream &)

voidRestore8BitBodyTextL(RFileReadStream &aInputStream)

Parameters

RFileReadStream & aInputStream

RestoreBodyTextL(CRichText &)

IMPORT_C voidRestoreBodyTextL(CRichText &aRichTextBody)

Parameters

CRichText & aRichTextBody

RestoreBodyTextL(CRichText &, TUint)

IMPORT_C voidRestoreBodyTextL(CRichText &aRichTextBody,
TUintaCharsetOverride
)

Parameters

CRichText & aRichTextBody
TUint aCharsetOverride

RestorePlainBodyTextL(CRichText &, TUint)

voidRestorePlainBodyTextL(CRichText &aRichText,
TUintaCharsetOverride
)[private]

Parameters

CRichText & aRichText
TUint aCharsetOverride

Revert()

IMPORT_C voidRevert()

RevertL()

IMPORT_C voidRevertL()

SizeL()

IMPORT_C TIntSizeL()

Store()

const CMsvCachedStore &Store()const [private, inline]

Store()

CMsvCachedStore &Store()[private, inline]

StoreBodyTextL(const CRichText &)

IMPORT_C voidStoreBodyTextL(const CRichText &aRichTextBody)

Parameters

const CRichText & aRichTextBody

Member Data Documentation

CMsvAttachmentManager * iAttachmentManager

CMsvAttachmentManager *iAttachmentManager[private]

CMsvBodyText * iBodyText

CMsvBodyText *iBodyText[private]

TBool iConstructed

TBool iConstructed[private]

RFs & iFs

RFs &iFs[private]

const TMsvId iId

const TMsvIdiId[private]

enum CMsvStore::@52 iLockStatus

enum CMsvStore::@52iLockStatus[private]

MMsvStoreObserver & iObserver

MMsvStoreObserver &iObserver[private]

CMsvCachedStore * iStore

CMsvCachedStore *iStore[private]

MMsvStoreManager & iStoreManager

MMsvStoreManager &iStoreManager[private]