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