Location:
S32FILE.H
Link against: estor.lib
class CPermanentFileStore : public CFileStore;
Permanent file store.
This type of store supports full manipulation of store contents. Existing streams within this type of store can be changed.
CBase
- Base class for all classes to be instantiated on the heap
CStreamStore
- Provides the core abstract framework for stores allowing streams to be created and manipulated
CPersistentStore
- Persistent store abstract base class
CFileStore
- File based persistent store abstract base class
CPermanentFileStore
- Permanent file store
Defined in CPermanentFileStore
:
CPermanentFileStore()
, CPermanentFileStore()
, CreateL()
, CreateLC()
, DoCommitL()
, DoCompactL()
, DoCreateL()
, DoDeleteL()
, DoExtendL()
, DoReadL()
, DoReclaimL()
, DoReplaceL()
, DoRevertL()
, DoSetRootL()
, DoWriteL()
, ExternalizeL()
, FromL()
, FromLC()
, InternalizeL()
, Layout()
, MarshalL()
, NewL()
, NewLC()
, OpenL()
, OpenLC()
, ReplaceL()
, ReplaceLC()
, TempL()
, TempLC()
, ~CPermanentFileStore()
Inherited from CBase
:
Extension_()
,
operator new()
Inherited from CFileStore
:
ChangedL()
,
Destruct()
,
Detach()
,
File()
,
Host()
,
IsHost()
,
Reattach()
,
RefreshL()
,
Reset()
,
SetSizeL()
,
SetTypeL()
,
SynchL()
,
TNewFunction
,
Type()
Inherited from CPersistentStore
:
Root()
,
SetRootL()
,
iRoot
Inherited from CStreamStore
:
Commit()
,
CommitL()
,
CompactL()
,
Delete()
,
DeleteL()
,
ExtendL()
,
ReclaimL()
,
Revert()
,
RevertL()
static inline CPermanentFileStore *NewL(RFile &aFile);
Constructs a new permanent file store object in an already opened file.
The file must already be open before calling this function. The existing content of the file is discarded.
Note that ownership of the file passes to the store. The referenced RFile
is cleared and is no longer valid.
|
|
static inline CPermanentFileStore *NewLC(RFile &aFile);
Constructs a new permanent file store object in an already opened file and places the pointer onto the cleanup stack.
The file must already be open before calling this function.The existing content of the file is discarded.
Note that ownership of the file passes to the store. The referenced RFile
is cleared and is no longer valid.
|
|
IMPORT_C CPermanentFileStore(RFileBuf &aBuf, const TUidType &aType);
|
IMPORT_C ~CPermanentFileStore();
Frees resources owned by the object, prior to its destruction.
static inline CPermanentFileStore *OpenL(RFs &aFs, const TDesC &aName, TUint aFileMode);
Opens a file containing a permanent file store, and constructs a permanent file store object.
|
|
static inline CPermanentFileStore *OpenLC(RFs &aFs, const TDesC &aName, TUint aFileMode);
Opens a file containing a permanent file store, constructs a permanent file store object, and places the pointer onto the cleanup stack.
|
|
static inline CPermanentFileStore *CreateL(RFs &aFs, const TDesC &aName, TUint aFileMode);
Creates a new file and constructs a new permanent file store object to be associated with this file.
|
|
static inline CPermanentFileStore *CreateLC(RFs &aFs, const TDesC &aName, TUint aFileMode);
Creates a new file and constructs a new permanent file store object to be associated with this file, and places the pointer onto the cleanup stack.
|
|
static inline CPermanentFileStore *ReplaceL(RFs &aFs, const TDesC &aName, TUint aFileMode);
Creates a file, constructs a permanent file store object to be associated with it.
This file replaces any existing file of the same name.
|
|
static inline CPermanentFileStore *ReplaceLC(RFs &aFs, const TDesC &aName, TUint aFileMode);
Creates a file, constructs a permanent file store object to be associated with it, and places the pointer onto the cleanup stack.
This file replaces any existing file of the same name.
|
|
static inline CPermanentFileStore *TempL(RFs &aFs, const TDesC &aPath, TFileName &aName, TUint aFileMode);
Creates a temporary file and constructs a permanent file store object to be associated with it.
The new file is created in the specified path and a unique file name is generated by the file server.
Note that the store framework does not delete a temporary file after it is closed.
|
|
static inline CPermanentFileStore *TempLC(RFs &aFs, const TDesC &aPath, TFileName &aName, TUint aFileMode);
Creates a temporary file, constructs a permanent file store object to be associated with it, and places the pointer onto the cleanup stack.
The new file is created in the specified path and a unique file name is generated by the file server.
Note that the store framework does not delete a temporary file after it is closed.
|
|
static inline CPermanentFileStore *FromL(RFile &aFile);
Constructs a permanent file store object from an already opened file.
The file must already be open before calling this function.
Note that ownership of the file passes to the store. The referenced RFile
is cleared and is no longer valid.
|
|
static inline CPermanentFileStore *FromLC(RFile &aFile);
Constructs a permanent file store object from an already opened file, and places the pointer onto the cleanup stack.
The file must already be open before calling this function.
Note that ownership of the file passes to the store. The referenced RFile
is cleared and is no longer valid.
|
|
virtual IMPORT_C TUid Layout() const;
Gets the UID that uniquely identifies this file store as a permanent file store.
|
protected: virtual IMPORT_C MStreamBuf *DoReadL(TStreamId anId) const;
Opens the requested stream for reading. The function should return a stream buffer positioned at the beginning of this stream.
This function is called by the OpenL()
and OpenLC()
member functions of RStoreReadStream
.
|
|
protected: virtual IMPORT_C MStreamBuf *DoCreateL(TStreamId &anId);
Creates a new stream in the store. The function gets the allocated stream id in the anId parameter. A stream buffer for the
stream should be returned, ready to write into the new stream. This provides the implementation for the RStoreWriteStream::CreateL()
functions.
|
|
protected: virtual IMPORT_C MStreamBuf *DoWriteL(TStreamId anId);
|
|
protected: virtual IMPORT_C MStreamBuf *DoReplaceL(TStreamId anId);
|
|
private: virtual IMPORT_C void ExternalizeL(RWriteStream &aStream) const;
|
private: virtual IMPORT_C void InternalizeL(RReadStream &aStream);
|
private: virtual IMPORT_C void DoSetRootL(TStreamId anId);
Implements the setting of theroot stream.
This function is called by SetRootL()
|
private: virtual IMPORT_C TStreamId DoExtendL();
Generates a new stream within this store, and returns its id. This function is intended to create a new stream in advance of being written to.
This is called by ExtendL()
.
|
private: virtual IMPORT_C void DoCommitL();
Commits any changes to the store. For a store that provides atomic updates, this writes all of the pending updates to the to the permanent storage medium. After committing the store contains all or none of the updates since the last commit/revert.
This function provides the implementation for the public CommitL()
function.
private: virtual IMPORT_C void DoRevertL();
Discards any pending changes to the store. This includes all changes which have not been committed to a permanent storage medium.
This function provides the implementation for the public Revert()
function.
Note:
The function need only be implemented by stores that provide atomic updates, as revert has no meaning for other implementations.
private: virtual IMPORT_C MIncrementalCollector *DoReclaimL();
Initialises an object for reclaiming space in the store. This function provides the direct implementation for RStoreReclaim::OpenL()
.
Note:
Actually reclaiming the space is done by repeated calls to MIncrementalCollector::Next(), before releasing the object.
|
private: virtual IMPORT_C MIncrementalCollector *DoCompactL();
Initialises an object for compacting space in the store. This function provides the direct implementation for RStoreReclaim::CompactL()
.
Note:
Actually compacting the space is done by repeated calls to MIncrementalCollector::Next() before releasing the object.
|