Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <GDI.H>
Link against: gdi.lib

Class CPdrModelList

class CPdrModelList : public CPrinterModelList;

Description

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

Derivation

Members

Defined in CPdrModelList:

Inherited from CBase:


Construction and destruction


NewL()

IMPORT_C static CPdrModelList* NewL();

Description

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

Return value

CPdrModelList *

Pointer to the new printer model list interface object.


~CPdrModelList()

IMPORT_C virtual ~CPdrModelList();

Description

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

[Top]


Member functions


ModelCount()const

IMPORT_C virtual TInt ModelCount() const;

Description

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

Return value

TInt

The number of printer models.


operator[](TInt)

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

Description

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 CPdrModelList::ModelCount()const.

Return value

const TPrinterModelEntry

Name of printer model, up to 32 characters long


UidToNum(TUid)const

IMPORT_C virtual TInt UidToNum(TUid aModelUid) const;

Description

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

Parameters

TUid aModelUid

The UID of the printer model.

Return value

TInt

The index of the printer model within the array of printer models if found; KErrNotFound, otherwise.


AddDirectoryL(const TDesC &)

IMPORT_C void AddDirectoryL(const TDesC &aDir);

Description

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

Parameters

const TDesC16 &aDir

The directory to be added to the list.


ScanForModelsL()

IMPORT_C CPrinterModelList* ScanForModelsL();

Description

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

Return value

CPrinterModelList *

The list of model names.


CreatePrinterDriverL(TInt)

IMPORT_C CPrinterDriver* CreatePrinterDriverL(TInt anIndex);

Description

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.

Return value

CPrinterDriver *

A pointer to the object representing the store containing the printer specification data.