CFormatCB Class Reference

class CFormatCB : public CFsDispatchObject

A file server interface class representing a format operation on a disk.

An instance of this object is referred to as a format control block.

The type of format operation to be applied depends on the type of disk, and is stored in iMode. Each format operation has a number of steps and is kept track of using iCurrentStep.

A format control block needs to be created for a specific mount control block for the disk controlled via that mount to be formatted.

A plug-in file system provides an implementation of this class.

Inherits from

Constructor & Destructor Documentation

CFormatCB()

IMPORT_CCFormatCB()

~CFormatCB()

IMPORT_C~CFormatCB()

Member Functions Documentation

CheckMount()

IMPORT_C TIntCheckMount()

CurrentStep()

TInt &CurrentStep()[inline]

Gets the current stage in the format operation.

DoFormatStepL()

voidDoFormatStepL()[pure virtual]

Performs a formatting step on the drive.

The step performed should depend on the values of iMode and iCurrentStep.

It can be assumed that there are no resources open on the mount, that the media is formattable, and that the media is not write protected.

If iMode == EQuickFormat, then only meta data is to be written. This should be carried out in a single step, with iCurrentStep set to zero on completion.

If iMode != EQuickFormat, then the format step performed by this function should depend on iCurrentStep. When the function returns with iCurrentStep set to zero, the formatting of the drive is complete.

On error detection, the function should leave with an appropriate error code.

CFormatCB::iMode CFormatCB::iCurrentStep

Drive()

TDrive &Drive()const [inline]

Gets the object representing the drive on which the disk to be formatted resides.

GetInterface(TInt, TAny *&, TAny *)

IMPORT_C TIntGetInterface(TIntaInterfaceId,
TAny *&aInterface,
TAny *aInput
)[protected, virtual]

Return a pointer to a specified interface extension - to allow future extension of this class without breaking binary compatibility.

Parameters

TInt aInterfaceIdInterface identifier of the interface to be retrieved.
TAny *& aInterfaceA reference to a pointer that retrieves the specified interface.
TAny * aInputAn arbitrary input argument.

InitL(TDrive *, TFormatMode)

voidInitL(TDrive *aDrive,
TFormatModeaMode
)

Parameters

TDrive * aDrive
TFormatMode aMode

Mode()

TFormatMode Mode()const [inline]

Gets the mode of the format operation.

Mount()

CMountCB &Mount()const [inline]

Gets the object representing the mount on which the disk to be formatted resides.

SetFormatParameters(const TLDFormatInfo *)

voidSetFormatParameters(const TLDFormatInfo *apLDFormatInfo)

Parameters

const TLDFormatInfo * apLDFormatInfo

SetFormatParameters(const TVolFormatParam *)

TInt SetFormatParameters(const TVolFormatParam *apVolFormatParam)

Parameters

const TVolFormatParam * apVolFormatParam

Member Enumerations Documentation

Enum TInterfaceIds

Enumeration of the aInterfaceIDs used in GetInterface

Enumerators

ESetFmtParameters = 1

Member Data Documentation

CFormatCBBody * iBody

CFormatCBBody *iBody[private]

TInt iCurrentStep

TInt iCurrentStep[protected]

TDrive * iDrive

TDrive *iDrive[private]

TFormatMode iMode

TFormatMode iMode[protected]

CMountCB * iMount

CMountCB *iMount[private]

TSpecialFormatInfoBuf iSpecialInfo

TSpecialFormatInfoBuf iSpecialInfo[protected]