1/*****************************************************************************/
2// print_server Background Application.
3//
4// Version: 1.0.0d1
5//
6// The print_server manages the communication between applications and the
7// printer and transport drivers.
8//
9//
10// This application and all source files used in its construction, except
11// where noted, are licensed under the MIT License, and have been written
12// and are:
13//
14// Copyright (c) 2001 Haiku Project
15//
16// Permission is hereby granted, free of charge, to any person obtaining a
17// copy of this software and associated documentation files (the "Software"),
18// to deal in the Software without restriction, including without limitation
19// the rights to use, copy, modify, merge, publish, distribute, sublicense,
20// and/or sell copies of the Software, and to permit persons to whom the
21// Software is furnished to do so, subject to the following conditions:
22//
23// The above copyright notice and this permission notice shall be included
24// in all copies or substantial portions of the Software.
25//
26// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
27// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
29// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
31// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
32// DEALINGS IN THE SOFTWARE.
33/*****************************************************************************/
34
35#ifndef _PR_SERVER_H_
36#define _PR_SERVER_H_
37
38// signature mime types
39#define PSRV_SIGNATURE_TYPE			"application/x-vnd.Be-PSRV"
40#define PRNT_SIGNATURE_TYPE			"application/x-vnd.Be-PRNT"
41
42// messages understood by print_server
43#define PSRV_GET_ACTIVE_PRINTER				'pgcp'
44#define PSRV_MAKE_PRINTER_ACTIVE_QUIETLY	'pmaq'
45#define PSRV_MAKE_PRINTER_ACTIVE			'pmac'
46#define PSRV_MAKE_PRINTER					'selp'
47#define PSRV_SHOW_PAGE_SETUP				'pgst'
48#define PSRV_SHOW_PRINT_SETUP				'ppst'
49#define PSRV_PRINT_SPOOLED_JOB				'psns'
50#define PSRV_GET_DEFAULT_SETTINGS      'pdef'
51
52// messages sent to Printers preflet
53#define PRINTERS_ADD_PRINTER				'addp'
54
55// mime file types
56#define PSRV_PRINTER_FILETYPE		"application/x-vnd.Be.printer"
57#define PSRV_SPOOL_FILETYPE			"application/x-vnd.Be.printer-spool"
58
59// spool Attributes
60#define PSRV_SPOOL_ATTR_MIMETYPE	"_spool/MimeType"
61#define PSRV_SPOOL_ATTR_PAGECOUNT	"_spool/Page Count"
62#define PSRV_SPOOL_ATTR_DESCRIPTION	"_spool/Description"
63#define PSRV_SPOOL_ATTR_PRINTER		"_spool/Printer"
64#define PSRV_SPOOL_ATTR_STATUS		"_spool/Status"
65#define PSRV_SPOOL_ATTR_ERRCODE		"_spool/_errorcode"
66
67// spool file status attribute values
68#define PSRV_JOB_STATUS_                ""
69#define PSRV_JOB_STATUS_WAITING         "Waiting"
70#define PSRV_JOB_STATUS_PROCESSING      "Processing"
71#define PSRV_JOB_STATUS_FAILED          "Failed"
72#define PSRV_JOB_STATUS_COMPLETED 		"Completed"
73
74// printer attributes
75#define PSRV_PRINTER_ATTR_DRV_NAME			"Driver Name"
76#define PSRV_PRINTER_ATTR_PRT_NAME			"Printer Name"
77#define PSRV_PRINTER_ATTR_COMMENTS			"Comments"
78#define PSRV_PRINTER_ATTR_STATE				"state"
79#define PSRV_PRINTER_ATTR_TRANSPORT			"transport"
80#define PSRV_PRINTER_ATTR_TRANSPORT_ADDR	"transport_address"
81#define PSRV_PRINTER_ATTR_CNX				"connection"
82#define PSRV_PRINTER_ATTR_PNP				"_PNP"
83#define PSRV_PRINTER_ATTR_MDL				"_MDL"
84
85// printer name
86#define PSRV_FIELD_CURRENT_PRINTER "current_printer"
87
88// page settings fields
89#define PSRV_FIELD_XRES "xres"
90#define PSRV_FIELD_YRES "yres"
91#define PSRV_FIELD_PAPER_RECT "paper_rect"
92#define PSRV_FIELD_PRINTABLE_RECT "printable_rect"
93
94// optional page settings field
95#define PSRV_FIELD_ORIENTATION "orientation"
96#define PSRV_FIELD_COPIES "copies"
97#define PSRV_FIELD_SCALE "scale"
98#define PSRV_FIELD_QUALITY "quality"
99
100// job settings fields
101#define PSRV_FIELD_FIRST_PAGE "first_page"
102#define PSRV_FIELD_LAST_PAGE "last_page"
103
104#endif
105