]> git.ipfire.org Git - thirdparty/cups.git/blame - doc/help/api-httpipp.html
Merge changes from CUPS 1.7svn-r10814.
[thirdparty/cups.git] / doc / help / api-httpipp.html
CommitLineData
745129be 1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
ef416fc2 2<html>
3<!-- SECTION: Programming -->
4<head>
0268488e
MS
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">
5a738aea
MS
9<style type="text/css"><!--
10BODY {
11 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
12}
13
14H1, H2, H3, H4, H5, H6, P, TD, TH {
15 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
16}
17
18KBD {
19 font-family: monaco, courier, monospace;
20 font-weight: bold;
21}
22
23PRE {
24 font-family: monaco, courier, monospace;
25}
26
27PRE.command {
10d09e33 28 border: dotted thin #7f7f7f;
5a738aea 29 margin-left: 36pt;
10d09e33 30 padding: 10px;
5a738aea
MS
31}
32
f11a948a
MS
33P.compact {
34 margin: 0;
35}
36
e4572d57
MS
37P.example {
38 font-style: italic;
39 margin-left: 36pt;
40}
41
5a738aea
MS
42PRE.example {
43 background: #eeeeee;
44 border: dotted thin #999999;
45 margin-left: 36pt;
178cb736 46 padding: 10pt;
5a738aea
MS
47}
48
49PRE.command EM, PRE.example EM {
50 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
51}
52
53P.command {
54 font-family: monaco, courier, monospace;
55 margin-left: 36pt;
56}
57
58P.formula {
59 font-style: italic;
60 margin-left: 36pt;
61}
62
63BLOCKQUOTE {
178cb736 64 background: #eeeeee;
5a738aea
MS
65 border: solid thin #999999;
66 padding: 10pt;
67}
68
e4572d57
MS
69A IMG {
70 border: none;
71}
72
73A:link:hover IMG {
74 background: #f0f0f0;
75 border-radius: 10px;
76 -moz-border-radius: 10px;
77}
78
5a738aea 79A:link, A:visited {
568fa3fa 80 font-weight: normal;
5a738aea 81 text-decoration: none;
5a738aea
MS
82}
83
84A:link:hover, A:visited:hover, A:active {
85 text-decoration: underline;
5a738aea
MS
86}
87
88SUB, SUP {
89 font-size: 50%;
90}
91
e4572d57
MS
92TR.data, TD.data, TR.data TD {
93 margin-top: 10pt;
94 padding: 5pt;
95 border-bottom: solid 1pt #999999;
96}
97
98TR.data TH {
99 border-bottom: solid 1pt #999999;
100 padding-top: 10pt;
101 padding-left: 5pt;
102 text-align: left;
103}
104
5a738aea
MS
105DIV.table TABLE {
106 border: solid thin #999999;
107 border-collapse: collapse;
108 border-spacing: 0;
109 margin-left: auto;
110 margin-right: auto;
111}
112
113DIV.table CAPTION {
114 caption-side: top;
115 font-size: 120%;
116 font-style: italic;
117 font-weight: bold;
118 margin-left: auto;
119 margin-right: auto;
120}
121
122DIV.table TABLE TD {
123 border: solid thin #cccccc;
124 padding-top: 5pt;
125}
126
127DIV.table TABLE TH {
128 background: #cccccc;
129 border: none;
130 border-bottom: solid thin #999999;
131}
132
133DIV.figure TABLE {
134 margin-left: auto;
135 margin-right: auto;
136}
137
138DIV.figure CAPTION {
139 caption-side: bottom;
140 font-size: 120%;
141 font-style: italic;
142 font-weight: bold;
143 margin-left: auto;
144 margin-right: auto;
145}
146
147TH.label {
5a738aea
MS
148 text-align: right;
149 vertical-align: top;
150}
151
e4572d57
MS
152TH.sublabel {
153 text-align: right;
154 font-weight: normal;
155}
156
5a738aea
MS
157HR {
158 border: solid thin;
159}
160
161SPAN.info {
e4572d57
MS
162 background: black;
163 border: thin solid black;
164 color: white;
5a738aea
MS
165 font-size: 80%;
166 font-style: italic;
167 font-weight: bold;
168 white-space: nowrap;
169}
170
171H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
172 float: right;
173 font-size: 100%;
174}
175
178cb736
MS
176H1.title {
177}
178
5a738aea
MS
179H2.title, H3.title {
180 border-bottom: solid 2pt #000000;
181}
182
e4572d57
MS
183DIV.indent, TABLE.indent {
184 margin-top: 2em;
185 margin-left: auto;
186 margin-right: auto;
187 width: 90%;
188}
189
190TABLE.indent {
191 border-collapse: collapse;
192}
193
194TABLE.indent TD, TABLE.indent TH {
195 padding: 0;
196}
197
198TABLE.list {
199 border-collapse: collapse;
200 margin-left: auto;
201 margin-right: auto;
202 width: 90%;
203}
204
205TABLE.list TH {
206 background: white;
207 border-bottom: solid thin #cccccc;
208 color: #444444;
209 padding-top: 10pt;
210 padding-left: 5pt;
211 text-align: left;
212 vertical-align: bottom;
213 white-space: nowrap;
214}
215
216TABLE.list TH A {
217 color: #4444cc;
218}
219
220TABLE.list TD {
221 border-bottom: solid thin #eeeeee;
222 padding-top: 5pt;
223 padding-left: 5pt;
224}
225
226TABLE.list TR:nth-child(even) {
227 background: #f8f8f8;
228}
229
230TABLE.list TR:nth-child(odd) {
231 background: #f4f4f4;
232}
233
5a738aea
MS
234DT {
235 margin-left: 36pt;
236 margin-top: 12pt;
237}
238
239DD {
240 margin-left: 54pt;
241}
242
243DL.category DT {
244 font-weight: bold;
245}
246
247P.summary {
248 margin-left: 36pt;
249 font-family: monaco, courier, monospace;
250}
251
5a738aea
MS
252DIV.summary TABLE {
253 border: solid thin #999999;
254 border-collapse: collapse;
255 border-spacing: 0;
256 margin: 10px;
257}
258
259DIV.summary TABLE TD, DIV.summary TABLE TH {
260 border: solid thin #999999;
261 padding: 5px;
262 text-align: left;
263 vertical-align: top;
264}
265
266DIV.summary TABLE THEAD TH {
267 background: #eeeeee;
268}
269
270/* API documentation styles... */
271div.body h1 {
272 margin: 0;
273}
274div.body h2 {
275 margin-top: 1.5em;
276}
277div.body h3, div.body h4, div.body h5 {
278 margin-bottom: 0.5em;
279 margin-top: 1.5em;
280}
281.class, .enumeration, .function, .struct, .typedef, .union {
282 border-bottom: solid thin #999999;
283 margin-bottom: 0;
284 margin-top: 2em;
285}
286.description {
287 margin-top: 0.5em;
288}
289code, p.code, pre, ul.code li {
290 font-family: monaco, courier, monospace;
291 font-size: 90%;
292}
293ul.code, ul.contents, ul.subcontents {
294 list-style-type: none;
295 margin: 0;
296 padding-left: 0;
297}
298ul.code li {
299 margin: 0;
300}
301ul.contents > li {
302 margin-top: 1em;
303}
304ul.contents li ul.code, ul.contents li ul.subcontents {
305 padding-left: 2em;
306}
307div.body dl {
308 margin-left: 0;
309 margin-top: 0;
310}
311div.body dt {
312 font-style: italic;
313 margin-left: 0;
314 margin-top: 0;
315}
316div.body dd {
317 margin-bottom: 0.5em;
318}
319
320/* This is just for the HTML files generated with the framedhelp target */
321div.contents {
322 background: #e8e8e8;
323 border: solid thin black;
324 padding: 10px;
325}
326div.contents h1 {
327 font-size: 110%;
328}
329div.contents h2 {
330 font-size: 100%;
331}
332div.contents ul.contents {
333 font-size: 80%;
334}
ac884b6a
MS
335div.contents ul.subcontents li {
336 margin-left: 1em;
337 text-indent: -1em;
338}
5a738aea 339--></style>
ef416fc2 340</head>
341<body>
5a738aea 342<div class='body'>
ef416fc2 343<!--
68b10830 344 "$Id$"
5a738aea 345
321d8d57 346 HTTP and IPP API header for CUPS.
5a738aea 347
321d8d57 348 Copyright 2007-2011 by Apple Inc.
5a738aea
MS
349 Copyright 1997-2006 by Easy Software Products, all rights reserved.
350
351 These coded instructions, statements, and computer programs are the
352 property of Apple Inc. and are protected by Federal copyright
353 law. Distribution and use rights are outlined in the file "LICENSE.txt"
354 which should have been included with this file. If this file is
355 file is missing or damaged, see the license at "http://www.cups.org/".
356-->
357
178cb736
MS
358<h1 class='title'>HTTP and IPP APIs</h1>
359
5a738aea
MS
360<div class='summary'><table summary='General Information'>
361<thead>
362<tr>
363 <th>Header</th>
364 <th>cups/cups.h</th>
365</tr>
366</thead>
367<tbody>
368<tr>
369 <th>Library</th>
370 <td>-lcups</td>
371</tr>
372<tr>
373 <th>See Also</th>
374 <td>Programming: <a href='api-overview.html'>Introduction to CUPS Programming</a><br>
375 Programming: <a href='api-cups.html'>CUPS API</a><br>
376 References: <a href='spec-ipp.html'>CUPS Implementation of IPP</a></td>
377</tr>
378</tbody>
379</table></div>
380<h2 class="title">Contents</h2>
381<ul class="contents">
5a738aea 382<li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
0268488e
MS
383 <li><a href="#CREATING_URI_STRINGS">Creating URI Strings</a></li>
384 <li><a href="#SENDING_REQUESTS_WITH_FILES">Sending Requests with Files</a></li>
385 <li><a href="#ASYNCHRONOUS_REQUEST_PROCESSING">Asynchronous Request Processing</a></li>
5a738aea
MS
386</ul></li>
387<li><a href="#FUNCTIONS">Functions</a><ul class="code">
0268488e
MS
388 <li><a href="#cupsDoAuthentication" title="Authenticate a request.">cupsDoAuthentication</a></li>
389 <li><a href="#cupsDoFileRequest" title="Do an IPP request with a file.">cupsDoFileRequest</a></li>
390 <li><a href="#cupsDoIORequest" title="Do an IPP request with file descriptors.">cupsDoIORequest</a></li>
391 <li><a href="#cupsDoRequest" title="Do an IPP request.">cupsDoRequest</a></li>
392 <li><a href="#cupsEncodeOptions" title="Encode printer options into IPP attributes.">cupsEncodeOptions</a></li>
393 <li><a href="#cupsEncodeOptions2" title="Encode printer options into IPP attributes for a group.">cupsEncodeOptions2</a></li>
394 <li><a href="#cupsGetDevices" title="Get available printer devices.">cupsGetDevices</a></li>
395 <li><a href="#cupsGetFd" title="Get a file from the server.">cupsGetFd</a></li>
396 <li><a href="#cupsGetFile" title="Get a file from the server.">cupsGetFile</a></li>
397 <li><a href="#cupsGetResponse" title="Get a response to an IPP request.">cupsGetResponse</a></li>
5a9febac
MS
398 <li><a href="#cupsLastError" title="Return the last IPP status code received on the current
399thread.">cupsLastError</a></li>
400 <li><a href="#cupsLastErrorString" title="Return the last IPP status-message received on the
401current thread.">cupsLastErrorString</a></li>
0268488e
MS
402 <li><a href="#cupsPutFd" title="Put a file on the server.">cupsPutFd</a></li>
403 <li><a href="#cupsPutFile" title="Put a file on the server.">cupsPutFile</a></li>
404 <li><a href="#cupsReadResponseData" title="Read additional data after the IPP response.">cupsReadResponseData</a></li>
405 <li><a href="#cupsSendRequest" title="Send an IPP request.">cupsSendRequest</a></li>
406 <li><a href="#cupsWriteRequestData" title="Write additional data after an IPP request.">cupsWriteRequestData</a></li>
a469f8a5
MS
407 <li><a href="#httpAcceptConnection" title="Accept a new HTTP client connection from the
408specified listening socket.">httpAcceptConnection</a></li>
0268488e
MS
409 <li><a href="#httpAddCredential" title="Allocates and adds a single credential to an array.">httpAddCredential</a></li>
410 <li><a href="#httpAddrAny" title="Check for the &quot;any&quot; address.">httpAddrAny</a></li>
411 <li><a href="#httpAddrEqual" title="Compare two addresses.">httpAddrEqual</a></li>
412 <li><a href="#httpAddrLength" title="Return the length of the address in bytes.">httpAddrLength</a></li>
a469f8a5
MS
413 <li><a href="#httpAddrListen" title="Create a listening socket bound to the specified
414address and port.">httpAddrListen</a></li>
0268488e
MS
415 <li><a href="#httpAddrLocalhost" title="Check for the local loopback address.">httpAddrLocalhost</a></li>
416 <li><a href="#httpAddrLookup" title="Lookup the hostname associated with the address.">httpAddrLookup</a></li>
a469f8a5 417 <li><a href="#httpAddrPort" title="Get the port number associated with an address.">httpAddrPort</a></li>
0268488e
MS
418 <li><a href="#httpAddrString" title="Convert an address to a numeric string.">httpAddrString</a></li>
419 <li><a href="#httpAssembleURI" title="Assemble a uniform resource identifier from its
5a738aea 420components.">httpAssembleURI</a></li>
0268488e 421 <li><a href="#httpAssembleURIf" title="Assemble a uniform resource identifier from its
5a738aea 422components with a formatted resource.">httpAssembleURIf</a></li>
0268488e
MS
423 <li><a href="#httpBlocking" title="Set blocking/non-blocking behavior on a connection.">httpBlocking</a></li>
424 <li><a href="#httpCheck" title="Check to see if there is a pending response from the server.">httpCheck</a></li>
425 <li><a href="#httpClearCookie" title="Clear the cookie value(s).">httpClearCookie</a></li>
426 <li><a href="#httpClearFields" title="Clear HTTP request fields.">httpClearFields</a></li>
427 <li><a href="#httpClose" title="Close an HTTP connection.">httpClose</a></li>
428 <li><a href="#httpConnect" title="Connect to a HTTP server.">httpConnect</a></li>
a469f8a5 429 <li><a href="#httpConnect2" title="Connect to a HTTP server.">httpConnect2</a></li>
0268488e
MS
430 <li><a href="#httpConnectEncrypt" title="Connect to a HTTP server using encryption.">httpConnectEncrypt</a></li>
431 <li><a href="#httpCopyCredentials" title="Copy the credentials associated with an encrypted
10d09e33 432connection.">httpCopyCredentials</a></li>
0268488e
MS
433 <li><a href="#httpDecode64" title="Base64-decode a string.">httpDecode64</a></li>
434 <li><a href="#httpDecode64_2" title="Base64-decode a string.">httpDecode64_2</a></li>
435 <li><a href="#httpDelete" title="Send a DELETE request to the server.">httpDelete</a></li>
436 <li><a href="#httpEncode64" title="Base64-encode a string.">httpEncode64</a></li>
437 <li><a href="#httpEncode64_2" title="Base64-encode a string.">httpEncode64_2</a></li>
438 <li><a href="#httpEncryption" title="Set the required encryption on the link.">httpEncryption</a></li>
439 <li><a href="#httpError" title="Get the last error on a connection.">httpError</a></li>
440 <li><a href="#httpFlush" title="Flush data from a HTTP connection.">httpFlush</a></li>
441 <li><a href="#httpFlushWrite" title="Flush data in write buffer.">httpFlushWrite</a></li>
442 <li><a href="#httpFreeCredentials" title="Free an array of credentials.">httpFreeCredentials</a></li>
443 <li><a href="#httpGet" title="Send a GET request to the server.">httpGet</a></li>
444 <li><a href="#httpGetAuthString" title="Get the current authorization string.">httpGetAuthString</a></li>
445 <li><a href="#httpGetBlocking" title="Get the blocking/non-block state of a connection.">httpGetBlocking</a></li>
a469f8a5
MS
446 <li><a href="#httpGetContentEncoding" title="Get a common content encoding, if any, between
447the client and server.">httpGetContentEncoding</a></li>
0268488e
MS
448 <li><a href="#httpGetCookie" title="Get any cookie data from the response.">httpGetCookie</a></li>
449 <li><a href="#httpGetDateString" title="Get a formatted date/time string from a time value.">httpGetDateString</a></li>
450 <li><a href="#httpGetDateString2" title="Get a formatted date/time string from a time value.">httpGetDateString2</a></li>
451 <li><a href="#httpGetDateTime" title="Get a time value from a formatted date/time string.">httpGetDateTime</a></li>
a469f8a5 452 <li><a href="#httpGetExpect" title="Get the value of the Expect header, if any.">httpGetExpect</a></li>
0268488e
MS
453 <li><a href="#httpGetFd" title="Get the file descriptor associated with a connection.">httpGetFd</a></li>
454 <li><a href="#httpGetField" title="Get a field value from a request/response.">httpGetField</a></li>
455 <li><a href="#httpGetHostByName" title="Lookup a hostname or IPv4 address, and return
5a738aea 456address records for the specified name.">httpGetHostByName</a></li>
0268488e
MS
457 <li><a href="#httpGetHostname" title="Get the FQDN for the connection or local system.">httpGetHostname</a></li>
458 <li><a href="#httpGetLength" title="Get the amount of data remaining from the
5a738aea 459content-length or transfer-encoding fields.">httpGetLength</a></li>
0268488e 460 <li><a href="#httpGetLength2" title="Get the amount of data remaining from the
5a738aea 461content-length or transfer-encoding fields.">httpGetLength2</a></li>
a2326b5b 462 <li><a href="#httpGetState" title="Get the current state of the HTTP request.">httpGetState</a></li>
0268488e
MS
463 <li><a href="#httpGetStatus" title="Get the status of the last HTTP request.">httpGetStatus</a></li>
464 <li><a href="#httpGetSubField" title="Get a sub-field value.">httpGetSubField</a></li>
465 <li><a href="#httpGetSubField2" title="Get a sub-field value.">httpGetSubField2</a></li>
a2326b5b 466 <li><a href="#httpGetVersion" title="Get the HTTP version at the other end.">httpGetVersion</a></li>
0268488e
MS
467 <li><a href="#httpGets" title="Get a line of text from a HTTP connection.">httpGets</a></li>
468 <li><a href="#httpHead" title="Send a HEAD request to the server.">httpHead</a></li>
469 <li><a href="#httpInitialize" title="Initialize the HTTP interface library and set the
5a738aea 470default HTTP proxy (if any).">httpInitialize</a></li>
0268488e
MS
471 <li><a href="#httpMD5" title="Compute the MD5 sum of the username:group:password.">httpMD5</a></li>
472 <li><a href="#httpMD5Final" title="Combine the MD5 sum of the username, group, and password
5a738aea
MS
473with the server-supplied nonce value, method, and
474request-uri.">httpMD5Final</a></li>
0268488e
MS
475 <li><a href="#httpMD5String" title="Convert an MD5 sum to a character string.">httpMD5String</a></li>
476 <li><a href="#httpOptions" title="Send an OPTIONS request to the server.">httpOptions</a></li>
a469f8a5 477 <li><a href="#httpPeek" title="Peek at data from a HTTP connection.">httpPeek</a></li>
0268488e
MS
478 <li><a href="#httpPost" title="Send a POST request to the server.">httpPost</a></li>
479 <li><a href="#httpPut" title="Send a PUT request to the server.">httpPut</a></li>
480 <li><a href="#httpRead" title="Read data from a HTTP connection.">httpRead</a></li>
481 <li><a href="#httpRead2" title="Read data from a HTTP connection.">httpRead2</a></li>
a469f8a5 482 <li><a href="#httpReadRequest" title="Read a HTTP request from a connection.">httpReadRequest</a></li>
0268488e 483 <li><a href="#httpReconnect" title="Reconnect to a HTTP server.">httpReconnect</a></li>
3e7fe0ca
MS
484 <li><a href="#httpReconnect2" title="Reconnect to a HTTP server with timeout and optional
485cancel.">httpReconnect2</a></li>
0268488e 486 <li><a href="#httpSeparate" title="Separate a Universal Resource Identifier into its
5a738aea 487components.">httpSeparate</a></li>
0268488e 488 <li><a href="#httpSeparate2" title="Separate a Universal Resource Identifier into its
5a738aea 489components.">httpSeparate2</a></li>
0268488e 490 <li><a href="#httpSeparateURI" title="Separate a Universal Resource Identifier into its
5a738aea 491components.">httpSeparateURI</a></li>
0268488e
MS
492 <li><a href="#httpSetAuthString" title="Set the current authorization string.">httpSetAuthString</a></li>
493 <li><a href="#httpSetCookie" title="Set the cookie value(s).">httpSetCookie</a></li>
494 <li><a href="#httpSetCredentials" title="Set the credentials associated with an encrypted
10d09e33 495connection.">httpSetCredentials</a></li>
0268488e
MS
496 <li><a href="#httpSetExpect" title="Set the Expect: header in a request.">httpSetExpect</a></li>
497 <li><a href="#httpSetField" title="Set the value of an HTTP header.">httpSetField</a></li>
498 <li><a href="#httpSetLength" title="Set the content-length and content-encoding.">httpSetLength</a></li>
f228370c 499 <li><a href="#httpSetTimeout" title="Set read/write timeouts and an optional callback.">httpSetTimeout</a></li>
0268488e
MS
500 <li><a href="#httpStatus" title="Return a short string describing a HTTP status code.">httpStatus</a></li>
501 <li><a href="#httpTrace" title="Send an TRACE request to the server.">httpTrace</a></li>
502 <li><a href="#httpUpdate" title="Update the current HTTP state for incoming data.">httpUpdate</a></li>
503 <li><a href="#httpWait" title="Wait for data available on a connection.">httpWait</a></li>
504 <li><a href="#httpWrite" title="Write data to a HTTP connection.">httpWrite</a></li>
505 <li><a href="#httpWrite2" title="Write data to a HTTP connection.">httpWrite2</a></li>
a469f8a5 506 <li><a href="#httpWriteResponse" title="Write a HTTP response to a client connection.">httpWriteResponse</a></li>
0268488e
MS
507 <li><a href="#ippAddBoolean" title="Add a boolean attribute to an IPP message.">ippAddBoolean</a></li>
508 <li><a href="#ippAddBooleans" title="Add an array of boolean values.">ippAddBooleans</a></li>
509 <li><a href="#ippAddCollection" title="Add a collection value.">ippAddCollection</a></li>
510 <li><a href="#ippAddCollections" title="Add an array of collection values.">ippAddCollections</a></li>
511 <li><a href="#ippAddDate" title="Add a date attribute to an IPP message.">ippAddDate</a></li>
512 <li><a href="#ippAddInteger" title="Add a integer attribute to an IPP message.">ippAddInteger</a></li>
513 <li><a href="#ippAddIntegers" title="Add an array of integer values.">ippAddIntegers</a></li>
514 <li><a href="#ippAddOctetString" title="Add an octetString value to an IPP message.">ippAddOctetString</a></li>
a2326b5b 515 <li><a href="#ippAddOutOfBand" title="Add an out-of-band value to an IPP message.">ippAddOutOfBand</a></li>
0268488e
MS
516 <li><a href="#ippAddRange" title="Add a range of values to an IPP message.">ippAddRange</a></li>
517 <li><a href="#ippAddRanges" title="Add ranges of values to an IPP message.">ippAddRanges</a></li>
518 <li><a href="#ippAddResolution" title="Add a resolution value to an IPP message.">ippAddResolution</a></li>
519 <li><a href="#ippAddResolutions" title="Add resolution values to an IPP message.">ippAddResolutions</a></li>
520 <li><a href="#ippAddSeparator" title="Add a group separator to an IPP message.">ippAddSeparator</a></li>
521 <li><a href="#ippAddString" title="Add a language-encoded string to an IPP message.">ippAddString</a></li>
a469f8a5
MS
522 <li><a href="#ippAddStringf" title="Add a formatted string to an IPP message.">ippAddStringf</a></li>
523 <li><a href="#ippAddStringfv" title="Add a formatted string to an IPP message.">ippAddStringfv</a></li>
0268488e 524 <li><a href="#ippAddStrings" title="Add language-encoded strings to an IPP message.">ippAddStrings</a></li>
a2326b5b 525 <li><a href="#ippAttributeString" title="Convert the attribute's value to a string.">ippAttributeString</a></li>
a469f8a5
MS
526 <li><a href="#ippContainsInteger" title="Determine whether an attribute contains the
527specified value or is within the list of ranges.">ippContainsInteger</a></li>
528 <li><a href="#ippContainsString" title="Determine whether an attribute contains the
529specified string value.">ippContainsString</a></li>
a2326b5b
MS
530 <li><a href="#ippCopyAttribute" title="Copy an attribute.">ippCopyAttribute</a></li>
531 <li><a href="#ippCopyAttributes" title="Copy attributes from one IPP message to another.">ippCopyAttributes</a></li>
0268488e 532 <li><a href="#ippDateToTime" title="Convert from RFC 1903 Date/Time format to UNIX time
5a738aea 533in seconds.">ippDateToTime</a></li>
0268488e
MS
534 <li><a href="#ippDelete" title="Delete an IPP message.">ippDelete</a></li>
535 <li><a href="#ippDeleteAttribute" title="Delete a single attribute in an IPP message.">ippDeleteAttribute</a></li>
a2326b5b
MS
536 <li><a href="#ippDeleteValues" title="Delete values in an attribute.">ippDeleteValues</a></li>
537 <li><a href="#ippEnumString" title="Return a string corresponding to the enum value.">ippEnumString</a></li>
538 <li><a href="#ippEnumValue" title="Return the value associated with a given enum string.">ippEnumValue</a></li>
0268488e
MS
539 <li><a href="#ippErrorString" title="Return a name for the given status code.">ippErrorString</a></li>
540 <li><a href="#ippErrorValue" title="Return a status code for the given name.">ippErrorValue</a></li>
3e7fe0ca
MS
541 <li><a href="#ippFindAttribute" title="Find a named attribute in a request.">ippFindAttribute</a></li>
542 <li><a href="#ippFindNextAttribute" title="Find the next named attribute in a request.">ippFindNextAttribute</a></li>
a2326b5b
MS
543 <li><a href="#ippFirstAttribute" title="Return the first attribute in the message.">ippFirstAttribute</a></li>
544 <li><a href="#ippGetBoolean" title="Get a boolean value for an attribute.">ippGetBoolean</a></li>
545 <li><a href="#ippGetCollection" title="Get a collection value for an attribute.">ippGetCollection</a></li>
546 <li><a href="#ippGetCount" title="Get the number of values in an attribute.">ippGetCount</a></li>
3e7fe0ca 547 <li><a href="#ippGetDate" title="Get a date value for an attribute.">ippGetDate</a></li>
a2326b5b
MS
548 <li><a href="#ippGetGroupTag" title="Get the group associated with an attribute.">ippGetGroupTag</a></li>
549 <li><a href="#ippGetInteger" title="Get the integer/enum value for an attribute.">ippGetInteger</a></li>
550 <li><a href="#ippGetName" title="Get the attribute name.">ippGetName</a></li>
551 <li><a href="#ippGetOperation" title="Get the operation ID in an IPP message.">ippGetOperation</a></li>
3e7fe0ca 552 <li><a href="#ippGetRange" title="Get a rangeOfInteger value from an attribute.">ippGetRange</a></li>
a2326b5b
MS
553 <li><a href="#ippGetRequestId" title="Get the request ID from an IPP message.">ippGetRequestId</a></li>
554 <li><a href="#ippGetResolution" title="Get a resolution value for an attribute.">ippGetResolution</a></li>
3e7fe0ca 555 <li><a href="#ippGetState" title="Get the IPP message state.">ippGetState</a></li>
a2326b5b
MS
556 <li><a href="#ippGetStatusCode" title="Get the status code from an IPP response or event message.">ippGetStatusCode</a></li>
557 <li><a href="#ippGetString" title="Return the value...">ippGetString</a></li>
558 <li><a href="#ippGetValueTag" title="Get the value tag for an attribute.">ippGetValueTag</a></li>
559 <li><a href="#ippGetVersion" title="Get the major and minor version number from an IPP message.">ippGetVersion</a></li>
0268488e
MS
560 <li><a href="#ippLength" title="Compute the length of an IPP message.">ippLength</a></li>
561 <li><a href="#ippNew" title="Allocate a new IPP message.">ippNew</a></li>
562 <li><a href="#ippNewRequest" title="Allocate a new IPP request message.">ippNewRequest</a></li>
a469f8a5 563 <li><a href="#ippNewResponse" title="Allocate a new IPP response message.">ippNewResponse</a></li>
a2326b5b 564 <li><a href="#ippNextAttribute" title="Return the next attribute in the message.">ippNextAttribute</a></li>
0268488e
MS
565 <li><a href="#ippOpString" title="Return a name for the given operation id.">ippOpString</a></li>
566 <li><a href="#ippOpValue" title="Return an operation id for the given name.">ippOpValue</a></li>
567 <li><a href="#ippPort" title="Return the default IPP port number.">ippPort</a></li>
568 <li><a href="#ippRead" title="Read data for an IPP message from a HTTP connection.">ippRead</a></li>
569 <li><a href="#ippReadFile" title="Read data for an IPP message from a file.">ippReadFile</a></li>
570 <li><a href="#ippReadIO" title="Read data for an IPP message.">ippReadIO</a></li>
a2326b5b
MS
571 <li><a href="#ippSetBoolean" title="Set a boolean value in an attribute.">ippSetBoolean</a></li>
572 <li><a href="#ippSetCollection" title="Set a collection value in an attribute.">ippSetCollection</a></li>
3e7fe0ca 573 <li><a href="#ippSetDate" title="Set a date value in an attribute.">ippSetDate</a></li>
a2326b5b
MS
574 <li><a href="#ippSetGroupTag" title="Set the group tag of an attribute.">ippSetGroupTag</a></li>
575 <li><a href="#ippSetInteger" title="Set an integer or enum value in an attribute.">ippSetInteger</a></li>
576 <li><a href="#ippSetName" title="Set the name of an attribute.">ippSetName</a></li>
577 <li><a href="#ippSetOperation" title="Set the operation ID in an IPP request message.">ippSetOperation</a></li>
0268488e 578 <li><a href="#ippSetPort" title="Set the default port number.">ippSetPort</a></li>
a2326b5b
MS
579 <li><a href="#ippSetRange" title="Set a rangeOfInteger value in an attribute.">ippSetRange</a></li>
580 <li><a href="#ippSetRequestId" title="Set the request ID in an IPP message.">ippSetRequestId</a></li>
581 <li><a href="#ippSetResolution" title="Set a resolution value in an attribute.">ippSetResolution</a></li>
3e7fe0ca 582 <li><a href="#ippSetState" title="Set the current state of the IPP message.">ippSetState</a></li>
a2326b5b
MS
583 <li><a href="#ippSetStatusCode" title="Set the status code in an IPP response or event message.">ippSetStatusCode</a></li>
584 <li><a href="#ippSetString" title="Set a string value in an attribute.">ippSetString</a></li>
a469f8a5
MS
585 <li><a href="#ippSetStringf" title="Set a formatted string value of an attribute.">ippSetStringf</a></li>
586 <li><a href="#ippSetStringfv" title="Set a formatted string value of an attribute.">ippSetStringfv</a></li>
a2326b5b
MS
587 <li><a href="#ippSetValueTag" title="Set the value tag of an attribute.">ippSetValueTag</a></li>
588 <li><a href="#ippSetVersion" title="Set the version number in an IPP message.">ippSetVersion</a></li>
0268488e
MS
589 <li><a href="#ippTagString" title="Return the tag name corresponding to a tag value.">ippTagString</a></li>
590 <li><a href="#ippTagValue" title="Return the tag value corresponding to a tag name.">ippTagValue</a></li>
591 <li><a href="#ippTimeToDate" title="Convert from UNIX time to RFC 1903 format.">ippTimeToDate</a></li>
592 <li><a href="#ippWrite" title="Write data for an IPP message to a HTTP connection.">ippWrite</a></li>
593 <li><a href="#ippWriteFile" title="Write data for an IPP message to a file.">ippWriteFile</a></li>
594 <li><a href="#ippWriteIO" title="Write data for an IPP message.">ippWriteIO</a></li>
8b450588 595</ul></li>
5a738aea 596<li><a href="#TYPES">Data Types</a><ul class="code">
eac3a0a0 597 <li><a href="#gss_auth_identity_desc" title="Local functions...">gss_auth_identity_desc</a></li>
f11a948a
MS
598 <li><a href="#http_addr_t" title="Socket address union, which
599makes using IPv6 and other
600address types easier and
601more portable. ">http_addr_t</a></li>
5a738aea
MS
602 <li><a href="#http_addrlist_t" title="Socket address list, which is
603used to enumerate all of the
604addresses that are associated
605with a hostname. ">http_addrlist_t</a></li>
606 <li><a href="#http_auth_t" title="HTTP authentication types">http_auth_t</a></li>
f228370c 607 <li><a href="#http_credential_t" title="HTTP credential data ">http_credential_t</a></li>
5a738aea
MS
608 <li><a href="#http_encoding_t" title="HTTP transfer encoding values">http_encoding_t</a></li>
609 <li><a href="#http_encryption_t" title="HTTP encryption values">http_encryption_t</a></li>
79e1d494 610 <li><a href="#http_field_t" title="HTTP field names">http_field_t</a></li>
f11a948a
MS
611 <li><a href="#http_keepalive_t" title="HTTP keep-alive values">http_keepalive_t</a></li>
612 <li><a href="#http_state_t" title="HTTP state values; states
613are server-oriented...">http_state_t</a></li>
5a738aea 614 <li><a href="#http_t" title="HTTP connection type">http_t</a></li>
f228370c 615 <li><a href="#http_timeout_cb_t" title="HTTP timeout callback ">http_timeout_cb_t</a></li>
f11a948a
MS
616 <li><a href="#http_uri_coding_t" title="URI en/decode flags">http_uri_coding_t</a></li>
617 <li><a href="#http_uri_status_t" title="URI separation status ">http_uri_status_t</a></li>
618 <li><a href="#http_version_t" title="HTTP version numbers">http_version_t</a></li>
a2326b5b 619 <li><a href="#ipp_attribute_t" title="IPP attribute">ipp_attribute_t</a></li>
f3c17241
MS
620 <li><a href="#ipp_copycb_t" title="The following structures are PRIVATE starting with CUPS 1.6/OS X 10.8.
621Please use the new accessor functions available in CUPS 1.6 and later, as
622these definitions will be moved to a private header file in a future release.">ipp_copycb_t</a></li>
a2326b5b 623 <li><a href="#ipp_dstate_t" title="Document states">ipp_dstate_t</a></li>
a469f8a5 624 <li><a href="#ipp_finish_t" title="Job collation types">ipp_finish_t</a></li>
5a738aea 625 <li><a href="#ipp_iocb_t" title="IPP IO Callback Function ">ipp_iocb_t</a></li>
a2326b5b 626 <li><a href="#ipp_jcollate_t" title="Job collation types">ipp_jcollate_t</a></li>
aaf19ab0
MS
627 <li><a href="#ipp_orient_t" title="Orientation values">ipp_orient_t</a></li>
628 <li><a href="#ipp_pstate_t" title="Printer states">ipp_pstate_t</a></li>
629 <li><a href="#ipp_quality_t" title="Qualities">ipp_quality_t</a></li>
aaf19ab0
MS
630 <li><a href="#ipp_res_t" title="Resolution units">ipp_res_t</a></li>
631 <li><a href="#ipp_state_t" title="IPP states">ipp_state_t</a></li>
a2326b5b
MS
632 <li><a href="#ipp_t" title="IPP request/response data">ipp_t</a></li>
633 <li><a href="#ipp_uchar_t" title="Unsigned 8-bit integer/character">ipp_uchar_t</a></li>
5a738aea
MS
634</ul></li>
635<li><a href="#STRUCTURES">Structures</a><ul class="code">
eac3a0a0 636 <li><a href="#gss_auth_identity" title="Local functions...">gss_auth_identity</a></li>
5a738aea
MS
637 <li><a href="#http_addrlist_s" title="Socket address list, which is
638used to enumerate all of the
639addresses that are associated
640with a hostname. ">http_addrlist_s</a></li>
f228370c 641 <li><a href="#http_credential_s" title="HTTP credential data ">http_credential_s</a></li>
f3c17241 642 <li><a href="#pollfd" title="User data (unused)">pollfd</a></li>
5a738aea
MS
643</ul></li>
644<li><a href="#ENUMERATIONS">Constants</a><ul class="code">
645 <li><a href="#http_auth_e" title="HTTP authentication types">http_auth_e</a></li>
646 <li><a href="#http_encoding_e" title="HTTP transfer encoding values">http_encoding_e</a></li>
647 <li><a href="#http_encryption_e" title="HTTP encryption values">http_encryption_e</a></li>
648 <li><a href="#http_field_e" title="HTTP field names">http_field_e</a></li>
f11a948a
MS
649 <li><a href="#http_keepalive_e" title="HTTP keep-alive values">http_keepalive_e</a></li>
650 <li><a href="#http_state_e" title="HTTP state values; states
651are server-oriented...">http_state_e</a></li>
5a738aea 652 <li><a href="#http_status_e" title="HTTP status codes">http_status_e</a></li>
f11a948a
MS
653 <li><a href="#http_uri_coding_e" title="URI en/decode flags">http_uri_coding_e</a></li>
654 <li><a href="#http_uri_status_e" title="URI separation status ">http_uri_status_e</a></li>
655 <li><a href="#http_version_e" title="HTTP version numbers">http_version_e</a></li>
a2326b5b 656 <li><a href="#ipp_dstate_e" title="Document states">ipp_dstate_e</a></li>
a469f8a5 657 <li><a href="#ipp_finishings_e" title="Finishings">ipp_finishings_e</a></li>
a2326b5b 658 <li><a href="#ipp_jcollate_e" title="Job collation types">ipp_jcollate_e</a></li>
aaf19ab0
MS
659 <li><a href="#ipp_jstate_e" title="Job states">ipp_jstate_e</a></li>
660 <li><a href="#ipp_op_e" title="IPP operations">ipp_op_e</a></li>
661 <li><a href="#ipp_orient_e" title="Orientation values">ipp_orient_e</a></li>
662 <li><a href="#ipp_pstate_e" title="Printer states">ipp_pstate_e</a></li>
663 <li><a href="#ipp_quality_e" title="Qualities">ipp_quality_e</a></li>
664 <li><a href="#ipp_res_e" title="Resolution units">ipp_res_e</a></li>
665 <li><a href="#ipp_state_e" title="IPP states">ipp_state_e</a></li>
666 <li><a href="#ipp_status_e" title="IPP status codes">ipp_status_e</a></li>
667 <li><a href="#ipp_tag_e" title="Format tags for attributes">ipp_tag_e</a></li>
5a738aea 668</ul></li>
0268488e 669</ul>
5a738aea 670<!--
68b10830 671 "$Id$"
ef416fc2 672
eac3a0a0 673 HTTP and IPP API introduction for CUPS.
ef416fc2 674
82cc1f9a 675 Copyright 2007-2012 by Apple Inc.
bc44d920 676 Copyright 1997-2006 by Easy Software Products, all rights reserved.
ef416fc2 677
678 These coded instructions, statements, and computer programs are the
bc44d920 679 property of Apple Inc. and are protected by Federal copyright
680 law. Distribution and use rights are outlined in the file "LICENSE.txt"
681 which should have been included with this file. If this file is
682 file is missing or damaged, see the license at "http://www.cups.org/".
ef416fc2 683-->
684
5a738aea
MS
685<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
686
687<p>The CUPS HTTP and IPP APIs provide low-level access to the HTTP and IPP
688protocols and CUPS scheduler. They are typically used by monitoring and
689administration programs to perform specific functions not supported by the
690high-level CUPS API functions.</p>
691
692<p>The HTTP APIs use an opaque structure called
693<a href='#http_t'><code>http_t</code></a> to manage connections to
694a particular HTTP or IPP server. The
695<a href='#httpConnectEncrypt'><code>httpConnectEncrypt</code></a> function is
696used to create an instance of this structure for a particular server.
697The constant <code>CUPS_HTTP_DEFAULT</code> can be used with all of the
698<code>cups</code> functions to refer to the default CUPS server - the functions
699create a per-thread <a href='#http_t'><code>http_t</code></a> as needed.</p>
700
82cc1f9a
MS
701<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>
702
703<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>
5a738aea
MS
704
705<pre class='example'>
706<a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_GET_JOBS);
707
82cc1f9a
MS
708<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
709 NULL, "ipp://localhost/printers/");
5a738aea
MS
710<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
711 NULL, cupsUser());
712</pre>
ef416fc2 713
82cc1f9a 714<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>
ef416fc2 715
5a738aea
MS
716<pre class='example'>
717#include &lt;cups/cups.h&gt;
ef416fc2 718
ef416fc2 719
5a738aea
MS
720<a href='#ipp_t'>ipp_t</a> *<a name='get_jobs'>get_jobs</a>(void)
721{
722 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_GET_JOBS);
ef416fc2 723
82cc1f9a
MS
724 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
725 NULL, "ipp://localhost/printers/");
5a738aea
MS
726 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
727 NULL, cupsUser());
728
729 return (<a href='#cupsDoRequest'>cupsDoRequest</a>(CUPS_HTTP_DEFAULT, request, "/"));
730}
ef416fc2 731</pre>
732
82cc1f9a 733<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>
ef416fc2 734
5a738aea
MS
735<pre class='example'>
736<a href='#ipp_t'>ipp_t</a> *response;
737<a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr;
bc44d920 738
5a738aea
MS
739attr = <a href='#ippFindAttribute'>ippFindAttribute</a>(response, "printer-state", IPP_TAG_ENUM);
740</pre>
741
82cc1f9a 742<p>You can also walk the list of attributes with a simple <code>for</code> loop like this:</p>
5a738aea
MS
743
744<pre class='example'>
745<a href='#ipp_t'>ipp_t</a> *response;
746<a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr;
747
82cc1f9a
MS
748for (attr = <a href='#ippFirstAttribute'>ippFirstAttribute</a>(response); attr != NULL; attr = <a href='#ippNextAttribute'>ippNextAttribute</a>(response))
749 if (ippGetName(attr) == NULL)
5a738aea
MS
750 puts("--SEPARATOR--");
751 else
82cc1f9a 752 puts(ippGetName(attr));
5a738aea
MS
753</pre>
754
82cc1f9a 755<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>
5a738aea
MS
756
757<pre class='example'>
758<a href='#ipp_t'>ipp_t</a> *response = <a href='#get_jobs'>get_jobs</a>();
759
760if (response != NULL)
761{
762 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr;
82cc1f9a 763 const char *attrname;
5a738aea 764 int job_id = 0;
82cc1f9a
MS
765 const char *job_name = NULL;
766 const char *job_originating_user_name = NULL;
5a738aea
MS
767
768 puts("Job ID Owner Title");
769 puts("------ ---------------- ---------------------------------");
770
82cc1f9a 771 for (attr = <a href='#ippFirstAttribute'>ippFirstAttribute</a>(response); attr != NULL; attr = <a href='#ippNextAttribute'>ippNextAttribute</a>(response))
5a738aea
MS
772 {
773 /* Attributes without names are separators between jobs */
82cc1f9a
MS
774 attrname = ippGetName(attr);
775 if (attrname == NULL)
5a738aea 776 {
82cc1f9a
MS
777 if (job_id > 0)
778 {
779 if (job_name == NULL)
780 job_name = "(withheld)";
781
782 if (job_originating_user_name == NULL)
783 job_originating_user_name = "(withheld)";
784
5a738aea 785 printf("%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
82cc1f9a 786 }
5a738aea
MS
787
788 job_id = 0;
789 job_name = NULL;
790 job_originating_user_name = NULL;
791 continue;
792 }
82cc1f9a
MS
793 else if (!strcmp(attrname, "job-id") &amp;&amp; ippGetValueTag(attr) == IPP_TAG_INTEGER)
794 job_id = ippGetInteger(attr, 0);
795 else if (!strcmp(attrname, "job-name") &amp;&amp; ippGetValueTag(attr) == IPP_TAG_NAME)
796 job_name = ippGetString(attr, 0, NULL);
797 else if (!strcmp(attrname, "job-originating-user-name") &amp;&amp;
798 ippGetValueTag(attr) == IPP_TAG_NAME)
799 job_originating_user_name = ippGetString(attr, 0, NULL);
5a738aea
MS
800 }
801
82cc1f9a
MS
802 if (job_id > 0)
803 {
804 if (job_name == NULL)
805 job_name = "(withheld)";
806
807 if (job_originating_user_name == NULL)
808 job_originating_user_name = "(withheld)";
809
5a738aea 810 printf("%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
82cc1f9a 811 }
5a738aea
MS
812}
813</pre>
814
815<h3><a name='CREATING_URI_STRINGS'>Creating URI Strings</a></h3>
816
817<p>To ensure proper encoding, the
818<a href='#httpAssembleURIf'><code>httpAssembleURIf</code></a> function must be
819used to format a "printer-uri" string for all printer-based requests:</p>
820
821<pre class='example'>
822const char *name = "Foo";
823char uri[1024];
824<a href='#ipp_t'>ipp_t</a> *request;
825
826<a href='#httpAssembleURIf'>httpAssembleURIf</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, cupsServer(),
827 ippPort(), "/printers/%s", name);
828<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
829</pre>
830
831<h3><a name='SENDING_REQUESTS_WITH_FILES'>Sending Requests with Files</a></h3>
832
833<p>The <a href='#cupsDoFileRequest'><code>cupsDoFileRequest</code></a> and
834<a href='#cupsDoIORequest'><code>cupsDoIORequest</code></a> functions are
835used for requests involving files. The
836<a href='#cupsDoFileRequest'><code>cupsDoFileRequest</code></a> function
837attaches the named file to a request and is typically used when sending a print
838file or changing a printer's PPD file:</p>
839
840<pre class='example'>
841const char *filename = "/usr/share/cups/data/testprint.ps";
842const char *name = "Foo";
843char uri[1024];
844char resource[1024];
845<a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_PRINT_JOB);
846<a href='#ipp_t'>ipp_t</a> *response;
847
848/* Use httpAssembleURIf for the printer-uri string */
849<a href='#httpAssembleURIf'>httpAssembleURIf</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, cupsServer(),
850 ippPort(), "/printers/%s", name);
851<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
852<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
853 NULL, cupsUser());
854<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name",
855 NULL, "testprint.ps");
856
857/* Use snprintf for the resource path */
858snprintf(resource, sizeof(resource), "/printers/%s", name);
859
860response = <a href='#cupsDoFileRequest'>cupsDoFileRequest</a>(CUPS_HTTP_DEFAULT, request, resource, filename);
861</pre>
862
863<p>The <a href='#cupsDoIORequest'><code>cupsDoIORequest</code></a> function
864optionally attaches a file to the request and optionally saves a file in the
865response from the server. It is used when using a pipe for the request
866attachment or when using a request that returns a file, currently only
867<code>CUPS_GET_DOCUMENT</code> and <code>CUPS_GET_PPD</code>. For example,
868the following code will download the PPD file for the sample HP LaserJet
869printer driver:</p>
870
871<pre class='example'>
872char tempfile[1024];
873int tempfd;
874<a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD);
875<a href='#ipp_t'>ipp_t</a> *response;
876
877<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
878 NULL, "laserjet.ppd");
879
880tempfd = cupsTempFd(tempfile, sizeof(tempfile));
881
882response = <a href='#cupsDoIORequest'>cupsDoIORequest</a>(CUPS_HTTP_DEFAULT, request, "/", -1, tempfd);
883</pre>
884
885<p>The example passes <code>-1</code> for the input file descriptor to specify
886that no file is to be attached to the request. The PPD file attached to the
887response is written to the temporary file descriptor we created using the
888<code>cupsTempFd</code> function.</p>
889
890<h3><a name='ASYNCHRONOUS_REQUEST_PROCESSING'>Asynchronous Request Processing</a></h3>
891
892<p>The <a href='#cupsSendRequest'><code>cupsSendRequest</code></a> and
893<a href='#cupsGetResponse'><code>cupsGetResponse</code></a> support
894asynchronous communications with the server. Unlike the other request
895functions, the IPP request is not automatically freed, so remember to
896free your request with the <a href='#ippDelete'><code>ippDelete</code></a>
897function.</p>
898
899<p>File data is attached to the request using the
900<a href='#cupsWriteRequestData'><code>cupsWriteRequestData</code></a>
901function, while file data returned from the server is read using the
902<a href='#cupsReadResponseData'><code>cupsReadResponseData</code></a>
903function. We can rewrite the previous <code>CUPS_GET_PPD</code> example
904to use the asynchronous functions quite easily:</p>
905
906<pre class='example'>
907char tempfile[1024];
908int tempfd;
909<a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD);
910<a href='#ipp_t'>ipp_t</a> *response;
911
912<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
913 NULL, "laserjet.ppd");
914
915tempfd = cupsTempFd(tempfile, sizeof(tempfile));
916
917if (<a href='#cupsSendRequest'>cupsSendRequest</a>(CUPS_HTTP_DEFAULT, request, "/") == HTTP_CONTINUE)
918{
919 response = <a href='#cupsGetResponse'>cupsGetResponse</a>(CUPS_HTTP_DEFAULT, "/");
920
921 if (response != NULL)
922 {
923 ssize_t bytes;
924 char buffer[8192];
925
926 while ((bytes = <a href='#cupsReadResponseData'>cupsReadResponseData</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer))) > 0)
927 write(tempfd, buffer, bytes);
928 }
929}
930
931/* Free the request! */
932<a href='#ippDelete'>ippDelete</a>(request);
933</pre>
934
935<p>The <a href='#cupsSendRequest'><code>cupsSendRequest</code></a> function
936returns the initial HTTP request status, typically either
937<code>HTTP_CONTINUE</code> or <code>HTTP_UNAUTHORIZED</code>. The latter status
938is returned when the request requires authentication of some sort. The
939<a href='#cupsDoAuthentication'><code>cupsDoAuthentication</code></a> function
940must be called when your see <code>HTTP_UNAUTHORIZED</code> and the request
941re-sent. We can add authentication support to our example code by using a
942<code>do ... while</code> loop:</p>
943
944<pre class='example'>
945char tempfile[1024];
946int tempfd;
947<a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD);
948<a href='#ipp_t'>ipp_t</a> *response;
949http_status_t status;
950
951<a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
952 NULL, "laserjet.ppd");
953
954tempfd = cupsTempFd(tempfile, sizeof(tempfile));
955
956/* Loop for authentication */
957do
958{
75bd9771 959 status = <a href='#cupsSendRequest'>cupsSendRequest</a>(CUPS_HTTP_DEFAULT, request, "/");
5a738aea
MS
960
961 if (status == HTTP_UNAUTHORIZED)
962 {
963 /* Try to authenticate, break out of the loop if that fails */
964 if (<a href='#cupsDoAuthentication'>cupsDoAuthentication</a>(CUPS_HTTP_DEFAULT, "POST", "/"))
965 break;
966 }
967}
968while (status != HTTP_CONTINUE &amp;&amp; status != HTTP_UNAUTHORIZED);
969
970if (status == HTTP_CONTINUE)
971{
972 response = <a href='#cupsGetResponse'>cupsGetResponse</a>(CUPS_HTTP_DEFAULT, "/");
973
974 if (response != NULL)
975 {
976 ssize_t bytes;
977 char buffer[8192];
978
979 while ((bytes = <a href='#cupsReadResponseData'>cupsReadResponseData</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer))) > 0)
980 write(tempfd, buffer, bytes);
981 }
982}
983
984/* Free the request! */
985<a href='#ippDelete'>ippDelete</a>(request);
986</pre>
987<h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
f3c17241 988<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/OS X 10.4&nbsp;</span><a name="cupsDoAuthentication">cupsDoAuthentication</a></h3>
5a738aea
MS
989<p class="description">Authenticate a request.</p>
990<p class="code">
991int cupsDoAuthentication (<br>
992&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
993&nbsp;&nbsp;&nbsp;&nbsp;const char *method,<br>
994&nbsp;&nbsp;&nbsp;&nbsp;const char *resource<br>
995);</p>
996<h4 class="parameters">Parameters</h4>
997<dl>
998<dt>http</dt>
568fa3fa 999<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
5a738aea
MS
1000<dt>method</dt>
1001<dd class="description">Request method (&quot;GET&quot;, &quot;POST&quot;, &quot;PUT&quot;)</dd>
1002<dt>resource</dt>
1003<dd class="description">Resource path</dd>
1004</dl>
1005<h4 class="returnvalue">Return Value</h4>
1006<p class="description">0 on success, -1 on error</p>
1007<h4 class="discussion">Discussion</h4>
1008<p class="discussion">This function should be called in response to a <code>HTTP_UNAUTHORIZED</code>
1009status, prior to resubmitting your request.
1010
1011</p>
1012<h3 class="function"><a name="cupsDoFileRequest">cupsDoFileRequest</a></h3>
1013<p class="description">Do an IPP request with a file.</p>
1014<p class="code">
1015<a href="#ipp_t">ipp_t</a> *cupsDoFileRequest (<br>
1016&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1017&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *request,<br>
1018&nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1019&nbsp;&nbsp;&nbsp;&nbsp;const char *filename<br>
1020);</p>
1021<h4 class="parameters">Parameters</h4>
1022<dl>
1023<dt>http</dt>
568fa3fa 1024<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
5a738aea
MS
1025<dt>request</dt>
1026<dd class="description">IPP request</dd>
1027<dt>resource</dt>
1028<dd class="description">HTTP resource for POST</dd>
1029<dt>filename</dt>
568fa3fa 1030<dd class="description">File to send or <code>NULL</code> for none</dd>
5a738aea
MS
1031</dl>
1032<h4 class="returnvalue">Return Value</h4>
1033<p class="description">Response data</p>
1034<h4 class="discussion">Discussion</h4>
5a9febac
MS
1035<p class="discussion">This function sends the IPP request and attached file to the specified
1036server, retrying and authenticating as necessary. The request is freed with
1037<a href="#ippDelete"><code>ippDelete</code></a>.</p>
f3c17241 1038<h3 class="function"><span class="info">&nbsp;CUPS 1.3/OS X 10.5&nbsp;</span><a name="cupsDoIORequest">cupsDoIORequest</a></h3>
5a738aea
MS
1039<p class="description">Do an IPP request with file descriptors.</p>
1040<p class="code">
1041<a href="#ipp_t">ipp_t</a> *cupsDoIORequest (<br>
1042&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1043&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *request,<br>
1044&nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1045&nbsp;&nbsp;&nbsp;&nbsp;int infile,<br>
1046&nbsp;&nbsp;&nbsp;&nbsp;int outfile<br>
1047);</p>
1048<h4 class="parameters">Parameters</h4>
1049<dl>
1050<dt>http</dt>
568fa3fa 1051<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
5a738aea
MS
1052<dt>request</dt>
1053<dd class="description">IPP request</dd>
1054<dt>resource</dt>
1055<dd class="description">HTTP resource for POST</dd>
1056<dt>infile</dt>
1057<dd class="description">File to read from or -1 for none</dd>
1058<dt>outfile</dt>
1059<dd class="description">File to write to or -1 for none</dd>
1060</dl>
1061<h4 class="returnvalue">Return Value</h4>
1062<p class="description">Response data</p>
1063<h4 class="discussion">Discussion</h4>
5a9febac
MS
1064<p class="discussion">This function sends the IPP request with the optional input file &quot;infile&quot; to
1065the specified server, retrying and authenticating as necessary. The request
1066is freed with <a href="#ippDelete"><code>ippDelete</code></a>.<br>
5a738aea 1067<br>
5a9febac 1068If &quot;infile&quot; is a valid file descriptor, <code>cupsDoIORequest</code> copies
5a738aea
MS
1069all of the data from the file after the IPP request message.<br>
1070<br>
5a9febac 1071If &quot;outfile&quot; is a valid file descriptor, <code>cupsDoIORequest</code> copies
bc44d920 1072all of the data after the IPP response message to the file.
1073
5a738aea
MS
1074</p>
1075<h3 class="function"><a name="cupsDoRequest">cupsDoRequest</a></h3>
1076<p class="description">Do an IPP request.</p>
1077<p class="code">
1078<a href="#ipp_t">ipp_t</a> *cupsDoRequest (<br>
1079&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1080&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *request,<br>
1081&nbsp;&nbsp;&nbsp;&nbsp;const char *resource<br>
1082);</p>
1083<h4 class="parameters">Parameters</h4>
1084<dl>
1085<dt>http</dt>
568fa3fa 1086<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
5a738aea
MS
1087<dt>request</dt>
1088<dd class="description">IPP request</dd>
1089<dt>resource</dt>
1090<dd class="description">HTTP resource for POST</dd>
1091</dl>
1092<h4 class="returnvalue">Return Value</h4>
1093<p class="description">Response data</p>
1094<h4 class="discussion">Discussion</h4>
1095<p class="discussion">This function sends the IPP request to the specified server, retrying
5a9febac 1096and authenticating as necessary. The request is freed with <a href="#ippDelete"><code>ippDelete</code></a>.</p>
5a738aea
MS
1097<h3 class="function"><a name="cupsEncodeOptions">cupsEncodeOptions</a></h3>
1098<p class="description">Encode printer options into IPP attributes.</p>
1099<p class="code">
1100void cupsEncodeOptions (<br>
1101&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
1102&nbsp;&nbsp;&nbsp;&nbsp;int num_options,<br>
1103&nbsp;&nbsp;&nbsp;&nbsp;cups_option_t *options<br>
1104);</p>
1105<h4 class="parameters">Parameters</h4>
1106<dl>
1107<dt>ipp</dt>
1108<dd class="description">Request to add to</dd>
1109<dt>num_options</dt>
1110<dd class="description">Number of options</dd>
1111<dt>options</dt>
1112<dd class="description">Options</dd>
1113</dl>
1114<h4 class="discussion">Discussion</h4>
1115<p class="discussion">This function adds operation, job, and then subscription attributes,
ecdc0628 1116in that order. Use the cupsEncodeOptions2() function to add attributes
5a738aea 1117for a single group.</p>
f3c17241 1118<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="cupsEncodeOptions2">cupsEncodeOptions2</a></h3>
5a738aea
MS
1119<p class="description">Encode printer options into IPP attributes for a group.</p>
1120<p class="code">
1121void cupsEncodeOptions2 (<br>
1122&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
1123&nbsp;&nbsp;&nbsp;&nbsp;int num_options,<br>
1124&nbsp;&nbsp;&nbsp;&nbsp;cups_option_t *options,<br>
a2326b5b 1125&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group_tag<br>
5a738aea
MS
1126);</p>
1127<h4 class="parameters">Parameters</h4>
1128<dl>
1129<dt>ipp</dt>
1130<dd class="description">Request to add to</dd>
1131<dt>num_options</dt>
1132<dd class="description">Number of options</dd>
1133<dt>options</dt>
1134<dd class="description">Options</dd>
1135<dt>group_tag</dt>
1136<dd class="description">Group to encode</dd>
1137</dl>
1138<h4 class="discussion">Discussion</h4>
1139<p class="discussion">This function only adds attributes for a single group. Call this
ecdc0628 1140function multiple times for each group, or use cupsEncodeOptions()
1141to add the standard groups.
ef416fc2 1142
ae71f5de 1143</p>
f3c17241 1144<h3 class="function"><span class="info">&nbsp;CUPS 1.4/OS X 10.6&nbsp;</span><a name="cupsGetDevices">cupsGetDevices</a></h3>
ae71f5de
MS
1145<p class="description">Get available printer devices.</p>
1146<p class="code">
1147ipp_status_t cupsGetDevices (<br>
1148&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1149&nbsp;&nbsp;&nbsp;&nbsp;int timeout,<br>
8b450588 1150&nbsp;&nbsp;&nbsp;&nbsp;const char *include_schemes,<br>
ae71f5de
MS
1151&nbsp;&nbsp;&nbsp;&nbsp;const char *exclude_schemes,<br>
1152&nbsp;&nbsp;&nbsp;&nbsp;cups_device_cb_t callback,<br>
1153&nbsp;&nbsp;&nbsp;&nbsp;void *user_data<br>
1154);</p>
1155<h4 class="parameters">Parameters</h4>
1156<dl>
1157<dt>http</dt>
1158<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1159<dt>timeout</dt>
1160<dd class="description">Timeout in seconds or <code>CUPS_TIMEOUT_DEFAULT</code></dd>
8b450588
MS
1161<dt>include_schemes</dt>
1162<dd class="description">Comma-separated URI schemes to include or <code>CUPS_INCLUDE_ALL</code></dd>
ae71f5de
MS
1163<dt>exclude_schemes</dt>
1164<dd class="description">Comma-separated URI schemes to exclude or <code>CUPS_EXCLUDE_NONE</code></dd>
1165<dt>callback</dt>
1166<dd class="description">Callback function</dd>
1167<dt>user_data</dt>
1168<dd class="description">User data pointer</dd>
1169</dl>
1170<h4 class="returnvalue">Return Value</h4>
1171<p class="description">Request status - <code>IPP_OK</code> on success.</p>
1172<h4 class="discussion">Discussion</h4>
1173<p class="discussion">This function sends a CUPS-Get-Devices request and streams the discovered
1174devices to the specified callback function. The &quot;timeout&quot; parameter controls
8b450588
MS
1175how long the request lasts, while the &quot;include_schemes&quot; and &quot;exclude_schemes&quot;
1176parameters provide comma-delimited lists of backends to include or omit from
1177the request respectively.
ae71f5de
MS
1178
1179</p>
f3c17241 1180<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/OS X 10.4&nbsp;</span><a name="cupsGetFd">cupsGetFd</a></h3>
ae71f5de
MS
1181<p class="description">Get a file from the server.</p>
1182<p class="code">
a469f8a5 1183http_status_t cupsGetFd (<br>
ae71f5de
MS
1184&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1185&nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1186&nbsp;&nbsp;&nbsp;&nbsp;int fd<br>
1187);</p>
1188<h4 class="parameters">Parameters</h4>
1189<dl>
1190<dt>http</dt>
1191<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1192<dt>resource</dt>
1193<dd class="description">Resource name</dd>
1194<dt>fd</dt>
1195<dd class="description">File descriptor</dd>
1196</dl>
1197<h4 class="returnvalue">Return Value</h4>
1198<p class="description">HTTP status</p>
1199<h4 class="discussion">Discussion</h4>
1200<p class="discussion">This function returns <code>HTTP_OK</code> when the file is successfully retrieved.
1201
1202</p>
f3c17241 1203<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/OS X 10.4&nbsp;</span><a name="cupsGetFile">cupsGetFile</a></h3>
ae71f5de
MS
1204<p class="description">Get a file from the server.</p>
1205<p class="code">
a469f8a5 1206http_status_t cupsGetFile (<br>
ae71f5de
MS
1207&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1208&nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1209&nbsp;&nbsp;&nbsp;&nbsp;const char *filename<br>
1210);</p>
1211<h4 class="parameters">Parameters</h4>
1212<dl>
1213<dt>http</dt>
1214<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1215<dt>resource</dt>
1216<dd class="description">Resource name</dd>
1217<dt>filename</dt>
1218<dd class="description">Filename</dd>
1219</dl>
1220<h4 class="returnvalue">Return Value</h4>
1221<p class="description">HTTP status</p>
1222<h4 class="discussion">Discussion</h4>
1223<p class="discussion">This function returns <code>HTTP_OK</code> when the file is successfully retrieved.
1224
5a738aea 1225</p>
f3c17241 1226<h3 class="function"><span class="info">&nbsp;CUPS 1.4/OS X 10.6&nbsp;</span><a name="cupsGetResponse">cupsGetResponse</a></h3>
5a738aea
MS
1227<p class="description">Get a response to an IPP request.</p>
1228<p class="code">
1229<a href="#ipp_t">ipp_t</a> *cupsGetResponse (<br>
1230&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1231&nbsp;&nbsp;&nbsp;&nbsp;const char *resource<br>
1232);</p>
1233<h4 class="parameters">Parameters</h4>
1234<dl>
1235<dt>http</dt>
568fa3fa 1236<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
5a738aea
MS
1237<dt>resource</dt>
1238<dd class="description">HTTP resource for POST</dd>
1239</dl>
1240<h4 class="returnvalue">Return Value</h4>
568fa3fa 1241<p class="description">Response or <code>NULL</code> on HTTP error</p>
5a738aea
MS
1242<h4 class="discussion">Discussion</h4>
1243<p class="discussion">Use this function to get the response for an IPP request sent using
5a9febac
MS
1244<a href="#cupsSendRequest"><code>cupsSendRequest</code></a>. For requests that return additional data, use
1245<a href="#cupsReadResponseData"><code>cupsReadResponseData</code></a> after getting a successful response,
1246otherwise call <a href="#httpFlush"><code>httpFlush</code></a> to complete the response processing.
5a738aea 1247
ae71f5de 1248</p>
10d09e33 1249<h3 class="function"><a name="cupsLastError">cupsLastError</a></h3>
5a9febac
MS
1250<p class="description">Return the last IPP status code received on the current
1251thread.</p>
10d09e33
MS
1252<p class="code">
1253ipp_status_t cupsLastError (void);</p>
1254<h4 class="returnvalue">Return Value</h4>
1255<p class="description">IPP status code from last request</p>
f3c17241 1256<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="cupsLastErrorString">cupsLastErrorString</a></h3>
5a9febac
MS
1257<p class="description">Return the last IPP status-message received on the
1258current thread.</p>
10d09e33
MS
1259<p class="code">
1260const char *cupsLastErrorString (void);</p>
1261<h4 class="returnvalue">Return Value</h4>
1262<p class="description">status-message text from last request</p>
f3c17241 1263<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/OS X 10.4&nbsp;</span><a name="cupsPutFd">cupsPutFd</a></h3>
ae71f5de
MS
1264<p class="description">Put a file on the server.</p>
1265<p class="code">
a469f8a5 1266http_status_t cupsPutFd (<br>
ae71f5de
MS
1267&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1268&nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1269&nbsp;&nbsp;&nbsp;&nbsp;int fd<br>
1270);</p>
1271<h4 class="parameters">Parameters</h4>
1272<dl>
1273<dt>http</dt>
1274<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1275<dt>resource</dt>
1276<dd class="description">Resource name</dd>
1277<dt>fd</dt>
1278<dd class="description">File descriptor</dd>
1279</dl>
1280<h4 class="returnvalue">Return Value</h4>
1281<p class="description">HTTP status</p>
1282<h4 class="discussion">Discussion</h4>
1283<p class="discussion">This function returns <code>HTTP_CREATED</code> when the file is stored
1284successfully.
1285
1286</p>
f3c17241 1287<h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/OS X 10.4&nbsp;</span><a name="cupsPutFile">cupsPutFile</a></h3>
ae71f5de
MS
1288<p class="description">Put a file on the server.</p>
1289<p class="code">
a469f8a5 1290http_status_t cupsPutFile (<br>
ae71f5de
MS
1291&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1292&nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1293&nbsp;&nbsp;&nbsp;&nbsp;const char *filename<br>
1294);</p>
1295<h4 class="parameters">Parameters</h4>
1296<dl>
1297<dt>http</dt>
1298<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1299<dt>resource</dt>
1300<dd class="description">Resource name</dd>
1301<dt>filename</dt>
1302<dd class="description">Filename</dd>
1303</dl>
1304<h4 class="returnvalue">Return Value</h4>
1305<p class="description">HTTP status</p>
1306<h4 class="discussion">Discussion</h4>
1307<p class="discussion">This function returns <code>HTTP_CREATED</code> when the file is stored
1308successfully.
1309
5a738aea 1310</p>
f3c17241 1311<h3 class="function"><span class="info">&nbsp;CUPS 1.4/OS X 10.6&nbsp;</span><a name="cupsReadResponseData">cupsReadResponseData</a></h3>
5a738aea
MS
1312<p class="description">Read additional data after the IPP response.</p>
1313<p class="code">
1314ssize_t cupsReadResponseData (<br>
1315&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1316&nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
1317&nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
1318);</p>
1319<h4 class="parameters">Parameters</h4>
1320<dl>
1321<dt>http</dt>
568fa3fa 1322<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
5a738aea
MS
1323<dt>buffer</dt>
1324<dd class="description">Buffer to use</dd>
1325<dt>length</dt>
1326<dd class="description">Number of bytes to read</dd>
1327</dl>
1328<h4 class="returnvalue">Return Value</h4>
1329<p class="description">Bytes read, 0 on EOF, -1 on error</p>
1330<h4 class="discussion">Discussion</h4>
5a9febac
MS
1331<p class="discussion">This function is used after <a href="#cupsGetResponse"><code>cupsGetResponse</code></a> to read the PPD or document
1332files from <code>CUPS_GET_PPD</code> and <code>CUPS_GET_DOCUMENT</code> requests,
1333respectively.
5a738aea
MS
1334
1335</p>
f3c17241 1336<h3 class="function"><span class="info">&nbsp;CUPS 1.4/OS X 10.6&nbsp;</span><a name="cupsSendRequest">cupsSendRequest</a></h3>
5a738aea
MS
1337<p class="description">Send an IPP request.</p>
1338<p class="code">
a469f8a5 1339http_status_t cupsSendRequest (<br>
5a738aea
MS
1340&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1341&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *request,<br>
1342&nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1343&nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
1344);</p>
1345<h4 class="parameters">Parameters</h4>
1346<dl>
1347<dt>http</dt>
568fa3fa 1348<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
5a738aea
MS
1349<dt>request</dt>
1350<dd class="description">IPP request</dd>
1351<dt>resource</dt>
1352<dd class="description">Resource path</dd>
1353<dt>length</dt>
ae71f5de 1354<dd class="description">Length of data to follow or <code>CUPS_LENGTH_VARIABLE</code></dd>
5a738aea
MS
1355</dl>
1356<h4 class="returnvalue">Return Value</h4>
1357<p class="description">Initial HTTP status</p>
1358<h4 class="discussion">Discussion</h4>
5a9febac
MS
1359<p class="discussion">Use <a href="#cupsWriteRequestData"><code>cupsWriteRequestData</code></a> to write any additional data (document, PPD
1360file, etc.) for the request, <a href="#cupsGetResponse"><code>cupsGetResponse</code></a> to get the IPP response,
1361and <a href="#cupsReadResponseData"><code>cupsReadResponseData</code></a> to read any additional data following the
1362response. Only one request can be sent/queued at a time per <code>http_t</code>
1363connection.<br>
1364<br>
1365Returns the initial HTTP status code, which will be <code>HTTP_CONTINUE</code>
1366on a successful send of the request.<br>
5a738aea 1367<br>
5a9febac
MS
1368Note: Unlike <a href="#cupsDoFileRequest"><code>cupsDoFileRequest</code></a>, <a href="#cupsDoIORequest"><code>cupsDoIORequest</code></a>, and
1369<a href="#cupsDoRequest"><code>cupsDoRequest</code></a>, the request is NOT freed with <a href="#ippDelete"><code>ippDelete</code></a>.
5a738aea
MS
1370
1371</p>
f3c17241 1372<h3 class="function"><span class="info">&nbsp;CUPS 1.4/OS X 10.6&nbsp;</span><a name="cupsWriteRequestData">cupsWriteRequestData</a></h3>
5a738aea
MS
1373<p class="description">Write additional data after an IPP request.</p>
1374<p class="code">
a469f8a5 1375http_status_t cupsWriteRequestData (<br>
5a738aea
MS
1376&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1377&nbsp;&nbsp;&nbsp;&nbsp;const char *buffer,<br>
1378&nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
1379);</p>
1380<h4 class="parameters">Parameters</h4>
1381<dl>
1382<dt>http</dt>
568fa3fa 1383<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
5a738aea
MS
1384<dt>buffer</dt>
1385<dd class="description">Bytes to write</dd>
1386<dt>length</dt>
1387<dd class="description">Number of bytes to write</dd>
1388</dl>
1389<h4 class="returnvalue">Return Value</h4>
568fa3fa 1390<p class="description"><code>HTTP_CONTINUE</code> if OK or HTTP status on error</p>
5a738aea 1391<h4 class="discussion">Discussion</h4>
568fa3fa
MS
1392<p class="discussion">This function is used after <a href="#cupsSendRequest"><code>cupsSendRequest</code></a> to provide a PPD and
1393after <a href="#cupsStartDocument"><code>cupsStartDocument</code></a> to provide a document file.
5a738aea 1394
10d09e33 1395</p>
a469f8a5
MS
1396<h3 class="function"><span class="info">&nbsp;CUPS 1.7&nbsp;</span><a name="httpAcceptConnection">httpAcceptConnection</a></h3>
1397<p class="description">Accept a new HTTP client connection from the
1398specified listening socket.</p>
1399<p class="code">
1400<a href="#http_t">http_t</a> *httpAcceptConnection (<br>
1401&nbsp;&nbsp;&nbsp;&nbsp;int fd,<br>
1402&nbsp;&nbsp;&nbsp;&nbsp;int blocking<br>
1403);</p>
1404<h4 class="parameters">Parameters</h4>
1405<dl>
1406<dt>fd</dt>
1407<dd class="description">Listen socket file descriptor</dd>
1408<dt>blocking</dt>
1409<dd class="description">1 if the connection should be
1410blocking, 0 otherwise</dd>
1411</dl>
1412<h4 class="returnvalue">Return Value</h4>
1413<p class="description">HTTP connection or <code>NULL</code></p>
f3c17241 1414<h3 class="function"><span class="info">&nbsp;CUPS 1.5/OS X 10.7&nbsp;</span><a name="httpAddCredential">httpAddCredential</a></h3>
10d09e33
MS
1415<p class="description">Allocates and adds a single credential to an array.</p>
1416<p class="code">
1417int httpAddCredential (<br>
1418&nbsp;&nbsp;&nbsp;&nbsp;cups_array_t *credentials,<br>
1419&nbsp;&nbsp;&nbsp;&nbsp;const void *data,<br>
1420&nbsp;&nbsp;&nbsp;&nbsp;size_t datalen<br>
1421);</p>
1422<h4 class="parameters">Parameters</h4>
1423<dl>
1424<dt>credentials</dt>
1425<dd class="description">Credentials array</dd>
1426<dt>data</dt>
1427<dd class="description">PEM-encoded X.509 data</dd>
1428<dt>datalen</dt>
1429<dd class="description">Length of data</dd>
1430</dl>
1431<h4 class="returnvalue">Return Value</h4>
1432<p class="description">0 on success, -1 on error</p>
1433<h4 class="discussion">Discussion</h4>
1434<p class="discussion">Use <code>cupsArrayNew(NULL, NULL)</code> to create a credentials array.
1435
5a738aea 1436</p>
f3c17241 1437<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpAddrAny">httpAddrAny</a></h3>
5a738aea
MS
1438<p class="description">Check for the &quot;any&quot; address.</p>
1439<p class="code">
1440int httpAddrAny (<br>
1441&nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr<br>
1442);</p>
1443<h4 class="parameters">Parameters</h4>
1444<dl>
1445<dt>addr</dt>
1446<dd class="description">Address to check</dd>
1447</dl>
1448<h4 class="returnvalue">Return Value</h4>
1449<p class="description">1 if &quot;any&quot;, 0 otherwise</p>
f3c17241 1450<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpAddrEqual">httpAddrEqual</a></h3>
5a738aea
MS
1451<p class="description">Compare two addresses.</p>
1452<p class="code">
1453int httpAddrEqual (<br>
1454&nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr1,<br>
1455&nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr2<br>
1456);</p>
1457<h4 class="parameters">Parameters</h4>
1458<dl>
1459<dt>addr1</dt>
1460<dd class="description">First address</dd>
1461<dt>addr2</dt>
1462<dd class="description">Second address</dd>
1463</dl>
1464<h4 class="returnvalue">Return Value</h4>
1465<p class="description">1 if equal, 0 if not</p>
f3c17241 1466<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpAddrLength">httpAddrLength</a></h3>
5a738aea
MS
1467<p class="description">Return the length of the address in bytes.</p>
1468<p class="code">
1469int httpAddrLength (<br>
1470&nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr<br>
1471);</p>
1472<h4 class="parameters">Parameters</h4>
1473<dl>
1474<dt>addr</dt>
1475<dd class="description">Address</dd>
1476</dl>
1477<h4 class="returnvalue">Return Value</h4>
1478<p class="description">Length in bytes</p>
a469f8a5
MS
1479<h3 class="function"><span class="info">&nbsp;CUPS 1.7&nbsp;</span><a name="httpAddrListen">httpAddrListen</a></h3>
1480<p class="description">Create a listening socket bound to the specified
1481address and port.</p>
1482<p class="code">
1483int httpAddrListen (<br>
1484&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_addr_t">http_addr_t</a> *addr,<br>
1485&nbsp;&nbsp;&nbsp;&nbsp;int port<br>
1486);</p>
1487<h4 class="parameters">Parameters</h4>
1488<dl>
1489<dt>addr</dt>
1490<dd class="description">Address to bind to</dd>
1491<dt>port</dt>
1492<dd class="description">Port number to bind to</dd>
1493</dl>
1494<h4 class="returnvalue">Return Value</h4>
1495<p class="description">Socket or -1 on error</p>
f3c17241 1496<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpAddrLocalhost">httpAddrLocalhost</a></h3>
5a738aea
MS
1497<p class="description">Check for the local loopback address.</p>
1498<p class="code">
1499int httpAddrLocalhost (<br>
1500&nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr<br>
1501);</p>
1502<h4 class="parameters">Parameters</h4>
1503<dl>
1504<dt>addr</dt>
1505<dd class="description">Address to check</dd>
1506</dl>
1507<h4 class="returnvalue">Return Value</h4>
1508<p class="description">1 if local host, 0 otherwise</p>
f3c17241 1509<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpAddrLookup">httpAddrLookup</a></h3>
5a738aea
MS
1510<p class="description">Lookup the hostname associated with the address.</p>
1511<p class="code">
1512char *httpAddrLookup (<br>
1513&nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr,<br>
1514&nbsp;&nbsp;&nbsp;&nbsp;char *name,<br>
1515&nbsp;&nbsp;&nbsp;&nbsp;int namelen<br>
1516);</p>
1517<h4 class="parameters">Parameters</h4>
1518<dl>
1519<dt>addr</dt>
1520<dd class="description">Address to lookup</dd>
1521<dt>name</dt>
1522<dd class="description">Host name buffer</dd>
1523<dt>namelen</dt>
1524<dd class="description">Size of name buffer</dd>
1525</dl>
1526<h4 class="returnvalue">Return Value</h4>
1527<p class="description">Host name</p>
a469f8a5
MS
1528<h3 class="function"><span class="info">&nbsp;CUPS 1.7&nbsp;</span><a name="httpAddrPort">httpAddrPort</a></h3>
1529<p class="description">Get the port number associated with an address.</p>
1530<p class="code">
1531int httpAddrPort (<br>
1532&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_addr_t">http_addr_t</a> *addr<br>
1533);</p>
1534<h4 class="parameters">Parameters</h4>
1535<dl>
1536<dt>addr</dt>
1537<dd class="description">Address</dd>
1538</dl>
1539<h4 class="returnvalue">Return Value</h4>
1540<p class="description">Port number</p>
f3c17241 1541<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpAddrString">httpAddrString</a></h3>
5a738aea
MS
1542<p class="description">Convert an address to a numeric string.</p>
1543<p class="code">
1544char *httpAddrString (<br>
1545&nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr,<br>
1546&nbsp;&nbsp;&nbsp;&nbsp;char *s,<br>
1547&nbsp;&nbsp;&nbsp;&nbsp;int slen<br>
1548);</p>
1549<h4 class="parameters">Parameters</h4>
1550<dl>
1551<dt>addr</dt>
1552<dd class="description">Address to convert</dd>
1553<dt>s</dt>
1554<dd class="description">String buffer</dd>
1555<dt>slen</dt>
1556<dd class="description">Length of string</dd>
1557</dl>
1558<h4 class="returnvalue">Return Value</h4>
1559<p class="description">Numeric address string</p>
f3c17241 1560<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpAssembleURI">httpAssembleURI</a></h3>
5a738aea
MS
1561<p class="description">Assemble a uniform resource identifier from its
1562components.</p>
1563<p class="code">
79e1d494
MS
1564<a href="#http_uri_status_t">http_uri_status_t</a> httpAssembleURI (<br>
1565&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_uri_coding_t">http_uri_coding_t</a> encoding,<br>
5a738aea
MS
1566&nbsp;&nbsp;&nbsp;&nbsp;char *uri,<br>
1567&nbsp;&nbsp;&nbsp;&nbsp;int urilen,<br>
1568&nbsp;&nbsp;&nbsp;&nbsp;const char *scheme,<br>
1569&nbsp;&nbsp;&nbsp;&nbsp;const char *username,<br>
1570&nbsp;&nbsp;&nbsp;&nbsp;const char *host,<br>
1571&nbsp;&nbsp;&nbsp;&nbsp;int port,<br>
1572&nbsp;&nbsp;&nbsp;&nbsp;const char *resource<br>
1573);</p>
1574<h4 class="parameters">Parameters</h4>
1575<dl>
1576<dt>encoding</dt>
1577<dd class="description">Encoding flags</dd>
1578<dt>uri</dt>
1579<dd class="description">URI buffer</dd>
1580<dt>urilen</dt>
1581<dd class="description">Size of URI buffer</dd>
1582<dt>scheme</dt>
1583<dd class="description">Scheme name</dd>
1584<dt>username</dt>
1585<dd class="description">Username</dd>
1586<dt>host</dt>
1587<dd class="description">Hostname or address</dd>
1588<dt>port</dt>
1589<dd class="description">Port number</dd>
1590<dt>resource</dt>
1591<dd class="description">Resource</dd>
1592</dl>
1593<h4 class="returnvalue">Return Value</h4>
1594<p class="description">URI status</p>
1595<h4 class="discussion">Discussion</h4>
1596<p class="discussion">This function escapes reserved characters in the URI depending on the
ecdc0628 1597value of the &quot;encoding&quot; argument. You should use this function in
1598place of traditional string functions whenever you need to create a
1599URI string.
ef416fc2 1600
5a738aea 1601</p>
f3c17241 1602<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpAssembleURIf">httpAssembleURIf</a></h3>
5a738aea
MS
1603<p class="description">Assemble a uniform resource identifier from its
1604components with a formatted resource.</p>
1605<p class="code">
79e1d494
MS
1606<a href="#http_uri_status_t">http_uri_status_t</a> httpAssembleURIf (<br>
1607&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_uri_coding_t">http_uri_coding_t</a> encoding,<br>
5a738aea
MS
1608&nbsp;&nbsp;&nbsp;&nbsp;char *uri,<br>
1609&nbsp;&nbsp;&nbsp;&nbsp;int urilen,<br>
1610&nbsp;&nbsp;&nbsp;&nbsp;const char *scheme,<br>
1611&nbsp;&nbsp;&nbsp;&nbsp;const char *username,<br>
1612&nbsp;&nbsp;&nbsp;&nbsp;const char *host,<br>
1613&nbsp;&nbsp;&nbsp;&nbsp;int port,<br>
1614&nbsp;&nbsp;&nbsp;&nbsp;const char *resourcef,<br>
1615&nbsp;&nbsp;&nbsp;&nbsp;...<br>
1616);</p>
1617<h4 class="parameters">Parameters</h4>
1618<dl>
1619<dt>encoding</dt>
1620<dd class="description">Encoding flags</dd>
1621<dt>uri</dt>
1622<dd class="description">URI buffer</dd>
1623<dt>urilen</dt>
1624<dd class="description">Size of URI buffer</dd>
1625<dt>scheme</dt>
1626<dd class="description">Scheme name</dd>
1627<dt>username</dt>
1628<dd class="description">Username</dd>
1629<dt>host</dt>
1630<dd class="description">Hostname or address</dd>
1631<dt>port</dt>
1632<dd class="description">Port number</dd>
1633<dt>resourcef</dt>
1634<dd class="description">Printf-style resource</dd>
1635<dt>...</dt>
1636<dd class="description">Additional arguments as needed</dd>
1637</dl>
1638<h4 class="returnvalue">Return Value</h4>
1639<p class="description">URI status</p>
1640<h4 class="discussion">Discussion</h4>
1641<p class="discussion">This function creates a formatted version of the resource string
ecdc0628 1642argument &quot;resourcef&quot; and escapes reserved characters in the URI
1643depending on the value of the &quot;encoding&quot; argument. You should use
1644this function in place of traditional string functions whenever
1645you need to create a URI string.
ef416fc2 1646
5a738aea
MS
1647</p>
1648<h3 class="function"><a name="httpBlocking">httpBlocking</a></h3>
1649<p class="description">Set blocking/non-blocking behavior on a connection.</p>
1650<p class="code">
1651void httpBlocking (<br>
1652&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1653&nbsp;&nbsp;&nbsp;&nbsp;int b<br>
1654);</p>
1655<h4 class="parameters">Parameters</h4>
1656<dl>
1657<dt>http</dt>
568fa3fa 1658<dd class="description">Connection to server</dd>
5a738aea
MS
1659<dt>b</dt>
1660<dd class="description">1 = blocking, 0 = non-blocking</dd>
1661</dl>
1662<h3 class="function"><a name="httpCheck">httpCheck</a></h3>
1663<p class="description">Check to see if there is a pending response from the server.</p>
1664<p class="code">
1665int httpCheck (<br>
1666&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1667);</p>
1668<h4 class="parameters">Parameters</h4>
1669<dl>
1670<dt>http</dt>
568fa3fa 1671<dd class="description">Connection to server</dd>
5a738aea
MS
1672</dl>
1673<h4 class="returnvalue">Return Value</h4>
1674<p class="description">0 = no data, 1 = data available</p>
f3c17241 1675<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="httpClearCookie">httpClearCookie</a></h3>
5a738aea
MS
1676<p class="description">Clear the cookie value(s).</p>
1677<p class="code">
1678void httpClearCookie (<br>
1679&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1680);</p>
1681<h4 class="parameters">Parameters</h4>
1682<dl>
1683<dt>http</dt>
568fa3fa 1684<dd class="description">Connection to server</dd>
5a738aea
MS
1685</dl>
1686<h3 class="function"><a name="httpClearFields">httpClearFields</a></h3>
1687<p class="description">Clear HTTP request fields.</p>
1688<p class="code">
1689void httpClearFields (<br>
1690&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1691);</p>
1692<h4 class="parameters">Parameters</h4>
1693<dl>
1694<dt>http</dt>
568fa3fa 1695<dd class="description">Connection to server</dd>
5a738aea
MS
1696</dl>
1697<h3 class="function"><a name="httpClose">httpClose</a></h3>
10d09e33 1698<p class="description">Close an HTTP connection.</p>
5a738aea
MS
1699<p class="code">
1700void httpClose (<br>
1701&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1702);</p>
1703<h4 class="parameters">Parameters</h4>
1704<dl>
1705<dt>http</dt>
568fa3fa 1706<dd class="description">Connection to server</dd>
5a738aea 1707</dl>
06d4e77b 1708<h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpConnect">httpConnect</a></h3>
5a738aea
MS
1709<p class="description">Connect to a HTTP server.</p>
1710<p class="code">
1711<a href="#http_t">http_t</a> *httpConnect (<br>
1712&nbsp;&nbsp;&nbsp;&nbsp;const char *host,<br>
1713&nbsp;&nbsp;&nbsp;&nbsp;int port<br>
1714);</p>
1715<h4 class="parameters">Parameters</h4>
1716<dl>
1717<dt>host</dt>
1718<dd class="description">Host to connect to</dd>
1719<dt>port</dt>
1720<dd class="description">Port number</dd>
1721</dl>
1722<h4 class="returnvalue">Return Value</h4>
1723<p class="description">New HTTP connection</p>
06d4e77b 1724<h4 class="discussion">Discussion</h4>
a469f8a5 1725<p class="discussion">This function is deprecated - use <a href="#httpConnect2"><code>httpConnect2</code></a> instead.
06d4e77b
MS
1726
1727</p>
a469f8a5
MS
1728<h3 class="function"><span class="info">&nbsp;CUPS 1.7&nbsp;</span><a name="httpConnect2">httpConnect2</a></h3>
1729<p class="description">Connect to a HTTP server.</p>
1730<p class="code">
1731<a href="#http_t">http_t</a> *httpConnect2 (<br>
1732&nbsp;&nbsp;&nbsp;&nbsp;const char *host,<br>
1733&nbsp;&nbsp;&nbsp;&nbsp;int port,<br>
1734&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_addrlist_t">http_addrlist_t</a> *addrlist,<br>
1735&nbsp;&nbsp;&nbsp;&nbsp;int family,<br>
1736&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_encryption_t">http_encryption_t</a> encryption,<br>
1737&nbsp;&nbsp;&nbsp;&nbsp;int blocking,<br>
1738&nbsp;&nbsp;&nbsp;&nbsp;int msec,<br>
1739&nbsp;&nbsp;&nbsp;&nbsp;int *cancel<br>
1740);</p>
1741<h4 class="parameters">Parameters</h4>
1742<dl>
1743<dt>host</dt>
1744<dd class="description">Host to connect to</dd>
1745<dt>port</dt>
1746<dd class="description">Port number</dd>
1747<dt>addrlist</dt>
1748<dd class="description">List of addresses or NULL to lookup</dd>
1749<dt>family</dt>
1750<dd class="description">Address family to use or <code>AF_UNSPEC</code> for any</dd>
1751<dt>encryption</dt>
1752<dd class="description">Type of encryption to use</dd>
1753<dt>blocking</dt>
1754<dd class="description">1 for blocking connection, 0 for non-blocking</dd>
1755<dt>msec</dt>
1756<dd class="description">Connection timeout in milliseconds</dd>
1757<dt>cancel</dt>
1758<dd class="description">Pointer to &quot;cancel&quot; variable</dd>
1759</dl>
1760<h4 class="returnvalue">Return Value</h4>
1761<p class="description">New HTTP connection</p>
1762<h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpConnectEncrypt">httpConnectEncrypt</a></h3>
5a738aea
MS
1763<p class="description">Connect to a HTTP server using encryption.</p>
1764<p class="code">
1765<a href="#http_t">http_t</a> *httpConnectEncrypt (<br>
1766&nbsp;&nbsp;&nbsp;&nbsp;const char *host,<br>
1767&nbsp;&nbsp;&nbsp;&nbsp;int port,<br>
1768&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_encryption_t">http_encryption_t</a> encryption<br>
1769);</p>
1770<h4 class="parameters">Parameters</h4>
1771<dl>
1772<dt>host</dt>
1773<dd class="description">Host to connect to</dd>
1774<dt>port</dt>
1775<dd class="description">Port number</dd>
1776<dt>encryption</dt>
1777<dd class="description">Type of encryption to use</dd>
1778</dl>
1779<h4 class="returnvalue">Return Value</h4>
1780<p class="description">New HTTP connection</p>
a469f8a5
MS
1781<h4 class="discussion">Discussion</h4>
1782<p class="discussion">This function is now deprecated. Please use the <a href="#httpConnect2"><code>httpConnect2</code></a> function
1783instead.
1784
1785</p>
f3c17241 1786<h3 class="function"><span class="info">&nbsp;CUPS 1.5/OS X 10.7&nbsp;</span><a name="httpCopyCredentials">httpCopyCredentials</a></h3>
10d09e33
MS
1787<p class="description">Copy the credentials associated with an encrypted
1788connection.</p>
1789<p class="code">
1790int httpCopyCredentials (<br>
1791&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1792&nbsp;&nbsp;&nbsp;&nbsp;cups_array_t **credentials<br>
1793);</p>
1794<h4 class="parameters">Parameters</h4>
1795<dl>
1796<dt>http</dt>
1797<dd class="description">Connection to server</dd>
1798<dt>credentials</dt>
1799<dd class="description">Array of credentials</dd>
1800</dl>
1801<h4 class="returnvalue">Return Value</h4>
1802<p class="description">Status of call (0 = success)</p>
5a738aea
MS
1803<h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpDecode64">httpDecode64</a></h3>
1804<p class="description">Base64-decode a string.</p>
1805<p class="code">
1806char *httpDecode64 (<br>
1807&nbsp;&nbsp;&nbsp;&nbsp;char *out,<br>
1808&nbsp;&nbsp;&nbsp;&nbsp;const char *in<br>
1809);</p>
1810<h4 class="parameters">Parameters</h4>
1811<dl>
1812<dt>out</dt>
1813<dd class="description">String to write to</dd>
1814<dt>in</dt>
1815<dd class="description">String to read from</dd>
1816</dl>
1817<h4 class="returnvalue">Return Value</h4>
1818<p class="description">Decoded string</p>
1819<h4 class="discussion">Discussion</h4>
1820<p class="discussion">This function is deprecated. Use the httpDecode64_2() function instead
ecdc0628 1821which provides buffer length arguments.
1822
5a738aea 1823</p>
f3c17241 1824<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21/OS X 10.4&nbsp;</span><a name="httpDecode64_2">httpDecode64_2</a></h3>
5a738aea
MS
1825<p class="description">Base64-decode a string.</p>
1826<p class="code">
1827char *httpDecode64_2 (<br>
1828&nbsp;&nbsp;&nbsp;&nbsp;char *out,<br>
1829&nbsp;&nbsp;&nbsp;&nbsp;int *outlen,<br>
1830&nbsp;&nbsp;&nbsp;&nbsp;const char *in<br>
1831);</p>
1832<h4 class="parameters">Parameters</h4>
1833<dl>
1834<dt>out</dt>
1835<dd class="description">String to write to</dd>
1836<dt>outlen</dt>
1837<dd class="description">Size of output string</dd>
1838<dt>in</dt>
1839<dd class="description">String to read from</dd>
1840</dl>
1841<h4 class="returnvalue">Return Value</h4>
1842<p class="description">Decoded string</p>
1843<h3 class="function"><a name="httpDelete">httpDelete</a></h3>
1844<p class="description">Send a DELETE request to the server.</p>
1845<p class="code">
1846int httpDelete (<br>
1847&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1848&nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
1849);</p>
1850<h4 class="parameters">Parameters</h4>
1851<dl>
1852<dt>http</dt>
568fa3fa 1853<dd class="description">Connection to server</dd>
5a738aea
MS
1854<dt>uri</dt>
1855<dd class="description">URI to delete</dd>
1856</dl>
1857<h4 class="returnvalue">Return Value</h4>
1858<p class="description">Status of call (0 = success)</p>
1859<h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpEncode64">httpEncode64</a></h3>
1860<p class="description">Base64-encode a string.</p>
1861<p class="code">
1862char *httpEncode64 (<br>
1863&nbsp;&nbsp;&nbsp;&nbsp;char *out,<br>
1864&nbsp;&nbsp;&nbsp;&nbsp;const char *in<br>
1865);</p>
1866<h4 class="parameters">Parameters</h4>
1867<dl>
1868<dt>out</dt>
1869<dd class="description">String to write to</dd>
1870<dt>in</dt>
1871<dd class="description">String to read from</dd>
1872</dl>
1873<h4 class="returnvalue">Return Value</h4>
1874<p class="description">Encoded string</p>
1875<h4 class="discussion">Discussion</h4>
1876<p class="discussion">This function is deprecated. Use the httpEncode64_2() function instead
ecdc0628 1877which provides buffer length arguments.
1878
5a738aea 1879</p>
f3c17241 1880<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21/OS X 10.4&nbsp;</span><a name="httpEncode64_2">httpEncode64_2</a></h3>
5a738aea
MS
1881<p class="description">Base64-encode a string.</p>
1882<p class="code">
1883char *httpEncode64_2 (<br>
1884&nbsp;&nbsp;&nbsp;&nbsp;char *out,<br>
1885&nbsp;&nbsp;&nbsp;&nbsp;int outlen,<br>
1886&nbsp;&nbsp;&nbsp;&nbsp;const char *in,<br>
1887&nbsp;&nbsp;&nbsp;&nbsp;int inlen<br>
1888);</p>
1889<h4 class="parameters">Parameters</h4>
1890<dl>
1891<dt>out</dt>
1892<dd class="description">String to write to</dd>
1893<dt>outlen</dt>
1894<dd class="description">Size of output string</dd>
1895<dt>in</dt>
1896<dd class="description">String to read from</dd>
1897<dt>inlen</dt>
1898<dd class="description">Size of input string</dd>
1899</dl>
1900<h4 class="returnvalue">Return Value</h4>
1901<p class="description">Encoded string</p>
1902<h3 class="function"><a name="httpEncryption">httpEncryption</a></h3>
1903<p class="description">Set the required encryption on the link.</p>
1904<p class="code">
1905int httpEncryption (<br>
1906&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1907&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_encryption_t">http_encryption_t</a> e<br>
1908);</p>
1909<h4 class="parameters">Parameters</h4>
1910<dl>
1911<dt>http</dt>
568fa3fa 1912<dd class="description">Connection to server</dd>
5a738aea
MS
1913<dt>e</dt>
1914<dd class="description">New encryption preference</dd>
1915</dl>
1916<h4 class="returnvalue">Return Value</h4>
1917<p class="description">-1 on error, 0 on success</p>
1918<h3 class="function"><a name="httpError">httpError</a></h3>
1919<p class="description">Get the last error on a connection.</p>
1920<p class="code">
1921int httpError (<br>
1922&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1923);</p>
1924<h4 class="parameters">Parameters</h4>
1925<dl>
1926<dt>http</dt>
568fa3fa 1927<dd class="description">Connection to server</dd>
5a738aea
MS
1928</dl>
1929<h4 class="returnvalue">Return Value</h4>
1930<p class="description">Error code (errno) value</p>
1931<h3 class="function"><a name="httpFlush">httpFlush</a></h3>
1932<p class="description">Flush data from a HTTP connection.</p>
1933<p class="code">
1934void httpFlush (<br>
1935&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1936);</p>
1937<h4 class="parameters">Parameters</h4>
1938<dl>
1939<dt>http</dt>
568fa3fa 1940<dd class="description">Connection to server</dd>
5a738aea 1941</dl>
f3c17241 1942<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpFlushWrite">httpFlushWrite</a></h3>
5a738aea
MS
1943<p class="description">Flush data in write buffer.</p>
1944<p class="code">
1945int httpFlushWrite (<br>
1946&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1947);</p>
1948<h4 class="parameters">Parameters</h4>
1949<dl>
1950<dt>http</dt>
568fa3fa 1951<dd class="description">Connection to server</dd>
5a738aea
MS
1952</dl>
1953<h4 class="returnvalue">Return Value</h4>
1954<p class="description">Bytes written or -1 on error</p>
10d09e33
MS
1955<h3 class="function"><a name="httpFreeCredentials">httpFreeCredentials</a></h3>
1956<p class="description">Free an array of credentials.</p>
1957<p class="code">
1958void httpFreeCredentials (<br>
1959&nbsp;&nbsp;&nbsp;&nbsp;cups_array_t *credentials<br>
1960);</p>
1961<h4 class="parameters">Parameters</h4>
1962<dl>
1963<dt>credentials</dt>
1964<dd class="description">Array of credentials</dd>
1965</dl>
5a738aea
MS
1966<h3 class="function"><a name="httpGet">httpGet</a></h3>
1967<p class="description">Send a GET request to the server.</p>
1968<p class="code">
1969int httpGet (<br>
1970&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1971&nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
1972);</p>
1973<h4 class="parameters">Parameters</h4>
1974<dl>
1975<dt>http</dt>
568fa3fa 1976<dd class="description">Connection to server</dd>
5a738aea
MS
1977<dt>uri</dt>
1978<dd class="description">URI to get</dd>
1979</dl>
1980<h4 class="returnvalue">Return Value</h4>
1981<p class="description">Status of call (0 = success)</p>
f3c17241 1982<h3 class="function"><span class="info">&nbsp;CUPS 1.3/OS X 10.5&nbsp;</span><a name="httpGetAuthString">httpGetAuthString</a></h3>
5a738aea
MS
1983<p class="description">Get the current authorization string.</p>
1984<p class="code">
1985char *httpGetAuthString (<br>
1986&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1987);</p>
1988<h4 class="parameters">Parameters</h4>
1989<dl>
1990<dt>http</dt>
568fa3fa 1991<dd class="description">Connection to server</dd>
5a738aea
MS
1992</dl>
1993<h4 class="returnvalue">Return Value</h4>
1994<p class="description">Authorization string</p>
1995<h4 class="discussion">Discussion</h4>
1996<p class="discussion">The authorization string is set by cupsDoAuthentication() and
355e94dc
MS
1997httpSetAuthString(). Use httpGetAuthString() to retrieve the
1998string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
1999value.
2000
5a738aea 2001</p>
f3c17241 2002<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpGetBlocking">httpGetBlocking</a></h3>
5a738aea
MS
2003<p class="description">Get the blocking/non-block state of a connection.</p>
2004<p class="code">
2005int httpGetBlocking (<br>
2006&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2007);</p>
2008<h4 class="parameters">Parameters</h4>
2009<dl>
2010<dt>http</dt>
568fa3fa 2011<dd class="description">Connection to server</dd>
5a738aea
MS
2012</dl>
2013<h4 class="returnvalue">Return Value</h4>
2014<p class="description">1 if blocking, 0 if non-blocking</p>
a469f8a5
MS
2015<h3 class="function"><span class="info">&nbsp;CUPS 1.7&nbsp;</span><a name="httpGetContentEncoding">httpGetContentEncoding</a></h3>
2016<p class="description">Get a common content encoding, if any, between
2017the client and server.</p>
2018<p class="code">
2019const char *httpGetContentEncoding (<br>
2020&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2021);</p>
2022<h4 class="parameters">Parameters</h4>
2023<dl>
2024<dt>http</dt>
2025<dd class="description">Connection to client/server</dd>
2026</dl>
2027<h4 class="returnvalue">Return Value</h4>
2028<p class="description">Content-Coding value or
2029<code>NULL</code> for the identity
2030coding.</p>
2031<h4 class="discussion">Discussion</h4>
2032<p class="discussion">This function uses the value of the Accepts-Encoding HTTP header and must be
2033called after receiving a response from the server or a request from the
2034client. The value returned can be use in subsequent requests (for clients)
2035or in the response (for servers) in order to compress the content stream.
2036
2037</p>
f3c17241 2038<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="httpGetCookie">httpGetCookie</a></h3>
5a738aea
MS
2039<p class="description">Get any cookie data from the response.</p>
2040<p class="code">
2041const char *httpGetCookie (<br>
2042&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2043);</p>
2044<h4 class="parameters">Parameters</h4>
2045<dl>
2046<dt>http</dt>
2047<dd class="description">HTTP connecion</dd>
2048</dl>
2049<h4 class="returnvalue">Return Value</h4>
2050<p class="description">Cookie data or NULL</p>
2051<h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpGetDateString">httpGetDateString</a></h3>
2052<p class="description">Get a formatted date/time string from a time value.</p>
2053<p class="code">
2054const char *httpGetDateString (<br>
2055&nbsp;&nbsp;&nbsp;&nbsp;time_t t<br>
2056);</p>
2057<h4 class="parameters">Parameters</h4>
2058<dl>
2059<dt>t</dt>
2060<dd class="description">UNIX time</dd>
2061</dl>
2062<h4 class="returnvalue">Return Value</h4>
2063<p class="description">Date/time string</p>
f3c17241 2064<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpGetDateString2">httpGetDateString2</a></h3>
5a738aea
MS
2065<p class="description">Get a formatted date/time string from a time value.</p>
2066<p class="code">
2067const char *httpGetDateString2 (<br>
2068&nbsp;&nbsp;&nbsp;&nbsp;time_t t,<br>
2069&nbsp;&nbsp;&nbsp;&nbsp;char *s,<br>
2070&nbsp;&nbsp;&nbsp;&nbsp;int slen<br>
2071);</p>
2072<h4 class="parameters">Parameters</h4>
2073<dl>
2074<dt>t</dt>
2075<dd class="description">UNIX time</dd>
2076<dt>s</dt>
2077<dd class="description">String buffer</dd>
2078<dt>slen</dt>
2079<dd class="description">Size of string buffer</dd>
2080</dl>
2081<h4 class="returnvalue">Return Value</h4>
2082<p class="description">Date/time string</p>
2083<h3 class="function"><a name="httpGetDateTime">httpGetDateTime</a></h3>
2084<p class="description">Get a time value from a formatted date/time string.</p>
2085<p class="code">
2086time_t httpGetDateTime (<br>
2087&nbsp;&nbsp;&nbsp;&nbsp;const char *s<br>
2088);</p>
2089<h4 class="parameters">Parameters</h4>
2090<dl>
2091<dt>s</dt>
2092<dd class="description">Date/time string</dd>
2093</dl>
2094<h4 class="returnvalue">Return Value</h4>
2095<p class="description">UNIX time</p>
a469f8a5
MS
2096<h3 class="function"><span class="info">&nbsp;CUPS 1.7&nbsp;</span><a name="httpGetExpect">httpGetExpect</a></h3>
2097<p class="description">Get the value of the Expect header, if any.</p>
2098<p class="code">
2099http_status_t httpGetExpect (<br>
2100&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2101);</p>
2102<h4 class="parameters">Parameters</h4>
2103<dl>
2104<dt>http</dt>
2105<dd class="description">Connection to client</dd>
2106</dl>
2107<h4 class="returnvalue">Return Value</h4>
2108<p class="description">Expect: status, if any</p>
2109<h4 class="discussion">Discussion</h4>
2110<p class="discussion">Returns <code>HTTP_STATUS_NONE</code> if there is no Expect header, otherwise
2111returns the expected HTTP status code, typically <code>HTTP_STATUS_CONTINUE</code>.
2112
2113</p>
f3c17241 2114<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpGetFd">httpGetFd</a></h3>
5a738aea
MS
2115<p class="description">Get the file descriptor associated with a connection.</p>
2116<p class="code">
2117int httpGetFd (<br>
2118&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2119);</p>
2120<h4 class="parameters">Parameters</h4>
2121<dl>
2122<dt>http</dt>
568fa3fa 2123<dd class="description">Connection to server</dd>
5a738aea
MS
2124</dl>
2125<h4 class="returnvalue">Return Value</h4>
2126<p class="description">File descriptor or -1 if none</p>
2127<h3 class="function"><a name="httpGetField">httpGetField</a></h3>
2128<p class="description">Get a field value from a request/response.</p>
2129<p class="code">
2130const char *httpGetField (<br>
2131&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
79e1d494 2132&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_field_t">http_field_t</a> field<br>
5a738aea
MS
2133);</p>
2134<h4 class="parameters">Parameters</h4>
2135<dl>
2136<dt>http</dt>
568fa3fa 2137<dd class="description">Connection to server</dd>
5a738aea
MS
2138<dt>field</dt>
2139<dd class="description">Field to get</dd>
2140</dl>
2141<h4 class="returnvalue">Return Value</h4>
2142<p class="description">Field value</p>
2143<h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpGetHostByName">httpGetHostByName</a></h3>
2144<p class="description">Lookup a hostname or IPv4 address, and return
2145address records for the specified name.</p>
2146<p class="code">
2147struct hostent *httpGetHostByName (<br>
2148&nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
2149);</p>
2150<h4 class="parameters">Parameters</h4>
2151<dl>
2152<dt>name</dt>
2153<dd class="description">Hostname or IP address</dd>
2154</dl>
2155<h4 class="returnvalue">Return Value</h4>
2156<p class="description">Host entry</p>
f3c17241 2157<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpGetHostname">httpGetHostname</a></h3>
5a738aea
MS
2158<p class="description">Get the FQDN for the connection or local system.</p>
2159<p class="code">
2160const char *httpGetHostname (<br>
2161&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2162&nbsp;&nbsp;&nbsp;&nbsp;char *s,<br>
2163&nbsp;&nbsp;&nbsp;&nbsp;int slen<br>
2164);</p>
2165<h4 class="parameters">Parameters</h4>
2166<dl>
2167<dt>http</dt>
2168<dd class="description">HTTP connection or NULL</dd>
2169<dt>s</dt>
2170<dd class="description">String buffer for name</dd>
2171<dt>slen</dt>
2172<dd class="description">Size of buffer</dd>
2173</dl>
2174<h4 class="returnvalue">Return Value</h4>
2175<p class="description">FQDN for connection or system</p>
2176<h4 class="discussion">Discussion</h4>
2177<p class="discussion">When &quot;http&quot; points to a connected socket, return the hostname or
80ca4592 2178address that was used in the call to httpConnect() or httpConnectEncrypt().
2179Otherwise, return the FQDN for the local system using both gethostname()
2180and gethostbyname() to get the local hostname with domain.
ef416fc2 2181
5a738aea
MS
2182</p>
2183<h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpGetLength">httpGetLength</a></h3>
2184<p class="description">Get the amount of data remaining from the
2185content-length or transfer-encoding fields.</p>
2186<p class="code">
2187int httpGetLength (<br>
2188&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2189);</p>
2190<h4 class="parameters">Parameters</h4>
2191<dl>
2192<dt>http</dt>
568fa3fa 2193<dd class="description">Connection to server</dd>
5a738aea
MS
2194</dl>
2195<h4 class="returnvalue">Return Value</h4>
2196<p class="description">Content length</p>
2197<h4 class="discussion">Discussion</h4>
2198<p class="discussion">This function is deprecated and will not return lengths larger than
ef416fc2 21992^31 - 1; use httpGetLength2() instead.
2200
5a738aea 2201</p>
f3c17241 2202<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpGetLength2">httpGetLength2</a></h3>
5a738aea
MS
2203<p class="description">Get the amount of data remaining from the
2204content-length or transfer-encoding fields.</p>
2205<p class="code">
2206off_t httpGetLength2 (<br>
2207&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2208);</p>
2209<h4 class="parameters">Parameters</h4>
2210<dl>
2211<dt>http</dt>
568fa3fa 2212<dd class="description">Connection to server</dd>
5a738aea
MS
2213</dl>
2214<h4 class="returnvalue">Return Value</h4>
2215<p class="description">Content length</p>
2216<h4 class="discussion">Discussion</h4>
2217<p class="discussion">This function returns the complete content length, even for
ecdc0628 2218content larger than 2^31 - 1.
2219
5a738aea 2220</p>
a2326b5b
MS
2221<h3 class="function"><a name="httpGetState">httpGetState</a></h3>
2222<p class="description">Get the current state of the HTTP request.</p>
2223<p class="code">
2224<a href="#http_state_t">http_state_t</a> httpGetState (<br>
2225&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2226);</p>
2227<h4 class="parameters">Parameters</h4>
2228<dl>
2229<dt>http</dt>
2230<dd class="description">Connection to server</dd>
2231</dl>
2232<h4 class="returnvalue">Return Value</h4>
2233<p class="description">HTTP state</p>
f3c17241 2234<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpGetStatus">httpGetStatus</a></h3>
5a738aea
MS
2235<p class="description">Get the status of the last HTTP request.</p>
2236<p class="code">
a469f8a5 2237http_status_t httpGetStatus (<br>
5a738aea
MS
2238&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2239);</p>
2240<h4 class="parameters">Parameters</h4>
2241<dl>
2242<dt>http</dt>
568fa3fa 2243<dd class="description">Connection to server</dd>
5a738aea
MS
2244</dl>
2245<h4 class="returnvalue">Return Value</h4>
2246<p class="description">HTTP status</p>
2247<h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpGetSubField">httpGetSubField</a></h3>
2248<p class="description">Get a sub-field value.</p>
2249<p class="code">
2250char *httpGetSubField (<br>
2251&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
79e1d494 2252&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_field_t">http_field_t</a> field,<br>
5a738aea
MS
2253&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2254&nbsp;&nbsp;&nbsp;&nbsp;char *value<br>
2255);</p>
2256<h4 class="parameters">Parameters</h4>
2257<dl>
2258<dt>http</dt>
568fa3fa 2259<dd class="description">Connection to server</dd>
5a738aea
MS
2260<dt>field</dt>
2261<dd class="description">Field index</dd>
2262<dt>name</dt>
2263<dd class="description">Name of sub-field</dd>
2264<dt>value</dt>
2265<dd class="description">Value string</dd>
2266</dl>
2267<h4 class="returnvalue">Return Value</h4>
2268<p class="description">Value or NULL</p>
f3c17241 2269<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpGetSubField2">httpGetSubField2</a></h3>
5a738aea
MS
2270<p class="description">Get a sub-field value.</p>
2271<p class="code">
2272char *httpGetSubField2 (<br>
2273&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
79e1d494 2274&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_field_t">http_field_t</a> field,<br>
5a738aea
MS
2275&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2276&nbsp;&nbsp;&nbsp;&nbsp;char *value,<br>
2277&nbsp;&nbsp;&nbsp;&nbsp;int valuelen<br>
2278);</p>
2279<h4 class="parameters">Parameters</h4>
2280<dl>
2281<dt>http</dt>
568fa3fa 2282<dd class="description">Connection to server</dd>
5a738aea
MS
2283<dt>field</dt>
2284<dd class="description">Field index</dd>
2285<dt>name</dt>
2286<dd class="description">Name of sub-field</dd>
2287<dt>value</dt>
2288<dd class="description">Value string</dd>
2289<dt>valuelen</dt>
2290<dd class="description">Size of value buffer</dd>
2291</dl>
2292<h4 class="returnvalue">Return Value</h4>
2293<p class="description">Value or NULL</p>
a2326b5b
MS
2294<h3 class="function"><a name="httpGetVersion">httpGetVersion</a></h3>
2295<p class="description">Get the HTTP version at the other end.</p>
2296<p class="code">
2297<a href="#http_version_t">http_version_t</a> httpGetVersion (<br>
2298&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2299);</p>
2300<h4 class="parameters">Parameters</h4>
2301<dl>
2302<dt>http</dt>
2303<dd class="description">Connection to server</dd>
2304</dl>
2305<h4 class="returnvalue">Return Value</h4>
2306<p class="description">Version number</p>
5a738aea
MS
2307<h3 class="function"><a name="httpGets">httpGets</a></h3>
2308<p class="description">Get a line of text from a HTTP connection.</p>
2309<p class="code">
2310char *httpGets (<br>
2311&nbsp;&nbsp;&nbsp;&nbsp;char *line,<br>
2312&nbsp;&nbsp;&nbsp;&nbsp;int length,<br>
2313&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2314);</p>
2315<h4 class="parameters">Parameters</h4>
2316<dl>
2317<dt>line</dt>
2318<dd class="description">Line to read into</dd>
2319<dt>length</dt>
2320<dd class="description">Max length of buffer</dd>
2321<dt>http</dt>
568fa3fa 2322<dd class="description">Connection to server</dd>
5a738aea
MS
2323</dl>
2324<h4 class="returnvalue">Return Value</h4>
2325<p class="description">Line or NULL</p>
2326<h3 class="function"><a name="httpHead">httpHead</a></h3>
2327<p class="description">Send a HEAD request to the server.</p>
2328<p class="code">
2329int httpHead (<br>
2330&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2331&nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
2332);</p>
2333<h4 class="parameters">Parameters</h4>
2334<dl>
2335<dt>http</dt>
568fa3fa 2336<dd class="description">Connection to server</dd>
5a738aea
MS
2337<dt>uri</dt>
2338<dd class="description">URI for head</dd>
2339</dl>
2340<h4 class="returnvalue">Return Value</h4>
2341<p class="description">Status of call (0 = success)</p>
2342<h3 class="function"><a name="httpInitialize">httpInitialize</a></h3>
2343<p class="description">Initialize the HTTP interface library and set the
2344default HTTP proxy (if any).</p>
2345<p class="code">
2346void httpInitialize (void);</p>
2347<h3 class="function"><a name="httpMD5">httpMD5</a></h3>
2348<p class="description">Compute the MD5 sum of the username:group:password.</p>
2349<p class="code">
2350char *httpMD5 (<br>
2351&nbsp;&nbsp;&nbsp;&nbsp;const char *username,<br>
2352&nbsp;&nbsp;&nbsp;&nbsp;const char *realm,<br>
2353&nbsp;&nbsp;&nbsp;&nbsp;const char *passwd,<br>
2354&nbsp;&nbsp;&nbsp;&nbsp;char md5[33]<br>
2355);</p>
2356<h4 class="parameters">Parameters</h4>
2357<dl>
2358<dt>username</dt>
2359<dd class="description">User name</dd>
2360<dt>realm</dt>
2361<dd class="description">Realm name</dd>
2362<dt>passwd</dt>
2363<dd class="description">Password string</dd>
2364<dt>md5[33]</dt>
2365<dd class="description">MD5 string</dd>
2366</dl>
2367<h4 class="returnvalue">Return Value</h4>
2368<p class="description">MD5 sum</p>
2369<h3 class="function"><a name="httpMD5Final">httpMD5Final</a></h3>
2370<p class="description">Combine the MD5 sum of the username, group, and password
ef416fc2 2371with the server-supplied nonce value, method, and
5a738aea
MS
2372request-uri.</p>
2373<p class="code">
2374char *httpMD5Final (<br>
2375&nbsp;&nbsp;&nbsp;&nbsp;const char *nonce,<br>
2376&nbsp;&nbsp;&nbsp;&nbsp;const char *method,<br>
2377&nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
2378&nbsp;&nbsp;&nbsp;&nbsp;char md5[33]<br>
2379);</p>
2380<h4 class="parameters">Parameters</h4>
2381<dl>
2382<dt>nonce</dt>
2383<dd class="description">Server nonce value</dd>
2384<dt>method</dt>
2385<dd class="description">METHOD (GET, POST, etc.)</dd>
2386<dt>resource</dt>
2387<dd class="description">Resource path</dd>
2388<dt>md5[33]</dt>
2389<dd class="description">MD5 sum</dd>
2390</dl>
2391<h4 class="returnvalue">Return Value</h4>
2392<p class="description">New sum</p>
2393<h3 class="function"><a name="httpMD5String">httpMD5String</a></h3>
2394<p class="description">Convert an MD5 sum to a character string.</p>
2395<p class="code">
2396char *httpMD5String (<br>
2397&nbsp;&nbsp;&nbsp;&nbsp;const unsigned char *sum,<br>
2398&nbsp;&nbsp;&nbsp;&nbsp;char md5[33]<br>
2399);</p>
2400<h4 class="parameters">Parameters</h4>
2401<dl>
2402<dt>sum</dt>
2403<dd class="description">MD5 sum data</dd>
2404<dt>md5[33]</dt>
2405<dd class="description">MD5 sum in hex</dd>
2406</dl>
2407<h4 class="returnvalue">Return Value</h4>
2408<p class="description">MD5 sum in hex</p>
2409<h3 class="function"><a name="httpOptions">httpOptions</a></h3>
2410<p class="description">Send an OPTIONS request to the server.</p>
2411<p class="code">
2412int httpOptions (<br>
2413&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2414&nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
2415);</p>
2416<h4 class="parameters">Parameters</h4>
2417<dl>
2418<dt>http</dt>
568fa3fa 2419<dd class="description">Connection to server</dd>
5a738aea
MS
2420<dt>uri</dt>
2421<dd class="description">URI for options</dd>
2422</dl>
2423<h4 class="returnvalue">Return Value</h4>
2424<p class="description">Status of call (0 = success)</p>
a469f8a5
MS
2425<h3 class="function"><span class="info">&nbsp;CUPS 1.7&nbsp;</span><a name="httpPeek">httpPeek</a></h3>
2426<p class="description">Peek at data from a HTTP connection.</p>
2427<p class="code">
2428ssize_t httpPeek (<br>
2429&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2430&nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
2431&nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
2432);</p>
2433<h4 class="parameters">Parameters</h4>
2434<dl>
2435<dt>http</dt>
2436<dd class="description">Connection to server</dd>
2437<dt>buffer</dt>
2438<dd class="description">Buffer for data</dd>
2439<dt>length</dt>
2440<dd class="description">Maximum number of bytes</dd>
2441</dl>
2442<h4 class="returnvalue">Return Value</h4>
2443<p class="description">Number of bytes copied</p>
2444<h4 class="discussion">Discussion</h4>
2445<p class="discussion">This function copies available data from the given HTTP connection, reading
2446a buffer as needed. The data is still available for reading using
2447<a href="#httpRead"><code>httpRead</code></a> or <a href="#httpRead2"><code>httpRead2</code></a>.<br>
2448<br>
2449For non-blocking connections the usual timeouts apply.
2450
2451</p>
5a738aea
MS
2452<h3 class="function"><a name="httpPost">httpPost</a></h3>
2453<p class="description">Send a POST request to the server.</p>
2454<p class="code">
2455int httpPost (<br>
2456&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2457&nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
2458);</p>
2459<h4 class="parameters">Parameters</h4>
2460<dl>
2461<dt>http</dt>
568fa3fa 2462<dd class="description">Connection to server</dd>
5a738aea
MS
2463<dt>uri</dt>
2464<dd class="description">URI for post</dd>
2465</dl>
2466<h4 class="returnvalue">Return Value</h4>
2467<p class="description">Status of call (0 = success)</p>
2468<h3 class="function"><a name="httpPut">httpPut</a></h3>
2469<p class="description">Send a PUT request to the server.</p>
2470<p class="code">
2471int httpPut (<br>
2472&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2473&nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
2474);</p>
2475<h4 class="parameters">Parameters</h4>
2476<dl>
2477<dt>http</dt>
568fa3fa 2478<dd class="description">Connection to server</dd>
5a738aea
MS
2479<dt>uri</dt>
2480<dd class="description">URI to put</dd>
2481</dl>
2482<h4 class="returnvalue">Return Value</h4>
2483<p class="description">Status of call (0 = success)</p>
2484<h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpRead">httpRead</a></h3>
2485<p class="description">Read data from a HTTP connection.</p>
2486<p class="code">
2487int httpRead (<br>
2488&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2489&nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
2490&nbsp;&nbsp;&nbsp;&nbsp;int length<br>
2491);</p>
2492<h4 class="parameters">Parameters</h4>
2493<dl>
2494<dt>http</dt>
568fa3fa 2495<dd class="description">Connection to server</dd>
5a738aea
MS
2496<dt>buffer</dt>
2497<dd class="description">Buffer for data</dd>
2498<dt>length</dt>
2499<dd class="description">Maximum number of bytes</dd>
2500</dl>
2501<h4 class="returnvalue">Return Value</h4>
2502<p class="description">Number of bytes read</p>
2503<h4 class="discussion">Discussion</h4>
2504<p class="discussion">This function is deprecated. Use the httpRead2() function which can
ecdc0628 2505read more than 2GB of data.
2506
5a738aea 2507</p>
f3c17241 2508<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpRead2">httpRead2</a></h3>
5a738aea
MS
2509<p class="description">Read data from a HTTP connection.</p>
2510<p class="code">
2511ssize_t httpRead2 (<br>
2512&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2513&nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
2514&nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
2515);</p>
2516<h4 class="parameters">Parameters</h4>
2517<dl>
2518<dt>http</dt>
568fa3fa 2519<dd class="description">Connection to server</dd>
5a738aea
MS
2520<dt>buffer</dt>
2521<dd class="description">Buffer for data</dd>
2522<dt>length</dt>
2523<dd class="description">Maximum number of bytes</dd>
2524</dl>
2525<h4 class="returnvalue">Return Value</h4>
2526<p class="description">Number of bytes read</p>
a469f8a5
MS
2527<h3 class="function"><span class="info">&nbsp;CUPS 1.7&nbsp;</span><a name="httpReadRequest">httpReadRequest</a></h3>
2528<p class="description">Read a HTTP request from a connection.</p>
2529<p class="code">
2530<a href="#http_state_t">http_state_t</a> httpReadRequest (<br>
2531&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2532&nbsp;&nbsp;&nbsp;&nbsp;char *uri,<br>
2533&nbsp;&nbsp;&nbsp;&nbsp;size_t urilen<br>
2534);</p>
2535<h4 class="parameters">Parameters</h4>
2536<dl>
2537<dt>http</dt>
2538<dd class="description">HTTP connection</dd>
2539<dt>uri</dt>
2540<dd class="description">URI buffer</dd>
2541<dt>urilen</dt>
2542<dd class="description">Size of URI buffer</dd>
2543</dl>
2544<h4 class="returnvalue">Return Value</h4>
2545<p class="description">New state of connection</p>
2546<h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpReconnect">httpReconnect</a></h3>
5a738aea
MS
2547<p class="description">Reconnect to a HTTP server.</p>
2548<p class="code">
2549int httpReconnect (<br>
2550&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2551);</p>
2552<h4 class="parameters">Parameters</h4>
2553<dl>
2554<dt>http</dt>
568fa3fa 2555<dd class="description">Connection to server</dd>
5a738aea
MS
2556</dl>
2557<h4 class="returnvalue">Return Value</h4>
2558<p class="description">0 on success, non-zero on failure</p>
a469f8a5
MS
2559<h4 class="discussion">Discussion</h4>
2560<p class="discussion">This function is deprecated. Please use the <a href="#httpReconnect2"><code>httpReconnect2</code></a> function
2561instead.
2562
2563</p>
3e7fe0ca
MS
2564<h3 class="function"><a name="httpReconnect2">httpReconnect2</a></h3>
2565<p class="description">Reconnect to a HTTP server with timeout and optional
2566cancel.</p>
2567<p class="code">
2568int httpReconnect2 (<br>
2569&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2570&nbsp;&nbsp;&nbsp;&nbsp;int msec,<br>
2571&nbsp;&nbsp;&nbsp;&nbsp;int *cancel<br>
2572);</p>
2573<h4 class="parameters">Parameters</h4>
2574<dl>
2575<dt>http</dt>
2576<dd class="description">Connection to server</dd>
2577<dt>msec</dt>
2578<dd class="description">Timeout in milliseconds</dd>
2579<dt>cancel</dt>
2580<dd class="description">Pointer to &quot;cancel&quot; variable</dd>
2581</dl>
2582<h4 class="returnvalue">Return Value</h4>
2583<p class="description">0 on success, non-zero on failure</p>
5a738aea
MS
2584<h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpSeparate">httpSeparate</a></h3>
2585<p class="description">Separate a Universal Resource Identifier into its
2586components.</p>
2587<p class="code">
2588void httpSeparate (<br>
2589&nbsp;&nbsp;&nbsp;&nbsp;const char *uri,<br>
2590&nbsp;&nbsp;&nbsp;&nbsp;char *scheme,<br>
2591&nbsp;&nbsp;&nbsp;&nbsp;char *username,<br>
2592&nbsp;&nbsp;&nbsp;&nbsp;char *host,<br>
2593&nbsp;&nbsp;&nbsp;&nbsp;int *port,<br>
2594&nbsp;&nbsp;&nbsp;&nbsp;char *resource<br>
2595);</p>
2596<h4 class="parameters">Parameters</h4>
2597<dl>
2598<dt>uri</dt>
2599<dd class="description">Universal Resource Identifier</dd>
2600<dt>scheme</dt>
2601<dd class="description">Scheme [32] (http, https, etc.)</dd>
2602<dt>username</dt>
2603<dd class="description">Username [1024]</dd>
2604<dt>host</dt>
2605<dd class="description">Hostname [1024]</dd>
2606<dt>port</dt>
2607<dd class="description">Port number to use</dd>
2608<dt>resource</dt>
2609<dd class="description">Resource/filename [1024]</dd>
2610</dl>
2611<h4 class="discussion">Discussion</h4>
2612<p class="discussion">This function is deprecated; use the httpSeparateURI() function instead.
2613
2614</p>
f3c17241 2615<h3 class="function"><span class="info">&nbsp;CUPS 1.1.21/OS X 10.4&nbsp;</span><a name="httpSeparate2">httpSeparate2</a></h3>
5a738aea
MS
2616<p class="description">Separate a Universal Resource Identifier into its
2617components.</p>
2618<p class="code">
2619void httpSeparate2 (<br>
2620&nbsp;&nbsp;&nbsp;&nbsp;const char *uri,<br>
2621&nbsp;&nbsp;&nbsp;&nbsp;char *scheme,<br>
2622&nbsp;&nbsp;&nbsp;&nbsp;int schemelen,<br>
2623&nbsp;&nbsp;&nbsp;&nbsp;char *username,<br>
2624&nbsp;&nbsp;&nbsp;&nbsp;int usernamelen,<br>
2625&nbsp;&nbsp;&nbsp;&nbsp;char *host,<br>
2626&nbsp;&nbsp;&nbsp;&nbsp;int hostlen,<br>
2627&nbsp;&nbsp;&nbsp;&nbsp;int *port,<br>
2628&nbsp;&nbsp;&nbsp;&nbsp;char *resource,<br>
2629&nbsp;&nbsp;&nbsp;&nbsp;int resourcelen<br>
2630);</p>
2631<h4 class="parameters">Parameters</h4>
2632<dl>
2633<dt>uri</dt>
2634<dd class="description">Universal Resource Identifier</dd>
2635<dt>scheme</dt>
2636<dd class="description">Scheme (http, https, etc.)</dd>
2637<dt>schemelen</dt>
2638<dd class="description">Size of scheme buffer</dd>
2639<dt>username</dt>
2640<dd class="description">Username</dd>
2641<dt>usernamelen</dt>
2642<dd class="description">Size of username buffer</dd>
2643<dt>host</dt>
2644<dd class="description">Hostname</dd>
2645<dt>hostlen</dt>
2646<dd class="description">Size of hostname buffer</dd>
2647<dt>port</dt>
2648<dd class="description">Port number to use</dd>
2649<dt>resource</dt>
2650<dd class="description">Resource/filename</dd>
2651<dt>resourcelen</dt>
2652<dd class="description">Size of resource buffer</dd>
2653</dl>
2654<h4 class="discussion">Discussion</h4>
2655<p class="discussion">This function is deprecated; use the httpSeparateURI() function instead.
2656
2657
2658</p>
f3c17241 2659<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpSeparateURI">httpSeparateURI</a></h3>
5a738aea
MS
2660<p class="description">Separate a Universal Resource Identifier into its
2661components.</p>
2662<p class="code">
79e1d494
MS
2663<a href="#http_uri_status_t">http_uri_status_t</a> httpSeparateURI (<br>
2664&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_uri_coding_t">http_uri_coding_t</a> decoding,<br>
5a738aea
MS
2665&nbsp;&nbsp;&nbsp;&nbsp;const char *uri,<br>
2666&nbsp;&nbsp;&nbsp;&nbsp;char *scheme,<br>
2667&nbsp;&nbsp;&nbsp;&nbsp;int schemelen,<br>
2668&nbsp;&nbsp;&nbsp;&nbsp;char *username,<br>
2669&nbsp;&nbsp;&nbsp;&nbsp;int usernamelen,<br>
2670&nbsp;&nbsp;&nbsp;&nbsp;char *host,<br>
2671&nbsp;&nbsp;&nbsp;&nbsp;int hostlen,<br>
2672&nbsp;&nbsp;&nbsp;&nbsp;int *port,<br>
2673&nbsp;&nbsp;&nbsp;&nbsp;char *resource,<br>
2674&nbsp;&nbsp;&nbsp;&nbsp;int resourcelen<br>
2675);</p>
2676<h4 class="parameters">Parameters</h4>
2677<dl>
2678<dt>decoding</dt>
2679<dd class="description">Decoding flags</dd>
2680<dt>uri</dt>
2681<dd class="description">Universal Resource Identifier</dd>
2682<dt>scheme</dt>
2683<dd class="description">Scheme (http, https, etc.)</dd>
2684<dt>schemelen</dt>
2685<dd class="description">Size of scheme buffer</dd>
2686<dt>username</dt>
2687<dd class="description">Username</dd>
2688<dt>usernamelen</dt>
2689<dd class="description">Size of username buffer</dd>
2690<dt>host</dt>
2691<dd class="description">Hostname</dd>
2692<dt>hostlen</dt>
2693<dd class="description">Size of hostname buffer</dd>
2694<dt>port</dt>
2695<dd class="description">Port number to use</dd>
2696<dt>resource</dt>
2697<dd class="description">Resource/filename</dd>
2698<dt>resourcelen</dt>
2699<dd class="description">Size of resource buffer</dd>
2700</dl>
2701<h4 class="returnvalue">Return Value</h4>
2702<p class="description">Result of separation</p>
f3c17241 2703<h3 class="function"><span class="info">&nbsp;CUPS 1.3/OS X 10.5&nbsp;</span><a name="httpSetAuthString">httpSetAuthString</a></h3>
5a738aea
MS
2704<p class="description">Set the current authorization string.</p>
2705<p class="code">
2706void httpSetAuthString (<br>
2707&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2708&nbsp;&nbsp;&nbsp;&nbsp;const char *scheme,<br>
2709&nbsp;&nbsp;&nbsp;&nbsp;const char *data<br>
2710);</p>
2711<h4 class="parameters">Parameters</h4>
2712<dl>
2713<dt>http</dt>
568fa3fa 2714<dd class="description">Connection to server</dd>
5a738aea
MS
2715<dt>scheme</dt>
2716<dd class="description">Auth scheme (NULL to clear it)</dd>
2717<dt>data</dt>
2718<dd class="description">Auth data (NULL for none)</dd>
2719</dl>
2720<h4 class="discussion">Discussion</h4>
2721<p class="discussion">This function just stores a copy of the current authorization string in
355e94dc
MS
2722the HTTP connection object. You must still call httpSetField() to set
2723HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
2724httpHead(), httpOptions(), httpPost, or httpPut().
2725
5a738aea 2726</p>
f3c17241 2727<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="httpSetCookie">httpSetCookie</a></h3>
10d09e33 2728<p class="description">Set the cookie value(s).</p>
5a738aea
MS
2729<p class="code">
2730void httpSetCookie (<br>
2731&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2732&nbsp;&nbsp;&nbsp;&nbsp;const char *cookie<br>
2733);</p>
2734<h4 class="parameters">Parameters</h4>
2735<dl>
2736<dt>http</dt>
2737<dd class="description">Connection</dd>
2738<dt>cookie</dt>
2739<dd class="description">Cookie string</dd>
2740</dl>
f3c17241 2741<h3 class="function"><span class="info">&nbsp;CUPS 1.5/OS X 10.7&nbsp;</span><a name="httpSetCredentials">httpSetCredentials</a></h3>
10d09e33
MS
2742<p class="description">Set the credentials associated with an encrypted
2743connection.</p>
2744<p class="code">
2745int httpSetCredentials (<br>
2746&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2747&nbsp;&nbsp;&nbsp;&nbsp;cups_array_t *credentials<br>
2748);</p>
2749<h4 class="parameters">Parameters</h4>
2750<dl>
2751<dt>http</dt>
2752<dd class="description">Connection to server</dd>
2753<dt>credentials</dt>
2754<dd class="description">Array of credentials</dd>
2755</dl>
2756<h4 class="returnvalue">Return Value</h4>
2757<p class="description">Status of call (0 = success)</p>
f3c17241 2758<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpSetExpect">httpSetExpect</a></h3>
5a738aea
MS
2759<p class="description">Set the Expect: header in a request.</p>
2760<p class="code">
2761void httpSetExpect (<br>
2762&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
a469f8a5 2763&nbsp;&nbsp;&nbsp;&nbsp;http_status_t expect<br>
5a738aea
MS
2764);</p>
2765<h4 class="parameters">Parameters</h4>
2766<dl>
2767<dt>http</dt>
568fa3fa 2768<dd class="description">Connection to server</dd>
5a738aea 2769<dt>expect</dt>
a469f8a5
MS
2770<dd class="description">HTTP status to expect
2771(<code>HTTP_CONTINUE</code>)</dd>
5a738aea
MS
2772</dl>
2773<h4 class="discussion">Discussion</h4>
a469f8a5
MS
2774<p class="discussion">Currently only <code>HTTP_STATUS_CONTINUE</code> is supported for the &quot;expect&quot;
2775argument.
5a738aea
MS
2776
2777</p>
2778<h3 class="function"><a name="httpSetField">httpSetField</a></h3>
2779<p class="description">Set the value of an HTTP header.</p>
2780<p class="code">
2781void httpSetField (<br>
2782&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
79e1d494 2783&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_field_t">http_field_t</a> field,<br>
5a738aea
MS
2784&nbsp;&nbsp;&nbsp;&nbsp;const char *value<br>
2785);</p>
2786<h4 class="parameters">Parameters</h4>
2787<dl>
2788<dt>http</dt>
568fa3fa 2789<dd class="description">Connection to server</dd>
5a738aea
MS
2790<dt>field</dt>
2791<dd class="description">Field index</dd>
2792<dt>value</dt>
2793<dd class="description">Value</dd>
2794</dl>
f3c17241 2795<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpSetLength">httpSetLength</a></h3>
5a738aea
MS
2796<p class="description">Set the content-length and content-encoding.</p>
2797<p class="code">
2798void httpSetLength (<br>
2799&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2800&nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
2801);</p>
2802<h4 class="parameters">Parameters</h4>
2803<dl>
2804<dt>http</dt>
568fa3fa 2805<dd class="description">Connection to server</dd>
5a738aea
MS
2806<dt>length</dt>
2807<dd class="description">Length (0 for chunked)</dd>
2808</dl>
f3c17241 2809<h3 class="function"><span class="info">&nbsp;CUPS 1.5/OS X 10.7&nbsp;</span><a name="httpSetTimeout">httpSetTimeout</a></h3>
f228370c
MS
2810<p class="description">Set read/write timeouts and an optional callback.</p>
2811<p class="code">
2812void httpSetTimeout (<br>
2813&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2814&nbsp;&nbsp;&nbsp;&nbsp;double timeout,<br>
2815&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_timeout_cb_t">http_timeout_cb_t</a> cb,<br>
2816&nbsp;&nbsp;&nbsp;&nbsp;void *user_data<br>
2817);</p>
2818<h4 class="parameters">Parameters</h4>
2819<dl>
2820<dt>http</dt>
2821<dd class="description">Connection to server</dd>
2822<dt>timeout</dt>
2823<dd class="description">Number of seconds for timeout,
2824must be greater than 0</dd>
2825<dt>cb</dt>
2826<dd class="description">Callback function or NULL</dd>
2827<dt>user_data</dt>
2828<dd class="description">User data pointer</dd>
2829</dl>
2830<h4 class="discussion">Discussion</h4>
2831<p class="discussion">The optional timeout callback receives both the HTTP connection and a user
2832data pointer and must return 1 to continue or 0 to error (time) out.
2833
2834</p>
5a738aea
MS
2835<h3 class="function"><a name="httpStatus">httpStatus</a></h3>
2836<p class="description">Return a short string describing a HTTP status code.</p>
2837<p class="code">
2838const char *httpStatus (<br>
a469f8a5 2839&nbsp;&nbsp;&nbsp;&nbsp;http_status_t status<br>
5a738aea
MS
2840);</p>
2841<h4 class="parameters">Parameters</h4>
2842<dl>
2843<dt>status</dt>
2844<dd class="description">HTTP status code</dd>
2845</dl>
2846<h4 class="returnvalue">Return Value</h4>
06d4e77b
MS
2847<p class="description">Localized status string</p>
2848<h4 class="discussion">Discussion</h4>
2849<p class="discussion">The returned string is localized to the current POSIX locale and is based
2850on the status strings defined in RFC 2616.</p>
5a738aea
MS
2851<h3 class="function"><a name="httpTrace">httpTrace</a></h3>
2852<p class="description">Send an TRACE request to the server.</p>
2853<p class="code">
2854int httpTrace (<br>
2855&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2856&nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
2857);</p>
2858<h4 class="parameters">Parameters</h4>
2859<dl>
2860<dt>http</dt>
568fa3fa 2861<dd class="description">Connection to server</dd>
5a738aea
MS
2862<dt>uri</dt>
2863<dd class="description">URI for trace</dd>
2864</dl>
2865<h4 class="returnvalue">Return Value</h4>
2866<p class="description">Status of call (0 = success)</p>
2867<h3 class="function"><a name="httpUpdate">httpUpdate</a></h3>
2868<p class="description">Update the current HTTP state for incoming data.</p>
2869<p class="code">
a469f8a5 2870http_status_t httpUpdate (<br>
5a738aea
MS
2871&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2872);</p>
2873<h4 class="parameters">Parameters</h4>
2874<dl>
2875<dt>http</dt>
568fa3fa 2876<dd class="description">Connection to server</dd>
5a738aea
MS
2877</dl>
2878<h4 class="returnvalue">Return Value</h4>
2879<p class="description">HTTP status</p>
f3c17241 2880<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="httpWait">httpWait</a></h3>
5a738aea
MS
2881<p class="description">Wait for data available on a connection.</p>
2882<p class="code">
2883int httpWait (<br>
2884&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2885&nbsp;&nbsp;&nbsp;&nbsp;int msec<br>
2886);</p>
2887<h4 class="parameters">Parameters</h4>
2888<dl>
2889<dt>http</dt>
568fa3fa 2890<dd class="description">Connection to server</dd>
5a738aea
MS
2891<dt>msec</dt>
2892<dd class="description">Milliseconds to wait</dd>
2893</dl>
2894<h4 class="returnvalue">Return Value</h4>
2895<p class="description">1 if data is available, 0 otherwise</p>
2896<h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpWrite">httpWrite</a></h3>
2897<p class="description">Write data to a HTTP connection.</p>
2898<p class="code">
2899int httpWrite (<br>
2900&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2901&nbsp;&nbsp;&nbsp;&nbsp;const char *buffer,<br>
2902&nbsp;&nbsp;&nbsp;&nbsp;int length<br>
2903);</p>
2904<h4 class="parameters">Parameters</h4>
2905<dl>
2906<dt>http</dt>
568fa3fa 2907<dd class="description">Connection to server</dd>
5a738aea
MS
2908<dt>buffer</dt>
2909<dd class="description">Buffer for data</dd>
2910<dt>length</dt>
2911<dd class="description">Number of bytes to write</dd>
2912</dl>
2913<h4 class="returnvalue">Return Value</h4>
2914<p class="description">Number of bytes written</p>
2915<h4 class="discussion">Discussion</h4>
2916<p class="discussion">This function is deprecated. Use the httpWrite2() function which can
ecdc0628 2917write more than 2GB of data.
2918
5a738aea 2919</p>
f3c17241 2920<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="httpWrite2">httpWrite2</a></h3>
5a738aea
MS
2921<p class="description">Write data to a HTTP connection.</p>
2922<p class="code">
2923ssize_t httpWrite2 (<br>
2924&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2925&nbsp;&nbsp;&nbsp;&nbsp;const char *buffer,<br>
2926&nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
2927);</p>
2928<h4 class="parameters">Parameters</h4>
2929<dl>
2930<dt>http</dt>
568fa3fa 2931<dd class="description">Connection to server</dd>
5a738aea
MS
2932<dt>buffer</dt>
2933<dd class="description">Buffer for data</dd>
2934<dt>length</dt>
2935<dd class="description">Number of bytes to write</dd>
2936</dl>
2937<h4 class="returnvalue">Return Value</h4>
2938<p class="description">Number of bytes written</p>
a469f8a5
MS
2939<h3 class="function"><span class="info">&nbsp;CUPS 1.7&nbsp;</span><a name="httpWriteResponse">httpWriteResponse</a></h3>
2940<p class="description">Write a HTTP response to a client connection.</p>
2941<p class="code">
2942int httpWriteResponse (<br>
2943&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2944&nbsp;&nbsp;&nbsp;&nbsp;http_status_t status<br>
2945);</p>
2946<h4 class="parameters">Parameters</h4>
2947<dl>
2948<dt>http</dt>
2949<dd class="description">HTTP connection</dd>
2950<dt>status</dt>
2951<dd class="description">Status code</dd>
2952</dl>
2953<h4 class="returnvalue">Return Value</h4>
2954<p class="description">0 on success, -1 on error</p>
5a738aea
MS
2955<h3 class="function"><a name="ippAddBoolean">ippAddBoolean</a></h3>
2956<p class="description">Add a boolean attribute to an IPP message.</p>
2957<p class="code">
2958<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddBoolean (<br>
2959&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
a2326b5b 2960&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
5a738aea
MS
2961&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2962&nbsp;&nbsp;&nbsp;&nbsp;char value<br>
2963);</p>
2964<h4 class="parameters">Parameters</h4>
2965<dl>
2966<dt>ipp</dt>
2967<dd class="description">IPP message</dd>
2968<dt>group</dt>
2969<dd class="description">IPP group</dd>
2970<dt>name</dt>
2971<dd class="description">Name of attribute</dd>
2972<dt>value</dt>
2973<dd class="description">Value of attribute</dd>
2974</dl>
2975<h4 class="returnvalue">Return Value</h4>
2976<p class="description">New attribute</p>
a2326b5b 2977<h4 class="discussion">Discussion</h4>
a469f8a5
MS
2978<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
2979the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
2980<br>
2981The <code>group</code> parameter specifies the IPP attribute group tag: none
2982(<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
2983event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
2984(<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
2985(<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
5a738aea
MS
2986<h3 class="function"><a name="ippAddBooleans">ippAddBooleans</a></h3>
2987<p class="description">Add an array of boolean values.</p>
2988<p class="code">
2989<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddBooleans (<br>
2990&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
a2326b5b 2991&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
5a738aea
MS
2992&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2993&nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
2994&nbsp;&nbsp;&nbsp;&nbsp;const char *values<br>
2995);</p>
2996<h4 class="parameters">Parameters</h4>
2997<dl>
2998<dt>ipp</dt>
2999<dd class="description">IPP message</dd>
3000<dt>group</dt>
3001<dd class="description">IPP group</dd>
3002<dt>name</dt>
3003<dd class="description">Name of attribute</dd>
3004<dt>num_values</dt>
3005<dd class="description">Number of values</dd>
3006<dt>values</dt>
3007<dd class="description">Values</dd>
3008</dl>
3009<h4 class="returnvalue">Return Value</h4>
3010<p class="description">New attribute</p>
a2326b5b 3011<h4 class="discussion">Discussion</h4>
a469f8a5
MS
3012<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3013the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
3014<br>
3015The <code>group</code> parameter specifies the IPP attribute group tag: none
3016(<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3017event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3018(<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3019(<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
f3c17241 3020<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="ippAddCollection">ippAddCollection</a></h3>
5a738aea
MS
3021<p class="description">Add a collection value.</p>
3022<p class="code">
3023<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollection (<br>
3024&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
a2326b5b 3025&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
5a738aea
MS
3026&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3027&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *value<br>
3028);</p>
3029<h4 class="parameters">Parameters</h4>
3030<dl>
3031<dt>ipp</dt>
3032<dd class="description">IPP message</dd>
3033<dt>group</dt>
3034<dd class="description">IPP group</dd>
3035<dt>name</dt>
3036<dd class="description">Name of attribute</dd>
3037<dt>value</dt>
3038<dd class="description">Value</dd>
3039</dl>
3040<h4 class="returnvalue">Return Value</h4>
3041<p class="description">New attribute</p>
a2326b5b 3042<h4 class="discussion">Discussion</h4>
a469f8a5
MS
3043<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3044the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
3045<br>
3046The <code>group</code> parameter specifies the IPP attribute group tag: none
3047(<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3048event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3049(<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3050(<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).
3051
3052</p>
f3c17241 3053<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="ippAddCollections">ippAddCollections</a></h3>
5a738aea
MS
3054<p class="description">Add an array of collection values.</p>
3055<p class="code">
3056<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollections (<br>
3057&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
a2326b5b 3058&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
5a738aea
MS
3059&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3060&nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
3061&nbsp;&nbsp;&nbsp;&nbsp;const <a href="#ipp_t">ipp_t</a> **values<br>
3062);</p>
3063<h4 class="parameters">Parameters</h4>
3064<dl>
3065<dt>ipp</dt>
3066<dd class="description">IPP message</dd>
3067<dt>group</dt>
3068<dd class="description">IPP group</dd>
3069<dt>name</dt>
3070<dd class="description">Name of attribute</dd>
3071<dt>num_values</dt>
3072<dd class="description">Number of values</dd>
3073<dt>values</dt>
3074<dd class="description">Values</dd>
3075</dl>
3076<h4 class="returnvalue">Return Value</h4>
3077<p class="description">New attribute</p>
a2326b5b 3078<h4 class="discussion">Discussion</h4>
a469f8a5
MS
3079<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3080the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
3081<br>
3082The <code>group</code> parameter specifies the IPP attribute group tag: none
3083(<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3084event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3085(<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3086(<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).
3087
3088</p>
5a738aea
MS
3089<h3 class="function"><a name="ippAddDate">ippAddDate</a></h3>
3090<p class="description">Add a date attribute to an IPP message.</p>
3091<p class="code">
3092<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddDate (<br>
3093&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
a2326b5b 3094&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
5a738aea
MS
3095&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3096&nbsp;&nbsp;&nbsp;&nbsp;const <a href="#ipp_uchar_t">ipp_uchar_t</a> *value<br>
3097);</p>
3098<h4 class="parameters">Parameters</h4>
3099<dl>
3100<dt>ipp</dt>
3101<dd class="description">IPP message</dd>
3102<dt>group</dt>
3103<dd class="description">IPP group</dd>
3104<dt>name</dt>
3105<dd class="description">Name of attribute</dd>
3106<dt>value</dt>
3107<dd class="description">Value</dd>
3108</dl>
3109<h4 class="returnvalue">Return Value</h4>
3110<p class="description">New attribute</p>
a2326b5b 3111<h4 class="discussion">Discussion</h4>
a469f8a5
MS
3112<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3113the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
3114<br>
3115The <code>group</code> parameter specifies the IPP attribute group tag: none
3116(<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3117event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3118(<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3119(<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
5a738aea
MS
3120<h3 class="function"><a name="ippAddInteger">ippAddInteger</a></h3>
3121<p class="description">Add a integer attribute to an IPP message.</p>
3122<p class="code">
3123<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddInteger (<br>
3124&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
a2326b5b
MS
3125&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3126&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t value_tag,<br>
5a738aea
MS
3127&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3128&nbsp;&nbsp;&nbsp;&nbsp;int value<br>
3129);</p>
3130<h4 class="parameters">Parameters</h4>
3131<dl>
3132<dt>ipp</dt>
3133<dd class="description">IPP message</dd>
3134<dt>group</dt>
3135<dd class="description">IPP group</dd>
a2326b5b 3136<dt>value_tag</dt>
5a738aea
MS
3137<dd class="description">Type of attribute</dd>
3138<dt>name</dt>
3139<dd class="description">Name of attribute</dd>
3140<dt>value</dt>
3141<dd class="description">Value of attribute</dd>
3142</dl>
3143<h4 class="returnvalue">Return Value</h4>
3144<p class="description">New attribute</p>
a2326b5b 3145<h4 class="discussion">Discussion</h4>
a469f8a5
MS
3146<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3147the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
3148<br>
3149The <code>group</code> parameter specifies the IPP attribute group tag: none
3150(<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3151event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3152(<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3153(<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3154<br>
3155Supported values include enum (<code>IPP_TAG_ENUM</code>) and integer
3156(<code>IPP_TAG_INTEGER</code>).</p>
5a738aea
MS
3157<h3 class="function"><a name="ippAddIntegers">ippAddIntegers</a></h3>
3158<p class="description">Add an array of integer values.</p>
3159<p class="code">
3160<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddIntegers (<br>
3161&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
a2326b5b
MS
3162&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3163&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t value_tag,<br>
5a738aea
MS
3164&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3165&nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
3166&nbsp;&nbsp;&nbsp;&nbsp;const int *values<br>
3167);</p>
3168<h4 class="parameters">Parameters</h4>
3169<dl>
3170<dt>ipp</dt>
3171<dd class="description">IPP message</dd>
3172<dt>group</dt>
3173<dd class="description">IPP group</dd>
a2326b5b 3174<dt>value_tag</dt>
5a738aea
MS
3175<dd class="description">Type of attribute</dd>
3176<dt>name</dt>
3177<dd class="description">Name of attribute</dd>
3178<dt>num_values</dt>
3179<dd class="description">Number of values</dd>
3180<dt>values</dt>
3181<dd class="description">Values</dd>
3182</dl>
3183<h4 class="returnvalue">Return Value</h4>
3184<p class="description">New attribute</p>
a2326b5b 3185<h4 class="discussion">Discussion</h4>
a469f8a5
MS
3186<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3187the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
3188<br>
3189The <code>group</code> parameter specifies the IPP attribute group tag: none
3190(<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3191event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3192(<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3193(<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3194<br>
3195Supported values include enum (<code>IPP_TAG_ENUM</code>) and integer
3196(<code>IPP_TAG_INTEGER</code>).</p>
f3c17241 3197<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ippAddOctetString">ippAddOctetString</a></h3>
5a738aea
MS
3198<p class="description">Add an octetString value to an IPP message.</p>
3199<p class="code">
3200<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddOctetString (<br>
3201&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
a2326b5b 3202&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
5a738aea
MS
3203&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3204&nbsp;&nbsp;&nbsp;&nbsp;const void *data,<br>
3205&nbsp;&nbsp;&nbsp;&nbsp;int datalen<br>
3206);</p>
3207<h4 class="parameters">Parameters</h4>
3208<dl>
3209<dt>ipp</dt>
3210<dd class="description">IPP message</dd>
3211<dt>group</dt>
3212<dd class="description">IPP group</dd>
3213<dt>name</dt>
3214<dd class="description">Name of attribute</dd>
3215<dt>data</dt>
3216<dd class="description">octetString data</dd>
3217<dt>datalen</dt>
3218<dd class="description">Length of data in bytes</dd>
3219</dl>
3220<h4 class="returnvalue">Return Value</h4>
3221<p class="description">New attribute</p>
a2326b5b 3222<h4 class="discussion">Discussion</h4>
a469f8a5
MS
3223<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3224the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
3225<br>
3226The <code>group</code> parameter specifies the IPP attribute group tag: none
3227(<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3228event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3229(<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3230(<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).
3231
3232</p>
f3c17241 3233<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippAddOutOfBand">ippAddOutOfBand</a></h3>
a2326b5b
MS
3234<p class="description">Add an out-of-band value to an IPP message.</p>
3235<p class="code">
3236<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddOutOfBand (<br>
3237&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3238&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3239&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t value_tag,<br>
3240&nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
3241);</p>
3242<h4 class="parameters">Parameters</h4>
3243<dl>
3244<dt>ipp</dt>
3245<dd class="description">IPP message</dd>
3246<dt>group</dt>
3247<dd class="description">IPP group</dd>
3248<dt>value_tag</dt>
3249<dd class="description">Type of attribute</dd>
3250<dt>name</dt>
3251<dd class="description">Name of attribute</dd>
3252</dl>
3253<h4 class="returnvalue">Return Value</h4>
3254<p class="description">New attribute</p>
3255<h4 class="discussion">Discussion</h4>
a469f8a5
MS
3256<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3257the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
3258<br>
3259The <code>group</code> parameter specifies the IPP attribute group tag: none
3260(<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3261event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3262(<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3263(<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3264<br>
3265Supported out-of-band values include unsupported-value
3266(<code>IPP_TAG_UNSUPPORTED_VALUE</code>), default (<code>IPP_TAG_DEFAULT</code>), unknown
3267(<code>IPP_TAG_UNKNOWN</code>), no-value (<code>IPP_TAG_NOVALUE</code>), not-settable
3268(<code>IPP_TAG_NOTSETTABLE</code>), delete-attribute (<code>IPP_TAG_DELETEATTR</code>), and
3269admin-define (<code>IPP_TAG_ADMINDEFINE</code>).
3270
3271</p>
5a738aea
MS
3272<h3 class="function"><a name="ippAddRange">ippAddRange</a></h3>
3273<p class="description">Add a range of values to an IPP message.</p>
3274<p class="code">
3275<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddRange (<br>
3276&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
a2326b5b 3277&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
5a738aea
MS
3278&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3279&nbsp;&nbsp;&nbsp;&nbsp;int lower,<br>
3280&nbsp;&nbsp;&nbsp;&nbsp;int upper<br>
3281);</p>
3282<h4 class="parameters">Parameters</h4>
3283<dl>
3284<dt>ipp</dt>
3285<dd class="description">IPP message</dd>
3286<dt>group</dt>
3287<dd class="description">IPP group</dd>
3288<dt>name</dt>
3289<dd class="description">Name of attribute</dd>
3290<dt>lower</dt>
3291<dd class="description">Lower value</dd>
3292<dt>upper</dt>
3293<dd class="description">Upper value</dd>
3294</dl>
3295<h4 class="returnvalue">Return Value</h4>
3296<p class="description">New attribute</p>
a2326b5b 3297<h4 class="discussion">Discussion</h4>
a469f8a5
MS
3298<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3299the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
3300<br>
3301The <code>group</code> parameter specifies the IPP attribute group tag: none
3302(<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3303event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3304(<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3305(<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3306<br>
3307The <code>lower</code> parameter must be less than or equal to the <code>upper</code> parameter.</p>
5a738aea
MS
3308<h3 class="function"><a name="ippAddRanges">ippAddRanges</a></h3>
3309<p class="description">Add ranges of values to an IPP message.</p>
3310<p class="code">
3311<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddRanges (<br>
3312&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
a2326b5b 3313&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
5a738aea
MS
3314&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3315&nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
3316&nbsp;&nbsp;&nbsp;&nbsp;const int *lower,<br>
3317&nbsp;&nbsp;&nbsp;&nbsp;const int *upper<br>
3318);</p>
3319<h4 class="parameters">Parameters</h4>
3320<dl>
3321<dt>ipp</dt>
3322<dd class="description">IPP message</dd>
3323<dt>group</dt>
3324<dd class="description">IPP group</dd>
3325<dt>name</dt>
3326<dd class="description">Name of attribute</dd>
3327<dt>num_values</dt>
3328<dd class="description">Number of values</dd>
3329<dt>lower</dt>
3330<dd class="description">Lower values</dd>
3331<dt>upper</dt>
3332<dd class="description">Upper values</dd>
3333</dl>
3334<h4 class="returnvalue">Return Value</h4>
3335<p class="description">New attribute</p>
a2326b5b 3336<h4 class="discussion">Discussion</h4>
a469f8a5
MS
3337<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3338the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
3339<br>
3340The <code>group</code> parameter specifies the IPP attribute group tag: none
3341(<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3342event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3343(<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3344(<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
5a738aea
MS
3345<h3 class="function"><a name="ippAddResolution">ippAddResolution</a></h3>
3346<p class="description">Add a resolution value to an IPP message.</p>
3347<p class="code">
3348<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddResolution (<br>
3349&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
a2326b5b 3350&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
5a738aea 3351&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
79e1d494 3352&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_res_t">ipp_res_t</a> units,<br>
5a738aea
MS
3353&nbsp;&nbsp;&nbsp;&nbsp;int xres,<br>
3354&nbsp;&nbsp;&nbsp;&nbsp;int yres<br>
3355);</p>
3356<h4 class="parameters">Parameters</h4>
3357<dl>
3358<dt>ipp</dt>
3359<dd class="description">IPP message</dd>
3360<dt>group</dt>
3361<dd class="description">IPP group</dd>
3362<dt>name</dt>
3363<dd class="description">Name of attribute</dd>
3364<dt>units</dt>
3365<dd class="description">Units for resolution</dd>
3366<dt>xres</dt>
3367<dd class="description">X resolution</dd>
3368<dt>yres</dt>
3369<dd class="description">Y resolution</dd>
3370</dl>
3371<h4 class="returnvalue">Return Value</h4>
3372<p class="description">New attribute</p>
a2326b5b 3373<h4 class="discussion">Discussion</h4>
a469f8a5
MS
3374<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3375the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
3376<br>
3377The <code>group</code> parameter specifies the IPP attribute group tag: none
3378(<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3379event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3380(<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3381(<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
5a738aea
MS
3382<h3 class="function"><a name="ippAddResolutions">ippAddResolutions</a></h3>
3383<p class="description">Add resolution values to an IPP message.</p>
3384<p class="code">
3385<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddResolutions (<br>
3386&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
a2326b5b 3387&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
5a738aea
MS
3388&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3389&nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
79e1d494 3390&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_res_t">ipp_res_t</a> units,<br>
5a738aea
MS
3391&nbsp;&nbsp;&nbsp;&nbsp;const int *xres,<br>
3392&nbsp;&nbsp;&nbsp;&nbsp;const int *yres<br>
3393);</p>
3394<h4 class="parameters">Parameters</h4>
3395<dl>
3396<dt>ipp</dt>
3397<dd class="description">IPP message</dd>
3398<dt>group</dt>
3399<dd class="description">IPP group</dd>
3400<dt>name</dt>
3401<dd class="description">Name of attribute</dd>
3402<dt>num_values</dt>
3403<dd class="description">Number of values</dd>
3404<dt>units</dt>
3405<dd class="description">Units for resolution</dd>
3406<dt>xres</dt>
3407<dd class="description">X resolutions</dd>
3408<dt>yres</dt>
3409<dd class="description">Y resolutions</dd>
3410</dl>
3411<h4 class="returnvalue">Return Value</h4>
3412<p class="description">New attribute</p>
a2326b5b 3413<h4 class="discussion">Discussion</h4>
a469f8a5
MS
3414<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3415the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
3416<br>
3417The <code>group</code> parameter specifies the IPP attribute group tag: none
3418(<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3419event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3420(<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3421(<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).</p>
5a738aea
MS
3422<h3 class="function"><a name="ippAddSeparator">ippAddSeparator</a></h3>
3423<p class="description">Add a group separator to an IPP message.</p>
3424<p class="code">
3425<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddSeparator (<br>
3426&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
3427);</p>
3428<h4 class="parameters">Parameters</h4>
3429<dl>
3430<dt>ipp</dt>
3431<dd class="description">IPP message</dd>
3432</dl>
3433<h4 class="returnvalue">Return Value</h4>
3434<p class="description">New attribute</p>
a2326b5b 3435<h4 class="discussion">Discussion</h4>
a469f8a5
MS
3436<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3437the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.</p>
5a738aea
MS
3438<h3 class="function"><a name="ippAddString">ippAddString</a></h3>
3439<p class="description">Add a language-encoded string to an IPP message.</p>
3440<p class="code">
3441<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddString (<br>
3442&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
a2326b5b
MS
3443&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3444&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t value_tag,<br>
5a738aea 3445&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
a2326b5b 3446&nbsp;&nbsp;&nbsp;&nbsp;const char *language,<br>
5a738aea
MS
3447&nbsp;&nbsp;&nbsp;&nbsp;const char *value<br>
3448);</p>
3449<h4 class="parameters">Parameters</h4>
3450<dl>
3451<dt>ipp</dt>
3452<dd class="description">IPP message</dd>
3453<dt>group</dt>
3454<dd class="description">IPP group</dd>
a2326b5b 3455<dt>value_tag</dt>
5a738aea
MS
3456<dd class="description">Type of attribute</dd>
3457<dt>name</dt>
3458<dd class="description">Name of attribute</dd>
a2326b5b
MS
3459<dt>language</dt>
3460<dd class="description">Language code</dd>
5a738aea
MS
3461<dt>value</dt>
3462<dd class="description">Value</dd>
3463</dl>
3464<h4 class="returnvalue">Return Value</h4>
3465<p class="description">New attribute</p>
a2326b5b 3466<h4 class="discussion">Discussion</h4>
a469f8a5
MS
3467<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3468the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
3469<br>
3470The <code>group</code> parameter specifies the IPP attribute group tag: none
3471(<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3472event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3473(<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3474(<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3475<br>
3476Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword
3477(<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType
3478(<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage
3479(<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage
3480(<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme
3481(<code>IPP_TAG_URISCHEME</code>).<br>
3482<br>
3483The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage and
3484textWithLanguage string values and must be <code>NULL</code> for all other string values.</p>
a469f8a5
MS
3485<h3 class="function"><span class="info">&nbsp;CUPS 1.7&nbsp;</span><a name="ippAddStringf">ippAddStringf</a></h3>
3486<p class="description">Add a formatted string to an IPP message.</p>
3487<p class="code">
3488<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStringf (<br>
3489&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3490&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3491&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t value_tag,<br>
3492&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3493&nbsp;&nbsp;&nbsp;&nbsp;const char *language,<br>
3494&nbsp;&nbsp;&nbsp;&nbsp;const char *format,<br>
3495&nbsp;&nbsp;&nbsp;&nbsp;...<br>
3496);</p>
3497<h4 class="parameters">Parameters</h4>
3498<dl>
3499<dt>ipp</dt>
3500<dd class="description">IPP message</dd>
3501<dt>group</dt>
3502<dd class="description">IPP group</dd>
3503<dt>value_tag</dt>
3504<dd class="description">Type of attribute</dd>
3505<dt>name</dt>
3506<dd class="description">Name of attribute</dd>
3507<dt>language</dt>
3508<dd class="description">Language code (<code>NULL</code> for default)</dd>
3509<dt>format</dt>
3510<dd class="description">Printf-style format string</dd>
3511<dt>...</dt>
3512<dd class="description">Additional arguments as needed</dd>
3513</dl>
3514<h4 class="returnvalue">Return Value</h4>
3515<p class="description">New attribute</p>
3516<h4 class="discussion">Discussion</h4>
3517<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3518the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3519<br>
3520The <code>group</code> parameter specifies the IPP attribute group tag: none
3521(<code>IPP_TAG_ZERO</code>, for member attributes), document
3522(<code>IPP_TAG_DOCUMENT</code>), event notification
3523(<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation (<code>IPP_TAG_OPERATION</code>),
3524printer (<code>IPP_TAG_PRINTER</code>), subscription (<code>IPP_TAG_SUBSCRIPTION</code>),
3525or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3526<br>
3527Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword
3528(<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType
3529(<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage
3530(<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage
3531(<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme
3532(<code>IPP_TAG_URISCHEME</code>).<br>
3533<br>
3534The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage
3535and textWithLanguage string values and must be <code>NULL</code> for all other
3536string values.<br>
3537<br>
3538The <code>format</code> parameter uses formatting characters compatible with the
3539printf family of standard functions. Additional arguments follow it as
3540needed. The formatted string is truncated as needed to the maximum length of
3541the corresponding value type.
3542
3543</p>
3544<h3 class="function"><span class="info">&nbsp;CUPS 1.7&nbsp;</span><a name="ippAddStringfv">ippAddStringfv</a></h3>
3545<p class="description">Add a formatted string to an IPP message.</p>
3546<p class="code">
3547<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStringfv (<br>
3548&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3549&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3550&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t value_tag,<br>
3551&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3552&nbsp;&nbsp;&nbsp;&nbsp;const char *language,<br>
3553&nbsp;&nbsp;&nbsp;&nbsp;const char *format,<br>
3554&nbsp;&nbsp;&nbsp;&nbsp;va_list ap<br>
3555);</p>
3556<h4 class="parameters">Parameters</h4>
3557<dl>
3558<dt>ipp</dt>
3559<dd class="description">IPP message</dd>
3560<dt>group</dt>
3561<dd class="description">IPP group</dd>
3562<dt>value_tag</dt>
3563<dd class="description">Type of attribute</dd>
3564<dt>name</dt>
3565<dd class="description">Name of attribute</dd>
3566<dt>language</dt>
3567<dd class="description">Language code (<code>NULL</code> for default)</dd>
3568<dt>format</dt>
3569<dd class="description">Printf-style format string</dd>
3570<dt>ap</dt>
3571<dd class="description">Additional arguments</dd>
3572</dl>
3573<h4 class="returnvalue">Return Value</h4>
3574<p class="description">New attribute</p>
3575<h4 class="discussion">Discussion</h4>
3576<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3577the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3578<br>
3579The <code>group</code> parameter specifies the IPP attribute group tag: none
3580(<code>IPP_TAG_ZERO</code>, for member attributes), document
3581(<code>IPP_TAG_DOCUMENT</code>), event notification
3582(<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation (<code>IPP_TAG_OPERATION</code>),
3583printer (<code>IPP_TAG_PRINTER</code>), subscription (<code>IPP_TAG_SUBSCRIPTION</code>),
3584or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3585<br>
3586Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword
3587(<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType
3588(<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage
3589(<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage
3590(<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme
3591(<code>IPP_TAG_URISCHEME</code>).<br>
3592<br>
3593The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage
3594and textWithLanguage string values and must be <code>NULL</code> for all other
3595string values.<br>
3596<br>
3597The <code>format</code> parameter uses formatting characters compatible with the
3598printf family of standard functions. Additional arguments are passed in the
3599stdarg pointer <code>ap</code>. The formatted string is truncated as needed to the
3600maximum length of the corresponding value type.
3601
3602</p>
5a738aea
MS
3603<h3 class="function"><a name="ippAddStrings">ippAddStrings</a></h3>
3604<p class="description">Add language-encoded strings to an IPP message.</p>
3605<p class="code">
3606<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStrings (<br>
3607&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
a2326b5b
MS
3608&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group,<br>
3609&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t value_tag,<br>
5a738aea
MS
3610&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
3611&nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
a2326b5b 3612&nbsp;&nbsp;&nbsp;&nbsp;const char *language,<br>
5a738aea
MS
3613&nbsp;&nbsp;&nbsp;&nbsp;const char *const *values<br>
3614);</p>
3615<h4 class="parameters">Parameters</h4>
3616<dl>
3617<dt>ipp</dt>
3618<dd class="description">IPP message</dd>
3619<dt>group</dt>
3620<dd class="description">IPP group</dd>
a2326b5b 3621<dt>value_tag</dt>
5a738aea
MS
3622<dd class="description">Type of attribute</dd>
3623<dt>name</dt>
3624<dd class="description">Name of attribute</dd>
3625<dt>num_values</dt>
3626<dd class="description">Number of values</dd>
a2326b5b
MS
3627<dt>language</dt>
3628<dd class="description">Language code (<code>NULL</code> for default)</dd>
5a738aea
MS
3629<dt>values</dt>
3630<dd class="description">Values</dd>
3631</dl>
3632<h4 class="returnvalue">Return Value</h4>
3633<p class="description">New attribute</p>
a2326b5b 3634<h4 class="discussion">Discussion</h4>
a469f8a5
MS
3635<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
3636the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
3637<br>
3638The <code>group</code> parameter specifies the IPP attribute group tag: none
3639(<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
3640event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
3641(<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
3642(<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).<br>
3643<br>
3644Supported string values include charset (<code>IPP_TAG_CHARSET</code>), keyword
3645(<code>IPP_TAG_KEYWORD</code>), language (<code>IPP_TAG_LANGUAGE</code>), mimeMediaType
3646(<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code>), nameWithLanguage
3647(<code>IPP_TAG_NAMELANG), text (</code>code IPP_TAG_TEXT@), textWithLanguage
3648(<code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), and uriScheme
3649(<code>IPP_TAG_URISCHEME</code>).<br>
3650<br>
3651The <code>language</code> parameter must be non-<code>NULL</code> for nameWithLanguage and
3652textWithLanguage string values and must be <code>NULL</code> for all other string values.</p>
f3c17241 3653<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippAttributeString">ippAttributeString</a></h3>
a2326b5b
MS
3654<p class="description">Convert the attribute's value to a string.</p>
3655<p class="code">
3656size_t ippAttributeString (<br>
3657&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
3658&nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
3659&nbsp;&nbsp;&nbsp;&nbsp;size_t bufsize<br>
3660);</p>
3661<h4 class="parameters">Parameters</h4>
3662<dl>
3663<dt>attr</dt>
3664<dd class="description">Attribute</dd>
3665<dt>buffer</dt>
3666<dd class="description">String buffer or NULL</dd>
3667<dt>bufsize</dt>
3668<dd class="description">Size of string buffer</dd>
3669</dl>
3670<h4 class="returnvalue">Return Value</h4>
3671<p class="description">Number of bytes less nul</p>
3672<h4 class="discussion">Discussion</h4>
3673<p class="discussion">Returns the number of bytes that would be written, not including the
3674trailing nul. The buffer pointer can be NULL to get the required length,
3675just like (v)snprintf.
3676
a469f8a5
MS
3677</p>
3678<h3 class="function"><span class="info">&nbsp;CUPS 1.7&nbsp;</span><a name="ippContainsInteger">ippContainsInteger</a></h3>
3679<p class="description">Determine whether an attribute contains the
3680specified value or is within the list of ranges.</p>
3681<p class="code">
3682int ippContainsInteger (<br>
3683&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
3684&nbsp;&nbsp;&nbsp;&nbsp;int value<br>
3685);</p>
3686<h4 class="parameters">Parameters</h4>
3687<dl>
3688<dt>attr</dt>
3689<dd class="description">Attribute</dd>
3690<dt>value</dt>
3691<dd class="description">Integer/enum value</dd>
3692</dl>
3693<h4 class="returnvalue">Return Value</h4>
3694<p class="description">1 on a match, 0 on no match</p>
3695<h4 class="discussion">Discussion</h4>
3696<p class="discussion">Returns non-zero when the attribute contains either a matching integer or
3697enum value, or the value falls within one of the rangeOfInteger values for
3698the attribute.
3699
3700</p>
3701<h3 class="function"><span class="info">&nbsp;CUPS 1.7&nbsp;</span><a name="ippContainsString">ippContainsString</a></h3>
3702<p class="description">Determine whether an attribute contains the
3703specified string value.</p>
3704<p class="code">
3705int ippContainsString (<br>
3706&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
3707&nbsp;&nbsp;&nbsp;&nbsp;const char *value<br>
3708);</p>
3709<h4 class="parameters">Parameters</h4>
3710<dl>
3711<dt>attr</dt>
3712<dd class="description">Attribute</dd>
3713<dt>value</dt>
3714<dd class="description">String value</dd>
3715</dl>
3716<h4 class="returnvalue">Return Value</h4>
3717<p class="description">1 on a match, 0 on no match</p>
3718<h4 class="discussion">Discussion</h4>
3719<p class="discussion">Returns non-zero when the attribute contains a matching charset, keyword,
3720language, mimeMediaType, name, text, URI, or URI scheme value.
3721
a2326b5b 3722</p>
f3c17241 3723<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippCopyAttribute">ippCopyAttribute</a></h3>
a2326b5b
MS
3724<p class="description">Copy an attribute.</p>
3725<p class="code">
3726<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippCopyAttribute (<br>
3727&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *dst,<br>
3728&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *srcattr,<br>
3729&nbsp;&nbsp;&nbsp;&nbsp;int quickcopy<br>
3730);</p>
3731<h4 class="parameters">Parameters</h4>
3732<dl>
3733<dt>dst</dt>
3734<dd class="description">Destination IPP message</dd>
3735<dt>srcattr</dt>
3736<dd class="description">Attribute to copy</dd>
3737<dt>quickcopy</dt>
3738<dd class="description">1 for a referenced copy, 0 for normal</dd>
3739</dl>
3740<h4 class="returnvalue">Return Value</h4>
3741<p class="description">New attribute</p>
3742<h4 class="discussion">Discussion</h4>
3743<p class="discussion">The specified attribute, <code>attr</code>, is copied to the destination IPP message.
3744When <code>quickcopy</code> is non-zero, a &quot;shallow&quot; reference copy of the attribute is
3745created - this should only be done as long as the original source IPP message will
3746not be freed for the life of the destination.
3747
3748</p>
f3c17241 3749<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippCopyAttributes">ippCopyAttributes</a></h3>
a2326b5b
MS
3750<p class="description">Copy attributes from one IPP message to another.</p>
3751<p class="code">
3752int ippCopyAttributes (<br>
3753&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *dst,<br>
3754&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *src,<br>
3755&nbsp;&nbsp;&nbsp;&nbsp;int quickcopy,<br>
3756&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_copycb_t">ipp_copycb_t</a> cb,<br>
3757&nbsp;&nbsp;&nbsp;&nbsp;void *context<br>
3758);</p>
3759<h4 class="parameters">Parameters</h4>
3760<dl>
3761<dt>dst</dt>
3762<dd class="description">Destination IPP message</dd>
3763<dt>src</dt>
3764<dd class="description">Source IPP message</dd>
3765<dt>quickcopy</dt>
3766<dd class="description">1 for a referenced copy, 0 for normal</dd>
3767<dt>cb</dt>
3768<dd class="description">Copy callback or <code>NULL</code> for none</dd>
3769<dt>context</dt>
3770<dd class="description">Context pointer</dd>
3771</dl>
3772<h4 class="returnvalue">Return Value</h4>
3773<p class="description">1 on success, 0 on error</p>
3774<h4 class="discussion">Discussion</h4>
3775<p class="discussion">Zero or more attributes are copied from the source IPP message, @code@ src, to the
3776destination IPP message, <code>dst</code>. When <code>quickcopy</code> is non-zero, a &quot;shallow&quot;
3777reference copy of the attribute is created - this should only be done as long as the
3778original source IPP message will not be freed for the life of the destination.<br>
3779<br>
3780The <code>cb</code> and <code>context</code> parameters provide a generic way to &quot;filter&quot; the
3781attributes that are copied - the function must return 1 to copy the attribute or
37820 to skip it. The function may also choose to do a partial copy of the source attribute
3783itself.
3784
3785</p>
5a738aea
MS
3786<h3 class="function"><a name="ippDateToTime">ippDateToTime</a></h3>
3787<p class="description">Convert from RFC 1903 Date/Time format to UNIX time
3788in seconds.</p>
3789<p class="code">
3790time_t ippDateToTime (<br>
3791&nbsp;&nbsp;&nbsp;&nbsp;const <a href="#ipp_uchar_t">ipp_uchar_t</a> *date<br>
3792);</p>
3793<h4 class="parameters">Parameters</h4>
3794<dl>
3795<dt>date</dt>
3796<dd class="description">RFC 1903 date info</dd>
3797</dl>
3798<h4 class="returnvalue">Return Value</h4>
3799<p class="description">UNIX time value</p>
3800<h3 class="function"><a name="ippDelete">ippDelete</a></h3>
3801<p class="description">Delete an IPP message.</p>
3802<p class="code">
3803void ippDelete (<br>
3804&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
3805);</p>
3806<h4 class="parameters">Parameters</h4>
3807<dl>
3808<dt>ipp</dt>
3809<dd class="description">IPP message</dd>
3810</dl>
f3c17241 3811<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="ippDeleteAttribute">ippDeleteAttribute</a></h3>
5a738aea
MS
3812<p class="description">Delete a single attribute in an IPP message.</p>
3813<p class="code">
3814void ippDeleteAttribute (<br>
3815&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3816&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
3817);</p>
3818<h4 class="parameters">Parameters</h4>
3819<dl>
3820<dt>ipp</dt>
3821<dd class="description">IPP message</dd>
3822<dt>attr</dt>
3823<dd class="description">Attribute to delete</dd>
3824</dl>
f3c17241 3825<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippDeleteValues">ippDeleteValues</a></h3>
a2326b5b
MS
3826<p class="description">Delete values in an attribute.</p>
3827<p class="code">
3828int ippDeleteValues (<br>
3829&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3e7fe0ca 3830&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
a2326b5b
MS
3831&nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
3832&nbsp;&nbsp;&nbsp;&nbsp;int count<br>
3833);</p>
3834<h4 class="parameters">Parameters</h4>
3835<dl>
3836<dt>ipp</dt>
3837<dd class="description">IPP message</dd>
3838<dt>attr</dt>
3839<dd class="description">Attribute</dd>
3840<dt>element</dt>
3841<dd class="description">Index of first value to delete (0-based)</dd>
3842<dt>count</dt>
3843<dd class="description">Number of values to delete</dd>
3844</dl>
3845<h4 class="returnvalue">Return Value</h4>
3846<p class="description">1 on success, 0 on failure</p>
3847<h4 class="discussion">Discussion</h4>
3e7fe0ca
MS
3848<p class="discussion">The <code>element</code> parameter specifies the first value to delete, starting at
38490. It must be less than the number of values returned by <a href="#ippGetCount"><code>ippGetCount</code></a>.<br>
3850<br>
3851The <code>attr</code> parameter may be modified as a result of setting the value.<br>
a2326b5b
MS
3852<br>
3853Deleting all values in an attribute deletes the attribute.
3854
3855</p>
3856<h3 class="function"><a name="ippEnumString">ippEnumString</a></h3>
3857<p class="description">Return a string corresponding to the enum value.</p>
3858<p class="code">
3859const char *ippEnumString (<br>
3860&nbsp;&nbsp;&nbsp;&nbsp;const char *attrname,<br>
3861&nbsp;&nbsp;&nbsp;&nbsp;int enumvalue<br>
3862);</p>
3863<h4 class="parameters">Parameters</h4>
3864<dl>
3865<dt>attrname</dt>
3866<dd class="description">Attribute name</dd>
3867<dt>enumvalue</dt>
3868<dd class="description">Enum value</dd>
3869</dl>
3870<h4 class="returnvalue">Return Value</h4>
3871<p class="description">Enum string</p>
3872<h3 class="function"><a name="ippEnumValue">ippEnumValue</a></h3>
3873<p class="description">Return the value associated with a given enum string.</p>
3874<p class="code">
3875int ippEnumValue (<br>
3876&nbsp;&nbsp;&nbsp;&nbsp;const char *attrname,<br>
3877&nbsp;&nbsp;&nbsp;&nbsp;const char *enumstring<br>
3878);</p>
3879<h4 class="parameters">Parameters</h4>
3880<dl>
3881<dt>attrname</dt>
3882<dd class="description">Attribute name</dd>
3883<dt>enumstring</dt>
3884<dd class="description">Enum string</dd>
3885</dl>
3886<h4 class="returnvalue">Return Value</h4>
3887<p class="description">Enum value or -1 if unknown</p>
5a738aea
MS
3888<h3 class="function"><a name="ippErrorString">ippErrorString</a></h3>
3889<p class="description">Return a name for the given status code.</p>
3890<p class="code">
3891const char *ippErrorString (<br>
3892&nbsp;&nbsp;&nbsp;&nbsp;ipp_status_t error<br>
3893);</p>
3894<h4 class="parameters">Parameters</h4>
3895<dl>
3896<dt>error</dt>
3897<dd class="description">Error status</dd>
3898</dl>
3899<h4 class="returnvalue">Return Value</h4>
3900<p class="description">Text string</p>
f3c17241 3901<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ippErrorValue">ippErrorValue</a></h3>
5a738aea
MS
3902<p class="description">Return a status code for the given name.</p>
3903<p class="code">
3904ipp_status_t ippErrorValue (<br>
3905&nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
3906);</p>
3907<h4 class="parameters">Parameters</h4>
3908<dl>
3909<dt>name</dt>
3910<dd class="description">Name</dd>
3911</dl>
3912<h4 class="returnvalue">Return Value</h4>
3913<p class="description">IPP status code</p>
3914<h3 class="function"><a name="ippFindAttribute">ippFindAttribute</a></h3>
3e7fe0ca 3915<p class="description">Find a named attribute in a request.</p>
5a738aea
MS
3916<p class="code">
3917<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFindAttribute (<br>
3918&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3919&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
a2326b5b 3920&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t type<br>
5a738aea
MS
3921);</p>
3922<h4 class="parameters">Parameters</h4>
3923<dl>
3924<dt>ipp</dt>
3925<dd class="description">IPP message</dd>
3926<dt>name</dt>
3927<dd class="description">Name of attribute</dd>
3928<dt>type</dt>
3929<dd class="description">Type of attribute</dd>
3930</dl>
3931<h4 class="returnvalue">Return Value</h4>
3932<p class="description">Matching attribute</p>
3933<h3 class="function"><a name="ippFindNextAttribute">ippFindNextAttribute</a></h3>
3e7fe0ca 3934<p class="description">Find the next named attribute in a request.</p>
5a738aea
MS
3935<p class="code">
3936<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFindNextAttribute (<br>
3937&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
3938&nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
a2326b5b 3939&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t type<br>
5a738aea
MS
3940);</p>
3941<h4 class="parameters">Parameters</h4>
3942<dl>
3943<dt>ipp</dt>
3944<dd class="description">IPP message</dd>
3945<dt>name</dt>
3946<dd class="description">Name of attribute</dd>
3947<dt>type</dt>
3948<dd class="description">Type of attribute</dd>
3949</dl>
3950<h4 class="returnvalue">Return Value</h4>
3951<p class="description">Matching attribute</p>
f3c17241 3952<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippFirstAttribute">ippFirstAttribute</a></h3>
a2326b5b 3953<p class="description">Return the first attribute in the message.</p>
5a738aea 3954<p class="code">
a2326b5b 3955<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFirstAttribute (<br>
5a738aea
MS
3956&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
3957);</p>
3958<h4 class="parameters">Parameters</h4>
3959<dl>
3960<dt>ipp</dt>
3961<dd class="description">IPP message</dd>
3962</dl>
3963<h4 class="returnvalue">Return Value</h4>
a2326b5b 3964<p class="description">First attribute or <code>NULL</code> if none</p>
f3c17241 3965<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippGetBoolean">ippGetBoolean</a></h3>
a2326b5b 3966<p class="description">Get a boolean value for an attribute.</p>
5a738aea 3967<p class="code">
a2326b5b
MS
3968int ippGetBoolean (<br>
3969&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
3970&nbsp;&nbsp;&nbsp;&nbsp;int element<br>
5a738aea
MS
3971);</p>
3972<h4 class="parameters">Parameters</h4>
3973<dl>
a2326b5b
MS
3974<dt>attr</dt>
3975<dd class="description">IPP attribute</dd>
3976<dt>element</dt>
3977<dd class="description">Value number (0-based)</dd>
5a738aea
MS
3978</dl>
3979<h4 class="returnvalue">Return Value</h4>
a2326b5b 3980<p class="description">Boolean value or -1 on error</p>
5a738aea 3981<h4 class="discussion">Discussion</h4>
a2326b5b
MS
3982<p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
3983<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
ecdc0628 3984
5a738aea 3985</p>
f3c17241 3986<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippGetCollection">ippGetCollection</a></h3>
a2326b5b 3987<p class="description">Get a collection value for an attribute.</p>
5a738aea 3988<p class="code">
a2326b5b
MS
3989<a href="#ipp_t">ipp_t</a> *ippGetCollection (<br>
3990&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
3991&nbsp;&nbsp;&nbsp;&nbsp;int element<br>
5a738aea
MS
3992);</p>
3993<h4 class="parameters">Parameters</h4>
3994<dl>
a2326b5b
MS
3995<dt>attr</dt>
3996<dd class="description">IPP attribute</dd>
3997<dt>element</dt>
3998<dd class="description">Value number (0-based)</dd>
5a738aea
MS
3999</dl>
4000<h4 class="returnvalue">Return Value</h4>
a2326b5b
MS
4001<p class="description">Collection value or <code>NULL</code> on error</p>
4002<h4 class="discussion">Discussion</h4>
4003<p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4004<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4005
4006</p>
f3c17241 4007<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippGetCount">ippGetCount</a></h3>
a2326b5b 4008<p class="description">Get the number of values in an attribute.</p>
5a738aea 4009<p class="code">
a2326b5b
MS
4010int ippGetCount (<br>
4011&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
5a738aea
MS
4012);</p>
4013<h4 class="parameters">Parameters</h4>
4014<dl>
a2326b5b
MS
4015<dt>attr</dt>
4016<dd class="description">IPP attribute</dd>
5a738aea
MS
4017</dl>
4018<h4 class="returnvalue">Return Value</h4>
a2326b5b 4019<p class="description">Number of values or -1 on error</p>
f3c17241 4020<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippGetDate">ippGetDate</a></h3>
3e7fe0ca
MS
4021<p class="description">Get a date value for an attribute.</p>
4022<p class="code">
4023const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippGetDate (<br>
4024&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
4025&nbsp;&nbsp;&nbsp;&nbsp;int element<br>
4026);</p>
4027<h4 class="parameters">Parameters</h4>
4028<dl>
4029<dt>attr</dt>
4030<dd class="description">IPP attribute</dd>
4031<dt>element</dt>
4032<dd class="description">Value number (0-based)</dd>
4033</dl>
4034<h4 class="returnvalue">Return Value</h4>
4035<p class="description">Date value or <code>NULL</code></p>
4036<h4 class="discussion">Discussion</h4>
4037<p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4038<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4039
4040</p>
f3c17241 4041<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippGetGroupTag">ippGetGroupTag</a></h3>
a2326b5b 4042<p class="description">Get the group associated with an attribute.</p>
5a738aea 4043<p class="code">
a2326b5b
MS
4044ipp_tag_t ippGetGroupTag (<br>
4045&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
4046);</p>
4047<h4 class="parameters">Parameters</h4>
4048<dl>
4049<dt>attr</dt>
4050<dd class="description">IPP attribute</dd>
4051</dl>
5a738aea 4052<h4 class="returnvalue">Return Value</h4>
a2326b5b 4053<p class="description">Group tag or <code>IPP_TAG_ZERO</code> on error</p>
f3c17241 4054<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippGetInteger">ippGetInteger</a></h3>
a2326b5b 4055<p class="description">Get the integer/enum value for an attribute.</p>
5a738aea 4056<p class="code">
a2326b5b
MS
4057int ippGetInteger (<br>
4058&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
4059&nbsp;&nbsp;&nbsp;&nbsp;int element<br>
5a738aea
MS
4060);</p>
4061<h4 class="parameters">Parameters</h4>
4062<dl>
a2326b5b
MS
4063<dt>attr</dt>
4064<dd class="description">IPP attribute</dd>
4065<dt>element</dt>
4066<dd class="description">Value number (0-based)</dd>
5a738aea
MS
4067</dl>
4068<h4 class="returnvalue">Return Value</h4>
a2326b5b
MS
4069<p class="description">Value or -1 on error</p>
4070<h4 class="discussion">Discussion</h4>
4071<p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4072<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4073
4074</p>
f3c17241 4075<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippGetName">ippGetName</a></h3>
a2326b5b 4076<p class="description">Get the attribute name.</p>
5a738aea 4077<p class="code">
a2326b5b
MS
4078const char *ippGetName (<br>
4079&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
5a738aea
MS
4080);</p>
4081<h4 class="parameters">Parameters</h4>
4082<dl>
a2326b5b
MS
4083<dt>attr</dt>
4084<dd class="description">IPP attribute</dd>
5a738aea
MS
4085</dl>
4086<h4 class="returnvalue">Return Value</h4>
a2326b5b 4087<p class="description">Attribute name or <code>NULL</code> for separators</p>
f3c17241 4088<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippGetOperation">ippGetOperation</a></h3>
a2326b5b 4089<p class="description">Get the operation ID in an IPP message.</p>
5a738aea 4090<p class="code">
a2326b5b 4091ipp_op_t ippGetOperation (<br>
5a738aea
MS
4092&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4093);</p>
4094<h4 class="parameters">Parameters</h4>
4095<dl>
5a738aea 4096<dt>ipp</dt>
a2326b5b 4097<dd class="description">IPP request message</dd>
5a738aea
MS
4098</dl>
4099<h4 class="returnvalue">Return Value</h4>
a2326b5b 4100<p class="description">Operation ID or -1 on error</p>
f3c17241 4101<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippGetRange">ippGetRange</a></h3>
3e7fe0ca
MS
4102<p class="description">Get a rangeOfInteger value from an attribute.</p>
4103<p class="code">
4104int ippGetRange (<br>
4105&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
4106&nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4107&nbsp;&nbsp;&nbsp;&nbsp;int *uppervalue<br>
4108);</p>
4109<h4 class="parameters">Parameters</h4>
4110<dl>
4111<dt>attr</dt>
4112<dd class="description">IPP attribute</dd>
4113<dt>element</dt>
4114<dd class="description">Value number (0-based)</dd>
4115<dt>uppervalue</dt>
4116<dd class="description">Upper value of range</dd>
4117</dl>
4118<h4 class="returnvalue">Return Value</h4>
4119<p class="description">Lower value of range or -1</p>
4120<h4 class="discussion">Discussion</h4>
4121<p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4122<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4123
4124</p>
f3c17241 4125<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippGetRequestId">ippGetRequestId</a></h3>
a2326b5b 4126<p class="description">Get the request ID from an IPP message.</p>
5a738aea 4127<p class="code">
a2326b5b
MS
4128int ippGetRequestId (<br>
4129&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
5a738aea
MS
4130);</p>
4131<h4 class="parameters">Parameters</h4>
4132<dl>
a2326b5b
MS
4133<dt>ipp</dt>
4134<dd class="description">IPP message</dd>
5a738aea 4135</dl>
a2326b5b
MS
4136<h4 class="returnvalue">Return Value</h4>
4137<p class="description">Request ID or -1 on error</p>
f3c17241 4138<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippGetResolution">ippGetResolution</a></h3>
a2326b5b
MS
4139<p class="description">Get a resolution value for an attribute.</p>
4140<p class="code">
4141int ippGetResolution (<br>
4142&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
4143&nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4144&nbsp;&nbsp;&nbsp;&nbsp;int *yres,<br>
4145&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_res_t">ipp_res_t</a> *units<br>
06d4e77b
MS
4146);</p>
4147<h4 class="parameters">Parameters</h4>
4148<dl>
a2326b5b
MS
4149<dt>attr</dt>
4150<dd class="description">IPP attribute</dd>
4151<dt>element</dt>
4152<dd class="description">Value number (0-based)</dd>
4153<dt>yres</dt>
4154<dd class="description">Vertical/feed resolution</dd>
4155<dt>units</dt>
4156<dd class="description">Units for resolution</dd>
4157</dl>
4158<h4 class="returnvalue">Return Value</h4>
4159<p class="description">Horizontal/cross feed resolution or -1</p>
4160<h4 class="discussion">Discussion</h4>
4161<p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4162<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4163
4164</p>
f3c17241 4165<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippGetState">ippGetState</a></h3>
3e7fe0ca
MS
4166<p class="description">Get the IPP message state.</p>
4167<p class="code">
4168<a href="#ipp_state_t">ipp_state_t</a> ippGetState (<br>
4169&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4170);</p>
4171<h4 class="parameters">Parameters</h4>
4172<dl>
4173<dt>ipp</dt>
4174<dd class="description">IPP message</dd>
4175</dl>
4176<h4 class="returnvalue">Return Value</h4>
4177<p class="description">IPP message state value</p>
f3c17241 4178<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippGetStatusCode">ippGetStatusCode</a></h3>
a2326b5b
MS
4179<p class="description">Get the status code from an IPP response or event message.</p>
4180<p class="code">
4181ipp_status_t ippGetStatusCode (<br>
4182&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4183);</p>
4184<h4 class="parameters">Parameters</h4>
4185<dl>
4186<dt>ipp</dt>
4187<dd class="description">IPP response or event message</dd>
4188</dl>
4189<h4 class="returnvalue">Return Value</h4>
4190<p class="description">Status code in IPP message</p>
4191<h3 class="function"><a name="ippGetString">ippGetString</a></h3>
4192<p class="description">Return the value...</p>
4193<p class="code">
4194const char *ippGetString (<br>
4195&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr,<br>
4196&nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4197&nbsp;&nbsp;&nbsp;&nbsp;const char **language<br>
4198);</p>
4199<h4 class="parameters">Parameters</h4>
4200<dl>
4201<dt>attr</dt>
4202<dd class="description">IPP attribute</dd>
4203<dt>element</dt>
4204<dd class="description">Value number (0-based)</dd>
4205<dt>language</dt>
4206<dd class="description">Language code (<code>NULL</code> for don't care)</dd>
4207</dl>
4208<h4 class="returnvalue">Return Value</h4>
4209<p class="description">Get the string and optionally the language code for an attribute.</p>
4210<p class="discussion">The <code>element</code> parameter specifies which value to get from 0 to
4211<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a> - 1.
4212
4213</p>
f3c17241 4214<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippGetValueTag">ippGetValueTag</a></h3>
a2326b5b
MS
4215<p class="description">Get the value tag for an attribute.</p>
4216<p class="code">
4217ipp_tag_t ippGetValueTag (<br>
4218&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
4219);</p>
4220<h4 class="parameters">Parameters</h4>
4221<dl>
4222<dt>attr</dt>
4223<dd class="description">IPP attribute</dd>
4224</dl>
4225<h4 class="returnvalue">Return Value</h4>
4226<p class="description">Value tag or <code>IPP_TAG_ZERO</code> on error</p>
f3c17241 4227<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippGetVersion">ippGetVersion</a></h3>
a2326b5b
MS
4228<p class="description">Get the major and minor version number from an IPP message.</p>
4229<p class="code">
4230int ippGetVersion (<br>
4231&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4232&nbsp;&nbsp;&nbsp;&nbsp;int *minor<br>
4233);</p>
4234<h4 class="parameters">Parameters</h4>
4235<dl>
4236<dt>ipp</dt>
4237<dd class="description">IPP message</dd>
4238<dt>minor</dt>
4239<dd class="description">Minor version number or <code>NULL</code></dd>
4240</dl>
4241<h4 class="returnvalue">Return Value</h4>
4242<p class="description">Major version number or -1 on error</p>
4243<h3 class="function"><a name="ippLength">ippLength</a></h3>
4244<p class="description">Compute the length of an IPP message.</p>
4245<p class="code">
4246size_t ippLength (<br>
4247&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4248);</p>
4249<h4 class="parameters">Parameters</h4>
4250<dl>
4251<dt>ipp</dt>
4252<dd class="description">IPP message</dd>
4253</dl>
4254<h4 class="returnvalue">Return Value</h4>
4255<p class="description">Size of IPP message</p>
4256<h3 class="function"><a name="ippNew">ippNew</a></h3>
4257<p class="description">Allocate a new IPP message.</p>
4258<p class="code">
4259<a href="#ipp_t">ipp_t</a> *ippNew (void);</p>
4260<h4 class="returnvalue">Return Value</h4>
4261<p class="description">New IPP message</p>
f3c17241 4262<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ippNewRequest">ippNewRequest</a></h3>
a2326b5b
MS
4263<p class="description">Allocate a new IPP request message.</p>
4264<p class="code">
4265<a href="#ipp_t">ipp_t</a> *ippNewRequest (<br>
4266&nbsp;&nbsp;&nbsp;&nbsp;ipp_op_t op<br>
4267);</p>
4268<h4 class="parameters">Parameters</h4>
4269<dl>
4270<dt>op</dt>
4271<dd class="description">Operation code</dd>
4272</dl>
4273<h4 class="returnvalue">Return Value</h4>
4274<p class="description">IPP request message</p>
4275<h4 class="discussion">Discussion</h4>
4276<p class="discussion">The new request message is initialized with the attributes-charset and
4277attributes-natural-language attributes added. The
4278attributes-natural-language value is derived from the current locale.
4279
a469f8a5
MS
4280</p>
4281<h3 class="function"><span class="info">&nbsp;CUPS 1.7&nbsp;</span><a name="ippNewResponse">ippNewResponse</a></h3>
4282<p class="description">Allocate a new IPP response message.</p>
4283<p class="code">
4284<a href="#ipp_t">ipp_t</a> *ippNewResponse (<br>
4285&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *request<br>
4286);</p>
4287<h4 class="parameters">Parameters</h4>
4288<dl>
4289<dt>request</dt>
4290<dd class="description">IPP request message</dd>
4291</dl>
4292<h4 class="returnvalue">Return Value</h4>
4293<p class="description">IPP response message</p>
4294<h4 class="discussion">Discussion</h4>
4295<p class="discussion">The new response message is initialized with the same version-number,
4296request-id, attributes-charset, and attributes-natural-language as the
4297provided request message. If the attributes-charset or
4298attributes-natural-language attributes are missing from the request,
4299&quot;utf-8&quot; and a value derived from the current locale are substituted,
4300respectively.
4301
a2326b5b 4302</p>
f3c17241 4303<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippNextAttribute">ippNextAttribute</a></h3>
a2326b5b
MS
4304<p class="description">Return the next attribute in the message.</p>
4305<p class="code">
4306<a href="#ipp_attribute_t">ipp_attribute_t</a> *ippNextAttribute (<br>
4307&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4308);</p>
4309<h4 class="parameters">Parameters</h4>
4310<dl>
4311<dt>ipp</dt>
4312<dd class="description">IPP message</dd>
4313</dl>
4314<h4 class="returnvalue">Return Value</h4>
4315<p class="description">Next attribute or <code>NULL</code> if none</p>
f3c17241 4316<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ippOpString">ippOpString</a></h3>
a2326b5b
MS
4317<p class="description">Return a name for the given operation id.</p>
4318<p class="code">
4319const char *ippOpString (<br>
4320&nbsp;&nbsp;&nbsp;&nbsp;ipp_op_t op<br>
4321);</p>
4322<h4 class="parameters">Parameters</h4>
4323<dl>
4324<dt>op</dt>
4325<dd class="description">Operation ID</dd>
4326</dl>
4327<h4 class="returnvalue">Return Value</h4>
4328<p class="description">Name</p>
f3c17241 4329<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ippOpValue">ippOpValue</a></h3>
a2326b5b
MS
4330<p class="description">Return an operation id for the given name.</p>
4331<p class="code">
4332ipp_op_t ippOpValue (<br>
4333&nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
4334);</p>
4335<h4 class="parameters">Parameters</h4>
4336<dl>
4337<dt>name</dt>
4338<dd class="description">Textual name</dd>
4339</dl>
4340<h4 class="returnvalue">Return Value</h4>
4341<p class="description">Operation ID</p>
4342<h3 class="function"><a name="ippPort">ippPort</a></h3>
4343<p class="description">Return the default IPP port number.</p>
4344<p class="code">
4345int ippPort (void);</p>
4346<h4 class="returnvalue">Return Value</h4>
4347<p class="description">Port number</p>
4348<h3 class="function"><a name="ippRead">ippRead</a></h3>
4349<p class="description">Read data for an IPP message from a HTTP connection.</p>
4350<p class="code">
4351<a href="#ipp_state_t">ipp_state_t</a> ippRead (<br>
4352&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
4353&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4354);</p>
4355<h4 class="parameters">Parameters</h4>
4356<dl>
4357<dt>http</dt>
4358<dd class="description">HTTP connection</dd>
4359<dt>ipp</dt>
4360<dd class="description">IPP data</dd>
4361</dl>
4362<h4 class="returnvalue">Return Value</h4>
4363<p class="description">Current state</p>
f3c17241 4364<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="ippReadFile">ippReadFile</a></h3>
a2326b5b
MS
4365<p class="description">Read data for an IPP message from a file.</p>
4366<p class="code">
4367<a href="#ipp_state_t">ipp_state_t</a> ippReadFile (<br>
4368&nbsp;&nbsp;&nbsp;&nbsp;int fd,<br>
4369&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4370);</p>
4371<h4 class="parameters">Parameters</h4>
4372<dl>
4373<dt>fd</dt>
4374<dd class="description">HTTP data</dd>
4375<dt>ipp</dt>
4376<dd class="description">IPP data</dd>
4377</dl>
4378<h4 class="returnvalue">Return Value</h4>
4379<p class="description">Current state</p>
f3c17241 4380<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ippReadIO">ippReadIO</a></h3>
a2326b5b
MS
4381<p class="description">Read data for an IPP message.</p>
4382<p class="code">
4383<a href="#ipp_state_t">ipp_state_t</a> ippReadIO (<br>
4384&nbsp;&nbsp;&nbsp;&nbsp;void *src,<br>
4385&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_iocb_t">ipp_iocb_t</a> cb,<br>
4386&nbsp;&nbsp;&nbsp;&nbsp;int blocking,<br>
4387&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *parent,<br>
4388&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4389);</p>
4390<h4 class="parameters">Parameters</h4>
4391<dl>
4392<dt>src</dt>
4393<dd class="description">Data source</dd>
4394<dt>cb</dt>
4395<dd class="description">Read callback function</dd>
4396<dt>blocking</dt>
4397<dd class="description">Use blocking IO?</dd>
4398<dt>parent</dt>
4399<dd class="description">Parent request, if any</dd>
4400<dt>ipp</dt>
4401<dd class="description">IPP data</dd>
4402</dl>
4403<h4 class="returnvalue">Return Value</h4>
4404<p class="description">Current state</p>
f3c17241 4405<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippSetBoolean">ippSetBoolean</a></h3>
a2326b5b
MS
4406<p class="description">Set a boolean value in an attribute.</p>
4407<p class="code">
4408int ippSetBoolean (<br>
4409&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4410&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4411&nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4412&nbsp;&nbsp;&nbsp;&nbsp;int boolvalue<br>
4413);</p>
4414<h4 class="parameters">Parameters</h4>
4415<dl>
4416<dt>ipp</dt>
4417<dd class="description">IPP message</dd>
4418<dt>attr</dt>
4419<dd class="description">IPP attribute</dd>
4420<dt>element</dt>
4421<dd class="description">Value number (0-based)</dd>
4422<dt>boolvalue</dt>
4423<dd class="description">Boolean value</dd>
4424</dl>
4425<h4 class="returnvalue">Return Value</h4>
4426<p class="description">1 on success, 0 on failure</p>
4427<h4 class="discussion">Discussion</h4>
a469f8a5
MS
4428<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4429the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
4430<br>
4431The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4432<br>
4433The <code>element</code> parameter specifies which value to set from 0 to
4434<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
4435
4436</p>
f3c17241 4437<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippSetCollection">ippSetCollection</a></h3>
a2326b5b
MS
4438<p class="description">Set a collection value in an attribute.</p>
4439<p class="code">
4440int ippSetCollection (<br>
4441&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4442&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4443&nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4444&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *colvalue<br>
4445);</p>
4446<h4 class="parameters">Parameters</h4>
4447<dl>
4448<dt>ipp</dt>
4449<dd class="description">IPP message</dd>
4450<dt>attr</dt>
4451<dd class="description">IPP attribute</dd>
4452<dt>element</dt>
4453<dd class="description">Value number (0-based)</dd>
4454<dt>colvalue</dt>
4455<dd class="description">Collection value</dd>
4456</dl>
4457<h4 class="returnvalue">Return Value</h4>
4458<p class="description">1 on success, 0 on failure</p>
4459<h4 class="discussion">Discussion</h4>
a469f8a5
MS
4460<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4461the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
4462<br>
4463The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4464<br>
4465The <code>element</code> parameter specifies which value to set from 0 to
4466<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
4467
3e7fe0ca 4468</p>
f3c17241 4469<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippSetDate">ippSetDate</a></h3>
3e7fe0ca
MS
4470<p class="description">Set a date value in an attribute.</p>
4471<p class="code">
4472int ippSetDate (<br>
4473&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4474&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4475&nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4476&nbsp;&nbsp;&nbsp;&nbsp;const <a href="#ipp_uchar_t">ipp_uchar_t</a> *datevalue<br>
4477);</p>
4478<h4 class="parameters">Parameters</h4>
4479<dl>
4480<dt>ipp</dt>
4481<dd class="description">IPP message</dd>
4482<dt>attr</dt>
4483<dd class="description">IPP attribute</dd>
4484<dt>element</dt>
4485<dd class="description">Value number (0-based)</dd>
4486<dt>datevalue</dt>
4487<dd class="description">Date value</dd>
4488</dl>
4489<h4 class="returnvalue">Return Value</h4>
4490<p class="description">1 on success, 0 on failure</p>
4491<h4 class="discussion">Discussion</h4>
a469f8a5
MS
4492<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4493the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
3e7fe0ca
MS
4494<br>
4495The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4496<br>
4497The <code>element</code> parameter specifies which value to set from 0 to
4498<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
4499
a2326b5b 4500</p>
f3c17241 4501<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippSetGroupTag">ippSetGroupTag</a></h3>
a2326b5b
MS
4502<p class="description">Set the group tag of an attribute.</p>
4503<p class="code">
4504int ippSetGroupTag (<br>
4505&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4506&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4507&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t group_tag<br>
4508);</p>
4509<h4 class="parameters">Parameters</h4>
4510<dl>
4511<dt>ipp</dt>
4512<dd class="description">IPP message</dd>
4513<dt>attr</dt>
4514<dd class="description">Attribute</dd>
4515<dt>group_tag</dt>
4516<dd class="description">Group tag</dd>
4517</dl>
4518<h4 class="returnvalue">Return Value</h4>
4519<p class="description">1 on success, 0 on failure</p>
4520<h4 class="discussion">Discussion</h4>
a469f8a5
MS
4521<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4522the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
4523<br>
4524The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4525<br>
4526The <code>group</code> parameter specifies the IPP attribute group tag: none
4527(<code>IPP_TAG_ZERO</code>, for member attributes), document (<code>IPP_TAG_DOCUMENT</code>),
4528event notification (<code>IPP_TAG_EVENT_NOTIFICATION</code>), operation
4529(<code>IPP_TAG_OPERATION</code>), printer (<code>IPP_TAG_PRINTER</code>), subscription
4530(<code>IPP_TAG_SUBSCRIPTION</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_GROUP</code>).
4531
4532</p>
f3c17241 4533<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippSetInteger">ippSetInteger</a></h3>
a2326b5b
MS
4534<p class="description">Set an integer or enum value in an attribute.</p>
4535<p class="code">
4536int ippSetInteger (<br>
4537&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4538&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4539&nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4540&nbsp;&nbsp;&nbsp;&nbsp;int intvalue<br>
4541);</p>
4542<h4 class="parameters">Parameters</h4>
4543<dl>
4544<dt>ipp</dt>
4545<dd class="description">IPP message</dd>
4546<dt>attr</dt>
4547<dd class="description">IPP attribute</dd>
4548<dt>element</dt>
4549<dd class="description">Value number (0-based)</dd>
4550<dt>intvalue</dt>
4551<dd class="description">Integer/enum value</dd>
4552</dl>
4553<h4 class="returnvalue">Return Value</h4>
4554<p class="description">1 on success, 0 on failure</p>
4555<h4 class="discussion">Discussion</h4>
a469f8a5
MS
4556<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4557the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
4558<br>
4559The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4560<br>
4561The <code>element</code> parameter specifies which value to set from 0 to
4562<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
4563
4564</p>
f3c17241 4565<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippSetName">ippSetName</a></h3>
a2326b5b
MS
4566<p class="description">Set the name of an attribute.</p>
4567<p class="code">
4568int ippSetName (<br>
4569&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4570&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4571&nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
4572);</p>
4573<h4 class="parameters">Parameters</h4>
4574<dl>
4575<dt>ipp</dt>
4576<dd class="description">IPP message</dd>
4577<dt>attr</dt>
4578<dd class="description">IPP attribute</dd>
4579<dt>name</dt>
4580<dd class="description">Attribute name</dd>
4581</dl>
4582<h4 class="returnvalue">Return Value</h4>
4583<p class="description">1 on success, 0 on failure</p>
4584<h4 class="discussion">Discussion</h4>
a469f8a5
MS
4585<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4586the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
4587<br>
4588The <code>attr</code> parameter may be modified as a result of setting the value.
4589
4590</p>
f3c17241 4591<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippSetOperation">ippSetOperation</a></h3>
a2326b5b
MS
4592<p class="description">Set the operation ID in an IPP request message.</p>
4593<p class="code">
4594int ippSetOperation (<br>
4595&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4596&nbsp;&nbsp;&nbsp;&nbsp;ipp_op_t op<br>
4597);</p>
4598<h4 class="parameters">Parameters</h4>
4599<dl>
4600<dt>ipp</dt>
4601<dd class="description">IPP request message</dd>
4602<dt>op</dt>
4603<dd class="description">Operation ID</dd>
4604</dl>
4605<h4 class="returnvalue">Return Value</h4>
4606<p class="description">1 on success, 0 on failure</p>
4607<h4 class="discussion">Discussion</h4>
a469f8a5
MS
4608<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4609the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.
a2326b5b
MS
4610
4611</p>
4612<h3 class="function"><a name="ippSetPort">ippSetPort</a></h3>
4613<p class="description">Set the default port number.</p>
4614<p class="code">
4615void ippSetPort (<br>
4616&nbsp;&nbsp;&nbsp;&nbsp;int p<br>
4617);</p>
4618<h4 class="parameters">Parameters</h4>
4619<dl>
4620<dt>p</dt>
4621<dd class="description">Port number to use</dd>
4622</dl>
f3c17241 4623<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippSetRange">ippSetRange</a></h3>
a2326b5b
MS
4624<p class="description">Set a rangeOfInteger value in an attribute.</p>
4625<p class="code">
4626int ippSetRange (<br>
4627&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4628&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4629&nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4630&nbsp;&nbsp;&nbsp;&nbsp;int lowervalue,<br>
4631&nbsp;&nbsp;&nbsp;&nbsp;int uppervalue<br>
4632);</p>
4633<h4 class="parameters">Parameters</h4>
4634<dl>
4635<dt>ipp</dt>
4636<dd class="description">IPP message</dd>
4637<dt>attr</dt>
4638<dd class="description">IPP attribute</dd>
4639<dt>element</dt>
4640<dd class="description">Value number (0-based)</dd>
4641<dt>lowervalue</dt>
4642<dd class="description">Lower bound for range</dd>
4643<dt>uppervalue</dt>
4644<dd class="description">Upper bound for range</dd>
4645</dl>
4646<h4 class="returnvalue">Return Value</h4>
4647<p class="description">1 on success, 0 on failure</p>
4648<h4 class="discussion">Discussion</h4>
a469f8a5
MS
4649<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4650the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
4651<br>
4652The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4653<br>
4654The <code>element</code> parameter specifies which value to set from 0 to
4655<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
4656
4657</p>
f3c17241 4658<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippSetRequestId">ippSetRequestId</a></h3>
a2326b5b
MS
4659<p class="description">Set the request ID in an IPP message.</p>
4660<p class="code">
4661int ippSetRequestId (<br>
4662&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4663&nbsp;&nbsp;&nbsp;&nbsp;int request_id<br>
4664);</p>
4665<h4 class="parameters">Parameters</h4>
4666<dl>
4667<dt>ipp</dt>
4668<dd class="description">IPP message</dd>
4669<dt>request_id</dt>
4670<dd class="description">Request ID</dd>
4671</dl>
4672<h4 class="returnvalue">Return Value</h4>
4673<p class="description">1 on success, 0 on failure</p>
4674<h4 class="discussion">Discussion</h4>
a469f8a5
MS
4675<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4676the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
4677<br>
4678The <code>request_id</code> parameter must be greater than 0.
4679
4680</p>
f3c17241 4681<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippSetResolution">ippSetResolution</a></h3>
a2326b5b
MS
4682<p class="description">Set a resolution value in an attribute.</p>
4683<p class="code">
4684int ippSetResolution (<br>
4685&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4686&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4687&nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4688&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_res_t">ipp_res_t</a> unitsvalue,<br>
4689&nbsp;&nbsp;&nbsp;&nbsp;int xresvalue,<br>
4690&nbsp;&nbsp;&nbsp;&nbsp;int yresvalue<br>
4691);</p>
4692<h4 class="parameters">Parameters</h4>
4693<dl>
4694<dt>ipp</dt>
4695<dd class="description">IPP message</dd>
4696<dt>attr</dt>
4697<dd class="description">IPP attribute</dd>
4698<dt>element</dt>
4699<dd class="description">Value number (0-based)</dd>
4700<dt>unitsvalue</dt>
4701<dd class="description">Resolution units</dd>
4702<dt>xresvalue</dt>
4703<dd class="description">Horizontal/cross feed resolution</dd>
4704<dt>yresvalue</dt>
4705<dd class="description">Vertical/feed resolution</dd>
4706</dl>
4707<h4 class="returnvalue">Return Value</h4>
4708<p class="description">1 on success, 0 on failure</p>
4709<h4 class="discussion">Discussion</h4>
a469f8a5
MS
4710<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4711the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
4712<br>
4713The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4714<br>
4715The <code>element</code> parameter specifies which value to set from 0 to
4716<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
4717
4718</p>
f3c17241 4719<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippSetState">ippSetState</a></h3>
3e7fe0ca
MS
4720<p class="description">Set the current state of the IPP message.</p>
4721<p class="code">
4722int ippSetState (<br>
4723&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4724&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_state_t">ipp_state_t</a> state<br>
4725);</p>
4726<h4 class="parameters">Parameters</h4>
4727<dl>
4728<dt>ipp</dt>
4729<dd class="description">IPP message</dd>
4730<dt>state</dt>
4731<dd class="description">IPP state value</dd>
4732</dl>
4733<h4 class="returnvalue">Return Value</h4>
4734<p class="description">1 on success, 0 on failure</p>
f3c17241 4735<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippSetStatusCode">ippSetStatusCode</a></h3>
a2326b5b
MS
4736<p class="description">Set the status code in an IPP response or event message.</p>
4737<p class="code">
4738int ippSetStatusCode (<br>
4739&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4740&nbsp;&nbsp;&nbsp;&nbsp;ipp_status_t status<br>
4741);</p>
4742<h4 class="parameters">Parameters</h4>
4743<dl>
4744<dt>ipp</dt>
4745<dd class="description">IPP response or event message</dd>
4746<dt>status</dt>
4747<dd class="description">Status code</dd>
4748</dl>
4749<h4 class="returnvalue">Return Value</h4>
4750<p class="description">1 on success, 0 on failure</p>
4751<h4 class="discussion">Discussion</h4>
a469f8a5
MS
4752<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4753the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.
a2326b5b
MS
4754
4755</p>
f3c17241 4756<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippSetString">ippSetString</a></h3>
a2326b5b
MS
4757<p class="description">Set a string value in an attribute.</p>
4758<p class="code">
4759int ippSetString (<br>
4760&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4761&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4762&nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4763&nbsp;&nbsp;&nbsp;&nbsp;const char *strvalue<br>
4764);</p>
4765<h4 class="parameters">Parameters</h4>
4766<dl>
4767<dt>ipp</dt>
4768<dd class="description">IPP message</dd>
4769<dt>attr</dt>
4770<dd class="description">IPP attribute</dd>
4771<dt>element</dt>
4772<dd class="description">Value number (0-based)</dd>
4773<dt>strvalue</dt>
4774<dd class="description">String value</dd>
4775</dl>
4776<h4 class="returnvalue">Return Value</h4>
4777<p class="description">1 on success, 0 on failure</p>
4778<h4 class="discussion">Discussion</h4>
a469f8a5
MS
4779<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4780the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
4781<br>
4782The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4783<br>
4784The <code>element</code> parameter specifies which value to set from 0 to
4785<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.
4786
a469f8a5
MS
4787</p>
4788<h3 class="function"><span class="info">&nbsp;CUPS 1.7&nbsp;</span><a name="ippSetStringf">ippSetStringf</a></h3>
4789<p class="description">Set a formatted string value of an attribute.</p>
4790<p class="code">
4791int ippSetStringf (<br>
4792&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4793&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4794&nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4795&nbsp;&nbsp;&nbsp;&nbsp;const char *format,<br>
4796&nbsp;&nbsp;&nbsp;&nbsp;...<br>
4797);</p>
4798<h4 class="parameters">Parameters</h4>
4799<dl>
4800<dt>ipp</dt>
4801<dd class="description">IPP message</dd>
4802<dt>attr</dt>
4803<dd class="description">IPP attribute</dd>
4804<dt>element</dt>
4805<dd class="description">Value number (0-based)</dd>
4806<dt>format</dt>
4807<dd class="description">Printf-style format string</dd>
4808<dt>...</dt>
4809<dd class="description">Additional arguments as needed</dd>
4810</dl>
4811<h4 class="returnvalue">Return Value</h4>
4812<p class="description">1 on success, 0 on failure</p>
4813<h4 class="discussion">Discussion</h4>
4814<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4815the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
4816<br>
4817The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4818<br>
4819The <code>element</code> parameter specifies which value to set from 0 to
4820<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.<br>
4821<br>
4822The <code>format</code> parameter uses formatting characters compatible with the
4823printf family of standard functions. Additional arguments follow it as
4824needed. The formatted string is truncated as needed to the maximum length of
4825the corresponding value type.
4826
4827</p>
4828<h3 class="function"><span class="info">&nbsp;CUPS 1.7&nbsp;</span><a name="ippSetStringfv">ippSetStringfv</a></h3>
4829<p class="description">Set a formatted string value of an attribute.</p>
4830<p class="code">
4831int ippSetStringfv (<br>
4832&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4833&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4834&nbsp;&nbsp;&nbsp;&nbsp;int element,<br>
4835&nbsp;&nbsp;&nbsp;&nbsp;const char *format,<br>
4836&nbsp;&nbsp;&nbsp;&nbsp;va_list ap<br>
4837);</p>
4838<h4 class="parameters">Parameters</h4>
4839<dl>
4840<dt>ipp</dt>
4841<dd class="description">IPP message</dd>
4842<dt>attr</dt>
4843<dd class="description">IPP attribute</dd>
4844<dt>element</dt>
4845<dd class="description">Value number (0-based)</dd>
4846<dt>format</dt>
4847<dd class="description">Printf-style format string</dd>
4848<dt>ap</dt>
4849<dd class="description">Pointer to additional arguments</dd>
4850</dl>
4851<h4 class="returnvalue">Return Value</h4>
4852<p class="description">1 on success, 0 on failure</p>
4853<h4 class="discussion">Discussion</h4>
4854<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4855the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
4856<br>
4857The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4858<br>
4859The <code>element</code> parameter specifies which value to set from 0 to
4860<a href="#ippGetCount(attr)"><code>ippGetCount(attr)</code></a>.<br>
4861<br>
4862The <code>format</code> parameter uses formatting characters compatible with the
4863printf family of standard functions. Additional arguments follow it as
4864needed. The formatted string is truncated as needed to the maximum length of
4865the corresponding value type.
4866
a2326b5b 4867</p>
f3c17241 4868<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippSetValueTag">ippSetValueTag</a></h3>
a2326b5b
MS
4869<p class="description">Set the value tag of an attribute.</p>
4870<p class="code">
4871int ippSetValueTag (<br>
4872&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4873&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> **attr,<br>
4874&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t value_tag<br>
4875);</p>
4876<h4 class="parameters">Parameters</h4>
4877<dl>
4878<dt>ipp</dt>
4879<dd class="description">IPP message</dd>
4880<dt>attr</dt>
4881<dd class="description">IPP attribute</dd>
4882<dt>value_tag</dt>
4883<dd class="description">Value tag</dd>
4884</dl>
4885<h4 class="returnvalue">Return Value</h4>
4886<p class="description">1 on success, 0 on failure</p>
4887<h4 class="discussion">Discussion</h4>
a469f8a5
MS
4888<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4889the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
4890<br>
4891The <code>attr</code> parameter may be modified as a result of setting the value.<br>
4892<br>
4893Integer (<code>IPP_TAG_INTEGER</code>) values can be promoted to rangeOfInteger
4894(<code>IPP_TAG_RANGE</code>) values, the various string tags can be promoted to name
4895(<code>IPP_TAG_NAME</code>) or nameWithLanguage (<code>IPP_TAG_NAMELANG</code>) values, text
4896(<code>IPP_TAG_TEXT</code>) values can be promoted to textWithLanguage
4897(<code>IPP_TAG_TEXTLANG</code>) values, and all values can be demoted to the various
4898out-of-band value tags such as no-value (<code>IPP_TAG_NOVALUE</code>). All other changes
4899will be rejected.<br>
4900<br>
4901Promoting a string attribute to nameWithLanguage or textWithLanguage adds the language
4902code in the &quot;attributes-natural-language&quot; attribute or, if not present, the language
4903code for the current locale.
4904
4905</p>
f3c17241 4906<h3 class="function"><span class="info">&nbsp;CUPS 1.6/OS X 10.8&nbsp;</span><a name="ippSetVersion">ippSetVersion</a></h3>
a2326b5b
MS
4907<p class="description">Set the version number in an IPP message.</p>
4908<p class="code">
4909int ippSetVersion (<br>
4910&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
4911&nbsp;&nbsp;&nbsp;&nbsp;int major,<br>
4912&nbsp;&nbsp;&nbsp;&nbsp;int minor<br>
4913);</p>
4914<h4 class="parameters">Parameters</h4>
4915<dl>
4916<dt>ipp</dt>
4917<dd class="description">IPP message</dd>
4918<dt>major</dt>
4919<dd class="description">Major version number (major.minor)</dd>
4920<dt>minor</dt>
4921<dd class="description">Minor version number (major.minor)</dd>
4922</dl>
4923<h4 class="returnvalue">Return Value</h4>
4924<p class="description">1 on success, 0 on failure</p>
4925<h4 class="discussion">Discussion</h4>
a469f8a5
MS
4926<p class="discussion">The <code>ipp</code> parameter refers to an IPP message previously created using
4927the <a href="#ippNew"><code>ippNew</code></a>, <a href="#ippNewRequest"><code>ippNewRequest</code></a>, or <a href="#ippNewResponse"><code>ippNewResponse</code></a> functions.<br>
a2326b5b
MS
4928<br>
4929The valid version numbers are currently 1.0, 1.1, 2.0, 2.1, and 2.2.
4930
4931</p>
f3c17241 4932<h3 class="function"><span class="info">&nbsp;CUPS 1.4/OS X 10.6&nbsp;</span><a name="ippTagString">ippTagString</a></h3>
a2326b5b
MS
4933<p class="description">Return the tag name corresponding to a tag value.</p>
4934<p class="code">
4935const char *ippTagString (<br>
4936&nbsp;&nbsp;&nbsp;&nbsp;ipp_tag_t tag<br>
4937);</p>
4938<h4 class="parameters">Parameters</h4>
4939<dl>
4940<dt>tag</dt>
4941<dd class="description">Tag value</dd>
4942</dl>
06d4e77b
MS
4943<h4 class="returnvalue">Return Value</h4>
4944<p class="description">Tag name</p>
4945<h4 class="discussion">Discussion</h4>
4946<p class="discussion">The returned names are defined in RFC 2911 and 3382.
4947
4948</p>
f3c17241 4949<h3 class="function"><span class="info">&nbsp;CUPS 1.4/OS X 10.6&nbsp;</span><a name="ippTagValue">ippTagValue</a></h3>
06d4e77b
MS
4950<p class="description">Return the tag value corresponding to a tag name.</p>
4951<p class="code">
a2326b5b 4952ipp_tag_t ippTagValue (<br>
06d4e77b
MS
4953&nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
4954);</p>
4955<h4 class="parameters">Parameters</h4>
4956<dl>
4957<dt>name</dt>
4958<dd class="description">Tag name</dd>
4959</dl>
4960<h4 class="returnvalue">Return Value</h4>
4961<p class="description">Tag value</p>
4962<h4 class="discussion">Discussion</h4>
4963<p class="discussion">The tag names are defined in RFC 2911 and 3382.
4964
4965</p>
5a738aea
MS
4966<h3 class="function"><a name="ippTimeToDate">ippTimeToDate</a></h3>
4967<p class="description">Convert from UNIX time to RFC 1903 format.</p>
4968<p class="code">
4969const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippTimeToDate (<br>
4970&nbsp;&nbsp;&nbsp;&nbsp;time_t t<br>
4971);</p>
4972<h4 class="parameters">Parameters</h4>
4973<dl>
4974<dt>t</dt>
4975<dd class="description">UNIX time value</dd>
4976</dl>
4977<h4 class="returnvalue">Return Value</h4>
4978<p class="description">RFC-1903 date/time data</p>
4979<h3 class="function"><a name="ippWrite">ippWrite</a></h3>
4980<p class="description">Write data for an IPP message to a HTTP connection.</p>
4981<p class="code">
79e1d494 4982<a href="#ipp_state_t">ipp_state_t</a> ippWrite (<br>
5a738aea
MS
4983&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
4984&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
4985);</p>
4986<h4 class="parameters">Parameters</h4>
4987<dl>
4988<dt>http</dt>
4989<dd class="description">HTTP connection</dd>
4990<dt>ipp</dt>
4991<dd class="description">IPP data</dd>
4992</dl>
4993<h4 class="returnvalue">Return Value</h4>
4994<p class="description">Current state</p>
f3c17241 4995<h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/OS X 10.3&nbsp;</span><a name="ippWriteFile">ippWriteFile</a></h3>
5a738aea
MS
4996<p class="description">Write data for an IPP message to a file.</p>
4997<p class="code">
79e1d494 4998<a href="#ipp_state_t">ipp_state_t</a> ippWriteFile (<br>
5a738aea
MS
4999&nbsp;&nbsp;&nbsp;&nbsp;int fd,<br>
5000&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
5001);</p>
5002<h4 class="parameters">Parameters</h4>
5003<dl>
5004<dt>fd</dt>
5005<dd class="description">HTTP data</dd>
5006<dt>ipp</dt>
5007<dd class="description">IPP data</dd>
5008</dl>
5009<h4 class="returnvalue">Return Value</h4>
5010<p class="description">Current state</p>
f3c17241 5011<h3 class="function"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ippWriteIO">ippWriteIO</a></h3>
5a738aea
MS
5012<p class="description">Write data for an IPP message.</p>
5013<p class="code">
79e1d494 5014<a href="#ipp_state_t">ipp_state_t</a> ippWriteIO (<br>
5a738aea
MS
5015&nbsp;&nbsp;&nbsp;&nbsp;void *dst,<br>
5016&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_iocb_t">ipp_iocb_t</a> cb,<br>
5017&nbsp;&nbsp;&nbsp;&nbsp;int blocking,<br>
5018&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *parent,<br>
5019&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
5020);</p>
5021<h4 class="parameters">Parameters</h4>
5022<dl>
5023<dt>dst</dt>
5024<dd class="description">Destination</dd>
5025<dt>cb</dt>
5026<dd class="description">Write callback function</dd>
5027<dt>blocking</dt>
5028<dd class="description">Use blocking IO?</dd>
5029<dt>parent</dt>
5030<dd class="description">Parent IPP message</dd>
5031<dt>ipp</dt>
5032<dd class="description">IPP data</dd>
5033</dl>
5034<h4 class="returnvalue">Return Value</h4>
5035<p class="description">Current state</p>
5036<h2 class="title"><a name="TYPES">Data Types</a></h2>
eac3a0a0
MS
5037<h3 class="typedef"><a name="gss_auth_identity_desc">gss_auth_identity_desc</a></h3>
5038<p class="description">Local functions...</p>
5039<p class="code">
5040typedef struct <a href="#gss_auth_identity">gss_auth_identity</a> gss_auth_identity_desc;
5041</p>
f3c17241 5042<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="http_addr_t">http_addr_t</a></h3>
f11a948a
MS
5043<p class="description">Socket address union, which
5044makes using IPv6 and other
5045address types easier and
5046more portable. </p>
5047<p class="code">
5048typedef union _http_addr_u / http_addr_t;
5049</p>
f3c17241 5050<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="http_addrlist_t">http_addrlist_t</a></h3>
5a738aea 5051<p class="description">Socket address list, which is
ef416fc2 5052used to enumerate all of the
5053addresses that are associated
5a738aea
MS
5054with a hostname. </p>
5055<p class="code">
5056typedef struct <a href="#http_addrlist_s">http_addrlist_s</a> / http_addrlist_t;
5057</p>
5058<h3 class="typedef"><a name="http_auth_t">http_auth_t</a></h3>
5059<p class="description">HTTP authentication types</p>
5060<p class="code">
5061typedef enum <a href="#http_auth_e">http_auth_e</a> http_auth_t;
5062</p>
f3c17241 5063<h3 class="typedef"><span class="info">&nbsp;CUPS 1.5/OS X 10.7&nbsp;</span><a name="http_credential_t">http_credential_t</a></h3>
f228370c 5064<p class="description">HTTP credential data </p>
10d09e33
MS
5065<p class="code">
5066typedef struct <a href="#http_credential_s">http_credential_s</a> http_credential_t;
5067</p>
5a738aea
MS
5068<h3 class="typedef"><a name="http_encoding_t">http_encoding_t</a></h3>
5069<p class="description">HTTP transfer encoding values</p>
5070<p class="code">
5071typedef enum <a href="#http_encoding_e">http_encoding_e</a> http_encoding_t;
5072</p>
5073<h3 class="typedef"><a name="http_encryption_t">http_encryption_t</a></h3>
5074<p class="description">HTTP encryption values</p>
5075<p class="code">
5076typedef enum <a href="#http_encryption_e">http_encryption_e</a> http_encryption_t;
5077</p>
79e1d494
MS
5078<h3 class="typedef"><a name="http_field_t">http_field_t</a></h3>
5079<p class="description">HTTP field names</p>
5080<p class="code">
5081typedef enum <a href="#http_field_e">http_field_e</a> http_field_t;
5082</p>
5083<h3 class="typedef"><a name="http_keepalive_t">http_keepalive_t</a></h3>
f11a948a 5084<p class="description">HTTP keep-alive values</p>
79e1d494
MS
5085<p class="code">
5086typedef enum <a href="#http_keepalive_e">http_keepalive_e</a> http_keepalive_t;
5087</p>
f11a948a
MS
5088<h3 class="typedef"><a name="http_state_t">http_state_t</a></h3>
5089<p class="description">HTTP state values; states
5090are server-oriented...</p>
5091<p class="code">
a469f8a5 5092typedef enum <a href="#http_state_e">http_state_e</a> http_state_t;
79e1d494 5093</p>
5a738aea
MS
5094<h3 class="typedef"><a name="http_t">http_t</a></h3>
5095<p class="description">HTTP connection type</p>
5096<p class="code">
ecdc0628 5097typedef struct _http_s http_t;
5a738aea 5098</p>
f3c17241 5099<h3 class="typedef"><span class="info">&nbsp;CUPS 1.5/OS X 10.7&nbsp;</span><a name="http_timeout_cb_t">http_timeout_cb_t</a></h3>
f228370c
MS
5100<p class="description">HTTP timeout callback </p>
5101<p class="code">
5102typedef int (*http_timeout_cb_t)(<a href="#http_t">http_t</a> *http, void *user_data);
5103</p>
79e1d494 5104<h3 class="typedef"><a name="http_uri_coding_t">http_uri_coding_t</a></h3>
f11a948a 5105<p class="description">URI en/decode flags</p>
79e1d494
MS
5106<p class="code">
5107typedef enum <a href="#http_uri_coding_e">http_uri_coding_e</a> http_uri_coding_t;
5108</p>
10d09e33 5109<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="http_uri_status_t">http_uri_status_t</a></h3>
f11a948a 5110<p class="description">URI separation status </p>
79e1d494
MS
5111<p class="code">
5112typedef enum <a href="#http_uri_status_e">http_uri_status_e</a> http_uri_status_t;
5113</p>
f11a948a
MS
5114<h3 class="typedef"><a name="http_version_t">http_version_t</a></h3>
5115<p class="description">HTTP version numbers</p>
79e1d494
MS
5116<p class="code">
5117typedef enum <a href="#http_version_e">http_version_e</a> http_version_t;
5118</p>
5a738aea 5119<h3 class="typedef"><a name="ipp_attribute_t">ipp_attribute_t</a></h3>
a2326b5b 5120<p class="description">IPP attribute</p>
5a738aea 5121<p class="code">
a2326b5b
MS
5122typedef struct _ipp_attribute_s ipp_attribute_t;
5123</p>
5124<h3 class="typedef"><a name="ipp_copycb_t">ipp_copycb_t</a></h3>
f3c17241
MS
5125<p class="description">The following structures are PRIVATE starting with CUPS 1.6/OS X 10.8.
5126Please use the new accessor functions available in CUPS 1.6 and later, as
5127these definitions will be moved to a private header file in a future release.</p>
a2326b5b
MS
5128<p class="code">
5129typedef int (*ipp_copycb_t)(void *context, <a href="#ipp_t">ipp_t</a> *dst, <a href="#ipp_attribute_t">ipp_attribute_t</a> *attr);
5130</p>
5131<h3 class="typedef"><a name="ipp_dstate_t">ipp_dstate_t</a></h3>
5132<p class="description">Document states</p>
5133<p class="code">
5134typedef enum <a href="#ipp_dstate_e">ipp_dstate_e</a> ipp_dstate_t;
5a738aea 5135</p>
79e1d494 5136<h3 class="typedef"><a name="ipp_finish_t">ipp_finish_t</a></h3>
a469f8a5 5137<p class="description">Job collation types</p>
79e1d494 5138<p class="code">
a469f8a5 5139typedef enum <a href="#ipp_finishings_e">ipp_finishings_e</a> ipp_finish_t;
79e1d494 5140</p>
f3c17241 5141<h3 class="typedef"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="ipp_iocb_t">ipp_iocb_t</a></h3>
5a738aea
MS
5142<p class="description">IPP IO Callback Function </p>
5143<p class="code">
a2326b5b 5144typedef ssize_t (*ipp_iocb_t)(void *context, <a href="#ipp_uchar_t">ipp_uchar_t</a> *buffer, size_t bytes);
5a738aea 5145</p>
a2326b5b
MS
5146<h3 class="typedef"><a name="ipp_jcollate_t">ipp_jcollate_t</a></h3>
5147<p class="description">Job collation types</p>
79e1d494 5148<p class="code">
a2326b5b 5149typedef enum <a href="#ipp_jcollate_e">ipp_jcollate_e</a> ipp_jcollate_t;
79e1d494
MS
5150</p>
5151<h3 class="typedef"><a name="ipp_orient_t">ipp_orient_t</a></h3>
aaf19ab0 5152<p class="description">Orientation values</p>
79e1d494
MS
5153<p class="code">
5154typedef enum <a href="#ipp_orient_e">ipp_orient_e</a> ipp_orient_t;
5155</p>
5156<h3 class="typedef"><a name="ipp_pstate_t">ipp_pstate_t</a></h3>
aaf19ab0 5157<p class="description">Printer states</p>
79e1d494
MS
5158<p class="code">
5159typedef enum <a href="#ipp_pstate_e">ipp_pstate_e</a> ipp_pstate_t;
5160</p>
5161<h3 class="typedef"><a name="ipp_quality_t">ipp_quality_t</a></h3>
aaf19ab0 5162<p class="description">Qualities</p>
79e1d494
MS
5163<p class="code">
5164typedef enum <a href="#ipp_quality_e">ipp_quality_e</a> ipp_quality_t;
5165</p>
79e1d494 5166<h3 class="typedef"><a name="ipp_res_t">ipp_res_t</a></h3>
aaf19ab0 5167<p class="description">Resolution units</p>
79e1d494
MS
5168<p class="code">
5169typedef enum <a href="#ipp_res_e">ipp_res_e</a> ipp_res_t;
5170</p>
5171<h3 class="typedef"><a name="ipp_state_t">ipp_state_t</a></h3>
aaf19ab0 5172<p class="description">IPP states</p>
79e1d494
MS
5173<p class="code">
5174typedef enum <a href="#ipp_state_e">ipp_state_e</a> ipp_state_t;
5175</p>
5a738aea 5176<h3 class="typedef"><a name="ipp_t">ipp_t</a></h3>
a2326b5b 5177<p class="description">IPP request/response data</p>
5a738aea 5178<p class="code">
a2326b5b 5179typedef struct _ipp_s ipp_t;
5a738aea
MS
5180</p>
5181<h3 class="typedef"><a name="ipp_uchar_t">ipp_uchar_t</a></h3>
a2326b5b 5182<p class="description">Unsigned 8-bit integer/character</p>
5a738aea 5183<p class="code">
a2326b5b 5184typedef unsigned char ipp_uchar_t;
5a738aea
MS
5185</p>
5186<h2 class="title"><a name="STRUCTURES">Structures</a></h2>
eac3a0a0
MS
5187<h3 class="struct"><a name="gss_auth_identity">gss_auth_identity</a></h3>
5188<p class="description">Local functions...</p>
5189<p class="code">struct gss_auth_identity {<br>
5190&nbsp;&nbsp;&nbsp;&nbsp;gss_buffer_t *credentialsRef;<br>
5191&nbsp;&nbsp;&nbsp;&nbsp;uint32_t flags;<br>
5192&nbsp;&nbsp;&nbsp;&nbsp;char *password;<br>
5193&nbsp;&nbsp;&nbsp;&nbsp;char *realm;<br>
5194&nbsp;&nbsp;&nbsp;&nbsp;uint32_t type;<br>
5195&nbsp;&nbsp;&nbsp;&nbsp;char *username;<br>
5196};</p>
5197<h4 class="members">Members</h4>
5198<dl>
5199<dt>credentialsRef </dt>
5200<dt>flags </dt>
5201<dt>password </dt>
5202<dt>realm </dt>
5203<dt>type </dt>
5204<dt>username </dt>
5205</dl>
f3c17241 5206<h3 class="struct"><span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span><a name="http_addrlist_s">http_addrlist_s</a></h3>
5a738aea
MS
5207<p class="description">Socket address list, which is
5208used to enumerate all of the
5209addresses that are associated
5210with a hostname. </p>
5211<p class="code">struct http_addrlist_s {<br>
5212&nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_addr_t">http_addr_t</a> addr;<br>
5213&nbsp;&nbsp;&nbsp;&nbsp;struct <a href="#http_addrlist_s">http_addrlist_s</a> *next;<br>
5214};</p>
5215<h4 class="members">Members</h4>
5216<dl>
5217<dt>addr </dt>
5218<dd class="description">Address</dd>
5219<dt>next </dt>
5220<dd class="description">Pointer to next address in list</dd>
5221</dl>
f3c17241 5222<h3 class="struct"><span class="info">&nbsp;CUPS 1.5/OS X 10.7&nbsp;</span><a name="http_credential_s">http_credential_s</a></h3>
f228370c 5223<p class="description">HTTP credential data </p>
10d09e33
MS
5224<p class="code">struct http_credential_s {<br>
5225&nbsp;&nbsp;&nbsp;&nbsp;void *data;<br>
5226&nbsp;&nbsp;&nbsp;&nbsp;size_t datalen;<br>
5227};</p>
5228<h4 class="members">Members</h4>
5229<dl>
5230<dt>data </dt>
5231<dd class="description">Pointer to credential data</dd>
5232<dt>datalen </dt>
5233<dd class="description">Credential length</dd>
5234</dl>
f3c17241
MS
5235<h3 class="struct"><a name="pollfd">pollfd</a></h3>
5236<p class="description">User data (unused)</p>
5237<p class="code">struct pollfd *pollfds, unsigned int num_pollfds, int timeout, void *context) {<br>
5238&nbsp;&nbsp;&nbsp;&nbsp;void) context;<br>
5239&nbsp;&nbsp;&nbsp;&nbsp;void) timeout;<br>
5240};</p>
5241<h4 class="members">Members</h4>
5242<dl>
5243<dt>context </dt>
5244<dt>timeout </dt>
5245</dl>
5a738aea
MS
5246<h2 class="title"><a name="ENUMERATIONS">Constants</a></h2>
5247<h3 class="enumeration"><a name="http_auth_e">http_auth_e</a></h3>
5248<p class="description">HTTP authentication types</p>
5249<h4 class="constants">Constants</h4>
5250<dl>
5251<dt>HTTP_AUTH_BASIC </dt>
5252<dd class="description">Basic authentication in use</dd>
5253<dt>HTTP_AUTH_MD5 </dt>
5254<dd class="description">Digest authentication in use</dd>
5255<dt>HTTP_AUTH_MD5_INT </dt>
5256<dd class="description">Digest authentication in use for body</dd>
5257<dt>HTTP_AUTH_MD5_SESS </dt>
5258<dd class="description">MD5-session authentication in use</dd>
5259<dt>HTTP_AUTH_MD5_SESS_INT </dt>
5260<dd class="description">MD5-session authentication in use for body</dd>
f3c17241 5261<dt>HTTP_AUTH_NEGOTIATE <span class="info">&nbsp;CUPS 1.3/OS X 10.5&nbsp;</span></dt>
5a738aea
MS
5262<dd class="description">GSSAPI authentication in use </dd>
5263<dt>HTTP_AUTH_NONE </dt>
5264<dd class="description">No authentication in use</dd>
5265</dl>
5266<h3 class="enumeration"><a name="http_encoding_e">http_encoding_e</a></h3>
5267<p class="description">HTTP transfer encoding values</p>
5268<h4 class="constants">Constants</h4>
5269<dl>
a469f8a5 5270<dt>HTTP_ENCODING_CHUNKED </dt>
5a738aea 5271<dd class="description">Data is chunked</dd>
a469f8a5 5272<dt>HTTP_ENCODING_FIELDS </dt>
5a738aea 5273<dd class="description">Sending HTTP fields</dd>
a469f8a5 5274<dt>HTTP_ENCODING_LENGTH </dt>
5a738aea
MS
5275<dd class="description">Data is sent with Content-Length</dd>
5276</dl>
5277<h3 class="enumeration"><a name="http_encryption_e">http_encryption_e</a></h3>
5278<p class="description">HTTP encryption values</p>
5279<h4 class="constants">Constants</h4>
5280<dl>
a469f8a5 5281<dt>HTTP_ENCRYPTION_ALWAYS </dt>
5a738aea 5282<dd class="description">Always encrypt (SSL)</dd>
a469f8a5 5283<dt>HTTP_ENCRYPTION_IF_REQUESTED </dt>
5a738aea 5284<dd class="description">Encrypt if requested (TLS upgrade)</dd>
a469f8a5 5285<dt>HTTP_ENCRYPTION_NEVER </dt>
5a738aea 5286<dd class="description">Never encrypt</dd>
a469f8a5 5287<dt>HTTP_ENCRYPTION_REQUIRED </dt>
5a738aea
MS
5288<dd class="description">Encryption is required (TLS upgrade)</dd>
5289</dl>
5290<h3 class="enumeration"><a name="http_field_e">http_field_e</a></h3>
5291<p class="description">HTTP field names</p>
5292<h4 class="constants">Constants</h4>
5293<dl>
a469f8a5
MS
5294<dt>HTTP_FIELD_ACCEPT_ENCODING <span class="info">&nbsp;CUPS 1.7&nbsp;</span></dt>
5295<dd class="description">Accepting-Encoding field </dd>
5a738aea
MS
5296<dt>HTTP_FIELD_ACCEPT_LANGUAGE </dt>
5297<dd class="description">Accept-Language field</dd>
5298<dt>HTTP_FIELD_ACCEPT_RANGES </dt>
5299<dd class="description">Accept-Ranges field</dd>
a469f8a5
MS
5300<dt>HTTP_FIELD_ALLOW <span class="info">&nbsp;CUPS 1.7&nbsp;</span></dt>
5301<dd class="description">Allow field </dd>
5a738aea
MS
5302<dt>HTTP_FIELD_AUTHORIZATION </dt>
5303<dd class="description">Authorization field</dd>
5304<dt>HTTP_FIELD_CONNECTION </dt>
5305<dd class="description">Connection field</dd>
5306<dt>HTTP_FIELD_CONTENT_ENCODING </dt>
5307<dd class="description">Content-Encoding field</dd>
5308<dt>HTTP_FIELD_CONTENT_LANGUAGE </dt>
5309<dd class="description">Content-Language field</dd>
5310<dt>HTTP_FIELD_CONTENT_LENGTH </dt>
5311<dd class="description">Content-Length field</dd>
5312<dt>HTTP_FIELD_CONTENT_LOCATION </dt>
5313<dd class="description">Content-Location field</dd>
5314<dt>HTTP_FIELD_CONTENT_MD5 </dt>
5315<dd class="description">Content-MD5 field</dd>
5316<dt>HTTP_FIELD_CONTENT_RANGE </dt>
5317<dd class="description">Content-Range field</dd>
5318<dt>HTTP_FIELD_CONTENT_TYPE </dt>
5319<dd class="description">Content-Type field</dd>
5320<dt>HTTP_FIELD_CONTENT_VERSION </dt>
5321<dd class="description">Content-Version field</dd>
5322<dt>HTTP_FIELD_DATE </dt>
5323<dd class="description">Date field</dd>
5324<dt>HTTP_FIELD_HOST </dt>
5325<dd class="description">Host field</dd>
5326<dt>HTTP_FIELD_IF_MODIFIED_SINCE </dt>
5327<dd class="description">If-Modified-Since field</dd>
5328<dt>HTTP_FIELD_IF_UNMODIFIED_SINCE </dt>
5329<dd class="description">If-Unmodified-Since field</dd>
5330<dt>HTTP_FIELD_KEEP_ALIVE </dt>
5331<dd class="description">Keep-Alive field</dd>
5332<dt>HTTP_FIELD_LAST_MODIFIED </dt>
5333<dd class="description">Last-Modified field</dd>
5334<dt>HTTP_FIELD_LINK </dt>
5335<dd class="description">Link field</dd>
5336<dt>HTTP_FIELD_LOCATION </dt>
5337<dd class="description">Location field</dd>
5338<dt>HTTP_FIELD_MAX </dt>
5339<dd class="description">Maximum field index</dd>
5340<dt>HTTP_FIELD_RANGE </dt>
5341<dd class="description">Range field</dd>
5342<dt>HTTP_FIELD_REFERER </dt>
5343<dd class="description">Referer field</dd>
5344<dt>HTTP_FIELD_RETRY_AFTER </dt>
5345<dd class="description">Retry-After field</dd>
a469f8a5
MS
5346<dt>HTTP_FIELD_SERVER <span class="info">&nbsp;CUPS 1.7&nbsp;</span></dt>
5347<dd class="description">Server field </dd>
5a738aea
MS
5348<dt>HTTP_FIELD_TRANSFER_ENCODING </dt>
5349<dd class="description">Transfer-Encoding field</dd>
5350<dt>HTTP_FIELD_UNKNOWN </dt>
5351<dd class="description">Unknown field</dd>
5352<dt>HTTP_FIELD_UPGRADE </dt>
5353<dd class="description">Upgrade field</dd>
5354<dt>HTTP_FIELD_USER_AGENT </dt>
5355<dd class="description">User-Agent field</dd>
5356<dt>HTTP_FIELD_WWW_AUTHENTICATE </dt>
5357<dd class="description">WWW-Authenticate field</dd>
5358</dl>
5359<h3 class="enumeration"><a name="http_keepalive_e">http_keepalive_e</a></h3>
f11a948a 5360<p class="description">HTTP keep-alive values</p>
5a738aea
MS
5361<h4 class="constants">Constants</h4>
5362<dl>
5363<dt>HTTP_KEEPALIVE_OFF </dt>
5364<dd class="description">No keep alive support</dd>
5365<dt>HTTP_KEEPALIVE_ON </dt>
5366<dd class="description">Use keep alive</dd>
5367</dl>
5368<h3 class="enumeration"><a name="http_state_e">http_state_e</a></h3>
f11a948a
MS
5369<p class="description">HTTP state values; states
5370are server-oriented...</p>
5a738aea
MS
5371<h4 class="constants">Constants</h4>
5372<dl>
a469f8a5
MS
5373<dt>HTTP_STATE_CONNECT </dt>
5374<dd class="description">CONNECT command, waiting for blank line</dd>
5375<dt>HTTP_STATE_DELETE </dt>
5a738aea 5376<dd class="description">DELETE command, waiting for blank line</dd>
a469f8a5
MS
5377<dt>HTTP_STATE_ERROR </dt>
5378<dd class="description">Error on socket</dd>
5379<dt>HTTP_STATE_GET </dt>
5a738aea 5380<dd class="description">GET command, waiting for blank line</dd>
a469f8a5 5381<dt>HTTP_STATE_GET_SEND </dt>
5a738aea 5382<dd class="description">GET command, sending data</dd>
a469f8a5 5383<dt>HTTP_STATE_HEAD </dt>
5a738aea 5384<dd class="description">HEAD command, waiting for blank line</dd>
a469f8a5 5385<dt>HTTP_STATE_OPTIONS </dt>
5a738aea 5386<dd class="description">OPTIONS command, waiting for blank line</dd>
a469f8a5 5387<dt>HTTP_STATE_POST </dt>
5a738aea 5388<dd class="description">POST command, waiting for blank line</dd>
a469f8a5 5389<dt>HTTP_STATE_POST_RECV </dt>
5a738aea 5390<dd class="description">POST command, receiving data</dd>
a469f8a5 5391<dt>HTTP_STATE_POST_SEND </dt>
5a738aea 5392<dd class="description">POST command, sending data</dd>
a469f8a5 5393<dt>HTTP_STATE_PUT </dt>
5a738aea 5394<dd class="description">PUT command, waiting for blank line</dd>
a469f8a5 5395<dt>HTTP_STATE_PUT_RECV </dt>
5a738aea 5396<dd class="description">PUT command, receiving data</dd>
a469f8a5 5397<dt>HTTP_STATE_STATUS </dt>
5a738aea 5398<dd class="description">Command complete, sending status</dd>
a469f8a5 5399<dt>HTTP_STATE_TRACE </dt>
5a738aea 5400<dd class="description">TRACE command, waiting for blank line</dd>
a469f8a5
MS
5401<dt>HTTP_STATE_UNKNOWN_METHOD <span class="info">&nbsp;CUPS 1.7&nbsp;</span></dt>
5402<dd class="description">Unknown request method, waiting for blank line </dd>
5403<dt>HTTP_STATE_UNKNOWN_VERSION <span class="info">&nbsp;CUPS 1.7&nbsp;</span></dt>
5404<dd class="description">Unknown request method, waiting for blank line </dd>
5405<dt>HTTP_STATE_WAITING </dt>
5a738aea
MS
5406<dd class="description">Waiting for command</dd>
5407</dl>
5408<h3 class="enumeration"><a name="http_status_e">http_status_e</a></h3>
5409<p class="description">HTTP status codes</p>
5410<h4 class="constants">Constants</h4>
5411<dl>
a469f8a5 5412<dt>CUPS_STATUS_AUTHORIZATION_CANCELED <span class="info">&nbsp;CUPS 1.4&nbsp;</span></dt>
10d09e33 5413<dd class="description">User canceled authorization </dd>
a469f8a5
MS
5414<dt>CUPS_STATUS_PKI_ERROR <span class="info">&nbsp;CUPS 1.5/OS X 10.7&nbsp;</span></dt>
5415<dd class="description">Error negotiating a secure connection </dd>
5416<dt>HTTP_STATUS_ACCEPTED </dt>
5417<dd class="description">DELETE command was successful</dd>
5418<dt>HTTP_STATUS_BAD_GATEWAY </dt>
5a738aea 5419<dd class="description">Bad gateway</dd>
a469f8a5 5420<dt>HTTP_STATUS_BAD_REQUEST </dt>
5a738aea 5421<dd class="description">Bad request</dd>
a469f8a5 5422<dt>HTTP_STATUS_CONFLICT </dt>
5a738aea 5423<dd class="description">Request is self-conflicting</dd>
a469f8a5 5424<dt>HTTP_STATUS_CONTINUE </dt>
5a738aea 5425<dd class="description">Everything OK, keep going...</dd>
a469f8a5 5426<dt>HTTP_STATUS_CREATED </dt>
5a738aea 5427<dd class="description">PUT command was successful</dd>
a469f8a5 5428<dt>HTTP_STATUS_ERROR </dt>
5a738aea 5429<dd class="description">An error response from httpXxxx()</dd>
a469f8a5 5430<dt>HTTP_STATUS_EXPECTATION_FAILED </dt>
5a738aea 5431<dd class="description">The expectation given in an Expect header field was not met</dd>
a469f8a5 5432<dt>HTTP_STATUS_FORBIDDEN </dt>
5a738aea 5433<dd class="description">Forbidden to access this URI</dd>
a469f8a5 5434<dt>HTTP_STATUS_GATEWAY_TIMEOUT </dt>
5a738aea 5435<dd class="description">Gateway connection timed out</dd>
a469f8a5 5436<dt>HTTP_STATUS_GONE </dt>
5a738aea 5437<dd class="description">Server has gone away</dd>
a469f8a5 5438<dt>HTTP_STATUS_LENGTH_REQUIRED </dt>
5a738aea 5439<dd class="description">A content length or encoding is required</dd>
a469f8a5 5440<dt>HTTP_STATUS_METHOD_NOT_ALLOWED </dt>
5a738aea 5441<dd class="description">Method is not allowed</dd>
a469f8a5 5442<dt>HTTP_STATUS_MOVED_PERMANENTLY </dt>
5a738aea 5443<dd class="description">Document has moved permanently</dd>
a469f8a5 5444<dt>HTTP_STATUS_MOVED_TEMPORARILY </dt>
5a738aea 5445<dd class="description">Document has moved temporarily</dd>
a469f8a5 5446<dt>HTTP_STATUS_MULTIPLE_CHOICES </dt>
5a738aea 5447<dd class="description">Multiple files match request</dd>
a469f8a5
MS
5448<dt>HTTP_STATUS_NONE <span class="info">&nbsp;CUPS 1.7&nbsp;</span></dt>
5449<dd class="description">No Expect value </dd>
5450<dt>HTTP_STATUS_NOT_ACCEPTABLE </dt>
5a738aea 5451<dd class="description">Not Acceptable</dd>
a469f8a5 5452<dt>HTTP_STATUS_NOT_AUTHORITATIVE </dt>
5a738aea 5453<dd class="description">Information isn't authoritative</dd>
a469f8a5 5454<dt>HTTP_STATUS_NOT_FOUND </dt>
5a738aea 5455<dd class="description">URI was not found</dd>
a469f8a5 5456<dt>HTTP_STATUS_NOT_IMPLEMENTED </dt>
5a738aea 5457<dd class="description">Feature not implemented</dd>
a469f8a5 5458<dt>HTTP_STATUS_NOT_MODIFIED </dt>
5a738aea 5459<dd class="description">File not modified</dd>
a469f8a5 5460<dt>HTTP_STATUS_NOT_SUPPORTED </dt>
5a738aea 5461<dd class="description">HTTP version not supported</dd>
a469f8a5 5462<dt>HTTP_STATUS_NO_CONTENT </dt>
5a738aea 5463<dd class="description">Successful command, no new data</dd>
a469f8a5 5464<dt>HTTP_STATUS_OK </dt>
5a738aea 5465<dd class="description">OPTIONS/GET/HEAD/POST/TRACE command was successful</dd>
a469f8a5 5466<dt>HTTP_STATUS_PARTIAL_CONTENT </dt>
5a738aea 5467<dd class="description">Only a partial file was recieved/sent</dd>
a469f8a5 5468<dt>HTTP_STATUS_PAYMENT_REQUIRED </dt>
5a738aea 5469<dd class="description">Payment required</dd>
a469f8a5 5470<dt>HTTP_STATUS_PRECONDITION </dt>
5a738aea 5471<dd class="description">Precondition failed</dd>
a469f8a5 5472<dt>HTTP_STATUS_PROXY_AUTHENTICATION </dt>
5a738aea 5473<dd class="description">Proxy Authentication is Required</dd>
a469f8a5 5474<dt>HTTP_STATUS_REQUESTED_RANGE </dt>
5a738aea 5475<dd class="description">The requested range is not satisfiable</dd>
a469f8a5 5476<dt>HTTP_STATUS_REQUEST_TIMEOUT </dt>
5a738aea 5477<dd class="description">Request timed out</dd>
a469f8a5 5478<dt>HTTP_STATUS_REQUEST_TOO_LARGE </dt>
5a738aea 5479<dd class="description">Request entity too large</dd>
a469f8a5 5480<dt>HTTP_STATUS_RESET_CONTENT </dt>
5a738aea 5481<dd class="description">Content was reset/recreated</dd>
a469f8a5 5482<dt>HTTP_STATUS_SEE_OTHER </dt>
5a738aea 5483<dd class="description">See this other link...</dd>
a469f8a5 5484<dt>HTTP_STATUS_SERVER_ERROR </dt>
5a738aea 5485<dd class="description">Internal server error</dd>
a469f8a5 5486<dt>HTTP_STATUS_SERVICE_UNAVAILABLE </dt>
5a738aea 5487<dd class="description">Service is unavailable</dd>
a469f8a5 5488<dt>HTTP_STATUS_SWITCHING_PROTOCOLS </dt>
5a738aea 5489<dd class="description">HTTP upgrade to TLS/SSL</dd>
a469f8a5 5490<dt>HTTP_STATUS_UNAUTHORIZED </dt>
5a738aea 5491<dd class="description">Unauthorized to access host</dd>
a469f8a5 5492<dt>HTTP_STATUS_UNSUPPORTED_MEDIATYPE </dt>
5a738aea 5493<dd class="description">The requested media type is unsupported</dd>
a469f8a5 5494<dt>HTTP_STATUS_UPGRADE_REQUIRED </dt>
5a738aea 5495<dd class="description">Upgrade to SSL/TLS required</dd>
a469f8a5 5496<dt>HTTP_STATUS_URI_TOO_LONG </dt>
5a738aea 5497<dd class="description">URI too long</dd>
a469f8a5 5498<dt>HTTP_STATUS_USE_PROXY </dt>
5a738aea
MS
5499<dd class="description">Must use a proxy to access this URI</dd>
5500</dl>
5501<h3 class="enumeration"><a name="http_uri_coding_e">http_uri_coding_e</a></h3>
f11a948a 5502<p class="description">URI en/decode flags</p>
5a738aea
MS
5503<h4 class="constants">Constants</h4>
5504<dl>
5505<dt>HTTP_URI_CODING_ALL </dt>
5506<dd class="description">En/decode everything</dd>
5507<dt>HTTP_URI_CODING_HOSTNAME </dt>
5508<dd class="description">En/decode the hostname portion</dd>
5509<dt>HTTP_URI_CODING_MOST </dt>
5510<dd class="description">En/decode all but the query</dd>
5511<dt>HTTP_URI_CODING_NONE </dt>
5512<dd class="description">Don't en/decode anything</dd>
5513<dt>HTTP_URI_CODING_QUERY </dt>
5514<dd class="description">En/decode the query portion</dd>
5515<dt>HTTP_URI_CODING_RESOURCE </dt>
5516<dd class="description">En/decode the resource portion</dd>
5517<dt>HTTP_URI_CODING_USERNAME </dt>
5518<dd class="description">En/decode the username portion</dd>
5519</dl>
10d09e33 5520<h3 class="enumeration"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="http_uri_status_e">http_uri_status_e</a></h3>
f11a948a 5521<p class="description">URI separation status </p>
5a738aea
MS
5522<h4 class="constants">Constants</h4>
5523<dl>
a469f8a5 5524<dt>HTTP_URI_STATUS_BAD_ARGUMENTS </dt>
5a738aea 5525<dd class="description">Bad arguments to function (error)</dd>
a469f8a5 5526<dt>HTTP_URI_STATUS_BAD_HOSTNAME </dt>
5a738aea 5527<dd class="description">Bad hostname in URI (error)</dd>
a469f8a5 5528<dt>HTTP_URI_STATUS_BAD_PORT </dt>
5a738aea 5529<dd class="description">Bad port number in URI (error)</dd>
a469f8a5 5530<dt>HTTP_URI_STATUS_BAD_RESOURCE </dt>
5a738aea 5531<dd class="description">Bad resource in URI (error)</dd>
a469f8a5 5532<dt>HTTP_URI_STATUS_BAD_SCHEME </dt>
5a738aea 5533<dd class="description">Bad scheme in URI (error)</dd>
a469f8a5 5534<dt>HTTP_URI_STATUS_BAD_URI </dt>
5a738aea 5535<dd class="description">Bad/empty URI (error)</dd>
a469f8a5 5536<dt>HTTP_URI_STATUS_BAD_USERNAME </dt>
5a738aea 5537<dd class="description">Bad username in URI (error)</dd>
a469f8a5 5538<dt>HTTP_URI_STATUS_MISSING_RESOURCE </dt>
5a738aea 5539<dd class="description">Missing resource in URI (warning)</dd>
a469f8a5 5540<dt>HTTP_URI_STATUS_MISSING_SCHEME </dt>
5a738aea 5541<dd class="description">Missing scheme in URI (warning)</dd>
a469f8a5 5542<dt>HTTP_URI_STATUS_OK </dt>
5a738aea 5543<dd class="description">URI decoded OK</dd>
a469f8a5 5544<dt>HTTP_URI_STATUS_OVERFLOW </dt>
5a738aea 5545<dd class="description">URI buffer for httpAssembleURI is too small</dd>
a469f8a5 5546<dt>HTTP_URI_STATUS_UNKNOWN_SCHEME </dt>
5a738aea
MS
5547<dd class="description">Unknown scheme in URI (warning)</dd>
5548</dl>
5549<h3 class="enumeration"><a name="http_version_e">http_version_e</a></h3>
f11a948a 5550<p class="description">HTTP version numbers</p>
5a738aea
MS
5551<h4 class="constants">Constants</h4>
5552<dl>
a469f8a5 5553<dt>HTTP_VERSION_0_9 </dt>
5a738aea 5554<dd class="description">HTTP/0.9</dd>
a469f8a5 5555<dt>HTTP_VERSION_1_0 </dt>
5a738aea 5556<dd class="description">HTTP/1.0</dd>
a469f8a5 5557<dt>HTTP_VERSION_1_1 </dt>
5a738aea
MS
5558<dd class="description">HTTP/1.1</dd>
5559</dl>
a2326b5b
MS
5560<h3 class="enumeration"><a name="ipp_dstate_e">ipp_dstate_e</a></h3>
5561<p class="description">Document states</p>
5562<h4 class="constants">Constants</h4>
5563<dl>
5564<dt>IPP_DOCUMENT_ABORTED </dt>
a469f8a5 5565<dd class="description">Document is aborted</dd>
a2326b5b 5566<dt>IPP_DOCUMENT_CANCELED </dt>
a469f8a5 5567<dd class="description">Document is canceled</dd>
a2326b5b 5568<dt>IPP_DOCUMENT_COMPLETED </dt>
a469f8a5 5569<dd class="description">Document is completed</dd>
a2326b5b 5570<dt>IPP_DOCUMENT_PENDING </dt>
a469f8a5 5571<dd class="description">Document is pending</dd>
a2326b5b 5572<dt>IPP_DOCUMENT_PROCESSING </dt>
a469f8a5 5573<dd class="description">Document is processing</dd>
a2326b5b 5574</dl>
a469f8a5 5575<h3 class="enumeration"><a name="ipp_finishings_e">ipp_finishings_e</a></h3>
aaf19ab0 5576<p class="description">Finishings</p>
5a738aea
MS
5577<h4 class="constants">Constants</h4>
5578<dl>
5579<dt>IPP_FINISHINGS_BALE </dt>
5580<dd class="description">Bale (any type)</dd>
5581<dt>IPP_FINISHINGS_BIND </dt>
5582<dd class="description">Bind</dd>
5583<dt>IPP_FINISHINGS_BIND_BOTTOM </dt>
5584<dd class="description">Bind on bottom</dd>
5585<dt>IPP_FINISHINGS_BIND_LEFT </dt>
5586<dd class="description">Bind on left</dd>
5587<dt>IPP_FINISHINGS_BIND_RIGHT </dt>
5588<dd class="description">Bind on right</dd>
5589<dt>IPP_FINISHINGS_BIND_TOP </dt>
5590<dd class="description">Bind on top</dd>
5591<dt>IPP_FINISHINGS_BOOKLET_MAKER </dt>
5592<dd class="description">Fold to make booklet</dd>
5593<dt>IPP_FINISHINGS_COVER </dt>
5594<dd class="description">Add cover</dd>
a469f8a5
MS
5595<dt>IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_LEFT </dt>
5596<dd class="description">Punch 1 hole bottom left</dd>
5597<dt>IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_RIGHT </dt>
5598<dd class="description">Punch 1 hole bottom right</dd>
5599<dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_BOTTOM </dt>
5600<dd class="description">Punch 2 holes bottom edge</dd>
5601<dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_LEFT </dt>
5602<dd class="description">Punch 2 holes left side</dd>
5603<dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_RIGHT </dt>
5604<dd class="description">Punch 2 holes right side</dd>
5605<dt>IPP_FINISHINGS_CUPS_PUNCH_DUAL_TOP </dt>
5606<dd class="description">Punch 2 holes top edge</dd>
5607<dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_BOTTOM </dt>
5608<dd class="description">Punch 4 holes bottom edge</dd>
5609<dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_LEFT </dt>
5610<dd class="description">Punch 4 holes left side</dd>
5611<dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_RIGHT </dt>
5612<dd class="description">Punch 4 holes right side</dd>
5613<dt>IPP_FINISHINGS_CUPS_PUNCH_QUAD_TOP </dt>
5614<dd class="description">Punch 4 holes top edge</dd>
5615<dt>IPP_FINISHINGS_CUPS_PUNCH_TOP_LEFT </dt>
5616<dd class="description">Punch 1 hole top left</dd>
5617<dt>IPP_FINISHINGS_CUPS_PUNCH_TOP_RIGHT </dt>
5618<dd class="description">Punch 1 hole top right</dd>
5619<dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_BOTTOM </dt>
5620<dd class="description">Punch 3 holes bottom edge</dd>
5621<dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_LEFT </dt>
5622<dd class="description">Punch 3 holes left side</dd>
5623<dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_RIGHT </dt>
5624<dd class="description">Punch 3 holes right side</dd>
5625<dt>IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_TOP </dt>
5626<dd class="description">Punch 3 holes top edge</dd>
5a738aea
MS
5627<dt>IPP_FINISHINGS_EDGE_STITCH </dt>
5628<dd class="description">Stitch along any side</dd>
5629<dt>IPP_FINISHINGS_EDGE_STITCH_BOTTOM </dt>
5630<dd class="description">Stitch along bottom edge</dd>
5631<dt>IPP_FINISHINGS_EDGE_STITCH_LEFT </dt>
5632<dd class="description">Stitch along left side</dd>
5633<dt>IPP_FINISHINGS_EDGE_STITCH_RIGHT </dt>
5634<dd class="description">Stitch along right side</dd>
5635<dt>IPP_FINISHINGS_EDGE_STITCH_TOP </dt>
5636<dd class="description">Stitch along top edge</dd>
5637<dt>IPP_FINISHINGS_FOLD </dt>
5638<dd class="description">Fold (any type)</dd>
5639<dt>IPP_FINISHINGS_JOB_OFFSET </dt>
5640<dd class="description">Offset for binding (any type)</dd>
5641<dt>IPP_FINISHINGS_NONE </dt>
5642<dd class="description">No finishing</dd>
5643<dt>IPP_FINISHINGS_PUNCH </dt>
5644<dd class="description">Punch (any location/count)</dd>
5645<dt>IPP_FINISHINGS_SADDLE_STITCH </dt>
5646<dd class="description">Staple interior</dd>
5647<dt>IPP_FINISHINGS_STAPLE </dt>
5648<dd class="description">Staple (any location)</dd>
5649<dt>IPP_FINISHINGS_STAPLE_BOTTOM_LEFT </dt>
5650<dd class="description">Staple bottom left corner</dd>
5651<dt>IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT </dt>
5652<dd class="description">Staple bottom right corner</dd>
5653<dt>IPP_FINISHINGS_STAPLE_DUAL_BOTTOM </dt>
5654<dd class="description">Two staples on bottom</dd>
5655<dt>IPP_FINISHINGS_STAPLE_DUAL_LEFT </dt>
5656<dd class="description">Two staples on left</dd>
5657<dt>IPP_FINISHINGS_STAPLE_DUAL_RIGHT </dt>
5658<dd class="description">Two staples on right</dd>
5659<dt>IPP_FINISHINGS_STAPLE_DUAL_TOP </dt>
5660<dd class="description">Two staples on top</dd>
5661<dt>IPP_FINISHINGS_STAPLE_TOP_LEFT </dt>
5662<dd class="description">Staple top left corner</dd>
5663<dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT </dt>
5664<dd class="description">Staple top right corner</dd>
5665<dt>IPP_FINISHINGS_TRIM </dt>
5666<dd class="description">Trim (any type)</dd>
a2326b5b
MS
5667<dt>IPP_FINISHINGS_TRIM_AFTER_COPIES </dt>
5668<dd class="description">Trim output after each copy</dd>
5669<dt>IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS </dt>
5670<dd class="description">Trim output after each document</dd>
5671<dt>IPP_FINISHINGS_TRIM_AFTER_JOB </dt>
5672<dd class="description">Trim output after job</dd>
5673<dt>IPP_FINISHINGS_TRIM_AFTER_PAGES </dt>
5674<dd class="description">Trim output after each page</dd>
5675</dl>
5676<h3 class="enumeration"><a name="ipp_jcollate_e">ipp_jcollate_e</a></h3>
5677<p class="description">Job collation types</p>
5678<h4 class="constants">Constants</h4>
5679<dl>
a469f8a5
MS
5680<dt>IPP_JCOLLATE_COLLATED_DOCUMENTS </dt>
5681<dt>IPP_JCOLLATE_UNCOLLATED_DOCUMENTS </dt>
5682<dt>IPP_JCOLLATE_UNCOLLATED_SHEETS </dt>
5a738aea
MS
5683</dl>
5684<h3 class="enumeration"><a name="ipp_jstate_e">ipp_jstate_e</a></h3>
aaf19ab0 5685<p class="description">Job states</p>
5a738aea
MS
5686<h4 class="constants">Constants</h4>
5687<dl>
a469f8a5 5688<dt>IPP_JSTATE_ABORTED </dt>
5a738aea 5689<dd class="description">Job has aborted due to error</dd>
a469f8a5 5690<dt>IPP_JSTATE_CANCELED </dt>
5a738aea 5691<dd class="description">Job has been canceled</dd>
a469f8a5 5692<dt>IPP_JSTATE_COMPLETED </dt>
5a738aea 5693<dd class="description">Job has completed successfully</dd>
a469f8a5 5694<dt>IPP_JSTATE_HELD </dt>
5a738aea 5695<dd class="description">Job is held for printing</dd>
a469f8a5 5696<dt>IPP_JSTATE_PENDING </dt>
5a738aea 5697<dd class="description">Job is waiting to be printed</dd>
a469f8a5 5698<dt>IPP_JSTATE_PROCESSING </dt>
5a738aea 5699<dd class="description">Job is currently printing</dd>
a469f8a5 5700<dt>IPP_JSTATE_STOPPED </dt>
5a738aea
MS
5701<dd class="description">Job has been stopped</dd>
5702</dl>
5703<h3 class="enumeration"><a name="ipp_op_e">ipp_op_e</a></h3>
aaf19ab0 5704<p class="description">IPP operations</p>
5a738aea
MS
5705<h4 class="constants">Constants</h4>
5706<dl>
a469f8a5
MS
5707<dt>IPP_OP_CANCEL_JOB </dt>
5708<dd class="description">Cancel a job</dd>
5709<dt>IPP_OP_CANCEL_JOBS </dt>
5710<dd class="description">Cancel-Jobs</dd>
5711<dt>IPP_OP_CANCEL_MY_JOBS </dt>
5712<dd class="description">Cancel-My-Jobs</dd>
5713<dt>IPP_OP_CANCEL_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
5714<dd class="description">Cancel a subscription </dd>
5715<dt>IPP_OP_CLOSE_JOB </dt>
5716<dd class="description">Close-Job</dd>
5717<dt>IPP_OP_CREATE_JOB </dt>
5718<dd class="description">Create an empty print job</dd>
5719<dt>IPP_OP_CREATE_JOB_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
5720<dd class="description">Create a job subscription </dd>
5721<dt>IPP_OP_CREATE_PRINTER_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
5722<dd class="description">Create a printer subscription </dd>
5723<dt>IPP_OP_CUPS_ACCEPT_JOBS </dt>
5a738aea 5724<dd class="description">Accept new jobs on a printer</dd>
a469f8a5 5725<dt>IPP_OP_CUPS_ADD_MODIFY_CLASS </dt>
5a738aea 5726<dd class="description">Add or modify a class</dd>
a469f8a5 5727<dt>IPP_OP_CUPS_ADD_MODIFY_PRINTER </dt>
5a738aea 5728<dd class="description">Add or modify a printer</dd>
a469f8a5 5729<dt>IPP_OP_CUPS_AUTHENTICATE_JOB <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
5a738aea 5730<dd class="description">Authenticate a job </dd>
a469f8a5 5731<dt>IPP_OP_CUPS_DELETE_CLASS </dt>
5a738aea 5732<dd class="description">Delete a class</dd>
a469f8a5 5733<dt>IPP_OP_CUPS_DELETE_PRINTER </dt>
5a738aea 5734<dd class="description">Delete a printer</dd>
a469f8a5 5735<dt>IPP_OP_CUPS_GET_CLASSES <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
5a738aea 5736<dd class="description">Get a list of classes </dd>
a469f8a5 5737<dt>IPP_OP_CUPS_GET_DEFAULT </dt>
5a738aea 5738<dd class="description">Get the default printer</dd>
a469f8a5 5739<dt>IPP_OP_CUPS_GET_DEVICES </dt>
5a738aea 5740<dd class="description">Get a list of supported devices</dd>
a469f8a5 5741<dt>IPP_OP_CUPS_GET_DOCUMENT <span class="info">&nbsp;CUPS 1.4/OS X 10.6&nbsp;</span></dt>
5a738aea 5742<dd class="description">Get a document file </dd>
a469f8a5 5743<dt>IPP_OP_CUPS_GET_PPD <span class="info">&nbsp;CUPS 1.3/OS X 10.5&nbsp;</span></dt>
5a738aea 5744<dd class="description">Get a PPD file </dd>
a469f8a5 5745<dt>IPP_OP_CUPS_GET_PPDS </dt>
5a738aea 5746<dd class="description">Get a list of supported drivers</dd>
a469f8a5 5747<dt>IPP_OP_CUPS_GET_PRINTERS </dt>
5a738aea 5748<dd class="description">Get a list of printers and/or classes</dd>
a469f8a5
MS
5749<dt>IPP_OP_CUPS_INVALID </dt>
5750<dd class="description">Invalid operation name for <a href="#ippOpValue"><code>ippOpValue</code></a></dd>
5751<dt>IPP_OP_CUPS_MOVE_JOB </dt>
5a738aea 5752<dd class="description">Move a job to a different printer</dd>
a469f8a5 5753<dt>IPP_OP_CUPS_REJECT_JOBS </dt>
5a738aea 5754<dd class="description">Reject new jobs on a printer</dd>
a469f8a5 5755<dt>IPP_OP_CUPS_SET_DEFAULT </dt>
5a738aea 5756<dd class="description">Set the default printer</dd>
a469f8a5 5757<dt>IPP_OP_DISABLE_PRINTER </dt>
5a738aea 5758<dd class="description">Stop a printer</dd>
a469f8a5 5759<dt>IPP_OP_ENABLE_PRINTER </dt>
5a738aea 5760<dd class="description">Start a printer</dd>
a469f8a5 5761<dt>IPP_OP_GET_JOBS </dt>
5a738aea 5762<dd class="description">Get a list of jobs</dd>
a469f8a5 5763<dt>IPP_OP_GET_JOB_ATTRIBUTES </dt>
5a738aea 5764<dd class="description">Get job attributes</dd>
a469f8a5 5765<dt>IPP_OP_GET_NOTIFICATIONS <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
5a738aea 5766<dd class="description">Get notification events </dd>
a469f8a5 5767<dt>IPP_OP_GET_PRINTER_ATTRIBUTES </dt>
5a738aea 5768<dd class="description">Get printer attributes</dd>
a469f8a5 5769<dt>IPP_OP_GET_PRINTER_SUPPORTED_VALUES </dt>
5a738aea 5770<dd class="description">Get supported attribute values</dd>
a469f8a5 5771<dt>IPP_OP_GET_SUBSCRIPTIONS <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
5a738aea 5772<dd class="description">Get list of subscriptions </dd>
a469f8a5 5773<dt>IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
5a738aea 5774<dd class="description">Get subscription attributes </dd>
a469f8a5 5775<dt>IPP_OP_HOLD_JOB </dt>
5a738aea 5776<dd class="description">Hold a job for printing</dd>
a469f8a5 5777<dt>IPP_OP_IDENTIFY_PRINTER </dt>
a2326b5b 5778<dd class="description">Identify-Printer (proposed IPP JPS3)</dd>
a469f8a5 5779<dt>IPP_OP_PAUSE_PRINTER </dt>
5a738aea 5780<dd class="description">Stop a printer</dd>
a469f8a5 5781<dt>IPP_OP_PRINT_JOB </dt>
5a738aea 5782<dd class="description">Print a single file</dd>
a469f8a5 5783<dt>IPP_OP_PURGE_JOBS </dt>
5a738aea 5784<dd class="description">Cancel all jobs</dd>
a469f8a5 5785<dt>IPP_OP_RELEASE_JOB </dt>
5a738aea 5786<dd class="description">Release a job for printing</dd>
a469f8a5 5787<dt>IPP_OP_RENEW_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/OS X 10.5&nbsp;</span></dt>
5a738aea 5788<dd class="description">Renew a printer subscription </dd>
a469f8a5 5789<dt>IPP_OP_RESTART_JOB </dt>
5a738aea 5790<dd class="description">Reprint a job</dd>
a469f8a5 5791<dt>IPP_OP_RESUBMIT_JOB </dt>
aaf19ab0 5792<dd class="description">Resubmit-Job</dd>
a469f8a5 5793<dt>IPP_OP_RESUME_PRINTER </dt>
5a738aea 5794<dd class="description">Start a printer</dd>
a469f8a5 5795<dt>IPP_OP_SEND_DOCUMENT </dt>
5a738aea 5796<dd class="description">Add a file to a job</dd>
a469f8a5 5797<dt>IPP_OP_SET_JOB_ATTRIBUTES </dt>
5a738aea 5798<dd class="description">Set job attributes</dd>
a469f8a5 5799<dt>IPP_OP_VALIDATE_DOCUMENT </dt>
82cc1f9a 5800<dd class="description">Validate-Document (proposed IPP JPS3)</dd>
a469f8a5 5801<dt>IPP_OP_VALIDATE_JOB </dt>
5a738aea
MS
5802<dd class="description">Validate job options</dd>
5803</dl>
5804<h3 class="enumeration"><a name="ipp_orient_e">ipp_orient_e</a></h3>
aaf19ab0 5805<p class="description">Orientation values</p>
5a738aea
MS
5806<h4 class="constants">Constants</h4>
5807<dl>
a469f8a5 5808<dt>IPP_ORIENT_LANDSCAPE </dt>
5a738aea 5809<dd class="description">90 degrees counter-clockwise</dd>
a469f8a5 5810<dt>IPP_ORIENT_PORTRAIT </dt>
5a738aea 5811<dd class="description">No rotation</dd>
a469f8a5 5812<dt>IPP_ORIENT_REVERSE_LANDSCAPE </dt>
5a738aea 5813<dd class="description">90 degrees clockwise</dd>
a469f8a5 5814<dt>IPP_ORIENT_REVERSE_PORTRAIT </dt>
5a738aea
MS
5815<dd class="description">180 degrees</dd>
5816</dl>
5817<h3 class="enumeration"><a name="ipp_pstate_e">ipp_pstate_e</a></h3>
aaf19ab0 5818<p class="description">Printer states</p>
5a738aea
MS
5819<h4 class="constants">Constants</h4>
5820<dl>
a469f8a5 5821<dt>IPP_PSTATE_IDLE </dt>
5a738aea 5822<dd class="description">Printer is idle</dd>
a469f8a5 5823<dt>IPP_PSTATE_PROCESSING </dt>
5a738aea 5824<dd class="description">Printer is working</dd>
a469f8a5 5825<dt>IPP_PSTATE_STOPPED </dt>
5a738aea
MS
5826<dd class="description">Printer is stopped</dd>
5827</dl>
5828<h3 class="enumeration"><a name="ipp_quality_e">ipp_quality_e</a></h3>
aaf19ab0 5829<p class="description">Qualities</p>
5a738aea
MS
5830<h4 class="constants">Constants</h4>
5831<dl>
5832<dt>IPP_QUALITY_DRAFT </dt>
5833<dd class="description">Draft quality</dd>
5834<dt>IPP_QUALITY_HIGH </dt>
5835<dd class="description">High quality</dd>
5836<dt>IPP_QUALITY_NORMAL </dt>
5837<dd class="description">Normal quality</dd>
5838</dl>
5839<h3 class="enumeration"><a name="ipp_res_e">ipp_res_e</a></h3>
aaf19ab0 5840<p class="description">Resolution units</p>
5a738aea
MS
5841<h4 class="constants">Constants</h4>
5842<dl>
5843<dt>IPP_RES_PER_CM </dt>
5844<dd class="description">Pixels per centimeter</dd>
5845<dt>IPP_RES_PER_INCH </dt>
5846<dd class="description">Pixels per inch</dd>
5847</dl>
5848<h3 class="enumeration"><a name="ipp_state_e">ipp_state_e</a></h3>
aaf19ab0 5849<p class="description">IPP states</p>
5a738aea
MS
5850<h4 class="constants">Constants</h4>
5851<dl>
a469f8a5 5852<dt>IPP_STATE_ATTRIBUTE </dt>
5a738aea 5853<dd class="description">One or more attributes need to be sent/received</dd>
a469f8a5 5854<dt>IPP_STATE_DATA </dt>
5a738aea 5855<dd class="description">IPP request data needs to be sent/received</dd>
a469f8a5 5856<dt>IPP_STATE_ERROR </dt>
5a738aea 5857<dd class="description">An error occurred</dd>
a469f8a5 5858<dt>IPP_STATE_HEADER </dt>
5a738aea 5859<dd class="description">The request header needs to be sent/received</dd>
a469f8a5 5860<dt>IPP_STATE_IDLE </dt>
5a738aea
MS
5861<dd class="description">Nothing is happening/request completed</dd>
5862</dl>
5863<h3 class="enumeration"><a name="ipp_status_e">ipp_status_e</a></h3>
aaf19ab0 5864<p class="description">IPP status codes</p>
5a738aea
MS
5865<h4 class="constants">Constants</h4>
5866<dl>
a469f8a5
MS
5867<dt>IPP_STATUS_CUPS_INVALID </dt>
5868<dd class="description">Invalid status name for <a href="#ippErrorValue"><code>ippErrorValue</code></a></dd>
5869<dt>IPP_STATUS_CUPS_SEE_OTHER </dt>
5a738aea 5870<dd class="description">cups-see-other</dd>
a469f8a5 5871<dt>IPP_STATUS_ERROR_ATTRIBUTES_NOT_SETTABLE </dt>
5a738aea 5872<dd class="description">client-error-attributes-not-settable</dd>
a469f8a5
MS
5873<dt>IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES </dt>
5874<dd class="description">client-error-attributes-or-values-not-supported</dd>
5875<dt>IPP_STATUS_ERROR_BAD_REQUEST </dt>
5a738aea 5876<dd class="description">client-error-bad-request</dd>
a469f8a5
MS
5877<dt>IPP_STATUS_ERROR_BUSY </dt>
5878<dd class="description">server-error-busy</dd>
5879<dt>IPP_STATUS_ERROR_CHARSET </dt>
5a738aea 5880<dd class="description">client-error-charset-not-supported</dd>
a469f8a5 5881<dt>IPP_STATUS_ERROR_COMPRESSION_ERROR </dt>
5a738aea 5882<dd class="description">client-error-compression-error</dd>
a469f8a5 5883<dt>IPP_STATUS_ERROR_COMPRESSION_NOT_SUPPORTED </dt>
5a738aea 5884<dd class="description">client-error-compression-not-supported</dd>
a469f8a5 5885<dt>IPP_STATUS_ERROR_CONFLICTING </dt>
5a738aea 5886<dd class="description">client-error-conflicting-attributes</dd>
a469f8a5
MS
5887<dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED <span class="info">&nbsp;CUPS 1.7&nbsp;</span></dt>
5888<dd class="description">cups-error-account-authorization-failed </dd>
5889<dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED <span class="info">&nbsp;CUPS 1.7&nbsp;</span></dt>
5890<dd class="description">cups-error-account-closed </dd>
5891<dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED <span class="info">&nbsp;CUPS 1.7&nbsp;</span></dt>
5892<dd class="description">cups-error-account-info-needed </dd>
5893<dt>IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED <span class="info">&nbsp;CUPS 1.7&nbsp;</span></dt>
5894<dd class="description">cups-error-account-limit-reached </dd>
5895<dt>IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED <span class="info">&nbsp;CUPS 1.5/OS X 10.7&nbsp;</span></dt>
5896<dd class="description">cups-authentication-canceled - Authentication canceled by user </dd>
5897<dt>IPP_STATUS_ERROR_CUPS_PKI <span class="info">&nbsp;CUPS 1.5/OS X 10.7&nbsp;</span></dt>
5898<dd class="description">cups-pki-error - Error negotiating a secure connection </dd>
5899<dt>IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED </dt>
5900<dd class="description">cups-upgrade-required - TLS upgrade required</dd>
5901<dt>IPP_STATUS_ERROR_DEVICE </dt>
5a738aea 5902<dd class="description">server-error-device-error</dd>
a469f8a5 5903<dt>IPP_STATUS_ERROR_DOCUMENT_ACCESS </dt>
5a738aea 5904<dd class="description">client-error-document-access-error</dd>
a469f8a5 5905<dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR </dt>
5a738aea 5906<dd class="description">client-error-document-format-error</dd>
a469f8a5
MS
5907<dt>IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED </dt>
5908<dd class="description">client-error-document-format-not-supported</dd>
5909<dt>IPP_STATUS_ERROR_DOCUMENT_PASSWORD </dt>
a2326b5b 5910<dd class="description">client-error-document-password-error</dd>
a469f8a5 5911<dt>IPP_STATUS_ERROR_DOCUMENT_PERMISSION </dt>
a2326b5b 5912<dd class="description">client-error-document-permission-error</dd>
a469f8a5 5913<dt>IPP_STATUS_ERROR_DOCUMENT_SECURITY </dt>
a2326b5b 5914<dd class="description">client-error-document-security-error</dd>
a469f8a5 5915<dt>IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE </dt>
a2326b5b 5916<dd class="description">client-error-document-unprintable-error</dd>
a469f8a5 5917<dt>IPP_STATUS_ERROR_FORBIDDEN </dt>
5a738aea 5918<dd class="description">client-error-forbidden</dd>
a469f8a5 5919<dt>IPP_STATUS_ERROR_GONE </dt>
5a738aea 5920<dd class="description">client-error-gone</dd>
a469f8a5 5921<dt>IPP_STATUS_ERROR_IGNORED_ALL_SUBSCRIPTIONS </dt>
5a738aea 5922<dd class="description">client-error-ignored-all-subscriptions</dd>
a469f8a5 5923<dt>IPP_STATUS_ERROR_INTERNAL </dt>
5a738aea 5924<dd class="description">server-error-internal-error</dd>
a469f8a5
MS
5925<dt>IPP_STATUS_ERROR_JOB_CANCELED </dt>
5926<dd class="description">server-error-job-canceled</dd>
5927<dt>IPP_STATUS_ERROR_MULTIPLE_JOBS_NOT_SUPPORTED </dt>
5a738aea 5928<dd class="description">server-error-multiple-document-jobs-not-supported</dd>
a469f8a5 5929<dt>IPP_STATUS_ERROR_NOT_ACCEPTING_JOBS </dt>
5a738aea 5930<dd class="description">server-error-not-accepting-jobs</dd>
a469f8a5 5931<dt>IPP_STATUS_ERROR_NOT_AUTHENTICATED </dt>
5a738aea 5932<dd class="description">client-error-not-authenticated</dd>
a469f8a5 5933<dt>IPP_STATUS_ERROR_NOT_AUTHORIZED </dt>
5a738aea 5934<dd class="description">client-error-not-authorized</dd>
a469f8a5 5935<dt>IPP_STATUS_ERROR_NOT_FOUND </dt>
5a738aea 5936<dd class="description">client-error-not-found</dd>
a469f8a5 5937<dt>IPP_STATUS_ERROR_NOT_POSSIBLE </dt>
5a738aea 5938<dd class="description">client-error-not-possible</dd>
a469f8a5 5939<dt>IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED </dt>
5a738aea 5940<dd class="description">server-error-operation-not-supported</dd>
a469f8a5 5941<dt>IPP_STATUS_ERROR_PRINTER_IS_DEACTIVATED </dt>
5a738aea 5942<dd class="description">server-error-printer-is-deactivated</dd>
a469f8a5 5943<dt>IPP_STATUS_ERROR_REQUEST_ENTITY </dt>
5a738aea 5944<dd class="description">client-error-request-entity-too-large</dd>
a469f8a5 5945<dt>IPP_STATUS_ERROR_REQUEST_VALUE </dt>
5a738aea 5946<dd class="description">client-error-request-value-too-long</dd>
a469f8a5 5947<dt>IPP_STATUS_ERROR_SERVICE_UNAVAILABLE </dt>
5a738aea 5948<dd class="description">server-error-service-unavailable</dd>
a469f8a5 5949<dt>IPP_STATUS_ERROR_TEMPORARY </dt>
5a738aea 5950<dd class="description">server-error-temporary-error</dd>
a469f8a5 5951<dt>IPP_STATUS_ERROR_TIMEOUT </dt>
5a738aea 5952<dd class="description">client-error-timeout</dd>
a469f8a5 5953<dt>IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS </dt>
3e7fe0ca 5954<dd class="description">server-error-too-many-documents</dd>
a469f8a5 5955<dt>IPP_STATUS_ERROR_TOO_MANY_JOBS </dt>
3e7fe0ca 5956<dd class="description">server-error-too-many-jobs</dd>
a469f8a5 5957<dt>IPP_STATUS_ERROR_TOO_MANY_SUBSCRIPTIONS </dt>
5a738aea 5958<dd class="description">client-error-too-many-subscriptions</dd>
a469f8a5 5959<dt>IPP_STATUS_ERROR_URI_SCHEME </dt>
5a738aea 5960<dd class="description">client-error-uri-scheme-not-supported</dd>
a469f8a5 5961<dt>IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED </dt>
5a738aea 5962<dd class="description">server-error-version-not-supported</dd>
a469f8a5
MS
5963<dt>IPP_STATUS_OK </dt>
5964<dd class="description">successful-ok</dd>
5965<dt>IPP_STATUS_OK_CONFLICTING </dt>
5966<dd class="description">successful-ok-conflicting-attributes</dd>
5967<dt>IPP_STATUS_OK_EVENTS_COMPLETE </dt>
5968<dd class="description">successful-ok-events-complete</dd>
5969<dt>IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED </dt>
5970<dd class="description">successful-ok-ignored-or-substituted-attributes</dd>
5971<dt>IPP_STATUS_OK_IGNORED_SUBSCRIPTIONS </dt>
5972<dd class="description">successful-ok-ignored-subscriptions</dd>
5973<dt>IPP_STATUS_OK_TOO_MANY_EVENTS </dt>
5974<dd class="description">successful-ok-too-many-events</dd>
5a738aea
MS
5975</dl>
5976<h3 class="enumeration"><a name="ipp_tag_e">ipp_tag_e</a></h3>
aaf19ab0 5977<p class="description">Format tags for attributes</p>
5a738aea
MS
5978<h4 class="constants">Constants</h4>
5979<dl>
5980<dt>IPP_TAG_ADMINDEFINE </dt>
5981<dd class="description">Admin-defined value</dd>
5982<dt>IPP_TAG_BEGIN_COLLECTION </dt>
5983<dd class="description">Beginning of collection value</dd>
5984<dt>IPP_TAG_BOOLEAN </dt>
5985<dd class="description">Boolean value</dd>
5986<dt>IPP_TAG_CHARSET </dt>
5987<dd class="description">Character set value</dd>
3e7fe0ca
MS
5988<dt>IPP_TAG_CUPS_INVALID </dt>
5989<dd class="description">Invalid tag name for <a href="#ippTagValue"><code>ippTagValue</code></a></dd>
5a738aea
MS
5990<dt>IPP_TAG_DATE </dt>
5991<dd class="description">Date/time value</dd>
5992<dt>IPP_TAG_DEFAULT </dt>
5993<dd class="description">Default value</dd>
5994<dt>IPP_TAG_DELETEATTR </dt>
5995<dd class="description">Delete-attribute value</dd>
a2326b5b
MS
5996<dt>IPP_TAG_DOCUMENT </dt>
5997<dd class="description">Document group</dd>
5a738aea
MS
5998<dt>IPP_TAG_END </dt>
5999<dd class="description">End-of-attributes</dd>
6000<dt>IPP_TAG_END_COLLECTION </dt>
6001<dd class="description">End of collection value</dd>
6002<dt>IPP_TAG_ENUM </dt>
6003<dd class="description">Enumeration value</dd>
6004<dt>IPP_TAG_EVENT_NOTIFICATION </dt>
6005<dd class="description">Event group</dd>
a2326b5b
MS
6006<dt>IPP_TAG_EXTENSION </dt>
6007<dd class="description">Extension point for 32-bit tags</dd>
5a738aea
MS
6008<dt>IPP_TAG_INTEGER </dt>
6009<dd class="description">Integer value</dd>
6010<dt>IPP_TAG_JOB </dt>
6011<dd class="description">Job group</dd>
6012<dt>IPP_TAG_KEYWORD </dt>
6013<dd class="description">Keyword value</dd>
6014<dt>IPP_TAG_LANGUAGE </dt>
6015<dd class="description">Language value</dd>
5a738aea
MS
6016<dt>IPP_TAG_MEMBERNAME </dt>
6017<dd class="description">Collection member name value</dd>
6018<dt>IPP_TAG_MIMETYPE </dt>
6019<dd class="description">MIME media type value</dd>
6020<dt>IPP_TAG_NAME </dt>
6021<dd class="description">Name value</dd>
6022<dt>IPP_TAG_NAMELANG </dt>
6023<dd class="description">Name-with-language value</dd>
6024<dt>IPP_TAG_NOTSETTABLE </dt>
6025<dd class="description">Not-settable value</dd>
6026<dt>IPP_TAG_NOVALUE </dt>
6027<dd class="description">No-value value</dd>
6028<dt>IPP_TAG_OPERATION </dt>
6029<dd class="description">Operation group</dd>
6030<dt>IPP_TAG_PRINTER </dt>
6031<dd class="description">Printer group</dd>
6032<dt>IPP_TAG_RANGE </dt>
6033<dd class="description">Range value</dd>
6034<dt>IPP_TAG_RESOLUTION </dt>
6035<dd class="description">Resolution value</dd>
6036<dt>IPP_TAG_STRING </dt>
6037<dd class="description">Octet string value</dd>
6038<dt>IPP_TAG_SUBSCRIPTION </dt>
6039<dd class="description">Subscription group</dd>
6040<dt>IPP_TAG_TEXT </dt>
6041<dd class="description">Text value</dd>
6042<dt>IPP_TAG_TEXTLANG </dt>
6043<dd class="description">Text-with-language value</dd>
6044<dt>IPP_TAG_UNKNOWN </dt>
6045<dd class="description">Unknown value</dd>
6046<dt>IPP_TAG_UNSUPPORTED_GROUP </dt>
6047<dd class="description">Unsupported attributes group</dd>
6048<dt>IPP_TAG_UNSUPPORTED_VALUE </dt>
6049<dd class="description">Unsupported value</dd>
6050<dt>IPP_TAG_URI </dt>
6051<dd class="description">URI value</dd>
6052<dt>IPP_TAG_URISCHEME </dt>
6053<dd class="description">URI scheme value</dd>
6054<dt>IPP_TAG_ZERO </dt>
6055<dd class="description">Zero tag - used for separators</dd>
6056</dl>
6057</div>
ef416fc2 6058</body>
6059</html>