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