]> git.ipfire.org Git - thirdparty/cups.git/blob - doc/help/api-httpipp.html
Update all references to OS X to macOS.
[thirdparty/cups.git] / doc / help / api-httpipp.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- SECTION: Programming -->
4 <head>
5 <title>HTTP and IPP APIs </title>
6 <meta name="keywords" content="Programming">
7 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
8 <meta name="creator" content="Mini-XML v2.7">
9 <style type="text/css"><!--
10 BODY {
11 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
12 }
13
14 H1, H2, H3, H4, H5, H6, P, TD, TH {
15 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
16 }
17
18 KBD {
19 font-family: monaco, courier, monospace;
20 font-weight: bold;
21 }
22
23 PRE {
24 font-family: monaco, courier, monospace;
25 }
26
27 PRE.command {
28 border: dotted thin #7f7f7f;
29 margin-left: 36pt;
30 padding: 10px;
31 }
32
33 P.compact {
34 margin: 0;
35 }
36
37 P.example {
38 font-style: italic;
39 margin-left: 36pt;
40 }
41
42 DL.man DD {
43 margin-left: 5em;
44 }
45
46 DL.man DT {
47 margin-left: 0;
48 }
49
50 PRE.man {
51 margin: 0;
52 }
53
54 PRE.example {
55 background: #eeeeee;
56 border: dotted thin #999999;
57 margin-left: 36pt;
58 padding: 10pt;
59 }
60
61 PRE.command EM, PRE.example EM {
62 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
63 }
64
65 P.command {
66 font-family: monaco, courier, monospace;
67 margin-left: 36pt;
68 }
69
70 P.formula {
71 font-style: italic;
72 margin-left: 36pt;
73 }
74
75 BLOCKQUOTE {
76 background: #eeeeee;
77 border: solid thin #999999;
78 padding: 10pt;
79 }
80
81 A IMG {
82 border: none;
83 }
84
85 A:link:hover IMG {
86 background: #f0f0f0;
87 border-radius: 10px;
88 -moz-border-radius: 10px;
89 }
90
91 A:link, A:visited {
92 font-weight: inherit;
93 text-decoration: none;
94 }
95
96 A:link:hover, A:visited:hover, A:active {
97 text-decoration: underline;
98 }
99
100 SUB, SUP {
101 font-size: 50%;
102 }
103
104 TR.data, TD.data, TR.data TD {
105 margin-top: 10pt;
106 padding: 5pt;
107 border-bottom: solid 1pt #999999;
108 }
109
110 TR.data TH {
111 border-bottom: solid 1pt #999999;
112 padding-top: 10pt;
113 padding-left: 5pt;
114 text-align: left;
115 }
116
117 DIV.table TABLE {
118 border: solid thin #999999;
119 border-collapse: collapse;
120 border-spacing: 0;
121 margin-left: auto;
122 margin-right: auto;
123 }
124
125 DIV.table CAPTION {
126 caption-side: top;
127 font-size: 120%;
128 font-style: italic;
129 font-weight: bold;
130 margin-left: auto;
131 margin-right: auto;
132 }
133
134 DIV.table TABLE TD {
135 border: solid thin #cccccc;
136 padding-top: 5pt;
137 }
138
139 DIV.table TABLE TH {
140 background: #cccccc;
141 border: none;
142 border-bottom: solid thin #999999;
143 }
144
145 DIV.figure TABLE {
146 margin-left: auto;
147 margin-right: auto;
148 }
149
150 DIV.figure CAPTION {
151 caption-side: bottom;
152 font-size: 120%;
153 font-style: italic;
154 font-weight: bold;
155 margin-left: auto;
156 margin-right: auto;
157 }
158
159 TH.label {
160 text-align: right;
161 vertical-align: top;
162 }
163
164 TH.sublabel {
165 text-align: right;
166 font-weight: normal;
167 }
168
169 HR {
170 border: solid thin;
171 }
172
173 SPAN.info {
174 background: black;
175 border: thin solid black;
176 color: white;
177 font-size: 80%;
178 font-style: italic;
179 font-weight: bold;
180 white-space: nowrap;
181 }
182
183 H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
184 float: right;
185 font-size: 100%;
186 }
187
188 H1.title {
189 }
190
191 H2.title, H3.title {
192 border-bottom: solid 2pt #000000;
193 }
194
195 DIV.indent, TABLE.indent {
196 margin-top: 2em;
197 margin-left: auto;
198 margin-right: auto;
199 width: 90%;
200 }
201
202 TABLE.indent {
203 border-collapse: collapse;
204 }
205
206 TABLE.indent TD, TABLE.indent TH {
207 padding: 0;
208 }
209
210 TABLE.list {
211 border-collapse: collapse;
212 margin-left: auto;
213 margin-right: auto;
214 width: 90%;
215 }
216
217 TABLE.list TH {
218 background: white;
219 border-bottom: solid thin #cccccc;
220 color: #444444;
221 padding-top: 10pt;
222 padding-left: 5pt;
223 text-align: left;
224 vertical-align: bottom;
225 white-space: nowrap;
226 }
227
228 TABLE.list TH A {
229 color: #4444cc;
230 }
231
232 TABLE.list TD {
233 border-bottom: solid thin #eeeeee;
234 padding-top: 5pt;
235 padding-left: 5pt;
236 }
237
238 TABLE.list TR:nth-child(even) {
239 background: #f8f8f8;
240 }
241
242 TABLE.list TR:nth-child(odd) {
243 background: #f4f4f4;
244 }
245
246 DT {
247 margin-left: 36pt;
248 margin-top: 12pt;
249 }
250
251 DD {
252 margin-left: 54pt;
253 }
254
255 DL.category DT {
256 font-weight: bold;
257 }
258
259 P.summary {
260 margin-left: 36pt;
261 font-family: monaco, courier, monospace;
262 }
263
264 DIV.summary TABLE {
265 border: solid thin #999999;
266 border-collapse: collapse;
267 border-spacing: 0;
268 margin: 10px;
269 }
270
271 DIV.summary TABLE TD, DIV.summary TABLE TH {
272 border: solid thin #999999;
273 padding: 5px;
274 text-align: left;
275 vertical-align: top;
276 }
277
278 DIV.summary TABLE THEAD TH {
279 background: #eeeeee;
280 }
281
282 /* API documentation styles... */
283 div.body h1 {
284 margin: 0;
285 }
286 div.body h2 {
287 margin-top: 1.5em;
288 }
289 div.body h3, div.body h4, div.body h5 {
290 margin-bottom: 0.5em;
291 margin-top: 1.5em;
292 }
293 .class, .enumeration, .function, .struct, .typedef, .union {
294 border-bottom: solid thin #999999;
295 margin-bottom: 0;
296 margin-top: 2em;
297 }
298 .description {
299 margin-top: 0.5em;
300 }
301 code, p.code, pre, ul.code li {
302 font-family: monaco, courier, monospace;
303 font-size: 90%;
304 }
305 ul.code, ul.contents, ul.subcontents {
306 list-style-type: none;
307 margin: 0;
308 padding-left: 0;
309 }
310 ul.code li {
311 margin: 0;
312 }
313 ul.contents > li {
314 margin-top: 1em;
315 }
316 ul.contents li ul.code, ul.contents li ul.subcontents {
317 padding-left: 2em;
318 }
319 div.body dl {
320 margin-left: 0;
321 margin-top: 0;
322 }
323 div.body dt {
324 font-style: italic;
325 margin-left: 0;
326 margin-top: 0;
327 }
328 div.body dd {
329 margin-bottom: 0.5em;
330 }
331
332 /* This is just for the HTML files generated with the framedhelp target */
333 div.contents {
334 background: #e8e8e8;
335 border: solid thin black;
336 padding: 10px;
337 }
338 div.contents h1 {
339 font-size: 110%;
340 }
341 div.contents h2 {
342 font-size: 100%;
343 }
344 div.contents ul.contents {
345 font-size: 80%;
346 }
347 div.contents ul.subcontents li {
348 margin-left: 1em;
349 text-indent: -1em;
350 }
351 --></style>
352 </head>
353 <body>
354 <div class='body'>
355 <!--
356 HTTP and IPP API header for CUPS.
357
358 Copyright 2007-2016 by Apple Inc.
359 Copyright 1997-2006 by Easy Software Products, all rights reserved.
360
361 These coded instructions, statements, and computer programs are the
362 property of Apple Inc. and are protected by Federal copyright
363 law. Distribution and use rights are outlined in the file "LICENSE.txt"
364 which should have been included with this file. If this file is
365 file is missing or damaged, see the license at "http://www.cups.org/".
366 -->
367
368 <h1 class='title'>HTTP and IPP APIs</h1>
369
370 <div class='summary'><table summary='General Information'>
371 <thead>
372 <tr>
373 <th>Headers</th>
374 <th>cups/cups.h<br>
375 cups/http.h<br>
376 cups/ipp.h</th>
377 </tr>
378 </thead>
379 <tbody>
380 <tr>
381 <th>Library</th>
382 <td>-lcups</td>
383 </tr>
384 <tr>
385 <th>See Also</th>
386 <td>Programming: <a href='api-overview.html'>Introduction to CUPS Programming</a><br>
387 Programming: <a href='api-cups.html'>CUPS API</a><br>
388 References: <a href='spec-ipp.html'>CUPS Implementation of IPP</a></td>
389 </tr>
390 </tbody>
391 </table></div>
392 <h2 class="title">Contents</h2>
393 <ul class="contents">
394 <li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
395 <li><a href="#CREATING_URI_STRINGS">Creating URI Strings</a></li>
396 <li><a href="#SENDING_REQUESTS_WITH_FILES">Sending Requests with Files</a></li>
397 <li><a href="#ASYNCHRONOUS_REQUEST_PROCESSING">Asynchronous Request Processing</a></li>
398 </ul></li>
399 <li><a href="#FUNCTIONS">Functions</a><ul class="code">
400 <li><a href="#cupsDoAuthentication" title="Authenticate a request.">cupsDoAuthentication</a></li>
401 <li><a href="#cupsDoFileRequest" title="Do an IPP request with a file.">cupsDoFileRequest</a></li>
402 <li><a href="#cupsDoIORequest" title="Do an IPP request with file descriptors.">cupsDoIORequest</a></li>
403 <li><a href="#cupsDoRequest" title="Do an IPP request.">cupsDoRequest</a></li>
404 <li><a href="#cupsEncodeOptions" title="Encode printer options into IPP attributes.">cupsEncodeOptions</a></li>
405 <li><a href="#cupsEncodeOptions2" title="Encode printer options into IPP attributes for a group.">cupsEncodeOptions2</a></li>
406 <li><a href="#cupsGetDevices" title="Get available printer devices.">cupsGetDevices</a></li>
407 <li><a href="#cupsGetFd" title="Get a file from the server.">cupsGetFd</a></li>
408 <li><a href="#cupsGetFile" title="Get a file from the server.">cupsGetFile</a></li>
409 <li><a href="#cupsGetResponse" title="Get a response to an IPP request.">cupsGetResponse</a></li>
410 <li><a href="#cupsLastError" title="Return the last IPP status code received on the current
411 thread.">cupsLastError</a></li>
412 <li><a href="#cupsLastErrorString" title="Return the last IPP status-message received on the
413 current thread.">cupsLastErrorString</a></li>
414 <li><a href="#cupsPutFd" title="Put a file on the server.">cupsPutFd</a></li>
415 <li><a href="#cupsPutFile" title="Put a file on the server.">cupsPutFile</a></li>
416 <li><a href="#cupsReadResponseData" title="Read additional data after the IPP response.">cupsReadResponseData</a></li>
417 <li><a href="#cupsSendRequest" title="Send an IPP request.">cupsSendRequest</a></li>
418 <li><a href="#cupsWriteRequestData" title="Write additional data after an IPP request.">cupsWriteRequestData</a></li>
419 <li><a href="#httpAcceptConnection" title="Accept a new HTTP client connection from the
420 specified listening socket.">httpAcceptConnection</a></li>
421 <li><a href="#httpAddCredential" title="Allocates and adds a single credential to an array.">httpAddCredential</a></li>
422 <li><a href="#httpAddrAny" title="Check for the &quot;any&quot; address.">httpAddrAny</a></li>
423 <li><a href="#httpAddrClose" title="Close a socket created by httpAddrConnect or
424 httpAddrListen.">httpAddrClose</a></li>
425 <li><a href="#httpAddrEqual" title="Compare two addresses.">httpAddrEqual</a></li>
426 <li><a href="#httpAddrFamily" title="Get the address family of an address.">httpAddrFamily</a></li>
427 <li><a href="#httpAddrLength" title="Return the length of the address in bytes.">httpAddrLength</a></li>
428 <li><a href="#httpAddrListen" title="Create a listening socket bound to the specified
429 address and port.">httpAddrListen</a></li>
430 <li><a href="#httpAddrLocalhost" title="Check for the local loopback address.">httpAddrLocalhost</a></li>
431 <li><a href="#httpAddrLookup" title="Lookup the hostname associated with the address.">httpAddrLookup</a></li>
432 <li><a href="#httpAddrPort" title="Get the port number associated with an address.">httpAddrPort</a></li>
433 <li><a href="#httpAddrString" title="Convert an address to a numeric string.">httpAddrString</a></li>
434 <li><a href="#httpAssembleURI" title="Assemble a uniform resource identifier from its
435 components.">httpAssembleURI</a></li>
436 <li><a href="#httpAssembleURIf" title="Assemble a uniform resource identifier from its
437 components with a formatted resource.">httpAssembleURIf</a></li>
438 <li><a href="#httpAssembleUUID" title="Assemble a name-based UUID URN conforming to RFC 4122.">httpAssembleUUID</a></li>
439 <li><a href="#httpBlocking" title="Set blocking/non-blocking behavior on a connection.">httpBlocking</a></li>
440 <li><a href="#httpCheck" title="Check to see if there is a pending response from the server.">httpCheck</a></li>
441 <li><a href="#httpClearCookie" title="Clear the cookie value(s).">httpClearCookie</a></li>
442 <li><a href="#httpClearFields" title="Clear HTTP request fields.">httpClearFields</a></li>
443 <li><a href="#httpClose" title="Close an HTTP connection.">httpClose</a></li>
444 <li><a href="#httpCompareCredentials" title="Compare two sets of X.509 credentials.">httpCompareCredentials</a></li>
445 <li><a href="#httpConnect" title="Connect to a HTTP server.">httpConnect</a></li>
446 <li><a href="#httpConnect2" title="Connect to a HTTP server.">httpConnect2</a></li>
447 <li><a href="#httpConnectEncrypt" title="Connect to a HTTP server using encryption.">httpConnectEncrypt</a></li>
448 <li><a href="#httpDecode64" title="Base64-decode a string.">httpDecode64</a></li>
449 <li><a href="#httpDecode64_2" title="Base64-decode a string.">httpDecode64_2</a></li>
450 <li><a href="#httpDelete" title="Send a DELETE request to the server.">httpDelete</a></li>
451 <li><a href="#httpEncode64" title="Base64-encode a string.">httpEncode64</a></li>
452 <li><a href="#httpEncode64_2" title="Base64-encode a string.">httpEncode64_2</a></li>
453 <li><a href="#httpEncryption" title="Set the required encryption on the link.">httpEncryption</a></li>
454 <li><a href="#httpError" title="Get the last error on a connection.">httpError</a></li>
455 <li><a href="#httpFieldValue" title="Return the HTTP field enumeration value for a field
456 name.">httpFieldValue</a></li>
457 <li><a href="#httpFlush" title="Flush data from a HTTP connection.">httpFlush</a></li>
458 <li><a href="#httpFlushWrite" title="Flush data in write buffer.">httpFlushWrite</a></li>
459 <li><a href="#httpFreeCredentials" title="Free an array of credentials.">httpFreeCredentials</a></li>
460 <li><a href="#httpGet" title="Send a GET request to the server.">httpGet</a></li>
461 <li><a href="#httpGetActivity" title="Get the most recent activity for a connection.">httpGetActivity</a></li>
462 <li><a href="#httpGetAddress" title="Get the address of the connected peer of a connection.">httpGetAddress</a></li>
463 <li><a href="#httpGetAuthString" title="Get the current authorization string.">httpGetAuthString</a></li>
464 <li><a href="#httpGetBlocking" title="Get the blocking/non-block state of a connection.">httpGetBlocking</a></li>
465 <li><a href="#httpGetContentEncoding" title="Get a common content encoding, if any, between
466 the client and server.">httpGetContentEncoding</a></li>
467 <li><a href="#httpGetCookie" title="Get any cookie data from the response.">httpGetCookie</a></li>
468 <li><a href="#httpGetDateString" title="Get a formatted date/time string from a time value.">httpGetDateString</a></li>
469 <li><a href="#httpGetDateString2" title="Get a formatted date/time string from a time value.">httpGetDateString2</a></li>
470 <li><a href="#httpGetDateTime" title="Get a time value from a formatted date/time string.">httpGetDateTime</a></li>
471 <li><a href="#httpGetEncryption" title="Get the current encryption mode of a connection.">httpGetEncryption</a></li>
472 <li><a href="#httpGetExpect" title="Get the value of the Expect header, if any.">httpGetExpect</a></li>
473 <li><a href="#httpGetFd" title="Get the file descriptor associated with a connection.">httpGetFd</a></li>
474 <li><a href="#httpGetField" title="Get a field value from a request/response.">httpGetField</a></li>
475 <li><a href="#httpGetHostByName" title="Lookup a hostname or IPv4 address, and return
476 address records for the specified name.">httpGetHostByName</a></li>
477 <li><a href="#httpGetHostname" title="Get the FQDN for the connection or local system.">httpGetHostname</a></li>
478 <li><a href="#httpGetKeepAlive" title="Get the current Keep-Alive state of the connection.">httpGetKeepAlive</a></li>
479 <li><a href="#httpGetLength" title="Get the amount of data remaining from the
480 content-length or transfer-encoding fields.">httpGetLength</a></li>
481 <li><a href="#httpGetLength2" title="Get the amount of data remaining from the
482 content-length or transfer-encoding fields.">httpGetLength2</a></li>
483 <li><a href="#httpGetPending" title="Get the number of bytes that are buffered for writing.">httpGetPending</a></li>
484 <li><a href="#httpGetReady" title="Get the number of bytes that can be read without blocking.">httpGetReady</a></li>
485 <li><a href="#httpGetRemaining" title="Get the number of remaining bytes in the message
486 body or current chunk.">httpGetRemaining</a></li>
487 <li><a href="#httpGetState" title="Get the current state of the HTTP request.">httpGetState</a></li>
488 <li><a href="#httpGetStatus" title="Get the status of the last HTTP request.">httpGetStatus</a></li>
489 <li><a href="#httpGetSubField" title="Get a sub-field value.">httpGetSubField</a></li>
490 <li><a href="#httpGetSubField2" title="Get a sub-field value.">httpGetSubField2</a></li>
491 <li><a href="#httpGetVersion" title="Get the HTTP version at the other end.">httpGetVersion</a></li>
492 <li><a href="#httpGets" title="Get a line of text from a HTTP connection.">httpGets</a></li>
493 <li><a href="#httpHead" title="Send a HEAD request to the server.">httpHead</a></li>
494 <li><a href="#httpInitialize" title="Initialize the HTTP interface library and set the
495 default HTTP proxy (if any).">httpInitialize</a></li>
496 <li><a href="#httpIsChunked" title="Report whether a message body is chunked.">httpIsChunked</a></li>
497 <li><a href="#httpIsEncrypted" title="Report whether a connection is encrypted.">httpIsEncrypted</a></li>
498 <li><a href="#httpMD5" title="Compute the MD5 sum of the username:group:password.">httpMD5</a></li>
499 <li><a href="#httpMD5Final" title="Combine the MD5 sum of the username, group, and password
500 with the server-supplied nonce value, method, and
501 request-uri.">httpMD5Final</a></li>
502 <li><a href="#httpMD5String" title="Convert an MD5 sum to a character string.">httpMD5String</a></li>
503 <li><a href="#httpOptions" title="Send an OPTIONS request to the server.">httpOptions</a></li>
504 <li><a href="#httpPeek" title="Peek at data from a HTTP connection.">httpPeek</a></li>
505 <li><a href="#httpPost" title="Send a POST request to the server.">httpPost</a></li>
506 <li><a href="#httpPut" title="Send a PUT request to the server.">httpPut</a></li>
507 <li><a href="#httpRead" title="Read data from a HTTP connection.">httpRead</a></li>
508 <li><a href="#httpRead2" title="Read data from a HTTP connection.">httpRead2</a></li>
509 <li><a href="#httpReadRequest" title="Read a HTTP request from a connection.">httpReadRequest</a></li>
510 <li><a href="#httpReconnect" title="Reconnect to a HTTP server.">httpReconnect</a></li>
511 <li><a href="#httpReconnect2" title="Reconnect to a HTTP server with timeout and optional
512 cancel.">httpReconnect2</a></li>
513 <li><a href="#httpResolveHostname" title="Resolve the hostname of the HTTP connection
514 address.">httpResolveHostname</a></li>
515 <li><a href="#httpSeparate" title="Separate a Universal Resource Identifier into its
516 components.">httpSeparate</a></li>
517 <li><a href="#httpSeparate2" title="Separate a Universal Resource Identifier into its
518 components.">httpSeparate2</a></li>
519 <li><a href="#httpSeparateURI" title="Separate a Universal Resource Identifier into its
520 components.">httpSeparateURI</a></li>
521 <li><a href="#httpSetAuthString" title="Set the current authorization string.">httpSetAuthString</a></li>
522 <li><a href="#httpSetCookie" title="Set the cookie value(s).">httpSetCookie</a></li>
523 <li><a href="#httpSetCredentials" title="Set the credentials associated with an encrypted
524 connection.">httpSetCredentials</a></li>
525 <li><a href="#httpSetDefaultField" title="Set the default value of an HTTP header.">httpSetDefaultField</a></li>
526 <li><a href="#httpSetExpect" title="Set the Expect: header in a request.">httpSetExpect</a></li>
527 <li><a href="#httpSetField" title="Set the value of an HTTP header.">httpSetField</a></li>
528 <li><a href="#httpSetKeepAlive" title="Set the current Keep-Alive state of a connection.">httpSetKeepAlive</a></li>
529 <li><a href="#httpSetLength" title="Set the content-length and content-encoding.">httpSetLength</a></li>
530 <li><a href="#httpSetTimeout" title="Set read/write timeouts and an optional callback.">httpSetTimeout</a></li>
531 <li><a href="#httpShutdown" title="Shutdown one side of an HTTP connection.">httpShutdown</a></li>
532 <li><a href="#httpStateString" title="Return the string describing a HTTP state value.">httpStateString</a></li>
533 <li><a href="#httpStatus" title="Return a short string describing a HTTP status code.">httpStatus</a></li>
534 <li><a href="#httpTrace" title="Send an TRACE request to the server.">httpTrace</a></li>
535 <li><a href="#httpURIStatusString" title="Return a string describing a URI status code.">httpURIStatusString</a></li>
536 <li><a href="#httpUpdate" title="Update the current HTTP state for incoming data.">httpUpdate</a></li>
537 <li><a href="#httpWait" title="Wait for data available on a connection.">httpWait</a></li>
538 <li><a href="#httpWrite" title="Write data to a HTTP connection.">httpWrite</a></li>
539 <li><a href="#httpWrite2" title="Write data to a HTTP connection.">httpWrite2</a></li>
540 <li><a href="#httpWriteResponse" title="Write a HTTP response to a client connection.">httpWriteResponse</a></li>
541 <li><a href="#ippAddBoolean" title="Add a boolean attribute to an IPP message.">ippAddBoolean</a></li>
542 <li><a href="#ippAddBooleans" title="Add an array of boolean values.">ippAddBooleans</a></li>
543 <li><a href="#ippAddCollection" title="Add a collection value.">ippAddCollection</a></li>
544 <li><a href="#ippAddCollections" title="Add an array of collection values.">ippAddCollections</a></li>
545 <li><a href="#ippAddDate" title="Add a date attribute to an IPP message.">ippAddDate</a></li>
546 <li><a href="#ippAddInteger" title="Add a integer attribute to an IPP message.">ippAddInteger</a></li>
547 <li><a href="#ippAddIntegers" title="Add an array of integer values.">ippAddIntegers</a></li>
548 <li><a href="#ippAddOctetString" title="Add an octetString value to an IPP message.">ippAddOctetString</a></li>
549 <li><a href="#ippAddOutOfBand" title="Add an out-of-band value to an IPP message.">ippAddOutOfBand</a></li>
550 <li><a href="#ippAddRange" title="Add a range of values to an IPP message.">ippAddRange</a></li>
551 <li><a href="#ippAddRanges" title="Add ranges of values to an IPP message.">ippAddRanges</a></li>
552 <li><a href="#ippAddResolution" title="Add a resolution value to an IPP message.">ippAddResolution</a></li>
553 <li><a href="#ippAddResolutions" title="Add resolution values to an IPP message.">ippAddResolutions</a></li>
554 <li><a href="#ippAddSeparator" title="Add a group separator to an IPP message.">ippAddSeparator</a></li>
555 <li><a href="#ippAddString" title="Add a language-encoded string to an IPP message.">ippAddString</a></li>
556 <li><a href="#ippAddStringf" title="Add a formatted string to an IPP message.">ippAddStringf</a></li>
557 <li><a href="#ippAddStringfv" title="Add a formatted string to an IPP message.">ippAddStringfv</a></li>
558 <li><a href="#ippAddStrings" title="Add language-encoded strings to an IPP message.">ippAddStrings</a></li>
559 <li><a href="#ippAttributeString" title="Convert the attribute's value to a string.">ippAttributeString</a></li>
560 <li><a href="#ippContainsInteger" title="Determine whether an attribute contains the
561 specified value or is within the list of ranges.">ippContainsInteger</a></li>
562 <li><a href="#ippContainsString" title="Determine whether an attribute contains the
563 specified string value.">ippContainsString</a></li>
564 <li><a href="#ippCopyAttribute" title="Copy an attribute.">ippCopyAttribute</a></li>
565 <li><a href="#ippCopyAttributes" title="Copy attributes from one IPP message to another.">ippCopyAttributes</a></li>
566 <li><a href="#ippCreateRequestedArray" title="Create a CUPS array of attribute names from the
567 given requested-attributes attribute.">ippCreateRequestedArray</a></li>
568 <li><a href="#ippDateToTime" title="Convert from RFC 1903 Date/Time format to UNIX time
569 in seconds.">ippDateToTime</a></li>
570 <li><a href="#ippDelete" title="Delete an IPP message.">ippDelete</a></li>
571 <li><a href="#ippDeleteAttribute" title="Delete a single attribute in an IPP message.">ippDeleteAttribute</a></li>
572 <li><a href="#ippDeleteValues" title="Delete values in an attribute.">ippDeleteValues</a></li>
573 <li><a href="#ippEnumString" title="Return a string corresponding to the enum value.">ippEnumString</a></li>
574 <li><a href="#ippEnumValue" title="Return the value associated with a given enum string.">ippEnumValue</a></li>
575 <li><a href="#ippErrorString" title="Return a name for the given status code.">ippErrorString</a></li>
576 <li><a href="#ippErrorValue" title="Return a status code for the given name.">ippErrorValue</a></li>
577 <li><a href="#ippFindAttribute" title="Find a named attribute in a request.">ippFindAttribute</a></li>
578 <li><a href="#ippFindNextAttribute" title="Find the next named attribute in a request.">ippFindNextAttribute</a></li>
579 <li><a href="#ippFirstAttribute" title="Return the first attribute in the message.">ippFirstAttribute</a></li>
580 <li><a href="#ippGetBoolean" title="Get a boolean value for an attribute.">ippGetBoolean</a></li>
581 <li><a href="#ippGetCollection" title="Get a collection value for an attribute.">ippGetCollection</a></li>
582 <li><a href="#ippGetCount" title="Get the number of values in an attribute.">ippGetCount</a></li>
583 <li><a href="#ippGetDate" title="Get a date value for an attribute.">ippGetDate</a></li>
584 <li><a href="#ippGetGroupTag" title="Get the group associated with an attribute.">ippGetGroupTag</a></li>
585 <li><a href="#ippGetInteger" title="Get the integer/enum value for an attribute.">ippGetInteger</a></li>
586 <li><a href="#ippGetName" title="Get the attribute name.">ippGetName</a></li>
587 <li><a href="#ippGetOctetString" title="Get an octetString value from an IPP attribute.">ippGetOctetString</a></li>
588 <li><a href="#ippGetOperation" title="Get the operation ID in an IPP message.">ippGetOperation</a></li>
589 <li><a href="#ippGetRange" title="Get a rangeOfInteger value from an attribute.">ippGetRange</a></li>
590 <li><a href="#ippGetRequestId" title="Get the request ID from an IPP message.">ippGetRequestId</a></li>
591 <li><a href="#ippGetResolution" title="Get a resolution value for an attribute.">ippGetResolution</a></li>
592 <li><a href="#ippGetState" title="Get the IPP message state.">ippGetState</a></li>
593 <li><a href="#ippGetStatusCode" title="Get the status code from an IPP response or event message.">ippGetStatusCode</a></li>
594 <li><a href="#ippGetString" title="Return the value...">ippGetString</a></li>
595 <li><a href="#ippGetValueTag" title="Get the value tag for an attribute.">ippGetValueTag</a></li>
596 <li><a href="#ippGetVersion" title="Get the major and minor version number from an IPP message.">ippGetVersion</a></li>
597 <li><a href="#ippLength" title="Compute the length of an IPP message.">ippLength</a></li>
598 <li><a href="#ippNew" title="Allocate a new IPP message.">ippNew</a></li>
599 <li><a href="#ippNewRequest" title="Allocate a new IPP request message.">ippNewRequest</a></li>
600 <li><a href="#ippNewResponse" title="Allocate a new IPP response message.">ippNewResponse</a></li>
601 <li><a href="#ippNextAttribute" title="Return the next attribute in the message.">ippNextAttribute</a></li>
602 <li><a href="#ippOpString" title="Return a name for the given operation id.">ippOpString</a></li>
603 <li><a href="#ippOpValue" title="Return an operation id for the given name.">ippOpValue</a></li>
604 <li><a href="#ippPort" title="Return the default IPP port number.">ippPort</a></li>
605 <li><a href="#ippRead" title="Read data for an IPP message from a HTTP connection.">ippRead</a></li>
606 <li><a href="#ippReadFile" title="Read data for an IPP message from a file.">ippReadFile</a></li>
607 <li><a href="#ippReadIO" title="Read data for an IPP message.">ippReadIO</a></li>
608 <li><a href="#ippSetBoolean" title="Set a boolean value in an attribute.">ippSetBoolean</a></li>
609 <li><a href="#ippSetCollection" title="Set a collection value in an attribute.">ippSetCollection</a></li>
610 <li><a href="#ippSetDate" title="Set a date value in an attribute.">ippSetDate</a></li>
611 <li><a href="#ippSetGroupTag" title="Set the group tag of an attribute.">ippSetGroupTag</a></li>
612 <li><a href="#ippSetInteger" title="Set an integer or enum value in an attribute.">ippSetInteger</a></li>
613 <li><a href="#ippSetName" title="Set the name of an attribute.">ippSetName</a></li>
614 <li><a href="#ippSetOctetString" title="Set an octetString value in an IPP attribute.">ippSetOctetString</a></li>
615 <li><a href="#ippSetOperation" title="Set the operation ID in an IPP request message.">ippSetOperation</a></li>
616 <li><a href="#ippSetPort" title="Set the default port number.">ippSetPort</a></li>
617 <li><a href="#ippSetRange" title="Set a rangeOfInteger value in an attribute.">ippSetRange</a></li>
618 <li><a href="#ippSetRequestId" title="Set the request ID in an IPP message.">ippSetRequestId</a></li>
619 <li><a href="#ippSetResolution" title="Set a resolution value in an attribute.">ippSetResolution</a></li>
620 <li><a href="#ippSetState" title="Set the current state of the IPP message.">ippSetState</a></li>
621 <li><a href="#ippSetStatusCode" title="Set the status code in an IPP response or event message.">ippSetStatusCode</a></li>
622 <li><a href="#ippSetString" title="Set a string value in an attribute.">ippSetString</a></li>
623 <li><a href="#ippSetStringf" title="Set a formatted string value of an attribute.">ippSetStringf</a></li>
624 <li><a href="#ippSetStringfv" title="Set a formatted string value of an attribute.">ippSetStringfv</a></li>
625 <li><a href="#ippSetValueTag" title="Set the value tag of an attribute.">ippSetValueTag</a></li>
626 <li><a href="#ippSetVersion" title="Set the version number in an IPP message.">ippSetVersion</a></li>
627 <li><a href="#ippStateString" title="Return the name corresponding to a state value.">ippStateString</a></li>
628 <li><a href="#ippTagString" title="Return the tag name corresponding to a tag value.">ippTagString</a></li>
629 <li><a href="#ippTagValue" title="Return the tag value corresponding to a tag name.">ippTagValue</a></li>
630 <li><a href="#ippTimeToDate" title="Convert from UNIX time to RFC 1903 format.">ippTimeToDate</a></li>
631 <li><a href="#ippValidateAttribute" title="Validate the contents of an attribute.">ippValidateAttribute</a></li>
632 <li><a href="#ippValidateAttributes" title="Validate all attributes in an IPP message.">ippValidateAttributes</a></li>
633 <li><a href="#ippWrite" title="Write data for an IPP message to a HTTP connection.">ippWrite</a></li>
634 <li><a href="#ippWriteFile" title="Write data for an IPP message to a file.">ippWriteFile</a></li>
635 <li><a href="#ippWriteIO" title="Write data for an IPP message.">ippWriteIO</a></li>
636 </ul></li>
637 <li><a href="#TYPES">Data Types</a><ul class="code">
638 <li><a href="#gss_auth_identity_desc" title="Local functions...">gss_auth_identity_desc</a></li>
639 <li><a href="#http_addr_t" title="Socket address union, which
640 makes using IPv6 and other
641 address types easier and
642 more portable. ">http_addr_t</a></li>
643 <li><a href="#http_addrlist_t" title="Socket address list, which is
644 used to enumerate all of the
645 addresses that are associated
646 with a hostname. ">http_addrlist_t</a></li>
647 <li><a href="#http_auth_t" title="HTTP authentication types">http_auth_t</a></li>
648 <li><a href="#http_credential_t" title="HTTP credential data ">http_credential_t</a></li>
649 <li><a href="#http_encoding_t" title="HTTP transfer encoding values">http_encoding_t</a></li>
650 <li><a href="#http_encryption_t" title="HTTP encryption values">http_encryption_t</a></li>
651 <li><a href="#http_field_t" title="HTTP field names">http_field_t</a></li>
652 <li><a href="#http_keepalive_t" title="HTTP keep-alive values">http_keepalive_t</a></li>
653 <li><a href="#http_state_t" title="HTTP state values; states
654 are server-oriented...">http_state_t</a></li>
655 <li><a href="#http_t" title="HTTP connection type">http_t</a></li>
656 <li><a href="#http_timeout_cb_t" title="HTTP timeout callback ">http_timeout_cb_t</a></li>
657 <li><a href="#http_trust_t" title="Level of trust for credentials ">http_trust_t</a></li>
658 <li><a href="#http_uri_coding_t" title="URI en/decode flags">http_uri_coding_t</a></li>
659 <li><a href="#http_uri_status_t" title="URI separation status ">http_uri_status_t</a></li>
660 <li><a href="#http_version_t" title="HTTP version numbers">http_version_t</a></li>
661 <li><a href="#ipp_attribute_t" title="IPP attribute">ipp_attribute_t</a></li>
662 <li><a href="#ipp_copycb_t" title="The following structures are PRIVATE starting with CUPS 1.6/macOS 10.8.
663 Please use the new accessor functions available in CUPS 1.6 and later, as
664 these definitions will be moved to a private header file in a future release.">ipp_copycb_t</a></li>
665 <li><a href="#ipp_dstate_t" title="Document states">ipp_dstate_t</a></li>
666 <li><a href="#ipp_finish_t" title="Job collation types">ipp_finish_t</a></li>
667 <li><a href="#ipp_iocb_t" title="IPP IO Callback Function ">ipp_iocb_t</a></li>
668 <li><a href="#ipp_jcollate_t" title="Job collation types">ipp_jcollate_t</a></li>
669 <li><a href="#ipp_orient_t" title="Orientation values">ipp_orient_t</a></li>
670 <li><a href="#ipp_pstate_t" title="Printer states">ipp_pstate_t</a></li>
671 <li><a href="#ipp_quality_t" title="Qualities">ipp_quality_t</a></li>
672 <li><a href="#ipp_res_t" title="Resolution units">ipp_res_t</a></li>
673 <li><a href="#ipp_state_t" title="IPP states">ipp_state_t</a></li>
674 <li><a href="#ipp_t" title="IPP request/response data">ipp_t</a></li>
675 <li><a href="#ipp_uchar_t" title="Unsigned 8-bit integer/character">ipp_uchar_t</a></li>
676 </ul></li>
677 <li><a href="#STRUCTURES">Structures</a><ul class="code">
678 <li><a href="#gss_auth_identity" title="Local functions...">gss_auth_identity</a></li>
679 <li><a href="#http_addrlist_s" title="Socket address list, which is
680 used to enumerate all of the
681 addresses that are associated
682 with a hostname. ">http_addrlist_s</a></li>
683 <li><a href="#http_credential_s" title="HTTP credential data ">http_credential_s</a></li>
684 <li><a href="#pollfd" title="User data (unused)">pollfd</a></li>
685 </ul></li>
686 <li><a href="#ENUMERATIONS">Constants</a><ul class="code">
687 <li><a href="#http_auth_e" title="HTTP authentication types">http_auth_e</a></li>
688 <li><a href="#http_encoding_e" title="HTTP transfer encoding values">http_encoding_e</a></li>
689 <li><a href="#http_encryption_e" title="HTTP encryption values">http_encryption_e</a></li>
690 <li><a href="#http_field_e" title="HTTP field names">http_field_e</a></li>
691 <li><a href="#http_keepalive_e" title="HTTP keep-alive values">http_keepalive_e</a></li>
692 <li><a href="#http_state_e" title="HTTP state values; states
693 are server-oriented...">http_state_e</a></li>
694 <li><a href="#http_status_e" title="HTTP status codes">http_status_e</a></li>
695 <li><a href="#http_trust_e" title="Level of trust for credentials ">http_trust_e</a></li>
696 <li><a href="#http_uri_coding_e" title="URI en/decode flags">http_uri_coding_e</a></li>
697 <li><a href="#http_uri_status_e" title="URI separation status ">http_uri_status_e</a></li>
698 <li><a href="#http_version_e" title="HTTP version numbers">http_version_e</a></li>
699 <li><a href="#ipp_dstate_e" title="Document states">ipp_dstate_e</a></li>
700 <li><a href="#ipp_finishings_e" title="Finishings">ipp_finishings_e</a></li>
701 <li><a href="#ipp_jcollate_e" title="Job collation types">ipp_jcollate_e</a></li>
702 <li><a href="#ipp_jstate_e" title="Job states">ipp_jstate_e</a></li>
703 <li><a href="#ipp_op_e" title="IPP operations">ipp_op_e</a></li>
704 <li><a href="#ipp_orient_e" title="Orientation values">ipp_orient_e</a></li>
705 <li><a href="#ipp_pstate_e" title="Printer states">ipp_pstate_e</a></li>
706 <li><a href="#ipp_quality_e" title="Qualities">ipp_quality_e</a></li>
707 <li><a href="#ipp_res_e" title="Resolution units">ipp_res_e</a></li>
708 <li><a href="#ipp_state_e" title="IPP states">ipp_state_e</a></li>
709 <li><a href="#ipp_status_e" title="IPP status codes">ipp_status_e</a></li>
710 <li><a href="#ipp_tag_e" title="Format tags for attributes">ipp_tag_e</a></li>
711 </ul></li>
712 </ul>
713 <!--
714 HTTP and IPP API introduction for CUPS.
715
716 Copyright 2007-2012 by Apple Inc.
717 Copyright 1997-2006 by Easy Software Products, all rights reserved.
718
719 These coded instructions, statements, and computer programs are the
720 property of Apple Inc. and are protected by Federal copyright
721 law. Distribution and use rights are outlined in the file "LICENSE.txt"
722 which should have been included with this file. If this file is
723 file is missing or damaged, see the license at "http://www.cups.org/".
724 -->
725
726 <h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
727
728 <p>The CUPS HTTP and IPP APIs provide low-level access to the HTTP and IPP
729 protocols and CUPS scheduler. They are typically used by monitoring and
730 administration programs to perform specific functions not supported by the
731 high-level CUPS API functions.</p>
732
733 <p>The HTTP APIs use an opaque structure called
734 <a href='#http_t'><code>http_t</code></a> to manage connections to
735 a particular HTTP or IPP server. The
736 <a href='#httpConnectEncrypt'><code>httpConnectEncrypt</code></a> function is
737 used to create an instance of this structure for a particular server.
738 The constant <code>CUPS_HTTP_DEFAULT</code> can be used with all of the
739 <code>cups</code> functions to refer to the default CUPS server - the functions
740 create a per-thread <a href='#http_t'><code>http_t</code></a> as needed.</p>
741
742 <p>The IPP APIs use two opaque structures for requests (messages sent to the CUPS scheduler) and responses (messages sent back to your application from the scheduler). The <a href='#ipp_t'><code>ipp_t</code></a> type holds a complete request or response and is allocated using the <a href='#ippNew'><code>ippNew</code></a> or <a href='#ippNewRequest'><code>ippNewRequest</code></a> functions and freed using the <a href='#ippDelete'><code>ippDelete</code></a> function.</p>
743
744 <p>The second opaque structure is called <a href='#ipp_attribute_t'><code>ipp_attribute_t</code></a> and holds a single IPP attribute which consists of a group tag (<a href='#ippGetGroupTag'><code>ippGetGroupTag</code></a>), a value type tag (<a href='#ippGetValueTag'><code>ippGetValueTag</code></a>), the attribute name (<a href='#ippGetName'><code>ippGetName</code></a>), and 1 or more values (<a href='#ippGetCount'><code>ippGetCount</code></a>, <a href='#ippGetBoolean'><code>ippGetBoolean</code></a>, <a href='#ippGetCollection'><code>ippGetCollection</code></a>, <a href='#ippGetDate'><code>ippGetDate</code></a>, <a href='#ippGetInteger'><code>ippGetInteger</code></a>, <a href='#ippGetRange'><code>ippGetRange</code></a>, <a href='#ippGetResolution'><code>ippGetResolution</code></a>, and <a href='#ippGetString'><code>ippGetString</code></a>). Attributes are added to an <a href='#ipp_t'><code>ipp_t</code></a> pointer using one of the <code>ippAdd</code> functions. For example, use <a href='#ippAddString'><code>ippAddString</code></a> to add the "printer-uri" and "requesting-user-name" string attributes to a request:</p>
745
746 <pre class='example'>
747 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_GET_JOBS);
748
749 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
750 NULL, "ipp://localhost/printers/");
751 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
752 NULL, cupsUser());
753 </pre>
754
755 <p>Once you have created an IPP request, use the <code>cups</code> functions to send the request to and read the response from the server. For example, the <a href='#cupsDoRequest'><code>cupsDoRequest</code></a> function can be used for simple query operations that do not involve files:</p>
756
757 <pre class='example'>
758 #include &lt;cups/cups.h&gt;
759
760
761 <a href='#ipp_t'>ipp_t</a> *<a name='get_jobs'>get_jobs</a>(void)
762 {
763 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_GET_JOBS);
764
765 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
766 NULL, "ipp://localhost/printers/");
767 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
768 NULL, cupsUser());
769
770 return (<a href='#cupsDoRequest'>cupsDoRequest</a>(CUPS_HTTP_DEFAULT, request, "/"));
771 }
772 </pre>
773
774 <p>The <a href='#cupsDoRequest'><code>cupsDoRequest</code></a> function frees the request and returns an IPP response or <code>NULL</code> pointer if the request could not be sent to the server. Once you have a response from the server, you can either use the <a href='#ippFindAttribute'><code>ippFindAttribute</code></a> and <a href='#ippFindNextAttribute'><code>ippFindNextAttribute</code></a> functions to find specific attributes, for example:</p>
775
776 <pre class='example'>
777 <a href='#ipp_t'>ipp_t</a> *response;
778 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr;
779
780 attr = <a href='#ippFindAttribute'>ippFindAttribute</a>(response, "printer-state", IPP_TAG_ENUM);
781 </pre>
782
783 <p>You can also walk the list of attributes with a simple <code>for</code> loop like this:</p>
784
785 <pre class='example'>
786 <a href='#ipp_t'>ipp_t</a> *response;
787 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr;
788
789 for (attr = <a href='#ippFirstAttribute'>ippFirstAttribute</a>(response); attr != NULL; attr = <a href='#ippNextAttribute'>ippNextAttribute</a>(response))
790 if (ippGetName(attr) == NULL)
791 puts("--SEPARATOR--");
792 else
793 puts(ippGetName(attr));
794 </pre>
795
796 <p>The <code>for</code> loop approach is normally used when collecting attributes for multiple objects (jobs, printers, etc.) in a response. Attributes with <code>NULL</code> names indicate a separator between the attributes of each object. For example, the following code will list the jobs returned from our previous <a href='#get_jobs'><code>get_jobs</code></a> example code:</p>
797
798 <pre class='example'>
799 <a href='#ipp_t'>ipp_t</a> *response = <a href='#get_jobs'>get_jobs</a>();
800
801 if (response != NULL)
802 {
803 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr;
804 const char *attrname;
805 int job_id = 0;
806 const char *job_name = NULL;
807 const char *job_originating_user_name = NULL;
808
809 puts("Job ID Owner Title");
810 puts("------ ---------------- ---------------------------------");
811
812 for (attr = <a href='#ippFirstAttribute'>ippFirstAttribute</a>(response); attr != NULL; attr = <a href='#ippNextAttribute'>ippNextAttribute</a>(response))
813 {
814 /* Attributes without names are separators between jobs */
815 attrname = ippGetName(attr);
816 if (attrname == NULL)
817 {
818 if (job_id > 0)
819 {
820 if (job_name == NULL)
821 job_name = "(withheld)";
822
823 if (job_originating_user_name == NULL)
824 job_originating_user_name = "(withheld)";
825
826 printf("%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
827 }
828
829 job_id = 0;
830 job_name = NULL;
831 job_originating_user_name = NULL;
832 continue;
833 }
834 else if (!strcmp(attrname, "job-id") &amp;&amp; ippGetValueTag(attr) == IPP_TAG_INTEGER)
835 job_id = ippGetInteger(attr, 0);
836 else if (!strcmp(attrname, "job-name") &amp;&amp; ippGetValueTag(attr) == IPP_TAG_NAME)
837 job_name = ippGetString(attr, 0, NULL);
838 else if (!strcmp(attrname, "job-originating-user-name") &amp;&amp;
839 ippGetValueTag(attr) == IPP_TAG_NAME)
840 job_originating_user_name = ippGetString(attr, 0, NULL);
841 }
842
843 if (job_id > 0)
844 {
845 if (job_name == NULL)
846 job_name = "(withheld)";
847
848 if (job_originating_user_name == NULL)
849 job_originating_user_name = "(withheld)";
850
851 printf("%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
852 }
853 }
854 </pre>
855
856 <h3><a name='CREATING_URI_STRINGS'>Creating URI Strings</a></h3>
857
858 <p>To ensure proper encoding, the
859 <a href='#httpAssembleURIf'><code>httpAssembleURIf</code></a> function must be
860 used to format a "printer-uri" string for all printer-based requests:</p>
861
862 <pre class='example'>
863 const char *name = "Foo";
864 char uri[1024];
865 <a href='#ipp_t'>ipp_t</a> *request;
866
867 <a href='#httpAssembleURIf'>httpAssembleURIf</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, cupsServer(),
868 ippPort(), "/printers/%s", name);
869 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
870 </pre>
871
872 <h3><a name='SENDING_REQUESTS_WITH_FILES'>Sending Requests with Files</a></h3>
873
874 <p>The <a href='#cupsDoFileRequest'><code>cupsDoFileRequest</code></a> and
875 <a href='#cupsDoIORequest'><code>cupsDoIORequest</code></a> functions are
876 used for requests involving files. The
877 <a href='#cupsDoFileRequest'><code>cupsDoFileRequest</code></a> function
878 attaches the named file to a request and is typically used when sending a print
879 file or changing a printer's PPD file:</p>
880
881 <pre class='example'>
882 const char *filename = "/usr/share/cups/data/testprint.ps";
883 const char *name = "Foo";
884 char uri[1024];
885 char resource[1024];
886 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_PRINT_JOB);
887 <a href='#ipp_t'>ipp_t</a> *response;
888
889 /* Use httpAssembleURIf for the printer-uri string */
890 <a href='#httpAssembleURIf'>httpAssembleURIf</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, cupsServer(),
891 ippPort(), "/printers/%s", name);
892 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
893 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
894 NULL, cupsUser());
895 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name",
896 NULL, "testprint.ps");
897
898 /* Use snprintf for the resource path */
899 snprintf(resource, sizeof(resource), "/printers/%s", name);
900
901 response = <a href='#cupsDoFileRequest'>cupsDoFileRequest</a>(CUPS_HTTP_DEFAULT, request, resource, filename);
902 </pre>
903
904 <p>The <a href='#cupsDoIORequest'><code>cupsDoIORequest</code></a> function
905 optionally attaches a file to the request and optionally saves a file in the
906 response from the server. It is used when using a pipe for the request
907 attachment or when using a request that returns a file, currently only
908 <code>CUPS_GET_DOCUMENT</code> and <code>CUPS_GET_PPD</code>. For example,
909 the following code will download the PPD file for the sample HP LaserJet
910 printer driver:</p>
911
912 <pre class='example'>
913 char tempfile[1024];
914 int tempfd;
915 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD);
916 <a href='#ipp_t'>ipp_t</a> *response;
917
918 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
919 NULL, "laserjet.ppd");
920
921 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
922
923 response = <a href='#cupsDoIORequest'>cupsDoIORequest</a>(CUPS_HTTP_DEFAULT, request, "/", -1, tempfd);
924 </pre>
925
926 <p>The example passes <code>-1</code> for the input file descriptor to specify
927 that no file is to be attached to the request. The PPD file attached to the
928 response is written to the temporary file descriptor we created using the
929 <code>cupsTempFd</code> function.</p>
930
931 <h3><a name='ASYNCHRONOUS_REQUEST_PROCESSING'>Asynchronous Request Processing</a></h3>
932
933 <p>The <a href='#cupsSendRequest'><code>cupsSendRequest</code></a> and
934 <a href='#cupsGetResponse'><code>cupsGetResponse</code></a> support
935 asynchronous communications with the server. Unlike the other request
936 functions, the IPP request is not automatically freed, so remember to
937 free your request with the <a href='#ippDelete'><code>ippDelete</code></a>
938 function.</p>
939
940 <p>File data is attached to the request using the
941 <a href='#cupsWriteRequestData'><code>cupsWriteRequestData</code></a>
942 function, while file data returned from the server is read using the
943 <a href='#cupsReadResponseData'><code>cupsReadResponseData</code></a>
944 function. We can rewrite the previous <code>CUPS_GET_PPD</code> example
945 to use the asynchronous functions quite easily:</p>
946
947 <pre class='example'>
948 char tempfile[1024];
949 int tempfd;
950 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD);
951 <a href='#ipp_t'>ipp_t</a> *response;
952
953 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
954 NULL, "laserjet.ppd");
955
956 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
957
958 if (<a href='#cupsSendRequest'>cupsSendRequest</a>(CUPS_HTTP_DEFAULT, request, "/") == HTTP_CONTINUE)
959 {
960 response = <a href='#cupsGetResponse'>cupsGetResponse</a>(CUPS_HTTP_DEFAULT, "/");
961
962 if (response != NULL)
963 {
964 ssize_t bytes;
965 char buffer[8192];
966
967 while ((bytes = <a href='#cupsReadResponseData'>cupsReadResponseData</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer))) > 0)
968 write(tempfd, buffer, bytes);
969 }
970 }
971
972 /* Free the request! */
973 <a href='#ippDelete'>ippDelete</a>(request);
974 </pre>
975
976 <p>The <a href='#cupsSendRequest'><code>cupsSendRequest</code></a> function
977 returns the initial HTTP request status, typically either
978 <code>HTTP_CONTINUE</code> or <code>HTTP_UNAUTHORIZED</code>. The latter status
979 is returned when the request requires authentication of some sort. The
980 <a href='#cupsDoAuthentication'><code>cupsDoAuthentication</code></a> function
981 must be called when your see <code>HTTP_UNAUTHORIZED</code> and the request
982 re-sent. We can add authentication support to our example code by using a
983 <code>do ... while</code> loop:</p>
984
985 <pre class='example'>
986 char tempfile[1024];
987 int tempfd;
988 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD);
989 <a href='#ipp_t'>ipp_t</a> *response;
990 http_status_t status;
991
992 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
993 NULL, "laserjet.ppd");
994
995 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
996
997 /* Loop for authentication */
998 do
999 {
1000 status = <a href='#cupsSendRequest'>cupsSendRequest</a>(CUPS_HTTP_DEFAULT, request, "/");
1001
1002 if (status == HTTP_UNAUTHORIZED)
1003 {
1004 /* Try to authenticate, break out of the loop if that fails */
1005 if (<a href='#cupsDoAuthentication'>cupsDoAuthentication</a>(CUPS_HTTP_DEFAULT, "POST", "/"))
1006 break;
1007 }
1008 }
1009 while (status != HTTP_CONTINUE &amp;&amp; status != HTTP_UNAUTHORIZED);
1010
1011 if (status == HTTP_CONTINUE)
1012 {
1013 response = <a href='#cupsGetResponse'>cupsGetResponse</a>(CUPS_HTTP_DEFAULT, "/");
1014
1015 if (response != NULL)
1016 {
1017 ssize_t bytes;
1018 char buffer[8192];
1019
1020 while ((bytes = <a href='#cupsReadResponseData'>cupsReadResponseData</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer))) > 0)
1021 write(tempfd, buffer, bytes);
1022 }
1023 }
1024
1025 /* Free the request! */
1026 <a href='#ippDelete'>ippDelete</a>(request);
1027 </pre>
1028 <h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
1029 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/macOS 10.4&nbsp;</span><a name="cupsDoAuthentication">cupsDoAuthentication</a></h3>
1030 <p class="description">Authenticate a request.</p>
1031 <p class="code">
1032 int cupsDoAuthentication (<br>
1033 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1034 &nbsp;&nbsp;&nbsp;&nbsp;const char *method,<br>
1035 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource<br>
1036 );</p>
1037 <h4 class="parameters">Parameters</h4>
1038 <dl>
1039 <dt>http</dt>
1040 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1041 <dt>method</dt>
1042 <dd class="description">Request method (&quot;GET&quot;, &quot;POST&quot;, &quot;PUT&quot;)</dd>
1043 <dt>resource</dt>
1044 <dd class="description">Resource path</dd>
1045 </dl>
1046 <h4 class="returnvalue">Return Value</h4>
1047 <p class="description">0 on success, -1 on error</p>
1048 <h4 class="discussion">Discussion</h4>
1049 <p class="discussion">This function should be called in response to a <code>HTTP_STATUS_UNAUTHORIZED</code>
1050 status, prior to resubmitting your request.
1051
1052 </p>
1053 <h3 class="function"><a name="cupsDoFileRequest">cupsDoFileRequest</a></h3>
1054 <p class="description">Do an IPP request with a file.</p>
1055 <p class="code">
1056 <a href="#ipp_t">ipp_t</a> *cupsDoFileRequest (<br>
1057 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1058 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *request,<br>
1059 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1060 &nbsp;&nbsp;&nbsp;&nbsp;const char *filename<br>
1061 );</p>
1062 <h4 class="parameters">Parameters</h4>
1063 <dl>
1064 <dt>http</dt>
1065 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1066 <dt>request</dt>
1067 <dd class="description">IPP request</dd>
1068 <dt>resource</dt>
1069 <dd class="description">HTTP resource for POST</dd>
1070 <dt>filename</dt>
1071 <dd class="description">File to send or <code>NULL</code> for none</dd>
1072 </dl>
1073 <h4 class="returnvalue">Return Value</h4>
1074 <p class="description">Response data</p>
1075 <h4 class="discussion">Discussion</h4>
1076 <p class="discussion">This function sends the IPP request and attached file to the specified
1077 server, retrying and authenticating as necessary. The request is freed with
1078 <a href="#ippDelete"><code>ippDelete</code></a>.</p>
1079 <h3 class="function"><span class="info">&nbsp;CUPS 1.3/macOS 10.5&nbsp;</span><a name="cupsDoIORequest">cupsDoIORequest</a></h3>
1080 <p class="description">Do an IPP request with file descriptors.</p>
1081 <p class="code">
1082 <a href="#ipp_t">ipp_t</a> *cupsDoIORequest (<br>
1083 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1084 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *request,<br>
1085 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1086 &nbsp;&nbsp;&nbsp;&nbsp;int infile,<br>
1087 &nbsp;&nbsp;&nbsp;&nbsp;int outfile<br>
1088 );</p>
1089 <h4 class="parameters">Parameters</h4>
1090 <dl>
1091 <dt>http</dt>
1092 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1093 <dt>request</dt>
1094 <dd class="description">IPP request</dd>
1095 <dt>resource</dt>
1096 <dd class="description">HTTP resource for POST</dd>
1097 <dt>infile</dt>
1098 <dd class="description">File to read from or -1 for none</dd>
1099 <dt>outfile</dt>
1100 <dd class="description">File to write to or -1 for none</dd>
1101 </dl>
1102 <h4 class="returnvalue">Return Value</h4>
1103 <p class="description">Response data</p>
1104 <h4 class="discussion">Discussion</h4>
1105 <p class="discussion">This function sends the IPP request with the optional input file &quot;infile&quot; to
1106 the specified server, retrying and authenticating as necessary. The request
1107 is freed with <a href="#ippDelete"><code>ippDelete</code></a>.<br>
1108 <br>
1109 If &quot;infile&quot; is a valid file descriptor, <code>cupsDoIORequest</code> copies
1110 all of the data from the file after the IPP request message.<br>
1111 <br>
1112 If &quot;outfile&quot; is a valid file descriptor, <code>cupsDoIORequest</code> copies
1113 all of the data after the IPP response message to the file.
1114
1115 </p>
1116 <h3 class="function"><a name="cupsDoRequest">cupsDoRequest</a></h3>
1117 <p class="description">Do an IPP request.</p>
1118 <p class="code">
1119 <a href="#ipp_t">ipp_t</a> *cupsDoRequest (<br>
1120 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1121 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *request,<br>
1122 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource<br>
1123 );</p>
1124 <h4 class="parameters">Parameters</h4>
1125 <dl>
1126 <dt>http</dt>
1127 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1128 <dt>request</dt>
1129 <dd class="description">IPP request</dd>
1130 <dt>resource</dt>
1131 <dd class="description">HTTP resource for POST</dd>
1132 </dl>
1133 <h4 class="returnvalue">Return Value</h4>
1134 <p class="description">Response data</p>
1135 <h4 class="discussion">Discussion</h4>
1136 <p class="discussion">This function sends the IPP request to the specified server, retrying
1137 and authenticating as necessary. The request is freed with <a href="#ippDelete"><code>ippDelete</code></a>.</p>
1138 <h3 class="function"><a name="cupsEncodeOptions">cupsEncodeOptions</a></h3>
1139 <p class="description">Encode printer options into IPP attributes.</p>
1140 <p class="code">
1141 void cupsEncodeOptions (<br>
1142 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
1143 &nbsp;&nbsp;&nbsp;&nbsp;int num_options,<br>
1144 &nbsp;&nbsp;&nbsp;&nbsp;cups_option_t *options<br>
1145 );</p>
1146 <h4 class="parameters">Parameters</h4>
1147 <dl>
1148 <dt>ipp</dt>
1149 <dd class="description">Request to add to</dd>
1150 <dt>num_options</dt>
1151 <dd class="description">Number of options</dd>
1152 <dt>options</dt>
1153 <dd class="description">Options</dd>
1154 </dl>
1155 <h4 class="discussion">Discussion</h4>
1156 <p class="discussion">This function adds operation, job, and then subscription attributes,
1157 in that order. Use the cupsEncodeOptions2() function to add attributes
1158 for a single group.</p>
1159 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="cupsEncodeOptions2">cupsEncodeOptions2</a></h3>
1160 <p class="description">Encode printer options into IPP attributes for a group.</p>
1161 <p class="code">
1162 void cupsEncodeOptions2 (<br>
1163 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
1164 &nbsp;&nbsp;&nbsp;&nbsp;int num_options,<br>
1165 &nbsp;&nbsp;&nbsp;&nbsp;cups_option_t *options,<br>
1166 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group_tag<br>
1167 );</p>
1168 <h4 class="parameters">Parameters</h4>
1169 <dl>
1170 <dt>ipp</dt>
1171 <dd class="description">Request to add to</dd>
1172 <dt>num_options</dt>
1173 <dd class="description">Number of options</dd>
1174 <dt>options</dt>
1175 <dd class="description">Options</dd>
1176 <dt>group_tag</dt>
1177 <dd class="description">Group to encode</dd>
1178 </dl>
1179 <h4 class="discussion">Discussion</h4>
1180 <p class="discussion">This function only adds attributes for a single group. Call this
1181 function multiple times for each group, or use cupsEncodeOptions()
1182 to add the standard groups.
1183
1184 </p>
1185 <h3 class="function"><span class="info">&nbsp;CUPS 1.4/macOS 10.6&nbsp;</span><a name="cupsGetDevices">cupsGetDevices</a></h3>
1186 <p class="description">Get available printer devices.</p>
1187 <p class="code">
1188 ipp_status_t cupsGetDevices (<br>
1189 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1190 &nbsp;&nbsp;&nbsp;&nbsp;int timeout,<br>
1191 &nbsp;&nbsp;&nbsp;&nbsp;const char *include_schemes,<br>
1192 &nbsp;&nbsp;&nbsp;&nbsp;const char *exclude_schemes,<br>
1193 &nbsp;&nbsp;&nbsp;&nbsp;cups_device_cb_t callback,<br>
1194 &nbsp;&nbsp;&nbsp;&nbsp;void *user_data<br>
1195 );</p>
1196 <h4 class="parameters">Parameters</h4>
1197 <dl>
1198 <dt>http</dt>
1199 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1200 <dt>timeout</dt>
1201 <dd class="description">Timeout in seconds or <code>CUPS_TIMEOUT_DEFAULT</code></dd>
1202 <dt>include_schemes</dt>
1203 <dd class="description">Comma-separated URI schemes to include or <code>CUPS_INCLUDE_ALL</code></dd>
1204 <dt>exclude_schemes</dt>
1205 <dd class="description">Comma-separated URI schemes to exclude or <code>CUPS_EXCLUDE_NONE</code></dd>
1206 <dt>callback</dt>
1207 <dd class="description">Callback function</dd>
1208 <dt>user_data</dt>
1209 <dd class="description">User data pointer</dd>
1210 </dl>
1211 <h4 class="returnvalue">Return Value</h4>
1212 <p class="description">Request status - <code>IPP_OK</code> on success.</p>
1213 <h4 class="discussion">Discussion</h4>
1214 <p class="discussion">This function sends a CUPS-Get-Devices request and streams the discovered
1215 devices to the specified callback function. The &quot;timeout&quot; parameter controls
1216 how long the request lasts, while the &quot;include_schemes&quot; and &quot;exclude_schemes&quot;
1217 parameters provide comma-delimited lists of backends to include or omit from
1218 the request respectively.
1219
1220 </p>
1221 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/macOS 10.4&nbsp;</span><a name="cupsGetFd">cupsGetFd</a></h3>
1222 <p class="description">Get a file from the server.</p>
1223 <p class="code">
1224 http_status_t cupsGetFd (<br>
1225 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1226 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1227 &nbsp;&nbsp;&nbsp;&nbsp;int fd<br>
1228 );</p>
1229 <h4 class="parameters">Parameters</h4>
1230 <dl>
1231 <dt>http</dt>
1232 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1233 <dt>resource</dt>
1234 <dd class="description">Resource name</dd>
1235 <dt>fd</dt>
1236 <dd class="description">File descriptor</dd>
1237 </dl>
1238 <h4 class="returnvalue">Return Value</h4>
1239 <p class="description">HTTP status</p>
1240 <h4 class="discussion">Discussion</h4>
1241 <p class="discussion">This function returns <code>HTTP_STATUS_OK</code> when the file is successfully retrieved.
1242
1243 </p>
1244 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/macOS 10.4&nbsp;</span><a name="cupsGetFile">cupsGetFile</a></h3>
1245 <p class="description">Get a file from the server.</p>
1246 <p class="code">
1247 http_status_t cupsGetFile (<br>
1248 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1249 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1250 &nbsp;&nbsp;&nbsp;&nbsp;const char *filename<br>
1251 );</p>
1252 <h4 class="parameters">Parameters</h4>
1253 <dl>
1254 <dt>http</dt>
1255 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1256 <dt>resource</dt>
1257 <dd class="description">Resource name</dd>
1258 <dt>filename</dt>
1259 <dd class="description">Filename</dd>
1260 </dl>
1261 <h4 class="returnvalue">Return Value</h4>
1262 <p class="description">HTTP status</p>
1263 <h4 class="discussion">Discussion</h4>
1264 <p class="discussion">This function returns <code>HTTP_STATUS_OK</code> when the file is successfully retrieved.
1265
1266 </p>
1267 <h3 class="function"><span class="info">&nbsp;CUPS 1.4/macOS 10.6&nbsp;</span><a name="cupsGetResponse">cupsGetResponse</a></h3>
1268 <p class="description">Get a response to an IPP request.</p>
1269 <p class="code">
1270 <a href="#ipp_t">ipp_t</a> *cupsGetResponse (<br>
1271 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1272 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource<br>
1273 );</p>
1274 <h4 class="parameters">Parameters</h4>
1275 <dl>
1276 <dt>http</dt>
1277 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1278 <dt>resource</dt>
1279 <dd class="description">HTTP resource for POST</dd>
1280 </dl>
1281 <h4 class="returnvalue">Return Value</h4>
1282 <p class="description">Response or <code>NULL</code> on HTTP error</p>
1283 <h4 class="discussion">Discussion</h4>
1284 <p class="discussion">Use this function to get the response for an IPP request sent using
1285 <a href="#cupsSendRequest"><code>cupsSendRequest</code></a>. For requests that return additional data, use
1286 <a href="#cupsReadResponseData"><code>cupsReadResponseData</code></a> after getting a successful response,
1287 otherwise call <a href="#httpFlush"><code>httpFlush</code></a> to complete the response processing.
1288
1289 </p>
1290 <h3 class="function"><a name="cupsLastError">cupsLastError</a></h3>
1291 <p class="description">Return the last IPP status code received on the current
1292 thread.</p>
1293 <p class="code">
1294 ipp_status_t cupsLastError (void);</p>
1295 <h4 class="returnvalue">Return Value</h4>
1296 <p class="description">IPP status code from last request</p>
1297 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="cupsLastErrorString">cupsLastErrorString</a></h3>
1298 <p class="description">Return the last IPP status-message received on the
1299 current thread.</p>
1300 <p class="code">
1301 const char *cupsLastErrorString (void);</p>
1302 <h4 class="returnvalue">Return Value</h4>
1303 <p class="description">status-message text from last request</p>
1304 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/macOS 10.4&nbsp;</span><a name="cupsPutFd">cupsPutFd</a></h3>
1305 <p class="description">Put a file on the server.</p>
1306 <p class="code">
1307 http_status_t cupsPutFd (<br>
1308 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1309 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1310 &nbsp;&nbsp;&nbsp;&nbsp;int fd<br>
1311 );</p>
1312 <h4 class="parameters">Parameters</h4>
1313 <dl>
1314 <dt>http</dt>
1315 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1316 <dt>resource</dt>
1317 <dd class="description">Resource name</dd>
1318 <dt>fd</dt>
1319 <dd class="description">File descriptor</dd>
1320 </dl>
1321 <h4 class="returnvalue">Return Value</h4>
1322 <p class="description">HTTP status</p>
1323 <h4 class="discussion">Discussion</h4>
1324 <p class="discussion">This function returns <code>HTTP_STATUS_CREATED</code> when the file is stored
1325 successfully.
1326
1327 </p>
1328 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/macOS 10.4&nbsp;</span><a name="cupsPutFile">cupsPutFile</a></h3>
1329 <p class="description">Put a file on the server.</p>
1330 <p class="code">
1331 http_status_t cupsPutFile (<br>
1332 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1333 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1334 &nbsp;&nbsp;&nbsp;&nbsp;const char *filename<br>
1335 );</p>
1336 <h4 class="parameters">Parameters</h4>
1337 <dl>
1338 <dt>http</dt>
1339 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1340 <dt>resource</dt>
1341 <dd class="description">Resource name</dd>
1342 <dt>filename</dt>
1343 <dd class="description">Filename</dd>
1344 </dl>
1345 <h4 class="returnvalue">Return Value</h4>
1346 <p class="description">HTTP status</p>
1347 <h4 class="discussion">Discussion</h4>
1348 <p class="discussion">This function returns <code>HTTP_CREATED</code> when the file is stored
1349 successfully.
1350
1351 </p>
1352 <h3 class="function"><span class="info">&nbsp;CUPS 1.4/macOS 10.6&nbsp;</span><a name="cupsReadResponseData">cupsReadResponseData</a></h3>
1353 <p class="description">Read additional data after the IPP response.</p>
1354 <p class="code">
1355 ssize_t cupsReadResponseData (<br>
1356 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1357 &nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
1358 &nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
1359 );</p>
1360 <h4 class="parameters">Parameters</h4>
1361 <dl>
1362 <dt>http</dt>
1363 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1364 <dt>buffer</dt>
1365 <dd class="description">Buffer to use</dd>
1366 <dt>length</dt>
1367 <dd class="description">Number of bytes to read</dd>
1368 </dl>
1369 <h4 class="returnvalue">Return Value</h4>
1370 <p class="description">Bytes read, 0 on EOF, -1 on error</p>
1371 <h4 class="discussion">Discussion</h4>
1372 <p class="discussion">This function is used after <a href="#cupsGetResponse"><code>cupsGetResponse</code></a> to read the PPD or document
1373 files from <code>CUPS_GET_PPD</code> and <code>CUPS_GET_DOCUMENT</code> requests,
1374 respectively.
1375
1376 </p>
1377 <h3 class="function"><span class="info">&nbsp;CUPS 1.4/macOS 10.6&nbsp;</span><a name="cupsSendRequest">cupsSendRequest</a></h3>
1378 <p class="description">Send an IPP request.</p>
1379 <p class="code">
1380 http_status_t cupsSendRequest (<br>
1381 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1382 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *request,<br>
1383 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1384 &nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
1385 );</p>
1386 <h4 class="parameters">Parameters</h4>
1387 <dl>
1388 <dt>http</dt>
1389 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1390 <dt>request</dt>
1391 <dd class="description">IPP request</dd>
1392 <dt>resource</dt>
1393 <dd class="description">Resource path</dd>
1394 <dt>length</dt>
1395 <dd class="description">Length of data to follow or <code>CUPS_LENGTH_VARIABLE</code></dd>
1396 </dl>
1397 <h4 class="returnvalue">Return Value</h4>
1398 <p class="description">Initial HTTP status</p>
1399 <h4 class="discussion">Discussion</h4>
1400 <p class="discussion">Use <a href="#cupsWriteRequestData"><code>cupsWriteRequestData</code></a> to write any additional data (document, PPD
1401 file, etc.) for the request, <a href="#cupsGetResponse"><code>cupsGetResponse</code></a> to get the IPP response,
1402 and <a href="#cupsReadResponseData"><code>cupsReadResponseData</code></a> to read any additional data following the
1403 response. Only one request can be sent/queued at a time per <code>http_t</code>
1404 connection.<br>
1405 <br>
1406 Returns the initial HTTP status code, which will be <code>HTTP_STATUS_CONTINUE</code>
1407 on a successful send of the request.<br>
1408 <br>
1409 Note: Unlike <a href="#cupsDoFileRequest"><code>cupsDoFileRequest</code></a>, <a href="#cupsDoIORequest"><code>cupsDoIORequest</code></a>, and
1410 <a href="#cupsDoRequest"><code>cupsDoRequest</code></a>, the request is NOT freed with <a href="#ippDelete"><code>ippDelete</code></a>.
1411
1412 </p>
1413 <h3 class="function"><span class="info">&nbsp;CUPS 1.4/macOS 10.6&nbsp;</span><a name="cupsWriteRequestData">cupsWriteRequestData</a></h3>
1414 <p class="description">Write additional data after an IPP request.</p>
1415 <p class="code">
1416 http_status_t cupsWriteRequestData (<br>
1417 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1418 &nbsp;&nbsp;&nbsp;&nbsp;const char *buffer,<br>
1419 &nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
1420 );</p>
1421 <h4 class="parameters">Parameters</h4>
1422 <dl>
1423 <dt>http</dt>
1424 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1425 <dt>buffer</dt>
1426 <dd class="description">Bytes to write</dd>
1427 <dt>length</dt>
1428 <dd class="description">Number of bytes to write</dd>
1429 </dl>
1430 <h4 class="returnvalue">Return Value</h4>
1431 <p class="description"><code>HTTP_STATUS_CONTINUE</code> if OK or HTTP status on error</p>
1432 <h4 class="discussion">Discussion</h4>
1433 <p class="discussion">This function is used after <a href="#cupsSendRequest"><code>cupsSendRequest</code></a> to provide a PPD and
1434 after <a href="#cupsStartDocument"><code>cupsStartDocument</code></a> to provide a document file.
1435
1436 </p>
1437 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="httpAcceptConnection">httpAcceptConnection</a></h3>
1438 <p class="description">Accept a new HTTP client connection from the
1439 specified listening socket.</p>
1440 <p class="code">
1441 <a href="#http_t">http_t</a> *httpAcceptConnection (<br>
1442 &nbsp;&nbsp;&nbsp;&nbsp;int fd,<br>
1443 &nbsp;&nbsp;&nbsp;&nbsp;int blocking<br>
1444 );</p>
1445 <h4 class="parameters">Parameters</h4>
1446 <dl>
1447 <dt>fd</dt>
1448 <dd class="description">Listen socket file descriptor</dd>
1449 <dt>blocking</dt>
1450 <dd class="description">1 if the connection should be
1451 blocking, 0 otherwise</dd>
1452 </dl>
1453 <h4 class="returnvalue">Return Value</h4>
1454 <p class="description">HTTP connection or <code>NULL</code></p>
1455 <h3 class="function"><span class="info">&nbsp;CUPS 1.5/macOS 10.7&nbsp;</span><a name="httpAddCredential">httpAddCredential</a></h3>
1456 <p class="description">Allocates and adds a single credential to an array.</p>
1457 <p class="code">
1458 int httpAddCredential (<br>
1459 &nbsp;&nbsp;&nbsp;&nbsp;cups_array_t *credentials,<br>
1460 &nbsp;&nbsp;&nbsp;&nbsp;const void *data,<br>
1461 &nbsp;&nbsp;&nbsp;&nbsp;size_t datalen<br>
1462 );</p>
1463 <h4 class="parameters">Parameters</h4>
1464 <dl>
1465 <dt>credentials</dt>
1466 <dd class="description">Credentials array</dd>
1467 <dt>data</dt>
1468 <dd class="description">PEM-encoded X.509 data</dd>
1469 <dt>datalen</dt>
1470 <dd class="description">Length of data</dd>
1471 </dl>
1472 <h4 class="returnvalue">Return Value</h4>
1473 <p class="description">0 on success, -1 on error</p>
1474 <h4 class="discussion">Discussion</h4>
1475 <p class="discussion">Use <code>cupsArrayNew(NULL, NULL)</code> to create a credentials array.
1476
1477 </p>
1478 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpAddrAny">httpAddrAny</a></h3>
1479 <p class="description">Check for the &quot;any&quot; address.</p>
1480 <p class="code">
1481 int httpAddrAny (<br>
1482 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr<br>
1483 );</p>
1484 <h4 class="parameters">Parameters</h4>
1485 <dl>
1486 <dt>addr</dt>
1487 <dd class="description">Address to check</dd>
1488 </dl>
1489 <h4 class="returnvalue">Return Value</h4>
1490 <p class="description">1 if &quot;any&quot;, 0 otherwise</p>
1491 <h3 class="function"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="httpAddrClose">httpAddrClose</a></h3>
1492 <p class="description">Close a socket created by <a href="#httpAddrConnect"><code>httpAddrConnect</code></a> or
1493 <a href="#httpAddrListen"><code>httpAddrListen</code></a>.</p>
1494 <p class="code">
1495 int httpAddrClose (<br>
1496 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_addr_t">http_addr_t</a> *addr,<br>
1497 &nbsp;&nbsp;&nbsp;&nbsp;int fd<br>
1498 );</p>
1499 <h4 class="parameters">Parameters</h4>
1500 <dl>
1501 <dt>addr</dt>
1502 <dd class="description">Listen address or <code>NULL</code></dd>
1503 <dt>fd</dt>
1504 <dd class="description">Socket file descriptor</dd>
1505 </dl>
1506 <h4 class="returnvalue">Return Value</h4>
1507 <p class="description">0 on success, -1 on failure</p>
1508 <h4 class="discussion">Discussion</h4>
1509 <p class="discussion">Pass <code>NULL</code> for sockets created with <a href="#httpAddrConnect"><code>httpAddrConnect</code></a> and the
1510 listen address for sockets created with <a href="#httpAddrListen"><code>httpAddrListen</code></a>. This will
1511 ensure that domain sockets are removed when closed.
1512
1513 </p>
1514 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpAddrEqual">httpAddrEqual</a></h3>
1515 <p class="description">Compare two addresses.</p>
1516 <p class="code">
1517 int httpAddrEqual (<br>
1518 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr1,<br>
1519 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr2<br>
1520 );</p>
1521 <h4 class="parameters">Parameters</h4>
1522 <dl>
1523 <dt>addr1</dt>
1524 <dd class="description">First address</dd>
1525 <dt>addr2</dt>
1526 <dd class="description">Second address</dd>
1527 </dl>
1528 <h4 class="returnvalue">Return Value</h4>
1529 <p class="description">1 if equal, 0 if not</p>
1530 <h3 class="function"><a name="httpAddrFamily">httpAddrFamily</a></h3>
1531 <p class="description">Get the address family of an address.</p>
1532 <p class="code">
1533 int httpAddrFamily (<br>
1534 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_addr_t">http_addr_t</a> *addr<br>
1535 );</p>
1536 <h4 class="parameters">Parameters</h4>
1537 <dl>
1538 <dt>addr</dt>
1539 <dd class="description">Address</dd>
1540 </dl>
1541 <h4 class="returnvalue">Return Value</h4>
1542 <p class="description">Address family</p>
1543 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpAddrLength">httpAddrLength</a></h3>
1544 <p class="description">Return the length of the address in bytes.</p>
1545 <p class="code">
1546 int httpAddrLength (<br>
1547 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr<br>
1548 );</p>
1549 <h4 class="parameters">Parameters</h4>
1550 <dl>
1551 <dt>addr</dt>
1552 <dd class="description">Address</dd>
1553 </dl>
1554 <h4 class="returnvalue">Return Value</h4>
1555 <p class="description">Length in bytes</p>
1556 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="httpAddrListen">httpAddrListen</a></h3>
1557 <p class="description">Create a listening socket bound to the specified
1558 address and port.</p>
1559 <p class="code">
1560 int httpAddrListen (<br>
1561 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_addr_t">http_addr_t</a> *addr,<br>
1562 &nbsp;&nbsp;&nbsp;&nbsp;int port<br>
1563 );</p>
1564 <h4 class="parameters">Parameters</h4>
1565 <dl>
1566 <dt>addr</dt>
1567 <dd class="description">Address to bind to</dd>
1568 <dt>port</dt>
1569 <dd class="description">Port number to bind to</dd>
1570 </dl>
1571 <h4 class="returnvalue">Return Value</h4>
1572 <p class="description">Socket or -1 on error</p>
1573 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpAddrLocalhost">httpAddrLocalhost</a></h3>
1574 <p class="description">Check for the local loopback address.</p>
1575 <p class="code">
1576 int httpAddrLocalhost (<br>
1577 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr<br>
1578 );</p>
1579 <h4 class="parameters">Parameters</h4>
1580 <dl>
1581 <dt>addr</dt>
1582 <dd class="description">Address to check</dd>
1583 </dl>
1584 <h4 class="returnvalue">Return Value</h4>
1585 <p class="description">1 if local host, 0 otherwise</p>
1586 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpAddrLookup">httpAddrLookup</a></h3>
1587 <p class="description">Lookup the hostname associated with the address.</p>
1588 <p class="code">
1589 char *httpAddrLookup (<br>
1590 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr,<br>
1591 &nbsp;&nbsp;&nbsp;&nbsp;char *name,<br>
1592 &nbsp;&nbsp;&nbsp;&nbsp;int namelen<br>
1593 );</p>
1594 <h4 class="parameters">Parameters</h4>
1595 <dl>
1596 <dt>addr</dt>
1597 <dd class="description">Address to lookup</dd>
1598 <dt>name</dt>
1599 <dd class="description">Host name buffer</dd>
1600 <dt>namelen</dt>
1601 <dd class="description">Size of name buffer</dd>
1602 </dl>
1603 <h4 class="returnvalue">Return Value</h4>
1604 <p class="description">Host name</p>
1605 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="httpAddrPort">httpAddrPort</a></h3>
1606 <p class="description">Get the port number associated with an address.</p>
1607 <p class="code">
1608 int httpAddrPort (<br>
1609 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_addr_t">http_addr_t</a> *addr<br>
1610 );</p>
1611 <h4 class="parameters">Parameters</h4>
1612 <dl>
1613 <dt>addr</dt>
1614 <dd class="description">Address</dd>
1615 </dl>
1616 <h4 class="returnvalue">Return Value</h4>
1617 <p class="description">Port number</p>
1618 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpAddrString">httpAddrString</a></h3>
1619 <p class="description">Convert an address to a numeric string.</p>
1620 <p class="code">
1621 char *httpAddrString (<br>
1622 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr,<br>
1623 &nbsp;&nbsp;&nbsp;&nbsp;char *s,<br>
1624 &nbsp;&nbsp;&nbsp;&nbsp;int slen<br>
1625 );</p>
1626 <h4 class="parameters">Parameters</h4>
1627 <dl>
1628 <dt>addr</dt>
1629 <dd class="description">Address to convert</dd>
1630 <dt>s</dt>
1631 <dd class="description">String buffer</dd>
1632 <dt>slen</dt>
1633 <dd class="description">Length of string</dd>
1634 </dl>
1635 <h4 class="returnvalue">Return Value</h4>
1636 <p class="description">Numeric address string</p>
1637 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpAssembleURI">httpAssembleURI</a></h3>
1638 <p class="description">Assemble a uniform resource identifier from its
1639 components.</p>
1640 <p class="code">
1641 <a href="#http_uri_status_t">http_uri_status_t</a> httpAssembleURI (<br>
1642 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_uri_coding_t">http_uri_coding_t</a> encoding,<br>
1643 &nbsp;&nbsp;&nbsp;&nbsp;char *uri,<br>
1644 &nbsp;&nbsp;&nbsp;&nbsp;int urilen,<br>
1645 &nbsp;&nbsp;&nbsp;&nbsp;const char *scheme,<br>
1646 &nbsp;&nbsp;&nbsp;&nbsp;const char *username,<br>
1647 &nbsp;&nbsp;&nbsp;&nbsp;const char *host,<br>
1648 &nbsp;&nbsp;&nbsp;&nbsp;int port,<br>
1649 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource<br>
1650 );</p>
1651 <h4 class="parameters">Parameters</h4>
1652 <dl>
1653 <dt>encoding</dt>
1654 <dd class="description">Encoding flags</dd>
1655 <dt>uri</dt>
1656 <dd class="description">URI buffer</dd>
1657 <dt>urilen</dt>
1658 <dd class="description">Size of URI buffer</dd>
1659 <dt>scheme</dt>
1660 <dd class="description">Scheme name</dd>
1661 <dt>username</dt>
1662 <dd class="description">Username</dd>
1663 <dt>host</dt>
1664 <dd class="description">Hostname or address</dd>
1665 <dt>port</dt>
1666 <dd class="description">Port number</dd>
1667 <dt>resource</dt>
1668 <dd class="description">Resource</dd>
1669 </dl>
1670 <h4 class="returnvalue">Return Value</h4>
1671 <p class="description">URI status</p>
1672 <h4 class="discussion">Discussion</h4>
1673 <p class="discussion">This function escapes reserved characters in the URI depending on the
1674 value of the &quot;encoding&quot; argument. You should use this function in
1675 place of traditional string functions whenever you need to create a
1676 URI string.
1677
1678 </p>
1679 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpAssembleURIf">httpAssembleURIf</a></h3>
1680 <p class="description">Assemble a uniform resource identifier from its
1681 components with a formatted resource.</p>
1682 <p class="code">
1683 <a href="#http_uri_status_t">http_uri_status_t</a> httpAssembleURIf (<br>
1684 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_uri_coding_t">http_uri_coding_t</a> encoding,<br>
1685 &nbsp;&nbsp;&nbsp;&nbsp;char *uri,<br>
1686 &nbsp;&nbsp;&nbsp;&nbsp;int urilen,<br>
1687 &nbsp;&nbsp;&nbsp;&nbsp;const char *scheme,<br>
1688 &nbsp;&nbsp;&nbsp;&nbsp;const char *username,<br>
1689 &nbsp;&nbsp;&nbsp;&nbsp;const char *host,<br>
1690 &nbsp;&nbsp;&nbsp;&nbsp;int port,<br>
1691 &nbsp;&nbsp;&nbsp;&nbsp;const char *resourcef,<br>
1692 &nbsp;&nbsp;&nbsp;&nbsp;...<br>
1693 );</p>
1694 <h4 class="parameters">Parameters</h4>
1695 <dl>
1696 <dt>encoding</dt>
1697 <dd class="description">Encoding flags</dd>
1698 <dt>uri</dt>
1699 <dd class="description">URI buffer</dd>
1700 <dt>urilen</dt>
1701 <dd class="description">Size of URI buffer</dd>
1702 <dt>scheme</dt>
1703 <dd class="description">Scheme name</dd>
1704 <dt>username</dt>
1705 <dd class="description">Username</dd>
1706 <dt>host</dt>
1707 <dd class="description">Hostname or address</dd>
1708 <dt>port</dt>
1709 <dd class="description">Port number</dd>
1710 <dt>resourcef</dt>
1711 <dd class="description">Printf-style resource</dd>
1712 <dt>...</dt>
1713 <dd class="description">Additional arguments as needed</dd>
1714 </dl>
1715 <h4 class="returnvalue">Return Value</h4>
1716 <p class="description">URI status</p>
1717 <h4 class="discussion">Discussion</h4>
1718 <p class="discussion">This function creates a formatted version of the resource string
1719 argument &quot;resourcef&quot; and escapes reserved characters in the URI
1720 depending on the value of the &quot;encoding&quot; argument. You should use
1721 this function in place of traditional string functions whenever
1722 you need to create a URI string.
1723
1724 </p>
1725 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="httpAssembleUUID">httpAssembleUUID</a></h3>
1726 <p class="description">Assemble a name-based UUID URN conforming to RFC 4122.</p>
1727 <p class="code">
1728 char *httpAssembleUUID (<br>
1729 &nbsp;&nbsp;&nbsp;&nbsp;const char *server,<br>
1730 &nbsp;&nbsp;&nbsp;&nbsp;int port,<br>
1731 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
1732 &nbsp;&nbsp;&nbsp;&nbsp;int number,<br>
1733 &nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
1734 &nbsp;&nbsp;&nbsp;&nbsp;size_t bufsize<br>
1735 );</p>
1736 <h4 class="parameters">Parameters</h4>
1737 <dl>
1738 <dt>server</dt>
1739 <dd class="description">Server name</dd>
1740 <dt>port</dt>
1741 <dd class="description">Port number</dd>
1742 <dt>name</dt>
1743 <dd class="description">Object name or NULL</dd>
1744 <dt>number</dt>
1745 <dd class="description">Object number or 0</dd>
1746 <dt>buffer</dt>
1747 <dd class="description">String buffer</dd>
1748 <dt>bufsize</dt>
1749 <dd class="description">Size of buffer</dd>
1750 </dl>
1751 <h4 class="returnvalue">Return Value</h4>
1752 <p class="description">UUID string</p>
1753 <h4 class="discussion">Discussion</h4>
1754 <p class="discussion">This function creates a unique 128-bit identifying number using the server
1755 name, port number, random data, and optionally an object name and/or object
1756 number. The result is formatted as a UUID URN as defined in RFC 4122.<br>
1757 <br>
1758 The buffer needs to be at least 46 bytes in size.
1759
1760 </p>
1761 <h3 class="function"><a name="httpBlocking">httpBlocking</a></h3>
1762 <p class="description">Set blocking/non-blocking behavior on a connection.</p>
1763 <p class="code">
1764 void httpBlocking (<br>
1765 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1766 &nbsp;&nbsp;&nbsp;&nbsp;int b<br>
1767 );</p>
1768 <h4 class="parameters">Parameters</h4>
1769 <dl>
1770 <dt>http</dt>
1771 <dd class="description">HTTP connection</dd>
1772 <dt>b</dt>
1773 <dd class="description">1 = blocking, 0 = non-blocking</dd>
1774 </dl>
1775 <h3 class="function"><a name="httpCheck">httpCheck</a></h3>
1776 <p class="description">Check to see if there is a pending response from the server.</p>
1777 <p class="code">
1778 int httpCheck (<br>
1779 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1780 );</p>
1781 <h4 class="parameters">Parameters</h4>
1782 <dl>
1783 <dt>http</dt>
1784 <dd class="description">HTTP connection</dd>
1785 </dl>
1786 <h4 class="returnvalue">Return Value</h4>
1787 <p class="description">0 = no data, 1 = data available</p>
1788 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/macOS 10.3&nbsp;</span><a name="httpClearCookie">httpClearCookie</a></h3>
1789 <p class="description">Clear the cookie value(s).</p>
1790 <p class="code">
1791 void httpClearCookie (<br>
1792 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1793 );</p>
1794 <h4 class="parameters">Parameters</h4>
1795 <dl>
1796 <dt>http</dt>
1797 <dd class="description">HTTP connection</dd>
1798 </dl>
1799 <h3 class="function"><a name="httpClearFields">httpClearFields</a></h3>
1800 <p class="description">Clear HTTP request fields.</p>
1801 <p class="code">
1802 void httpClearFields (<br>
1803 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1804 );</p>
1805 <h4 class="parameters">Parameters</h4>
1806 <dl>
1807 <dt>http</dt>
1808 <dd class="description">HTTP connection</dd>
1809 </dl>
1810 <h3 class="function"><a name="httpClose">httpClose</a></h3>
1811 <p class="description">Close an HTTP connection.</p>
1812 <p class="code">
1813 void httpClose (<br>
1814 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1815 );</p>
1816 <h4 class="parameters">Parameters</h4>
1817 <dl>
1818 <dt>http</dt>
1819 <dd class="description">HTTP connection</dd>
1820 </dl>
1821 <h3 class="function"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="httpCompareCredentials">httpCompareCredentials</a></h3>
1822 <p class="description">Compare two sets of X.509 credentials.</p>
1823 <p class="code">
1824 int httpCompareCredentials (<br>
1825 &nbsp;&nbsp;&nbsp;&nbsp;cups_array_t *cred1,<br>
1826 &nbsp;&nbsp;&nbsp;&nbsp;cups_array_t *cred2<br>
1827 );</p>
1828 <h4 class="parameters">Parameters</h4>
1829 <dl>
1830 <dt>cred1</dt>
1831 <dd class="description">First set of X.509 credentials</dd>
1832 <dt>cred2</dt>
1833 <dd class="description">Second set of X.509 credentials</dd>
1834 </dl>
1835 <h4 class="returnvalue">Return Value</h4>
1836 <p class="description">1 if they match, 0 if they do not</p>
1837 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpConnect">httpConnect</a></h3>
1838 <p class="description">Connect to a HTTP server.</p>
1839 <p class="code">
1840 <a href="#http_t">http_t</a> *httpConnect (<br>
1841 &nbsp;&nbsp;&nbsp;&nbsp;const char *host,<br>
1842 &nbsp;&nbsp;&nbsp;&nbsp;int port<br>
1843 );</p>
1844 <h4 class="parameters">Parameters</h4>
1845 <dl>
1846 <dt>host</dt>
1847 <dd class="description">Host to connect to</dd>
1848 <dt>port</dt>
1849 <dd class="description">Port number</dd>
1850 </dl>
1851 <h4 class="returnvalue">Return Value</h4>
1852 <p class="description">New HTTP connection</p>
1853 <h4 class="discussion">Discussion</h4>
1854 <p class="discussion">This function is deprecated - use <a href="#httpConnect2"><code>httpConnect2</code></a> instead.
1855
1856 </p>
1857 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="httpConnect2">httpConnect2</a></h3>
1858 <p class="description">Connect to a HTTP server.</p>
1859 <p class="code">
1860 <a href="#http_t">http_t</a> *httpConnect2 (<br>
1861 &nbsp;&nbsp;&nbsp;&nbsp;const char *host,<br>
1862 &nbsp;&nbsp;&nbsp;&nbsp;int port,<br>
1863 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_addrlist_t">http_addrlist_t</a> *addrlist,<br>
1864 &nbsp;&nbsp;&nbsp;&nbsp;int family,<br>
1865 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_encryption_t">http_encryption_t</a> encryption,<br>
1866 &nbsp;&nbsp;&nbsp;&nbsp;int blocking,<br>
1867 &nbsp;&nbsp;&nbsp;&nbsp;int msec,<br>
1868 &nbsp;&nbsp;&nbsp;&nbsp;int *cancel<br>
1869 );</p>
1870 <h4 class="parameters">Parameters</h4>
1871 <dl>
1872 <dt>host</dt>
1873 <dd class="description">Host to connect to</dd>
1874 <dt>port</dt>
1875 <dd class="description">Port number</dd>
1876 <dt>addrlist</dt>
1877 <dd class="description">List of addresses or NULL to lookup</dd>
1878 <dt>family</dt>
1879 <dd class="description">Address family to use or <code>AF_UNSPEC</code> for any</dd>
1880 <dt>encryption</dt>
1881 <dd class="description">Type of encryption to use</dd>
1882 <dt>blocking</dt>
1883 <dd class="description">1 for blocking connection, 0 for non-blocking</dd>
1884 <dt>msec</dt>
1885 <dd class="description">Connection timeout in milliseconds, 0 means don't connect</dd>
1886 <dt>cancel</dt>
1887 <dd class="description">Pointer to &quot;cancel&quot; variable</dd>
1888 </dl>
1889 <h4 class="returnvalue">Return Value</h4>
1890 <p class="description">New HTTP connection</p>
1891 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpConnectEncrypt">httpConnectEncrypt</a></h3>
1892 <p class="description">Connect to a HTTP server using encryption.</p>
1893 <p class="code">
1894 <a href="#http_t">http_t</a> *httpConnectEncrypt (<br>
1895 &nbsp;&nbsp;&nbsp;&nbsp;const char *host,<br>
1896 &nbsp;&nbsp;&nbsp;&nbsp;int port,<br>
1897 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_encryption_t">http_encryption_t</a> encryption<br>
1898 );</p>
1899 <h4 class="parameters">Parameters</h4>
1900 <dl>
1901 <dt>host</dt>
1902 <dd class="description">Host to connect to</dd>
1903 <dt>port</dt>
1904 <dd class="description">Port number</dd>
1905 <dt>encryption</dt>
1906 <dd class="description">Type of encryption to use</dd>
1907 </dl>
1908 <h4 class="returnvalue">Return Value</h4>
1909 <p class="description">New HTTP connection</p>
1910 <h4 class="discussion">Discussion</h4>
1911 <p class="discussion">This function is now deprecated. Please use the <a href="#httpConnect2"><code>httpConnect2</code></a> function
1912 instead.
1913
1914 </p>
1915 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpDecode64">httpDecode64</a></h3>
1916 <p class="description">Base64-decode a string.</p>
1917 <p class="code">
1918 char *httpDecode64 (<br>
1919 &nbsp;&nbsp;&nbsp;&nbsp;char *out,<br>
1920 &nbsp;&nbsp;&nbsp;&nbsp;const char *in<br>
1921 );</p>
1922 <h4 class="parameters">Parameters</h4>
1923 <dl>
1924 <dt>out</dt>
1925 <dd class="description">String to write to</dd>
1926 <dt>in</dt>
1927 <dd class="description">String to read from</dd>
1928 </dl>
1929 <h4 class="returnvalue">Return Value</h4>
1930 <p class="description">Decoded string</p>
1931 <h4 class="discussion">Discussion</h4>
1932 <p class="discussion">This function is deprecated. Use the httpDecode64_2() function instead
1933 which provides buffer length arguments.
1934
1935 </p>
1936 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.21/macOS 10.4&nbsp;</span><a name="httpDecode64_2">httpDecode64_2</a></h3>
1937 <p class="description">Base64-decode a string.</p>
1938 <p class="code">
1939 char *httpDecode64_2 (<br>
1940 &nbsp;&nbsp;&nbsp;&nbsp;char *out,<br>
1941 &nbsp;&nbsp;&nbsp;&nbsp;int *outlen,<br>
1942 &nbsp;&nbsp;&nbsp;&nbsp;const char *in<br>
1943 );</p>
1944 <h4 class="parameters">Parameters</h4>
1945 <dl>
1946 <dt>out</dt>
1947 <dd class="description">String to write to</dd>
1948 <dt>outlen</dt>
1949 <dd class="description">Size of output string</dd>
1950 <dt>in</dt>
1951 <dd class="description">String to read from</dd>
1952 </dl>
1953 <h4 class="returnvalue">Return Value</h4>
1954 <p class="description">Decoded string</p>
1955 <h3 class="function"><a name="httpDelete">httpDelete</a></h3>
1956 <p class="description">Send a DELETE request to the server.</p>
1957 <p class="code">
1958 int httpDelete (<br>
1959 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1960 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
1961 );</p>
1962 <h4 class="parameters">Parameters</h4>
1963 <dl>
1964 <dt>http</dt>
1965 <dd class="description">HTTP connection</dd>
1966 <dt>uri</dt>
1967 <dd class="description">URI to delete</dd>
1968 </dl>
1969 <h4 class="returnvalue">Return Value</h4>
1970 <p class="description">Status of call (0 = success)</p>
1971 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpEncode64">httpEncode64</a></h3>
1972 <p class="description">Base64-encode a string.</p>
1973 <p class="code">
1974 char *httpEncode64 (<br>
1975 &nbsp;&nbsp;&nbsp;&nbsp;char *out,<br>
1976 &nbsp;&nbsp;&nbsp;&nbsp;const char *in<br>
1977 );</p>
1978 <h4 class="parameters">Parameters</h4>
1979 <dl>
1980 <dt>out</dt>
1981 <dd class="description">String to write to</dd>
1982 <dt>in</dt>
1983 <dd class="description">String to read from</dd>
1984 </dl>
1985 <h4 class="returnvalue">Return Value</h4>
1986 <p class="description">Encoded string</p>
1987 <h4 class="discussion">Discussion</h4>
1988 <p class="discussion">This function is deprecated. Use the httpEncode64_2() function instead
1989 which provides buffer length arguments.
1990
1991 </p>
1992 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.21/macOS 10.4&nbsp;</span><a name="httpEncode64_2">httpEncode64_2</a></h3>
1993 <p class="description">Base64-encode a string.</p>
1994 <p class="code">
1995 char *httpEncode64_2 (<br>
1996 &nbsp;&nbsp;&nbsp;&nbsp;char *out,<br>
1997 &nbsp;&nbsp;&nbsp;&nbsp;int outlen,<br>
1998 &nbsp;&nbsp;&nbsp;&nbsp;const char *in,<br>
1999 &nbsp;&nbsp;&nbsp;&nbsp;int inlen<br>
2000 );</p>
2001 <h4 class="parameters">Parameters</h4>
2002 <dl>
2003 <dt>out</dt>
2004 <dd class="description">String to write to</dd>
2005 <dt>outlen</dt>
2006 <dd class="description">Size of output string</dd>
2007 <dt>in</dt>
2008 <dd class="description">String to read from</dd>
2009 <dt>inlen</dt>
2010 <dd class="description">Size of input string</dd>
2011 </dl>
2012 <h4 class="returnvalue">Return Value</h4>
2013 <p class="description">Encoded string</p>
2014 <h3 class="function"><a name="httpEncryption">httpEncryption</a></h3>
2015 <p class="description">Set the required encryption on the link.</p>
2016 <p class="code">
2017 int httpEncryption (<br>
2018 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2019 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_encryption_t">http_encryption_t</a> e<br>
2020 );</p>
2021 <h4 class="parameters">Parameters</h4>
2022 <dl>
2023 <dt>http</dt>
2024 <dd class="description">HTTP connection</dd>
2025 <dt>e</dt>
2026 <dd class="description">New encryption preference</dd>
2027 </dl>
2028 <h4 class="returnvalue">Return Value</h4>
2029 <p class="description">-1 on error, 0 on success</p>
2030 <h3 class="function"><a name="httpError">httpError</a></h3>
2031 <p class="description">Get the last error on a connection.</p>
2032 <p class="code">
2033 int httpError (<br>
2034 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2035 );</p>
2036 <h4 class="parameters">Parameters</h4>
2037 <dl>
2038 <dt>http</dt>
2039 <dd class="description">HTTP connection</dd>
2040 </dl>
2041 <h4 class="returnvalue">Return Value</h4>
2042 <p class="description">Error code (errno) value</p>
2043 <h3 class="function"><a name="httpFieldValue">httpFieldValue</a></h3>
2044 <p class="description">Return the HTTP field enumeration value for a field
2045 name.</p>
2046 <p class="code">
2047 <a href="#http_field_t">http_field_t</a> httpFieldValue (<br>
2048 &nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
2049 );</p>
2050 <h4 class="parameters">Parameters</h4>
2051 <dl>
2052 <dt>name</dt>
2053 <dd class="description">String name</dd>
2054 </dl>
2055 <h4 class="returnvalue">Return Value</h4>
2056 <p class="description">Field index</p>
2057 <h3 class="function"><a name="httpFlush">httpFlush</a></h3>
2058 <p class="description">Flush data from a HTTP connection.</p>
2059 <p class="code">
2060 void httpFlush (<br>
2061 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2062 );</p>
2063 <h4 class="parameters">Parameters</h4>
2064 <dl>
2065 <dt>http</dt>
2066 <dd class="description">HTTP connection</dd>
2067 </dl>
2068 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpFlushWrite">httpFlushWrite</a></h3>
2069 <p class="description">Flush data in write buffer.</p>
2070 <p class="code">
2071 int httpFlushWrite (<br>
2072 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2073 );</p>
2074 <h4 class="parameters">Parameters</h4>
2075 <dl>
2076 <dt>http</dt>
2077 <dd class="description">HTTP connection</dd>
2078 </dl>
2079 <h4 class="returnvalue">Return Value</h4>
2080 <p class="description">Bytes written or -1 on error</p>
2081 <h3 class="function"><a name="httpFreeCredentials">httpFreeCredentials</a></h3>
2082 <p class="description">Free an array of credentials.</p>
2083 <p class="code">
2084 void httpFreeCredentials (<br>
2085 &nbsp;&nbsp;&nbsp;&nbsp;cups_array_t *credentials<br>
2086 );</p>
2087 <h4 class="parameters">Parameters</h4>
2088 <dl>
2089 <dt>credentials</dt>
2090 <dd class="description">Array of credentials</dd>
2091 </dl>
2092 <h3 class="function"><a name="httpGet">httpGet</a></h3>
2093 <p class="description">Send a GET request to the server.</p>
2094 <p class="code">
2095 int httpGet (<br>
2096 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2097 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
2098 );</p>
2099 <h4 class="parameters">Parameters</h4>
2100 <dl>
2101 <dt>http</dt>
2102 <dd class="description">HTTP connection</dd>
2103 <dt>uri</dt>
2104 <dd class="description">URI to get</dd>
2105 </dl>
2106 <h4 class="returnvalue">Return Value</h4>
2107 <p class="description">Status of call (0 = success)</p>
2108 <h3 class="function"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="httpGetActivity">httpGetActivity</a></h3>
2109 <p class="description">Get the most recent activity for a connection.</p>
2110 <p class="code">
2111 time_t httpGetActivity (<br>
2112 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2113 );</p>
2114 <h4 class="parameters">Parameters</h4>
2115 <dl>
2116 <dt>http</dt>
2117 <dd class="description">HTTP connection</dd>
2118 </dl>
2119 <h4 class="returnvalue">Return Value</h4>
2120 <p class="description">Time of last read or write</p>
2121 <h4 class="discussion">Discussion</h4>
2122 <p class="discussion">The return value is the UNIX time of the last read or write.
2123
2124 </p>
2125 <h3 class="function"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="httpGetAddress">httpGetAddress</a></h3>
2126 <p class="description">Get the address of the connected peer of a connection.</p>
2127 <p class="code">
2128 <a href="#http_addr_t">http_addr_t</a> *httpGetAddress (<br>
2129 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2130 );</p>
2131 <h4 class="parameters">Parameters</h4>
2132 <dl>
2133 <dt>http</dt>
2134 <dd class="description">HTTP connection</dd>
2135 </dl>
2136 <h4 class="returnvalue">Return Value</h4>
2137 <p class="description">Connected address or <code>NULL</code></p>
2138 <h4 class="discussion">Discussion</h4>
2139 <p class="discussion">Returns <code>NULL</code> if the socket is currently unconnected.
2140
2141 </p>
2142 <h3 class="function"><span class="info">&nbsp;CUPS 1.3/macOS 10.5&nbsp;</span><a name="httpGetAuthString">httpGetAuthString</a></h3>
2143 <p class="description">Get the current authorization string.</p>
2144 <p class="code">
2145 char *httpGetAuthString (<br>
2146 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2147 );</p>
2148 <h4 class="parameters">Parameters</h4>
2149 <dl>
2150 <dt>http</dt>
2151 <dd class="description">HTTP connection</dd>
2152 </dl>
2153 <h4 class="returnvalue">Return Value</h4>
2154 <p class="description">Authorization string</p>
2155 <h4 class="discussion">Discussion</h4>
2156 <p class="discussion">The authorization string is set by cupsDoAuthentication() and
2157 httpSetAuthString(). Use httpGetAuthString() to retrieve the
2158 string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
2159 value.
2160
2161 </p>
2162 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpGetBlocking">httpGetBlocking</a></h3>
2163 <p class="description">Get the blocking/non-block state of a connection.</p>
2164 <p class="code">
2165 int httpGetBlocking (<br>
2166 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2167 );</p>
2168 <h4 class="parameters">Parameters</h4>
2169 <dl>
2170 <dt>http</dt>
2171 <dd class="description">HTTP connection</dd>
2172 </dl>
2173 <h4 class="returnvalue">Return Value</h4>
2174 <p class="description">1 if blocking, 0 if non-blocking</p>
2175 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="httpGetContentEncoding">httpGetContentEncoding</a></h3>
2176 <p class="description">Get a common content encoding, if any, between
2177 the client and server.</p>
2178 <p class="code">
2179 const char *httpGetContentEncoding (<br>
2180 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2181 );</p>
2182 <h4 class="parameters">Parameters</h4>
2183 <dl>
2184 <dt>http</dt>
2185 <dd class="description">HTTP connection</dd>
2186 </dl>
2187 <h4 class="returnvalue">Return Value</h4>
2188 <p class="description">Content-Coding value or
2189 <code>NULL</code> for the identity
2190 coding.</p>
2191 <h4 class="discussion">Discussion</h4>
2192 <p class="discussion">This function uses the value of the Accepts-Encoding HTTP header and must be
2193 called after receiving a response from the server or a request from the
2194 client. The value returned can be use in subsequent requests (for clients)
2195 or in the response (for servers) in order to compress the content stream.
2196
2197 </p>
2198 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/macOS 10.3&nbsp;</span><a name="httpGetCookie">httpGetCookie</a></h3>
2199 <p class="description">Get any cookie data from the response.</p>
2200 <p class="code">
2201 const char *httpGetCookie (<br>
2202 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2203 );</p>
2204 <h4 class="parameters">Parameters</h4>
2205 <dl>
2206 <dt>http</dt>
2207 <dd class="description">HTTP connection</dd>
2208 </dl>
2209 <h4 class="returnvalue">Return Value</h4>
2210 <p class="description">Cookie data or NULL</p>
2211 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpGetDateString">httpGetDateString</a></h3>
2212 <p class="description">Get a formatted date/time string from a time value.</p>
2213 <p class="code">
2214 const char *httpGetDateString (<br>
2215 &nbsp;&nbsp;&nbsp;&nbsp;time_t t<br>
2216 );</p>
2217 <h4 class="parameters">Parameters</h4>
2218 <dl>
2219 <dt>t</dt>
2220 <dd class="description">UNIX time</dd>
2221 </dl>
2222 <h4 class="returnvalue">Return Value</h4>
2223 <p class="description">Date/time string</p>
2224 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpGetDateString2">httpGetDateString2</a></h3>
2225 <p class="description">Get a formatted date/time string from a time value.</p>
2226 <p class="code">
2227 const char *httpGetDateString2 (<br>
2228 &nbsp;&nbsp;&nbsp;&nbsp;time_t t,<br>
2229 &nbsp;&nbsp;&nbsp;&nbsp;char *s,<br>
2230 &nbsp;&nbsp;&nbsp;&nbsp;int slen<br>
2231 );</p>
2232 <h4 class="parameters">Parameters</h4>
2233 <dl>
2234 <dt>t</dt>
2235 <dd class="description">UNIX time</dd>
2236 <dt>s</dt>
2237 <dd class="description">String buffer</dd>
2238 <dt>slen</dt>
2239 <dd class="description">Size of string buffer</dd>
2240 </dl>
2241 <h4 class="returnvalue">Return Value</h4>
2242 <p class="description">Date/time string</p>
2243 <h3 class="function"><a name="httpGetDateTime">httpGetDateTime</a></h3>
2244 <p class="description">Get a time value from a formatted date/time string.</p>
2245 <p class="code">
2246 time_t httpGetDateTime (<br>
2247 &nbsp;&nbsp;&nbsp;&nbsp;const char *s<br>
2248 );</p>
2249 <h4 class="parameters">Parameters</h4>
2250 <dl>
2251 <dt>s</dt>
2252 <dd class="description">Date/time string</dd>
2253 </dl>
2254 <h4 class="returnvalue">Return Value</h4>
2255 <p class="description">UNIX time</p>
2256 <h3 class="function"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="httpGetEncryption">httpGetEncryption</a></h3>
2257 <p class="description">Get the current encryption mode of a connection.</p>
2258 <p class="code">
2259 <a href="#http_encryption_t">http_encryption_t</a> httpGetEncryption (<br>
2260 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2261 );</p>
2262 <h4 class="parameters">Parameters</h4>
2263 <dl>
2264 <dt>http</dt>
2265 <dd class="description">HTTP connection</dd>
2266 </dl>
2267 <h4 class="returnvalue">Return Value</h4>
2268 <p class="description">Current encryption mode</p>
2269 <h4 class="discussion">Discussion</h4>
2270 <p class="discussion">This function returns the encryption mode for the connection. Use the
2271 <a href="#httpIsEncrypted"><code>httpIsEncrypted</code></a> function to determine whether a TLS session has
2272 been established.
2273
2274 </p>
2275 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="httpGetExpect">httpGetExpect</a></h3>
2276 <p class="description">Get the value of the Expect header, if any.</p>
2277 <p class="code">
2278 http_status_t httpGetExpect (<br>
2279 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2280 );</p>
2281 <h4 class="parameters">Parameters</h4>
2282 <dl>
2283 <dt>http</dt>
2284 <dd class="description">HTTP connection</dd>
2285 </dl>
2286 <h4 class="returnvalue">Return Value</h4>
2287 <p class="description">Expect: status, if any</p>
2288 <h4 class="discussion">Discussion</h4>
2289 <p class="discussion">Returns <code>HTTP_STATUS_NONE</code> if there is no Expect header, otherwise
2290 returns the expected HTTP status code, typically <code>HTTP_STATUS_CONTINUE</code>.
2291
2292 </p>
2293 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpGetFd">httpGetFd</a></h3>
2294 <p class="description">Get the file descriptor associated with a connection.</p>
2295 <p class="code">
2296 int httpGetFd (<br>
2297 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2298 );</p>
2299 <h4 class="parameters">Parameters</h4>
2300 <dl>
2301 <dt>http</dt>
2302 <dd class="description">HTTP connection</dd>
2303 </dl>
2304 <h4 class="returnvalue">Return Value</h4>
2305 <p class="description">File descriptor or -1 if none</p>
2306 <h3 class="function"><a name="httpGetField">httpGetField</a></h3>
2307 <p class="description">Get a field value from a request/response.</p>
2308 <p class="code">
2309 const char *httpGetField (<br>
2310 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2311 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_field_t">http_field_t</a> field<br>
2312 );</p>
2313 <h4 class="parameters">Parameters</h4>
2314 <dl>
2315 <dt>http</dt>
2316 <dd class="description">HTTP connection</dd>
2317 <dt>field</dt>
2318 <dd class="description">Field to get</dd>
2319 </dl>
2320 <h4 class="returnvalue">Return Value</h4>
2321 <p class="description">Field value</p>
2322 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpGetHostByName">httpGetHostByName</a></h3>
2323 <p class="description">Lookup a hostname or IPv4 address, and return
2324 address records for the specified name.</p>
2325 <p class="code">
2326 struct hostent *httpGetHostByName (<br>
2327 &nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
2328 );</p>
2329 <h4 class="parameters">Parameters</h4>
2330 <dl>
2331 <dt>name</dt>
2332 <dd class="description">Hostname or IP address</dd>
2333 </dl>
2334 <h4 class="returnvalue">Return Value</h4>
2335 <p class="description">Host entry</p>
2336 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpGetHostname">httpGetHostname</a></h3>
2337 <p class="description">Get the FQDN for the connection or local system.</p>
2338 <p class="code">
2339 const char *httpGetHostname (<br>
2340 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2341 &nbsp;&nbsp;&nbsp;&nbsp;char *s,<br>
2342 &nbsp;&nbsp;&nbsp;&nbsp;int slen<br>
2343 );</p>
2344 <h4 class="parameters">Parameters</h4>
2345 <dl>
2346 <dt>http</dt>
2347 <dd class="description">HTTP connection or NULL</dd>
2348 <dt>s</dt>
2349 <dd class="description">String buffer for name</dd>
2350 <dt>slen</dt>
2351 <dd class="description">Size of buffer</dd>
2352 </dl>
2353 <h4 class="returnvalue">Return Value</h4>
2354 <p class="description">FQDN for connection or system</p>
2355 <h4 class="discussion">Discussion</h4>
2356 <p class="discussion">When &quot;http&quot; points to a connected socket, return the hostname or
2357 address that was used in the call to httpConnect() or httpConnectEncrypt(),
2358 or the address of the client for the connection from httpAcceptConnection().
2359 Otherwise, return the FQDN for the local system using both gethostname()
2360 and gethostbyname() to get the local hostname with domain.
2361
2362 </p>
2363 <h3 class="function"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="httpGetKeepAlive">httpGetKeepAlive</a></h3>
2364 <p class="description">Get the current Keep-Alive state of the connection.</p>
2365 <p class="code">
2366 <a href="#http_keepalive_t">http_keepalive_t</a> httpGetKeepAlive (<br>
2367 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2368 );</p>
2369 <h4 class="parameters">Parameters</h4>
2370 <dl>
2371 <dt>http</dt>
2372 <dd class="description">HTTP connection</dd>
2373 </dl>
2374 <h4 class="returnvalue">Return Value</h4>
2375 <p class="description">Keep-Alive state</p>
2376 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpGetLength">httpGetLength</a></h3>
2377 <p class="description">Get the amount of data remaining from the
2378 content-length or transfer-encoding fields.</p>
2379 <p class="code">
2380 int httpGetLength (<br>
2381 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2382 );</p>
2383 <h4 class="parameters">Parameters</h4>
2384 <dl>
2385 <dt>http</dt>
2386 <dd class="description">HTTP connection</dd>
2387 </dl>
2388 <h4 class="returnvalue">Return Value</h4>
2389 <p class="description">Content length</p>
2390 <h4 class="discussion">Discussion</h4>
2391 <p class="discussion">This function is deprecated and will not return lengths larger than
2392 2^31 - 1; use httpGetLength2() instead.
2393
2394 </p>
2395 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpGetLength2">httpGetLength2</a></h3>
2396 <p class="description">Get the amount of data remaining from the
2397 content-length or transfer-encoding fields.</p>
2398 <p class="code">
2399 off_t httpGetLength2 (<br>
2400 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2401 );</p>
2402 <h4 class="parameters">Parameters</h4>
2403 <dl>
2404 <dt>http</dt>
2405 <dd class="description">HTTP connection</dd>
2406 </dl>
2407 <h4 class="returnvalue">Return Value</h4>
2408 <p class="description">Content length</p>
2409 <h4 class="discussion">Discussion</h4>
2410 <p class="discussion">This function returns the complete content length, even for
2411 content larger than 2^31 - 1.
2412
2413 </p>
2414 <h3 class="function"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="httpGetPending">httpGetPending</a></h3>
2415 <p class="description">Get the number of bytes that are buffered for writing.</p>
2416 <p class="code">
2417 size_t httpGetPending (<br>
2418 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2419 );</p>
2420 <h4 class="parameters">Parameters</h4>
2421 <dl>
2422 <dt>http</dt>
2423 <dd class="description">HTTP connection</dd>
2424 </dl>
2425 <h4 class="returnvalue">Return Value</h4>
2426 <p class="description">Number of bytes buffered</p>
2427 <h3 class="function"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="httpGetReady">httpGetReady</a></h3>
2428 <p class="description">Get the number of bytes that can be read without blocking.</p>
2429 <p class="code">
2430 size_t httpGetReady (<br>
2431 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2432 );</p>
2433 <h4 class="parameters">Parameters</h4>
2434 <dl>
2435 <dt>http</dt>
2436 <dd class="description">HTTP connection</dd>
2437 </dl>
2438 <h4 class="returnvalue">Return Value</h4>
2439 <p class="description">Number of bytes available</p>
2440 <h3 class="function"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="httpGetRemaining">httpGetRemaining</a></h3>
2441 <p class="description">Get the number of remaining bytes in the message
2442 body or current chunk.</p>
2443 <p class="code">
2444 size_t httpGetRemaining (<br>
2445 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2446 );</p>
2447 <h4 class="parameters">Parameters</h4>
2448 <dl>
2449 <dt>http</dt>
2450 <dd class="description">HTTP connection</dd>
2451 </dl>
2452 <h4 class="returnvalue">Return Value</h4>
2453 <p class="description">Remaining bytes</p>
2454 <h4 class="discussion">Discussion</h4>
2455 <p class="discussion">The <a href="#httpIsChunked"><code>httpIsChunked</code></a> function can be used to determine whether the
2456 message body is chunked or fixed-length.
2457
2458 </p>
2459 <h3 class="function"><a name="httpGetState">httpGetState</a></h3>
2460 <p class="description">Get the current state of the HTTP request.</p>
2461 <p class="code">
2462 <a href="#http_state_t">http_state_t</a> httpGetState (<br>
2463 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2464 );</p>
2465 <h4 class="parameters">Parameters</h4>
2466 <dl>
2467 <dt>http</dt>
2468 <dd class="description">HTTP connection</dd>
2469 </dl>
2470 <h4 class="returnvalue">Return Value</h4>
2471 <p class="description">HTTP state</p>
2472 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpGetStatus">httpGetStatus</a></h3>
2473 <p class="description">Get the status of the last HTTP request.</p>
2474 <p class="code">
2475 http_status_t httpGetStatus (<br>
2476 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2477 );</p>
2478 <h4 class="parameters">Parameters</h4>
2479 <dl>
2480 <dt>http</dt>
2481 <dd class="description">HTTP connection</dd>
2482 </dl>
2483 <h4 class="returnvalue">Return Value</h4>
2484 <p class="description">HTTP status</p>
2485 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpGetSubField">httpGetSubField</a></h3>
2486 <p class="description">Get a sub-field value.</p>
2487 <p class="code">
2488 char *httpGetSubField (<br>
2489 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2490 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_field_t">http_field_t</a> field,<br>
2491 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2492 &nbsp;&nbsp;&nbsp;&nbsp;char *value<br>
2493 );</p>
2494 <h4 class="parameters">Parameters</h4>
2495 <dl>
2496 <dt>http</dt>
2497 <dd class="description">HTTP connection</dd>
2498 <dt>field</dt>
2499 <dd class="description">Field index</dd>
2500 <dt>name</dt>
2501 <dd class="description">Name of sub-field</dd>
2502 <dt>value</dt>
2503 <dd class="description">Value string</dd>
2504 </dl>
2505 <h4 class="returnvalue">Return Value</h4>
2506 <p class="description">Value or NULL</p>
2507 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpGetSubField2">httpGetSubField2</a></h3>
2508 <p class="description">Get a sub-field value.</p>
2509 <p class="code">
2510 char *httpGetSubField2 (<br>
2511 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2512 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_field_t">http_field_t</a> field,<br>
2513 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2514 &nbsp;&nbsp;&nbsp;&nbsp;char *value,<br>
2515 &nbsp;&nbsp;&nbsp;&nbsp;int valuelen<br>
2516 );</p>
2517 <h4 class="parameters">Parameters</h4>
2518 <dl>
2519 <dt>http</dt>
2520 <dd class="description">HTTP connection</dd>
2521 <dt>field</dt>
2522 <dd class="description">Field index</dd>
2523 <dt>name</dt>
2524 <dd class="description">Name of sub-field</dd>
2525 <dt>value</dt>
2526 <dd class="description">Value string</dd>
2527 <dt>valuelen</dt>
2528 <dd class="description">Size of value buffer</dd>
2529 </dl>
2530 <h4 class="returnvalue">Return Value</h4>
2531 <p class="description">Value or NULL</p>
2532 <h3 class="function"><a name="httpGetVersion">httpGetVersion</a></h3>
2533 <p class="description">Get the HTTP version at the other end.</p>
2534 <p class="code">
2535 <a href="#http_version_t">http_version_t</a> httpGetVersion (<br>
2536 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2537 );</p>
2538 <h4 class="parameters">Parameters</h4>
2539 <dl>
2540 <dt>http</dt>
2541 <dd class="description">HTTP connection</dd>
2542 </dl>
2543 <h4 class="returnvalue">Return Value</h4>
2544 <p class="description">Version number</p>
2545 <h3 class="function"><a name="httpGets">httpGets</a></h3>
2546 <p class="description">Get a line of text from a HTTP connection.</p>
2547 <p class="code">
2548 char *httpGets (<br>
2549 &nbsp;&nbsp;&nbsp;&nbsp;char *line,<br>
2550 &nbsp;&nbsp;&nbsp;&nbsp;int length,<br>
2551 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2552 );</p>
2553 <h4 class="parameters">Parameters</h4>
2554 <dl>
2555 <dt>line</dt>
2556 <dd class="description">Line to read into</dd>
2557 <dt>length</dt>
2558 <dd class="description">Max length of buffer</dd>
2559 <dt>http</dt>
2560 <dd class="description">HTTP connection</dd>
2561 </dl>
2562 <h4 class="returnvalue">Return Value</h4>
2563 <p class="description">Line or NULL</p>
2564 <h3 class="function"><a name="httpHead">httpHead</a></h3>
2565 <p class="description">Send a HEAD request to the server.</p>
2566 <p class="code">
2567 int httpHead (<br>
2568 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2569 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
2570 );</p>
2571 <h4 class="parameters">Parameters</h4>
2572 <dl>
2573 <dt>http</dt>
2574 <dd class="description">HTTP connection</dd>
2575 <dt>uri</dt>
2576 <dd class="description">URI for head</dd>
2577 </dl>
2578 <h4 class="returnvalue">Return Value</h4>
2579 <p class="description">Status of call (0 = success)</p>
2580 <h3 class="function"><a name="httpInitialize">httpInitialize</a></h3>
2581 <p class="description">Initialize the HTTP interface library and set the
2582 default HTTP proxy (if any).</p>
2583 <p class="code">
2584 void httpInitialize (void);</p>
2585 <h3 class="function"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="httpIsChunked">httpIsChunked</a></h3>
2586 <p class="description">Report whether a message body is chunked.</p>
2587 <p class="code">
2588 int httpIsChunked (<br>
2589 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2590 );</p>
2591 <h4 class="parameters">Parameters</h4>
2592 <dl>
2593 <dt>http</dt>
2594 <dd class="description">HTTP connection</dd>
2595 </dl>
2596 <h4 class="returnvalue">Return Value</h4>
2597 <p class="description">1 if chunked, 0 if not</p>
2598 <h4 class="discussion">Discussion</h4>
2599 <p class="discussion">This function returns non-zero if the message body is composed of
2600 variable-length chunks.
2601
2602 </p>
2603 <h3 class="function"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="httpIsEncrypted">httpIsEncrypted</a></h3>
2604 <p class="description">Report whether a connection is encrypted.</p>
2605 <p class="code">
2606 int httpIsEncrypted (<br>
2607 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2608 );</p>
2609 <h4 class="parameters">Parameters</h4>
2610 <dl>
2611 <dt>http</dt>
2612 <dd class="description">HTTP connection</dd>
2613 </dl>
2614 <h4 class="returnvalue">Return Value</h4>
2615 <p class="description">1 if encrypted, 0 if not</p>
2616 <h4 class="discussion">Discussion</h4>
2617 <p class="discussion">This function returns non-zero if the connection is currently encrypted.
2618
2619 </p>
2620 <h3 class="function"><a name="httpMD5">httpMD5</a></h3>
2621 <p class="description">Compute the MD5 sum of the username:group:password.</p>
2622 <p class="code">
2623 char *httpMD5 (<br>
2624 &nbsp;&nbsp;&nbsp;&nbsp;const char *username,<br>
2625 &nbsp;&nbsp;&nbsp;&nbsp;const char *realm,<br>
2626 &nbsp;&nbsp;&nbsp;&nbsp;const char *passwd,<br>
2627 &nbsp;&nbsp;&nbsp;&nbsp;char md5[33]<br>
2628 );</p>
2629 <h4 class="parameters">Parameters</h4>
2630 <dl>
2631 <dt>username</dt>
2632 <dd class="description">User name</dd>
2633 <dt>realm</dt>
2634 <dd class="description">Realm name</dd>
2635 <dt>passwd</dt>
2636 <dd class="description">Password string</dd>
2637 <dt>md5[33]</dt>
2638 <dd class="description">MD5 string</dd>
2639 </dl>
2640 <h4 class="returnvalue">Return Value</h4>
2641 <p class="description">MD5 sum</p>
2642 <h3 class="function"><a name="httpMD5Final">httpMD5Final</a></h3>
2643 <p class="description">Combine the MD5 sum of the username, group, and password
2644 with the server-supplied nonce value, method, and
2645 request-uri.</p>
2646 <p class="code">
2647 char *httpMD5Final (<br>
2648 &nbsp;&nbsp;&nbsp;&nbsp;const char *nonce,<br>
2649 &nbsp;&nbsp;&nbsp;&nbsp;const char *method,<br>
2650 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
2651 &nbsp;&nbsp;&nbsp;&nbsp;char md5[33]<br>
2652 );</p>
2653 <h4 class="parameters">Parameters</h4>
2654 <dl>
2655 <dt>nonce</dt>
2656 <dd class="description">Server nonce value</dd>
2657 <dt>method</dt>
2658 <dd class="description">METHOD (GET, POST, etc.)</dd>
2659 <dt>resource</dt>
2660 <dd class="description">Resource path</dd>
2661 <dt>md5[33]</dt>
2662 <dd class="description">MD5 sum</dd>
2663 </dl>
2664 <h4 class="returnvalue">Return Value</h4>
2665 <p class="description">New sum</p>
2666 <h3 class="function"><a name="httpMD5String">httpMD5String</a></h3>
2667 <p class="description">Convert an MD5 sum to a character string.</p>
2668 <p class="code">
2669 char *httpMD5String (<br>
2670 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char *sum,<br>
2671 &nbsp;&nbsp;&nbsp;&nbsp;char md5[33]<br>
2672 );</p>
2673 <h4 class="parameters">Parameters</h4>
2674 <dl>
2675 <dt>sum</dt>
2676 <dd class="description">MD5 sum data</dd>
2677 <dt>md5[33]</dt>
2678 <dd class="description">MD5 sum in hex</dd>
2679 </dl>
2680 <h4 class="returnvalue">Return Value</h4>
2681 <p class="description">MD5 sum in hex</p>
2682 <h3 class="function"><a name="httpOptions">httpOptions</a></h3>
2683 <p class="description">Send an OPTIONS request to the server.</p>
2684 <p class="code">
2685 int httpOptions (<br>
2686 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2687 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
2688 );</p>
2689 <h4 class="parameters">Parameters</h4>
2690 <dl>
2691 <dt>http</dt>
2692 <dd class="description">HTTP connection</dd>
2693 <dt>uri</dt>
2694 <dd class="description">URI for options</dd>
2695 </dl>
2696 <h4 class="returnvalue">Return Value</h4>
2697 <p class="description">Status of call (0 = success)</p>
2698 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="httpPeek">httpPeek</a></h3>
2699 <p class="description">Peek at data from a HTTP connection.</p>
2700 <p class="code">
2701 ssize_t httpPeek (<br>
2702 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2703 &nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
2704 &nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
2705 );</p>
2706 <h4 class="parameters">Parameters</h4>
2707 <dl>
2708 <dt>http</dt>
2709 <dd class="description">HTTP connection</dd>
2710 <dt>buffer</dt>
2711 <dd class="description">Buffer for data</dd>
2712 <dt>length</dt>
2713 <dd class="description">Maximum number of bytes</dd>
2714 </dl>
2715 <h4 class="returnvalue">Return Value</h4>
2716 <p class="description">Number of bytes copied</p>
2717 <h4 class="discussion">Discussion</h4>
2718 <p class="discussion">This function copies available data from the given HTTP connection, reading
2719 a buffer as needed. The data is still available for reading using
2720 <a href="#httpRead"><code>httpRead</code></a> or <a href="#httpRead2"><code>httpRead2</code></a>.<br>
2721 <br>
2722 For non-blocking connections the usual timeouts apply.
2723
2724 </p>
2725 <h3 class="function"><a name="httpPost">httpPost</a></h3>
2726 <p class="description">Send a POST request to the server.</p>
2727 <p class="code">
2728 int httpPost (<br>
2729 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2730 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
2731 );</p>
2732 <h4 class="parameters">Parameters</h4>
2733 <dl>
2734 <dt>http</dt>
2735 <dd class="description">HTTP connection</dd>
2736 <dt>uri</dt>
2737 <dd class="description">URI for post</dd>
2738 </dl>
2739 <h4 class="returnvalue">Return Value</h4>
2740 <p class="description">Status of call (0 = success)</p>
2741 <h3 class="function"><a name="httpPut">httpPut</a></h3>
2742 <p class="description">Send a PUT request to the server.</p>
2743 <p class="code">
2744 int httpPut (<br>
2745 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2746 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
2747 );</p>
2748 <h4 class="parameters">Parameters</h4>
2749 <dl>
2750 <dt>http</dt>
2751 <dd class="description">HTTP connection</dd>
2752 <dt>uri</dt>
2753 <dd class="description">URI to put</dd>
2754 </dl>
2755 <h4 class="returnvalue">Return Value</h4>
2756 <p class="description">Status of call (0 = success)</p>
2757 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpRead">httpRead</a></h3>
2758 <p class="description">Read data from a HTTP connection.</p>
2759 <p class="code">
2760 int httpRead (<br>
2761 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2762 &nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
2763 &nbsp;&nbsp;&nbsp;&nbsp;int length<br>
2764 );</p>
2765 <h4 class="parameters">Parameters</h4>
2766 <dl>
2767 <dt>http</dt>
2768 <dd class="description">HTTP connection</dd>
2769 <dt>buffer</dt>
2770 <dd class="description">Buffer for data</dd>
2771 <dt>length</dt>
2772 <dd class="description">Maximum number of bytes</dd>
2773 </dl>
2774 <h4 class="returnvalue">Return Value</h4>
2775 <p class="description">Number of bytes read</p>
2776 <h4 class="discussion">Discussion</h4>
2777 <p class="discussion">This function is deprecated. Use the httpRead2() function which can
2778 read more than 2GB of data.
2779
2780 </p>
2781 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpRead2">httpRead2</a></h3>
2782 <p class="description">Read data from a HTTP connection.</p>
2783 <p class="code">
2784 ssize_t httpRead2 (<br>
2785 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2786 &nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
2787 &nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
2788 );</p>
2789 <h4 class="parameters">Parameters</h4>
2790 <dl>
2791 <dt>http</dt>
2792 <dd class="description">HTTP connection</dd>
2793 <dt>buffer</dt>
2794 <dd class="description">Buffer for data</dd>
2795 <dt>length</dt>
2796 <dd class="description">Maximum number of bytes</dd>
2797 </dl>
2798 <h4 class="returnvalue">Return Value</h4>
2799 <p class="description">Number of bytes read</p>
2800 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="httpReadRequest">httpReadRequest</a></h3>
2801 <p class="description">Read a HTTP request from a connection.</p>
2802 <p class="code">
2803 <a href="#http_state_t">http_state_t</a> httpReadRequest (<br>
2804 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2805 &nbsp;&nbsp;&nbsp;&nbsp;char *uri,<br>
2806 &nbsp;&nbsp;&nbsp;&nbsp;size_t urilen<br>
2807 );</p>
2808 <h4 class="parameters">Parameters</h4>
2809 <dl>
2810 <dt>http</dt>
2811 <dd class="description">HTTP connection</dd>
2812 <dt>uri</dt>
2813 <dd class="description">URI buffer</dd>
2814 <dt>urilen</dt>
2815 <dd class="description">Size of URI buffer</dd>
2816 </dl>
2817 <h4 class="returnvalue">Return Value</h4>
2818 <p class="description">New state of connection</p>
2819 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpReconnect">httpReconnect</a></h3>
2820 <p class="description">Reconnect to a HTTP server.</p>
2821 <p class="code">
2822 int httpReconnect (<br>
2823 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2824 );</p>
2825 <h4 class="parameters">Parameters</h4>
2826 <dl>
2827 <dt>http</dt>
2828 <dd class="description">HTTP connection</dd>
2829 </dl>
2830 <h4 class="returnvalue">Return Value</h4>
2831 <p class="description">0 on success, non-zero on failure</p>
2832 <h4 class="discussion">Discussion</h4>
2833 <p class="discussion">This function is deprecated. Please use the <a href="#httpReconnect2"><code>httpReconnect2</code></a> function
2834 instead.
2835
2836 </p>
2837 <h3 class="function"><a name="httpReconnect2">httpReconnect2</a></h3>
2838 <p class="description">Reconnect to a HTTP server with timeout and optional
2839 cancel.</p>
2840 <p class="code">
2841 int httpReconnect2 (<br>
2842 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2843 &nbsp;&nbsp;&nbsp;&nbsp;int msec,<br>
2844 &nbsp;&nbsp;&nbsp;&nbsp;int *cancel<br>
2845 );</p>
2846 <h4 class="parameters">Parameters</h4>
2847 <dl>
2848 <dt>http</dt>
2849 <dd class="description">HTTP connection</dd>
2850 <dt>msec</dt>
2851 <dd class="description">Timeout in milliseconds</dd>
2852 <dt>cancel</dt>
2853 <dd class="description">Pointer to &quot;cancel&quot; variable</dd>
2854 </dl>
2855 <h4 class="returnvalue">Return Value</h4>
2856 <p class="description">0 on success, non-zero on failure</p>
2857 <h3 class="function"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="httpResolveHostname">httpResolveHostname</a></h3>
2858 <p class="description">Resolve the hostname of the HTTP connection
2859 address.</p>
2860 <p class="code">
2861 const char *httpResolveHostname (<br>
2862 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2863 &nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
2864 &nbsp;&nbsp;&nbsp;&nbsp;size_t bufsize<br>
2865 );</p>
2866 <h4 class="parameters">Parameters</h4>
2867 <dl>
2868 <dt>http</dt>
2869 <dd class="description">HTTP connection</dd>
2870 <dt>buffer</dt>
2871 <dd class="description">Hostname buffer</dd>
2872 <dt>bufsize</dt>
2873 <dd class="description">Size of buffer</dd>
2874 </dl>
2875 <h4 class="returnvalue">Return Value</h4>
2876 <p class="description">Resolved hostname or <code>NULL</code></p>
2877 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpSeparate">httpSeparate</a></h3>
2878 <p class="description">Separate a Universal Resource Identifier into its
2879 components.</p>
2880 <p class="code">
2881 void httpSeparate (<br>
2882 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri,<br>
2883 &nbsp;&nbsp;&nbsp;&nbsp;char *scheme,<br>
2884 &nbsp;&nbsp;&nbsp;&nbsp;char *username,<br>
2885 &nbsp;&nbsp;&nbsp;&nbsp;char *host,<br>
2886 &nbsp;&nbsp;&nbsp;&nbsp;int *port,<br>
2887 &nbsp;&nbsp;&nbsp;&nbsp;char *resource<br>
2888 );</p>
2889 <h4 class="parameters">Parameters</h4>
2890 <dl>
2891 <dt>uri</dt>
2892 <dd class="description">Universal Resource Identifier</dd>
2893 <dt>scheme</dt>
2894 <dd class="description">Scheme [32] (http, https, etc.)</dd>
2895 <dt>username</dt>
2896 <dd class="description">Username [1024]</dd>
2897 <dt>host</dt>
2898 <dd class="description">Hostname [1024]</dd>
2899 <dt>port</dt>
2900 <dd class="description">Port number to use</dd>
2901 <dt>resource</dt>
2902 <dd class="description">Resource/filename [1024]</dd>
2903 </dl>
2904 <h4 class="discussion">Discussion</h4>
2905 <p class="discussion">This function is deprecated; use the httpSeparateURI() function instead.
2906
2907 </p>
2908 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.21/macOS 10.4&nbsp;</span><a name="httpSeparate2">httpSeparate2</a></h3>
2909 <p class="description">Separate a Universal Resource Identifier into its
2910 components.</p>
2911 <p class="code">
2912 void httpSeparate2 (<br>
2913 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri,<br>
2914 &nbsp;&nbsp;&nbsp;&nbsp;char *scheme,<br>
2915 &nbsp;&nbsp;&nbsp;&nbsp;int schemelen,<br>
2916 &nbsp;&nbsp;&nbsp;&nbsp;char *username,<br>
2917 &nbsp;&nbsp;&nbsp;&nbsp;int usernamelen,<br>
2918 &nbsp;&nbsp;&nbsp;&nbsp;char *host,<br>
2919 &nbsp;&nbsp;&nbsp;&nbsp;int hostlen,<br>
2920 &nbsp;&nbsp;&nbsp;&nbsp;int *port,<br>
2921 &nbsp;&nbsp;&nbsp;&nbsp;char *resource,<br>
2922 &nbsp;&nbsp;&nbsp;&nbsp;int resourcelen<br>
2923 );</p>
2924 <h4 class="parameters">Parameters</h4>
2925 <dl>
2926 <dt>uri</dt>
2927 <dd class="description">Universal Resource Identifier</dd>
2928 <dt>scheme</dt>
2929 <dd class="description">Scheme (http, https, etc.)</dd>
2930 <dt>schemelen</dt>
2931 <dd class="description">Size of scheme buffer</dd>
2932 <dt>username</dt>
2933 <dd class="description">Username</dd>
2934 <dt>usernamelen</dt>
2935 <dd class="description">Size of username buffer</dd>
2936 <dt>host</dt>
2937 <dd class="description">Hostname</dd>
2938 <dt>hostlen</dt>
2939 <dd class="description">Size of hostname buffer</dd>
2940 <dt>port</dt>
2941 <dd class="description">Port number to use</dd>
2942 <dt>resource</dt>
2943 <dd class="description">Resource/filename</dd>
2944 <dt>resourcelen</dt>
2945 <dd class="description">Size of resource buffer</dd>
2946 </dl>
2947 <h4 class="discussion">Discussion</h4>
2948 <p class="discussion">This function is deprecated; use the httpSeparateURI() function instead.
2949
2950
2951 </p>
2952 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpSeparateURI">httpSeparateURI</a></h3>
2953 <p class="description">Separate a Universal Resource Identifier into its
2954 components.</p>
2955 <p class="code">
2956 <a href="#http_uri_status_t">http_uri_status_t</a> httpSeparateURI (<br>
2957 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_uri_coding_t">http_uri_coding_t</a> decoding,<br>
2958 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri,<br>
2959 &nbsp;&nbsp;&nbsp;&nbsp;char *scheme,<br>
2960 &nbsp;&nbsp;&nbsp;&nbsp;int schemelen,<br>
2961 &nbsp;&nbsp;&nbsp;&nbsp;char *username,<br>
2962 &nbsp;&nbsp;&nbsp;&nbsp;int usernamelen,<br>
2963 &nbsp;&nbsp;&nbsp;&nbsp;char *host,<br>
2964 &nbsp;&nbsp;&nbsp;&nbsp;int hostlen,<br>
2965 &nbsp;&nbsp;&nbsp;&nbsp;int *port,<br>
2966 &nbsp;&nbsp;&nbsp;&nbsp;char *resource,<br>
2967 &nbsp;&nbsp;&nbsp;&nbsp;int resourcelen<br>
2968 );</p>
2969 <h4 class="parameters">Parameters</h4>
2970 <dl>
2971 <dt>decoding</dt>
2972 <dd class="description">Decoding flags</dd>
2973 <dt>uri</dt>
2974 <dd class="description">Universal Resource Identifier</dd>
2975 <dt>scheme</dt>
2976 <dd class="description">Scheme (http, https, etc.)</dd>
2977 <dt>schemelen</dt>
2978 <dd class="description">Size of scheme buffer</dd>
2979 <dt>username</dt>
2980 <dd class="description">Username</dd>
2981 <dt>usernamelen</dt>
2982 <dd class="description">Size of username buffer</dd>
2983 <dt>host</dt>
2984 <dd class="description">Hostname</dd>
2985 <dt>hostlen</dt>
2986 <dd class="description">Size of hostname buffer</dd>
2987 <dt>port</dt>
2988 <dd class="description">Port number to use</dd>
2989 <dt>resource</dt>
2990 <dd class="description">Resource/filename</dd>
2991 <dt>resourcelen</dt>
2992 <dd class="description">Size of resource buffer</dd>
2993 </dl>
2994 <h4 class="returnvalue">Return Value</h4>
2995 <p class="description">Result of separation</p>
2996 <h3 class="function"><span class="info">&nbsp;CUPS 1.3/macOS 10.5&nbsp;</span><a name="httpSetAuthString">httpSetAuthString</a></h3>
2997 <p class="description">Set the current authorization string.</p>
2998 <p class="code">
2999 void httpSetAuthString (<br>
3000 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
3001 &nbsp;&nbsp;&nbsp;&nbsp;const char *scheme,<br>
3002 &nbsp;&nbsp;&nbsp;&nbsp;const char *data<br>
3003 );</p>
3004 <h4 class="parameters">Parameters</h4>
3005 <dl>
3006 <dt>http</dt>
3007 <dd class="description">HTTP connection</dd>
3008 <dt>scheme</dt>
3009 <dd class="description">Auth scheme (NULL to clear it)</dd>
3010 <dt>data</dt>
3011 <dd class="description">Auth data (NULL for none)</dd>
3012 </dl>
3013 <h4 class="discussion">Discussion</h4>
3014 <p class="discussion">This function just stores a copy of the current authorization string in
3015 the HTTP connection object. You must still call httpSetField() to set
3016 HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
3017 httpHead(), httpOptions(), httpPost, or httpPut().
3018
3019 </p>
3020 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/macOS 10.3&nbsp;</span><a name="httpSetCookie">httpSetCookie</a></h3>
3021 <p class="description">Set the cookie value(s).</p>
3022 <p class="code">
3023 void httpSetCookie (<br>
3024 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
3025 &nbsp;&nbsp;&nbsp;&nbsp;const char *cookie<br>
3026 );</p>
3027 <h4 class="parameters">Parameters</h4>
3028 <dl>
3029 <dt>http</dt>
3030 <dd class="description">Connection</dd>
3031 <dt>cookie</dt>
3032 <dd class="description">Cookie string</dd>
3033 </dl>
3034 <h3 class="function"><span class="info">&nbsp;CUPS 1.5/macOS 10.7&nbsp;</span><a name="httpSetCredentials">httpSetCredentials</a></h3>
3035 <p class="description">Set the credentials associated with an encrypted
3036 connection.</p>
3037 <p class="code">
3038 int httpSetCredentials (<br>
3039 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
3040 &nbsp;&nbsp;&nbsp;&nbsp;cups_array_t *credentials<br>
3041 );</p>
3042 <h4 class="parameters">Parameters</h4>
3043 <dl>
3044 <dt>http</dt>
3045 <dd class="description">HTTP connection</dd>
3046 <dt>credentials</dt>
3047 <dd class="description">Array of credentials</dd>
3048 </dl>
3049 <h4 class="returnvalue">Return Value</h4>
3050 <p class="description">Status of call (0 = success)</p>
3051 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="httpSetDefaultField">httpSetDefaultField</a></h3>
3052 <p class="description">Set the default value of an HTTP header.</p>
3053 <p class="code">
3054 void httpSetDefaultField (<br>
3055 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
3056 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_field_t">http_field_t</a> field,<br>
3057 &nbsp;&nbsp;&nbsp;&nbsp;const char *value<br>
3058 );</p>
3059 <h4 class="parameters">Parameters</h4>
3060 <dl>
3061 <dt>http</dt>
3062 <dd class="description">HTTP connection</dd>
3063 <dt>field</dt>
3064 <dd class="description">Field index</dd>
3065 <dt>value</dt>
3066 <dd class="description">Value</dd>
3067 </dl>
3068 <h4 class="discussion">Discussion</h4>
3069 <p class="discussion">Currently only <code>HTTP_FIELD_ACCEPT_ENCODING</code>, <code>HTTP_FIELD_SERVER</code>,
3070 and <code>HTTP_FIELD_USER_AGENT</code> can be set.
3071
3072 </p>
3073 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpSetExpect">httpSetExpect</a></h3>
3074 <p class="description">Set the Expect: header in a request.</p>
3075 <p class="code">
3076 void httpSetExpect (<br>
3077 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
3078 &nbsp;&nbsp;&nbsp;&nbsp;http_status_t expect<br>
3079 );</p>
3080 <h4 class="parameters">Parameters</h4>
3081 <dl>
3082 <dt>http</dt>
3083 <dd class="description">HTTP connection</dd>
3084 <dt>expect</dt>
3085 <dd class="description">HTTP status to expect
3086 (<code>HTTP_STATUS_CONTINUE</code>)</dd>
3087 </dl>
3088 <h4 class="discussion">Discussion</h4>
3089 <p class="discussion">Currently only <code>HTTP_STATUS_CONTINUE</code> is supported for the &quot;expect&quot;
3090 argument.
3091
3092 </p>
3093 <h3 class="function"><a name="httpSetField">httpSetField</a></h3>
3094 <p class="description">Set the value of an HTTP header.</p>
3095 <p class="code">
3096 void httpSetField (<br>
3097 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
3098 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_field_t">http_field_t</a> field,<br>
3099 &nbsp;&nbsp;&nbsp;&nbsp;const char *value<br>
3100 );</p>
3101 <h4 class="parameters">Parameters</h4>
3102 <dl>
3103 <dt>http</dt>
3104 <dd class="description">HTTP connection</dd>
3105 <dt>field</dt>
3106 <dd class="description">Field index</dd>
3107 <dt>value</dt>
3108 <dd class="description">Value</dd>
3109 </dl>
3110 <h3 class="function"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="httpSetKeepAlive">httpSetKeepAlive</a></h3>
3111 <p class="description">Set the current Keep-Alive state of a connection.</p>
3112 <p class="code">
3113 void httpSetKeepAlive (<br>
3114 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
3115 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_keepalive_t">http_keepalive_t</a> keep_alive<br>
3116 );</p>
3117 <h4 class="parameters">Parameters</h4>
3118 <dl>
3119 <dt>http</dt>
3120 <dd class="description">HTTP connection</dd>
3121 <dt>keep_alive</dt>
3122 <dd class="description">New Keep-Alive value</dd>
3123 </dl>
3124 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpSetLength">httpSetLength</a></h3>
3125 <p class="description">Set the content-length and content-encoding.</p>
3126 <p class="code">
3127 void httpSetLength (<br>
3128 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
3129 &nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
3130 );</p>
3131 <h4 class="parameters">Parameters</h4>
3132 <dl>
3133 <dt>http</dt>
3134 <dd class="description">HTTP connection</dd>
3135 <dt>length</dt>
3136 <dd class="description">Length (0 for chunked)</dd>
3137 </dl>
3138 <h3 class="function"><span class="info">&nbsp;CUPS 1.5/macOS 10.7&nbsp;</span><a name="httpSetTimeout">httpSetTimeout</a></h3>
3139 <p class="description">Set read/write timeouts and an optional callback.</p>
3140 <p class="code">
3141 void httpSetTimeout (<br>
3142 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
3143 &nbsp;&nbsp;&nbsp;&nbsp;double timeout,<br>
3144 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_timeout_cb_t">http_timeout_cb_t</a> cb,<br>
3145 &nbsp;&nbsp;&nbsp;&nbsp;void *user_data<br>
3146 );</p>
3147 <h4 class="parameters">Parameters</h4>
3148 <dl>
3149 <dt>http</dt>
3150 <dd class="description">HTTP connection</dd>
3151 <dt>timeout</dt>
3152 <dd class="description">Number of seconds for timeout,
3153 must be greater than 0</dd>
3154 <dt>cb</dt>
3155 <dd class="description">Callback function or NULL</dd>
3156 <dt>user_data</dt>
3157 <dd class="description">User data pointer</dd>
3158 </dl>
3159 <h4 class="discussion">Discussion</h4>
3160 <p class="discussion">The optional timeout callback receives both the HTTP connection and a user
3161 data pointer and must return 1 to continue or 0 to error (time) out.
3162
3163 </p>
3164 <h3 class="function"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="httpShutdown">httpShutdown</a></h3>
3165 <p class="description">Shutdown one side of an HTTP connection.</p>
3166 <p class="code">
3167 void httpShutdown (<br>
3168 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
3169 );</p>
3170 <h4 class="parameters">Parameters</h4>
3171 <dl>
3172 <dt>http</dt>
3173 <dd class="description">HTTP connection</dd>
3174 </dl>
3175 <h3 class="function"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="httpStateString">httpStateString</a></h3>
3176 <p class="description">Return the string describing a HTTP state value.</p>
3177 <p class="code">
3178 const char *httpStateString (<br>
3179 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_state_t">http_state_t</a> state<br>
3180 );</p>
3181 <h4 class="parameters">Parameters</h4>
3182 <dl>
3183 <dt>state</dt>
3184 <dd class="description">HTTP state value</dd>
3185 </dl>
3186 <h4 class="returnvalue">Return Value</h4>
3187 <p class="description">State string</p>
3188 <h3 class="function"><a name="httpStatus">httpStatus</a></h3>
3189 <p class="description">Return a short string describing a HTTP status code.</p>
3190 <p class="code">
3191 const char *httpStatus (<br>
3192 &nbsp;&nbsp;&nbsp;&nbsp;http_status_t status<br>
3193 );</p>
3194 <h4 class="parameters">Parameters</h4>
3195 <dl>
3196 <dt>status</dt>
3197 <dd class="description">HTTP status code</dd>
3198 </dl>
3199 <h4 class="returnvalue">Return Value</h4>
3200 <p class="description">Localized status string</p>
3201 <h4 class="discussion">Discussion</h4>
3202 <p class="discussion">The returned string is localized to the current POSIX locale and is based
3203 on the status strings defined in RFC 2616.</p>
3204 <h3 class="function"><a name="httpTrace">httpTrace</a></h3>
3205 <p class="description">Send an TRACE request to the server.</p>
3206 <p class="code">
3207 int httpTrace (<br>
3208 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
3209 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
3210 );</p>
3211 <h4 class="parameters">Parameters</h4>
3212 <dl>
3213 <dt>http</dt>
3214 <dd class="description">HTTP connection</dd>
3215 <dt>uri</dt>
3216 <dd class="description">URI for trace</dd>
3217 </dl>
3218 <h4 class="returnvalue">Return Value</h4>
3219 <p class="description">Status of call (0 = success)</p>
3220 <h3 class="function"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="httpURIStatusString">httpURIStatusString</a></h3>
3221 <p class="description">Return a string describing a URI status code.</p>
3222 <p class="code">
3223 const char *httpURIStatusString (<br>
3224 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_uri_status_t">http_uri_status_t</a> status<br>
3225 );</p>
3226 <h4 class="parameters">Parameters</h4>
3227 <dl>
3228 <dt>status</dt>
3229 <dd class="description">URI status code</dd>
3230 </dl>
3231 <h4 class="returnvalue">Return Value</h4>
3232 <p class="description">Localized status string</p>
3233 <h3 class="function"><a name="httpUpdate">httpUpdate</a></h3>
3234 <p class="description">Update the current HTTP state for incoming data.</p>
3235 <p class="code">
3236 http_status_t httpUpdate (<br>
3237 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
3238 );</p>
3239 <h4 class="parameters">Parameters</h4>
3240 <dl>
3241 <dt>http</dt>
3242 <dd class="description">HTTP connection</dd>
3243 </dl>
3244 <h4 class="returnvalue">Return Value</h4>
3245 <p class="description">HTTP status</p>
3246 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/macOS 10.3&nbsp;</span><a name="httpWait">httpWait</a></h3>
3247 <p class="description">Wait for data available on a connection.</p>
3248 <p class="code">
3249 int httpWait (<br>
3250 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
3251 &nbsp;&nbsp;&nbsp;&nbsp;int msec<br>
3252 );</p>
3253 <h4 class="parameters">Parameters</h4>
3254 <dl>
3255 <dt>http</dt>
3256 <dd class="description">HTTP connection</dd>
3257 <dt>msec</dt>
3258 <dd class="description">Milliseconds to wait</dd>
3259 </dl>
3260 <h4 class="returnvalue">Return Value</h4>
3261 <p class="description">1 if data is available, 0 otherwise</p>
3262 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpWrite">httpWrite</a></h3>
3263 <p class="description">Write data to a HTTP connection.</p>
3264 <p class="code">
3265 int httpWrite (<br>
3266 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
3267 &nbsp;&nbsp;&nbsp;&nbsp;const char *buffer,<br>
3268 &nbsp;&nbsp;&nbsp;&nbsp;int length<br>
3269 );</p>
3270 <h4 class="parameters">Parameters</h4>
3271 <dl>
3272 <dt>http</dt>
3273 <dd class="description">HTTP connection</dd>
3274 <dt>buffer</dt>
3275 <dd class="description">Buffer for data</dd>
3276 <dt>length</dt>
3277 <dd class="description">Number of bytes to write</dd>
3278 </dl>
3279 <h4 class="returnvalue">Return Value</h4>
3280 <p class="description">Number of bytes written</p>
3281 <h4 class="discussion">Discussion</h4>
3282 <p class="discussion">This function is deprecated. Use the httpWrite2() function which can
3283 write more than 2GB of data.
3284
3285 </p>
3286 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="httpWrite2">httpWrite2</a></h3>
3287 <p class="description">Write data to a HTTP connection.</p>
3288 <p class="code">
3289 ssize_t httpWrite2 (<br>
3290 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
3291 &nbsp;&nbsp;&nbsp;&nbsp;const char *buffer,<br>
3292 &nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
3293 );</p>
3294 <h4 class="parameters">Parameters</h4>
3295 <dl>
3296 <dt>http</dt>
3297 <dd class="description">HTTP connection</dd>
3298 <dt>buffer</dt>
3299 <dd class="description">Buffer for data</dd>
3300 <dt>length</dt>
3301 <dd class="description">Number of bytes to write</dd>
3302 </dl>
3303 <h4 class="returnvalue">Return Value</h4>
3304 <p class="description">Number of bytes written</p>
3305 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="httpWriteResponse">httpWriteResponse</a></h3>
3306 <p class="description">Write a HTTP response to a client connection.</p>
3307 <p class="code">
3308 int httpWriteResponse (<br>
3309 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
3310 &nbsp;&nbsp;&nbsp;&nbsp;http_status_t status<br>
3311 );</p>
3312 <h4 class="parameters">Parameters</h4>
3313 <dl>
3314 <dt>http</dt>
3315 <dd class="description">HTTP connection</dd>
3316 <dt>status</dt>
3317 <dd class="description">Status code</dd>
3318 </dl>
3319 <h4 class="returnvalue">Return Value</h4>
3320 <p class="description">0 on success, -1 on error</p>
3321 <h3 class="function"><a name="ippAddBoolean">ippAddBoolean</a></h3>
3322 <p class="description">Add a boolean attribute to an IPP message.</p>
3323 <p class="code">
3324 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddBoolean (<br>
3325 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3326 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3327 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3328 &nbsp;&nbsp;&nbsp;&nbsp;char value<br>
3329 );</p>
3330 <h4 class="parameters">Parameters</h4>
3331 <dl>
3332 <dt>ipp</dt>
3333 <dd class="description">IPP message</dd>
3334 <dt>group</dt>
3335 <dd class="description">IPP group</dd>
3336 <dt>name</dt>
3337 <dd class="description">Name of attribute</dd>
3338 <dt>value</dt>
3339 <dd class="description">Value of attribute</dd>
3340 </dl>
3341 <h4 class="returnvalue">Return Value</h4>
3342 <p class="description">New attribute</p>
3343 <h4 class="discussion">Discussion</h4>
3344 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3345 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3346 <br>
3347 The <code>group</code> parameter specifies the IPP attribute group tag: none
3348 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3349 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3350 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3351 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
3352 <h3 class="function"><a name="ippAddBooleans">ippAddBooleans</a></h3>
3353 <p class="description">Add an array of boolean values.</p>
3354 <p class="code">
3355 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddBooleans (<br>
3356 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3357 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3358 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3359 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
3360 &nbsp;&nbsp;&nbsp;&nbsp;const char *values<br>
3361 );</p>
3362 <h4 class="parameters">Parameters</h4>
3363 <dl>
3364 <dt>ipp</dt>
3365 <dd class="description">IPP message</dd>
3366 <dt>group</dt>
3367 <dd class="description">IPP group</dd>
3368 <dt>name</dt>
3369 <dd class="description">Name of attribute</dd>
3370 <dt>num_values</dt>
3371 <dd class="description">Number of values</dd>
3372 <dt>values</dt>
3373 <dd class="description">Values</dd>
3374 </dl>
3375 <h4 class="returnvalue">Return Value</h4>
3376 <p class="description">New attribute</p>
3377 <h4 class="discussion">Discussion</h4>
3378 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3379 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3380 <br>
3381 The <code>group</code> parameter specifies the IPP attribute group tag: none
3382 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3383 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3384 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3385 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
3386 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/macOS 10.3&nbsp;</span><a name="ippAddCollection">ippAddCollection</a></h3>
3387 <p class="description">Add a collection value.</p>
3388 <p class="code">
3389 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollection (<br>
3390 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3391 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3392 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3393 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *value<br>
3394 );</p>
3395 <h4 class="parameters">Parameters</h4>
3396 <dl>
3397 <dt>ipp</dt>
3398 <dd class="description">IPP message</dd>
3399 <dt>group</dt>
3400 <dd class="description">IPP group</dd>
3401 <dt>name</dt>
3402 <dd class="description">Name of attribute</dd>
3403 <dt>value</dt>
3404 <dd class="description">Value</dd>
3405 </dl>
3406 <h4 class="returnvalue">Return Value</h4>
3407 <p class="description">New attribute</p>
3408 <h4 class="discussion">Discussion</h4>
3409 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3410 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3411 <br>
3412 The <code>group</code> parameter specifies the IPP attribute group tag: none
3413 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3414 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3415 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3416 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).
3417
3418 </p>
3419 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/macOS 10.3&nbsp;</span><a name="ippAddCollections">ippAddCollections</a></h3>
3420 <p class="description">Add an array of collection values.</p>
3421 <p class="code">
3422 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollections (<br>
3423 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3424 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3425 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3426 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
3427 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#ipp_t">ipp_t</a> **values<br>
3428 );</p>
3429 <h4 class="parameters">Parameters</h4>
3430 <dl>
3431 <dt>ipp</dt>
3432 <dd class="description">IPP message</dd>
3433 <dt>group</dt>
3434 <dd class="description">IPP group</dd>
3435 <dt>name</dt>
3436 <dd class="description">Name of attribute</dd>
3437 <dt>num_values</dt>
3438 <dd class="description">Number of values</dd>
3439 <dt>values</dt>
3440 <dd class="description">Values</dd>
3441 </dl>
3442 <h4 class="returnvalue">Return Value</h4>
3443 <p class="description">New attribute</p>
3444 <h4 class="discussion">Discussion</h4>
3445 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3446 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3447 <br>
3448 The <code>group</code> parameter specifies the IPP attribute group tag: none
3449 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3450 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3451 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3452 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).
3453
3454 </p>
3455 <h3 class="function"><a name="ippAddDate">ippAddDate</a></h3>
3456 <p class="description">Add a date attribute to an IPP message.</p>
3457 <p class="code">
3458 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddDate (<br>
3459 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3460 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3461 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3462 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#ipp_uchar_t">ipp_uchar_t</a> *value<br>
3463 );</p>
3464 <h4 class="parameters">Parameters</h4>
3465 <dl>
3466 <dt>ipp</dt>
3467 <dd class="description">IPP message</dd>
3468 <dt>group</dt>
3469 <dd class="description">IPP group</dd>
3470 <dt>name</dt>
3471 <dd class="description">Name of attribute</dd>
3472 <dt>value</dt>
3473 <dd class="description">Value</dd>
3474 </dl>
3475 <h4 class="returnvalue">Return Value</h4>
3476 <p class="description">New attribute</p>
3477 <h4 class="discussion">Discussion</h4>
3478 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3479 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3480 <br>
3481 The <code>group</code> parameter specifies the IPP attribute group tag: none
3482 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3483 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3484 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3485 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
3486 <h3 class="function"><a name="ippAddInteger">ippAddInteger</a></h3>
3487 <p class="description">Add a integer attribute to an IPP message.</p>
3488 <p class="code">
3489 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddInteger (<br>
3490 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3491 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3492 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t value_tag,<br>
3493 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3494 &nbsp;&nbsp;&nbsp;&nbsp;int value<br>
3495 );</p>
3496 <h4 class="parameters">Parameters</h4>
3497 <dl>
3498 <dt>ipp</dt>
3499 <dd class="description">IPP message</dd>
3500 <dt>group</dt>
3501 <dd class="description">IPP group</dd>
3502 <dt>value_tag</dt>
3503 <dd class="description">Type of attribute</dd>
3504 <dt>name</dt>
3505 <dd class="description">Name of attribute</dd>
3506 <dt>value</dt>
3507 <dd class="description">Value of attribute</dd>
3508 </dl>
3509 <h4 class="returnvalue">Return Value</h4>
3510 <p class="description">New attribute</p>
3511 <h4 class="discussion">Discussion</h4>
3512 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3513 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3514 <br>
3515 The <code>group</code> parameter specifies the IPP attribute group tag: none
3516 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3517 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3518 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3519 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3520 <br>
3521 Supported values include enum (<code>IPP_TAG_ENUM</code>) and integer
3522 (<code>IPP_TAG_INTEGER</code>).</p>
3523 <h3 class="function"><a name="ippAddIntegers">ippAddIntegers</a></h3>
3524 <p class="description">Add an array of integer values.</p>
3525 <p class="code">
3526 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddIntegers (<br>
3527 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3528 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3529 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t value_tag,<br>
3530 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3531 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
3532 &nbsp;&nbsp;&nbsp;&nbsp;const int *values<br>
3533 );</p>
3534 <h4 class="parameters">Parameters</h4>
3535 <dl>
3536 <dt>ipp</dt>
3537 <dd class="description">IPP message</dd>
3538 <dt>group</dt>
3539 <dd class="description">IPP group</dd>
3540 <dt>value_tag</dt>
3541 <dd class="description">Type of attribute</dd>
3542 <dt>name</dt>
3543 <dd class="description">Name of attribute</dd>
3544 <dt>num_values</dt>
3545 <dd class="description">Number of values</dd>
3546 <dt>values</dt>
3547 <dd class="description">Values</dd>
3548 </dl>
3549 <h4 class="returnvalue">Return Value</h4>
3550 <p class="description">New attribute</p>
3551 <h4 class="discussion">Discussion</h4>
3552 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3553 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3554 <br>
3555 The <code>group</code> parameter specifies the IPP attribute group tag: none
3556 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3557 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3558 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3559 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3560 <br>
3561 Supported values include enum (<code>IPP_TAG_ENUM</code>) and integer
3562 (<code>IPP_TAG_INTEGER</code>).</p>
3563 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="ippAddOctetString">ippAddOctetString</a></h3>
3564 <p class="description">Add an octetString value to an IPP message.</p>
3565 <p class="code">
3566 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddOctetString (<br>
3567 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3568 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3569 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3570 &nbsp;&nbsp;&nbsp;&nbsp;const void *data,<br>
3571 &nbsp;&nbsp;&nbsp;&nbsp;int datalen<br>
3572 );</p>
3573 <h4 class="parameters">Parameters</h4>
3574 <dl>
3575 <dt>ipp</dt>
3576 <dd class="description">IPP message</dd>
3577 <dt>group</dt>
3578 <dd class="description">IPP group</dd>
3579 <dt>name</dt>
3580 <dd class="description">Name of attribute</dd>
3581 <dt>data</dt>
3582 <dd class="description">octetString data</dd>
3583 <dt>datalen</dt>
3584 <dd class="description">Length of data in bytes</dd>
3585 </dl>
3586 <h4 class="returnvalue">Return Value</h4>
3587 <p class="description">New attribute</p>
3588 <h4 class="discussion">Discussion</h4>
3589 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3590 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3591 <br>
3592 The <code>group</code> parameter specifies the IPP attribute group tag: none
3593 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3594 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3595 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3596 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).
3597
3598 </p>
3599 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippAddOutOfBand">ippAddOutOfBand</a></h3>
3600 <p class="description">Add an out-of-band value to an IPP message.</p>
3601 <p class="code">
3602 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddOutOfBand (<br>
3603 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3604 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3605 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t value_tag,<br>
3606 &nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
3607 );</p>
3608 <h4 class="parameters">Parameters</h4>
3609 <dl>
3610 <dt>ipp</dt>
3611 <dd class="description">IPP message</dd>
3612 <dt>group</dt>
3613 <dd class="description">IPP group</dd>
3614 <dt>value_tag</dt>
3615 <dd class="description">Type of attribute</dd>
3616 <dt>name</dt>
3617 <dd class="description">Name of attribute</dd>
3618 </dl>
3619 <h4 class="returnvalue">Return Value</h4>
3620 <p class="description">New attribute</p>
3621 <h4 class="discussion">Discussion</h4>
3622 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3623 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3624 <br>
3625 The <code>group</code> parameter specifies the IPP attribute group tag: none
3626 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3627 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3628 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3629 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3630 <br>
3631 Supported out-of-band values include unsupported-value
3632 (<code>IPP_TAG_UNSUPPORTED_VALUE</code>), default (<code>IPP_TAG_DEFAULT</code>), unknown
3633 (<code>IPP_TAG_UNKNOWN</code>), no-value (<code>IPP_TAG_NOVALUE</code>), not-settable
3634 (<code>IPP_TAG_NOTSETTABLE</code>), delete-attribute (<code>IPP_TAG_DELETEATTR</code>), and
3635 admin-define (<code>IPP_TAG_ADMINDEFINE</code>).
3636
3637 </p>
3638 <h3 class="function"><a name="ippAddRange">ippAddRange</a></h3>
3639 <p class="description">Add a range of values to an IPP message.</p>
3640 <p class="code">
3641 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddRange (<br>
3642 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3643 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3644 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3645 &nbsp;&nbsp;&nbsp;&nbsp;int lower,<br>
3646 &nbsp;&nbsp;&nbsp;&nbsp;int upper<br>
3647 );</p>
3648 <h4 class="parameters">Parameters</h4>
3649 <dl>
3650 <dt>ipp</dt>
3651 <dd class="description">IPP message</dd>
3652 <dt>group</dt>
3653 <dd class="description">IPP group</dd>
3654 <dt>name</dt>
3655 <dd class="description">Name of attribute</dd>
3656 <dt>lower</dt>
3657 <dd class="description">Lower value</dd>
3658 <dt>upper</dt>
3659 <dd class="description">Upper value</dd>
3660 </dl>
3661 <h4 class="returnvalue">Return Value</h4>
3662 <p class="description">New attribute</p>
3663 <h4 class="discussion">Discussion</h4>
3664 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3665 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3666 <br>
3667 The <code>group</code> parameter specifies the IPP attribute group tag: none
3668 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3669 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3670 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3671 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3672 <br>
3673 The <code>lower</code> parameter must be less than or equal to the <code>upper</code> parameter.</p>
3674 <h3 class="function"><a name="ippAddRanges">ippAddRanges</a></h3>
3675 <p class="description">Add ranges of values to an IPP message.</p>
3676 <p class="code">
3677 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddRanges (<br>
3678 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3679 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3680 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3681 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
3682 &nbsp;&nbsp;&nbsp;&nbsp;const int *lower,<br>
3683 &nbsp;&nbsp;&nbsp;&nbsp;const int *upper<br>
3684 );</p>
3685 <h4 class="parameters">Parameters</h4>
3686 <dl>
3687 <dt>ipp</dt>
3688 <dd class="description">IPP message</dd>
3689 <dt>group</dt>
3690 <dd class="description">IPP group</dd>
3691 <dt>name</dt>
3692 <dd class="description">Name of attribute</dd>
3693 <dt>num_values</dt>
3694 <dd class="description">Number of values</dd>
3695 <dt>lower</dt>
3696 <dd class="description">Lower values</dd>
3697 <dt>upper</dt>
3698 <dd class="description">Upper values</dd>
3699 </dl>
3700 <h4 class="returnvalue">Return Value</h4>
3701 <p class="description">New attribute</p>
3702 <h4 class="discussion">Discussion</h4>
3703 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3704 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3705 <br>
3706 The <code>group</code> parameter specifies the IPP attribute group tag: none
3707 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3708 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3709 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3710 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
3711 <h3 class="function"><a name="ippAddResolution">ippAddResolution</a></h3>
3712 <p class="description">Add a resolution value to an IPP message.</p>
3713 <p class="code">
3714 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddResolution (<br>
3715 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3716 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3717 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3718 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_res_t">ipp_res_t</a> units,<br>
3719 &nbsp;&nbsp;&nbsp;&nbsp;int xres,<br>
3720 &nbsp;&nbsp;&nbsp;&nbsp;int yres<br>
3721 );</p>
3722 <h4 class="parameters">Parameters</h4>
3723 <dl>
3724 <dt>ipp</dt>
3725 <dd class="description">IPP message</dd>
3726 <dt>group</dt>
3727 <dd class="description">IPP group</dd>
3728 <dt>name</dt>
3729 <dd class="description">Name of attribute</dd>
3730 <dt>units</dt>
3731 <dd class="description">Units for resolution</dd>
3732 <dt>xres</dt>
3733 <dd class="description">X resolution</dd>
3734 <dt>yres</dt>
3735 <dd class="description">Y resolution</dd>
3736 </dl>
3737 <h4 class="returnvalue">Return Value</h4>
3738 <p class="description">New attribute</p>
3739 <h4 class="discussion">Discussion</h4>
3740 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3741 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3742 <br>
3743 The <code>group</code> parameter specifies the IPP attribute group tag: none
3744 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3745 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3746 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3747 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
3748 <h3 class="function"><a name="ippAddResolutions">ippAddResolutions</a></h3>
3749 <p class="description">Add resolution values to an IPP message.</p>
3750 <p class="code">
3751 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddResolutions (<br>
3752 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3753 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3754 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3755 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
3756 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_res_t">ipp_res_t</a> units,<br>
3757 &nbsp;&nbsp;&nbsp;&nbsp;const int *xres,<br>
3758 &nbsp;&nbsp;&nbsp;&nbsp;const int *yres<br>
3759 );</p>
3760 <h4 class="parameters">Parameters</h4>
3761 <dl>
3762 <dt>ipp</dt>
3763 <dd class="description">IPP message</dd>
3764 <dt>group</dt>
3765 <dd class="description">IPP group</dd>
3766 <dt>name</dt>
3767 <dd class="description">Name of attribute</dd>
3768 <dt>num_values</dt>
3769 <dd class="description">Number of values</dd>
3770 <dt>units</dt>
3771 <dd class="description">Units for resolution</dd>
3772 <dt>xres</dt>
3773 <dd class="description">X resolutions</dd>
3774 <dt>yres</dt>
3775 <dd class="description">Y resolutions</dd>
3776 </dl>
3777 <h4 class="returnvalue">Return Value</h4>
3778 <p class="description">New attribute</p>
3779 <h4 class="discussion">Discussion</h4>
3780 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3781 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3782 <br>
3783 The <code>group</code> parameter specifies the IPP attribute group tag: none
3784 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3785 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3786 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3787 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
3788 <h3 class="function"><a name="ippAddSeparator">ippAddSeparator</a></h3>
3789 <p class="description">Add a group separator to an IPP message.</p>
3790 <p class="code">
3791 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddSeparator (<br>
3792 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
3793 );</p>
3794 <h4 class="parameters">Parameters</h4>
3795 <dl>
3796 <dt>ipp</dt>
3797 <dd class="description">IPP message</dd>
3798 </dl>
3799 <h4 class="returnvalue">Return Value</h4>
3800 <p class="description">New attribute</p>
3801 <h4 class="discussion">Discussion</h4>
3802 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3803 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.</p>
3804 <h3 class="function"><a name="ippAddString">ippAddString</a></h3>
3805 <p class="description">Add a language-encoded string to an IPP message.</p>
3806 <p class="code">
3807 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddString (<br>
3808 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3809 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3810 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t value_tag,<br>
3811 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3812 &nbsp;&nbsp;&nbsp;&nbsp;const char *language,<br>
3813 &nbsp;&nbsp;&nbsp;&nbsp;const char *value<br>
3814 );</p>
3815 <h4 class="parameters">Parameters</h4>
3816 <dl>
3817 <dt>ipp</dt>
3818 <dd class="description">IPP message</dd>
3819 <dt>group</dt>
3820 <dd class="description">IPP group</dd>
3821 <dt>value_tag</dt>
3822 <dd class="description">Type of attribute</dd>
3823 <dt>name</dt>
3824 <dd class="description">Name of attribute</dd>
3825 <dt>language</dt>
3826 <dd class="description">Language code</dd>
3827 <dt>value</dt>
3828 <dd class="description">Value</dd>
3829 </dl>
3830 <h4 class="returnvalue">Return Value</h4>
3831 <p class="description">New attribute</p>
3832 <h4 class="discussion">Discussion</h4>
3833 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3834 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3835 <br>
3836 The <code>group</code> parameter specifies the IPP attribute group tag: none
3837 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3838 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3839 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3840 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3841 <br>
3842 Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword
3843 (<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType
3844 (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage
3845 (<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage
3846 (<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme
3847 (<code>IPP_TAG_URISCHEME</code>).<br>
3848 <br>
3849 The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage and
3850 textWithLanguage string values and must be <code>NULL</code> for all other string values.</p>
3851 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="ippAddStringf">ippAddStringf</a></h3>
3852 <p class="description">Add a formatted string to an IPP message.</p>
3853 <p class="code">
3854 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStringf (<br>
3855 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3856 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3857 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t value_tag,<br>
3858 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3859 &nbsp;&nbsp;&nbsp;&nbsp;const char *language,<br>
3860 &nbsp;&nbsp;&nbsp;&nbsp;const char *format,<br>
3861 &nbsp;&nbsp;&nbsp;&nbsp;...<br>
3862 );</p>
3863 <h4 class="parameters">Parameters</h4>
3864 <dl>
3865 <dt>ipp</dt>
3866 <dd class="description">IPP message</dd>
3867 <dt>group</dt>
3868 <dd class="description">IPP group</dd>
3869 <dt>value_tag</dt>
3870 <dd class="description">Type of attribute</dd>
3871 <dt>name</dt>
3872 <dd class="description">Name of attribute</dd>
3873 <dt>language</dt>
3874 <dd class="description">Language code (<code>NULL</code> for default)</dd>
3875 <dt>format</dt>
3876 <dd class="description">Printf-style format string</dd>
3877 <dt>...</dt>
3878 <dd class="description">Additional arguments as needed</dd>
3879 </dl>
3880 <h4 class="returnvalue">Return Value</h4>
3881 <p class="description">New attribute</p>
3882 <h4 class="discussion">Discussion</h4>
3883 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3884 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3885 <br>
3886 The <code>group</code> parameter specifies the IPP attribute group tag: none
3887 (<code>IPP_TAG_ZERO</code>, for member attributes), document
3888 (<code>IPP_TAG_DOCUMENT</code>), event notification
3889 (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation (<code>IPP_TAG_OPERATION</code>),
3890 printer (<code>IPP_TAG_PRINTER</code>), subscription (<code>IPP_TAG_SUBSCRIPTION</code>),
3891 or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3892 <br>
3893 Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword
3894 (<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType
3895 (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage
3896 (<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage
3897 (<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme
3898 (<code>IPP_TAG_URISCHEME</code>).<br>
3899 <br>
3900 The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage
3901 and textWithLanguage string values and must be <code>NULL</code> for all other
3902 string values.<br>
3903 <br>
3904 The <code>format</code> parameter uses formatting characters compatible with the
3905 printf family of standard functions. Additional arguments follow it as
3906 needed. The formatted string is truncated as needed to the maximum length of
3907 the corresponding value type.
3908
3909 </p>
3910 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="ippAddStringfv">ippAddStringfv</a></h3>
3911 <p class="description">Add a formatted string to an IPP message.</p>
3912 <p class="code">
3913 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStringfv (<br>
3914 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3915 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3916 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t value_tag,<br>
3917 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3918 &nbsp;&nbsp;&nbsp;&nbsp;const char *language,<br>
3919 &nbsp;&nbsp;&nbsp;&nbsp;const char *format,<br>
3920 &nbsp;&nbsp;&nbsp;&nbsp;va_list ap<br>
3921 );</p>
3922 <h4 class="parameters">Parameters</h4>
3923 <dl>
3924 <dt>ipp</dt>
3925 <dd class="description">IPP message</dd>
3926 <dt>group</dt>
3927 <dd class="description">IPP group</dd>
3928 <dt>value_tag</dt>
3929 <dd class="description">Type of attribute</dd>
3930 <dt>name</dt>
3931 <dd class="description">Name of attribute</dd>
3932 <dt>language</dt>
3933 <dd class="description">Language code (<code>NULL</code> for default)</dd>
3934 <dt>format</dt>
3935 <dd class="description">Printf-style format string</dd>
3936 <dt>ap</dt>
3937 <dd class="description">Additional arguments</dd>
3938 </dl>
3939 <h4 class="returnvalue">Return Value</h4>
3940 <p class="description">New attribute</p>
3941 <h4 class="discussion">Discussion</h4>
3942 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3943 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3944 <br>
3945 The <code>group</code> parameter specifies the IPP attribute group tag: none
3946 (<code>IPP_TAG_ZERO</code>, for member attributes), document
3947 (<code>IPP_TAG_DOCUMENT</code>), event notification
3948 (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation (<code>IPP_TAG_OPERATION</code>),
3949 printer (<code>IPP_TAG_PRINTER</code>), subscription (<code>IPP_TAG_SUBSCRIPTION</code>),
3950 or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3951 <br>
3952 Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword
3953 (<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType
3954 (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage
3955 (<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage
3956 (<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme
3957 (<code>IPP_TAG_URISCHEME</code>).<br>
3958 <br>
3959 The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage
3960 and textWithLanguage string values and must be <code>NULL</code> for all other
3961 string values.<br>
3962 <br>
3963 The <code>format</code> parameter uses formatting characters compatible with the
3964 printf family of standard functions. Additional arguments are passed in the
3965 stdarg pointer <code>ap</code>. The formatted string is truncated as needed to the
3966 maximum length of the corresponding value type.
3967
3968 </p>
3969 <h3 class="function"><a name="ippAddStrings">ippAddStrings</a></h3>
3970 <p class="description">Add language-encoded strings to an IPP message.</p>
3971 <p class="code">
3972 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStrings (<br>
3973 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3974 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3975 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t value_tag,<br>
3976 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3977 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
3978 &nbsp;&nbsp;&nbsp;&nbsp;const char *language,<br>
3979 &nbsp;&nbsp;&nbsp;&nbsp;const char *const *values<br>
3980 );</p>
3981 <h4 class="parameters">Parameters</h4>
3982 <dl>
3983 <dt>ipp</dt>
3984 <dd class="description">IPP message</dd>
3985 <dt>group</dt>
3986 <dd class="description">IPP group</dd>
3987 <dt>value_tag</dt>
3988 <dd class="description">Type of attribute</dd>
3989 <dt>name</dt>
3990 <dd class="description">Name of attribute</dd>
3991 <dt>num_values</dt>
3992 <dd class="description">Number of values</dd>
3993 <dt>language</dt>
3994 <dd class="description">Language code (<code>NULL</code> for default)</dd>
3995 <dt>values</dt>
3996 <dd class="description">Values</dd>
3997 </dl>
3998 <h4 class="returnvalue">Return Value</h4>
3999 <p class="description">New attribute</p>
4000 <h4 class="discussion">Discussion</h4>
4001 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4002 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
4003 <br>
4004 The <code>group</code> parameter specifies the IPP attribute group tag: none
4005 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
4006 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
4007 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
4008 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
4009 <br>
4010 Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword
4011 (<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType
4012 (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage
4013 (<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage
4014 (<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme
4015 (<code>IPP_TAG_URISCHEME</code>).<br>
4016 <br>
4017 The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage and
4018 textWithLanguage string values and must be <code>NULL</code> for all other string values.</p>
4019 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippAttributeString">ippAttributeString</a></h3>
4020 <p class="description">Convert the attribute's value to a string.</p>
4021 <p class="code">
4022 size_t ippAttributeString (<br>
4023 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
4024 &nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
4025 &nbsp;&nbsp;&nbsp;&nbsp;size_t bufsize<br>
4026 );</p>
4027 <h4 class="parameters">Parameters</h4>
4028 <dl>
4029 <dt>attr</dt>
4030 <dd class="description">Attribute</dd>
4031 <dt>buffer</dt>
4032 <dd class="description">String buffer or NULL</dd>
4033 <dt>bufsize</dt>
4034 <dd class="description">Size of string buffer</dd>
4035 </dl>
4036 <h4 class="returnvalue">Return Value</h4>
4037 <p class="description">Number of bytes less nul</p>
4038 <h4 class="discussion">Discussion</h4>
4039 <p class="discussion">Returns the number of bytes that would be written, not including the
4040 trailing nul. The buffer pointer can be NULL to get the required length,
4041 just like (v)snprintf.
4042
4043 </p>
4044 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="ippContainsInteger">ippContainsInteger</a></h3>
4045 <p class="description">Determine whether an attribute contains the
4046 specified value or is within the list of ranges.</p>
4047 <p class="code">
4048 int ippContainsInteger (<br>
4049 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
4050 &nbsp;&nbsp;&nbsp;&nbsp;int value<br>
4051 );</p>
4052 <h4 class="parameters">Parameters</h4>
4053 <dl>
4054 <dt>attr</dt>
4055 <dd class="description">Attribute</dd>
4056 <dt>value</dt>
4057 <dd class="description">Integer/enum value</dd>
4058 </dl>
4059 <h4 class="returnvalue">Return Value</h4>
4060 <p class="description">1 on a match, 0 on no match</p>
4061 <h4 class="discussion">Discussion</h4>
4062 <p class="discussion">Returns non-zero when the attribute contains either a matching integer or
4063 enum value, or the value falls within one of the rangeOfInteger values for
4064 the attribute.
4065
4066 </p>
4067 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="ippContainsString">ippContainsString</a></h3>
4068 <p class="description">Determine whether an attribute contains the
4069 specified string value.</p>
4070 <p class="code">
4071 int ippContainsString (<br>
4072 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
4073 &nbsp;&nbsp;&nbsp;&nbsp;const char *value<br>
4074 );</p>
4075 <h4 class="parameters">Parameters</h4>
4076 <dl>
4077 <dt>attr</dt>
4078 <dd class="description">Attribute</dd>
4079 <dt>value</dt>
4080 <dd class="description">String value</dd>
4081 </dl>
4082 <h4 class="returnvalue">Return Value</h4>
4083 <p class="description">1 on a match, 0 on no match</p>
4084 <h4 class="discussion">Discussion</h4>
4085 <p class="discussion">Returns non-zero when the attribute contains a matching charset, keyword,
4086 language, mimeMediaType, name, text, URI, or URI scheme value.
4087
4088 </p>
4089 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippCopyAttribute">ippCopyAttribute</a></h3>
4090 <p class="description">Copy an attribute.</p>
4091 <p class="code">
4092 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippCopyAttribute (<br>
4093 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *dst,<br>
4094 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *srcattr,<br>
4095 &nbsp;&nbsp;&nbsp;&nbsp;int quickcopy<br>
4096 );</p>
4097 <h4 class="parameters">Parameters</h4>
4098 <dl>
4099 <dt>dst</dt>
4100 <dd class="description">Destination IPP message</dd>
4101 <dt>srcattr</dt>
4102 <dd class="description">Attribute to copy</dd>
4103 <dt>quickcopy</dt>
4104 <dd class="description">1 for a referenced copy, 0 for normal</dd>
4105 </dl>
4106 <h4 class="returnvalue">Return Value</h4>
4107 <p class="description">New attribute</p>
4108 <h4 class="discussion">Discussion</h4>
4109 <p class="discussion">The specified attribute, <code>attr</code>, is copied to the destination IPP message.
4110 When <code>quickcopy</code> is non-zero, a &quot;shallow&quot; reference copy of the attribute is
4111 created - this should only be done as long as the original source IPP message will
4112 not be freed for the life of the destination.
4113
4114 </p>
4115 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippCopyAttributes">ippCopyAttributes</a></h3>
4116 <p class="description">Copy attributes from one IPP message to another.</p>
4117 <p class="code">
4118 int ippCopyAttributes (<br>
4119 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *dst,<br>
4120 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *src,<br>
4121 &nbsp;&nbsp;&nbsp;&nbsp;int quickcopy,<br>
4122 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_copycb_t">ipp_copycb_t</a> cb,<br>
4123 &nbsp;&nbsp;&nbsp;&nbsp;void *context<br>
4124 );</p>
4125 <h4 class="parameters">Parameters</h4>
4126 <dl>
4127 <dt>dst</dt>
4128 <dd class="description">Destination IPP message</dd>
4129 <dt>src</dt>
4130 <dd class="description">Source IPP message</dd>
4131 <dt>quickcopy</dt>
4132 <dd class="description">1 for a referenced copy, 0 for normal</dd>
4133 <dt>cb</dt>
4134 <dd class="description">Copy callback or <code>NULL</code> for none</dd>
4135 <dt>context</dt>
4136 <dd class="description">Context pointer</dd>
4137 </dl>
4138 <h4 class="returnvalue">Return Value</h4>
4139 <p class="description">1 on success, 0 on error</p>
4140 <h4 class="discussion">Discussion</h4>
4141 <p class="discussion">Zero or more attributes are copied from the source IPP message, <code>src</code>, to the
4142 destination IPP message, <code>dst</code>. When <code>quickcopy</code> is non-zero, a &quot;shallow&quot;
4143 reference copy of the attribute is created - this should only be done as long as the
4144 original source IPP message will not be freed for the life of the destination.<br>
4145 <br>
4146 The <code>cb</code> and <code>context</code> parameters provide a generic way to &quot;filter&quot; the
4147 attributes that are copied - the function must return 1 to copy the attribute or
4148 0 to skip it. The function may also choose to do a partial copy of the source attribute
4149 itself.
4150
4151 </p>
4152 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="ippCreateRequestedArray">ippCreateRequestedArray</a></h3>
4153 <p class="description">Create a CUPS array of attribute names from the
4154 given requested-attributes attribute.</p>
4155 <p class="code">
4156 cups_array_t *ippCreateRequestedArray (<br>
4157 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *request<br>
4158 );</p>
4159 <h4 class="parameters">Parameters</h4>
4160 <dl>
4161 <dt>request</dt>
4162 <dd class="description">IPP request</dd>
4163 </dl>
4164 <h4 class="returnvalue">Return Value</h4>
4165 <p class="description">CUPS array or <code>NULL</code> if all</p>
4166 <h4 class="discussion">Discussion</h4>
4167 <p class="discussion">This function creates a (sorted) CUPS array of attribute names matching the
4168 list of &quot;requested-attribute&quot; values supplied in an IPP request. All IANA-
4169 registered values are supported in addition to the CUPS IPP extension
4170 attributes.<br>
4171 <br>
4172 The <code>request</code> parameter specifies the request message that was read from
4173 the client.
4174
4175 <code>NULL</code> is returned if all attributes should be returned. Otherwise, the
4176 result is a sorted array of attribute names, where <code>cupsArrayFind(array,
4177 "attribute-name")</code> will return a non-NULL pointer. The array must be freed
4178 using the <code>cupsArrayDelete</code> function.
4179
4180 </p>
4181 <h3 class="function"><a name="ippDateToTime">ippDateToTime</a></h3>
4182 <p class="description">Convert from RFC 1903 Date/Time format to UNIX time
4183 in seconds.</p>
4184 <p class="code">
4185 time_t ippDateToTime (<br>
4186 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#ipp_uchar_t">ipp_uchar_t</a> *date<br>
4187 );</p>
4188 <h4 class="parameters">Parameters</h4>
4189 <dl>
4190 <dt>date</dt>
4191 <dd class="description">RFC 1903 date info</dd>
4192 </dl>
4193 <h4 class="returnvalue">Return Value</h4>
4194 <p class="description">UNIX time value</p>
4195 <h3 class="function"><a name="ippDelete">ippDelete</a></h3>
4196 <p class="description">Delete an IPP message.</p>
4197 <p class="code">
4198 void ippDelete (<br>
4199 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4200 );</p>
4201 <h4 class="parameters">Parameters</h4>
4202 <dl>
4203 <dt>ipp</dt>
4204 <dd class="description">IPP message</dd>
4205 </dl>
4206 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/macOS 10.3&nbsp;</span><a name="ippDeleteAttribute">ippDeleteAttribute</a></h3>
4207 <p class="description">Delete a single attribute in an IPP message.</p>
4208 <p class="code">
4209 void ippDeleteAttribute (<br>
4210 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4211 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
4212 );</p>
4213 <h4 class="parameters">Parameters</h4>
4214 <dl>
4215 <dt>ipp</dt>
4216 <dd class="description">IPP message</dd>
4217 <dt>attr</dt>
4218 <dd class="description">Attribute to delete</dd>
4219 </dl>
4220 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippDeleteValues">ippDeleteValues</a></h3>
4221 <p class="description">Delete values in an attribute.</p>
4222 <p class="code">
4223 int ippDeleteValues (<br>
4224 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4225 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4226 &nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4227 &nbsp;&nbsp;&nbsp;&nbsp;int count<br>
4228 );</p>
4229 <h4 class="parameters">Parameters</h4>
4230 <dl>
4231 <dt>ipp</dt>
4232 <dd class="description">IPP message</dd>
4233 <dt>attr</dt>
4234 <dd class="description">Attribute</dd>
4235 <dt>element</dt>
4236 <dd class="description">Index of first value to delete (0-based)</dd>
4237 <dt>count</dt>
4238 <dd class="description">Number of values to delete</dd>
4239 </dl>
4240 <h4 class="returnvalue">Return Value</h4>
4241 <p class="description">1 on success, 0 on failure</p>
4242 <h4 class="discussion">Discussion</h4>
4243 <p class="discussion">The <code>element</code> parameter specifies the first value to delete, starting at
4244 0. It must be less than the number of values returned by <a href="#ippGetCount"><code>ippGetCount</code></a>.<br>
4245 <br>
4246 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4247 <br>
4248 Deleting all values in an attribute deletes the attribute.
4249
4250 </p>
4251 <h3 class="function"><a name="ippEnumString">ippEnumString</a></h3>
4252 <p class="description">Return a string corresponding to the enum value.</p>
4253 <p class="code">
4254 const char *ippEnumString (<br>
4255 &nbsp;&nbsp;&nbsp;&nbsp;const char *attrname,<br>
4256 &nbsp;&nbsp;&nbsp;&nbsp;int enumvalue<br>
4257 );</p>
4258 <h4 class="parameters">Parameters</h4>
4259 <dl>
4260 <dt>attrname</dt>
4261 <dd class="description">Attribute name</dd>
4262 <dt>enumvalue</dt>
4263 <dd class="description">Enum value</dd>
4264 </dl>
4265 <h4 class="returnvalue">Return Value</h4>
4266 <p class="description">Enum string</p>
4267 <h3 class="function"><a name="ippEnumValue">ippEnumValue</a></h3>
4268 <p class="description">Return the value associated with a given enum string.</p>
4269 <p class="code">
4270 int ippEnumValue (<br>
4271 &nbsp;&nbsp;&nbsp;&nbsp;const char *attrname,<br>
4272 &nbsp;&nbsp;&nbsp;&nbsp;const char *enumstring<br>
4273 );</p>
4274 <h4 class="parameters">Parameters</h4>
4275 <dl>
4276 <dt>attrname</dt>
4277 <dd class="description">Attribute name</dd>
4278 <dt>enumstring</dt>
4279 <dd class="description">Enum string</dd>
4280 </dl>
4281 <h4 class="returnvalue">Return Value</h4>
4282 <p class="description">Enum value or -1 if unknown</p>
4283 <h3 class="function"><a name="ippErrorString">ippErrorString</a></h3>
4284 <p class="description">Return a name for the given status code.</p>
4285 <p class="code">
4286 const char *ippErrorString (<br>
4287 &nbsp;&nbsp;&nbsp;&nbsp;ipp_status_t error<br>
4288 );</p>
4289 <h4 class="parameters">Parameters</h4>
4290 <dl>
4291 <dt>error</dt>
4292 <dd class="description">Error status</dd>
4293 </dl>
4294 <h4 class="returnvalue">Return Value</h4>
4295 <p class="description">Text string</p>
4296 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="ippErrorValue">ippErrorValue</a></h3>
4297 <p class="description">Return a status code for the given name.</p>
4298 <p class="code">
4299 ipp_status_t ippErrorValue (<br>
4300 &nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
4301 );</p>
4302 <h4 class="parameters">Parameters</h4>
4303 <dl>
4304 <dt>name</dt>
4305 <dd class="description">Name</dd>
4306 </dl>
4307 <h4 class="returnvalue">Return Value</h4>
4308 <p class="description">IPP status code</p>
4309 <h3 class="function"><a name="ippFindAttribute">ippFindAttribute</a></h3>
4310 <p class="description">Find a named attribute in a request.</p>
4311 <p class="code">
4312 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFindAttribute (<br>
4313 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4314 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
4315 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t type<br>
4316 );</p>
4317 <h4 class="parameters">Parameters</h4>
4318 <dl>
4319 <dt>ipp</dt>
4320 <dd class="description">IPP message</dd>
4321 <dt>name</dt>
4322 <dd class="description">Name of attribute</dd>
4323 <dt>type</dt>
4324 <dd class="description">Type of attribute</dd>
4325 </dl>
4326 <h4 class="returnvalue">Return Value</h4>
4327 <p class="description">Matching attribute</p>
4328 <h4 class="discussion">Discussion</h4>
4329 <p class="discussion">Starting with CUPS 2.0, the attribute name can contain a hierarchical list
4330 of attribute and member names separated by slashes, for example
4331 &quot;media-col/media-size&quot;.</p>
4332 <h3 class="function"><a name="ippFindNextAttribute">ippFindNextAttribute</a></h3>
4333 <p class="description">Find the next named attribute in a request.</p>
4334 <p class="code">
4335 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFindNextAttribute (<br>
4336 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4337 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
4338 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t type<br>
4339 );</p>
4340 <h4 class="parameters">Parameters</h4>
4341 <dl>
4342 <dt>ipp</dt>
4343 <dd class="description">IPP message</dd>
4344 <dt>name</dt>
4345 <dd class="description">Name of attribute</dd>
4346 <dt>type</dt>
4347 <dd class="description">Type of attribute</dd>
4348 </dl>
4349 <h4 class="returnvalue">Return Value</h4>
4350 <p class="description">Matching attribute</p>
4351 <h4 class="discussion">Discussion</h4>
4352 <p class="discussion">Starting with CUPS 2.0, the attribute name can contain a hierarchical list
4353 of attribute and member names separated by slashes, for example
4354 &quot;media-col/media-size&quot;.</p>
4355 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippFirstAttribute">ippFirstAttribute</a></h3>
4356 <p class="description">Return the first attribute in the message.</p>
4357 <p class="code">
4358 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFirstAttribute (<br>
4359 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4360 );</p>
4361 <h4 class="parameters">Parameters</h4>
4362 <dl>
4363 <dt>ipp</dt>
4364 <dd class="description">IPP message</dd>
4365 </dl>
4366 <h4 class="returnvalue">Return Value</h4>
4367 <p class="description">First attribute or <code>NULL</code> if none</p>
4368 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippGetBoolean">ippGetBoolean</a></h3>
4369 <p class="description">Get a boolean value for an attribute.</p>
4370 <p class="code">
4371 int ippGetBoolean (<br>
4372 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
4373 &nbsp;&nbsp;&nbsp;&nbsp;int element<br>
4374 );</p>
4375 <h4 class="parameters">Parameters</h4>
4376 <dl>
4377 <dt>attr</dt>
4378 <dd class="description">IPP attribute</dd>
4379 <dt>element</dt>
4380 <dd class="description">Value number (0-based)</dd>
4381 </dl>
4382 <h4 class="returnvalue">Return Value</h4>
4383 <p class="description">Boolean value or 0 on error</p>
4384 <h4 class="discussion">Discussion</h4>
4385 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4386 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4387
4388 </p>
4389 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippGetCollection">ippGetCollection</a></h3>
4390 <p class="description">Get a collection value for an attribute.</p>
4391 <p class="code">
4392 <a href="#ipp_t">ipp_t</a> *ippGetCollection (<br>
4393 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
4394 &nbsp;&nbsp;&nbsp;&nbsp;int element<br>
4395 );</p>
4396 <h4 class="parameters">Parameters</h4>
4397 <dl>
4398 <dt>attr</dt>
4399 <dd class="description">IPP attribute</dd>
4400 <dt>element</dt>
4401 <dd class="description">Value number (0-based)</dd>
4402 </dl>
4403 <h4 class="returnvalue">Return Value</h4>
4404 <p class="description">Collection value or <code>NULL</code> on error</p>
4405 <h4 class="discussion">Discussion</h4>
4406 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4407 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4408
4409 </p>
4410 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippGetCount">ippGetCount</a></h3>
4411 <p class="description">Get the number of values in an attribute.</p>
4412 <p class="code">
4413 int ippGetCount (<br>
4414 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
4415 );</p>
4416 <h4 class="parameters">Parameters</h4>
4417 <dl>
4418 <dt>attr</dt>
4419 <dd class="description">IPP attribute</dd>
4420 </dl>
4421 <h4 class="returnvalue">Return Value</h4>
4422 <p class="description">Number of values or 0 on error</p>
4423 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippGetDate">ippGetDate</a></h3>
4424 <p class="description">Get a date value for an attribute.</p>
4425 <p class="code">
4426 const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippGetDate (<br>
4427 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
4428 &nbsp;&nbsp;&nbsp;&nbsp;int element<br>
4429 );</p>
4430 <h4 class="parameters">Parameters</h4>
4431 <dl>
4432 <dt>attr</dt>
4433 <dd class="description">IPP attribute</dd>
4434 <dt>element</dt>
4435 <dd class="description">Value number (0-based)</dd>
4436 </dl>
4437 <h4 class="returnvalue">Return Value</h4>
4438 <p class="description">Date value or <code>NULL</code></p>
4439 <h4 class="discussion">Discussion</h4>
4440 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4441 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4442
4443 </p>
4444 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippGetGroupTag">ippGetGroupTag</a></h3>
4445 <p class="description">Get the group associated with an attribute.</p>
4446 <p class="code">
4447 ipp_tag_t ippGetGroupTag (<br>
4448 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
4449 );</p>
4450 <h4 class="parameters">Parameters</h4>
4451 <dl>
4452 <dt>attr</dt>
4453 <dd class="description">IPP attribute</dd>
4454 </dl>
4455 <h4 class="returnvalue">Return Value</h4>
4456 <p class="description">Group tag or <code>IPP_TAG_ZERO</code> on error</p>
4457 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippGetInteger">ippGetInteger</a></h3>
4458 <p class="description">Get the integer/enum value for an attribute.</p>
4459 <p class="code">
4460 int ippGetInteger (<br>
4461 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
4462 &nbsp;&nbsp;&nbsp;&nbsp;int element<br>
4463 );</p>
4464 <h4 class="parameters">Parameters</h4>
4465 <dl>
4466 <dt>attr</dt>
4467 <dd class="description">IPP attribute</dd>
4468 <dt>element</dt>
4469 <dd class="description">Value number (0-based)</dd>
4470 </dl>
4471 <h4 class="returnvalue">Return Value</h4>
4472 <p class="description">Value or 0 on error</p>
4473 <h4 class="discussion">Discussion</h4>
4474 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4475 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4476
4477 </p>
4478 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippGetName">ippGetName</a></h3>
4479 <p class="description">Get the attribute name.</p>
4480 <p class="code">
4481 const char *ippGetName (<br>
4482 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
4483 );</p>
4484 <h4 class="parameters">Parameters</h4>
4485 <dl>
4486 <dt>attr</dt>
4487 <dd class="description">IPP attribute</dd>
4488 </dl>
4489 <h4 class="returnvalue">Return Value</h4>
4490 <p class="description">Attribute name or <code>NULL</code> for separators</p>
4491 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="ippGetOctetString">ippGetOctetString</a></h3>
4492 <p class="description">Get an octetString value from an IPP attribute.</p>
4493 <p class="code">
4494 void *ippGetOctetString (<br>
4495 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
4496 &nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4497 &nbsp;&nbsp;&nbsp;&nbsp;int *datalen<br>
4498 );</p>
4499 <h4 class="parameters">Parameters</h4>
4500 <dl>
4501 <dt>attr</dt>
4502 <dd class="description">IPP attribute</dd>
4503 <dt>element</dt>
4504 <dd class="description">Value number (0-based)</dd>
4505 <dt>datalen</dt>
4506 <dd class="description">Length of octetString data</dd>
4507 </dl>
4508 <h4 class="returnvalue">Return Value</h4>
4509 <p class="description">Pointer to octetString data</p>
4510 <h4 class="discussion">Discussion</h4>
4511 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4512 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4513
4514 </p>
4515 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippGetOperation">ippGetOperation</a></h3>
4516 <p class="description">Get the operation ID in an IPP message.</p>
4517 <p class="code">
4518 ipp_op_t ippGetOperation (<br>
4519 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4520 );</p>
4521 <h4 class="parameters">Parameters</h4>
4522 <dl>
4523 <dt>ipp</dt>
4524 <dd class="description">IPP request message</dd>
4525 </dl>
4526 <h4 class="returnvalue">Return Value</h4>
4527 <p class="description">Operation ID or 0 on error</p>
4528 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippGetRange">ippGetRange</a></h3>
4529 <p class="description">Get a rangeOfInteger value from an attribute.</p>
4530 <p class="code">
4531 int ippGetRange (<br>
4532 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
4533 &nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4534 &nbsp;&nbsp;&nbsp;&nbsp;int *uppervalue<br>
4535 );</p>
4536 <h4 class="parameters">Parameters</h4>
4537 <dl>
4538 <dt>attr</dt>
4539 <dd class="description">IPP attribute</dd>
4540 <dt>element</dt>
4541 <dd class="description">Value number (0-based)</dd>
4542 <dt>uppervalue</dt>
4543 <dd class="description">Upper value of range</dd>
4544 </dl>
4545 <h4 class="returnvalue">Return Value</h4>
4546 <p class="description">Lower value of range or 0</p>
4547 <h4 class="discussion">Discussion</h4>
4548 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4549 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4550
4551 </p>
4552 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippGetRequestId">ippGetRequestId</a></h3>
4553 <p class="description">Get the request ID from an IPP message.</p>
4554 <p class="code">
4555 int ippGetRequestId (<br>
4556 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4557 );</p>
4558 <h4 class="parameters">Parameters</h4>
4559 <dl>
4560 <dt>ipp</dt>
4561 <dd class="description">IPP message</dd>
4562 </dl>
4563 <h4 class="returnvalue">Return Value</h4>
4564 <p class="description">Request ID or 0 on error</p>
4565 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippGetResolution">ippGetResolution</a></h3>
4566 <p class="description">Get a resolution value for an attribute.</p>
4567 <p class="code">
4568 int ippGetResolution (<br>
4569 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
4570 &nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4571 &nbsp;&nbsp;&nbsp;&nbsp;int *yres,<br>
4572 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_res_t">ipp_res_t</a> *units<br>
4573 );</p>
4574 <h4 class="parameters">Parameters</h4>
4575 <dl>
4576 <dt>attr</dt>
4577 <dd class="description">IPP attribute</dd>
4578 <dt>element</dt>
4579 <dd class="description">Value number (0-based)</dd>
4580 <dt>yres</dt>
4581 <dd class="description">Vertical/feed resolution</dd>
4582 <dt>units</dt>
4583 <dd class="description">Units for resolution</dd>
4584 </dl>
4585 <h4 class="returnvalue">Return Value</h4>
4586 <p class="description">Horizontal/cross feed resolution or 0</p>
4587 <h4 class="discussion">Discussion</h4>
4588 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4589 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4590
4591 </p>
4592 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippGetState">ippGetState</a></h3>
4593 <p class="description">Get the IPP message state.</p>
4594 <p class="code">
4595 <a href="#ipp_state_t">ipp_state_t</a> ippGetState (<br>
4596 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4597 );</p>
4598 <h4 class="parameters">Parameters</h4>
4599 <dl>
4600 <dt>ipp</dt>
4601 <dd class="description">IPP message</dd>
4602 </dl>
4603 <h4 class="returnvalue">Return Value</h4>
4604 <p class="description">IPP message state value</p>
4605 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippGetStatusCode">ippGetStatusCode</a></h3>
4606 <p class="description">Get the status code from an IPP response or event message.</p>
4607 <p class="code">
4608 ipp_status_t ippGetStatusCode (<br>
4609 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4610 );</p>
4611 <h4 class="parameters">Parameters</h4>
4612 <dl>
4613 <dt>ipp</dt>
4614 <dd class="description">IPP response or event message</dd>
4615 </dl>
4616 <h4 class="returnvalue">Return Value</h4>
4617 <p class="description">Status code in IPP message</p>
4618 <h3 class="function"><a name="ippGetString">ippGetString</a></h3>
4619 <p class="description">Return the value...</p>
4620 <p class="code">
4621 const char *ippGetString (<br>
4622 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
4623 &nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4624 &nbsp;&nbsp;&nbsp;&nbsp;const char **language<br>
4625 );</p>
4626 <h4 class="parameters">Parameters</h4>
4627 <dl>
4628 <dt>attr</dt>
4629 <dd class="description">IPP attribute</dd>
4630 <dt>element</dt>
4631 <dd class="description">Value number (0-based)</dd>
4632 <dt>language</dt>
4633 <dd class="description">Language code (<code>NULL</code> for don't care)</dd>
4634 </dl>
4635 <h4 class="returnvalue">Return Value</h4>
4636 <p class="description">Get the string and optionally the language code for an attribute.</p>
4637 <p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4638 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4639
4640 </p>
4641 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippGetValueTag">ippGetValueTag</a></h3>
4642 <p class="description">Get the value tag for an attribute.</p>
4643 <p class="code">
4644 ipp_tag_t ippGetValueTag (<br>
4645 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
4646 );</p>
4647 <h4 class="parameters">Parameters</h4>
4648 <dl>
4649 <dt>attr</dt>
4650 <dd class="description">IPP attribute</dd>
4651 </dl>
4652 <h4 class="returnvalue">Return Value</h4>
4653 <p class="description">Value tag or <code>IPP_TAG_ZERO</code> on error</p>
4654 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippGetVersion">ippGetVersion</a></h3>
4655 <p class="description">Get the major and minor version number from an IPP message.</p>
4656 <p class="code">
4657 int ippGetVersion (<br>
4658 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4659 &nbsp;&nbsp;&nbsp;&nbsp;int *minor<br>
4660 );</p>
4661 <h4 class="parameters">Parameters</h4>
4662 <dl>
4663 <dt>ipp</dt>
4664 <dd class="description">IPP message</dd>
4665 <dt>minor</dt>
4666 <dd class="description">Minor version number or <code>NULL</code></dd>
4667 </dl>
4668 <h4 class="returnvalue">Return Value</h4>
4669 <p class="description">Major version number or 0 on error</p>
4670 <h3 class="function"><a name="ippLength">ippLength</a></h3>
4671 <p class="description">Compute the length of an IPP message.</p>
4672 <p class="code">
4673 size_t ippLength (<br>
4674 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4675 );</p>
4676 <h4 class="parameters">Parameters</h4>
4677 <dl>
4678 <dt>ipp</dt>
4679 <dd class="description">IPP message</dd>
4680 </dl>
4681 <h4 class="returnvalue">Return Value</h4>
4682 <p class="description">Size of IPP message</p>
4683 <h3 class="function"><a name="ippNew">ippNew</a></h3>
4684 <p class="description">Allocate a new IPP message.</p>
4685 <p class="code">
4686 <a href="#ipp_t">ipp_t</a> *ippNew (void);</p>
4687 <h4 class="returnvalue">Return Value</h4>
4688 <p class="description">New IPP message</p>
4689 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="ippNewRequest">ippNewRequest</a></h3>
4690 <p class="description">Allocate a new IPP request message.</p>
4691 <p class="code">
4692 <a href="#ipp_t">ipp_t</a> *ippNewRequest (<br>
4693 &nbsp;&nbsp;&nbsp;&nbsp;ipp_op_t op<br>
4694 );</p>
4695 <h4 class="parameters">Parameters</h4>
4696 <dl>
4697 <dt>op</dt>
4698 <dd class="description">Operation code</dd>
4699 </dl>
4700 <h4 class="returnvalue">Return Value</h4>
4701 <p class="description">IPP request message</p>
4702 <h4 class="discussion">Discussion</h4>
4703 <p class="discussion">The new request message is initialized with the attributes-charset and
4704 attributes-natural-language attributes added. The
4705 attributes-natural-language value is derived from the current locale.
4706
4707 </p>
4708 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="ippNewResponse">ippNewResponse</a></h3>
4709 <p class="description">Allocate a new IPP response message.</p>
4710 <p class="code">
4711 <a href="#ipp_t">ipp_t</a> *ippNewResponse (<br>
4712 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *request<br>
4713 );</p>
4714 <h4 class="parameters">Parameters</h4>
4715 <dl>
4716 <dt>request</dt>
4717 <dd class="description">IPP request message</dd>
4718 </dl>
4719 <h4 class="returnvalue">Return Value</h4>
4720 <p class="description">IPP response message</p>
4721 <h4 class="discussion">Discussion</h4>
4722 <p class="discussion">The new response message is initialized with the same version-number,
4723 request-id, attributes-charset, and attributes-natural-language as the
4724 provided request message. If the attributes-charset or
4725 attributes-natural-language attributes are missing from the request,
4726 &quot;utf-8&quot; and a value derived from the current locale are substituted,
4727 respectively.
4728
4729 </p>
4730 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippNextAttribute">ippNextAttribute</a></h3>
4731 <p class="description">Return the next attribute in the message.</p>
4732 <p class="code">
4733 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippNextAttribute (<br>
4734 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4735 );</p>
4736 <h4 class="parameters">Parameters</h4>
4737 <dl>
4738 <dt>ipp</dt>
4739 <dd class="description">IPP message</dd>
4740 </dl>
4741 <h4 class="returnvalue">Return Value</h4>
4742 <p class="description">Next attribute or <code>NULL</code> if none</p>
4743 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="ippOpString">ippOpString</a></h3>
4744 <p class="description">Return a name for the given operation id.</p>
4745 <p class="code">
4746 const char *ippOpString (<br>
4747 &nbsp;&nbsp;&nbsp;&nbsp;ipp_op_t op<br>
4748 );</p>
4749 <h4 class="parameters">Parameters</h4>
4750 <dl>
4751 <dt>op</dt>
4752 <dd class="description">Operation ID</dd>
4753 </dl>
4754 <h4 class="returnvalue">Return Value</h4>
4755 <p class="description">Name</p>
4756 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="ippOpValue">ippOpValue</a></h3>
4757 <p class="description">Return an operation id for the given name.</p>
4758 <p class="code">
4759 ipp_op_t ippOpValue (<br>
4760 &nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
4761 );</p>
4762 <h4 class="parameters">Parameters</h4>
4763 <dl>
4764 <dt>name</dt>
4765 <dd class="description">Textual name</dd>
4766 </dl>
4767 <h4 class="returnvalue">Return Value</h4>
4768 <p class="description">Operation ID</p>
4769 <h3 class="function"><a name="ippPort">ippPort</a></h3>
4770 <p class="description">Return the default IPP port number.</p>
4771 <p class="code">
4772 int ippPort (void);</p>
4773 <h4 class="returnvalue">Return Value</h4>
4774 <p class="description">Port number</p>
4775 <h3 class="function"><a name="ippRead">ippRead</a></h3>
4776 <p class="description">Read data for an IPP message from a HTTP connection.</p>
4777 <p class="code">
4778 <a href="#ipp_state_t">ipp_state_t</a> ippRead (<br>
4779 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
4780 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4781 );</p>
4782 <h4 class="parameters">Parameters</h4>
4783 <dl>
4784 <dt>http</dt>
4785 <dd class="description">HTTP connection</dd>
4786 <dt>ipp</dt>
4787 <dd class="description">IPP data</dd>
4788 </dl>
4789 <h4 class="returnvalue">Return Value</h4>
4790 <p class="description">Current state</p>
4791 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/macOS 10.3&nbsp;</span><a name="ippReadFile">ippReadFile</a></h3>
4792 <p class="description">Read data for an IPP message from a file.</p>
4793 <p class="code">
4794 <a href="#ipp_state_t">ipp_state_t</a> ippReadFile (<br>
4795 &nbsp;&nbsp;&nbsp;&nbsp;int fd,<br>
4796 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4797 );</p>
4798 <h4 class="parameters">Parameters</h4>
4799 <dl>
4800 <dt>fd</dt>
4801 <dd class="description">HTTP data</dd>
4802 <dt>ipp</dt>
4803 <dd class="description">IPP data</dd>
4804 </dl>
4805 <h4 class="returnvalue">Return Value</h4>
4806 <p class="description">Current state</p>
4807 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="ippReadIO">ippReadIO</a></h3>
4808 <p class="description">Read data for an IPP message.</p>
4809 <p class="code">
4810 <a href="#ipp_state_t">ipp_state_t</a> ippReadIO (<br>
4811 &nbsp;&nbsp;&nbsp;&nbsp;void *src,<br>
4812 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_iocb_t">ipp_iocb_t</a> cb,<br>
4813 &nbsp;&nbsp;&nbsp;&nbsp;int blocking,<br>
4814 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *parent,<br>
4815 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4816 );</p>
4817 <h4 class="parameters">Parameters</h4>
4818 <dl>
4819 <dt>src</dt>
4820 <dd class="description">Data source</dd>
4821 <dt>cb</dt>
4822 <dd class="description">Read callback function</dd>
4823 <dt>blocking</dt>
4824 <dd class="description">Use blocking IO?</dd>
4825 <dt>parent</dt>
4826 <dd class="description">Parent request, if any</dd>
4827 <dt>ipp</dt>
4828 <dd class="description">IPP data</dd>
4829 </dl>
4830 <h4 class="returnvalue">Return Value</h4>
4831 <p class="description">Current state</p>
4832 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippSetBoolean">ippSetBoolean</a></h3>
4833 <p class="description">Set a boolean value in an attribute.</p>
4834 <p class="code">
4835 int ippSetBoolean (<br>
4836 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4837 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4838 &nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4839 &nbsp;&nbsp;&nbsp;&nbsp;int boolvalue<br>
4840 );</p>
4841 <h4 class="parameters">Parameters</h4>
4842 <dl>
4843 <dt>ipp</dt>
4844 <dd class="description">IPP message</dd>
4845 <dt>attr</dt>
4846 <dd class="description">IPP attribute</dd>
4847 <dt>element</dt>
4848 <dd class="description">Value number (0-based)</dd>
4849 <dt>boolvalue</dt>
4850 <dd class="description">Boolean value</dd>
4851 </dl>
4852 <h4 class="returnvalue">Return Value</h4>
4853 <p class="description">1 on success, 0 on failure</p>
4854 <h4 class="discussion">Discussion</h4>
4855 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4856 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
4857 <br>
4858 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4859 <br>
4860 The <code>element</code> parameter specifies which value to set from 0 to
4861 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
4862
4863 </p>
4864 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippSetCollection">ippSetCollection</a></h3>
4865 <p class="description">Set a collection value in an attribute.</p>
4866 <p class="code">
4867 int ippSetCollection (<br>
4868 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4869 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4870 &nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4871 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *colvalue<br>
4872 );</p>
4873 <h4 class="parameters">Parameters</h4>
4874 <dl>
4875 <dt>ipp</dt>
4876 <dd class="description">IPP message</dd>
4877 <dt>attr</dt>
4878 <dd class="description">IPP attribute</dd>
4879 <dt>element</dt>
4880 <dd class="description">Value number (0-based)</dd>
4881 <dt>colvalue</dt>
4882 <dd class="description">Collection value</dd>
4883 </dl>
4884 <h4 class="returnvalue">Return Value</h4>
4885 <p class="description">1 on success, 0 on failure</p>
4886 <h4 class="discussion">Discussion</h4>
4887 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4888 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
4889 <br>
4890 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4891 <br>
4892 The <code>element</code> parameter specifies which value to set from 0 to
4893 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
4894
4895 </p>
4896 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippSetDate">ippSetDate</a></h3>
4897 <p class="description">Set a date value in an attribute.</p>
4898 <p class="code">
4899 int ippSetDate (<br>
4900 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4901 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4902 &nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4903 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#ipp_uchar_t">ipp_uchar_t</a> *datevalue<br>
4904 );</p>
4905 <h4 class="parameters">Parameters</h4>
4906 <dl>
4907 <dt>ipp</dt>
4908 <dd class="description">IPP message</dd>
4909 <dt>attr</dt>
4910 <dd class="description">IPP attribute</dd>
4911 <dt>element</dt>
4912 <dd class="description">Value number (0-based)</dd>
4913 <dt>datevalue</dt>
4914 <dd class="description">Date value</dd>
4915 </dl>
4916 <h4 class="returnvalue">Return Value</h4>
4917 <p class="description">1 on success, 0 on failure</p>
4918 <h4 class="discussion">Discussion</h4>
4919 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4920 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
4921 <br>
4922 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4923 <br>
4924 The <code>element</code> parameter specifies which value to set from 0 to
4925 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
4926
4927 </p>
4928 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippSetGroupTag">ippSetGroupTag</a></h3>
4929 <p class="description">Set the group tag of an attribute.</p>
4930 <p class="code">
4931 int ippSetGroupTag (<br>
4932 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4933 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4934 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group_tag<br>
4935 );</p>
4936 <h4 class="parameters">Parameters</h4>
4937 <dl>
4938 <dt>ipp</dt>
4939 <dd class="description">IPP message</dd>
4940 <dt>attr</dt>
4941 <dd class="description">Attribute</dd>
4942 <dt>group_tag</dt>
4943 <dd class="description">Group tag</dd>
4944 </dl>
4945 <h4 class="returnvalue">Return Value</h4>
4946 <p class="description">1 on success, 0 on failure</p>
4947 <h4 class="discussion">Discussion</h4>
4948 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4949 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
4950 <br>
4951 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4952 <br>
4953 The <code>group</code> parameter specifies the IPP attribute group tag: none
4954 (<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
4955 event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
4956 (<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
4957 (<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).
4958
4959 </p>
4960 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippSetInteger">ippSetInteger</a></h3>
4961 <p class="description">Set an integer or enum value in an attribute.</p>
4962 <p class="code">
4963 int ippSetInteger (<br>
4964 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4965 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4966 &nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4967 &nbsp;&nbsp;&nbsp;&nbsp;int intvalue<br>
4968 );</p>
4969 <h4 class="parameters">Parameters</h4>
4970 <dl>
4971 <dt>ipp</dt>
4972 <dd class="description">IPP message</dd>
4973 <dt>attr</dt>
4974 <dd class="description">IPP attribute</dd>
4975 <dt>element</dt>
4976 <dd class="description">Value number (0-based)</dd>
4977 <dt>intvalue</dt>
4978 <dd class="description">Integer/enum value</dd>
4979 </dl>
4980 <h4 class="returnvalue">Return Value</h4>
4981 <p class="description">1 on success, 0 on failure</p>
4982 <h4 class="discussion">Discussion</h4>
4983 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4984 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
4985 <br>
4986 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4987 <br>
4988 The <code>element</code> parameter specifies which value to set from 0 to
4989 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
4990
4991 </p>
4992 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippSetName">ippSetName</a></h3>
4993 <p class="description">Set the name of an attribute.</p>
4994 <p class="code">
4995 int ippSetName (<br>
4996 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4997 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4998 &nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
4999 );</p>
5000 <h4 class="parameters">Parameters</h4>
5001 <dl>
5002 <dt>ipp</dt>
5003 <dd class="description">IPP message</dd>
5004 <dt>attr</dt>
5005 <dd class="description">IPP attribute</dd>
5006 <dt>name</dt>
5007 <dd class="description">Attribute name</dd>
5008 </dl>
5009 <h4 class="returnvalue">Return Value</h4>
5010 <p class="description">1 on success, 0 on failure</p>
5011 <h4 class="discussion">Discussion</h4>
5012 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5013 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
5014 <br>
5015 The <code>attr</code> parameter may be modified as a result of setting the value.
5016
5017 </p>
5018 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="ippSetOctetString">ippSetOctetString</a></h3>
5019 <p class="description">Set an octetString value in an IPP attribute.</p>
5020 <p class="code">
5021 int ippSetOctetString (<br>
5022 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5023 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
5024 &nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
5025 &nbsp;&nbsp;&nbsp;&nbsp;const void *data,<br>
5026 &nbsp;&nbsp;&nbsp;&nbsp;int datalen<br>
5027 );</p>
5028 <h4 class="parameters">Parameters</h4>
5029 <dl>
5030 <dt>ipp</dt>
5031 <dd class="description">IPP message</dd>
5032 <dt>attr</dt>
5033 <dd class="description">IPP attribute</dd>
5034 <dt>element</dt>
5035 <dd class="description">Value number (0-based)</dd>
5036 <dt>data</dt>
5037 <dd class="description">Pointer to octetString data</dd>
5038 <dt>datalen</dt>
5039 <dd class="description">Length of octetString data</dd>
5040 </dl>
5041 <h4 class="returnvalue">Return Value</h4>
5042 <p class="description">1 on success, 0 on failure</p>
5043 <h4 class="discussion">Discussion</h4>
5044 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5045 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
5046 <br>
5047 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
5048 <br>
5049 The <code>element</code> parameter specifies which value to set from 0 to
5050 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
5051
5052 </p>
5053 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippSetOperation">ippSetOperation</a></h3>
5054 <p class="description">Set the operation ID in an IPP request message.</p>
5055 <p class="code">
5056 int ippSetOperation (<br>
5057 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5058 &nbsp;&nbsp;&nbsp;&nbsp;ipp_op_t op<br>
5059 );</p>
5060 <h4 class="parameters">Parameters</h4>
5061 <dl>
5062 <dt>ipp</dt>
5063 <dd class="description">IPP request message</dd>
5064 <dt>op</dt>
5065 <dd class="description">Operation ID</dd>
5066 </dl>
5067 <h4 class="returnvalue">Return Value</h4>
5068 <p class="description">1 on success, 0 on failure</p>
5069 <h4 class="discussion">Discussion</h4>
5070 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5071 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.
5072
5073 </p>
5074 <h3 class="function"><a name="ippSetPort">ippSetPort</a></h3>
5075 <p class="description">Set the default port number.</p>
5076 <p class="code">
5077 void ippSetPort (<br>
5078 &nbsp;&nbsp;&nbsp;&nbsp;int p<br>
5079 );</p>
5080 <h4 class="parameters">Parameters</h4>
5081 <dl>
5082 <dt>p</dt>
5083 <dd class="description">Port number to use</dd>
5084 </dl>
5085 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippSetRange">ippSetRange</a></h3>
5086 <p class="description">Set a rangeOfInteger value in an attribute.</p>
5087 <p class="code">
5088 int ippSetRange (<br>
5089 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5090 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
5091 &nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
5092 &nbsp;&nbsp;&nbsp;&nbsp;int lowervalue,<br>
5093 &nbsp;&nbsp;&nbsp;&nbsp;int uppervalue<br>
5094 );</p>
5095 <h4 class="parameters">Parameters</h4>
5096 <dl>
5097 <dt>ipp</dt>
5098 <dd class="description">IPP message</dd>
5099 <dt>attr</dt>
5100 <dd class="description">IPP attribute</dd>
5101 <dt>element</dt>
5102 <dd class="description">Value number (0-based)</dd>
5103 <dt>lowervalue</dt>
5104 <dd class="description">Lower bound for range</dd>
5105 <dt>uppervalue</dt>
5106 <dd class="description">Upper bound for range</dd>
5107 </dl>
5108 <h4 class="returnvalue">Return Value</h4>
5109 <p class="description">1 on success, 0 on failure</p>
5110 <h4 class="discussion">Discussion</h4>
5111 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5112 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
5113 <br>
5114 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
5115 <br>
5116 The <code>element</code> parameter specifies which value to set from 0 to
5117 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
5118
5119 </p>
5120 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippSetRequestId">ippSetRequestId</a></h3>
5121 <p class="description">Set the request ID in an IPP message.</p>
5122 <p class="code">
5123 int ippSetRequestId (<br>
5124 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5125 &nbsp;&nbsp;&nbsp;&nbsp;int request_id<br>
5126 );</p>
5127 <h4 class="parameters">Parameters</h4>
5128 <dl>
5129 <dt>ipp</dt>
5130 <dd class="description">IPP message</dd>
5131 <dt>request_id</dt>
5132 <dd class="description">Request ID</dd>
5133 </dl>
5134 <h4 class="returnvalue">Return Value</h4>
5135 <p class="description">1 on success, 0 on failure</p>
5136 <h4 class="discussion">Discussion</h4>
5137 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5138 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
5139 <br>
5140 The <code>request_id</code> parameter must be greater than 0.
5141
5142 </p>
5143 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippSetResolution">ippSetResolution</a></h3>
5144 <p class="description">Set a resolution value in an attribute.</p>
5145 <p class="code">
5146 int ippSetResolution (<br>
5147 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5148 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
5149 &nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
5150 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_res_t">ipp_res_t</a> unitsvalue,<br>
5151 &nbsp;&nbsp;&nbsp;&nbsp;int xresvalue,<br>
5152 &nbsp;&nbsp;&nbsp;&nbsp;int yresvalue<br>
5153 );</p>
5154 <h4 class="parameters">Parameters</h4>
5155 <dl>
5156 <dt>ipp</dt>
5157 <dd class="description">IPP message</dd>
5158 <dt>attr</dt>
5159 <dd class="description">IPP attribute</dd>
5160 <dt>element</dt>
5161 <dd class="description">Value number (0-based)</dd>
5162 <dt>unitsvalue</dt>
5163 <dd class="description">Resolution units</dd>
5164 <dt>xresvalue</dt>
5165 <dd class="description">Horizontal/cross feed resolution</dd>
5166 <dt>yresvalue</dt>
5167 <dd class="description">Vertical/feed resolution</dd>
5168 </dl>
5169 <h4 class="returnvalue">Return Value</h4>
5170 <p class="description">1 on success, 0 on failure</p>
5171 <h4 class="discussion">Discussion</h4>
5172 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5173 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
5174 <br>
5175 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
5176 <br>
5177 The <code>element</code> parameter specifies which value to set from 0 to
5178 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
5179
5180 </p>
5181 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippSetState">ippSetState</a></h3>
5182 <p class="description">Set the current state of the IPP message.</p>
5183 <p class="code">
5184 int ippSetState (<br>
5185 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5186 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_state_t">ipp_state_t</a> state<br>
5187 );</p>
5188 <h4 class="parameters">Parameters</h4>
5189 <dl>
5190 <dt>ipp</dt>
5191 <dd class="description">IPP message</dd>
5192 <dt>state</dt>
5193 <dd class="description">IPP state value</dd>
5194 </dl>
5195 <h4 class="returnvalue">Return Value</h4>
5196 <p class="description">1 on success, 0 on failure</p>
5197 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippSetStatusCode">ippSetStatusCode</a></h3>
5198 <p class="description">Set the status code in an IPP response or event message.</p>
5199 <p class="code">
5200 int ippSetStatusCode (<br>
5201 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5202 &nbsp;&nbsp;&nbsp;&nbsp;ipp_status_t status<br>
5203 );</p>
5204 <h4 class="parameters">Parameters</h4>
5205 <dl>
5206 <dt>ipp</dt>
5207 <dd class="description">IPP response or event message</dd>
5208 <dt>status</dt>
5209 <dd class="description">Status code</dd>
5210 </dl>
5211 <h4 class="returnvalue">Return Value</h4>
5212 <p class="description">1 on success, 0 on failure</p>
5213 <h4 class="discussion">Discussion</h4>
5214 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5215 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.
5216
5217 </p>
5218 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippSetString">ippSetString</a></h3>
5219 <p class="description">Set a string value in an attribute.</p>
5220 <p class="code">
5221 int ippSetString (<br>
5222 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5223 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
5224 &nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
5225 &nbsp;&nbsp;&nbsp;&nbsp;const char *strvalue<br>
5226 );</p>
5227 <h4 class="parameters">Parameters</h4>
5228 <dl>
5229 <dt>ipp</dt>
5230 <dd class="description">IPP message</dd>
5231 <dt>attr</dt>
5232 <dd class="description">IPP attribute</dd>
5233 <dt>element</dt>
5234 <dd class="description">Value number (0-based)</dd>
5235 <dt>strvalue</dt>
5236 <dd class="description">String value</dd>
5237 </dl>
5238 <h4 class="returnvalue">Return Value</h4>
5239 <p class="description">1 on success, 0 on failure</p>
5240 <h4 class="discussion">Discussion</h4>
5241 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5242 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
5243 <br>
5244 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
5245 <br>
5246 The <code>element</code> parameter specifies which value to set from 0 to
5247 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
5248
5249 </p>
5250 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="ippSetStringf">ippSetStringf</a></h3>
5251 <p class="description">Set a formatted string value of an attribute.</p>
5252 <p class="code">
5253 int ippSetStringf (<br>
5254 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5255 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
5256 &nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
5257 &nbsp;&nbsp;&nbsp;&nbsp;const char *format,<br>
5258 &nbsp;&nbsp;&nbsp;&nbsp;...<br>
5259 );</p>
5260 <h4 class="parameters">Parameters</h4>
5261 <dl>
5262 <dt>ipp</dt>
5263 <dd class="description">IPP message</dd>
5264 <dt>attr</dt>
5265 <dd class="description">IPP attribute</dd>
5266 <dt>element</dt>
5267 <dd class="description">Value number (0-based)</dd>
5268 <dt>format</dt>
5269 <dd class="description">Printf-style format string</dd>
5270 <dt>...</dt>
5271 <dd class="description">Additional arguments as needed</dd>
5272 </dl>
5273 <h4 class="returnvalue">Return Value</h4>
5274 <p class="description">1 on success, 0 on failure</p>
5275 <h4 class="discussion">Discussion</h4>
5276 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5277 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
5278 <br>
5279 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
5280 <br>
5281 The <code>element</code> parameter specifies which value to set from 0 to
5282 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.<br>
5283 <br>
5284 The <code>format</code> parameter uses formatting characters compatible with the
5285 printf family of standard functions. Additional arguments follow it as
5286 needed. The formatted string is truncated as needed to the maximum length of
5287 the corresponding value type.
5288
5289 </p>
5290 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="ippSetStringfv">ippSetStringfv</a></h3>
5291 <p class="description">Set a formatted string value of an attribute.</p>
5292 <p class="code">
5293 int ippSetStringfv (<br>
5294 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5295 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
5296 &nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
5297 &nbsp;&nbsp;&nbsp;&nbsp;const char *format,<br>
5298 &nbsp;&nbsp;&nbsp;&nbsp;va_list ap<br>
5299 );</p>
5300 <h4 class="parameters">Parameters</h4>
5301 <dl>
5302 <dt>ipp</dt>
5303 <dd class="description">IPP message</dd>
5304 <dt>attr</dt>
5305 <dd class="description">IPP attribute</dd>
5306 <dt>element</dt>
5307 <dd class="description">Value number (0-based)</dd>
5308 <dt>format</dt>
5309 <dd class="description">Printf-style format string</dd>
5310 <dt>ap</dt>
5311 <dd class="description">Pointer to additional arguments</dd>
5312 </dl>
5313 <h4 class="returnvalue">Return Value</h4>
5314 <p class="description">1 on success, 0 on failure</p>
5315 <h4 class="discussion">Discussion</h4>
5316 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5317 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
5318 <br>
5319 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
5320 <br>
5321 The <code>element</code> parameter specifies which value to set from 0 to
5322 <a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.<br>
5323 <br>
5324 The <code>format</code> parameter uses formatting characters compatible with the
5325 printf family of standard functions. Additional arguments follow it as
5326 needed. The formatted string is truncated as needed to the maximum length of
5327 the corresponding value type.
5328
5329 </p>
5330 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippSetValueTag">ippSetValueTag</a></h3>
5331 <p class="description">Set the value tag of an attribute.</p>
5332 <p class="code">
5333 int ippSetValueTag (<br>
5334 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5335 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
5336 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t value_tag<br>
5337 );</p>
5338 <h4 class="parameters">Parameters</h4>
5339 <dl>
5340 <dt>ipp</dt>
5341 <dd class="description">IPP message</dd>
5342 <dt>attr</dt>
5343 <dd class="description">IPP attribute</dd>
5344 <dt>value_tag</dt>
5345 <dd class="description">Value tag</dd>
5346 </dl>
5347 <h4 class="returnvalue">Return Value</h4>
5348 <p class="description">1 on success, 0 on failure</p>
5349 <h4 class="discussion">Discussion</h4>
5350 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5351 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
5352 <br>
5353 The <code>attr</code> parameter may be modified as a result of setting the value.<br>
5354 <br>
5355 Integer (<code>IPP_TAG_INTEGER</code>) values can be promoted to rangeOfInteger
5356 (<code>IPP_TAG_RANGE</code>) values, the various string tags can be promoted to name
5357 (<code>IPP_TAG_NAME</code>) or nameWithLanguage (<code>IPP_TAG_NAMELANG</code>) values, text
5358 (<code>IPP_TAG_TEXT</code>) values can be promoted to textWithLanguage
5359 (<code>IPP_TAG_TEXTLANG</code>) values, and all values can be demoted to the various
5360 out-of-band value tags such as no-value (<code>IPP_TAG_NOVALUE</code>). All other changes
5361 will be rejected.<br>
5362 <br>
5363 Promoting a string attribute to nameWithLanguage or textWithLanguage adds the language
5364 code in the &quot;attributes-natural-language&quot; attribute or, if not present, the language
5365 code for the current locale.
5366
5367 </p>
5368 <h3 class="function"><span class="info">&nbsp;CUPS 1.6/macOS 10.8&nbsp;</span><a name="ippSetVersion">ippSetVersion</a></h3>
5369 <p class="description">Set the version number in an IPP message.</p>
5370 <p class="code">
5371 int ippSetVersion (<br>
5372 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
5373 &nbsp;&nbsp;&nbsp;&nbsp;int major,<br>
5374 &nbsp;&nbsp;&nbsp;&nbsp;int minor<br>
5375 );</p>
5376 <h4 class="parameters">Parameters</h4>
5377 <dl>
5378 <dt>ipp</dt>
5379 <dd class="description">IPP message</dd>
5380 <dt>major</dt>
5381 <dd class="description">Major version number (major.minor)</dd>
5382 <dt>minor</dt>
5383 <dd class="description">Minor version number (major.minor)</dd>
5384 </dl>
5385 <h4 class="returnvalue">Return Value</h4>
5386 <p class="description">1 on success, 0 on failure</p>
5387 <h4 class="discussion">Discussion</h4>
5388 <p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
5389 the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
5390 <br>
5391 The valid version numbers are currently 1.0, 1.1, 2.0, 2.1, and 2.2.
5392
5393 </p>
5394 <h3 class="function"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="ippStateString">ippStateString</a></h3>
5395 <p class="description">Return the name corresponding to a state value.</p>
5396 <p class="code">
5397 const char *ippStateString (<br>
5398 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_state_t">ipp_state_t</a> state<br>
5399 );</p>
5400 <h4 class="parameters">Parameters</h4>
5401 <dl>
5402 <dt>state</dt>
5403 <dd class="description">State value</dd>
5404 </dl>
5405 <h4 class="returnvalue">Return Value</h4>
5406 <p class="description">State name</p>
5407 <h3 class="function"><span class="info">&nbsp;CUPS 1.4/macOS 10.6&nbsp;</span><a name="ippTagString">ippTagString</a></h3>
5408 <p class="description">Return the tag name corresponding to a tag value.</p>
5409 <p class="code">
5410 const char *ippTagString (<br>
5411 &nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t tag<br>
5412 );</p>
5413 <h4 class="parameters">Parameters</h4>
5414 <dl>
5415 <dt>tag</dt>
5416 <dd class="description">Tag value</dd>
5417 </dl>
5418 <h4 class="returnvalue">Return Value</h4>
5419 <p class="description">Tag name</p>
5420 <h4 class="discussion">Discussion</h4>
5421 <p class="discussion">The returned names are defined in RFC 2911 and 3382.
5422
5423 </p>
5424 <h3 class="function"><span class="info">&nbsp;CUPS 1.4/macOS 10.6&nbsp;</span><a name="ippTagValue">ippTagValue</a></h3>
5425 <p class="description">Return the tag value corresponding to a tag name.</p>
5426 <p class="code">
5427 ipp_tag_t ippTagValue (<br>
5428 &nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
5429 );</p>
5430 <h4 class="parameters">Parameters</h4>
5431 <dl>
5432 <dt>name</dt>
5433 <dd class="description">Tag name</dd>
5434 </dl>
5435 <h4 class="returnvalue">Return Value</h4>
5436 <p class="description">Tag value</p>
5437 <h4 class="discussion">Discussion</h4>
5438 <p class="discussion">The tag names are defined in RFC 2911 and 3382.
5439
5440 </p>
5441 <h3 class="function"><a name="ippTimeToDate">ippTimeToDate</a></h3>
5442 <p class="description">Convert from UNIX time to RFC 1903 format.</p>
5443 <p class="code">
5444 const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippTimeToDate (<br>
5445 &nbsp;&nbsp;&nbsp;&nbsp;time_t t<br>
5446 );</p>
5447 <h4 class="parameters">Parameters</h4>
5448 <dl>
5449 <dt>t</dt>
5450 <dd class="description">UNIX time value</dd>
5451 </dl>
5452 <h4 class="returnvalue">Return Value</h4>
5453 <p class="description">RFC-1903 date/time data</p>
5454 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="ippValidateAttribute">ippValidateAttribute</a></h3>
5455 <p class="description">Validate the contents of an attribute.</p>
5456 <p class="code">
5457 int ippValidateAttribute (<br>
5458 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
5459 );</p>
5460 <h4 class="parameters">Parameters</h4>
5461 <dl>
5462 <dt>attr</dt>
5463 <dd class="description">Attribute</dd>
5464 </dl>
5465 <h4 class="returnvalue">Return Value</h4>
5466 <p class="description">1 if valid, 0 otherwise</p>
5467 <h4 class="discussion">Discussion</h4>
5468 <p class="discussion">This function validates the contents of an attribute based on the name and
5469 value tag. 1 is returned if the attribute is valid, 0 otherwise. On
5470 failure, cupsLastErrorString() is set to a human-readable message.
5471
5472 </p>
5473 <h3 class="function"><span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span><a name="ippValidateAttributes">ippValidateAttributes</a></h3>
5474 <p class="description">Validate all attributes in an IPP message.</p>
5475 <p class="code">
5476 int ippValidateAttributes (<br>
5477 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
5478 );</p>
5479 <h4 class="parameters">Parameters</h4>
5480 <dl>
5481 <dt>ipp</dt>
5482 <dd class="description">IPP message</dd>
5483 </dl>
5484 <h4 class="returnvalue">Return Value</h4>
5485 <p class="description">1 if valid, 0 otherwise</p>
5486 <h4 class="discussion">Discussion</h4>
5487 <p class="discussion">This function validates the contents of the IPP message, including each
5488 attribute. Like <a href="#ippValidateAttribute"><code>ippValidateAttribute</code></a>, cupsLastErrorString() is set
5489 to a human-readable message on failure.
5490
5491 </p>
5492 <h3 class="function"><a name="ippWrite">ippWrite</a></h3>
5493 <p class="description">Write data for an IPP message to a HTTP connection.</p>
5494 <p class="code">
5495 <a href="#ipp_state_t">ipp_state_t</a> ippWrite (<br>
5496 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
5497 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
5498 );</p>
5499 <h4 class="parameters">Parameters</h4>
5500 <dl>
5501 <dt>http</dt>
5502 <dd class="description">HTTP connection</dd>
5503 <dt>ipp</dt>
5504 <dd class="description">IPP data</dd>
5505 </dl>
5506 <h4 class="returnvalue">Return Value</h4>
5507 <p class="description">Current state</p>
5508 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/macOS 10.3&nbsp;</span><a name="ippWriteFile">ippWriteFile</a></h3>
5509 <p class="description">Write data for an IPP message to a file.</p>
5510 <p class="code">
5511 <a href="#ipp_state_t">ipp_state_t</a> ippWriteFile (<br>
5512 &nbsp;&nbsp;&nbsp;&nbsp;int fd,<br>
5513 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
5514 );</p>
5515 <h4 class="parameters">Parameters</h4>
5516 <dl>
5517 <dt>fd</dt>
5518 <dd class="description">HTTP data</dd>
5519 <dt>ipp</dt>
5520 <dd class="description">IPP data</dd>
5521 </dl>
5522 <h4 class="returnvalue">Return Value</h4>
5523 <p class="description">Current state</p>
5524 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="ippWriteIO">ippWriteIO</a></h3>
5525 <p class="description">Write data for an IPP message.</p>
5526 <p class="code">
5527 <a href="#ipp_state_t">ipp_state_t</a> ippWriteIO (<br>
5528 &nbsp;&nbsp;&nbsp;&nbsp;void *dst,<br>
5529 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_iocb_t">ipp_iocb_t</a> cb,<br>
5530 &nbsp;&nbsp;&nbsp;&nbsp;int blocking,<br>
5531 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *parent,<br>
5532 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
5533 );</p>
5534 <h4 class="parameters">Parameters</h4>
5535 <dl>
5536 <dt>dst</dt>
5537 <dd class="description">Destination</dd>
5538 <dt>cb</dt>
5539 <dd class="description">Write callback function</dd>
5540 <dt>blocking</dt>
5541 <dd class="description">Use blocking IO?</dd>
5542 <dt>parent</dt>
5543 <dd class="description">Parent IPP message</dd>
5544 <dt>ipp</dt>
5545 <dd class="description">IPP data</dd>
5546 </dl>
5547 <h4 class="returnvalue">Return Value</h4>
5548 <p class="description">Current state</p>
5549 <h2 class="title"><a name="TYPES">Data Types</a></h2>
5550 <h3 class="typedef"><a name="gss_auth_identity_desc">gss_auth_identity_desc</a></h3>
5551 <p class="description">Local functions...</p>
5552 <p class="code">
5553 typedef struct <a href="#gss_auth_identity">gss_auth_identity</a> gss_auth_identity_desc;
5554 </p>
5555 <h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="http_addr_t">http_addr_t</a></h3>
5556 <p class="description">Socket address union, which
5557 makes using IPv6 and other
5558 address types easier and
5559 more portable. </p>
5560 <p class="code">
5561 typedef union _http_addr_u / http_addr_t;
5562 </p>
5563 <h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="http_addrlist_t">http_addrlist_t</a></h3>
5564 <p class="description">Socket address list, which is
5565 used to enumerate all of the
5566 addresses that are associated
5567 with a hostname. </p>
5568 <p class="code">
5569 typedef struct <a href="#http_addrlist_s">http_addrlist_s</a> / http_addrlist_t;
5570 </p>
5571 <h3 class="typedef"><a name="http_auth_t">http_auth_t</a></h3>
5572 <p class="description">HTTP authentication types</p>
5573 <p class="code">
5574 typedef enum <a href="#http_auth_e">http_auth_e</a> http_auth_t;
5575 </p>
5576 <h3 class="typedef"><span class="info">&nbsp;CUPS 1.5/macOS 10.7&nbsp;</span><a name="http_credential_t">http_credential_t</a></h3>
5577 <p class="description">HTTP credential data </p>
5578 <p class="code">
5579 typedef struct <a href="#http_credential_s">http_credential_s</a> http_credential_t;
5580 </p>
5581 <h3 class="typedef"><a name="http_encoding_t">http_encoding_t</a></h3>
5582 <p class="description">HTTP transfer encoding values</p>
5583 <p class="code">
5584 typedef enum <a href="#http_encoding_e">http_encoding_e</a> http_encoding_t;
5585 </p>
5586 <h3 class="typedef"><a name="http_encryption_t">http_encryption_t</a></h3>
5587 <p class="description">HTTP encryption values</p>
5588 <p class="code">
5589 typedef enum <a href="#http_encryption_e">http_encryption_e</a> http_encryption_t;
5590 </p>
5591 <h3 class="typedef"><a name="http_field_t">http_field_t</a></h3>
5592 <p class="description">HTTP field names</p>
5593 <p class="code">
5594 typedef enum <a href="#http_field_e">http_field_e</a> http_field_t;
5595 </p>
5596 <h3 class="typedef"><a name="http_keepalive_t">http_keepalive_t</a></h3>
5597 <p class="description">HTTP keep-alive values</p>
5598 <p class="code">
5599 typedef enum <a href="#http_keepalive_e">http_keepalive_e</a> http_keepalive_t;
5600 </p>
5601 <h3 class="typedef"><a name="http_state_t">http_state_t</a></h3>
5602 <p class="description">HTTP state values; states
5603 are server-oriented...</p>
5604 <p class="code">
5605 typedef enum <a href="#http_state_e">http_state_e</a> http_state_t;
5606 </p>
5607 <h3 class="typedef"><a name="http_t">http_t</a></h3>
5608 <p class="description">HTTP connection type</p>
5609 <p class="code">
5610 typedef struct _http_s http_t;
5611 </p>
5612 <h3 class="typedef"><span class="info">&nbsp;CUPS 1.5/macOS 10.7&nbsp;</span><a name="http_timeout_cb_t">http_timeout_cb_t</a></h3>
5613 <p class="description">HTTP timeout callback </p>
5614 <p class="code">
5615 typedef int (*http_timeout_cb_t)(<a href="#http_t">http_t</a> *http, void *user_data);
5616 </p>
5617 <h3 class="typedef"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="http_trust_t">http_trust_t</a></h3>
5618 <p class="description">Level of trust for credentials </p>
5619 <p class="code">
5620 typedef enum <a href="#http_trust_e">http_trust_e</a> http_trust_t;
5621 </p>
5622 <h3 class="typedef"><a name="http_uri_coding_t">http_uri_coding_t</a></h3>
5623 <p class="description">URI en/decode flags</p>
5624 <p class="code">
5625 typedef enum <a href="#http_uri_coding_e">http_uri_coding_e</a> http_uri_coding_t;
5626 </p>
5627 <h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="http_uri_status_t">http_uri_status_t</a></h3>
5628 <p class="description">URI separation status </p>
5629 <p class="code">
5630 typedef enum <a href="#http_uri_status_e">http_uri_status_e</a> http_uri_status_t;
5631 </p>
5632 <h3 class="typedef"><a name="http_version_t">http_version_t</a></h3>
5633 <p class="description">HTTP version numbers</p>
5634 <p class="code">
5635 typedef enum <a href="#http_version_e">http_version_e</a> http_version_t;
5636 </p>
5637 <h3 class="typedef"><a name="ipp_attribute_t">ipp_attribute_t</a></h3>
5638 <p class="description">IPP attribute</p>
5639 <p class="code">
5640 typedef struct _ipp_attribute_s ipp_attribute_t;
5641 </p>
5642 <h3 class="typedef"><a name="ipp_copycb_t">ipp_copycb_t</a></h3>
5643 <p class="description">The following structures are PRIVATE starting with CUPS 1.6/macOS 10.8.
5644 Please use the new accessor functions available in CUPS 1.6 and later, as
5645 these definitions will be moved to a private header file in a future release.</p>
5646 <p class="code">
5647 typedef int (*ipp_copycb_t)(void *context, <a href="#ipp_t">ipp_t</a> *dst, <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr);
5648 </p>
5649 <h3 class="typedef"><a name="ipp_dstate_t">ipp_dstate_t</a></h3>
5650 <p class="description">Document states</p>
5651 <p class="code">
5652 typedef enum <a href="#ipp_dstate_e">ipp_dstate_e</a> ipp_dstate_t;
5653 </p>
5654 <h3 class="typedef"><a name="ipp_finish_t">ipp_finish_t</a></h3>
5655 <p class="description">Job collation types</p>
5656 <p class="code">
5657 typedef enum <a href="#ipp_finishings_e">ipp_finishings_e</a> ipp_finish_t;
5658 </p>
5659 <h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="ipp_iocb_t">ipp_iocb_t</a></h3>
5660 <p class="description">IPP IO Callback Function </p>
5661 <p class="code">
5662 typedef ssize_t (*ipp_iocb_t)(void *context, <a href="#ipp_uchar_t">ipp_uchar_t</a> *buffer, size_t bytes);
5663 </p>
5664 <h3 class="typedef"><a name="ipp_jcollate_t">ipp_jcollate_t</a></h3>
5665 <p class="description">Job collation types</p>
5666 <p class="code">
5667 typedef enum <a href="#ipp_jcollate_e">ipp_jcollate_e</a> ipp_jcollate_t;
5668 </p>
5669 <h3 class="typedef"><a name="ipp_orient_t">ipp_orient_t</a></h3>
5670 <p class="description">Orientation values</p>
5671 <p class="code">
5672 typedef enum <a href="#ipp_orient_e">ipp_orient_e</a> ipp_orient_t;
5673 </p>
5674 <h3 class="typedef"><a name="ipp_pstate_t">ipp_pstate_t</a></h3>
5675 <p class="description">Printer states</p>
5676 <p class="code">
5677 typedef enum <a href="#ipp_pstate_e">ipp_pstate_e</a> ipp_pstate_t;
5678 </p>
5679 <h3 class="typedef"><a name="ipp_quality_t">ipp_quality_t</a></h3>
5680 <p class="description">Qualities</p>
5681 <p class="code">
5682 typedef enum <a href="#ipp_quality_e">ipp_quality_e</a> ipp_quality_t;
5683 </p>
5684 <h3 class="typedef"><a name="ipp_res_t">ipp_res_t</a></h3>
5685 <p class="description">Resolution units</p>
5686 <p class="code">
5687 typedef enum <a href="#ipp_res_e">ipp_res_e</a> ipp_res_t;
5688 </p>
5689 <h3 class="typedef"><a name="ipp_state_t">ipp_state_t</a></h3>
5690 <p class="description">IPP states</p>
5691 <p class="code">
5692 typedef enum <a href="#ipp_state_e">ipp_state_e</a> ipp_state_t;
5693 </p>
5694 <h3 class="typedef"><a name="ipp_t">ipp_t</a></h3>
5695 <p class="description">IPP request/response data</p>
5696 <p class="code">
5697 typedef struct _ipp_s ipp_t;
5698 </p>
5699 <h3 class="typedef"><a name="ipp_uchar_t">ipp_uchar_t</a></h3>
5700 <p class="description">Unsigned 8-bit integer/character</p>
5701 <p class="code">
5702 typedef unsigned char ipp_uchar_t;
5703 </p>
5704 <h2 class="title"><a name="STRUCTURES">Structures</a></h2>
5705 <h3 class="struct"><a name="gss_auth_identity">gss_auth_identity</a></h3>
5706 <p class="description">Local functions...</p>
5707 <p class="code">struct gss_auth_identity {<br>
5708 &nbsp;&nbsp;&nbsp;&nbsp;gss_buffer_t *credentialsRef;<br>
5709 &nbsp;&nbsp;&nbsp;&nbsp;uint32_t flags;<br>
5710 &nbsp;&nbsp;&nbsp;&nbsp;char *password;<br>
5711 &nbsp;&nbsp;&nbsp;&nbsp;char *realm;<br>
5712 &nbsp;&nbsp;&nbsp;&nbsp;uint32_t type;<br>
5713 &nbsp;&nbsp;&nbsp;&nbsp;char *username;<br>
5714 };</p>
5715 <h4 class="members">Members</h4>
5716 <dl>
5717 <dt>credentialsRef </dt>
5718 <dt>flags </dt>
5719 <dt>password </dt>
5720 <dt>realm </dt>
5721 <dt>type </dt>
5722 <dt>username </dt>
5723 </dl>
5724 <h3 class="struct"><span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span><a name="http_addrlist_s">http_addrlist_s</a></h3>
5725 <p class="description">Socket address list, which is
5726 used to enumerate all of the
5727 addresses that are associated
5728 with a hostname. </p>
5729 <p class="code">struct http_addrlist_s {<br>
5730 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_addr_t">http_addr_t</a> addr;<br>
5731 &nbsp;&nbsp;&nbsp;&nbsp;struct <a href="#http_addrlist_s">http_addrlist_s</a> *next;<br>
5732 };</p>
5733 <h4 class="members">Members</h4>
5734 <dl>
5735 <dt>addr </dt>
5736 <dd class="description">Address</dd>
5737 <dt>next </dt>
5738 <dd class="description">Pointer to next address in list</dd>
5739 </dl>
5740 <h3 class="struct"><span class="info">&nbsp;CUPS 1.5/macOS 10.7&nbsp;</span><a name="http_credential_s">http_credential_s</a></h3>
5741 <p class="description">HTTP credential data </p>
5742 <p class="code">struct http_credential_s {<br>
5743 &nbsp;&nbsp;&nbsp;&nbsp;void *data;<br>
5744 &nbsp;&nbsp;&nbsp;&nbsp;size_t datalen;<br>
5745 };</p>
5746 <h4 class="members">Members</h4>
5747 <dl>
5748 <dt>data </dt>
5749 <dd class="description">Pointer to credential data</dd>
5750 <dt>datalen </dt>
5751 <dd class="description">Credential length</dd>
5752 </dl>
5753 <h3 class="struct"><a name="pollfd">pollfd</a></h3>
5754 <p class="description">User data (unused)</p>
5755 <p class="code">struct pollfd *pollfds, unsigned int num_pollfds, int timeout, void *context) {<br>
5756 &nbsp;&nbsp;&nbsp;&nbsp;void) context;<br>
5757 &nbsp;&nbsp;&nbsp;&nbsp;void) timeout;<br>
5758 };</p>
5759 <h4 class="members">Members</h4>
5760 <dl>
5761 <dt>context </dt>
5762 <dt>timeout </dt>
5763 </dl>
5764 <h2 class="title"><a name="ENUMERATIONS">Constants</a></h2>
5765 <h3 class="enumeration"><a name="http_auth_e">http_auth_e</a></h3>
5766 <p class="description">HTTP authentication types</p>
5767 <h4 class="constants">Constants</h4>
5768 <dl>
5769 <dt>HTTP_AUTH_BASIC </dt>
5770 <dd class="description">Basic authentication in use</dd>
5771 <dt>HTTP_AUTH_MD5 </dt>
5772 <dd class="description">Digest authentication in use</dd>
5773 <dt>HTTP_AUTH_MD5_INT </dt>
5774 <dd class="description">Digest authentication in use for body</dd>
5775 <dt>HTTP_AUTH_MD5_SESS </dt>
5776 <dd class="description">MD5-session authentication in use</dd>
5777 <dt>HTTP_AUTH_MD5_SESS_INT </dt>
5778 <dd class="description">MD5-session authentication in use for body</dd>
5779 <dt>HTTP_AUTH_NEGOTIATE <span class="info">&nbsp;CUPS 1.3/macOS 10.5&nbsp;</span></dt>
5780 <dd class="description">GSSAPI authentication in use </dd>
5781 <dt>HTTP_AUTH_NONE </dt>
5782 <dd class="description">No authentication in use</dd>
5783 </dl>
5784 <h3 class="enumeration"><a name="http_encoding_e">http_encoding_e</a></h3>
5785 <p class="description">HTTP transfer encoding values</p>
5786 <h4 class="constants">Constants</h4>
5787 <dl>
5788 <dt>HTTP_ENCODING_CHUNKED </dt>
5789 <dd class="description">Data is chunked</dd>
5790 <dt>HTTP_ENCODING_FIELDS </dt>
5791 <dd class="description">Sending HTTP fields</dd>
5792 <dt>HTTP_ENCODING_LENGTH </dt>
5793 <dd class="description">Data is sent with Content-Length</dd>
5794 </dl>
5795 <h3 class="enumeration"><a name="http_encryption_e">http_encryption_e</a></h3>
5796 <p class="description">HTTP encryption values</p>
5797 <h4 class="constants">Constants</h4>
5798 <dl>
5799 <dt>HTTP_ENCRYPTION_ALWAYS </dt>
5800 <dd class="description">Always encrypt (SSL)</dd>
5801 <dt>HTTP_ENCRYPTION_IF_REQUESTED </dt>
5802 <dd class="description">Encrypt if requested (TLS upgrade)</dd>
5803 <dt>HTTP_ENCRYPTION_NEVER </dt>
5804 <dd class="description">Never encrypt</dd>
5805 <dt>HTTP_ENCRYPTION_REQUIRED </dt>
5806 <dd class="description">Encryption is required (TLS upgrade)</dd>
5807 </dl>
5808 <h3 class="enumeration"><a name="http_field_e">http_field_e</a></h3>
5809 <p class="description">HTTP field names</p>
5810 <h4 class="constants">Constants</h4>
5811 <dl>
5812 <dt>HTTP_FIELD_ACCEPT_ENCODING <span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span></dt>
5813 <dd class="description">Accepting-Encoding field </dd>
5814 <dt>HTTP_FIELD_ACCEPT_LANGUAGE </dt>
5815 <dd class="description">Accept-Language field</dd>
5816 <dt>HTTP_FIELD_ACCEPT_RANGES </dt>
5817 <dd class="description">Accept-Ranges field</dd>
5818 <dt>HTTP_FIELD_ALLOW <span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span></dt>
5819 <dd class="description">Allow field </dd>
5820 <dt>HTTP_FIELD_AUTHORIZATION </dt>
5821 <dd class="description">Authorization field</dd>
5822 <dt>HTTP_FIELD_CONNECTION </dt>
5823 <dd class="description">Connection field</dd>
5824 <dt>HTTP_FIELD_CONTENT_ENCODING </dt>
5825 <dd class="description">Content-Encoding field</dd>
5826 <dt>HTTP_FIELD_CONTENT_LANGUAGE </dt>
5827 <dd class="description">Content-Language field</dd>
5828 <dt>HTTP_FIELD_CONTENT_LENGTH </dt>
5829 <dd class="description">Content-Length field</dd>
5830 <dt>HTTP_FIELD_CONTENT_LOCATION </dt>
5831 <dd class="description">Content-Location field</dd>
5832 <dt>HTTP_FIELD_CONTENT_MD5 </dt>
5833 <dd class="description">Content-MD5 field</dd>
5834 <dt>HTTP_FIELD_CONTENT_RANGE </dt>
5835 <dd class="description">Content-Range field</dd>
5836 <dt>HTTP_FIELD_CONTENT_TYPE </dt>
5837 <dd class="description">Content-Type field</dd>
5838 <dt>HTTP_FIELD_CONTENT_VERSION </dt>
5839 <dd class="description">Content-Version field</dd>
5840 <dt>HTTP_FIELD_DATE </dt>
5841 <dd class="description">Date field</dd>
5842 <dt>HTTP_FIELD_HOST </dt>
5843 <dd class="description">Host field</dd>
5844 <dt>HTTP_FIELD_IF_MODIFIED_SINCE </dt>
5845 <dd class="description">If-Modified-Since field</dd>
5846 <dt>HTTP_FIELD_IF_UNMODIFIED_SINCE </dt>
5847 <dd class="description">If-Unmodified-Since field</dd>
5848 <dt>HTTP_FIELD_KEEP_ALIVE </dt>
5849 <dd class="description">Keep-Alive field</dd>
5850 <dt>HTTP_FIELD_LAST_MODIFIED </dt>
5851 <dd class="description">Last-Modified field</dd>
5852 <dt>HTTP_FIELD_LINK </dt>
5853 <dd class="description">Link field</dd>
5854 <dt>HTTP_FIELD_LOCATION </dt>
5855 <dd class="description">Location field</dd>
5856 <dt>HTTP_FIELD_MAX </dt>
5857 <dd class="description">Maximum field index</dd>
5858 <dt>HTTP_FIELD_RANGE </dt>
5859 <dd class="description">Range field</dd>
5860 <dt>HTTP_FIELD_REFERER </dt>
5861 <dd class="description">Referer field</dd>
5862 <dt>HTTP_FIELD_RETRY_AFTER </dt>
5863 <dd class="description">Retry-After field</dd>
5864 <dt>HTTP_FIELD_SERVER <span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span></dt>
5865 <dd class="description">Server field </dd>
5866 <dt>HTTP_FIELD_TRANSFER_ENCODING </dt>
5867 <dd class="description">Transfer-Encoding field</dd>
5868 <dt>HTTP_FIELD_UNKNOWN </dt>
5869 <dd class="description">Unknown field</dd>
5870 <dt>HTTP_FIELD_UPGRADE </dt>
5871 <dd class="description">Upgrade field</dd>
5872 <dt>HTTP_FIELD_USER_AGENT </dt>
5873 <dd class="description">User-Agent field</dd>
5874 <dt>HTTP_FIELD_WWW_AUTHENTICATE </dt>
5875 <dd class="description">WWW-Authenticate field</dd>
5876 </dl>
5877 <h3 class="enumeration"><a name="http_keepalive_e">http_keepalive_e</a></h3>
5878 <p class="description">HTTP keep-alive values</p>
5879 <h4 class="constants">Constants</h4>
5880 <dl>
5881 <dt>HTTP_KEEPALIVE_OFF </dt>
5882 <dd class="description">No keep alive support</dd>
5883 <dt>HTTP_KEEPALIVE_ON </dt>
5884 <dd class="description">Use keep alive</dd>
5885 </dl>
5886 <h3 class="enumeration"><a name="http_state_e">http_state_e</a></h3>
5887 <p class="description">HTTP state values; states
5888 are server-oriented...</p>
5889 <h4 class="constants">Constants</h4>
5890 <dl>
5891 <dt>HTTP_STATE_CONNECT </dt>
5892 <dd class="description">CONNECT command, waiting for blank line</dd>
5893 <dt>HTTP_STATE_DELETE </dt>
5894 <dd class="description">DELETE command, waiting for blank line</dd>
5895 <dt>HTTP_STATE_ERROR </dt>
5896 <dd class="description">Error on socket</dd>
5897 <dt>HTTP_STATE_GET </dt>
5898 <dd class="description">GET command, waiting for blank line</dd>
5899 <dt>HTTP_STATE_GET_SEND </dt>
5900 <dd class="description">GET command, sending data</dd>
5901 <dt>HTTP_STATE_HEAD </dt>
5902 <dd class="description">HEAD command, waiting for blank line</dd>
5903 <dt>HTTP_STATE_OPTIONS </dt>
5904 <dd class="description">OPTIONS command, waiting for blank line</dd>
5905 <dt>HTTP_STATE_POST </dt>
5906 <dd class="description">POST command, waiting for blank line</dd>
5907 <dt>HTTP_STATE_POST_RECV </dt>
5908 <dd class="description">POST command, receiving data</dd>
5909 <dt>HTTP_STATE_POST_SEND </dt>
5910 <dd class="description">POST command, sending data</dd>
5911 <dt>HTTP_STATE_PUT </dt>
5912 <dd class="description">PUT command, waiting for blank line</dd>
5913 <dt>HTTP_STATE_PUT_RECV </dt>
5914 <dd class="description">PUT command, receiving data</dd>
5915 <dt>HTTP_STATE_STATUS </dt>
5916 <dd class="description">Command complete, sending status</dd>
5917 <dt>HTTP_STATE_TRACE </dt>
5918 <dd class="description">TRACE command, waiting for blank line</dd>
5919 <dt>HTTP_STATE_UNKNOWN_METHOD <span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span></dt>
5920 <dd class="description">Unknown request method, waiting for blank line </dd>
5921 <dt>HTTP_STATE_UNKNOWN_VERSION <span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span></dt>
5922 <dd class="description">Unknown request method, waiting for blank line </dd>
5923 <dt>HTTP_STATE_WAITING </dt>
5924 <dd class="description">Waiting for command</dd>
5925 </dl>
5926 <h3 class="enumeration"><a name="http_status_e">http_status_e</a></h3>
5927 <p class="description">HTTP status codes</p>
5928 <h4 class="constants">Constants</h4>
5929 <dl>
5930 <dt>HTTP_STATUS_ACCEPTED </dt>
5931 <dd class="description">DELETE command was successful</dd>
5932 <dt>HTTP_STATUS_BAD_GATEWAY </dt>
5933 <dd class="description">Bad gateway</dd>
5934 <dt>HTTP_STATUS_BAD_REQUEST </dt>
5935 <dd class="description">Bad request</dd>
5936 <dt>HTTP_STATUS_CONFLICT </dt>
5937 <dd class="description">Request is self-conflicting</dd>
5938 <dt>HTTP_STATUS_CONTINUE </dt>
5939 <dd class="description">Everything OK, keep going...</dd>
5940 <dt>HTTP_STATUS_CREATED </dt>
5941 <dd class="description">PUT command was successful</dd>
5942 <dt>HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED <span class="info">&nbsp;CUPS 1.4&nbsp;</span></dt>
5943 <dd class="description">User canceled authorization </dd>
5944 <dt>HTTP_STATUS_CUPS_PKI_ERROR <span class="info">&nbsp;CUPS 1.5/macOS 10.7&nbsp;</span></dt>
5945 <dd class="description">Error negotiating a secure connection </dd>
5946 <dt>HTTP_STATUS_ERROR </dt>
5947 <dd class="description">An error response from httpXxxx()</dd>
5948 <dt>HTTP_STATUS_EXPECTATION_FAILED </dt>
5949 <dd class="description">The expectation given in an Expect header field was not met</dd>
5950 <dt>HTTP_STATUS_FORBIDDEN </dt>
5951 <dd class="description">Forbidden to access this URI</dd>
5952 <dt>HTTP_STATUS_GATEWAY_TIMEOUT </dt>
5953 <dd class="description">Gateway connection timed out</dd>
5954 <dt>HTTP_STATUS_GONE </dt>
5955 <dd class="description">Server has gone away</dd>
5956 <dt>HTTP_STATUS_LENGTH_REQUIRED </dt>
5957 <dd class="description">A content length or encoding is required</dd>
5958 <dt>HTTP_STATUS_METHOD_NOT_ALLOWED </dt>
5959 <dd class="description">Method is not allowed</dd>
5960 <dt>HTTP_STATUS_MOVED_PERMANENTLY </dt>
5961 <dd class="description">Document has moved permanently</dd>
5962 <dt>HTTP_STATUS_MOVED_TEMPORARILY </dt>
5963 <dd class="description">Document has moved temporarily</dd>
5964 <dt>HTTP_STATUS_MULTIPLE_CHOICES </dt>
5965 <dd class="description">Multiple files match request</dd>
5966 <dt>HTTP_STATUS_NONE <span class="info">&nbsp;CUPS 1.7/macOS 10.9&nbsp;</span></dt>
5967 <dd class="description">No Expect value </dd>
5968 <dt>HTTP_STATUS_NOT_ACCEPTABLE </dt>
5969 <dd class="description">Not Acceptable</dd>
5970 <dt>HTTP_STATUS_NOT_AUTHORITATIVE </dt>
5971 <dd class="description">Information isn't authoritative</dd>
5972 <dt>HTTP_STATUS_NOT_FOUND </dt>
5973 <dd class="description">URI was not found</dd>
5974 <dt>HTTP_STATUS_NOT_IMPLEMENTED </dt>
5975 <dd class="description">Feature not implemented</dd>
5976 <dt>HTTP_STATUS_NOT_MODIFIED </dt>
5977 <dd class="description">File not modified</dd>
5978 <dt>HTTP_STATUS_NOT_SUPPORTED </dt>
5979 <dd class="description">HTTP version not supported</dd>
5980 <dt>HTTP_STATUS_NO_CONTENT </dt>
5981 <dd class="description">Successful command, no new data</dd>
5982 <dt>HTTP_STATUS_OK </dt>
5983 <dd class="description">OPTIONS/GET/HEAD/POST/TRACE command was successful</dd>
5984 <dt>HTTP_STATUS_PARTIAL_CONTENT </dt>
5985 <dd class="description">Only a partial file was received/sent</dd>
5986 <dt>HTTP_STATUS_PAYMENT_REQUIRED </dt>
5987 <dd class="description">Payment required</dd>
5988 <dt>HTTP_STATUS_PRECONDITION </dt>
5989 <dd class="description">Precondition failed</dd>
5990 <dt>HTTP_STATUS_PROXY_AUTHENTICATION </dt>
5991 <dd class="description">Proxy Authentication is Required</dd>
5992 <dt>HTTP_STATUS_REQUESTED_RANGE </dt>
5993 <dd class="description">The requested range is not satisfiable</dd>
5994 <dt>HTTP_STATUS_REQUEST_TIMEOUT </dt>
5995 <dd class="description">Request timed out</dd>
5996 <dt>HTTP_STATUS_REQUEST_TOO_LARGE </dt>
5997 <dd class="description">Request entity too large</dd>
5998 <dt>HTTP_STATUS_RESET_CONTENT </dt>
5999 <dd class="description">Content was reset/recreated</dd>
6000 <dt>HTTP_STATUS_SEE_OTHER </dt>
6001 <dd class="description">See this other link...</dd>
6002 <dt>HTTP_STATUS_SERVER_ERROR </dt>
6003 <dd class="description">Internal server error</dd>
6004 <dt>HTTP_STATUS_SERVICE_UNAVAILABLE </dt>
6005 <dd class="description">Service is unavailable</dd>
6006 <dt>HTTP_STATUS_SWITCHING_PROTOCOLS </dt>
6007 <dd class="description">HTTP upgrade to TLS/SSL</dd>
6008 <dt>HTTP_STATUS_UNAUTHORIZED </dt>
6009 <dd class="description">Unauthorized to access host</dd>
6010 <dt>HTTP_STATUS_UNSUPPORTED_MEDIATYPE </dt>
6011 <dd class="description">The requested media type is unsupported</dd>
6012 <dt>HTTP_STATUS_UPGRADE_REQUIRED </dt>
6013 <dd class="description">Upgrade to SSL/TLS required</dd>
6014 <dt>HTTP_STATUS_URI_TOO_LONG </dt>
6015 <dd class="description">URI too long</dd>
6016 <dt>HTTP_STATUS_USE_PROXY </dt>
6017 <dd class="description">Must use a proxy to access this URI</dd>
6018 </dl>
6019 <h3 class="enumeration"><span class="info">&nbsp;CUPS 2.0/OS 10.10&nbsp;</span><a name="http_trust_e">http_trust_e</a></h3>
6020 <p class="description">Level of trust for credentials </p>
6021 <h4 class="constants">Constants</h4>
6022 <dl>
6023 <dt>HTTP_TRUST_CHANGED </dt>
6024 <dd class="description">Credentials have changed</dd>
6025 <dt>HTTP_TRUST_EXPIRED </dt>
6026 <dd class="description">Credentials are expired</dd>
6027 <dt>HTTP_TRUST_INVALID </dt>
6028 <dd class="description">Credentials are invalid</dd>
6029 <dt>HTTP_TRUST_OK </dt>
6030 <dd class="description">Credentials are OK/trusted</dd>
6031 <dt>HTTP_TRUST_RENEWED </dt>
6032 <dd class="description">Credentials have been renewed</dd>
6033 <dt>HTTP_TRUST_UNKNOWN </dt>
6034 <dd class="description">Credentials are unknown/new</dd>
6035 </dl>
6036 <h3 class="enumeration"><a name="http_uri_coding_e">http_uri_coding_e</a></h3>
6037 <p class="description">URI en/decode flags</p>
6038 <h4 class="constants">Constants</h4>
6039 <dl>
6040 <dt>HTTP_URI_CODING_ALL </dt>
6041 <dd class="description">En/decode everything</dd>
6042 <dt>HTTP_URI_CODING_HOSTNAME </dt>
6043 <dd class="description">En/decode the hostname portion</dd>
6044 <dt>HTTP_URI_CODING_MOST </dt>
6045 <dd class="description">En/decode all but the query</dd>
6046 <dt>HTTP_URI_CODING_NONE </dt>
6047 <dd class="description">Don't en/decode anything</dd>
6048 <dt>HTTP_URI_CODING_QUERY </dt>
6049 <dd class="description">En/decode the query portion</dd>
6050 <dt>HTTP_URI_CODING_RESOURCE </dt>
6051 <dd class="description">En/decode the resource portion</dd>
6052 <dt>HTTP_URI_CODING_RFC6874 </dt>
6053 <dd class="description">Use RFC 6874 address format</dd>
6054 <dt>HTTP_URI_CODING_USERNAME </dt>
6055 <dd class="description">En/decode the username portion</dd>
6056 </dl>
6057 <h3 class="enumeration"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="http_uri_status_e">http_uri_status_e</a></h3>
6058 <p class="description">URI separation status </p>
6059 <h4 class="constants">Constants</h4>
6060 <dl>
6061 <dt>HTTP_URI_STATUS_BAD_ARGUMENTS </dt>
6062 <dd class="description">Bad arguments to function (error)</dd>
6063 <dt>HTTP_URI_STATUS_BAD_HOSTNAME </dt>
6064 <dd class="description">Bad hostname in URI (error)</dd>
6065 <dt>HTTP_URI_STATUS_BAD_PORT </dt>
6066 <dd class="description">Bad port number in URI (error)</dd>
6067 <dt>HTTP_URI_STATUS_BAD_RESOURCE </dt>
6068 <dd class="description">Bad resource in URI (error)</dd>
6069 <dt>HTTP_URI_STATUS_BAD_SCHEME </dt>
6070 <dd class="description">Bad scheme in URI (error)</dd>
6071 <dt>HTTP_URI_STATUS_BAD_URI </dt>
6072 <dd class="description">Bad/empty URI (error)</dd>
6073 <dt>HTTP_URI_STATUS_BAD_USERNAME </dt>
6074 <dd class="description">Bad username in URI (error)</dd>
6075 <dt>HTTP_URI_STATUS_MISSING_RESOURCE </dt>
6076 <dd class="description">Missing resource in URI (warning)</dd>
6077 <dt>HTTP_URI_STATUS_MISSING_SCHEME </dt>
6078 <dd class="description">Missing scheme in URI (warning)</dd>
6079 <dt>HTTP_URI_STATUS_OK </dt>
6080 <dd class="description">URI decoded OK</dd>
6081 <dt>HTTP_URI_STATUS_OVERFLOW </dt>
6082 <dd class="description">URI buffer for httpAssembleURI is too small</dd>
6083 <dt>HTTP_URI_STATUS_UNKNOWN_SCHEME </dt>
6084 <dd class="description">Unknown scheme in URI (warning)</dd>
6085 </dl>
6086 <h3 class="enumeration"><a name="http_version_e">http_version_e</a></h3>
6087 <p class="description">HTTP version numbers</p>
6088 <h4 class="constants">Constants</h4>
6089 <dl>
6090 <dt>HTTP_VERSION_0_9 </dt>
6091 <dd class="description">HTTP/0.9</dd>
6092 <dt>HTTP_VERSION_1_0 </dt>
6093 <dd class="description">HTTP/1.0</dd>
6094 <dt>HTTP_VERSION_1_1 </dt>
6095 <dd class="description">HTTP/1.1</dd>
6096 </dl>
6097 <h3 class="enumeration"><a name="ipp_dstate_e">ipp_dstate_e</a></h3>
6098 <p class="description">Document states</p>
6099 <h4 class="constants">Constants</h4>
6100 <dl>
6101 <dt>IPP_DOCUMENT_ABORTED </dt>
6102 <dd class="description">Document is aborted</dd>
6103 <dt>IPP_DOCUMENT_CANCELED </dt>
6104 <dd class="description">Document is canceled</dd>
6105 <dt>IPP_DOCUMENT_COMPLETED </dt>
6106 <dd class="description">Document is completed</dd>
6107 <dt>IPP_DOCUMENT_PENDING </dt>
6108 <dd class="description">Document is pending</dd>
6109 <dt>IPP_DOCUMENT_PROCESSING </dt>
6110 <dd class="description">Document is processing</dd>
6111 </dl>
6112 <h3 class="enumeration"><a name="ipp_finishings_e">ipp_finishings_e</a></h3>
6113 <p class="description">Finishings</p>
6114 <h4 class="constants">Constants</h4>
6115 <dl>
6116 <dt>IPP_FINISHINGS_BALE </dt>
6117 <dd class="description">Bale (any type)</dd>
6118 <dt>IPP_FINISHINGS_BIND </dt>
6119 <dd class="description">Bind</dd>
6120 <dt>IPP_FINISHINGS_BIND_BOTTOM </dt>
6121 <dd class="description">Bind on bottom</dd>
6122 <dt>IPP_FINISHINGS_BIND_LEFT </dt>
6123 <dd class="description">Bind on left</dd>
6124 <dt>IPP_FINISHINGS_BIND_RIGHT </dt>
6125 <dd class="description">Bind on right</dd>
6126 <dt>IPP_FINISHINGS_BIND_TOP </dt>
6127 <dd class="description">Bind on top</dd>
6128 <dt>IPP_FINISHINGS_BOOKLET_MAKER </dt>
6129 <dd class="description">Fold to make booklet</dd>
6130 <dt>IPP_FINISHINGS_COAT </dt>
6131 <dd class="description">Apply protective liquid or powder coating</dd>
6132 <dt>IPP_FINISHINGS_COVER </dt>
6133 <dd class="description">Add cover</dd>
6134 <dt>IPP_FINISHINGS_CUPS_FOLD_ACCORDIAN </dt>
6135 <dd class="description">Accordian-fold the paper vertically into four sections</dd>
6136 <dt>IPP_FINISHINGS_CUPS_FOLD_DOUBLE_GATE </dt>
6137 <dd class="description">Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically</dd>
6138 <dt>IPP_FINISHINGS_CUPS_FOLD_GATE </dt>
6139 <dd class="description">Fold the top and bottom quarters of the paper towards the midline</dd>
6140 <dt>IPP_FINISHINGS_CUPS_FOLD_HALF </dt>
6141 <dd class="description">Fold the paper in half vertically</dd>
6142 <dt>IPP_FINISHINGS_CUPS_FOLD_HALF_Z </dt>
6143 <dd class="description">Fold the paper in half horizontally, then Z-fold the paper vertically</dd>
6144 <dt>IPP_FINISHINGS_CUPS_FOLD_LEFT_GATE </dt>
6145 <dd class="description">Fold the top quarter of the paper towards the midline</dd>
6146 <dt>IPP_FINISHINGS_CUPS_FOLD_LETTER </dt>
6147 <dd class="description">Fold the paper into three sections vertically; sometimes also known as a C fold</dd>
6148 <dt>IPP_FINISHINGS_CUPS_FOLD_PARALLEL </dt>
6149 <dd class="description">Fold the paper in half vertically two times, yielding four sections</dd>
6150 <dt>IPP_FINISHINGS_CUPS_FOLD_POSTER </dt>
6151 <dd class="description">Fold the paper in half horizontally and vertically; sometimes also called a cross fold</dd>
6152 <dt>IPP_FINISHINGS_CUPS_FOLD_RIGHT_GATE </dt>
6153 <dd class="description">Fold the bottom quarter of the paper towards the midline</dd>
6154 <dt>IPP_FINISHINGS_CUPS_FOLD_Z </dt>
6155 <dd class="description">Fold the paper vertically into three sections, forming a Z</dd>
6156 <dt>IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_LEFT </dt>
6157 <dd class="description">Punch 1 hole bottom left</dd>
6158 <dt>IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_RIGHT </dt>
6159 <dd class="description">Punch 1 hole bottom right</dd>
6160 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_BOTTOM </dt>
6161 <dd class="description">Punch 2 holes bottom edge</dd>
6162 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_LEFT </dt>
6163 <dd class="description">Punch 2 holes left side</dd>
6164 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_RIGHT </dt>
6165 <dd class="description">Punch 2 holes right side</dd>
6166 <dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_TOP </dt>
6167 <dd class="description">Punch 2 holes top edge</dd>
6168 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_BOTTOM </dt>
6169 <dd class="description">Punch 4 holes bottom edge</dd>
6170 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_LEFT </dt>
6171 <dd class="description">Punch 4 holes left side</dd>
6172 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_RIGHT </dt>
6173 <dd class="description">Punch 4 holes right side</dd>
6174 <dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_TOP </dt>
6175 <dd class="description">Punch 4 holes top edge</dd>
6176 <dt>IPP_FINISHINGS_CUPS_PUNCH_TOP_LEFT </dt>
6177 <dd class="description">Punch 1 hole top left</dd>
6178 <dt>IPP_FINISHINGS_CUPS_PUNCH_TOP_RIGHT </dt>
6179 <dd class="description">Punch 1 hole top right</dd>
6180 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_BOTTOM </dt>
6181 <dd class="description">Punch 3 holes bottom edge</dd>
6182 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_LEFT </dt>
6183 <dd class="description">Punch 3 holes left side</dd>
6184 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_RIGHT </dt>
6185 <dd class="description">Punch 3 holes right side</dd>
6186 <dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_TOP </dt>
6187 <dd class="description">Punch 3 holes top edge</dd>
6188 <dt>IPP_FINISHINGS_EDGE_STITCH </dt>
6189 <dd class="description">Stitch along any side</dd>
6190 <dt>IPP_FINISHINGS_EDGE_STITCH_BOTTOM </dt>
6191 <dd class="description">Stitch along bottom edge</dd>
6192 <dt>IPP_FINISHINGS_EDGE_STITCH_LEFT </dt>
6193 <dd class="description">Stitch along left side</dd>
6194 <dt>IPP_FINISHINGS_EDGE_STITCH_RIGHT </dt>
6195 <dd class="description">Stitch along right side</dd>
6196 <dt>IPP_FINISHINGS_EDGE_STITCH_TOP </dt>
6197 <dd class="description">Stitch along top edge</dd>
6198 <dt>IPP_FINISHINGS_FOLD </dt>
6199 <dd class="description">Fold (any type)</dd>
6200 <dt>IPP_FINISHINGS_FOLD_ACCORDIAN </dt>
6201 <dd class="description">Accordian-fold the paper vertically into four sections</dd>
6202 <dt>IPP_FINISHINGS_FOLD_DOUBLE_GATE </dt>
6203 <dd class="description">Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically</dd>
6204 <dt>IPP_FINISHINGS_FOLD_GATE </dt>
6205 <dd class="description">Fold the top and bottom quarters of the paper towards the midline</dd>
6206 <dt>IPP_FINISHINGS_FOLD_HALF </dt>
6207 <dd class="description">Fold the paper in half vertically</dd>
6208 <dt>IPP_FINISHINGS_FOLD_HALF_Z </dt>
6209 <dd class="description">Fold the paper in half horizontally, then Z-fold the paper vertically</dd>
6210 <dt>IPP_FINISHINGS_FOLD_LEFT_GATE </dt>
6211 <dd class="description">Fold the top quarter of the paper towards the midline</dd>
6212 <dt>IPP_FINISHINGS_FOLD_LETTER </dt>
6213 <dd class="description">Fold the paper into three sections vertically; sometimes also known as a C fold</dd>
6214 <dt>IPP_FINISHINGS_FOLD_PARALLEL </dt>
6215 <dd class="description">Fold the paper in half vertically two times, yielding four sections</dd>
6216 <dt>IPP_FINISHINGS_FOLD_POSTER </dt>
6217 <dd class="description">Fold the paper in half horizontally and vertically; sometimes also called a cross fold</dd>
6218 <dt>IPP_FINISHINGS_FOLD_RIGHT_GATE </dt>
6219 <dd class="description">Fold the bottom quarter of the paper towards the midline</dd>
6220 <dt>IPP_FINISHINGS_FOLD_Z </dt>
6221 <dd class="description">Fold the paper vertically into three sections, forming a Z</dd>
6222 <dt>IPP_FINISHINGS_JOG_OFFSET </dt>
6223 <dd class="description">Offset for binding (any type)</dd>
6224 <dt>IPP_FINISHINGS_LAMINATE </dt>
6225 <dd class="description">Apply protective (solid) material</dd>
6226 <dt>IPP_FINISHINGS_NONE </dt>
6227 <dd class="description">No finishing</dd>
6228 <dt>IPP_FINISHINGS_PUNCH </dt>
6229 <dd class="description">Punch (any location/count)</dd>
6230 <dt>IPP_FINISHINGS_PUNCH_BOTTOM_LEFT </dt>
6231 <dd class="description">Punch 1 hole bottom left</dd>
6232 <dt>IPP_FINISHINGS_PUNCH_BOTTOM_RIGHT </dt>
6233 <dd class="description">Punch 1 hole bottom right</dd>
6234 <dt>IPP_FINISHINGS_PUNCH_DUAL_BOTTOM </dt>
6235 <dd class="description">Punch 2 holes bottom edge</dd>
6236 <dt>IPP_FINISHINGS_PUNCH_DUAL_LEFT </dt>
6237 <dd class="description">Punch 2 holes left side</dd>
6238 <dt>IPP_FINISHINGS_PUNCH_DUAL_RIGHT </dt>
6239 <dd class="description">Punch 2 holes right side</dd>
6240 <dt>IPP_FINISHINGS_PUNCH_DUAL_TOP </dt>
6241 <dd class="description">Punch 2 holes top edge</dd>
6242 <dt>IPP_FINISHINGS_PUNCH_QUAD_BOTTOM </dt>
6243 <dd class="description">Punch 4 holes bottom edge</dd>
6244 <dt>IPP_FINISHINGS_PUNCH_QUAD_LEFT </dt>
6245 <dd class="description">Punch 4 holes left side</dd>
6246 <dt>IPP_FINISHINGS_PUNCH_QUAD_RIGHT </dt>
6247 <dd class="description">Punch 4 holes right side</dd>
6248 <dt>IPP_FINISHINGS_PUNCH_QUAD_TOP </dt>
6249 <dd class="description">Punch 4 holes top edge</dd>
6250 <dt>IPP_FINISHINGS_PUNCH_TOP_LEFT </dt>
6251 <dd class="description">Punch 1 hole top left</dd>
6252 <dt>IPP_FINISHINGS_PUNCH_TOP_RIGHT </dt>
6253 <dd class="description">Punch 1 hole top right</dd>
6254 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_BOTTOM </dt>
6255 <dd class="description">Punch 3 holes bottom edge</dd>
6256 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_LEFT </dt>
6257 <dd class="description">Punch 3 holes left side</dd>
6258 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_RIGHT </dt>
6259 <dd class="description">Punch 3 holes right side</dd>
6260 <dt>IPP_FINISHINGS_PUNCH_TRIPLE_TOP </dt>
6261 <dd class="description">Punch 3 holes top edge</dd>
6262 <dt>IPP_FINISHINGS_SADDLE_STITCH </dt>
6263 <dd class="description">Staple interior</dd>
6264 <dt>IPP_FINISHINGS_STAPLE </dt>
6265 <dd class="description">Staple (any location)</dd>
6266 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_LEFT </dt>
6267 <dd class="description">Staple bottom left corner</dd>
6268 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT </dt>
6269 <dd class="description">Staple bottom right corner</dd>
6270 <dt>IPP_FINISHINGS_STAPLE_DUAL_BOTTOM </dt>
6271 <dd class="description">Two staples on bottom</dd>
6272 <dt>IPP_FINISHINGS_STAPLE_DUAL_LEFT </dt>
6273 <dd class="description">Two staples on left</dd>
6274 <dt>IPP_FINISHINGS_STAPLE_DUAL_RIGHT </dt>
6275 <dd class="description">Two staples on right</dd>
6276 <dt>IPP_FINISHINGS_STAPLE_DUAL_TOP </dt>
6277 <dd class="description">Two staples on top</dd>
6278 <dt>IPP_FINISHINGS_STAPLE_TOP_LEFT </dt>
6279 <dd class="description">Staple top left corner</dd>
6280 <dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT </dt>
6281 <dd class="description">Staple top right corner</dd>
6282 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_BOTTOM </dt>
6283 <dd class="description">Three staples on bottom</dd>
6284 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_LEFT </dt>
6285 <dd class="description">Three staples on left</dd>
6286 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_RIGHT </dt>
6287 <dd class="description">Three staples on right</dd>
6288 <dt>IPP_FINISHINGS_STAPLE_TRIPLE_TOP </dt>
6289 <dd class="description">Three staples on top</dd>
6290 <dt>IPP_FINISHINGS_TRIM </dt>
6291 <dd class="description">Trim (any type)</dd>
6292 <dt>IPP_FINISHINGS_TRIM_AFTER_COPIES </dt>
6293 <dd class="description">Trim output after each copy</dd>
6294 <dt>IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS </dt>
6295 <dd class="description">Trim output after each document</dd>
6296 <dt>IPP_FINISHINGS_TRIM_AFTER_JOB </dt>
6297 <dd class="description">Trim output after job</dd>
6298 <dt>IPP_FINISHINGS_TRIM_AFTER_PAGES </dt>
6299 <dd class="description">Trim output after each page</dd>
6300 </dl>
6301 <h3 class="enumeration"><a name="ipp_jcollate_e">ipp_jcollate_e</a></h3>
6302 <p class="description">Job collation types</p>
6303 <h4 class="constants">Constants</h4>
6304 <dl>
6305 <dt>IPP_JCOLLATE_COLLATED_DOCUMENTS </dt>
6306 <dt>IPP_JCOLLATE_UNCOLLATED_DOCUMENTS </dt>
6307 <dt>IPP_JCOLLATE_UNCOLLATED_SHEETS </dt>
6308 </dl>
6309 <h3 class="enumeration"><a name="ipp_jstate_e">ipp_jstate_e</a></h3>
6310 <p class="description">Job states</p>
6311 <h4 class="constants">Constants</h4>
6312 <dl>
6313 <dt>IPP_JSTATE_ABORTED </dt>
6314 <dd class="description">Job has aborted due to error</dd>
6315 <dt>IPP_JSTATE_CANCELED </dt>
6316 <dd class="description">Job has been canceled</dd>
6317 <dt>IPP_JSTATE_COMPLETED </dt>
6318 <dd class="description">Job has completed successfully</dd>
6319 <dt>IPP_JSTATE_HELD </dt>
6320 <dd class="description">Job is held for printing</dd>
6321 <dt>IPP_JSTATE_PENDING </dt>
6322 <dd class="description">Job is waiting to be printed</dd>
6323 <dt>IPP_JSTATE_PROCESSING </dt>
6324 <dd class="description">Job is currently printing</dd>
6325 <dt>IPP_JSTATE_STOPPED </dt>
6326 <dd class="description">Job has been stopped</dd>
6327 </dl>
6328 <h3 class="enumeration"><a name="ipp_op_e">ipp_op_e</a></h3>
6329 <p class="description">IPP operations</p>
6330 <h4 class="constants">Constants</h4>
6331 <dl>
6332 <dt>IPP_OP_ACKNOWLEDGE_DOCUMENT </dt>
6333 <dd class="description">Acknowledge-Document</dd>
6334 <dt>IPP_OP_ACKNOWLEDGE_IDENTIFY_PRINTER </dt>
6335 <dd class="description">Acknowledge-Identify-Printer</dd>
6336 <dt>IPP_OP_ACKNOWLEDGE_JOB </dt>
6337 <dd class="description">Acknowledge-Job</dd>
6338 <dt>IPP_OP_ACTIVATE_PRINTER </dt>
6339 <dd class="description">Start a printer</dd>
6340 <dt>IPP_OP_CANCEL_CURRENT_JOB </dt>
6341 <dd class="description">Cancel the current job</dd>
6342 <dt>IPP_OP_CANCEL_DOCUMENT </dt>
6343 <dd class="description">Cancel-Document</dd>
6344 <dt>IPP_OP_CANCEL_JOB </dt>
6345 <dd class="description">Cancel a job</dd>
6346 <dt>IPP_OP_CANCEL_JOBS </dt>
6347 <dd class="description">Cancel-Jobs</dd>
6348 <dt>IPP_OP_CANCEL_MY_JOBS </dt>
6349 <dd class="description">Cancel-My-Jobs</dd>
6350 <dt>IPP_OP_CANCEL_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span></dt>
6351 <dd class="description">Cancel a subscription </dd>
6352 <dt>IPP_OP_CLOSE_JOB </dt>
6353 <dd class="description">Close-Job</dd>
6354 <dt>IPP_OP_CREATE_JOB </dt>
6355 <dd class="description">Create an empty print job</dd>
6356 <dt>IPP_OP_CREATE_JOB_SUBSCRIPTIONS <span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span></dt>
6357 <dd class="description">Create one of more job subscriptions </dd>
6358 <dt>IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS <span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span></dt>
6359 <dd class="description">Create one or more printer subscriptions </dd>
6360 <dt>IPP_OP_CUPS_ACCEPT_JOBS </dt>
6361 <dd class="description">Accept new jobs on a printer</dd>
6362 <dt>IPP_OP_CUPS_ADD_MODIFY_CLASS </dt>
6363 <dd class="description">Add or modify a class</dd>
6364 <dt>IPP_OP_CUPS_ADD_MODIFY_PRINTER </dt>
6365 <dd class="description">Add or modify a printer</dd>
6366 <dt>IPP_OP_CUPS_AUTHENTICATE_JOB <span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span></dt>
6367 <dd class="description">Authenticate a job </dd>
6368 <dt>IPP_OP_CUPS_CREATE_LOCAL_PRINTER <span class="info">&nbsp;CUPS 2.2&nbsp;</span></dt>
6369 <dd class="description">Create a local (temporary) printer <dt>IPP_OP_CUPS_DELETE_CLASS </dt>
6370 <dd class="description">Delete a class</dd>
6371 <dt>IPP_OP_CUPS_DELETE_PRINTER </dt>
6372 <dd class="description">Delete a printer</dd>
6373 <dt>IPP_OP_CUPS_GET_CLASSES <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
6374 <dd class="description">Get a list of classes </dd>
6375 <dt>IPP_OP_CUPS_GET_DEFAULT </dt>
6376 <dd class="description">Get the default printer</dd>
6377 <dt>IPP_OP_CUPS_GET_DEVICES <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
6378 <dd class="description">Get a list of supported devices </dd>
6379 <dt>IPP_OP_CUPS_GET_DOCUMENT <span class="info">&nbsp;CUPS 1.4/macOS 10.6&nbsp;</span></dt>
6380 <dd class="description">Get a document file </dd>
6381 <dt>IPP_OP_CUPS_GET_PPD <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
6382 <dd class="description">Get a PPD file </dd>
6383 <dt>IPP_OP_CUPS_GET_PPDS <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
6384 <dd class="description">Get a list of supported drivers </dd>
6385 <dt>IPP_OP_CUPS_GET_PRINTERS </dt>
6386 <dd class="description">Get a list of printers and/or classes</dd>
6387 <dt>IPP_OP_CUPS_INVALID </dt>
6388 <dd class="description">Invalid operation name for <a href="#ippOpValue"><code>ippOpValue</code></a></dd>
6389 <dt>IPP_OP_CUPS_MOVE_JOB </dt>
6390 <dd class="description">Move a job to a different printer</dd>
6391 <dt>IPP_OP_CUPS_REJECT_JOBS </dt>
6392 <dd class="description">Reject new jobs on a printer</dd>
6393 <dt>IPP_OP_CUPS_SET_DEFAULT </dt>
6394 <dd class="description">Set the default printer</dd>
6395 <dt>IPP_OP_DEACTIVATE_PRINTER </dt>
6396 <dd class="description">Stop a printer</dd>
6397 <dt>IPP_OP_DELETE_DOCUMENT </dt>
6398 <dd class="description">Delete-Document</dd>
6399 <dt>IPP_OP_DEREGISTER_OUTPUT_DEVICE </dt>
6400 <dd class="description">Deregister-Output-Device</dd>
6401 <dt>IPP_OP_DISABLE_PRINTER </dt>
6402 <dd class="description">Stop a printer</dd>
6403 <dt>IPP_OP_ENABLE_PRINTER </dt>
6404 <dd class="description">Start a printer</dd>
6405 <dt>IPP_OP_FETCH_DOCUMENT </dt>
6406 <dd class="description">Fetch-Document</dd>
6407 <dt>IPP_OP_FETCH_JOB </dt>
6408 <dd class="description">Fetch-Job</dd>
6409 <dt>IPP_OP_GET_DOCUMENTS </dt>
6410 <dd class="description">Get-Documents</dd>
6411 <dt>IPP_OP_GET_DOCUMENT_ATTRIBUTES </dt>
6412 <dd class="description">Get-Document-Attributes</dd>
6413 <dt>IPP_OP_GET_JOBS </dt>
6414 <dd class="description">Get a list of jobs</dd>
6415 <dt>IPP_OP_GET_JOB_ATTRIBUTES </dt>
6416 <dd class="description">Get job attributes</dd>
6417 <dt>IPP_OP_GET_NEXT_DOCUMENT_DATA </dt>
6418 <dd class="description">Get-Next-Document-Data</dd>
6419 <dt>IPP_OP_GET_NOTIFICATIONS <span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span></dt>
6420 <dd class="description">Get notification events </dd>
6421 <dt>IPP_OP_GET_OUTPUT_DEVICE_ATTRIBUTES </dt>
6422 <dd class="description">Get-Output-Device-Attributes</dd>
6423 <dt>IPP_OP_GET_PRINTER_ATTRIBUTES </dt>
6424 <dd class="description">Get printer attributes</dd>
6425 <dt>IPP_OP_GET_PRINTER_SUPPORTED_VALUES </dt>
6426 <dd class="description">Get supported attribute values</dd>
6427 <dt>IPP_OP_GET_SUBSCRIPTIONS <span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span></dt>
6428 <dd class="description">Get list of subscriptions </dd>
6429 <dt>IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES <span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span></dt>
6430 <dd class="description">Get subscription attributes </dd>
6431 <dt>IPP_OP_HOLD_JOB </dt>
6432 <dd class="description">Hold a job for printing</dd>
6433 <dt>IPP_OP_HOLD_NEW_JOBS </dt>
6434 <dd class="description">Hold new jobs</dd>
6435 <dt>IPP_OP_IDENTIFY_PRINTER </dt>
6436 <dd class="description">Identify-Printer</dd>
6437 <dt>IPP_OP_PAUSE_PRINTER </dt>
6438 <dd class="description">Stop a printer</dd>
6439 <dt>IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB </dt>
6440 <dd class="description">Stop printer after the current job</dd>
6441 <dt>IPP_OP_PRINT_JOB </dt>
6442 <dd class="description">Print a single file</dd>
6443 <dt>IPP_OP_PRINT_URI </dt>
6444 <dd class="description">Print a single URL</dd>
6445 <dt>IPP_OP_PROMOTE_JOB </dt>
6446 <dd class="description">Promote a job to print sooner</dd>
6447 <dt>IPP_OP_PURGE_JOBS </dt>
6448 <dd class="description">Cancel all jobs</dd>
6449 <dt>IPP_OP_RELEASE_HELD_NEW_JOBS </dt>
6450 <dd class="description">Release new jobs</dd>
6451 <dt>IPP_OP_RELEASE_JOB </dt>
6452 <dd class="description">Release a job for printing</dd>
6453 <dt>IPP_OP_RENEW_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/macOS 10.5&nbsp;</span></dt>
6454 <dd class="description">Renew a printer subscription </dd>
6455 <dt>IPP_OP_REPROCESS_JOB </dt>
6456 <dd class="description">Reprint a job</dd>
6457 <dt>IPP_OP_RESTART_JOB </dt>
6458 <dd class="description">Reprint a job</dd>
6459 <dt>IPP_OP_RESTART_PRINTER </dt>
6460 <dd class="description">Restart a printer</dd>
6461 <dt>IPP_OP_RESUBMIT_JOB </dt>
6462 <dd class="description">Resubmit-Job</dd>
6463 <dt>IPP_OP_RESUME_JOB </dt>
6464 <dd class="description">Resume the current job</dd>
6465 <dt>IPP_OP_RESUME_PRINTER </dt>
6466 <dd class="description">Start a printer</dd>
6467 <dt>IPP_OP_SCHEDULE_JOB_AFTER </dt>
6468 <dd class="description">Schedule a job to print after another</dd>
6469 <dt>IPP_OP_SEND_DOCUMENT </dt>
6470 <dd class="description">Add a file to a job</dd>
6471 <dt>IPP_OP_SEND_HARDCOPY_DOCUMENT </dt>
6472 <dd class="description">Send-Hardcopy-Document</dd>
6473 <dt>IPP_OP_SEND_URI </dt>
6474 <dd class="description">Add a URL to a job</dd>
6475 <dt>IPP_OP_SET_DOCUMENT_ATTRIBUTES </dt>
6476 <dd class="description">Set-Document-Attributes</dd>
6477 <dt>IPP_OP_SET_JOB_ATTRIBUTES </dt>
6478 <dd class="description">Set job attributes</dd>
6479 <dt>IPP_OP_SET_PRINTER_ATTRIBUTES </dt>
6480 <dd class="description">Set printer attributes</dd>
6481 <dt>IPP_OP_SHUTDOWN_PRINTER </dt>
6482 <dd class="description">Turn a printer off</dd>
6483 <dt>IPP_OP_STARTUP_PRINTER </dt>
6484 <dd class="description">Turn a printer on</dd>
6485 <dt>IPP_OP_SUSPEND_CURRENT_JOB </dt>
6486 <dd class="description">Suspend the current job</dd>
6487 <dt>IPP_OP_UPDATE_ACTIVE_JOBS </dt>
6488 <dd class="description">Update-Active-Jobs</dd>
6489 <dt>IPP_OP_UPDATE_DOCUMENT_STATUS </dt>
6490 <dd class="description">Update-Document-Status</dd>
6491 <dt>IPP_OP_UPDATE_JOB_STATUS </dt>
6492 <dd class="description">Update-Job-Status</dd>
6493 <dt>IPP_OP_UPDATE_OUTPUT_DEVICE_ATTRIBUTES </dt>
6494 <dd class="description">Update-Output-Device-Attributes</dd>
6495 <dt>IPP_OP_VALIDATE_DOCUMENT </dt>
6496 <dd class="description">Validate-Document</dd>
6497 <dt>IPP_OP_VALIDATE_JOB </dt>
6498 <dd class="description">Validate job options</dd>
6499 </dl>
6500 <h3 class="enumeration"><a name="ipp_orient_e">ipp_orient_e</a></h3>
6501 <p class="description">Orientation values</p>
6502 <h4 class="constants">Constants</h4>
6503 <dl>
6504 <dt>IPP_ORIENT_LANDSCAPE </dt>
6505 <dd class="description">90 degrees counter-clockwise</dd>
6506 <dt>IPP_ORIENT_NONE </dt>
6507 <dd class="description">No rotation</dd>
6508 <dt>IPP_ORIENT_PORTRAIT </dt>
6509 <dd class="description">No rotation</dd>
6510 <dt>IPP_ORIENT_REVERSE_LANDSCAPE </dt>
6511 <dd class="description">90 degrees clockwise</dd>
6512 <dt>IPP_ORIENT_REVERSE_PORTRAIT </dt>
6513 <dd class="description">180 degrees</dd>
6514 </dl>
6515 <h3 class="enumeration"><a name="ipp_pstate_e">ipp_pstate_e</a></h3>
6516 <p class="description">Printer states</p>
6517 <h4 class="constants">Constants</h4>
6518 <dl>
6519 <dt>IPP_PSTATE_IDLE </dt>
6520 <dd class="description">Printer is idle</dd>
6521 <dt>IPP_PSTATE_PROCESSING </dt>
6522 <dd class="description">Printer is working</dd>
6523 <dt>IPP_PSTATE_STOPPED </dt>
6524 <dd class="description">Printer is stopped</dd>
6525 </dl>
6526 <h3 class="enumeration"><a name="ipp_quality_e">ipp_quality_e</a></h3>
6527 <p class="description">Qualities</p>
6528 <h4 class="constants">Constants</h4>
6529 <dl>
6530 <dt>IPP_QUALITY_DRAFT </dt>
6531 <dd class="description">Draft quality</dd>
6532 <dt>IPP_QUALITY_HIGH </dt>
6533 <dd class="description">High quality</dd>
6534 <dt>IPP_QUALITY_NORMAL </dt>
6535 <dd class="description">Normal quality</dd>
6536 </dl>
6537 <h3 class="enumeration"><a name="ipp_res_e">ipp_res_e</a></h3>
6538 <p class="description">Resolution units</p>
6539 <h4 class="constants">Constants</h4>
6540 <dl>
6541 <dt>IPP_RES_PER_CM </dt>
6542 <dd class="description">Pixels per centimeter</dd>
6543 <dt>IPP_RES_PER_INCH </dt>
6544 <dd class="description">Pixels per inch</dd>
6545 </dl>
6546 <h3 class="enumeration"><a name="ipp_state_e">ipp_state_e</a></h3>
6547 <p class="description">IPP states</p>
6548 <h4 class="constants">Constants</h4>
6549 <dl>
6550 <dt>IPP_STATE_ATTRIBUTE </dt>
6551 <dd class="description">One or more attributes need to be sent/received</dd>
6552 <dt>IPP_STATE_DATA </dt>
6553 <dd class="description">IPP request data needs to be sent/received</dd>
6554 <dt>IPP_STATE_ERROR </dt>
6555 <dd class="description">An error occurred</dd>
6556 <dt>IPP_STATE_HEADER </dt>
6557 <dd class="description">The request header needs to be sent/received</dd>
6558 <dt>IPP_STATE_IDLE </dt>
6559 <dd class="description">Nothing is happening/request completed</dd>
6560 </dl>
6561 <h3 class="enumeration"><a name="ipp_status_e">ipp_status_e</a></h3>
6562 <p class="description">IPP status codes</p>
6563 <h4 class="constants">Constants</h4>
6564 <dl>
6565 <dt>IPP_STATUS_CUPS_INVALID </dt>
6566 <dd class="description">Invalid status name for <a href="#ippErrorValue"><code>ippErrorValue</code></a></dd>
6567 <dt>IPP_STATUS_CUPS_SEE_OTHER </dt>
6568 <dd class="description">cups-see-other</dd>
6569 <dt>IPP_STATUS_ERROR_ACCOUNT_AUTHORIZATION_FAILED </dt>
6570 <dd class="description">client-error-account-authorization-failed</dd>
6571 <dt>IPP_STATUS_ERROR_ACCOUNT_CLOSED </dt>
6572 <dd class="description">client-error-account-closed</dd>
6573 <dt>IPP_STATUS_ERROR_ACCOUNT_INFO_NEEDED </dt>
6574 <dd class="description">client-error-account-info-needed</dd>
6575 <dt>IPP_STATUS_ERROR_ACCOUNT_LIMIT_REACHED </dt>
6576 <dd class="description">client-error-account-limit-reached</dd>
6577 <dt>IPP_STATUS_ERROR_ATTRIBUTES_NOT_SETTABLE </dt>
6578 <dd class="description">client-error-attributes-not-settable</dd>
6579 <dt>IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES </dt>
6580 <dd class="description">client-error-attributes-or-values-not-supported</dd>
6581 <dt>IPP_STATUS_ERROR_BAD_REQUEST </dt>
6582 <dd class="description">client-error-bad-request</dd>
6583 <dt>IPP_STATUS_ERROR_BUSY </dt>
6584 <dd class="description">server-error-busy</dd>
6585 <dt>IPP_STATUS_ERROR_CHARSET </dt>
6586 <dd class="description">client-error-charset-not-supported</dd>
6587 <dt>IPP_STATUS_ERROR_COMPRESSION_ERROR </dt>
6588 <dd class="description">client-error-compression-error</dd>
6589 <dt>IPP_STATUS_ERROR_COMPRESSION_NOT_SUPPORTED </dt>
6590 <dd class="description">client-error-compression-not-supported</dd>
6591 <dt>IPP_STATUS_ERROR_CONFLICTING </dt>
6592 <dd class="description">client-error-conflicting-attributes</dd>
6593 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
6594 <dd class="description">cups-error-account-authorization-failed </dd>
6595 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED </dt>
6596 <dd class="description">cups-error-account-closed @deprecate@</dd>
6597 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
6598 <dd class="description">cups-error-account-info-needed </dd>
6599 <dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
6600 <dd class="description">cups-error-account-limit-reached </dd>
6601 <dt>IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED <span class="info">&nbsp;CUPS 1.5/macOS 10.7&nbsp;</span></dt>
6602 <dd class="description">cups-authentication-canceled - Authentication canceled by user </dd>
6603 <dt>IPP_STATUS_ERROR_CUPS_PKI <span class="info">&nbsp;CUPS 1.5/macOS 10.7&nbsp;</span></dt>
6604 <dd class="description">cups-pki-error - Error negotiating a secure connection </dd>
6605 <dt>IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED </dt>
6606 <dd class="description">cups-upgrade-required - TLS upgrade required</dd>
6607 <dt>IPP_STATUS_ERROR_DEVICE </dt>
6608 <dd class="description">server-error-device-error</dd>
6609 <dt>IPP_STATUS_ERROR_DOCUMENT_ACCESS </dt>
6610 <dd class="description">client-error-document-access-error</dd>
6611 <dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR </dt>
6612 <dd class="description">client-error-document-format-error</dd>
6613 <dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED </dt>
6614 <dd class="description">client-error-document-format-not-supported</dd>
6615 <dt>IPP_STATUS_ERROR_DOCUMENT_PASSWORD </dt>
6616 <dd class="description">client-error-document-password-error</dd>
6617 <dt>IPP_STATUS_ERROR_DOCUMENT_PERMISSION </dt>
6618 <dd class="description">client-error-document-permission-error</dd>
6619 <dt>IPP_STATUS_ERROR_DOCUMENT_SECURITY </dt>
6620 <dd class="description">client-error-document-security-error</dd>
6621 <dt>IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE </dt>
6622 <dd class="description">client-error-document-unprintable-error</dd>
6623 <dt>IPP_STATUS_ERROR_FORBIDDEN </dt>
6624 <dd class="description">client-error-forbidden</dd>
6625 <dt>IPP_STATUS_ERROR_GONE </dt>
6626 <dd class="description">client-error-gone</dd>
6627 <dt>IPP_STATUS_ERROR_IGNORED_ALL_SUBSCRIPTIONS </dt>
6628 <dd class="description">client-error-ignored-all-subscriptions</dd>
6629 <dt>IPP_STATUS_ERROR_INTERNAL </dt>
6630 <dd class="description">server-error-internal-error</dd>
6631 <dt>IPP_STATUS_ERROR_JOB_CANCELED </dt>
6632 <dd class="description">server-error-job-canceled</dd>
6633 <dt>IPP_STATUS_ERROR_MULTIPLE_JOBS_NOT_SUPPORTED </dt>
6634 <dd class="description">server-error-multiple-document-jobs-not-supported</dd>
6635 <dt>IPP_STATUS_ERROR_NOT_ACCEPTING_JOBS </dt>
6636 <dd class="description">server-error-not-accepting-jobs</dd>
6637 <dt>IPP_STATUS_ERROR_NOT_AUTHENTICATED </dt>
6638 <dd class="description">client-error-not-authenticated</dd>
6639 <dt>IPP_STATUS_ERROR_NOT_AUTHORIZED </dt>
6640 <dd class="description">client-error-not-authorized</dd>
6641 <dt>IPP_STATUS_ERROR_NOT_FETCHABLE </dt>
6642 <dd class="description">client-error-not-fetchable</dd>
6643 <dt>IPP_STATUS_ERROR_NOT_FOUND </dt>
6644 <dd class="description">client-error-not-found</dd>
6645 <dt>IPP_STATUS_ERROR_NOT_POSSIBLE </dt>
6646 <dd class="description">client-error-not-possible</dd>
6647 <dt>IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED </dt>
6648 <dd class="description">server-error-operation-not-supported</dd>
6649 <dt>IPP_STATUS_ERROR_PRINTER_IS_DEACTIVATED </dt>
6650 <dd class="description">server-error-printer-is-deactivated</dd>
6651 <dt>IPP_STATUS_ERROR_REQUEST_ENTITY </dt>
6652 <dd class="description">client-error-request-entity-too-large</dd>
6653 <dt>IPP_STATUS_ERROR_REQUEST_VALUE </dt>
6654 <dd class="description">client-error-request-value-too-long</dd>
6655 <dt>IPP_STATUS_ERROR_SERVICE_UNAVAILABLE </dt>
6656 <dd class="description">server-error-service-unavailable</dd>
6657 <dt>IPP_STATUS_ERROR_TEMPORARY </dt>
6658 <dd class="description">server-error-temporary-error</dd>
6659 <dt>IPP_STATUS_ERROR_TIMEOUT </dt>
6660 <dd class="description">client-error-timeout</dd>
6661 <dt>IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS </dt>
6662 <dd class="description">server-error-too-many-documents</dd>
6663 <dt>IPP_STATUS_ERROR_TOO_MANY_JOBS </dt>
6664 <dd class="description">server-error-too-many-jobs</dd>
6665 <dt>IPP_STATUS_ERROR_TOO_MANY_SUBSCRIPTIONS </dt>
6666 <dd class="description">client-error-too-many-subscriptions</dd>
6667 <dt>IPP_STATUS_ERROR_URI_SCHEME </dt>
6668 <dd class="description">client-error-uri-scheme-not-supported</dd>
6669 <dt>IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED </dt>
6670 <dd class="description">server-error-version-not-supported</dd>
6671 <dt>IPP_STATUS_OK </dt>
6672 <dd class="description">successful-ok</dd>
6673 <dt>IPP_STATUS_OK_CONFLICTING </dt>
6674 <dd class="description">successful-ok-conflicting-attributes</dd>
6675 <dt>IPP_STATUS_OK_EVENTS_COMPLETE </dt>
6676 <dd class="description">successful-ok-events-complete</dd>
6677 <dt>IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED </dt>
6678 <dd class="description">successful-ok-ignored-or-substituted-attributes</dd>
6679 <dt>IPP_STATUS_OK_IGNORED_SUBSCRIPTIONS </dt>
6680 <dd class="description">successful-ok-ignored-subscriptions</dd>
6681 <dt>IPP_STATUS_OK_TOO_MANY_EVENTS </dt>
6682 <dd class="description">successful-ok-too-many-events</dd>
6683 </dl>
6684 <h3 class="enumeration"><a name="ipp_tag_e">ipp_tag_e</a></h3>
6685 <p class="description">Format tags for attributes</p>
6686 <h4 class="constants">Constants</h4>
6687 <dl>
6688 <dt>IPP_TAG_ADMINDEFINE </dt>
6689 <dd class="description">Admin-defined value</dd>
6690 <dt>IPP_TAG_BEGIN_COLLECTION </dt>
6691 <dd class="description">Beginning of collection value</dd>
6692 <dt>IPP_TAG_BOOLEAN </dt>
6693 <dd class="description">Boolean value</dd>
6694 <dt>IPP_TAG_CHARSET </dt>
6695 <dd class="description">Character set value</dd>
6696 <dt>IPP_TAG_CUPS_INVALID </dt>
6697 <dd class="description">Invalid tag name for <a href="#ippTagValue"><code>ippTagValue</code></a></dd>
6698 <dt>IPP_TAG_DATE </dt>
6699 <dd class="description">Date/time value</dd>
6700 <dt>IPP_TAG_DEFAULT </dt>
6701 <dd class="description">Default value</dd>
6702 <dt>IPP_TAG_DELETEATTR </dt>
6703 <dd class="description">Delete-attribute value</dd>
6704 <dt>IPP_TAG_DOCUMENT </dt>
6705 <dd class="description">Document group</dd>
6706 <dt>IPP_TAG_END </dt>
6707 <dd class="description">End-of-attributes</dd>
6708 <dt>IPP_TAG_END_COLLECTION </dt>
6709 <dd class="description">End of collection value</dd>
6710 <dt>IPP_TAG_ENUM </dt>
6711 <dd class="description">Enumeration value</dd>
6712 <dt>IPP_TAG_EVENT_NOTIFICATION </dt>
6713 <dd class="description">Event group</dd>
6714 <dt>IPP_TAG_EXTENSION </dt>
6715 <dd class="description">Extension point for 32-bit tags</dd>
6716 <dt>IPP_TAG_INTEGER </dt>
6717 <dd class="description">Integer value</dd>
6718 <dt>IPP_TAG_JOB </dt>
6719 <dd class="description">Job group</dd>
6720 <dt>IPP_TAG_KEYWORD </dt>
6721 <dd class="description">Keyword value</dd>
6722 <dt>IPP_TAG_LANGUAGE </dt>
6723 <dd class="description">Language value</dd>
6724 <dt>IPP_TAG_MEMBERNAME </dt>
6725 <dd class="description">Collection member name value</dd>
6726 <dt>IPP_TAG_MIMETYPE </dt>
6727 <dd class="description">MIME media type value</dd>
6728 <dt>IPP_TAG_NAME </dt>
6729 <dd class="description">Name value</dd>
6730 <dt>IPP_TAG_NAMELANG </dt>
6731 <dd class="description">Name-with-language value</dd>
6732 <dt>IPP_TAG_NOTSETTABLE </dt>
6733 <dd class="description">Not-settable value</dd>
6734 <dt>IPP_TAG_NOVALUE </dt>
6735 <dd class="description">No-value value</dd>
6736 <dt>IPP_TAG_OPERATION </dt>
6737 <dd class="description">Operation group</dd>
6738 <dt>IPP_TAG_PRINTER </dt>
6739 <dd class="description">Printer group</dd>
6740 <dt>IPP_TAG_RANGE </dt>
6741 <dd class="description">Range value</dd>
6742 <dt>IPP_TAG_RESOLUTION </dt>
6743 <dd class="description">Resolution value</dd>
6744 <dt>IPP_TAG_STRING </dt>
6745 <dd class="description">Octet string value</dd>
6746 <dt>IPP_TAG_SUBSCRIPTION </dt>
6747 <dd class="description">Subscription group</dd>
6748 <dt>IPP_TAG_TEXT </dt>
6749 <dd class="description">Text value</dd>
6750 <dt>IPP_TAG_TEXTLANG </dt>
6751 <dd class="description">Text-with-language value</dd>
6752 <dt>IPP_TAG_UNKNOWN </dt>
6753 <dd class="description">Unknown value</dd>
6754 <dt>IPP_TAG_UNSUPPORTED_GROUP </dt>
6755 <dd class="description">Unsupported attributes group</dd>
6756 <dt>IPP_TAG_UNSUPPORTED_VALUE </dt>
6757 <dd class="description">Unsupported value</dd>
6758 <dt>IPP_TAG_URI </dt>
6759 <dd class="description">URI value</dd>
6760 <dt>IPP_TAG_URISCHEME </dt>
6761 <dd class="description">URI scheme value</dd>
6762 <dt>IPP_TAG_ZERO </dt>
6763 <dd class="description">Zero tag - used for separators</dd>
6764 </dl>
6765 </div>
6766 </body>
6767 </html>