CMsvCachedStore Class Reference
class CMsvCachedStore : public CBase
|
The
CMsvCachedStore
class
Implementes a set of uid/HBufC8 pairs, and persists them to a file Replaces a Dictionary Store in the message server. The difference being that this class keeps all the pairs in memory.
Constructor & Destructor Documentation
CMsvCachedStore(TMsvId, MMsvStoreManager &)
Member Functions Documentation
CleanArray()
void
|
CleanArray
|
(
|
)
|
[private]
|
ConstructL(TBool)
void
|
ConstructL
|
(
|
TBool
|
aReadOnly
|
)
|
[private]
|
CreateOrReplaceStreamL(TUid, CBufBase &)
void
|
CreateOrReplaceStreamL
|
(
|
TUid
|
aUid,
|
|
CBufBase
&
|
aBuf
|
|
)
|
[private]
|
DeleteStream(TUid)
TInt
|
DeleteStream
|
(
|
TUid
|
aUid
|
)
|
[private]
|
Parameters
TUid
aUid
|
the stream id to delete
|
FindStream(TUid, TInt &)
The
CMsvCachedStore::FindStream
method
Finds the stream of id aUid, if it returns with KErrNone then pos is set to the position of the if it is not found pos is set to where is should be inserted
GetStreamL(TUid)
The CMsvCachedStore::GetStream method
If it returns with KErrNone it sets aData to point to the data in the store this id
IsPresentL(TUid)
Parameters
TUid
aUid
|
stream to check for
|
LoadL(RFile &)
void
|
LoadL
|
(
|
RFile
&
|
aFile
|
)
|
[private]
|
The
CMsvCachedStore::LoadL
method
loads the streams from a file
should this create the file if it is corupt???
-
leave
-
leaves if we can't find the file, if we run out of memory, if the file is corrupt
OpenL(TMsvId, MMsvStoreManager &, TBool)
Remove(TUid)
void
|
Remove
|
(
|
TUid
|
aUid
|
)
|
|
Parameters
TUid
aUid
|
Stream to remove
|
RemoveL(TUid)
void
|
RemoveL
|
(
|
TUid
|
aUid
|
)
|
|
Parameters
TUid
aUid
|
Stream to remove
|
SaveL()
The
CMsvCachedStore::SaveL
method
Saves the current state to iFileName
-
leave
-
leaves if we can't replace the file, if we run out of disk space,
WriteToFileStreamL(RFileWriteStream &)
Member Data Documentation
const TMsvId iEntryId
const
TMsvId
|
iEntryId
|
[private]
|
TInt
iReaderCount
TInt
|
iReaderCount
|
[private]
|
MMsvStoreManager & iStoreManager
CArrayFix< TPairedTUidHBufC8 > * iStreams
TInt
iWriterCount
TInt
|
iWriterCount
|
[private]
|
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.