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_C RFilePagePool ( )

RFilePagePool(CPageCache &)

IMPORT_C RFilePagePool ( CPageCache & aCache )

Parameters

CPageCache & aCache

Member Functions Documentation

Attach(RFile &)

void Attach ( RFile & aFile ) [inline]

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

Parameters

RFile & aFile File to use for the page pool

Close()

IMPORT_C void Close ( )

Create(RFs &, const TDesC &, TUint)

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

Creates a new file for the page pool.

TFileMode

Parameters

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

Detach()

void Detach ( ) [inline]

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

ExtendL(const TAny *, TPageReclamation)

IMPORT_C TPageRef ExtendL ( const TAny * aPage,
TPageReclamation aReclamation
) [protected, virtual]

Parameters

const TAny * aPage
TPageReclamation aReclamation

File()

RFile & File ( ) const [inline]

Flush()

IMPORT_C TInt Flush ( )

FlushL()

IMPORT_C void FlushL ( )

Open(RFs &, const TDesC &, TUint)

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

Opens a file to use for the page pool.

TFileMode

Parameters

RFs & aFs A file server session
const TDesC & aName The name of the file
TUint aFileMode The mode in which the file is opened. For more information, see the TFileMode enumeration.

ReadL(TPageRef, TAny *)

IMPORT_C void ReadL ( TPageRef aRef,
TAny * aPage
) [protected, virtual]

Parameters

TPageRef aRef
TAny * aPage

Release()

IMPORT_C void Release ( )

Replace(RFs &, const TDesC &, TUint)

TInt Replace ( RFs & aFs,
const TDesC & aName,
TUint aFileMode
) [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 & aFs A file server session.
const TDesC & aName The name of the file. Any path components which are not specified here are taken from the session path.
TUint aFileMode The 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,
TUint aFileMode
) [inline]

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

Parameters

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

WriteL(TPageRef, const TAny *, TPageChange)

IMPORT_C void WriteL ( TPageRef aRef,
const TAny * aPage,
TPageChange aChange
) [protected, virtual]

Parameters

TPageRef aRef
const TAny * aPage
TPageChange aChange

Member Data Documentation

__MUTABLE RFile iFile

__MUTABLE RFile iFile [private]