RFilePagePool Class Reference

class RFilePagePool : public TCachePagePool

Uses a file directly to implement the page pool interface MPagePool.

The pages are written sequentially through the file. You should call Close() to release the file resource after CreateL(), OpenL(), ReplaceL() or Temp().

A file page pool uses a cache to store pages in-memory and to cache frequently accessed pages. You should provide a cache object (CPageCache) to the pool for this purpose.

CPageCache RFile

Inherits from

Constructor & Destructor Documentation

RFilePagePool()

IMPORT_CRFilePagePool()

RFilePagePool(CPageCache &)

IMPORT_CRFilePagePool(CPageCache &aCache)

Parameters

CPageCache & aCache

Member Functions Documentation

Attach(RFile &)

voidAttach(RFile &aFile)[inline]

Sets an existing file to be used for the page pool.

Parameters

RFile & aFileFile to use for the page pool

Close()

IMPORT_C voidClose()

Create(RFs &, const TDesC &, TUint)

TInt Create(RFs &aFs,
const TDesC &aName,
TUintaFileMode
)[inline]

Creates a new file for the page pool.

TFileMode

Parameters

RFs & aFsA file server session
const TDesC & aNameThe name of the file. Any path components which are not specified here are taken from the session path.
TUint aFileModeThe mode in which the file is opened. For more information see the TFileMode enumeration.

Detach()

voidDetach()[inline]

Ends the use of the file for the page pool, but does not close the file.

ExtendL(const TAny *, TPageReclamation)

IMPORT_C TPageRefExtendL(const TAny *aPage,
TPageReclamationaReclamation
)[protected, virtual]

Parameters

const TAny * aPage
TPageReclamation aReclamation

File()

RFile &File()const [inline]

Flush()

IMPORT_C TIntFlush()

FlushL()

IMPORT_C voidFlushL()

Open(RFs &, const TDesC &, TUint)

TInt Open(RFs &aFs,
const TDesC &aName,
TUintaFileMode
)[inline]

Opens a file to use for the page pool.

TFileMode

Parameters

RFs & aFsA file server session
const TDesC & aNameThe name of the file
TUint aFileModeThe mode in which the file is opened. For more information, see the TFileMode enumeration.

ReadL(TPageRef, TAny *)

IMPORT_C voidReadL(TPageRefaRef,
TAny *aPage
)[protected, virtual]

Parameters

TPageRef aRef
TAny * aPage

Release()

IMPORT_C voidRelease()

Replace(RFs &, const TDesC &, TUint)

TInt Replace(RFs &aFs,
const TDesC &aName,
TUintaFileMode
)[inline]

Creates or opens a file for the page pool.

If there is an existing file with the same name, this function overwrites it. If the file does not already exist, it is created.

TFileMode

Parameters

RFs & aFsA file server session.
const TDesC & aNameThe name of the file. Any path components which are not specified here are taken from the session path.
TUint aFileModeThe mode in which the file is opened. For more information see the TFileMode enumeration.

Temp(RFs &, const TDesC &, TFileName &, TUint)

TInt Temp(RFs &aFs,
const TDesC &aPath,
TFileName &aName,
TUintaFileMode
)[inline]

Creates and opens a file for the page pool with a unique name.

Parameters

RFs & aFsA file server session.
const TDesC & aPathThe directory in which the file should be created.
TFileName & aNameOn return, contains the full path and name of the file. The filename is guaranteed to be unique within the directory specified by aPath.
TUint aFileModeThe mode in which the file is opened. For more information see the TFileMode enumeration.

WriteL(TPageRef, const TAny *, TPageChange)

IMPORT_C voidWriteL(TPageRefaRef,
const TAny *aPage,
TPageChangeaChange
)[protected, virtual]

Parameters

TPageRef aRef
const TAny * aPage
TPageChange aChange

Member Data Documentation

__MUTABLE RFile iFile

__MUTABLE RFileiFile[private]