]> git.ipfire.org Git - thirdparty/cups.git/blob - man/backend.man
b4ba4251636579632491f2554687b7cc05e7a87c
[thirdparty/cups.git] / man / backend.man
1 .\"
2 .\" "$Id: backend.man 7600 2008-05-20 21:06:23Z mike $"
3 .\"
4 .\" Backend man page for the Common UNIX Printing System (CUPS).
5 .\"
6 .\" Copyright 2007-2008 by Apple Inc.
7 .\" Copyright 1997-2006 by Easy Software Products.
8 .\"
9 .\" These coded instructions, statements, and computer programs are the
10 .\" property of Apple Inc. and are protected by Federal copyright
11 .\" law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 .\" which should have been included with this file. If this file is
13 .\" file is missing or damaged, see the license at "http://www.cups.org/".
14 .\"
15 .TH backend 7 "Common UNIX Printing System" "28 July 2008" "Apple Inc."
16
17 .SH NAME
18 backend \- cups backend transmission interfaces
19
20 .SH SYNOPSIS
21 .B backend
22 .br
23 .B backend
24 job user title num-copies options [
25 .I filename
26 ]
27
28 .SH DESCRIPTION
29 Backends are a special type of \fIfilter(7)\fR which is used to
30 send print data to and discover different devices on the system.
31
32 .LP
33 Like filters, backends must be capable of reading from a filename
34 on the command-line or from the standard input, copying the
35 standard input to a temporary file as required by the physical
36 interface.
37
38 .LP
39 The command name (argv[0]) is set to the device URI of the
40 destination printer. Starting with CUPS 1.1.22, any
41 authentication information in argv[0] is removed, so
42 backend developers are urged to use the DEVICE_URI environment
43 variable whenever authentication information is required. The
44 CUPS API includes a \fIcupsBackendDeviceURI\fR function for
45 retrieving the correct device URI.
46
47 .LP
48 Back-channel data from the device should be relayed to the job
49 filters by writing to file descriptor 3. The CUPS API includes
50 the \fIcupsBackChannelWrite\fR function for this purpose.
51
52 .SH DEVICE DISCOVERY
53 When run with no arguments, the backend should list the devices
54 and schemes it supports or is advertising to stdout. The output
55 consists of zero or more lines consisting of any of the following
56 forms:
57
58 .nf
59 device-class scheme "Unknown" "device-info"
60 device-class device-uri "device-make-and-model" "device-info"
61 device-class device-uri "device-make-and-model" "device-info" "device-id"
62 device-class device-uri "device-make-and-model" "device-info" "device-id" "device-location"
63 .fi
64
65 .LP
66 The \fIdevice-class\fR field is one of the following values:
67
68 .TP 5
69 direct
70 .br
71 The device-uri refers to a specific direct-access device with no
72 options, such as a parallel, USB, or SCSI device.
73
74 .TP 5
75 file
76 .br
77 The device-uri refers to a file on disk.
78
79 .TP 5
80 network
81 .br
82 The device-uri refers to a networked device and conforms to the
83 general form for network URIs.
84
85 .TP 5
86 serial
87 .br
88 The device-uri refers to a serial device with configurable baud
89 rate and other options. If the device-uri contains a baud value,
90 it represents the maximum baud rate supported by the device.
91
92 .LP
93 The \fIscheme\fR field provides the URI scheme that is supported
94 by the backend. Backends should use this form only when the
95 backend supports any URI using that scheme. The \fIdevice-uri\fR
96 field specifies the full URI to use when communicating with the
97 device.
98
99 .LP
100 The \fIdevice-make-and-model\fR field specifies the make and
101 model of the device, e.g. "Acme Foojet 2000". If the make and
102 model is not known, you must report "Unknown".
103
104 .LP
105 The \fIdevice-info\fR field specifies additional information
106 about the device. Typically this includes the make and model
107 along with the port number or network address, e.g. "Acme Foojet
108 2000 USB #1".
109
110 .LP
111 The optional \fIdevice-id\fR field specifies the IEEE-1284 device
112 ID string for the device, which is used to select a matching
113 driver.
114
115 .LP
116 The optional \fIdevice-location\fR field specifies the physical location of
117 the device, which is often used to pre-populate the printer-location attribute
118 when adding a printer.
119
120 .SH PERMISSIONS
121 Backends without world execute permissions are run as the root
122 user. Otherwise, the backend is run using the unprivileged user
123 account, typically "lp".
124
125 .SH EXIT CODES
126 The following exit codes are defined for backends; C API
127 constants defined in the <cups/backend.h> header file are defined
128 in parenthesis:
129
130 .TP 5
131 0 (CUPS_BACKEND_OK)
132 .br
133 The print file was successfully transmitted to the device or
134 remote server.
135
136 .TP 5
137 1 (CUPS_BACKEND_FAILED)
138 .br
139 The print file was not successfully transmitted to the device or
140 remote server. The scheduler will respond to this by canceling
141 the job, retrying the job, or stopping the queue depending on the
142 state of the error-policy attribute.
143
144 .TP 5
145 2 (CUPS_BACKEND_AUTH_REQUIRED)
146 .br
147 The print file was not successfully transmitted because valid
148 authentication information is required. The scheduler will
149 respond to this by holding the job and adding the
150 authentication-required job-reasons keyword.
151
152 .TP 5
153 3 (CUPS_BACKEND_HOLD)
154 .br
155 The print file was not successfully transmitted because it cannot
156 be printed at this time. The scheduler will respond to this by
157 holding the job.
158
159 .TP 5
160 4 (CUPS_BACKEND_STOP)
161 .br
162 The print file was not successfully transmitted because it cannot
163 be printed at this time. The scheduler will respond to this by
164 stopping the queue.
165
166 .TP 5
167 5 (CUPS_BACKEND_CANCEL)
168 .br
169 The print file was not successfully transmitted because one or
170 more attributes are not supported. The scheduler will respond to
171 this by canceling the job.
172
173 .PP
174 All other exit code values are reserved.
175
176 .SH SEE ALSO
177 \fIcupsd(8)\fR, \fIcupsd.conf(5)\fR, \fIfilter(7)\fR
178 .br
179 http://localhost:631/help
180
181 .SH COPYRIGHT
182 Copyright 2007-2008 by Apple Inc.
183 .\"
184 .\" End of "$Id: backend.man 7600 2008-05-20 21:06:23Z mike $".
185 .\"