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