1 #ifndef _PRINTER_DRIVER_H
2 #define _PRINTER_DRIVER_H
5 #include <SupportDefs.h>
15 #define kAttrPageSettings "libprint/page_settings"
16 #define kAttrJobSettings "libprint/job_settings"
20 PrinterDriver(BNode
* spoolFolder
);
21 virtual ~PrinterDriver();
23 virtual const char* GetSignature() const = 0;
24 virtual const char* GetDriverName() const = 0;
25 virtual const char* GetVersion() const = 0;
26 virtual const char* GetCopyright() const = 0;
28 virtual PrinterCap
* InstantiatePrinterCap(PrinterData
* printerData
) = 0;
29 virtual PrinterData
* InstantiatePrinterData(BNode
* node
);
30 virtual GraphicsDriver
* InstantiateGraphicsDriver(BMessage
* settings
,
31 PrinterData
* printerData
,
32 PrinterCap
* printerCap
) = 0;
34 void InitPrinterDataAndCap();
37 virtual char* AddPrinter(char* printerName
);
38 BMessage
* ConfigPage(BMessage
* settings
);
39 BMessage
* ConfigJob(BMessage
* settings
);
40 BMessage
* TakeJob(BFile
* printJob
, BMessage
* settings
);
43 PrinterData
* GetPrinterData() { return fPrinterData
; }
44 PrinterCap
* GetPrinterCap() { return fPrinterCap
; }
47 bool _ReadSettings(const char* attrName
,
49 void _WriteSettings(const char* attrName
,
51 void _MergeWithPreviousSettings(const char* attrName
,
55 PrinterData
* fPrinterData
;
56 PrinterCap
* fPrinterCap
;
57 GraphicsDriver
* fGraphicsDriver
;
60 PrinterDriver
* instantiate_printer_driver(BNode
* printerFolder
= NULL
);
62 #endif // _PRINTER_DRIVER_H