xref: /haiku/headers/private/print/PrinterDriverAddOn.h (revision 1e60bdeab63fa7a57bc9a55b032052e95a18bd2c)
1 /*
2  * Copyright 2001-2010, Haiku, Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Ithamar R. Adema
7  *		Michael Pfeiffer
8  */
9 #ifndef PRINTER_DRIVER_ADD_ON_H
10 #define PRINTER_DRIVER_ADD_ON_H
11 
12 
13 #include <Directory.h>
14 #include <image.h>
15 #include <Message.h>
16 #include <Path.h>
17 #include <SupportDefs.h>
18 
19 
20 class PrinterDriverAddOn
21 {
22 public:
23 						PrinterDriverAddOn(const char* driver);
24 						~PrinterDriverAddOn();
25 
26 			status_t	AddPrinter(const char* spoolFolderName);
27 			status_t	ConfigPage(BDirectory* spoolFolder,
28 							BMessage* settings);
29 			status_t	ConfigJob(BDirectory* spoolFolder,
30 							BMessage* settings);
31 			status_t	DefaultSettings(BDirectory* spoolFolder,
32 							BMessage* settings);
33 			status_t	TakeJob(const char* spoolFile,
34 							BDirectory* spoolFolder);
35 
36 	static	status_t	FindPathToDriver(const char* driver, BPath* path);
37 
38 private:
39 			bool		IsLoaded() const;
40 			status_t	CopyValidSettings(BMessage* settings,
41 							BMessage* newSettings);
42 
43 	image_id	fAddOnID;
44 };
45 
46 
47 #endif
48