]> git.ipfire.org Git - thirdparty/cups.git/blame - doc/help/man-ipptoolfile.html
Greatly simplify the man page handling.
[thirdparty/cups.git] / doc / help / man-ipptoolfile.html
CommitLineData
c277f98c 1<!DOCTYPE HTML>
a2326b5b
MS
2<html>
3<!-- SECTION: Man Pages -->
4<head>
5 <link rel="stylesheet" type="text/css" href="../cups-printable.css">
6 <title>ipptoolfile(5)</title>
7</head>
8<body>
9<h1 class="title">ipptoolfile(5)</h1>
10<h2 class="title"><a name="NAME">Name</a></h2>
11ipptoolfile - ipptool file format
a2326b5b 12<h2 class="title"><a name="DESCRIPTION">Description</a></h2>
6b13fa61 13The
87030afb 14<b>ipptool</b>(1)
f1dd3a39
MS
15program accepts free-form plain text files that describe one or more IPP requests.
16Comments start with the "#" character and continue to the end of the line.
17Each request is enclosed by curly braces, for example:
2909c66c 18<pre class="man">
a2326b5b
MS
19
20 # This is a comment
21 {
22 # The name of the test
f1dd3a39 23 NAME "Print PDF File"
a2326b5b
MS
24
25 # The request to send
26 OPERATION Print-Job
f1dd3a39 27
a2326b5b
MS
28 GROUP operation-attributes-tag
29 ATTR charset attributes-charset utf-8
30 ATTR language attributes-natural-language en
31 ATTR uri printer-uri $uri
32 ATTR name requesting-user-name $user
f1dd3a39
MS
33 ATTR mimeMediaType document-format application/pdf
34
35 GROUP job-attributes-tag
36 ATTR collection media-col {
37 # US Letter plain paper from the "main" tray
38 MEMBER collection media-size {
39 MEMBER integer x-dimension 21590
40 MEMBER integer y-dimension 27940
41 }
42 MEMBER integer media-top-margin 423
43 MEMBER integer media-bottom-margin 423
44 MEMBER integer media-left-margin 423
45 MEMBER integer media-right-margin 423
46 MEMBER keyword media-source "main"
47 MEMBER keyword media-type "stationery"
48 }
49
50 FILE testfile.pdf
a2326b5b
MS
51
52 # The response to expect
53 STATUS successful-ok
6b13fa61 54 EXPECT job-id OF-TYPE integer WITH-VALUE >0
a2326b5b
MS
55 EXPECT job-uri OF-TYPE uri
56 }
57 {
58 # The name of the test
f1dd3a39 59 NAME "Wait for Job to Complete"
a2326b5b
MS
60
61 # The request to send
62 OPERATION Get-Job-Attributes
f1dd3a39 63
a2326b5b
MS
64 GROUP operation-attributes-tag
65 ATTR charset attributes-charset utf-8
66 ATTR language attributes-natural-language en
67 ATTR uri printer-uri $uri
68 ATTR integer job-id $job-id
69 ATTR name requesting-user-name $user
70
71 # The response to expect
72 STATUS successful-ok
6b13fa61 73 EXPECT job-id OF-TYPE integer WITH-VALUE $job-id
a2326b5b 74 EXPECT job-uri OF-TYPE uri
f1dd3a39 75 EXPECT job-state OF-TYPE enum WITH-VALUE >5 REPEAT-NO-MATCH
a2326b5b 76 EXPECT job-originating-user-name OF-TYPE name WITH-VALUE "$user"
f1dd3a39
MS
77
78 # Show the job state until completed...
79 DISPLAY job-state
80 DISPLAY job-state-reasons
a2326b5b
MS
81 }
82</pre>
6b13fa61
MS
83<h3><a name="TOP_LEVEL_DIRECTIVES">Top-level Directives</a></h3>
84The following directives can be used outside of a <i>test</i>:
2909c66c 85<dl class="man">
6b13fa61 86<dt><b>{ </b><i>test </i><b>}</b>
2909c66c 87<dd style="margin-left: 5.0em">Defines a test.
6b13fa61
MS
88<dt><b>DEFINE </b><i>variable-name value</i>
89<dd style="margin-left: 5.0em">Defines the named variable to the given value. This is equivalent to specifying <i>-d variable-name=value</i> on the
87030afb 90<b>ipptool</b>(8)
6b13fa61
MS
91command-line.
92<dt><b>DEFINE-DEFAULT </b><i>variable-name value</i>
93<dd style="margin-left: 5.0em">Defines the named variable to the given value if it does not already have a value.
94<dt><b>FILE-ID "</b><i>identifier</i><b>"</b>
2909c66c 95<dd style="margin-left: 5.0em">Specifies an identifier string for the current file.
6b13fa61
MS
96<dt><b>IGNORE-ERRORS yes</b>
97<dd style="margin-left: 5.0em"><dt><b>IGNORE-ERRORS no</b>
98<dd style="margin-left: 5.0em">Specifies whether, by default,
87030afb 99<b>ipptool</b>(8)
6b13fa61
MS
100will ignore errors and continue with subsequent tests.
101<dt><b>INCLUDE "</b><i>filename</i><b>"</b>
102<dd style="margin-left: 5.0em"><dt><b>INCLUDE &lt;</b><i>filename</i><b>></b>
103<dd style="margin-left: 5.0em">Includes another test file. The first form includes a file relative to the current test file, while the second form includes a file from the
87030afb 104<b>ipptool</b>(8)
6b13fa61
MS
105include directory.
106<dt><b>INCLUDE-IF-DEFINED </b><i>name </i><b>"</b><i>filename</i><b>"</b>
107<dd style="margin-left: 5.0em"><dt><b>INCLUDE-IF-DEFINED </b><i>name </i><b>&lt;</b><i>filename</i><b>></b>
108<dd style="margin-left: 5.0em">Includes another test file if the named variable is defined. The first form includes a file relative to the current test file, while the second form includes a file from the
87030afb 109<b>ipptool</b>(8)
a2326b5b 110include directory.
6b13fa61
MS
111<dt><b>INCLUDE-IF-NOT-DEFINED </b><i>name </i><b>"</b><i>filename</i><b>"</b>
112<dd style="margin-left: 5.0em"><dt><b>INCLUDE-IF-NOT-DEFINED </b><i>name </i><b>&lt;</b><i>filename</i><b>></b>
113<dd style="margin-left: 5.0em">Includes another test file if the named variable is not defined. The first form includes a file relative to the current test file, while the second form includes a file from the
87030afb 114<b>ipptool</b>(8)
6b13fa61
MS
115include directory.
116<dt><b>SKIP-IF-DEFINED </b><i>variable-name</i>
117<dd style="margin-left: 5.0em"><dt><b>SKIP-IF-NOT-DEFINED </b><i>variable-name</i>
118<dd style="margin-left: 5.0em">Specifies that the remainder of the test file should be skipped when the variable is or is not defined.
119<dt><b>STOP-AFTER-INCLUDE-ERROR no</b>
120<dd style="margin-left: 5.0em"><dt><b>STOP-AFTER-INCLUDE-ERROR yes</b>
2909c66c 121<dd style="margin-left: 5.0em">Specifies whether tests will be stopped after an error in an included file.
6b13fa61
MS
122<dt><b>TRANSFER auto</b>
123<dd style="margin-left: 5.0em">Specifies that tests will, by default, use "Transfer-Encoding: chunked" for requests with attached files and "Content-Length:" for requests without attached files.
124<dt><b>TRANSFER chunked</b>
125<dd style="margin-left: 5.0em">Specifies that tests will, by default, use the HTTP/1.1 "Transfer-Encoding: chunked" header. This is the default and is equivalent to specifying <i>-c</i> on the
87030afb 126<b>ipptool</b>(8)
6b13fa61
MS
127command-line. Support for chunked requests is required for conformance with all versions of IPP.
128<dt><b>TRANSFER length</b>
129<dd style="margin-left: 5.0em">Specifies that tests will, by default, use the HTTP/1.0 "Content-Length:" header. This is equivalent to specifying <i>-l</i> on the
87030afb 130<b>ipptool</b>(8)
6b13fa61
MS
131command-line. Support for content length requests is required for conformance with all versions of IPP.
132<dt><b>VERSION 1.0</b>
133<dd style="margin-left: 5.0em"><dt><b>VERSION 1.1</b>
134<dd style="margin-left: 5.0em"><dt><b>VERSION 2.0</b>
135<dd style="margin-left: 5.0em"><dt><b>VERSION 2.1</b>
136<dd style="margin-left: 5.0em"><dt><b>VERSION 2.2</b>
2909c66c 137<dd style="margin-left: 5.0em">Specifies the default IPP version number to use for the tests that follow.
2909c66c 138</dl>
6b13fa61
MS
139<h3><a name="TEST_DIRECTIVES">Test Directives</a></h3>
140The following directives are understood within a <i>test</i>:
2909c66c 141<dl class="man">
345e10ca
MS
142<dt><b>ATTR </b><i>out-of-band-tag attribute-name</i>
143<dd style="margin-left: 5.0em"><dt><b>ATTR </b><i>tag attribute-name value(s)</i>
f1dd3a39 144<dd style="margin-left: 5.0em">Adds an attribute to the test request.
345e10ca
MS
145Out-of-band tags (admin-define, delete-attribute, no-value, not-settable, unknown, unsupported) have no value.
146Values for other tags are separated by the comma (",") character - escape commas using the "" character.
f1dd3a39 147Common attributes and values are listed in the IANA IPP registry - see references below.
6b13fa61 148<dt><b>ATTR collection </b><i>attribute-name </i><b>{ MEMBER </b><i>tag member-name value(s) ... </i><b>}</b> [ <i>... </i><b>,{ </b><i>... </i><b>} </b>]
f1dd3a39
MS
149<dd style="margin-left: 5.0em">Adds a collection attribute to the test request.
150Member attributes follow the same syntax as regular attributes and can themselves be nested collections.
151Multiple collection values can be supplied as needed, separated by commas.
6b13fa61
MS
152<dt><b>COMPRESSION deflate</b>
153<dd style="margin-left: 5.0em"><dt><b>COMPRESSION gzip</b>
154<dd style="margin-left: 5.0em"><dt><b>COMPRESSION none</b>
155<dd style="margin-left: 5.0em">Uses the specified compression on the document data following the attributes in a Print-Job or Send-Document request.
f1dd3a39
MS
156<dt><b>DELAY </b><i>seconds</i>[<i>,repeat-seconds</i>]
157<dd style="margin-left: 5.0em">Specifies a delay in seconds before this test will be run.
158If two values are specified, the second value is used as the delay between repeated tests.
6b13fa61 159<dt><b>DISPLAY </b><i>attribute-name</i>
2909c66c 160<dd style="margin-left: 5.0em">Specifies that value of the named attribute should be output as part of the
a2326b5b 161test report.
6b13fa61
MS
162<dt><b>EXPECT </b><i>attribute-name </i>[ <i>predicate(s) </i>]
163<dd style="margin-left: 5.0em"><dt><b>EXPECT ?</b><i>attribute-name predicate(s)</i>
164<dd style="margin-left: 5.0em"><dt><b>EXPECT !</b><i>attribute-name</i>
165<dd style="margin-left: 5.0em">Specifies that the response must/may/must not include the named attribute. Additional requirements can be added as predicates - see the "EXPECT PREDICATES" section for more information on predicates. Attribute names can specify member attributes by separating the attribute and member names with the forward slash, for example "media-col/media-size/x-dimension".
e83646d5
MS
166<dt><b>EXPECT-ALL </b><i>attribute-name </i>[ <i>predicate(s) </i>]
167<dd style="margin-left: 5.0em"><dt><b>EXPECT-ALL ?</b><i>attribute-name predicate(s)</i>
168<dd style="margin-left: 5.0em">Specifies that the response must/may include the named attribute and that all occurrences of that attribute must match the given predicates.
6b13fa61
MS
169<dt><b>FILE filename</b>
170<dd style="margin-left: 5.0em">Specifies a file to include at the end of the request. This is typically used when sending a test print file.
171<dt><b>GROUP tag</b>
2909c66c 172<dd style="margin-left: 5.0em">Specifies the group tag for subsequent attributes in the request.
6b13fa61
MS
173<dt><b>IGNORE-ERRORS yes</b>
174<dd style="margin-left: 5.0em"><dt><b>IGNORE-ERRORS no</b>
175<dd style="margin-left: 5.0em">Specifies whether
87030afb 176<b>ipptool</b>(8)
6b13fa61
MS
177will ignore errors and continue with subsequent tests.
178<dt><b>NAME "</b><i>literal string</i><b>"</b>
2909c66c 179<dd style="margin-left: 5.0em">Specifies the human-readable name of the test.
6b13fa61 180<dt><b>OPERATION </b><i>operation-code</i>
2909c66c 181<dd style="margin-left: 5.0em">Specifies the operation to be performed.
e639770b
MS
182<dt><b>PAUSE "</b><i>message</i><b>"</b>
183<dd style="margin-left: 5.0em">Displays the provided message and waits for the user to press a key to continue.
6b13fa61
MS
184<dt><b>REQUEST-ID </b><i>number</i>
185<dd style="margin-left: 5.0em"><dt><b>REQUEST-ID random</b>
186<dd style="margin-left: 5.0em">Specifies the request-id value to use in the request, either an integer or the word "random" to use a randomly generated value (the default).
187<dt><b>RESOURCE </b><i>path</i>
188<dd style="margin-left: 5.0em">Specifies an alternate resource path that is used for the HTTP POST request. The default is the resource from the URI provided to the
87030afb 189<b>ipptool</b>(8)
6b13fa61
MS
190program.
191<dt><b>SKIP-IF-DEFINED </b><i>variable-name</i>
192<dd style="margin-left: 5.0em"><dt><b>SKIP-IF-NOT-DEFINED </b><i>variable-name</i>
193<dd style="margin-left: 5.0em">Specifies that the current test should be skipped when the variable is or is not defined.
194<dt><b>SKIP-PREVIOUS-ERROR yes</b>
195<dd style="margin-left: 5.0em"><dt><b>SKIP-PREVIOUS-ERROR no</b>
196<dd style="margin-left: 5.0em">Specifies whether
87030afb 197<b>ipptool</b>(8)
6b13fa61
MS
198will skip the current test if the previous test resulted in an error/failure.
199<dt><b>STATUS </b><i>status-code </i>[ <i>predicate</i> ]
200<dd style="margin-left: 5.0em">Specifies an expected response status-code value. Additional requirements can be added as predicates - see the "STATUS PREDICATES" section for more information on predicates.
201<dt><b>TEST-ID "</b><i>identifier</i>"
2909c66c 202<dd style="margin-left: 5.0em">Specifies an identifier string for the current test.
6b13fa61
MS
203<dt><b>TRANSFER auto</b>
204<dd style="margin-left: 5.0em">Specifies that this test will use "Transfer-Encoding: chunked" if it has an attached file or "Content-Length:" otherwise.
205<dt><b>TRANSFER chunked</b>
206<dd style="margin-left: 5.0em">Specifies that this test will use the HTTP/1.1 "Transfer-Encoding: chunked" header.
207<dt><b>TRANSFER length</b>
2909c66c 208<dd style="margin-left: 5.0em">Specifies that this test will use the HTTP/1.0 "Content-Length:" header.
6b13fa61
MS
209<dt><b>VERSION 1.0</b>
210<dd style="margin-left: 5.0em"><dt><b>VERSION 1.1</b>
211<dd style="margin-left: 5.0em"><dt><b>VERSION 2.0</b>
212<dd style="margin-left: 5.0em"><dt><b>VERSION 2.1</b>
213<dd style="margin-left: 5.0em"><dt><b>VERSION 2.2</b>
2909c66c 214<dd style="margin-left: 5.0em">Specifies the IPP version number to use for this test.
2909c66c 215</dl>
6b13fa61
MS
216<h3><a name="EXPECT_PREDICATES">Expect Predicates</a></h3>
217The following predicates are understood following the <b>EXPECT</b> test directive:
2909c66c 218<dl class="man">
6b13fa61
MS
219<dt><b>COUNT </b><i>number</i>
220<dd style="margin-left: 5.0em">Requires the <b>EXPECT</b> attribute to have the specified number of values.
221<dt><b>DEFINE-MATCH </b><i>variable-name</i>
222<dd style="margin-left: 5.0em">Defines the variable to "1" when the <b>EXPECT</b> condition matches. A side-effect of this predicate is that this <b>EXPECT</b> will never fail a test.
223<dt><b>DEFINE-NO-MATCH </b><i>variable-name</i>
224<dd style="margin-left: 5.0em">Defines the variable to "1" when the <b>EXPECT</b> condition does not match. A side-effect of this predicate is that this <b>EXPECT</b> will never fail a test.
225<dt><b>DEFINE-VALUE </b><i>variable-name</i>
226<dd style="margin-left: 5.0em">Defines the variable to the value of the attribute when the <b>EXPECT</b> condition matches. A side-effect of this predicate is that this <b>EXPECT</b> will never fail a test.
227<dt><b>IF-DEFINED </b><i>variable-name</i>
228<dd style="margin-left: 5.0em">Makes the <b>EXPECT</b> conditions apply only if the specified variable is defined.
229<dt><b>IF-NOT-DEFINED </b><i>variable-name</i>
230<dd style="margin-left: 5.0em">Makes the <b>EXPECT</b> conditions apply only if the specified variable is not defined.
231<dt><b>IN-GROUP </b><i>tag</i>
232<dd style="margin-left: 5.0em">Requires the <b>EXPECT</b> attribute to be in the specified group tag.
233<dt><b>OF-TYPE </b><i>tag[,tag,...]</i>
234<dd style="margin-left: 5.0em">Requires the <b>EXPECT</b> attribute to use one of the specified value tag(s).
235<dt><b>REPEAT-LIMIT </b><i>number</i>
2909c66c 236<dd style="margin-left: 5.0em"><br>
6b13fa61
MS
237Specifies the maximum number of times to repeat if the <b>REPEAT-MATCH</b> or <b>REPEAT-NO-MATCH</b> predicate is specified. The default value is 1000.
238<dt><b>REPEAT-MATCH</b>
239<dd style="margin-left: 5.0em"><dt><b>REPEAT-NO-MATCH</b>
240<dd style="margin-left: 5.0em">Specifies that the current test should be repeated when the <b>EXPECT</b> condition matches or does not match.
241<dt><b>SAME-COUNT-AS </b><i>attribute-name</i>
242<dd style="margin-left: 5.0em">Requires the <b>EXPECT</b> attribute to have the same number of values as the specified parallel attribute.
243<dt><b>WITH-ALL-HOSTNAMES "</b><i>literal string</i><b>"</b>
244<dd style="margin-left: 5.0em"><dt><b>WITH-ALL-HOSTNAMES "/</b><i>regular expression</i><b>/"</b>
2909c66c 245<dd style="margin-left: 5.0em">Requires that all URI values contain a matching hostname.
6b13fa61
MS
246<dt><b>WITH-ALL-RESOURCES "</b><i>literal string</i><b>"</b>
247<dd style="margin-left: 5.0em"><dt><b>WITH-ALL-RESOURCES "/</b><i>regular expression</i><b>/"</b>
2909c66c 248<dd style="margin-left: 5.0em">Requires that all URI values contain a matching resource (including leading /).
6b13fa61
MS
249<dt><b>WITH-ALL-SCHEMES "</b><i>literal string</i><b>"</b>
250<dd style="margin-left: 5.0em"><dt><b>WITH-ALL-SCHEMES "/</b><i>regular expression</i><b>/"</b>
2909c66c 251<dd style="margin-left: 5.0em">Requires that all URI values contain a matching scheme.
6b13fa61
MS
252<dt><b>WITH-ALL-VALUES "</b><i>literal string</i><b>"</b>
253<dd style="margin-left: 5.0em">Requires that all values of the <b>EXPECT</b> attribute match the literal string. Comparisons are case-sensitive.
254<dt><b>WITH-ALL-VALUES &lt;</b><i>number</i>
255<dd style="margin-left: 5.0em"><dt><b>WITH-ALL-VALUES =</b><i>number</i>
256<dd style="margin-left: 5.0em"><dt><b>WITH-ALL-VALUES ></b><i>number</i>
257<dd style="margin-left: 5.0em"><dt><b>WITH-ALL-VALUES </b><i>number</i>[<i>,...,number</i>]
258<dd style="margin-left: 5.0em">Requires that all values of the <b>EXPECT</b> attribute match the number(s) or numeric comparison. When comparing rangeOfInteger values, the "&lt;" and ">" operators only check the upper bound of the range.
259<dt><b>WITH-ALL-VALUES "false"</b>
260<dd style="margin-left: 5.0em"><dt><b>WITH-ALL-VALUES "true"</b>
261<dd style="margin-left: 5.0em">Requires that all values of the <b>EXPECT</b> attribute match the boolean value given.
262<dt><b>WITH-ALL-VALUES "/</b><i>regular expression</i><b>/"</b>
263<dd style="margin-left: 5.0em">Requires that all values of the <b>EXPECT</b> attribute match the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive.
264<dt><b>WITH-HOSTNAME "</b><i>literal string</i><b>"</b>
265<dd style="margin-left: 5.0em"><dt><b>WITH-HOSTNAME "/</b><i>regular expression</i><b>/"</b>
2909c66c 266<dd style="margin-left: 5.0em">Requires that at least one URI value contains a matching hostname.
6b13fa61
MS
267<dt><b>WITH-RESOURCE "</b><i>literal string</i><b>"</b>
268<dd style="margin-left: 5.0em"><dt><b>WITH-RESOURCE "/</b><i>regular expression</i><b>/"</b>
2909c66c 269<dd style="margin-left: 5.0em">Requires that at least one URI value contains a matching resource (including leading /).
6b13fa61
MS
270<dt><b>WITH-SCHEME "</b><i>literal string</i><b>"</b>
271<dd style="margin-left: 5.0em"><dt><b>WITH-SCHEME "/</b><i>regular expression</i><b>/"</b>
2909c66c 272<dd style="margin-left: 5.0em">Requires that at least one URI value contains a matching scheme.
6b13fa61
MS
273<dt><b>WITH-VALUE "</b><i>literal string</i><b>"</b>
274<dd style="margin-left: 5.0em">Requires that at least one value of the <b>EXPECT</b> attribute matches the literal string. Comparisons are case-sensitive.
275<dt><b>WITH-VALUE &lt;</b><i>number</i>
276<dd style="margin-left: 5.0em"><dt><b>WITH-VALUE =</b><i>number</i>
277<dd style="margin-left: 5.0em"><dt><b>WITH-VALUE ></b><i>number</i>
278<dd style="margin-left: 5.0em"><dt><b>WITH-VALUE </b><i>number</i>[<i>,...,number</i>]
279<dd style="margin-left: 5.0em">Requires that at least one value of the <b>EXPECT</b> attribute matches the number(s) or numeric comparison. When comparing rangeOfInteger values, the "&lt;" and ">" operators only check the upper bound of the range.
280<dt><b>WITH-VALUE "false"</b>
281<dd style="margin-left: 5.0em"><dt><b>WITH-VALUE "true"</b>
282<dd style="margin-left: 5.0em">Requires that at least one value of the <b>EXPECT</b> attribute matches the boolean value given.
283<dt><b>WITH-VALUE "/</b><i>regular expression</i><b>/"</b>
284<dd style="margin-left: 5.0em">Requires that at least one value of the <b>EXPECT</b> attribute matches the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive.
a21c36fa
MS
285<dt><b>WITH-VALUE-FROM </b><i>attribute-name</i>
286<dd style="margin-left: 5.0em">Requires that the value(s) of the <b>EXPECT</b> attribute matches the value(s) in the specified attribute.
287For example, "EXPECT job-sheets WITH-VALUE-FROM job-sheets-supported" requires that the "job-sheets" value is listed as a value of the "job-sheets-supported" attribute.
2909c66c 288</dl>
6b13fa61
MS
289<h3><a name="STATUS_PREDICATES">Status Predicates</a></h3>
290The following predicates are understood following the <b>STATUS</b> test directive:
2909c66c 291<dl class="man">
6b13fa61
MS
292<dt><b>DEFINE-MATCH </b><i>variable-name</i>
293<dd style="margin-left: 5.0em">Defines the variable to "1" when the <b>STATUS</b> matches. A side-effect of this predicate is that this <b>STATUS</b> will never fail a test.
294<dt><b>DEFINE-NO-MATCH </b><i>variable-name</i>
295<dd style="margin-left: 5.0em">Defines the variable to "1" when the <b>STATUS</b> does not match. A side-effect of this predicate is that this <b>STATUS</b> will never fail a test.
296<dt><b>IF-DEFINED </b><i>variable-name</i>
297<dd style="margin-left: 5.0em">Makes the <b>STATUS</b> apply only if the specified variable is defined.
298<dt><b>IF-NOT-DEFINED </b><i>variable-name</i>
299<dd style="margin-left: 5.0em">Makes the <b>STATUS</b> apply only if the specified variable is not defined.
300<dt><b>REPEAT-LIMIT </b><i>number</i>
2909c66c 301<dd style="margin-left: 5.0em"><br>
c277f98c 302Specifies the maximum number of times to repeat. The default value is 1000.
6b13fa61
MS
303<dt><b>REPEAT-MATCH</b>
304<dd style="margin-left: 5.0em"><dt><b>REPEAT-NO-MATCH</b>
305<dd style="margin-left: 5.0em">Specifies that the current test should be repeated when the response status-code matches or does not match the value specified by the STATUS directive.
2909c66c 306</dl>
6b13fa61 307<h3><a name="OPERATION_CODES">Operation Codes</a></h3>
345e10ca 308Operation codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC 8011 and other IPP extension specifications. Here is a complete list of names supported by
87030afb 309<b>ipptool</b>(8):
2909c66c 310<pre class="man">
6b13fa61 311
a2326b5b
MS
312 Activate-Printer
313 CUPS-Accept-Jobs
314 CUPS-Add-Modify-Class
315 CUPS-Add-Modify-Printer
316 CUPS-Authenticate-Job
317 CUPS-Delete-Class
318 CUPS-Delete-Printer
319 CUPS-Get-Classes
320 CUPS-Get-Default
321 CUPS-Get-Devices
322 CUPS-Get-Document
323 CUPS-Get-PPD
324 CUPS-Get-PPDs
325 CUPS-Get-Printers
326 CUPS-Move-Job
327 CUPS-Reject-Jobs
328 CUPS-Set-Default
329 Cancel-Current-Job
330 Cancel-Job
331 Cancel-Jobs
332 Cancel-My-Jobs
333 Cancel-Subscription
334 Close-Job
335 Create-Job
42404685
MS
336 Create-Job-Subscriptions
337 Create-Printer-Subscriptions
a2326b5b
MS
338 Deactivate-Printer
339 Disable-Printer
340 Enable-Printer
341 Get-Job-Attributes
342 Get-Jobs
343 Get-Notifications
344 Get-Printer-Attributes
345 Get-Printer-Support-Files
346 Get-Printer-Supported-Values
347 Get-Subscription-Attributes
348 Get-Subscriptions
349 Hold-Job
350 Hold-New-Jobs
82cc1f9a 351 Identify-Printer
a2326b5b
MS
352 Pause-Printer
353 Pause-Printer-After-Current-Job
354 Print-Job
355 Print-URI
356 Promote-Job
357 Purge-Jobs
358 Release-Held-New-Jobs
359 Release-Job
360 Renew-Subscription
361 Reprocess-Job
362 Restart-Job
363 Restart-Printer
364 Resubmit-Job
365 Resume-Job
366 Resume-Printer
367 Schedule-Job-After
368 Send-Document
9475ec92 369 Send-Hardcopy-Document
a2326b5b
MS
370 Send-Notifications
371 Send-URI
372 Set-Job-Attributes
373 Set-Printer-Attributes
374 Shutdown-Printer
375 Startup-Printer
376 Suspend-Current-Job
82cc1f9a 377 Validate-Document
a2326b5b
MS
378 Validate-Job
379</pre>
6b13fa61 380<h3><a name="STATUS_CODES">Status Codes</a></h3>
345e10ca 381Status codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC 8011 and other IPP extension specifications. Here is a complete list of the names supported by
87030afb 382<b>ipptool</b>(8):
2909c66c 383<pre class="man">
6b13fa61
MS
384
385 client-error-account-authorization-failed
386 client-error-account-closed
387 client-error-account-info-needed
388 client-error-account-limit-reached
a2326b5b
MS
389 client-error-attributes-not-settable
390 client-error-attributes-or-values-not-supported
391 client-error-bad-request
392 client-error-charset-not-supported
393 client-error-compression-error
394 client-error-compression-not-supported
395 client-error-conflicting-attributes
396 client-error-document-access-error
397 client-error-document-format-error
398 client-error-document-format-not-supported
82cc1f9a
MS
399 client-error-document-password-error
400 client-error-document-permission-error
401 client-error-document-security-error
402 client-error-document-unprintable-error
a2326b5b
MS
403 client-error-forbidden
404 client-error-gone
405 client-error-ignored-all-notifications
406 client-error-ignored-all-subscriptions
407 client-error-not-authenticated
408 client-error-not-authorized
409 client-error-not-found
410 client-error-not-possible
411 client-error-print-support-file-not-found
412 client-error-request-entity-too-large
413 client-error-request-value-too-long
414 client-error-timeout
415 client-error-too-many-subscriptions
416 client-error-uri-scheme-not-supported
6b13fa61
MS
417 cups-error-account-authorization-failed
418 cups-error-account-closed
419 cups-error-account-info-needed
420 cups-error-account-limit-reached
a2326b5b
MS
421 cups-see-other
422 redirection-other-site
423 server-error-busy
424 server-error-device-error
425 server-error-internal-error
426 server-error-job-canceled
427 server-error-multiple-document-jobs-not-supported
428 server-error-not-accepting-jobs
429 server-error-operation-not-supported
430 server-error-printer-is-deactivated
431 server-error-service-unavailable
432 server-error-temporary-error
433 server-error-version-not-supported
434 successful-ok
435 successful-ok-but-cancel-subscription
436 successful-ok-conflicting-attributes
437 successful-ok-events-complete
438 successful-ok-ignored-notifications
439 successful-ok-ignored-or-substituted-attributes
440 successful-ok-ignored-subscriptions
441 successful-ok-too-many-events
442</pre>
6b13fa61 443<h3><a name="TAGS">Tags</a></h3>
345e10ca 444Value and group tags correspond to the names from RFC 8011 and other IPP extension specifications. Here are the group tags:
2909c66c 445<pre class="man">
6b13fa61
MS
446
447 document-attributes-tag
a2326b5b
MS
448 event-notification-attributes-tag
449 job-attributes-tag
450 operation-attributes-tag
451 printer-attributes-tag
452 subscription-attributes-tag
453 unsupported-attributes-tag
454</pre>
455<p>Here are the value tags:
2909c66c 456<pre class="man">
6b13fa61 457
a2326b5b
MS
458 admin-define
459 boolean
460 charset
461 collection
462 dateTime
463 default
464 delete-attribute
465 enum
466 integer
467 keyword
468 mimeMediaType
469 nameWithLanguage
470 nameWithoutLanguage
471 naturalLanguage
472 no-value
473 not-settable
474 octetString
475 rangeOfInteger
476 resolution
477 textWithLanguage
478 textWithoutLanguage
479 unknown
480 unsupported
481 uri
482 uriScheme
483</pre>
6b13fa61
MS
484<h3><a name="VARIABLES">Variables</a></h3>
485The
87030afb 486<b>ipptool</b>(8)
6b13fa61 487program maintains a list of variables that can be used in any literal string or attribute value by specifying "<i>$variable-name</i>". Aside from variables defined using the <i>-d</i> option or <b>DEFINE</b> directive, the following pre-defined variables are available:
2909c66c 488<dl class="man">
6b13fa61 489<dt><b>$$</b>
2909c66c 490<dd style="margin-left: 5.0em">Inserts a single "$" character.
6b13fa61
MS
491<dt><b>$ENV[</b><i>name</i><b>]</b>
492<dd style="margin-left: 5.0em">Inserts the value of the named environment variable, or an empty string if the environment variable is not defined.
493<dt><b>$filename</b>
494<dd style="margin-left: 5.0em">Inserts the filename provided to
87030afb 495<b>ipptool</b>(8)
6b13fa61
MS
496with the <i>-f</i> option.
497<dt><b>$filetype</b>
498<dd style="margin-left: 5.0em">Inserts the MIME media type for the filename provided to
87030afb 499<b>ipptool</b>(8)
6b13fa61
MS
500with the <i>-f</i> option.
501<dt><b>$hostname</b>
502<dd style="margin-left: 5.0em">Inserts the hostname from the URI provided to
87030afb 503<b>ipptool</b>(8).
6b13fa61
MS
504<dt><b>$job-id</b>
505<dd style="margin-left: 5.0em">Inserts the last "job-id" attribute value returned in a test response or 0 if no "job-id" attribute has been seen.
506<dt><b>$job-uri</b>
507<dd style="margin-left: 5.0em">Inserts the last "job-uri" attribute value returned in a test response or an empty string if no "job-uri" attribute has been seen.
508<dt><b>$notify-subscription-id</b>
509<dd style="margin-left: 5.0em">Inserts the last "notify-subscription-id" attribute value returned in a test response or 0 if no "notify-subscription-id" attribute has been seen.
510<dt><b>$port</b>
511<dd style="margin-left: 5.0em">Inserts the port number from the URI provided to
87030afb 512<b>ipptool</b>(8).
6b13fa61
MS
513<dt><b>$resource</b>
514<dd style="margin-left: 5.0em">Inserts the resource path from the URI provided to
87030afb 515<b>ipptool</b>(8).
6b13fa61
MS
516<dt><b>$scheme</b>
517<dd style="margin-left: 5.0em">Inserts the scheme from the URI provided to
87030afb 518<b>ipptool</b>(8).
6b13fa61
MS
519<dt><b>$uri</b>
520<dd style="margin-left: 5.0em">Inserts the URI provided to
87030afb 521<b>ipptool</b>(8).
6b13fa61
MS
522<dt><b>$uriuser</b>
523<dd style="margin-left: 5.0em">Inserts the username from the URI provided to
87030afb 524<b>ipptool</b>(8),
6b13fa61
MS
525if any.
526<dt><b>$user</b>
2909c66c 527<dd style="margin-left: 5.0em">Inserts the current user's login name.
2909c66c 528</dl>
a2326b5b 529<h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
87030afb 530<b>ipptool</b>(1),
6b13fa61
MS
531IANA IPP Registry (<a href="http://www.iana.org/assignments/ipp-registrations)">http://www.iana.org/assignments/ipp-registrations)</a>,
532PWG Internet Printing Protocol Workgroup (<a href="http://www.pwg.org/ipp)">http://www.pwg.org/ipp)</a>,
f1dd3a39 533RFC 8011 (<a href="http://tools.ietf.org/html/rfc8011">http://tools.ietf.org/html/rfc8011</a>)
a2326b5b 534<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
87030afb 535Copyright &copy; 2007-2019 by Apple Inc.
a2326b5b
MS
536
537</body>
538</html>