CFileCB::MExtendedFileInterface Class Reference

class CFileCB::MExtendedFileInterface
An interface class which may optionally be returned by a file system by calling GetInterface(EExtendedFileInterface, ...) The purpose of this interface is twofold:
  • to support fair scheduling (by use of the aOffset parameter)

  • to enable large file support

Public Member Functions
voidReadL(TInt64, TInt &, TDes8 *, const RMessagePtr2 &, TInt)
voidSetSizeL(TInt64)
voidWriteL(TInt64, TInt &, const TDesC8 *, const RMessagePtr2 &, TInt)

Member Functions Documentation

ReadL(TInt64, TInt &, TDes8 *, const RMessagePtr2 &, TInt)

voidReadL(TInt64aPos,
TInt &aLength,
TDes8 *aDes,
const RMessagePtr2 &aMessage,
TIntaOffset
)[pure virtual]

Functionally equivalent to CFileCB::ReadL(), but supports large files and fair scheduling

Reads a specified number of bytes from the open file starting at the specified postition, and writes the result into a descriptor.

CFileCB::ReadL RLocalMessage

Parameters

TInt64 aPosRepresents a position relative to the start of the file where ReadL() should start to read. Note that the filesystem may not support positions above KMaxTInt, in which case it leaves with KErrNotSupported.
TInt & aLengthOn entry, specifies the number of bytes to be read from the file. On return, this contains the number of bytes read, this value is not valid if the function leaves.
TDes8 * aDesPointer to a descriptor into which the data is written.
const RMessagePtr2 & aMessageA reference to a client message or an RLocalMessage.
TInt aOffsetThe offset into the descriptor where the data is to be written. This is non-zero if the read was fair-scheduled

SetSizeL(TInt64)

voidSetSizeL(TInt64aSize)[pure virtual]

Functionally equivalent to CFileCB::SetSizeL(), but supports large files

Extends or truncates the file by re-setting the file size.

The function does not change the iModified and iSize attributes of the file object: this is done by the file server. If the file is extended, nothing is written in the extended area.

The function leaves with a suitable error code when an error is to detected.

leave
KErrDiskFull The operation cannot be completed because the disk is full.
CFileCB::SetSizeL CFileCB::iModified CFileCB::iSize

Parameters

TInt64 aSizeThe new file size in bytes.

WriteL(TInt64, TInt &, const TDesC8 *, const RMessagePtr2 &, TInt)

voidWriteL(TInt64aPos,
TInt &aLength,
const TDesC8 *aDes,
const RMessagePtr2 &aMessage,
TIntaOffset
)[pure virtual]

Functionally equivalent to CFileCB::WriteL(), but supports large files and fair scheduling

Writes data to the open file.

CFileCB::WriteL RLocalMessage

Parameters

TInt64 aPosRepresents a position relative to the start of the file where WriteL() starts to write. Note that the filesystem may not support positions above KMaxTInt, in which case it leaves with KErrNotSupported.
TInt & aLengthSpecifies the number of bytes to be written to the file. On return this is the number of bytes written, this value is not valid if the function leaves.
const TDesC8 * aDesPointer to a descriptor containing the data to be written to the file.
const RMessagePtr2 & aMessageA reference to a client message or an RLocalMessage
TInt aOffsetThe offset into the descriptor where the data is to be read from. This is non-zero if the read was fair-scheduled