xref: /haiku/src/add-ons/print/drivers/lpstyl/LpstylEntry.cpp (revision d9949ac911df2fb1023ee4b14fa34a41633e370a)
1 /*
2 * Copyright 2017, Haiku. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Adrien Destugues <pulkomandy@pulkomandy.tk>
7 */
8 #include "Lpstyl.h"
9 #include "LpstylCap.h"
10 #include "LpstylData.h"
11 #include "PrinterDriver.h"
12 
13 
14 class LpstylPrinterDriver : public PrinterDriver
15 {
16 	public:
LpstylPrinterDriver(BNode * printerFolder)17 		LpstylPrinterDriver(BNode* printerFolder)
18 			: PrinterDriver(printerFolder)
19 		{}
20 
GetSignature() const21 		const char* GetSignature() const
22 		{
23 			return "application/x-vnd.lpstyl";
24 		}
25 
GetDriverName() const26 		const char* GetDriverName() const
27 		{
28 			return "Apple StyleWriter";
29 		}
30 
GetVersion() const31 		const char* GetVersion() const
32 		{
33 			return "1.0.0";
34 		}
35 
GetCopyright() const36 		const char* GetCopyright() const
37 		{
38 			return "Copyright 1996-2000 Monroe Williams, 2017 Adrien Destugues.\n";
39 		}
40 
InstantiatePrinterData(BNode * node)41 		PrinterData* InstantiatePrinterData(BNode* node)
42 		{
43 			return new LpstylData(node);
44 		}
45 
InstantiatePrinterCap(PrinterData * printerData)46 		PrinterCap* InstantiatePrinterCap(PrinterData* printerData)
47 		{
48 			return new LpstylCap(printerData);
49 		}
50 
InstantiateGraphicsDriver(BMessage * settings,PrinterData * printerData,PrinterCap * printerCap)51 		GraphicsDriver* InstantiateGraphicsDriver(BMessage* settings,
52 			PrinterData* printerData, PrinterCap* printerCap)
53 		{
54 			return new LpstylDriver(settings, printerData, printerCap);
55 		}
56 };
57 
58 PrinterDriver*
instantiate_printer_driver(BNode * printerFolder)59 instantiate_printer_driver(BNode* printerFolder)
60 {
61 	return new LpstylPrinterDriver(printerFolder);
62 }
63