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