1/*
2 * Copyright 2010 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Michael Pfeiffer
7 */
8#ifndef PRINT_ADD_ON_SERVER_H
9#define PRINT_ADD_ON_SERVER_H
10
11#include <Application.h>
12#include <Directory.h>
13#include <File.h>
14#include <Message.h>
15#include <SupportDefs.h>
16
17#include <PrintAddOnServerProtocol.h>
18
19
20class PrintAddOnServerApplication : public BApplication
21{
22public:
23					PrintAddOnServerApplication(const char* signature);
24			void	MessageReceived(BMessage* message);
25
26private:
27			void		AddPrinter(BMessage* message);
28			status_t	AddPrinter(const char* driver,
29							const char* spoolFolderName);
30
31			void		ConfigPage(BMessage* message);
32			status_t	ConfigPage(const char* driver,
33							BDirectory* spoolFolder,
34							BMessage* settings);
35
36			void		ConfigJob(BMessage* message);
37			status_t	ConfigJob(const char* driver,
38							BDirectory* spoolFolder,
39							BMessage* settings);
40
41			void		DefaultSettings(BMessage* message);
42			status_t	DefaultSettings(const char* driver,
43							BDirectory* spoolFolder,
44							BMessage* settings);
45
46			void		TakeJob(BMessage* message);
47			status_t	TakeJob(const char* driver,
48							const char* spoolFile,
49							BDirectory* spoolFolder);
50
51			void		SendReply(BMessage* message, status_t status);
52			void		SendReply(BMessage* message, BMessage* reply);
53};
54
55#endif
56