CPdrModelList Class Reference

#include <gdi.h>

Link against: gdi.lib

class CPdrModelList : public CPrinterModelList

Inherits from

Detailed Description

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

Constructor & Destructor Documentation

~CPdrModelList ( )

IMPORT_C~CPdrModelList()[virtual]

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

Member Function Documentation

AddDirectoryL ( const TDesC & )

IMPORT_C voidAddDirectoryL(const TDesC &aDir)

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

Parameters
aDirThe directory to be added to the list.

CreatePrinterDriverL ( TInt )

IMPORT_C CPrinterDriver *CreatePrinterDriverL(TIntanIndex)

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

Parameters
anIndexAn 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.
Return Value
A pointer to the object representing the store containing the printer specification data.

ModelCount ( )

IMPORT_C TIntModelCount()const [virtual]

Reimplemented from CPrinterModelList::ModelCount()const

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

Return Value
The number of printer models.

NewL ( )

IMPORT_C CPdrModelList *NewL()[static]

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

Return Value
Pointer to the new printer model list interface object.

ScanForModelsL ( )

IMPORT_C CPrinterModelList *ScanForModelsL()

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

Return Value
The list of model names.

UidToNum ( TUid )

IMPORT_C TIntUidToNum(TUidaModelUid)const [virtual]

Reimplemented from CPrinterModelList::UidToNum(TUid)const

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

Parameters
aModelUidThe UID of the printer model.
Return Value
The index of the printer model within the array of printer models if found; KErrNotFound, otherwise.

operator[] ( TInt )

IMPORT_C const TPrinterModelEntryoperator[](TIntanIndex)[virtual]

Reimplemented from CPrinterModelList::operator[](TInt)

Gets printer model name.

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

Parameters
anIndexThe index of the printer model within the array of printer models. Note that this number must be between zero and ModelCount().
Return Value
Name of printer model, up to 32 characters long