CPdrModelList Class Reference

class CPdrModelList : public CPrinterModelList

Implements a printer model list interface for a collection of PDR files.

Inherits from

Constructor & Destructor Documentation

CPdrModelList()

CPdrModelList ( ) [private]

~CPdrModelList()

IMPORT_C ~CPdrModelList ( ) [virtual]

Virtual destructor. Frees resources owned by the object, prior to its destruction.

Member Functions Documentation

AddDirectoryL(const TDesC &)

IMPORT_C void AddDirectoryL ( const TDesC & aDir )

Adds a directory to the list of directories to be scanned for printer models.

Parameters

const TDesC & aDir The directory to be added to the list.

ConstructL()

void ConstructL ( ) [private]

CreatePrinterDriverL(TInt)

IMPORT_C CPrinterDriver * CreatePrinterDriverL ( TInt anIndex )

Creates an object for accessing the specified store that contains printer specification data.

Parameters

TInt anIndex An index into a list of files containing printer specification data. The files are the complete set of .pdr files found in the directories known to this object.

ListModelsL(TInt, TParse &, TFileName &, TFileName &, RResourceFile &, HBufC8 *&)

void ListModelsL ( TInt aFileIndex,
TParse & aParser,
TFileName & aNameOfLoadedResourceFile,
TFileName & aTempFileName,
RResourceFile & aResourceFile,
HBufC8 *& aResource
) [private]

given a pdr file list all the models it contains in the model array

Parameters

TInt aFileIndex
TParse & aParser
TFileName & aNameOfLoadedResourceFile
TFileName & aTempFileName
RResourceFile & aResourceFile
HBufC8 *& aResource

ModelCount()

IMPORT_C TInt ModelCount ( ) const [virtual]

Gets the number of printer models in the printer model list.

NewL()

IMPORT_C CPdrModelList * NewL ( ) [static]

Constructs, and returns a pointer to a new instance of the printer model list interface.

NewPathBufL(const TFileEntry &)

HBufC * NewPathBufL ( const TFileEntry & aFileEntry ) [private]

Create a buf of the right length and... set its contents to the full filename of model aModel

Parameters

const TFileEntry & aFileEntry

ScanDirectoryL(TInt)

void ScanDirectoryL ( TInt aDirIndex ) [private]

Scans the given directory, parsing all files found If a file is of the correct type it is appended to the file list

Parameters

TInt aDirIndex

ScanForModelsL()

IMPORT_C CPrinterModelList * ScanForModelsL ( )

Scans through through the list of directories for all .pdr files and generates a list of printer models.

UidToNum(TUid)

IMPORT_C TInt UidToNum ( TUid aModelUid ) const [virtual]

Gets a printer model's index within the model list from its UID.

Parameters

TUid aModelUid The UID of the printer model.

operator[](TInt)

IMPORT_C const TPrinterModelEntry operator[] ( TInt anIndex ) [virtual]

Gets printer model name.

This is the name of the printer model at the specified index within the list of printer models.

Parameters

TInt anIndex The index of the printer model within the array of printer models. Note that this number must be between zero and ModelCount().

Member Data Documentation

CArrayFixFlat< HBufC * > * iDirectoryArray

CArrayFixFlat < HBufC * > * iDirectoryArray [private]

CArrayFixFlat< TFileEntry > * iFileArray

CArrayFixFlat < TFileEntry > * iFileArray [private]

RFs iFileServer

RFs iFileServer [private]

CArrayFixSeg< TModelEntry > * iModelArray

CArrayFixSeg < TModelEntry > * iModelArray [private]