#include <gdi.h>
class CPdrModelList : public CPrinterModelList |
Public Member Functions | |
---|---|
virtual | ~CPdrModelList() |
IMPORT_C void | AddDirectoryL(const TDesC &) |
IMPORT_C CPrinterDriver * | CreatePrinterDriverL(TInt) |
virtual IMPORT_C TInt | ModelCount() |
IMPORT_C CPdrModelList * | NewL() |
IMPORT_C CPrinterModelList * | ScanForModelsL() |
virtual IMPORT_C TInt | UidToNum(TUid) |
virtual IMPORT_C const TPrinterModelEntry | operator[](TInt) |
Implements a printer model list interface for a collection of PDR files.
IMPORT_C | ~CPdrModelList | ( | ) | [virtual] |
Virtual destructor. Frees resources owned by the object, prior to its destruction.
IMPORT_C void | AddDirectoryL | ( | const TDesC & | aDir | ) |
Adds a directory to the list of directories to be scanned for printer models.
Parameter | Description |
---|---|
aDir | The directory to be added to the list. |
IMPORT_C CPrinterDriver * | CreatePrinterDriverL | ( | TInt | anIndex | ) |
Creates an object for accessing the specified store that contains printer specification data.
Parameter | Description |
---|---|
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. |
Returns: A pointer to the object representing the store containing the printer specification data.
IMPORT_C TInt | ModelCount | ( | ) | const [virtual] |
Reimplemented from CPrinterModelList::ModelCount()const
Gets the number of printer models in the printer model list.
Returns: The number of printer models.
IMPORT_C CPdrModelList * | NewL | ( | ) | [static] |
Constructs, and returns a pointer to a new instance of the printer model list interface.
Returns: Pointer to the new printer model list interface object.
IMPORT_C CPrinterModelList * | ScanForModelsL | ( | ) |
Scans through through the list of directories for all .pdr files and generates a list of printer models.
Returns: The list of model names.
Reimplemented from CPrinterModelList::UidToNum(TUid)const
Gets a printer model's index within the model list from its UID.
Parameter | Description |
---|---|
aModelUid | The UID of the printer model. |
Returns: The index of the printer model within the array of printer models if found; KErrNotFound, otherwise.
IMPORT_C const TPrinterModelEntry | operator[] | ( | TInt | anIndex | ) | [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.
Parameter | Description |
---|---|
anIndex | The index of the printer model within the array of printer models. Note that this number must be between zero and ModelCount(). |
Returns: Name of printer model, up to 32 characters long