Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: gdi.h
Link against: gdi.lib

Class CPdrModelList

CPdrModelList

Support

Supported from 5.0

Description

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

Derivation

CBaseBase class for all classes to be instantiated on the heap
CPdrModelListImplements a printer model list interface for a collection of PDR files
CPrinterModelListPrinter model list interface

Defined in CPdrModelList:
AddDirectoryL(), CreatePrinterDriverL(), ModelCount(), NewL(), ScanForModelsL(), UidToNum(), operator[](), ~CPdrModelList()

Inherited from CBase:
operator new()


Member functions


NewL()

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()

~CPdrModelList();

Description

Destructor.

It frees resources owned by the object, prior to its destruction.


ModelCount()

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[]()

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

Return value

TPrinterModelEntry

Name of printer model, up to 32 characters long


UidToNum()

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()

void AddDirectoryL(const TDesC& aDir);

Description

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.


ScanForModelsL()

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()

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.