]> git.ipfire.org Git - thirdparty/cups.git/blame - doc/help/man-ipptoolfile.html
Fix compiler warning.
[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
MS
13The
14<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(1)</a>
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
90<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
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,
99<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
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
104<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
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
109<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
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
114<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
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
126<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
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
130<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
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">
6b13fa61 142<dt><b>ATTR </b><i>tag attribute-name value(s)</i>
f1dd3a39
MS
143<dd style="margin-left: 5.0em">Adds an attribute to the test request.
144Values are separated by the comma (",") character - escape commas using the "" character.
145Common attributes and values are listed in the IANA IPP registry - see references below.
6b13fa61 146<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
147<dd style="margin-left: 5.0em">Adds a collection attribute to the test request.
148Member attributes follow the same syntax as regular attributes and can themselves be nested collections.
149Multiple collection values can be supplied as needed, separated by commas.
6b13fa61
MS
150<dt><b>COMPRESSION deflate</b>
151<dd style="margin-left: 5.0em"><dt><b>COMPRESSION gzip</b>
152<dd style="margin-left: 5.0em"><dt><b>COMPRESSION none</b>
153<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
154<dt><b>DELAY </b><i>seconds</i>[<i>,repeat-seconds</i>]
155<dd style="margin-left: 5.0em">Specifies a delay in seconds before this test will be run.
156If two values are specified, the second value is used as the delay between repeated tests.
6b13fa61 157<dt><b>DISPLAY </b><i>attribute-name</i>
2909c66c 158<dd style="margin-left: 5.0em">Specifies that value of the named attribute should be output as part of the
a2326b5b 159test report.
6b13fa61
MS
160<dt><b>EXPECT </b><i>attribute-name </i>[ <i>predicate(s) </i>]
161<dd style="margin-left: 5.0em"><dt><b>EXPECT ?</b><i>attribute-name predicate(s)</i>
162<dd style="margin-left: 5.0em"><dt><b>EXPECT !</b><i>attribute-name</i>
163<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
164<dt><b>EXPECT-ALL </b><i>attribute-name </i>[ <i>predicate(s) </i>]
165<dd style="margin-left: 5.0em"><dt><b>EXPECT-ALL ?</b><i>attribute-name predicate(s)</i>
166<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
167<dt><b>FILE filename</b>
168<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.
169<dt><b>GROUP tag</b>
2909c66c 170<dd style="margin-left: 5.0em">Specifies the group tag for subsequent attributes in the request.
6b13fa61
MS
171<dt><b>IGNORE-ERRORS yes</b>
172<dd style="margin-left: 5.0em"><dt><b>IGNORE-ERRORS no</b>
173<dd style="margin-left: 5.0em">Specifies whether
174<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
175will ignore errors and continue with subsequent tests.
176<dt><b>NAME "</b><i>literal string</i><b>"</b>
2909c66c 177<dd style="margin-left: 5.0em">Specifies the human-readable name of the test.
6b13fa61 178<dt><b>OPERATION </b><i>operation-code</i>
2909c66c 179<dd style="margin-left: 5.0em">Specifies the operation to be performed.
e639770b
MS
180<dt><b>PAUSE "</b><i>message</i><b>"</b>
181<dd style="margin-left: 5.0em">Displays the provided message and waits for the user to press a key to continue.
6b13fa61
MS
182<dt><b>REQUEST-ID </b><i>number</i>
183<dd style="margin-left: 5.0em"><dt><b>REQUEST-ID random</b>
184<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).
185<dt><b>RESOURCE </b><i>path</i>
186<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
187<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
188program.
189<dt><b>SKIP-IF-DEFINED </b><i>variable-name</i>
190<dd style="margin-left: 5.0em"><dt><b>SKIP-IF-NOT-DEFINED </b><i>variable-name</i>
191<dd style="margin-left: 5.0em">Specifies that the current test should be skipped when the variable is or is not defined.
192<dt><b>SKIP-PREVIOUS-ERROR yes</b>
193<dd style="margin-left: 5.0em"><dt><b>SKIP-PREVIOUS-ERROR no</b>
194<dd style="margin-left: 5.0em">Specifies whether
195<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
196will skip the current test if the previous test resulted in an error/failure.
197<dt><b>STATUS </b><i>status-code </i>[ <i>predicate</i> ]
198<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.
199<dt><b>TEST-ID "</b><i>identifier</i>"
2909c66c 200<dd style="margin-left: 5.0em">Specifies an identifier string for the current test.
6b13fa61
MS
201<dt><b>TRANSFER auto</b>
202<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.
203<dt><b>TRANSFER chunked</b>
204<dd style="margin-left: 5.0em">Specifies that this test will use the HTTP/1.1 "Transfer-Encoding: chunked" header.
205<dt><b>TRANSFER length</b>
2909c66c 206<dd style="margin-left: 5.0em">Specifies that this test will use the HTTP/1.0 "Content-Length:" header.
6b13fa61
MS
207<dt><b>VERSION 1.0</b>
208<dd style="margin-left: 5.0em"><dt><b>VERSION 1.1</b>
209<dd style="margin-left: 5.0em"><dt><b>VERSION 2.0</b>
210<dd style="margin-left: 5.0em"><dt><b>VERSION 2.1</b>
211<dd style="margin-left: 5.0em"><dt><b>VERSION 2.2</b>
2909c66c 212<dd style="margin-left: 5.0em">Specifies the IPP version number to use for this test.
2909c66c 213</dl>
6b13fa61
MS
214<h3><a name="EXPECT_PREDICATES">Expect Predicates</a></h3>
215The following predicates are understood following the <b>EXPECT</b> test directive:
2909c66c 216<dl class="man">
6b13fa61
MS
217<dt><b>COUNT </b><i>number</i>
218<dd style="margin-left: 5.0em">Requires the <b>EXPECT</b> attribute to have the specified number of values.
219<dt><b>DEFINE-MATCH </b><i>variable-name</i>
220<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.
221<dt><b>DEFINE-NO-MATCH </b><i>variable-name</i>
222<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.
223<dt><b>DEFINE-VALUE </b><i>variable-name</i>
224<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.
225<dt><b>IF-DEFINED </b><i>variable-name</i>
226<dd style="margin-left: 5.0em">Makes the <b>EXPECT</b> conditions apply only if the specified variable is defined.
227<dt><b>IF-NOT-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 not defined.
229<dt><b>IN-GROUP </b><i>tag</i>
230<dd style="margin-left: 5.0em">Requires the <b>EXPECT</b> attribute to be in the specified group tag.
231<dt><b>OF-TYPE </b><i>tag[,tag,...]</i>
232<dd style="margin-left: 5.0em">Requires the <b>EXPECT</b> attribute to use one of the specified value tag(s).
233<dt><b>REPEAT-LIMIT </b><i>number</i>
2909c66c 234<dd style="margin-left: 5.0em"><br>
6b13fa61
MS
235Specifies 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.
236<dt><b>REPEAT-MATCH</b>
237<dd style="margin-left: 5.0em"><dt><b>REPEAT-NO-MATCH</b>
238<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.
239<dt><b>SAME-COUNT-AS </b><i>attribute-name</i>
240<dd style="margin-left: 5.0em">Requires the <b>EXPECT</b> attribute to have the same number of values as the specified parallel attribute.
241<dt><b>WITH-ALL-HOSTNAMES "</b><i>literal string</i><b>"</b>
242<dd style="margin-left: 5.0em"><dt><b>WITH-ALL-HOSTNAMES "/</b><i>regular expression</i><b>/"</b>
2909c66c 243<dd style="margin-left: 5.0em">Requires that all URI values contain a matching hostname.
6b13fa61
MS
244<dt><b>WITH-ALL-RESOURCES "</b><i>literal string</i><b>"</b>
245<dd style="margin-left: 5.0em"><dt><b>WITH-ALL-RESOURCES "/</b><i>regular expression</i><b>/"</b>
2909c66c 246<dd style="margin-left: 5.0em">Requires that all URI values contain a matching resource (including leading /).
6b13fa61
MS
247<dt><b>WITH-ALL-SCHEMES "</b><i>literal string</i><b>"</b>
248<dd style="margin-left: 5.0em"><dt><b>WITH-ALL-SCHEMES "/</b><i>regular expression</i><b>/"</b>
2909c66c 249<dd style="margin-left: 5.0em">Requires that all URI values contain a matching scheme.
6b13fa61
MS
250<dt><b>WITH-ALL-VALUES "</b><i>literal string</i><b>"</b>
251<dd style="margin-left: 5.0em">Requires that all values of the <b>EXPECT</b> attribute match the literal string. Comparisons are case-sensitive.
252<dt><b>WITH-ALL-VALUES &lt;</b><i>number</i>
253<dd style="margin-left: 5.0em"><dt><b>WITH-ALL-VALUES =</b><i>number</i>
254<dd style="margin-left: 5.0em"><dt><b>WITH-ALL-VALUES ></b><i>number</i>
255<dd style="margin-left: 5.0em"><dt><b>WITH-ALL-VALUES </b><i>number</i>[<i>,...,number</i>]
256<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.
257<dt><b>WITH-ALL-VALUES "false"</b>
258<dd style="margin-left: 5.0em"><dt><b>WITH-ALL-VALUES "true"</b>
259<dd style="margin-left: 5.0em">Requires that all values of the <b>EXPECT</b> attribute match the boolean value given.
260<dt><b>WITH-ALL-VALUES "/</b><i>regular expression</i><b>/"</b>
261<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.
262<dt><b>WITH-HOSTNAME "</b><i>literal string</i><b>"</b>
263<dd style="margin-left: 5.0em"><dt><b>WITH-HOSTNAME "/</b><i>regular expression</i><b>/"</b>
2909c66c 264<dd style="margin-left: 5.0em">Requires that at least one URI value contains a matching hostname.
6b13fa61
MS
265<dt><b>WITH-RESOURCE "</b><i>literal string</i><b>"</b>
266<dd style="margin-left: 5.0em"><dt><b>WITH-RESOURCE "/</b><i>regular expression</i><b>/"</b>
2909c66c 267<dd style="margin-left: 5.0em">Requires that at least one URI value contains a matching resource (including leading /).
6b13fa61
MS
268<dt><b>WITH-SCHEME "</b><i>literal string</i><b>"</b>
269<dd style="margin-left: 5.0em"><dt><b>WITH-SCHEME "/</b><i>regular expression</i><b>/"</b>
2909c66c 270<dd style="margin-left: 5.0em">Requires that at least one URI value contains a matching scheme.
6b13fa61
MS
271<dt><b>WITH-VALUE "</b><i>literal string</i><b>"</b>
272<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.
273<dt><b>WITH-VALUE &lt;</b><i>number</i>
274<dd style="margin-left: 5.0em"><dt><b>WITH-VALUE =</b><i>number</i>
275<dd style="margin-left: 5.0em"><dt><b>WITH-VALUE ></b><i>number</i>
276<dd style="margin-left: 5.0em"><dt><b>WITH-VALUE </b><i>number</i>[<i>,...,number</i>]
277<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.
278<dt><b>WITH-VALUE "false"</b>
279<dd style="margin-left: 5.0em"><dt><b>WITH-VALUE "true"</b>
280<dd style="margin-left: 5.0em">Requires that at least one value of the <b>EXPECT</b> attribute matches the boolean value given.
281<dt><b>WITH-VALUE "/</b><i>regular expression</i><b>/"</b>
282<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
283<dt><b>WITH-VALUE-FROM </b><i>attribute-name</i>
284<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.
285For 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 286</dl>
6b13fa61
MS
287<h3><a name="STATUS_PREDICATES">Status Predicates</a></h3>
288The following predicates are understood following the <b>STATUS</b> test directive:
2909c66c 289<dl class="man">
6b13fa61
MS
290<dt><b>DEFINE-MATCH </b><i>variable-name</i>
291<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.
292<dt><b>DEFINE-NO-MATCH </b><i>variable-name</i>
293<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.
294<dt><b>IF-DEFINED </b><i>variable-name</i>
295<dd style="margin-left: 5.0em">Makes the <b>STATUS</b> apply only if the specified variable is defined.
296<dt><b>IF-NOT-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 not defined.
298<dt><b>REPEAT-LIMIT </b><i>number</i>
2909c66c 299<dd style="margin-left: 5.0em"><br>
c277f98c 300Specifies the maximum number of times to repeat. The default value is 1000.
6b13fa61
MS
301<dt><b>REPEAT-MATCH</b>
302<dd style="margin-left: 5.0em"><dt><b>REPEAT-NO-MATCH</b>
303<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 304</dl>
6b13fa61
MS
305<h3><a name="OPERATION_CODES">Operation Codes</a></h3>
306Operation codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC 2911 and other IPP extension specifications. Here is a complete list of names supported by
307<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8):</a>
2909c66c 308<pre class="man">
6b13fa61 309
a2326b5b
MS
310 Activate-Printer
311 CUPS-Accept-Jobs
312 CUPS-Add-Modify-Class
313 CUPS-Add-Modify-Printer
314 CUPS-Authenticate-Job
315 CUPS-Delete-Class
316 CUPS-Delete-Printer
317 CUPS-Get-Classes
318 CUPS-Get-Default
319 CUPS-Get-Devices
320 CUPS-Get-Document
321 CUPS-Get-PPD
322 CUPS-Get-PPDs
323 CUPS-Get-Printers
324 CUPS-Move-Job
325 CUPS-Reject-Jobs
326 CUPS-Set-Default
327 Cancel-Current-Job
328 Cancel-Job
329 Cancel-Jobs
330 Cancel-My-Jobs
331 Cancel-Subscription
332 Close-Job
333 Create-Job
42404685
MS
334 Create-Job-Subscriptions
335 Create-Printer-Subscriptions
a2326b5b
MS
336 Deactivate-Printer
337 Disable-Printer
338 Enable-Printer
339 Get-Job-Attributes
340 Get-Jobs
341 Get-Notifications
342 Get-Printer-Attributes
343 Get-Printer-Support-Files
344 Get-Printer-Supported-Values
345 Get-Subscription-Attributes
346 Get-Subscriptions
347 Hold-Job
348 Hold-New-Jobs
82cc1f9a 349 Identify-Printer
a2326b5b
MS
350 Pause-Printer
351 Pause-Printer-After-Current-Job
352 Print-Job
353 Print-URI
354 Promote-Job
355 Purge-Jobs
356 Release-Held-New-Jobs
357 Release-Job
358 Renew-Subscription
359 Reprocess-Job
360 Restart-Job
361 Restart-Printer
362 Resubmit-Job
363 Resume-Job
364 Resume-Printer
365 Schedule-Job-After
366 Send-Document
9475ec92 367 Send-Hardcopy-Document
a2326b5b
MS
368 Send-Notifications
369 Send-URI
370 Set-Job-Attributes
371 Set-Printer-Attributes
372 Shutdown-Printer
373 Startup-Printer
374 Suspend-Current-Job
82cc1f9a 375 Validate-Document
a2326b5b
MS
376 Validate-Job
377</pre>
6b13fa61
MS
378<h3><a name="STATUS_CODES">Status Codes</a></h3>
379Status codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC 2911 and other IPP extension specifications. Here is a complete list of the names supported by
380<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8):</a>
2909c66c 381<pre class="man">
6b13fa61
MS
382
383 client-error-account-authorization-failed
384 client-error-account-closed
385 client-error-account-info-needed
386 client-error-account-limit-reached
a2326b5b
MS
387 client-error-attributes-not-settable
388 client-error-attributes-or-values-not-supported
389 client-error-bad-request
390 client-error-charset-not-supported
391 client-error-compression-error
392 client-error-compression-not-supported
393 client-error-conflicting-attributes
394 client-error-document-access-error
395 client-error-document-format-error
396 client-error-document-format-not-supported
82cc1f9a
MS
397 client-error-document-password-error
398 client-error-document-permission-error
399 client-error-document-security-error
400 client-error-document-unprintable-error
a2326b5b
MS
401 client-error-forbidden
402 client-error-gone
403 client-error-ignored-all-notifications
404 client-error-ignored-all-subscriptions
405 client-error-not-authenticated
406 client-error-not-authorized
407 client-error-not-found
408 client-error-not-possible
409 client-error-print-support-file-not-found
410 client-error-request-entity-too-large
411 client-error-request-value-too-long
412 client-error-timeout
413 client-error-too-many-subscriptions
414 client-error-uri-scheme-not-supported
6b13fa61
MS
415 cups-error-account-authorization-failed
416 cups-error-account-closed
417 cups-error-account-info-needed
418 cups-error-account-limit-reached
a2326b5b
MS
419 cups-see-other
420 redirection-other-site
421 server-error-busy
422 server-error-device-error
423 server-error-internal-error
424 server-error-job-canceled
425 server-error-multiple-document-jobs-not-supported
426 server-error-not-accepting-jobs
427 server-error-operation-not-supported
428 server-error-printer-is-deactivated
429 server-error-service-unavailable
430 server-error-temporary-error
431 server-error-version-not-supported
432 successful-ok
433 successful-ok-but-cancel-subscription
434 successful-ok-conflicting-attributes
435 successful-ok-events-complete
436 successful-ok-ignored-notifications
437 successful-ok-ignored-or-substituted-attributes
438 successful-ok-ignored-subscriptions
439 successful-ok-too-many-events
440</pre>
6b13fa61
MS
441<h3><a name="TAGS">Tags</a></h3>
442Value and group tags correspond to the names from RFC 2911 and other IPP extension specifications. Here are the group tags:
2909c66c 443<pre class="man">
6b13fa61
MS
444
445 document-attributes-tag
a2326b5b
MS
446 event-notification-attributes-tag
447 job-attributes-tag
448 operation-attributes-tag
449 printer-attributes-tag
450 subscription-attributes-tag
451 unsupported-attributes-tag
452</pre>
453<p>Here are the value tags:
2909c66c 454<pre class="man">
6b13fa61 455
a2326b5b
MS
456 admin-define
457 boolean
458 charset
459 collection
460 dateTime
461 default
462 delete-attribute
463 enum
464 integer
465 keyword
466 mimeMediaType
467 nameWithLanguage
468 nameWithoutLanguage
469 naturalLanguage
470 no-value
471 not-settable
472 octetString
473 rangeOfInteger
474 resolution
475 textWithLanguage
476 textWithoutLanguage
477 unknown
478 unsupported
479 uri
480 uriScheme
481</pre>
6b13fa61
MS
482<h3><a name="VARIABLES">Variables</a></h3>
483The
484<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
485program 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 486<dl class="man">
6b13fa61 487<dt><b>$$</b>
2909c66c 488<dd style="margin-left: 5.0em">Inserts a single "$" character.
6b13fa61
MS
489<dt><b>$ENV[</b><i>name</i><b>]</b>
490<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.
491<dt><b>$filename</b>
492<dd style="margin-left: 5.0em">Inserts the filename provided to
493<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
494with the <i>-f</i> option.
495<dt><b>$filetype</b>
496<dd style="margin-left: 5.0em">Inserts the MIME media type for the filename provided to
497<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8)</a>
498with the <i>-f</i> option.
499<dt><b>$hostname</b>
500<dd style="margin-left: 5.0em">Inserts the hostname from the URI provided to
501<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8).</a>
502<dt><b>$job-id</b>
503<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.
504<dt><b>$job-uri</b>
505<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.
506<dt><b>$notify-subscription-id</b>
507<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.
508<dt><b>$port</b>
509<dd style="margin-left: 5.0em">Inserts the port number from the URI provided to
510<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8).</a>
511<dt><b>$resource</b>
512<dd style="margin-left: 5.0em">Inserts the resource path from the URI provided to
513<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8).</a>
514<dt><b>$scheme</b>
515<dd style="margin-left: 5.0em">Inserts the scheme from the URI provided to
516<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8).</a>
517<dt><b>$uri</b>
518<dd style="margin-left: 5.0em">Inserts the URI provided to
519<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8).</a>
520<dt><b>$uriuser</b>
521<dd style="margin-left: 5.0em">Inserts the username from the URI provided to
522<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(8),</a>
523if any.
524<dt><b>$user</b>
2909c66c 525<dd style="margin-left: 5.0em">Inserts the current user's login name.
2909c66c 526</dl>
a2326b5b 527<h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
6b13fa61 528<a href="man-ipptool.html?TOPIC=Man+Pages"><b>ipptool</b>(1),</a>
6b13fa61
MS
529IANA IPP Registry (<a href="http://www.iana.org/assignments/ipp-registrations)">http://www.iana.org/assignments/ipp-registrations)</a>,
530PWG Internet Printing Protocol Workgroup (<a href="http://www.pwg.org/ipp)">http://www.pwg.org/ipp)</a>,
f1dd3a39 531RFC 8011 (<a href="http://tools.ietf.org/html/rfc8011">http://tools.ietf.org/html/rfc8011</a>)
a2326b5b 532<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
bd5a2f28 533Copyright &copy; 2007-2017 by Apple Inc.
a2326b5b
MS
534
535</body>
536</html>