]> git.ipfire.org Git - thirdparty/cups.git/blob - doc/help/api-httpipp.html
Import changes from CUPS 1.5svn-r9085.
[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 name="creator" content="Mini-XML v2.6">
8 <style type="text/css"><!--
9 BODY {
10 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
11 }
12
13 H1, H2, H3, H4, H5, H6, P, TD, TH {
14 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
15 }
16
17 KBD {
18 font-family: monaco, courier, monospace;
19 font-weight: bold;
20 }
21
22 PRE {
23 font-family: monaco, courier, monospace;
24 }
25
26 PRE.command {
27 margin-left: 36pt;
28 }
29
30 P.compact {
31 margin: 0;
32 }
33
34 P.example {
35 font-style: italic;
36 margin-left: 36pt;
37 }
38
39 PRE.example {
40 background: #eeeeee;
41 border: dotted thin #999999;
42 margin-left: 36pt;
43 padding: 10pt;
44 }
45
46 PRE.command EM, PRE.example EM {
47 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
48 }
49
50 P.command {
51 font-family: monaco, courier, monospace;
52 margin-left: 36pt;
53 }
54
55 P.formula {
56 font-style: italic;
57 margin-left: 36pt;
58 }
59
60 BLOCKQUOTE {
61 background: #eeeeee;
62 border: solid thin #999999;
63 padding: 10pt;
64 }
65
66 A IMG {
67 border: none;
68 }
69
70 A:link:hover IMG {
71 background: #f0f0f0;
72 border-radius: 10px;
73 -moz-border-radius: 10px;
74 }
75
76 A:link, A:visited {
77 font-weight: normal;
78 text-decoration: none;
79 }
80
81 A:link:hover, A:visited:hover, A:active {
82 text-decoration: underline;
83 }
84
85 SUB, SUP {
86 font-size: 50%;
87 }
88
89 TR.data, TD.data, TR.data TD {
90 margin-top: 10pt;
91 padding: 5pt;
92 border-bottom: solid 1pt #999999;
93 }
94
95 TR.data TH {
96 border-bottom: solid 1pt #999999;
97 padding-top: 10pt;
98 padding-left: 5pt;
99 text-align: left;
100 }
101
102 DIV.table TABLE {
103 border: solid thin #999999;
104 border-collapse: collapse;
105 border-spacing: 0;
106 margin-left: auto;
107 margin-right: auto;
108 }
109
110 DIV.table CAPTION {
111 caption-side: top;
112 font-size: 120%;
113 font-style: italic;
114 font-weight: bold;
115 margin-left: auto;
116 margin-right: auto;
117 }
118
119 DIV.table TABLE TD {
120 border: solid thin #cccccc;
121 padding-top: 5pt;
122 }
123
124 DIV.table TABLE TH {
125 background: #cccccc;
126 border: none;
127 border-bottom: solid thin #999999;
128 }
129
130 DIV.figure TABLE {
131 margin-left: auto;
132 margin-right: auto;
133 }
134
135 DIV.figure CAPTION {
136 caption-side: bottom;
137 font-size: 120%;
138 font-style: italic;
139 font-weight: bold;
140 margin-left: auto;
141 margin-right: auto;
142 }
143
144 TH.label {
145 text-align: right;
146 vertical-align: top;
147 }
148
149 TH.sublabel {
150 text-align: right;
151 font-weight: normal;
152 }
153
154 HR {
155 border: solid thin;
156 }
157
158 SPAN.info {
159 background: black;
160 border: thin solid black;
161 color: white;
162 font-size: 80%;
163 font-style: italic;
164 font-weight: bold;
165 white-space: nowrap;
166 }
167
168 H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
169 float: right;
170 font-size: 100%;
171 }
172
173 H1.title {
174 }
175
176 H2.title, H3.title {
177 border-bottom: solid 2pt #000000;
178 }
179
180 DIV.indent, TABLE.indent {
181 margin-top: 2em;
182 margin-left: auto;
183 margin-right: auto;
184 width: 90%;
185 }
186
187 TABLE.indent {
188 border-collapse: collapse;
189 }
190
191 TABLE.indent TD, TABLE.indent TH {
192 padding: 0;
193 }
194
195 TABLE.list {
196 border-collapse: collapse;
197 margin-left: auto;
198 margin-right: auto;
199 width: 90%;
200 }
201
202 TABLE.list TH {
203 background: white;
204 border-bottom: solid thin #cccccc;
205 color: #444444;
206 padding-top: 10pt;
207 padding-left: 5pt;
208 text-align: left;
209 vertical-align: bottom;
210 white-space: nowrap;
211 }
212
213 TABLE.list TH A {
214 color: #4444cc;
215 }
216
217 TABLE.list TD {
218 border-bottom: solid thin #eeeeee;
219 padding-top: 5pt;
220 padding-left: 5pt;
221 }
222
223 TABLE.list TR:nth-child(even) {
224 background: #f8f8f8;
225 }
226
227 TABLE.list TR:nth-child(odd) {
228 background: #f4f4f4;
229 }
230
231 DT {
232 margin-left: 36pt;
233 margin-top: 12pt;
234 }
235
236 DD {
237 margin-left: 54pt;
238 }
239
240 DL.category DT {
241 font-weight: bold;
242 }
243
244 P.summary {
245 margin-left: 36pt;
246 font-family: monaco, courier, monospace;
247 }
248
249 DIV.summary TABLE {
250 border: solid thin #999999;
251 border-collapse: collapse;
252 border-spacing: 0;
253 margin: 10px;
254 }
255
256 DIV.summary TABLE TD, DIV.summary TABLE TH {
257 border: solid thin #999999;
258 padding: 5px;
259 text-align: left;
260 vertical-align: top;
261 }
262
263 DIV.summary TABLE THEAD TH {
264 background: #eeeeee;
265 }
266
267 /* API documentation styles... */
268 div.body h1 {
269 margin: 0;
270 }
271 div.body h2 {
272 margin-top: 1.5em;
273 }
274 div.body h3, div.body h4, div.body h5 {
275 margin-bottom: 0.5em;
276 margin-top: 1.5em;
277 }
278 .class, .enumeration, .function, .struct, .typedef, .union {
279 border-bottom: solid thin #999999;
280 margin-bottom: 0;
281 margin-top: 2em;
282 }
283 .description {
284 margin-top: 0.5em;
285 }
286 code, p.code, pre, ul.code li {
287 font-family: monaco, courier, monospace;
288 font-size: 90%;
289 }
290 ul.code, ul.contents, ul.subcontents {
291 list-style-type: none;
292 margin: 0;
293 padding-left: 0;
294 }
295 ul.code li {
296 margin: 0;
297 }
298 ul.contents > li {
299 margin-top: 1em;
300 }
301 ul.contents li ul.code, ul.contents li ul.subcontents {
302 padding-left: 2em;
303 }
304 div.body dl {
305 margin-left: 0;
306 margin-top: 0;
307 }
308 div.body dt {
309 font-style: italic;
310 margin-left: 0;
311 margin-top: 0;
312 }
313 div.body dd {
314 margin-bottom: 0.5em;
315 }
316
317 /* This is just for the HTML files generated with the framedhelp target */
318 div.contents {
319 background: #e8e8e8;
320 border: solid thin black;
321 padding: 10px;
322 }
323 div.contents h1 {
324 font-size: 110%;
325 }
326 div.contents h2 {
327 font-size: 100%;
328 }
329 div.contents ul.contents {
330 font-size: 80%;
331 }
332 div.contents ul.subcontents li {
333 margin-left: 1em;
334 text-indent: -1em;
335 }
336 --></style>
337 </head>
338 <body>
339 <div class='body'>
340 <!--
341 "$Id$"
342
343 HTTP and IPP API header for the Common UNIX Printing System (CUPS).
344
345 Copyright 2007-2009 by Apple Inc.
346 Copyright 1997-2006 by Easy Software Products, all rights reserved.
347
348 These coded instructions, statements, and computer programs are the
349 property of Apple Inc. and are protected by Federal copyright
350 law. Distribution and use rights are outlined in the file "LICENSE.txt"
351 which should have been included with this file. If this file is
352 file is missing or damaged, see the license at "http://www.cups.org/".
353 -->
354
355 <h1 class='title'>HTTP and IPP APIs</h1>
356
357 <div class='summary'><table summary='General Information'>
358 <thead>
359 <tr>
360 <th>Header</th>
361 <th>cups/cups.h</th>
362 </tr>
363 </thead>
364 <tbody>
365 <tr>
366 <th>Library</th>
367 <td>-lcups</td>
368 </tr>
369 <tr>
370 <th>See Also</th>
371 <td>Programming: <a href='api-overview.html'>Introduction to CUPS Programming</a><br>
372 Programming: <a href='api-cups.html'>CUPS API</a><br>
373 References: <a href='spec-ipp.html'>CUPS Implementation of IPP</a></td>
374 </tr>
375 </tbody>
376 </table></div>
377 <h2 class="title">Contents</h2>
378 <ul class="contents">
379 <ul class="subcontents">
380 <li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
381 <li><a href="#CREATING_URI_STRINGS">Creating URI Strings</a></li>
382 <li><a href="#SENDING_REQUESTS_WITH_FILES">Sending Requests with Files</a></li>
383 <li><a href="#ASYNCHRONOUS_REQUEST_PROCESSING">Asynchronous Request Processing</a></li>
384 </ul></li>
385 <li><a href="#FUNCTIONS">Functions</a><ul class="code">
386 <li><a href="#cupsDoAuthentication" title="Authenticate a request.">cupsDoAuthentication</a></li>
387 <li><a href="#cupsDoFileRequest" title="Do an IPP request with a file.">cupsDoFileRequest</a></li>
388 <li><a href="#cupsDoIORequest" title="Do an IPP request with file descriptors.">cupsDoIORequest</a></li>
389 <li><a href="#cupsDoRequest" title="Do an IPP request.">cupsDoRequest</a></li>
390 <li><a href="#cupsEncodeOptions" title="Encode printer options into IPP attributes.">cupsEncodeOptions</a></li>
391 <li><a href="#cupsEncodeOptions2" title="Encode printer options into IPP attributes for a group.">cupsEncodeOptions2</a></li>
392 <li><a href="#cupsGetDevices" title="Get available printer devices.">cupsGetDevices</a></li>
393 <li><a href="#cupsGetFd" title="Get a file from the server.">cupsGetFd</a></li>
394 <li><a href="#cupsGetFile" title="Get a file from the server.">cupsGetFile</a></li>
395 <li><a href="#cupsGetResponse" title="Get a response to an IPP request.">cupsGetResponse</a></li>
396 <li><a href="#cupsPutFd" title="Put a file on the server.">cupsPutFd</a></li>
397 <li><a href="#cupsPutFile" title="Put a file on the server.">cupsPutFile</a></li>
398 <li><a href="#cupsReadResponseData" title="Read additional data after the IPP response.">cupsReadResponseData</a></li>
399 <li><a href="#cupsSendRequest" title="Send an IPP request.">cupsSendRequest</a></li>
400 <li><a href="#cupsWriteRequestData" title="Write additional data after an IPP request.">cupsWriteRequestData</a></li>
401 <li><a href="#httpAddrAny" title="Check for the &quot;any&quot; address.">httpAddrAny</a></li>
402 <li><a href="#httpAddrEqual" title="Compare two addresses.">httpAddrEqual</a></li>
403 <li><a href="#httpAddrLength" title="Return the length of the address in bytes.">httpAddrLength</a></li>
404 <li><a href="#httpAddrLocalhost" title="Check for the local loopback address.">httpAddrLocalhost</a></li>
405 <li><a href="#httpAddrLookup" title="Lookup the hostname associated with the address.">httpAddrLookup</a></li>
406 <li><a href="#httpAddrString" title="Convert an address to a numeric string.">httpAddrString</a></li>
407 <li><a href="#httpAssembleURI" title="Assemble a uniform resource identifier from its
408 components.">httpAssembleURI</a></li>
409 <li><a href="#httpAssembleURIf" title="Assemble a uniform resource identifier from its
410 components with a formatted resource.">httpAssembleURIf</a></li>
411 <li><a href="#httpBlocking" title="Set blocking/non-blocking behavior on a connection.">httpBlocking</a></li>
412 <li><a href="#httpCheck" title="Check to see if there is a pending response from the server.">httpCheck</a></li>
413 <li><a href="#httpClearCookie" title="Clear the cookie value(s).">httpClearCookie</a></li>
414 <li><a href="#httpClearFields" title="Clear HTTP request fields.">httpClearFields</a></li>
415 <li><a href="#httpClose" title="Close an HTTP connection...">httpClose</a></li>
416 <li><a href="#httpConnect" title="Connect to a HTTP server.">httpConnect</a></li>
417 <li><a href="#httpConnectEncrypt" title="Connect to a HTTP server using encryption.">httpConnectEncrypt</a></li>
418 <li><a href="#httpDecode64" title="Base64-decode a string.">httpDecode64</a></li>
419 <li><a href="#httpDecode64_2" title="Base64-decode a string.">httpDecode64_2</a></li>
420 <li><a href="#httpDelete" title="Send a DELETE request to the server.">httpDelete</a></li>
421 <li><a href="#httpEncode64" title="Base64-encode a string.">httpEncode64</a></li>
422 <li><a href="#httpEncode64_2" title="Base64-encode a string.">httpEncode64_2</a></li>
423 <li><a href="#httpEncryption" title="Set the required encryption on the link.">httpEncryption</a></li>
424 <li><a href="#httpError" title="Get the last error on a connection.">httpError</a></li>
425 <li><a href="#httpFlush" title="Flush data from a HTTP connection.">httpFlush</a></li>
426 <li><a href="#httpFlushWrite" title="Flush data in write buffer.">httpFlushWrite</a></li>
427 <li><a href="#httpGet" title="Send a GET request to the server.">httpGet</a></li>
428 <li><a href="#httpGetAuthString" title="Get the current authorization string.">httpGetAuthString</a></li>
429 <li><a href="#httpGetBlocking" title="Get the blocking/non-block state of a connection.">httpGetBlocking</a></li>
430 <li><a href="#httpGetCookie" title="Get any cookie data from the response.">httpGetCookie</a></li>
431 <li><a href="#httpGetDateString" title="Get a formatted date/time string from a time value.">httpGetDateString</a></li>
432 <li><a href="#httpGetDateString2" title="Get a formatted date/time string from a time value.">httpGetDateString2</a></li>
433 <li><a href="#httpGetDateTime" title="Get a time value from a formatted date/time string.">httpGetDateTime</a></li>
434 <li><a href="#httpGetFd" title="Get the file descriptor associated with a connection.">httpGetFd</a></li>
435 <li><a href="#httpGetField" title="Get a field value from a request/response.">httpGetField</a></li>
436 <li><a href="#httpGetHostByName" title="Lookup a hostname or IPv4 address, and return
437 address records for the specified name.">httpGetHostByName</a></li>
438 <li><a href="#httpGetHostname" title="Get the FQDN for the connection or local system.">httpGetHostname</a></li>
439 <li><a href="#httpGetLength" title="Get the amount of data remaining from the
440 content-length or transfer-encoding fields.">httpGetLength</a></li>
441 <li><a href="#httpGetLength2" title="Get the amount of data remaining from the
442 content-length or transfer-encoding fields.">httpGetLength2</a></li>
443 <li><a href="#httpGetStatus" title="Get the status of the last HTTP request.">httpGetStatus</a></li>
444 <li><a href="#httpGetSubField" title="Get a sub-field value.">httpGetSubField</a></li>
445 <li><a href="#httpGetSubField2" title="Get a sub-field value.">httpGetSubField2</a></li>
446 <li><a href="#httpGets" title="Get a line of text from a HTTP connection.">httpGets</a></li>
447 <li><a href="#httpHead" title="Send a HEAD request to the server.">httpHead</a></li>
448 <li><a href="#httpInitialize" title="Initialize the HTTP interface library and set the
449 default HTTP proxy (if any).">httpInitialize</a></li>
450 <li><a href="#httpMD5" title="Compute the MD5 sum of the username:group:password.">httpMD5</a></li>
451 <li><a href="#httpMD5Final" title="Combine the MD5 sum of the username, group, and password
452 with the server-supplied nonce value, method, and
453 request-uri.">httpMD5Final</a></li>
454 <li><a href="#httpMD5String" title="Convert an MD5 sum to a character string.">httpMD5String</a></li>
455 <li><a href="#httpOptions" title="Send an OPTIONS request to the server.">httpOptions</a></li>
456 <li><a href="#httpPost" title="Send a POST request to the server.">httpPost</a></li>
457 <li><a href="#httpPut" title="Send a PUT request to the server.">httpPut</a></li>
458 <li><a href="#httpRead" title="Read data from a HTTP connection.">httpRead</a></li>
459 <li><a href="#httpRead2" title="Read data from a HTTP connection.">httpRead2</a></li>
460 <li><a href="#httpReconnect" title="Reconnect to a HTTP server.">httpReconnect</a></li>
461 <li><a href="#httpSeparate" title="Separate a Universal Resource Identifier into its
462 components.">httpSeparate</a></li>
463 <li><a href="#httpSeparate2" title="Separate a Universal Resource Identifier into its
464 components.">httpSeparate2</a></li>
465 <li><a href="#httpSeparateURI" title="Separate a Universal Resource Identifier into its
466 components.">httpSeparateURI</a></li>
467 <li><a href="#httpSetAuthString" title="Set the current authorization string.">httpSetAuthString</a></li>
468 <li><a href="#httpSetCookie" title="Set the cookie value(s)...">httpSetCookie</a></li>
469 <li><a href="#httpSetExpect" title="Set the Expect: header in a request.">httpSetExpect</a></li>
470 <li><a href="#httpSetField" title="Set the value of an HTTP header.">httpSetField</a></li>
471 <li><a href="#httpSetLength" title="Set the content-length and content-encoding.">httpSetLength</a></li>
472 <li><a href="#httpStatus" title="Return a short string describing a HTTP status code.">httpStatus</a></li>
473 <li><a href="#httpTrace" title="Send an TRACE request to the server.">httpTrace</a></li>
474 <li><a href="#httpUpdate" title="Update the current HTTP state for incoming data.">httpUpdate</a></li>
475 <li><a href="#httpWait" title="Wait for data available on a connection.">httpWait</a></li>
476 <li><a href="#httpWrite" title="Write data to a HTTP connection.">httpWrite</a></li>
477 <li><a href="#httpWrite2" title="Write data to a HTTP connection.">httpWrite2</a></li>
478 <li><a href="#ippAddBoolean" title="Add a boolean attribute to an IPP message.">ippAddBoolean</a></li>
479 <li><a href="#ippAddBooleans" title="Add an array of boolean values.">ippAddBooleans</a></li>
480 <li><a href="#ippAddCollection" title="Add a collection value.">ippAddCollection</a></li>
481 <li><a href="#ippAddCollections" title="Add an array of collection values.">ippAddCollections</a></li>
482 <li><a href="#ippAddDate" title="Add a date attribute to an IPP message.">ippAddDate</a></li>
483 <li><a href="#ippAddInteger" title="Add a integer attribute to an IPP message.">ippAddInteger</a></li>
484 <li><a href="#ippAddIntegers" title="Add an array of integer values.">ippAddIntegers</a></li>
485 <li><a href="#ippAddOctetString" title="Add an octetString value to an IPP message.">ippAddOctetString</a></li>
486 <li><a href="#ippAddRange" title="Add a range of values to an IPP message.">ippAddRange</a></li>
487 <li><a href="#ippAddRanges" title="Add ranges of values to an IPP message.">ippAddRanges</a></li>
488 <li><a href="#ippAddResolution" title="Add a resolution value to an IPP message.">ippAddResolution</a></li>
489 <li><a href="#ippAddResolutions" title="Add resolution values to an IPP message.">ippAddResolutions</a></li>
490 <li><a href="#ippAddSeparator" title="Add a group separator to an IPP message.">ippAddSeparator</a></li>
491 <li><a href="#ippAddString" title="Add a language-encoded string to an IPP message.">ippAddString</a></li>
492 <li><a href="#ippAddStrings" title="Add language-encoded strings to an IPP message.">ippAddStrings</a></li>
493 <li><a href="#ippDateToTime" title="Convert from RFC 1903 Date/Time format to UNIX time
494 in seconds.">ippDateToTime</a></li>
495 <li><a href="#ippDelete" title="Delete an IPP message.">ippDelete</a></li>
496 <li><a href="#ippDeleteAttribute" title="Delete a single attribute in an IPP message.">ippDeleteAttribute</a></li>
497 <li><a href="#ippErrorString" title="Return a name for the given status code.">ippErrorString</a></li>
498 <li><a href="#ippErrorValue" title="Return a status code for the given name.">ippErrorValue</a></li>
499 <li><a href="#ippFindAttribute" title="Find a named attribute in a request...">ippFindAttribute</a></li>
500 <li><a href="#ippFindNextAttribute" title="Find the next named attribute in a request...">ippFindNextAttribute</a></li>
501 <li><a href="#ippLength" title="Compute the length of an IPP message.">ippLength</a></li>
502 <li><a href="#ippNew" title="Allocate a new IPP message.">ippNew</a></li>
503 <li><a href="#ippNewRequest" title="Allocate a new IPP request message.">ippNewRequest</a></li>
504 <li><a href="#ippOpString" title="Return a name for the given operation id.">ippOpString</a></li>
505 <li><a href="#ippOpValue" title="Return an operation id for the given name.">ippOpValue</a></li>
506 <li><a href="#ippPort" title="Return the default IPP port number.">ippPort</a></li>
507 <li><a href="#ippRead" title="Read data for an IPP message from a HTTP connection.">ippRead</a></li>
508 <li><a href="#ippReadFile" title="Read data for an IPP message from a file.">ippReadFile</a></li>
509 <li><a href="#ippReadIO" title="Read data for an IPP message.">ippReadIO</a></li>
510 <li><a href="#ippSetPort" title="Set the default port number.">ippSetPort</a></li>
511 <li><a href="#ippTagString" title="Return the tag name corresponding to a tag value.">ippTagString</a></li>
512 <li><a href="#ippTagValue" title="Return the tag value corresponding to a tag name.">ippTagValue</a></li>
513 <li><a href="#ippTimeToDate" title="Convert from UNIX time to RFC 1903 format.">ippTimeToDate</a></li>
514 <li><a href="#ippWrite" title="Write data for an IPP message to a HTTP connection.">ippWrite</a></li>
515 <li><a href="#ippWriteFile" title="Write data for an IPP message to a file.">ippWriteFile</a></li>
516 <li><a href="#ippWriteIO" title="Write data for an IPP message.">ippWriteIO</a></li>
517 </ul></li>
518 <li><a href="#TYPES">Data Types</a><ul class="code">
519 <li><a href="#http_addr_t" title="Socket address union, which
520 makes using IPv6 and other
521 address types easier and
522 more portable. ">http_addr_t</a></li>
523 <li><a href="#http_addrlist_t" title="Socket address list, which is
524 used to enumerate all of the
525 addresses that are associated
526 with a hostname. ">http_addrlist_t</a></li>
527 <li><a href="#http_auth_t" title="HTTP authentication types">http_auth_t</a></li>
528 <li><a href="#http_encoding_t" title="HTTP transfer encoding values">http_encoding_t</a></li>
529 <li><a href="#http_encryption_t" title="HTTP encryption values">http_encryption_t</a></li>
530 <li><a href="#http_field_t" title="HTTP field names">http_field_t</a></li>
531 <li><a href="#http_keepalive_t" title="HTTP keep-alive values">http_keepalive_t</a></li>
532 <li><a href="#http_state_t" title="HTTP state values; states
533 are server-oriented...">http_state_t</a></li>
534 <li><a href="#http_status_t" title="HTTP status codes">http_status_t</a></li>
535 <li><a href="#http_t" title="HTTP connection type">http_t</a></li>
536 <li><a href="#http_uri_coding_t" title="URI en/decode flags">http_uri_coding_t</a></li>
537 <li><a href="#http_uri_status_t" title="URI separation status ">http_uri_status_t</a></li>
538 <li><a href="#http_version_t" title="HTTP version numbers">http_version_t</a></li>
539 <li><a href="#ipp_attribute_t" title="Attribute">ipp_attribute_t</a></li>
540 <li><a href="#ipp_finish_t" title="Finishings">ipp_finish_t</a></li>
541 <li><a href="#ipp_iocb_t" title="IPP IO Callback Function ">ipp_iocb_t</a></li>
542 <li><a href="#ipp_jstate_t" title="Job states">ipp_jstate_t</a></li>
543 <li><a href="#ipp_op_t" title="IPP operations">ipp_op_t</a></li>
544 <li><a href="#ipp_orient_t" title="Orientation values">ipp_orient_t</a></li>
545 <li><a href="#ipp_pstate_t" title="Printer states">ipp_pstate_t</a></li>
546 <li><a href="#ipp_quality_t" title="Qualities">ipp_quality_t</a></li>
547 <li><a href="#ipp_request_t" title="Request Header">ipp_request_t</a></li>
548 <li><a href="#ipp_res_t" title="Resolution units">ipp_res_t</a></li>
549 <li><a href="#ipp_state_t" title="IPP states">ipp_state_t</a></li>
550 <li><a href="#ipp_t" title="Attribute Value">ipp_t</a></li>
551 <li><a href="#ipp_uchar_t" title="IPP status codes">ipp_uchar_t</a></li>
552 <li><a href="#ipp_tag_t" title="Format tags for attributes">ipp_tag_t</a></li>
553 <li><a href="#ipp_value_t" title="Attribute Value">ipp_value_t</a></li>
554 </ul></li>
555 <li><a href="#STRUCTURES">Structures</a><ul class="code">
556 <li><a href="#http_addrlist_s" title="Socket address list, which is
557 used to enumerate all of the
558 addresses that are associated
559 with a hostname. ">http_addrlist_s</a></li>
560 <li><a href="#ipp_attribute_s" title="Attribute">ipp_attribute_s</a></li>
561 <li><a href="#ipp_s" title="IPP Request/Response/Notification">ipp_s</a></li>
562 </ul></li>
563 <li><a href="#UNIONS">Unions</a><ul class="code">
564 <li><a href="#ipp_request_u" title="Request Header">ipp_request_u</a></li>
565 <li><a href="#ipp_value_u" title="Attribute Value">ipp_value_u</a></li>
566 </ul></li>
567 <li><a href="#ENUMERATIONS">Constants</a><ul class="code">
568 <li><a href="#http_auth_e" title="HTTP authentication types">http_auth_e</a></li>
569 <li><a href="#http_encoding_e" title="HTTP transfer encoding values">http_encoding_e</a></li>
570 <li><a href="#http_encryption_e" title="HTTP encryption values">http_encryption_e</a></li>
571 <li><a href="#http_field_e" title="HTTP field names">http_field_e</a></li>
572 <li><a href="#http_keepalive_e" title="HTTP keep-alive values">http_keepalive_e</a></li>
573 <li><a href="#http_state_e" title="HTTP state values; states
574 are server-oriented...">http_state_e</a></li>
575 <li><a href="#http_status_e" title="HTTP status codes">http_status_e</a></li>
576 <li><a href="#http_uri_coding_e" title="URI en/decode flags">http_uri_coding_e</a></li>
577 <li><a href="#http_uri_status_e" title="URI separation status ">http_uri_status_e</a></li>
578 <li><a href="#http_version_e" title="HTTP version numbers">http_version_e</a></li>
579 <li><a href="#ipp_finish_e" title="Finishings">ipp_finish_e</a></li>
580 <li><a href="#ipp_jstate_e" title="Job states">ipp_jstate_e</a></li>
581 <li><a href="#ipp_op_e" title="IPP operations">ipp_op_e</a></li>
582 <li><a href="#ipp_orient_e" title="Orientation values">ipp_orient_e</a></li>
583 <li><a href="#ipp_pstate_e" title="Printer states">ipp_pstate_e</a></li>
584 <li><a href="#ipp_quality_e" title="Qualities">ipp_quality_e</a></li>
585 <li><a href="#ipp_res_e" title="Resolution units">ipp_res_e</a></li>
586 <li><a href="#ipp_state_e" title="IPP states">ipp_state_e</a></li>
587 <li><a href="#ipp_status_e" title="IPP status codes">ipp_status_e</a></li>
588 <li><a href="#ipp_tag_e" title="Format tags for attributes">ipp_tag_e</a></li>
589 </ul></li>
590 <!--
591 "$Id$"
592
593 HTTP and IPP API introduction for the Common UNIX Printing System (CUPS).
594
595 Copyright 2007-2008 by Apple Inc.
596 Copyright 1997-2006 by Easy Software Products, all rights reserved.
597
598 These coded instructions, statements, and computer programs are the
599 property of Apple Inc. and are protected by Federal copyright
600 law. Distribution and use rights are outlined in the file "LICENSE.txt"
601 which should have been included with this file. If this file is
602 file is missing or damaged, see the license at "http://www.cups.org/".
603 -->
604
605 <h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
606
607 <p>The CUPS HTTP and IPP APIs provide low-level access to the HTTP and IPP
608 protocols and CUPS scheduler. They are typically used by monitoring and
609 administration programs to perform specific functions not supported by the
610 high-level CUPS API functions.</p>
611
612 <p>The HTTP APIs use an opaque structure called
613 <a href='#http_t'><code>http_t</code></a> to manage connections to
614 a particular HTTP or IPP server. The
615 <a href='#httpConnectEncrypt'><code>httpConnectEncrypt</code></a> function is
616 used to create an instance of this structure for a particular server.
617 The constant <code>CUPS_HTTP_DEFAULT</code> can be used with all of the
618 <code>cups</code> functions to refer to the default CUPS server - the functions
619 create a per-thread <a href='#http_t'><code>http_t</code></a> as needed.</p>
620
621 <p>The IPP APIs use two structures for requests (messages sent to the CUPS
622 scheduler) and responses (messages sent back to your application from the
623 scheduler). The <a href='#ipp_t'><code>ipp_t</code></a> structure holds a
624 complete request or response and is allocated using the
625 <a href='#ippNew'><code>ippNew</code></a> or
626 <a href='#ippNewRequest'><code>ippNewRequest</code></a> functions and
627 freed using the <a href='#ippDelete'><code>ippDelete</code></a> function.</p>
628
629 <p>The second structure is called
630 <a href='#ipp_attribute_t'><code>ipp_attribute_t</code></a> and holds a
631 single IPP attribute which consists of a group tag (<code>group_tag</code>), a
632 value type tag (<code>value_tag</code>), the attribute name (<code>name</code>),
633 and 1 or more values (<code>values[]</code>). Attributes are added to an
634 <a href='#ipp_t'><code>ipp_t</code></a> structure using one of the
635 <code>ippAdd</code> functions. For example, use
636 <a href='#ippAddString'><code>ippAddString</code></a> to add a
637 "requesting-user-name" string attribute to a request:</p>
638
639 <pre class='example'>
640 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_GET_JOBS);
641
642 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
643 NULL, cupsUser());
644 </pre>
645
646 <p>Once you have created an IPP request, use the <code>cups</code>
647 functions to send the request to and read the response from the server.
648 For example, the <a href='#cupsDoRequest'><code>cupsDoRequest</code></a>
649 function can be used for simple query operations that do not involve files:</p>
650
651 <pre class='example'>
652 #include &lt;cups/cups.h&gt;
653
654
655 <a href='#ipp_t'>ipp_t</a> *<a name='get_jobs'>get_jobs</a>(void)
656 {
657 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_GET_JOBS);
658
659 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
660 NULL, cupsUser());
661
662 return (<a href='#cupsDoRequest'>cupsDoRequest</a>(CUPS_HTTP_DEFAULT, request, "/"));
663 }
664 </pre>
665
666 <p>The <a href='#cupsDoRequest'><code>cupsDoRequest</code></a> function frees
667 the request structure and returns an IPP response structure or NULL pointer if
668 the request could not be sent to the server. Once you have a response from
669 the server, you can either use the
670 <a href='#ippFindAttribute'><code>ippFindAttribute</code></a> and
671 <a href='#ippFindNextAttribute'><code>ippFindNextAttribute</code></a> functions
672 to find specific attributes, for example:</p>
673
674 <pre class='example'>
675 <a href='#ipp_t'>ipp_t</a> *response;
676 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr;
677
678 attr = <a href='#ippFindAttribute'>ippFindAttribute</a>(response, "printer-state", IPP_TAG_ENUM);
679 </pre>
680
681 <p>You can also walk the list of attributes with a simple <code>for</code> loop
682 like this:</p>
683
684 <pre class='example'>
685 <a href='#ipp_t'>ipp_t</a> *response;
686 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr;
687
688 for (attr = response->attrs; attr != NULL; attr = attr->next)
689 if (attr->name == NULL)
690 puts("--SEPARATOR--");
691 else
692 puts(attr->name);
693 </pre>
694
695 <p>The <code>for</code> loop approach is normally used when collecting
696 attributes for multiple objects (jobs, printers, etc.) in a response. Attributes
697 with <code>NULL</code> names indicate a separator between the attributes of
698 each object. For example, the following code will list the jobs returned from
699 our previous <a href='#get_jobs'><code>get_jobs</code></a> example code:</p>
700
701 <pre class='example'>
702 <a href='#ipp_t'>ipp_t</a> *response = <a href='#get_jobs'>get_jobs</a>();
703
704 if (response != NULL)
705 {
706 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *attr;
707 int job_id = 0;
708 char *job_name = NULL;
709 char *job_originating_user_name = NULL;
710
711 puts("Job ID Owner Title");
712 puts("------ ---------------- ---------------------------------");
713
714 for (attr = response->attrs; attr != NULL; attr = attr->next)
715 {
716 /* Attributes without names are separators between jobs */
717 if (attr->name == NULL)
718 {
719 if (job_id > 0 &amp;&amp; job_name != NULL &amp;&amp; job_originating_user_name != NULL)
720 printf("%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
721
722 job_id = 0;
723 job_name = NULL;
724 job_originating_user_name = NULL;
725 continue;
726 }
727 else if (!strcmp(attr->name, "job-id") &amp;&amp; attr->value_tag == IPP_TAG_INTEGER)
728 job_id = attr->values[0].integer;
729 else if (!strcmp(attr->name, "job-name") &amp;&amp; attr->value_tag == IPP_TAG_NAME)
730 job_name = attr->values[0].string.text;
731 else if (!strcmp(attr->name, "job-originating-user-name") &amp;&amp;
732 attr->value_tag == IPP_TAG_NAME)
733 job_originating_user_name = attr->values[0].string.text;
734 }
735
736 if (job_id > 0 &amp;&amp; job_name != NULL &amp;&amp; job_originating_user_name != NULL)
737 printf("%5d %-16s %s\n", job_id, job_originating_user_name, job_name);
738 }
739 </pre>
740
741 <h3><a name='CREATING_URI_STRINGS'>Creating URI Strings</a></h3>
742
743 <p>To ensure proper encoding, the
744 <a href='#httpAssembleURIf'><code>httpAssembleURIf</code></a> function must be
745 used to format a "printer-uri" string for all printer-based requests:</p>
746
747 <pre class='example'>
748 const char *name = "Foo";
749 char uri[1024];
750 <a href='#ipp_t'>ipp_t</a> *request;
751
752 <a href='#httpAssembleURIf'>httpAssembleURIf</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, cupsServer(),
753 ippPort(), "/printers/%s", name);
754 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
755 </pre>
756
757 <h3><a name='SENDING_REQUESTS_WITH_FILES'>Sending Requests with Files</a></h3>
758
759 <p>The <a href='#cupsDoFileRequest'><code>cupsDoFileRequest</code></a> and
760 <a href='#cupsDoIORequest'><code>cupsDoIORequest</code></a> functions are
761 used for requests involving files. The
762 <a href='#cupsDoFileRequest'><code>cupsDoFileRequest</code></a> function
763 attaches the named file to a request and is typically used when sending a print
764 file or changing a printer's PPD file:</p>
765
766 <pre class='example'>
767 const char *filename = "/usr/share/cups/data/testprint.ps";
768 const char *name = "Foo";
769 char uri[1024];
770 char resource[1024];
771 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(IPP_PRINT_JOB);
772 <a href='#ipp_t'>ipp_t</a> *response;
773
774 /* Use httpAssembleURIf for the printer-uri string */
775 <a href='#httpAssembleURIf'>httpAssembleURIf</a>(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, cupsServer(),
776 ippPort(), "/printers/%s", name);
777 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
778 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
779 NULL, cupsUser());
780 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name",
781 NULL, "testprint.ps");
782
783 /* Use snprintf for the resource path */
784 snprintf(resource, sizeof(resource), "/printers/%s", name);
785
786 response = <a href='#cupsDoFileRequest'>cupsDoFileRequest</a>(CUPS_HTTP_DEFAULT, request, resource, filename);
787 </pre>
788
789 <p>The <a href='#cupsDoIORequest'><code>cupsDoIORequest</code></a> function
790 optionally attaches a file to the request and optionally saves a file in the
791 response from the server. It is used when using a pipe for the request
792 attachment or when using a request that returns a file, currently only
793 <code>CUPS_GET_DOCUMENT</code> and <code>CUPS_GET_PPD</code>. For example,
794 the following code will download the PPD file for the sample HP LaserJet
795 printer driver:</p>
796
797 <pre class='example'>
798 char tempfile[1024];
799 int tempfd;
800 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD);
801 <a href='#ipp_t'>ipp_t</a> *response;
802
803 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
804 NULL, "laserjet.ppd");
805
806 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
807
808 response = <a href='#cupsDoIORequest'>cupsDoIORequest</a>(CUPS_HTTP_DEFAULT, request, "/", -1, tempfd);
809 </pre>
810
811 <p>The example passes <code>-1</code> for the input file descriptor to specify
812 that no file is to be attached to the request. The PPD file attached to the
813 response is written to the temporary file descriptor we created using the
814 <code>cupsTempFd</code> function.</p>
815
816 <h3><a name='ASYNCHRONOUS_REQUEST_PROCESSING'>Asynchronous Request Processing</a></h3>
817
818 <p>The <a href='#cupsSendRequest'><code>cupsSendRequest</code></a> and
819 <a href='#cupsGetResponse'><code>cupsGetResponse</code></a> support
820 asynchronous communications with the server. Unlike the other request
821 functions, the IPP request is not automatically freed, so remember to
822 free your request with the <a href='#ippDelete'><code>ippDelete</code></a>
823 function.</p>
824
825 <p>File data is attached to the request using the
826 <a href='#cupsWriteRequestData'><code>cupsWriteRequestData</code></a>
827 function, while file data returned from the server is read using the
828 <a href='#cupsReadResponseData'><code>cupsReadResponseData</code></a>
829 function. We can rewrite the previous <code>CUPS_GET_PPD</code> example
830 to use the asynchronous functions quite easily:</p>
831
832 <pre class='example'>
833 char tempfile[1024];
834 int tempfd;
835 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD);
836 <a href='#ipp_t'>ipp_t</a> *response;
837
838 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
839 NULL, "laserjet.ppd");
840
841 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
842
843 if (<a href='#cupsSendRequest'>cupsSendRequest</a>(CUPS_HTTP_DEFAULT, request, "/") == HTTP_CONTINUE)
844 {
845 response = <a href='#cupsGetResponse'>cupsGetResponse</a>(CUPS_HTTP_DEFAULT, "/");
846
847 if (response != NULL)
848 {
849 ssize_t bytes;
850 char buffer[8192];
851
852 while ((bytes = <a href='#cupsReadResponseData'>cupsReadResponseData</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer))) > 0)
853 write(tempfd, buffer, bytes);
854 }
855 }
856
857 /* Free the request! */
858 <a href='#ippDelete'>ippDelete</a>(request);
859 </pre>
860
861 <p>The <a href='#cupsSendRequest'><code>cupsSendRequest</code></a> function
862 returns the initial HTTP request status, typically either
863 <code>HTTP_CONTINUE</code> or <code>HTTP_UNAUTHORIZED</code>. The latter status
864 is returned when the request requires authentication of some sort. The
865 <a href='#cupsDoAuthentication'><code>cupsDoAuthentication</code></a> function
866 must be called when your see <code>HTTP_UNAUTHORIZED</code> and the request
867 re-sent. We can add authentication support to our example code by using a
868 <code>do ... while</code> loop:</p>
869
870 <pre class='example'>
871 char tempfile[1024];
872 int tempfd;
873 <a href='#ipp_t'>ipp_t</a> *request = <a href='#ippNewRequest'>ippNewRequest</a>(CUPS_GET_PPD);
874 <a href='#ipp_t'>ipp_t</a> *response;
875 http_status_t status;
876
877 <a href='#ippAddString'>ippAddString</a>(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
878 NULL, "laserjet.ppd");
879
880 tempfd = cupsTempFd(tempfile, sizeof(tempfile));
881
882 /* Loop for authentication */
883 do
884 {
885 status = <a href='#cupsSendRequest'>cupsSendRequest</a>(CUPS_HTTP_DEFAULT, request, "/");
886
887 if (status == HTTP_UNAUTHORIZED)
888 {
889 /* Try to authenticate, break out of the loop if that fails */
890 if (<a href='#cupsDoAuthentication'>cupsDoAuthentication</a>(CUPS_HTTP_DEFAULT, "POST", "/"))
891 break;
892 }
893 }
894 while (status != HTTP_CONTINUE &amp;&amp; status != HTTP_UNAUTHORIZED);
895
896 if (status == HTTP_CONTINUE)
897 {
898 response = <a href='#cupsGetResponse'>cupsGetResponse</a>(CUPS_HTTP_DEFAULT, "/");
899
900 if (response != NULL)
901 {
902 ssize_t bytes;
903 char buffer[8192];
904
905 while ((bytes = <a href='#cupsReadResponseData'>cupsReadResponseData</a>(CUPS_HTTP_DEFAULT, buffer, sizeof(buffer))) > 0)
906 write(tempfd, buffer, bytes);
907 }
908 }
909
910 /* Free the request! */
911 <a href='#ippDelete'>ippDelete</a>(request);
912 </pre>
913 <h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
914 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/Mac OS X 10.4&nbsp;</span><a name="cupsDoAuthentication">cupsDoAuthentication</a></h3>
915 <p class="description">Authenticate a request.</p>
916 <p class="code">
917 int cupsDoAuthentication (<br>
918 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
919 &nbsp;&nbsp;&nbsp;&nbsp;const char *method,<br>
920 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource<br>
921 );</p>
922 <h4 class="parameters">Parameters</h4>
923 <dl>
924 <dt>http</dt>
925 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
926 <dt>method</dt>
927 <dd class="description">Request method (&quot;GET&quot;, &quot;POST&quot;, &quot;PUT&quot;)</dd>
928 <dt>resource</dt>
929 <dd class="description">Resource path</dd>
930 </dl>
931 <h4 class="returnvalue">Return Value</h4>
932 <p class="description">0 on success, -1 on error</p>
933 <h4 class="discussion">Discussion</h4>
934 <p class="discussion">This function should be called in response to a <code>HTTP_UNAUTHORIZED</code>
935 status, prior to resubmitting your request.
936
937 </p>
938 <h3 class="function"><a name="cupsDoFileRequest">cupsDoFileRequest</a></h3>
939 <p class="description">Do an IPP request with a file.</p>
940 <p class="code">
941 <a href="#ipp_t">ipp_t</a> *cupsDoFileRequest (<br>
942 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
943 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *request,<br>
944 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
945 &nbsp;&nbsp;&nbsp;&nbsp;const char *filename<br>
946 );</p>
947 <h4 class="parameters">Parameters</h4>
948 <dl>
949 <dt>http</dt>
950 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
951 <dt>request</dt>
952 <dd class="description">IPP request</dd>
953 <dt>resource</dt>
954 <dd class="description">HTTP resource for POST</dd>
955 <dt>filename</dt>
956 <dd class="description">File to send or <code>NULL</code> for none</dd>
957 </dl>
958 <h4 class="returnvalue">Return Value</h4>
959 <p class="description">Response data</p>
960 <h4 class="discussion">Discussion</h4>
961 <p class="discussion">This function sends the IPP request to the specified server, retrying
962 and authenticating as necessary. The request is freed with <a href="#ippDelete"><code>ippDelete</code></a>
963 after receiving a valid IPP response.</p>
964 <h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="cupsDoIORequest">cupsDoIORequest</a></h3>
965 <p class="description">Do an IPP request with file descriptors.</p>
966 <p class="code">
967 <a href="#ipp_t">ipp_t</a> *cupsDoIORequest (<br>
968 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
969 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *request,<br>
970 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
971 &nbsp;&nbsp;&nbsp;&nbsp;int infile,<br>
972 &nbsp;&nbsp;&nbsp;&nbsp;int outfile<br>
973 );</p>
974 <h4 class="parameters">Parameters</h4>
975 <dl>
976 <dt>http</dt>
977 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
978 <dt>request</dt>
979 <dd class="description">IPP request</dd>
980 <dt>resource</dt>
981 <dd class="description">HTTP resource for POST</dd>
982 <dt>infile</dt>
983 <dd class="description">File to read from or -1 for none</dd>
984 <dt>outfile</dt>
985 <dd class="description">File to write to or -1 for none</dd>
986 </dl>
987 <h4 class="returnvalue">Return Value</h4>
988 <p class="description">Response data</p>
989 <h4 class="discussion">Discussion</h4>
990 <p class="discussion">This function sends the IPP request to the specified server, retrying
991 and authenticating as necessary. The request is freed with ippDelete()
992 after receiving a valid IPP response.<br>
993 <br>
994 If &quot;infile&quot; is a valid file descriptor, cupsDoIORequest() copies
995 all of the data from the file after the IPP request message.<br>
996 <br>
997 If &quot;outfile&quot; is a valid file descriptor, cupsDoIORequest() copies
998 all of the data after the IPP response message to the file.
999
1000 </p>
1001 <h3 class="function"><a name="cupsDoRequest">cupsDoRequest</a></h3>
1002 <p class="description">Do an IPP request.</p>
1003 <p class="code">
1004 <a href="#ipp_t">ipp_t</a> *cupsDoRequest (<br>
1005 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1006 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *request,<br>
1007 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource<br>
1008 );</p>
1009 <h4 class="parameters">Parameters</h4>
1010 <dl>
1011 <dt>http</dt>
1012 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1013 <dt>request</dt>
1014 <dd class="description">IPP request</dd>
1015 <dt>resource</dt>
1016 <dd class="description">HTTP resource for POST</dd>
1017 </dl>
1018 <h4 class="returnvalue">Return Value</h4>
1019 <p class="description">Response data</p>
1020 <h4 class="discussion">Discussion</h4>
1021 <p class="discussion">This function sends the IPP request to the specified server, retrying
1022 and authenticating as necessary. The request is freed with ippDelete()
1023 after receiving a valid IPP response.</p>
1024 <h3 class="function"><a name="cupsEncodeOptions">cupsEncodeOptions</a></h3>
1025 <p class="description">Encode printer options into IPP attributes.</p>
1026 <p class="code">
1027 void cupsEncodeOptions (<br>
1028 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
1029 &nbsp;&nbsp;&nbsp;&nbsp;int num_options,<br>
1030 &nbsp;&nbsp;&nbsp;&nbsp;cups_option_t *options<br>
1031 );</p>
1032 <h4 class="parameters">Parameters</h4>
1033 <dl>
1034 <dt>ipp</dt>
1035 <dd class="description">Request to add to</dd>
1036 <dt>num_options</dt>
1037 <dd class="description">Number of options</dd>
1038 <dt>options</dt>
1039 <dd class="description">Options</dd>
1040 </dl>
1041 <h4 class="discussion">Discussion</h4>
1042 <p class="discussion">This function adds operation, job, and then subscription attributes,
1043 in that order. Use the cupsEncodeOptions2() function to add attributes
1044 for a single group.</p>
1045 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="cupsEncodeOptions2">cupsEncodeOptions2</a></h3>
1046 <p class="description">Encode printer options into IPP attributes for a group.</p>
1047 <p class="code">
1048 void cupsEncodeOptions2 (<br>
1049 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
1050 &nbsp;&nbsp;&nbsp;&nbsp;int num_options,<br>
1051 &nbsp;&nbsp;&nbsp;&nbsp;cups_option_t *options,<br>
1052 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group_tag<br>
1053 );</p>
1054 <h4 class="parameters">Parameters</h4>
1055 <dl>
1056 <dt>ipp</dt>
1057 <dd class="description">Request to add to</dd>
1058 <dt>num_options</dt>
1059 <dd class="description">Number of options</dd>
1060 <dt>options</dt>
1061 <dd class="description">Options</dd>
1062 <dt>group_tag</dt>
1063 <dd class="description">Group to encode</dd>
1064 </dl>
1065 <h4 class="discussion">Discussion</h4>
1066 <p class="discussion">This function only adds attributes for a single group. Call this
1067 function multiple times for each group, or use cupsEncodeOptions()
1068 to add the standard groups.
1069
1070 </p>
1071 <h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsGetDevices">cupsGetDevices</a></h3>
1072 <p class="description">Get available printer devices.</p>
1073 <p class="code">
1074 ipp_status_t cupsGetDevices (<br>
1075 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1076 &nbsp;&nbsp;&nbsp;&nbsp;int timeout,<br>
1077 &nbsp;&nbsp;&nbsp;&nbsp;const char *include_schemes,<br>
1078 &nbsp;&nbsp;&nbsp;&nbsp;const char *exclude_schemes,<br>
1079 &nbsp;&nbsp;&nbsp;&nbsp;cups_device_cb_t callback,<br>
1080 &nbsp;&nbsp;&nbsp;&nbsp;void *user_data<br>
1081 );</p>
1082 <h4 class="parameters">Parameters</h4>
1083 <dl>
1084 <dt>http</dt>
1085 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1086 <dt>timeout</dt>
1087 <dd class="description">Timeout in seconds or <code>CUPS_TIMEOUT_DEFAULT</code></dd>
1088 <dt>include_schemes</dt>
1089 <dd class="description">Comma-separated URI schemes to include or <code>CUPS_INCLUDE_ALL</code></dd>
1090 <dt>exclude_schemes</dt>
1091 <dd class="description">Comma-separated URI schemes to exclude or <code>CUPS_EXCLUDE_NONE</code></dd>
1092 <dt>callback</dt>
1093 <dd class="description">Callback function</dd>
1094 <dt>user_data</dt>
1095 <dd class="description">User data pointer</dd>
1096 </dl>
1097 <h4 class="returnvalue">Return Value</h4>
1098 <p class="description">Request status - <code>IPP_OK</code> on success.</p>
1099 <h4 class="discussion">Discussion</h4>
1100 <p class="discussion">This function sends a CUPS-Get-Devices request and streams the discovered
1101 devices to the specified callback function. The &quot;timeout&quot; parameter controls
1102 how long the request lasts, while the &quot;include_schemes&quot; and &quot;exclude_schemes&quot;
1103 parameters provide comma-delimited lists of backends to include or omit from
1104 the request respectively.
1105
1106 </p>
1107 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/Mac OS X 10.4&nbsp;</span><a name="cupsGetFd">cupsGetFd</a></h3>
1108 <p class="description">Get a file from the server.</p>
1109 <p class="code">
1110 <a href="#http_status_t">http_status_t</a> cupsGetFd (<br>
1111 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1112 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1113 &nbsp;&nbsp;&nbsp;&nbsp;int fd<br>
1114 );</p>
1115 <h4 class="parameters">Parameters</h4>
1116 <dl>
1117 <dt>http</dt>
1118 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1119 <dt>resource</dt>
1120 <dd class="description">Resource name</dd>
1121 <dt>fd</dt>
1122 <dd class="description">File descriptor</dd>
1123 </dl>
1124 <h4 class="returnvalue">Return Value</h4>
1125 <p class="description">HTTP status</p>
1126 <h4 class="discussion">Discussion</h4>
1127 <p class="discussion">This function returns <code>HTTP_OK</code> when the file is successfully retrieved.
1128
1129 </p>
1130 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/Mac OS X 10.4&nbsp;</span><a name="cupsGetFile">cupsGetFile</a></h3>
1131 <p class="description">Get a file from the server.</p>
1132 <p class="code">
1133 <a href="#http_status_t">http_status_t</a> cupsGetFile (<br>
1134 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1135 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1136 &nbsp;&nbsp;&nbsp;&nbsp;const char *filename<br>
1137 );</p>
1138 <h4 class="parameters">Parameters</h4>
1139 <dl>
1140 <dt>http</dt>
1141 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1142 <dt>resource</dt>
1143 <dd class="description">Resource name</dd>
1144 <dt>filename</dt>
1145 <dd class="description">Filename</dd>
1146 </dl>
1147 <h4 class="returnvalue">Return Value</h4>
1148 <p class="description">HTTP status</p>
1149 <h4 class="discussion">Discussion</h4>
1150 <p class="discussion">This function returns <code>HTTP_OK</code> when the file is successfully retrieved.
1151
1152 </p>
1153 <h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsGetResponse">cupsGetResponse</a></h3>
1154 <p class="description">Get a response to an IPP request.</p>
1155 <p class="code">
1156 <a href="#ipp_t">ipp_t</a> *cupsGetResponse (<br>
1157 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1158 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource<br>
1159 );</p>
1160 <h4 class="parameters">Parameters</h4>
1161 <dl>
1162 <dt>http</dt>
1163 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1164 <dt>resource</dt>
1165 <dd class="description">HTTP resource for POST</dd>
1166 </dl>
1167 <h4 class="returnvalue">Return Value</h4>
1168 <p class="description">Response or <code>NULL</code> on HTTP error</p>
1169 <h4 class="discussion">Discussion</h4>
1170 <p class="discussion">Use this function to get the response for an IPP request sent using
1171 cupsSendDocument() or cupsSendRequest(). For requests that return
1172 additional data, use httpRead() after getting a successful response.
1173
1174 </p>
1175 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/Mac OS X 10.4&nbsp;</span><a name="cupsPutFd">cupsPutFd</a></h3>
1176 <p class="description">Put a file on the server.</p>
1177 <p class="code">
1178 <a href="#http_status_t">http_status_t</a> cupsPutFd (<br>
1179 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1180 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1181 &nbsp;&nbsp;&nbsp;&nbsp;int fd<br>
1182 );</p>
1183 <h4 class="parameters">Parameters</h4>
1184 <dl>
1185 <dt>http</dt>
1186 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1187 <dt>resource</dt>
1188 <dd class="description">Resource name</dd>
1189 <dt>fd</dt>
1190 <dd class="description">File descriptor</dd>
1191 </dl>
1192 <h4 class="returnvalue">Return Value</h4>
1193 <p class="description">HTTP status</p>
1194 <h4 class="discussion">Discussion</h4>
1195 <p class="discussion">This function returns <code>HTTP_CREATED</code> when the file is stored
1196 successfully.
1197
1198 </p>
1199 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.20/Mac OS X 10.4&nbsp;</span><a name="cupsPutFile">cupsPutFile</a></h3>
1200 <p class="description">Put a file on the server.</p>
1201 <p class="code">
1202 <a href="#http_status_t">http_status_t</a> cupsPutFile (<br>
1203 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1204 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1205 &nbsp;&nbsp;&nbsp;&nbsp;const char *filename<br>
1206 );</p>
1207 <h4 class="parameters">Parameters</h4>
1208 <dl>
1209 <dt>http</dt>
1210 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1211 <dt>resource</dt>
1212 <dd class="description">Resource name</dd>
1213 <dt>filename</dt>
1214 <dd class="description">Filename</dd>
1215 </dl>
1216 <h4 class="returnvalue">Return Value</h4>
1217 <p class="description">HTTP status</p>
1218 <h4 class="discussion">Discussion</h4>
1219 <p class="discussion">This function returns <code>HTTP_CREATED</code> when the file is stored
1220 successfully.
1221
1222 </p>
1223 <h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsReadResponseData">cupsReadResponseData</a></h3>
1224 <p class="description">Read additional data after the IPP response.</p>
1225 <p class="code">
1226 ssize_t cupsReadResponseData (<br>
1227 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1228 &nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
1229 &nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
1230 );</p>
1231 <h4 class="parameters">Parameters</h4>
1232 <dl>
1233 <dt>http</dt>
1234 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1235 <dt>buffer</dt>
1236 <dd class="description">Buffer to use</dd>
1237 <dt>length</dt>
1238 <dd class="description">Number of bytes to read</dd>
1239 </dl>
1240 <h4 class="returnvalue">Return Value</h4>
1241 <p class="description">Bytes read, 0 on EOF, -1 on error</p>
1242 <h4 class="discussion">Discussion</h4>
1243 <p class="discussion">This function is used after cupsGetResponse() to read the PPD or document
1244 files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively.
1245
1246 </p>
1247 <h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsSendRequest">cupsSendRequest</a></h3>
1248 <p class="description">Send an IPP request.</p>
1249 <p class="code">
1250 <a href="#http_status_t">http_status_t</a> cupsSendRequest (<br>
1251 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1252 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *request,<br>
1253 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
1254 &nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
1255 );</p>
1256 <h4 class="parameters">Parameters</h4>
1257 <dl>
1258 <dt>http</dt>
1259 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1260 <dt>request</dt>
1261 <dd class="description">IPP request</dd>
1262 <dt>resource</dt>
1263 <dd class="description">Resource path</dd>
1264 <dt>length</dt>
1265 <dd class="description">Length of data to follow or <code>CUPS_LENGTH_VARIABLE</code></dd>
1266 </dl>
1267 <h4 class="returnvalue">Return Value</h4>
1268 <p class="description">Initial HTTP status</p>
1269 <h4 class="discussion">Discussion</h4>
1270 <p class="discussion">Use httpWrite() to write any additional data (document, PPD file, etc.)
1271 for the request, cupsGetResponse() to get the IPP response, and httpRead()
1272 to read any additional data following the response. Only one request can be
1273 sent/queued at a time.<br>
1274 <br>
1275 Unlike cupsDoFileRequest(), cupsDoIORequest(), and cupsDoRequest(), the
1276 request is not freed.
1277
1278 </p>
1279 <h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="cupsWriteRequestData">cupsWriteRequestData</a></h3>
1280 <p class="description">Write additional data after an IPP request.</p>
1281 <p class="code">
1282 <a href="#http_status_t">http_status_t</a> cupsWriteRequestData (<br>
1283 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1284 &nbsp;&nbsp;&nbsp;&nbsp;const char *buffer,<br>
1285 &nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
1286 );</p>
1287 <h4 class="parameters">Parameters</h4>
1288 <dl>
1289 <dt>http</dt>
1290 <dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
1291 <dt>buffer</dt>
1292 <dd class="description">Bytes to write</dd>
1293 <dt>length</dt>
1294 <dd class="description">Number of bytes to write</dd>
1295 </dl>
1296 <h4 class="returnvalue">Return Value</h4>
1297 <p class="description"><code>HTTP_CONTINUE</code> if OK or HTTP status on error</p>
1298 <h4 class="discussion">Discussion</h4>
1299 <p class="discussion">This function is used after <a href="#cupsSendRequest"><code>cupsSendRequest</code></a> to provide a PPD and
1300 after <a href="#cupsStartDocument"><code>cupsStartDocument</code></a> to provide a document file.
1301
1302 </p>
1303 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpAddrAny">httpAddrAny</a></h3>
1304 <p class="description">Check for the &quot;any&quot; address.</p>
1305 <p class="code">
1306 int httpAddrAny (<br>
1307 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr<br>
1308 );</p>
1309 <h4 class="parameters">Parameters</h4>
1310 <dl>
1311 <dt>addr</dt>
1312 <dd class="description">Address to check</dd>
1313 </dl>
1314 <h4 class="returnvalue">Return Value</h4>
1315 <p class="description">1 if &quot;any&quot;, 0 otherwise</p>
1316 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpAddrEqual">httpAddrEqual</a></h3>
1317 <p class="description">Compare two addresses.</p>
1318 <p class="code">
1319 int httpAddrEqual (<br>
1320 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr1,<br>
1321 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr2<br>
1322 );</p>
1323 <h4 class="parameters">Parameters</h4>
1324 <dl>
1325 <dt>addr1</dt>
1326 <dd class="description">First address</dd>
1327 <dt>addr2</dt>
1328 <dd class="description">Second address</dd>
1329 </dl>
1330 <h4 class="returnvalue">Return Value</h4>
1331 <p class="description">1 if equal, 0 if not</p>
1332 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpAddrLength">httpAddrLength</a></h3>
1333 <p class="description">Return the length of the address in bytes.</p>
1334 <p class="code">
1335 int httpAddrLength (<br>
1336 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr<br>
1337 );</p>
1338 <h4 class="parameters">Parameters</h4>
1339 <dl>
1340 <dt>addr</dt>
1341 <dd class="description">Address</dd>
1342 </dl>
1343 <h4 class="returnvalue">Return Value</h4>
1344 <p class="description">Length in bytes</p>
1345 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpAddrLocalhost">httpAddrLocalhost</a></h3>
1346 <p class="description">Check for the local loopback address.</p>
1347 <p class="code">
1348 int httpAddrLocalhost (<br>
1349 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr<br>
1350 );</p>
1351 <h4 class="parameters">Parameters</h4>
1352 <dl>
1353 <dt>addr</dt>
1354 <dd class="description">Address to check</dd>
1355 </dl>
1356 <h4 class="returnvalue">Return Value</h4>
1357 <p class="description">1 if local host, 0 otherwise</p>
1358 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpAddrLookup">httpAddrLookup</a></h3>
1359 <p class="description">Lookup the hostname associated with the address.</p>
1360 <p class="code">
1361 char *httpAddrLookup (<br>
1362 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr,<br>
1363 &nbsp;&nbsp;&nbsp;&nbsp;char *name,<br>
1364 &nbsp;&nbsp;&nbsp;&nbsp;int namelen<br>
1365 );</p>
1366 <h4 class="parameters">Parameters</h4>
1367 <dl>
1368 <dt>addr</dt>
1369 <dd class="description">Address to lookup</dd>
1370 <dt>name</dt>
1371 <dd class="description">Host name buffer</dd>
1372 <dt>namelen</dt>
1373 <dd class="description">Size of name buffer</dd>
1374 </dl>
1375 <h4 class="returnvalue">Return Value</h4>
1376 <p class="description">Host name</p>
1377 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpAddrString">httpAddrString</a></h3>
1378 <p class="description">Convert an address to a numeric string.</p>
1379 <p class="code">
1380 char *httpAddrString (<br>
1381 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#http_addr_t">http_addr_t</a> *addr,<br>
1382 &nbsp;&nbsp;&nbsp;&nbsp;char *s,<br>
1383 &nbsp;&nbsp;&nbsp;&nbsp;int slen<br>
1384 );</p>
1385 <h4 class="parameters">Parameters</h4>
1386 <dl>
1387 <dt>addr</dt>
1388 <dd class="description">Address to convert</dd>
1389 <dt>s</dt>
1390 <dd class="description">String buffer</dd>
1391 <dt>slen</dt>
1392 <dd class="description">Length of string</dd>
1393 </dl>
1394 <h4 class="returnvalue">Return Value</h4>
1395 <p class="description">Numeric address string</p>
1396 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpAssembleURI">httpAssembleURI</a></h3>
1397 <p class="description">Assemble a uniform resource identifier from its
1398 components.</p>
1399 <p class="code">
1400 <a href="#http_uri_status_t">http_uri_status_t</a> httpAssembleURI (<br>
1401 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_uri_coding_t">http_uri_coding_t</a> encoding,<br>
1402 &nbsp;&nbsp;&nbsp;&nbsp;char *uri,<br>
1403 &nbsp;&nbsp;&nbsp;&nbsp;int urilen,<br>
1404 &nbsp;&nbsp;&nbsp;&nbsp;const char *scheme,<br>
1405 &nbsp;&nbsp;&nbsp;&nbsp;const char *username,<br>
1406 &nbsp;&nbsp;&nbsp;&nbsp;const char *host,<br>
1407 &nbsp;&nbsp;&nbsp;&nbsp;int port,<br>
1408 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource<br>
1409 );</p>
1410 <h4 class="parameters">Parameters</h4>
1411 <dl>
1412 <dt>encoding</dt>
1413 <dd class="description">Encoding flags</dd>
1414 <dt>uri</dt>
1415 <dd class="description">URI buffer</dd>
1416 <dt>urilen</dt>
1417 <dd class="description">Size of URI buffer</dd>
1418 <dt>scheme</dt>
1419 <dd class="description">Scheme name</dd>
1420 <dt>username</dt>
1421 <dd class="description">Username</dd>
1422 <dt>host</dt>
1423 <dd class="description">Hostname or address</dd>
1424 <dt>port</dt>
1425 <dd class="description">Port number</dd>
1426 <dt>resource</dt>
1427 <dd class="description">Resource</dd>
1428 </dl>
1429 <h4 class="returnvalue">Return Value</h4>
1430 <p class="description">URI status</p>
1431 <h4 class="discussion">Discussion</h4>
1432 <p class="discussion">This function escapes reserved characters in the URI depending on the
1433 value of the &quot;encoding&quot; argument. You should use this function in
1434 place of traditional string functions whenever you need to create a
1435 URI string.
1436
1437 </p>
1438 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpAssembleURIf">httpAssembleURIf</a></h3>
1439 <p class="description">Assemble a uniform resource identifier from its
1440 components with a formatted resource.</p>
1441 <p class="code">
1442 <a href="#http_uri_status_t">http_uri_status_t</a> httpAssembleURIf (<br>
1443 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_uri_coding_t">http_uri_coding_t</a> encoding,<br>
1444 &nbsp;&nbsp;&nbsp;&nbsp;char *uri,<br>
1445 &nbsp;&nbsp;&nbsp;&nbsp;int urilen,<br>
1446 &nbsp;&nbsp;&nbsp;&nbsp;const char *scheme,<br>
1447 &nbsp;&nbsp;&nbsp;&nbsp;const char *username,<br>
1448 &nbsp;&nbsp;&nbsp;&nbsp;const char *host,<br>
1449 &nbsp;&nbsp;&nbsp;&nbsp;int port,<br>
1450 &nbsp;&nbsp;&nbsp;&nbsp;const char *resourcef,<br>
1451 &nbsp;&nbsp;&nbsp;&nbsp;...<br>
1452 );</p>
1453 <h4 class="parameters">Parameters</h4>
1454 <dl>
1455 <dt>encoding</dt>
1456 <dd class="description">Encoding flags</dd>
1457 <dt>uri</dt>
1458 <dd class="description">URI buffer</dd>
1459 <dt>urilen</dt>
1460 <dd class="description">Size of URI buffer</dd>
1461 <dt>scheme</dt>
1462 <dd class="description">Scheme name</dd>
1463 <dt>username</dt>
1464 <dd class="description">Username</dd>
1465 <dt>host</dt>
1466 <dd class="description">Hostname or address</dd>
1467 <dt>port</dt>
1468 <dd class="description">Port number</dd>
1469 <dt>resourcef</dt>
1470 <dd class="description">Printf-style resource</dd>
1471 <dt>...</dt>
1472 <dd class="description">Additional arguments as needed</dd>
1473 </dl>
1474 <h4 class="returnvalue">Return Value</h4>
1475 <p class="description">URI status</p>
1476 <h4 class="discussion">Discussion</h4>
1477 <p class="discussion">This function creates a formatted version of the resource string
1478 argument &quot;resourcef&quot; and escapes reserved characters in the URI
1479 depending on the value of the &quot;encoding&quot; argument. You should use
1480 this function in place of traditional string functions whenever
1481 you need to create a URI string.
1482
1483 </p>
1484 <h3 class="function"><a name="httpBlocking">httpBlocking</a></h3>
1485 <p class="description">Set blocking/non-blocking behavior on a connection.</p>
1486 <p class="code">
1487 void httpBlocking (<br>
1488 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1489 &nbsp;&nbsp;&nbsp;&nbsp;int b<br>
1490 );</p>
1491 <h4 class="parameters">Parameters</h4>
1492 <dl>
1493 <dt>http</dt>
1494 <dd class="description">Connection to server</dd>
1495 <dt>b</dt>
1496 <dd class="description">1 = blocking, 0 = non-blocking</dd>
1497 </dl>
1498 <h3 class="function"><a name="httpCheck">httpCheck</a></h3>
1499 <p class="description">Check to see if there is a pending response from the server.</p>
1500 <p class="code">
1501 int httpCheck (<br>
1502 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1503 );</p>
1504 <h4 class="parameters">Parameters</h4>
1505 <dl>
1506 <dt>http</dt>
1507 <dd class="description">Connection to server</dd>
1508 </dl>
1509 <h4 class="returnvalue">Return Value</h4>
1510 <p class="description">0 = no data, 1 = data available</p>
1511 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="httpClearCookie">httpClearCookie</a></h3>
1512 <p class="description">Clear the cookie value(s).</p>
1513 <p class="code">
1514 void httpClearCookie (<br>
1515 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1516 );</p>
1517 <h4 class="parameters">Parameters</h4>
1518 <dl>
1519 <dt>http</dt>
1520 <dd class="description">Connection to server</dd>
1521 </dl>
1522 <h3 class="function"><a name="httpClearFields">httpClearFields</a></h3>
1523 <p class="description">Clear HTTP request fields.</p>
1524 <p class="code">
1525 void httpClearFields (<br>
1526 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1527 );</p>
1528 <h4 class="parameters">Parameters</h4>
1529 <dl>
1530 <dt>http</dt>
1531 <dd class="description">Connection to server</dd>
1532 </dl>
1533 <h3 class="function"><a name="httpClose">httpClose</a></h3>
1534 <p class="description">Close an HTTP connection...</p>
1535 <p class="code">
1536 void httpClose (<br>
1537 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1538 );</p>
1539 <h4 class="parameters">Parameters</h4>
1540 <dl>
1541 <dt>http</dt>
1542 <dd class="description">Connection to server</dd>
1543 </dl>
1544 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpConnect">httpConnect</a></h3>
1545 <p class="description">Connect to a HTTP server.</p>
1546 <p class="code">
1547 <a href="#http_t">http_t</a> *httpConnect (<br>
1548 &nbsp;&nbsp;&nbsp;&nbsp;const char *host,<br>
1549 &nbsp;&nbsp;&nbsp;&nbsp;int port<br>
1550 );</p>
1551 <h4 class="parameters">Parameters</h4>
1552 <dl>
1553 <dt>host</dt>
1554 <dd class="description">Host to connect to</dd>
1555 <dt>port</dt>
1556 <dd class="description">Port number</dd>
1557 </dl>
1558 <h4 class="returnvalue">Return Value</h4>
1559 <p class="description">New HTTP connection</p>
1560 <h4 class="discussion">Discussion</h4>
1561 <p class="discussion">This function is deprecated - use <a href="#httpConnectEncrypt"><code>httpConnectEncrypt</code></a> instead.
1562
1563 </p>
1564 <h3 class="function"><a name="httpConnectEncrypt">httpConnectEncrypt</a></h3>
1565 <p class="description">Connect to a HTTP server using encryption.</p>
1566 <p class="code">
1567 <a href="#http_t">http_t</a> *httpConnectEncrypt (<br>
1568 &nbsp;&nbsp;&nbsp;&nbsp;const char *host,<br>
1569 &nbsp;&nbsp;&nbsp;&nbsp;int port,<br>
1570 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_encryption_t">http_encryption_t</a> encryption<br>
1571 );</p>
1572 <h4 class="parameters">Parameters</h4>
1573 <dl>
1574 <dt>host</dt>
1575 <dd class="description">Host to connect to</dd>
1576 <dt>port</dt>
1577 <dd class="description">Port number</dd>
1578 <dt>encryption</dt>
1579 <dd class="description">Type of encryption to use</dd>
1580 </dl>
1581 <h4 class="returnvalue">Return Value</h4>
1582 <p class="description">New HTTP connection</p>
1583 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpDecode64">httpDecode64</a></h3>
1584 <p class="description">Base64-decode a string.</p>
1585 <p class="code">
1586 char *httpDecode64 (<br>
1587 &nbsp;&nbsp;&nbsp;&nbsp;char *out,<br>
1588 &nbsp;&nbsp;&nbsp;&nbsp;const char *in<br>
1589 );</p>
1590 <h4 class="parameters">Parameters</h4>
1591 <dl>
1592 <dt>out</dt>
1593 <dd class="description">String to write to</dd>
1594 <dt>in</dt>
1595 <dd class="description">String to read from</dd>
1596 </dl>
1597 <h4 class="returnvalue">Return Value</h4>
1598 <p class="description">Decoded string</p>
1599 <h4 class="discussion">Discussion</h4>
1600 <p class="discussion">This function is deprecated. Use the httpDecode64_2() function instead
1601 which provides buffer length arguments.
1602
1603 </p>
1604 <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>
1605 <p class="description">Base64-decode a string.</p>
1606 <p class="code">
1607 char *httpDecode64_2 (<br>
1608 &nbsp;&nbsp;&nbsp;&nbsp;char *out,<br>
1609 &nbsp;&nbsp;&nbsp;&nbsp;int *outlen,<br>
1610 &nbsp;&nbsp;&nbsp;&nbsp;const char *in<br>
1611 );</p>
1612 <h4 class="parameters">Parameters</h4>
1613 <dl>
1614 <dt>out</dt>
1615 <dd class="description">String to write to</dd>
1616 <dt>outlen</dt>
1617 <dd class="description">Size of output string</dd>
1618 <dt>in</dt>
1619 <dd class="description">String to read from</dd>
1620 </dl>
1621 <h4 class="returnvalue">Return Value</h4>
1622 <p class="description">Decoded string</p>
1623 <h3 class="function"><a name="httpDelete">httpDelete</a></h3>
1624 <p class="description">Send a DELETE request to the server.</p>
1625 <p class="code">
1626 int httpDelete (<br>
1627 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1628 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
1629 );</p>
1630 <h4 class="parameters">Parameters</h4>
1631 <dl>
1632 <dt>http</dt>
1633 <dd class="description">Connection to server</dd>
1634 <dt>uri</dt>
1635 <dd class="description">URI to delete</dd>
1636 </dl>
1637 <h4 class="returnvalue">Return Value</h4>
1638 <p class="description">Status of call (0 = success)</p>
1639 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpEncode64">httpEncode64</a></h3>
1640 <p class="description">Base64-encode a string.</p>
1641 <p class="code">
1642 char *httpEncode64 (<br>
1643 &nbsp;&nbsp;&nbsp;&nbsp;char *out,<br>
1644 &nbsp;&nbsp;&nbsp;&nbsp;const char *in<br>
1645 );</p>
1646 <h4 class="parameters">Parameters</h4>
1647 <dl>
1648 <dt>out</dt>
1649 <dd class="description">String to write to</dd>
1650 <dt>in</dt>
1651 <dd class="description">String to read from</dd>
1652 </dl>
1653 <h4 class="returnvalue">Return Value</h4>
1654 <p class="description">Encoded string</p>
1655 <h4 class="discussion">Discussion</h4>
1656 <p class="discussion">This function is deprecated. Use the httpEncode64_2() function instead
1657 which provides buffer length arguments.
1658
1659 </p>
1660 <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>
1661 <p class="description">Base64-encode a string.</p>
1662 <p class="code">
1663 char *httpEncode64_2 (<br>
1664 &nbsp;&nbsp;&nbsp;&nbsp;char *out,<br>
1665 &nbsp;&nbsp;&nbsp;&nbsp;int outlen,<br>
1666 &nbsp;&nbsp;&nbsp;&nbsp;const char *in,<br>
1667 &nbsp;&nbsp;&nbsp;&nbsp;int inlen<br>
1668 );</p>
1669 <h4 class="parameters">Parameters</h4>
1670 <dl>
1671 <dt>out</dt>
1672 <dd class="description">String to write to</dd>
1673 <dt>outlen</dt>
1674 <dd class="description">Size of output string</dd>
1675 <dt>in</dt>
1676 <dd class="description">String to read from</dd>
1677 <dt>inlen</dt>
1678 <dd class="description">Size of input string</dd>
1679 </dl>
1680 <h4 class="returnvalue">Return Value</h4>
1681 <p class="description">Encoded string</p>
1682 <h3 class="function"><a name="httpEncryption">httpEncryption</a></h3>
1683 <p class="description">Set the required encryption on the link.</p>
1684 <p class="code">
1685 int httpEncryption (<br>
1686 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1687 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_encryption_t">http_encryption_t</a> e<br>
1688 );</p>
1689 <h4 class="parameters">Parameters</h4>
1690 <dl>
1691 <dt>http</dt>
1692 <dd class="description">Connection to server</dd>
1693 <dt>e</dt>
1694 <dd class="description">New encryption preference</dd>
1695 </dl>
1696 <h4 class="returnvalue">Return Value</h4>
1697 <p class="description">-1 on error, 0 on success</p>
1698 <h3 class="function"><a name="httpError">httpError</a></h3>
1699 <p class="description">Get the last error on a connection.</p>
1700 <p class="code">
1701 int httpError (<br>
1702 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1703 );</p>
1704 <h4 class="parameters">Parameters</h4>
1705 <dl>
1706 <dt>http</dt>
1707 <dd class="description">Connection to server</dd>
1708 </dl>
1709 <h4 class="returnvalue">Return Value</h4>
1710 <p class="description">Error code (errno) value</p>
1711 <h3 class="function"><a name="httpFlush">httpFlush</a></h3>
1712 <p class="description">Flush data from a HTTP connection.</p>
1713 <p class="code">
1714 void httpFlush (<br>
1715 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1716 );</p>
1717 <h4 class="parameters">Parameters</h4>
1718 <dl>
1719 <dt>http</dt>
1720 <dd class="description">Connection to server</dd>
1721 </dl>
1722 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpFlushWrite">httpFlushWrite</a></h3>
1723 <p class="description">Flush data in write buffer.</p>
1724 <p class="code">
1725 int httpFlushWrite (<br>
1726 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1727 );</p>
1728 <h4 class="parameters">Parameters</h4>
1729 <dl>
1730 <dt>http</dt>
1731 <dd class="description">Connection to server</dd>
1732 </dl>
1733 <h4 class="returnvalue">Return Value</h4>
1734 <p class="description">Bytes written or -1 on error</p>
1735 <h3 class="function"><a name="httpGet">httpGet</a></h3>
1736 <p class="description">Send a GET request to the server.</p>
1737 <p class="code">
1738 int httpGet (<br>
1739 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1740 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
1741 );</p>
1742 <h4 class="parameters">Parameters</h4>
1743 <dl>
1744 <dt>http</dt>
1745 <dd class="description">Connection to server</dd>
1746 <dt>uri</dt>
1747 <dd class="description">URI to get</dd>
1748 </dl>
1749 <h4 class="returnvalue">Return Value</h4>
1750 <p class="description">Status of call (0 = success)</p>
1751 <h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="httpGetAuthString">httpGetAuthString</a></h3>
1752 <p class="description">Get the current authorization string.</p>
1753 <p class="code">
1754 char *httpGetAuthString (<br>
1755 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1756 );</p>
1757 <h4 class="parameters">Parameters</h4>
1758 <dl>
1759 <dt>http</dt>
1760 <dd class="description">Connection to server</dd>
1761 </dl>
1762 <h4 class="returnvalue">Return Value</h4>
1763 <p class="description">Authorization string</p>
1764 <h4 class="discussion">Discussion</h4>
1765 <p class="discussion">The authorization string is set by cupsDoAuthentication() and
1766 httpSetAuthString(). Use httpGetAuthString() to retrieve the
1767 string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
1768 value.
1769
1770 </p>
1771 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpGetBlocking">httpGetBlocking</a></h3>
1772 <p class="description">Get the blocking/non-block state of a connection.</p>
1773 <p class="code">
1774 int httpGetBlocking (<br>
1775 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1776 );</p>
1777 <h4 class="parameters">Parameters</h4>
1778 <dl>
1779 <dt>http</dt>
1780 <dd class="description">Connection to server</dd>
1781 </dl>
1782 <h4 class="returnvalue">Return Value</h4>
1783 <p class="description">1 if blocking, 0 if non-blocking</p>
1784 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="httpGetCookie">httpGetCookie</a></h3>
1785 <p class="description">Get any cookie data from the response.</p>
1786 <p class="code">
1787 const char *httpGetCookie (<br>
1788 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1789 );</p>
1790 <h4 class="parameters">Parameters</h4>
1791 <dl>
1792 <dt>http</dt>
1793 <dd class="description">HTTP connecion</dd>
1794 </dl>
1795 <h4 class="returnvalue">Return Value</h4>
1796 <p class="description">Cookie data or NULL</p>
1797 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpGetDateString">httpGetDateString</a></h3>
1798 <p class="description">Get a formatted date/time string from a time value.</p>
1799 <p class="code">
1800 const char *httpGetDateString (<br>
1801 &nbsp;&nbsp;&nbsp;&nbsp;time_t t<br>
1802 );</p>
1803 <h4 class="parameters">Parameters</h4>
1804 <dl>
1805 <dt>t</dt>
1806 <dd class="description">UNIX time</dd>
1807 </dl>
1808 <h4 class="returnvalue">Return Value</h4>
1809 <p class="description">Date/time string</p>
1810 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpGetDateString2">httpGetDateString2</a></h3>
1811 <p class="description">Get a formatted date/time string from a time value.</p>
1812 <p class="code">
1813 const char *httpGetDateString2 (<br>
1814 &nbsp;&nbsp;&nbsp;&nbsp;time_t t,<br>
1815 &nbsp;&nbsp;&nbsp;&nbsp;char *s,<br>
1816 &nbsp;&nbsp;&nbsp;&nbsp;int slen<br>
1817 );</p>
1818 <h4 class="parameters">Parameters</h4>
1819 <dl>
1820 <dt>t</dt>
1821 <dd class="description">UNIX time</dd>
1822 <dt>s</dt>
1823 <dd class="description">String buffer</dd>
1824 <dt>slen</dt>
1825 <dd class="description">Size of string buffer</dd>
1826 </dl>
1827 <h4 class="returnvalue">Return Value</h4>
1828 <p class="description">Date/time string</p>
1829 <h3 class="function"><a name="httpGetDateTime">httpGetDateTime</a></h3>
1830 <p class="description">Get a time value from a formatted date/time string.</p>
1831 <p class="code">
1832 time_t httpGetDateTime (<br>
1833 &nbsp;&nbsp;&nbsp;&nbsp;const char *s<br>
1834 );</p>
1835 <h4 class="parameters">Parameters</h4>
1836 <dl>
1837 <dt>s</dt>
1838 <dd class="description">Date/time string</dd>
1839 </dl>
1840 <h4 class="returnvalue">Return Value</h4>
1841 <p class="description">UNIX time</p>
1842 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpGetFd">httpGetFd</a></h3>
1843 <p class="description">Get the file descriptor associated with a connection.</p>
1844 <p class="code">
1845 int httpGetFd (<br>
1846 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1847 );</p>
1848 <h4 class="parameters">Parameters</h4>
1849 <dl>
1850 <dt>http</dt>
1851 <dd class="description">Connection to server</dd>
1852 </dl>
1853 <h4 class="returnvalue">Return Value</h4>
1854 <p class="description">File descriptor or -1 if none</p>
1855 <h3 class="function"><a name="httpGetField">httpGetField</a></h3>
1856 <p class="description">Get a field value from a request/response.</p>
1857 <p class="code">
1858 const char *httpGetField (<br>
1859 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1860 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_field_t">http_field_t</a> field<br>
1861 );</p>
1862 <h4 class="parameters">Parameters</h4>
1863 <dl>
1864 <dt>http</dt>
1865 <dd class="description">Connection to server</dd>
1866 <dt>field</dt>
1867 <dd class="description">Field to get</dd>
1868 </dl>
1869 <h4 class="returnvalue">Return Value</h4>
1870 <p class="description">Field value</p>
1871 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpGetHostByName">httpGetHostByName</a></h3>
1872 <p class="description">Lookup a hostname or IPv4 address, and return
1873 address records for the specified name.</p>
1874 <p class="code">
1875 struct hostent *httpGetHostByName (<br>
1876 &nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
1877 );</p>
1878 <h4 class="parameters">Parameters</h4>
1879 <dl>
1880 <dt>name</dt>
1881 <dd class="description">Hostname or IP address</dd>
1882 </dl>
1883 <h4 class="returnvalue">Return Value</h4>
1884 <p class="description">Host entry</p>
1885 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpGetHostname">httpGetHostname</a></h3>
1886 <p class="description">Get the FQDN for the connection or local system.</p>
1887 <p class="code">
1888 const char *httpGetHostname (<br>
1889 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1890 &nbsp;&nbsp;&nbsp;&nbsp;char *s,<br>
1891 &nbsp;&nbsp;&nbsp;&nbsp;int slen<br>
1892 );</p>
1893 <h4 class="parameters">Parameters</h4>
1894 <dl>
1895 <dt>http</dt>
1896 <dd class="description">HTTP connection or NULL</dd>
1897 <dt>s</dt>
1898 <dd class="description">String buffer for name</dd>
1899 <dt>slen</dt>
1900 <dd class="description">Size of buffer</dd>
1901 </dl>
1902 <h4 class="returnvalue">Return Value</h4>
1903 <p class="description">FQDN for connection or system</p>
1904 <h4 class="discussion">Discussion</h4>
1905 <p class="discussion">When &quot;http&quot; points to a connected socket, return the hostname or
1906 address that was used in the call to httpConnect() or httpConnectEncrypt().
1907 Otherwise, return the FQDN for the local system using both gethostname()
1908 and gethostbyname() to get the local hostname with domain.
1909
1910 </p>
1911 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpGetLength">httpGetLength</a></h3>
1912 <p class="description">Get the amount of data remaining from the
1913 content-length or transfer-encoding fields.</p>
1914 <p class="code">
1915 int httpGetLength (<br>
1916 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1917 );</p>
1918 <h4 class="parameters">Parameters</h4>
1919 <dl>
1920 <dt>http</dt>
1921 <dd class="description">Connection to server</dd>
1922 </dl>
1923 <h4 class="returnvalue">Return Value</h4>
1924 <p class="description">Content length</p>
1925 <h4 class="discussion">Discussion</h4>
1926 <p class="discussion">This function is deprecated and will not return lengths larger than
1927 2^31 - 1; use httpGetLength2() instead.
1928
1929 </p>
1930 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpGetLength2">httpGetLength2</a></h3>
1931 <p class="description">Get the amount of data remaining from the
1932 content-length or transfer-encoding fields.</p>
1933 <p class="code">
1934 off_t httpGetLength2 (<br>
1935 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1936 );</p>
1937 <h4 class="parameters">Parameters</h4>
1938 <dl>
1939 <dt>http</dt>
1940 <dd class="description">Connection to server</dd>
1941 </dl>
1942 <h4 class="returnvalue">Return Value</h4>
1943 <p class="description">Content length</p>
1944 <h4 class="discussion">Discussion</h4>
1945 <p class="discussion">This function returns the complete content length, even for
1946 content larger than 2^31 - 1.
1947
1948 </p>
1949 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpGetStatus">httpGetStatus</a></h3>
1950 <p class="description">Get the status of the last HTTP request.</p>
1951 <p class="code">
1952 <a href="#http_status_t">http_status_t</a> httpGetStatus (<br>
1953 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
1954 );</p>
1955 <h4 class="parameters">Parameters</h4>
1956 <dl>
1957 <dt>http</dt>
1958 <dd class="description">Connection to server</dd>
1959 </dl>
1960 <h4 class="returnvalue">Return Value</h4>
1961 <p class="description">HTTP status</p>
1962 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpGetSubField">httpGetSubField</a></h3>
1963 <p class="description">Get a sub-field value.</p>
1964 <p class="code">
1965 char *httpGetSubField (<br>
1966 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1967 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_field_t">http_field_t</a> field,<br>
1968 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
1969 &nbsp;&nbsp;&nbsp;&nbsp;char *value<br>
1970 );</p>
1971 <h4 class="parameters">Parameters</h4>
1972 <dl>
1973 <dt>http</dt>
1974 <dd class="description">Connection to server</dd>
1975 <dt>field</dt>
1976 <dd class="description">Field index</dd>
1977 <dt>name</dt>
1978 <dd class="description">Name of sub-field</dd>
1979 <dt>value</dt>
1980 <dd class="description">Value string</dd>
1981 </dl>
1982 <h4 class="returnvalue">Return Value</h4>
1983 <p class="description">Value or NULL</p>
1984 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpGetSubField2">httpGetSubField2</a></h3>
1985 <p class="description">Get a sub-field value.</p>
1986 <p class="code">
1987 char *httpGetSubField2 (<br>
1988 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
1989 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_field_t">http_field_t</a> field,<br>
1990 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
1991 &nbsp;&nbsp;&nbsp;&nbsp;char *value,<br>
1992 &nbsp;&nbsp;&nbsp;&nbsp;int valuelen<br>
1993 );</p>
1994 <h4 class="parameters">Parameters</h4>
1995 <dl>
1996 <dt>http</dt>
1997 <dd class="description">Connection to server</dd>
1998 <dt>field</dt>
1999 <dd class="description">Field index</dd>
2000 <dt>name</dt>
2001 <dd class="description">Name of sub-field</dd>
2002 <dt>value</dt>
2003 <dd class="description">Value string</dd>
2004 <dt>valuelen</dt>
2005 <dd class="description">Size of value buffer</dd>
2006 </dl>
2007 <h4 class="returnvalue">Return Value</h4>
2008 <p class="description">Value or NULL</p>
2009 <h3 class="function"><a name="httpGets">httpGets</a></h3>
2010 <p class="description">Get a line of text from a HTTP connection.</p>
2011 <p class="code">
2012 char *httpGets (<br>
2013 &nbsp;&nbsp;&nbsp;&nbsp;char *line,<br>
2014 &nbsp;&nbsp;&nbsp;&nbsp;int length,<br>
2015 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2016 );</p>
2017 <h4 class="parameters">Parameters</h4>
2018 <dl>
2019 <dt>line</dt>
2020 <dd class="description">Line to read into</dd>
2021 <dt>length</dt>
2022 <dd class="description">Max length of buffer</dd>
2023 <dt>http</dt>
2024 <dd class="description">Connection to server</dd>
2025 </dl>
2026 <h4 class="returnvalue">Return Value</h4>
2027 <p class="description">Line or NULL</p>
2028 <h3 class="function"><a name="httpHead">httpHead</a></h3>
2029 <p class="description">Send a HEAD request to the server.</p>
2030 <p class="code">
2031 int httpHead (<br>
2032 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2033 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
2034 );</p>
2035 <h4 class="parameters">Parameters</h4>
2036 <dl>
2037 <dt>http</dt>
2038 <dd class="description">Connection to server</dd>
2039 <dt>uri</dt>
2040 <dd class="description">URI for head</dd>
2041 </dl>
2042 <h4 class="returnvalue">Return Value</h4>
2043 <p class="description">Status of call (0 = success)</p>
2044 <h3 class="function"><a name="httpInitialize">httpInitialize</a></h3>
2045 <p class="description">Initialize the HTTP interface library and set the
2046 default HTTP proxy (if any).</p>
2047 <p class="code">
2048 void httpInitialize (void);</p>
2049 <h3 class="function"><a name="httpMD5">httpMD5</a></h3>
2050 <p class="description">Compute the MD5 sum of the username:group:password.</p>
2051 <p class="code">
2052 char *httpMD5 (<br>
2053 &nbsp;&nbsp;&nbsp;&nbsp;const char *username,<br>
2054 &nbsp;&nbsp;&nbsp;&nbsp;const char *realm,<br>
2055 &nbsp;&nbsp;&nbsp;&nbsp;const char *passwd,<br>
2056 &nbsp;&nbsp;&nbsp;&nbsp;char md5[33]<br>
2057 );</p>
2058 <h4 class="parameters">Parameters</h4>
2059 <dl>
2060 <dt>username</dt>
2061 <dd class="description">User name</dd>
2062 <dt>realm</dt>
2063 <dd class="description">Realm name</dd>
2064 <dt>passwd</dt>
2065 <dd class="description">Password string</dd>
2066 <dt>md5[33]</dt>
2067 <dd class="description">MD5 string</dd>
2068 </dl>
2069 <h4 class="returnvalue">Return Value</h4>
2070 <p class="description">MD5 sum</p>
2071 <h3 class="function"><a name="httpMD5Final">httpMD5Final</a></h3>
2072 <p class="description">Combine the MD5 sum of the username, group, and password
2073 with the server-supplied nonce value, method, and
2074 request-uri.</p>
2075 <p class="code">
2076 char *httpMD5Final (<br>
2077 &nbsp;&nbsp;&nbsp;&nbsp;const char *nonce,<br>
2078 &nbsp;&nbsp;&nbsp;&nbsp;const char *method,<br>
2079 &nbsp;&nbsp;&nbsp;&nbsp;const char *resource,<br>
2080 &nbsp;&nbsp;&nbsp;&nbsp;char md5[33]<br>
2081 );</p>
2082 <h4 class="parameters">Parameters</h4>
2083 <dl>
2084 <dt>nonce</dt>
2085 <dd class="description">Server nonce value</dd>
2086 <dt>method</dt>
2087 <dd class="description">METHOD (GET, POST, etc.)</dd>
2088 <dt>resource</dt>
2089 <dd class="description">Resource path</dd>
2090 <dt>md5[33]</dt>
2091 <dd class="description">MD5 sum</dd>
2092 </dl>
2093 <h4 class="returnvalue">Return Value</h4>
2094 <p class="description">New sum</p>
2095 <h3 class="function"><a name="httpMD5String">httpMD5String</a></h3>
2096 <p class="description">Convert an MD5 sum to a character string.</p>
2097 <p class="code">
2098 char *httpMD5String (<br>
2099 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char *sum,<br>
2100 &nbsp;&nbsp;&nbsp;&nbsp;char md5[33]<br>
2101 );</p>
2102 <h4 class="parameters">Parameters</h4>
2103 <dl>
2104 <dt>sum</dt>
2105 <dd class="description">MD5 sum data</dd>
2106 <dt>md5[33]</dt>
2107 <dd class="description">MD5 sum in hex</dd>
2108 </dl>
2109 <h4 class="returnvalue">Return Value</h4>
2110 <p class="description">MD5 sum in hex</p>
2111 <h3 class="function"><a name="httpOptions">httpOptions</a></h3>
2112 <p class="description">Send an OPTIONS request to the server.</p>
2113 <p class="code">
2114 int httpOptions (<br>
2115 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2116 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
2117 );</p>
2118 <h4 class="parameters">Parameters</h4>
2119 <dl>
2120 <dt>http</dt>
2121 <dd class="description">Connection to server</dd>
2122 <dt>uri</dt>
2123 <dd class="description">URI for options</dd>
2124 </dl>
2125 <h4 class="returnvalue">Return Value</h4>
2126 <p class="description">Status of call (0 = success)</p>
2127 <h3 class="function"><a name="httpPost">httpPost</a></h3>
2128 <p class="description">Send a POST request to the server.</p>
2129 <p class="code">
2130 int httpPost (<br>
2131 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2132 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
2133 );</p>
2134 <h4 class="parameters">Parameters</h4>
2135 <dl>
2136 <dt>http</dt>
2137 <dd class="description">Connection to server</dd>
2138 <dt>uri</dt>
2139 <dd class="description">URI for post</dd>
2140 </dl>
2141 <h4 class="returnvalue">Return Value</h4>
2142 <p class="description">Status of call (0 = success)</p>
2143 <h3 class="function"><a name="httpPut">httpPut</a></h3>
2144 <p class="description">Send a PUT request to the server.</p>
2145 <p class="code">
2146 int httpPut (<br>
2147 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2148 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
2149 );</p>
2150 <h4 class="parameters">Parameters</h4>
2151 <dl>
2152 <dt>http</dt>
2153 <dd class="description">Connection to server</dd>
2154 <dt>uri</dt>
2155 <dd class="description">URI to put</dd>
2156 </dl>
2157 <h4 class="returnvalue">Return Value</h4>
2158 <p class="description">Status of call (0 = success)</p>
2159 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpRead">httpRead</a></h3>
2160 <p class="description">Read data from a HTTP connection.</p>
2161 <p class="code">
2162 int httpRead (<br>
2163 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2164 &nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
2165 &nbsp;&nbsp;&nbsp;&nbsp;int length<br>
2166 );</p>
2167 <h4 class="parameters">Parameters</h4>
2168 <dl>
2169 <dt>http</dt>
2170 <dd class="description">Connection to server</dd>
2171 <dt>buffer</dt>
2172 <dd class="description">Buffer for data</dd>
2173 <dt>length</dt>
2174 <dd class="description">Maximum number of bytes</dd>
2175 </dl>
2176 <h4 class="returnvalue">Return Value</h4>
2177 <p class="description">Number of bytes read</p>
2178 <h4 class="discussion">Discussion</h4>
2179 <p class="discussion">This function is deprecated. Use the httpRead2() function which can
2180 read more than 2GB of data.
2181
2182 </p>
2183 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpRead2">httpRead2</a></h3>
2184 <p class="description">Read data from a HTTP connection.</p>
2185 <p class="code">
2186 ssize_t httpRead2 (<br>
2187 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2188 &nbsp;&nbsp;&nbsp;&nbsp;char *buffer,<br>
2189 &nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
2190 );</p>
2191 <h4 class="parameters">Parameters</h4>
2192 <dl>
2193 <dt>http</dt>
2194 <dd class="description">Connection to server</dd>
2195 <dt>buffer</dt>
2196 <dd class="description">Buffer for data</dd>
2197 <dt>length</dt>
2198 <dd class="description">Maximum number of bytes</dd>
2199 </dl>
2200 <h4 class="returnvalue">Return Value</h4>
2201 <p class="description">Number of bytes read</p>
2202 <h3 class="function"><a name="httpReconnect">httpReconnect</a></h3>
2203 <p class="description">Reconnect to a HTTP server.</p>
2204 <p class="code">
2205 int httpReconnect (<br>
2206 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2207 );</p>
2208 <h4 class="parameters">Parameters</h4>
2209 <dl>
2210 <dt>http</dt>
2211 <dd class="description">Connection to server</dd>
2212 </dl>
2213 <h4 class="returnvalue">Return Value</h4>
2214 <p class="description">0 on success, non-zero on failure</p>
2215 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpSeparate">httpSeparate</a></h3>
2216 <p class="description">Separate a Universal Resource Identifier into its
2217 components.</p>
2218 <p class="code">
2219 void httpSeparate (<br>
2220 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri,<br>
2221 &nbsp;&nbsp;&nbsp;&nbsp;char *scheme,<br>
2222 &nbsp;&nbsp;&nbsp;&nbsp;char *username,<br>
2223 &nbsp;&nbsp;&nbsp;&nbsp;char *host,<br>
2224 &nbsp;&nbsp;&nbsp;&nbsp;int *port,<br>
2225 &nbsp;&nbsp;&nbsp;&nbsp;char *resource<br>
2226 );</p>
2227 <h4 class="parameters">Parameters</h4>
2228 <dl>
2229 <dt>uri</dt>
2230 <dd class="description">Universal Resource Identifier</dd>
2231 <dt>scheme</dt>
2232 <dd class="description">Scheme [32] (http, https, etc.)</dd>
2233 <dt>username</dt>
2234 <dd class="description">Username [1024]</dd>
2235 <dt>host</dt>
2236 <dd class="description">Hostname [1024]</dd>
2237 <dt>port</dt>
2238 <dd class="description">Port number to use</dd>
2239 <dt>resource</dt>
2240 <dd class="description">Resource/filename [1024]</dd>
2241 </dl>
2242 <h4 class="discussion">Discussion</h4>
2243 <p class="discussion">This function is deprecated; use the httpSeparateURI() function instead.
2244
2245 </p>
2246 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.21/Mac OS X 10.4&nbsp;</span><a name="httpSeparate2">httpSeparate2</a></h3>
2247 <p class="description">Separate a Universal Resource Identifier into its
2248 components.</p>
2249 <p class="code">
2250 void httpSeparate2 (<br>
2251 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri,<br>
2252 &nbsp;&nbsp;&nbsp;&nbsp;char *scheme,<br>
2253 &nbsp;&nbsp;&nbsp;&nbsp;int schemelen,<br>
2254 &nbsp;&nbsp;&nbsp;&nbsp;char *username,<br>
2255 &nbsp;&nbsp;&nbsp;&nbsp;int usernamelen,<br>
2256 &nbsp;&nbsp;&nbsp;&nbsp;char *host,<br>
2257 &nbsp;&nbsp;&nbsp;&nbsp;int hostlen,<br>
2258 &nbsp;&nbsp;&nbsp;&nbsp;int *port,<br>
2259 &nbsp;&nbsp;&nbsp;&nbsp;char *resource,<br>
2260 &nbsp;&nbsp;&nbsp;&nbsp;int resourcelen<br>
2261 );</p>
2262 <h4 class="parameters">Parameters</h4>
2263 <dl>
2264 <dt>uri</dt>
2265 <dd class="description">Universal Resource Identifier</dd>
2266 <dt>scheme</dt>
2267 <dd class="description">Scheme (http, https, etc.)</dd>
2268 <dt>schemelen</dt>
2269 <dd class="description">Size of scheme buffer</dd>
2270 <dt>username</dt>
2271 <dd class="description">Username</dd>
2272 <dt>usernamelen</dt>
2273 <dd class="description">Size of username buffer</dd>
2274 <dt>host</dt>
2275 <dd class="description">Hostname</dd>
2276 <dt>hostlen</dt>
2277 <dd class="description">Size of hostname buffer</dd>
2278 <dt>port</dt>
2279 <dd class="description">Port number to use</dd>
2280 <dt>resource</dt>
2281 <dd class="description">Resource/filename</dd>
2282 <dt>resourcelen</dt>
2283 <dd class="description">Size of resource buffer</dd>
2284 </dl>
2285 <h4 class="discussion">Discussion</h4>
2286 <p class="discussion">This function is deprecated; use the httpSeparateURI() function instead.
2287
2288
2289 </p>
2290 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpSeparateURI">httpSeparateURI</a></h3>
2291 <p class="description">Separate a Universal Resource Identifier into its
2292 components.</p>
2293 <p class="code">
2294 <a href="#http_uri_status_t">http_uri_status_t</a> httpSeparateURI (<br>
2295 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_uri_coding_t">http_uri_coding_t</a> decoding,<br>
2296 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri,<br>
2297 &nbsp;&nbsp;&nbsp;&nbsp;char *scheme,<br>
2298 &nbsp;&nbsp;&nbsp;&nbsp;int schemelen,<br>
2299 &nbsp;&nbsp;&nbsp;&nbsp;char *username,<br>
2300 &nbsp;&nbsp;&nbsp;&nbsp;int usernamelen,<br>
2301 &nbsp;&nbsp;&nbsp;&nbsp;char *host,<br>
2302 &nbsp;&nbsp;&nbsp;&nbsp;int hostlen,<br>
2303 &nbsp;&nbsp;&nbsp;&nbsp;int *port,<br>
2304 &nbsp;&nbsp;&nbsp;&nbsp;char *resource,<br>
2305 &nbsp;&nbsp;&nbsp;&nbsp;int resourcelen<br>
2306 );</p>
2307 <h4 class="parameters">Parameters</h4>
2308 <dl>
2309 <dt>decoding</dt>
2310 <dd class="description">Decoding flags</dd>
2311 <dt>uri</dt>
2312 <dd class="description">Universal Resource Identifier</dd>
2313 <dt>scheme</dt>
2314 <dd class="description">Scheme (http, https, etc.)</dd>
2315 <dt>schemelen</dt>
2316 <dd class="description">Size of scheme buffer</dd>
2317 <dt>username</dt>
2318 <dd class="description">Username</dd>
2319 <dt>usernamelen</dt>
2320 <dd class="description">Size of username buffer</dd>
2321 <dt>host</dt>
2322 <dd class="description">Hostname</dd>
2323 <dt>hostlen</dt>
2324 <dd class="description">Size of hostname buffer</dd>
2325 <dt>port</dt>
2326 <dd class="description">Port number to use</dd>
2327 <dt>resource</dt>
2328 <dd class="description">Resource/filename</dd>
2329 <dt>resourcelen</dt>
2330 <dd class="description">Size of resource buffer</dd>
2331 </dl>
2332 <h4 class="returnvalue">Return Value</h4>
2333 <p class="description">Result of separation</p>
2334 <h3 class="function"><span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span><a name="httpSetAuthString">httpSetAuthString</a></h3>
2335 <p class="description">Set the current authorization string.</p>
2336 <p class="code">
2337 void httpSetAuthString (<br>
2338 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2339 &nbsp;&nbsp;&nbsp;&nbsp;const char *scheme,<br>
2340 &nbsp;&nbsp;&nbsp;&nbsp;const char *data<br>
2341 );</p>
2342 <h4 class="parameters">Parameters</h4>
2343 <dl>
2344 <dt>http</dt>
2345 <dd class="description">Connection to server</dd>
2346 <dt>scheme</dt>
2347 <dd class="description">Auth scheme (NULL to clear it)</dd>
2348 <dt>data</dt>
2349 <dd class="description">Auth data (NULL for none)</dd>
2350 </dl>
2351 <h4 class="discussion">Discussion</h4>
2352 <p class="discussion">This function just stores a copy of the current authorization string in
2353 the HTTP connection object. You must still call httpSetField() to set
2354 HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
2355 httpHead(), httpOptions(), httpPost, or httpPut().
2356
2357 </p>
2358 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="httpSetCookie">httpSetCookie</a></h3>
2359 <p class="description">Set the cookie value(s)...</p>
2360 <p class="code">
2361 void httpSetCookie (<br>
2362 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2363 &nbsp;&nbsp;&nbsp;&nbsp;const char *cookie<br>
2364 );</p>
2365 <h4 class="parameters">Parameters</h4>
2366 <dl>
2367 <dt>http</dt>
2368 <dd class="description">Connection</dd>
2369 <dt>cookie</dt>
2370 <dd class="description">Cookie string</dd>
2371 </dl>
2372 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpSetExpect">httpSetExpect</a></h3>
2373 <p class="description">Set the Expect: header in a request.</p>
2374 <p class="code">
2375 void httpSetExpect (<br>
2376 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2377 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_status_t">http_status_t</a> expect<br>
2378 );</p>
2379 <h4 class="parameters">Parameters</h4>
2380 <dl>
2381 <dt>http</dt>
2382 <dd class="description">Connection to server</dd>
2383 <dt>expect</dt>
2384 <dd class="description">HTTP status to expect (HTTP_CONTINUE)</dd>
2385 </dl>
2386 <h4 class="discussion">Discussion</h4>
2387 <p class="discussion">Currently only HTTP_CONTINUE is supported for the &quot;expect&quot; argument.
2388
2389 </p>
2390 <h3 class="function"><a name="httpSetField">httpSetField</a></h3>
2391 <p class="description">Set the value of an HTTP header.</p>
2392 <p class="code">
2393 void httpSetField (<br>
2394 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2395 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_field_t">http_field_t</a> field,<br>
2396 &nbsp;&nbsp;&nbsp;&nbsp;const char *value<br>
2397 );</p>
2398 <h4 class="parameters">Parameters</h4>
2399 <dl>
2400 <dt>http</dt>
2401 <dd class="description">Connection to server</dd>
2402 <dt>field</dt>
2403 <dd class="description">Field index</dd>
2404 <dt>value</dt>
2405 <dd class="description">Value</dd>
2406 </dl>
2407 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpSetLength">httpSetLength</a></h3>
2408 <p class="description">Set the content-length and content-encoding.</p>
2409 <p class="code">
2410 void httpSetLength (<br>
2411 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2412 &nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
2413 );</p>
2414 <h4 class="parameters">Parameters</h4>
2415 <dl>
2416 <dt>http</dt>
2417 <dd class="description">Connection to server</dd>
2418 <dt>length</dt>
2419 <dd class="description">Length (0 for chunked)</dd>
2420 </dl>
2421 <h3 class="function"><a name="httpStatus">httpStatus</a></h3>
2422 <p class="description">Return a short string describing a HTTP status code.</p>
2423 <p class="code">
2424 const char *httpStatus (<br>
2425 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_status_t">http_status_t</a> status<br>
2426 );</p>
2427 <h4 class="parameters">Parameters</h4>
2428 <dl>
2429 <dt>status</dt>
2430 <dd class="description">HTTP status code</dd>
2431 </dl>
2432 <h4 class="returnvalue">Return Value</h4>
2433 <p class="description">Localized status string</p>
2434 <h4 class="discussion">Discussion</h4>
2435 <p class="discussion">The returned string is localized to the current POSIX locale and is based
2436 on the status strings defined in RFC 2616.</p>
2437 <h3 class="function"><a name="httpTrace">httpTrace</a></h3>
2438 <p class="description">Send an TRACE request to the server.</p>
2439 <p class="code">
2440 int httpTrace (<br>
2441 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2442 &nbsp;&nbsp;&nbsp;&nbsp;const char *uri<br>
2443 );</p>
2444 <h4 class="parameters">Parameters</h4>
2445 <dl>
2446 <dt>http</dt>
2447 <dd class="description">Connection to server</dd>
2448 <dt>uri</dt>
2449 <dd class="description">URI for trace</dd>
2450 </dl>
2451 <h4 class="returnvalue">Return Value</h4>
2452 <p class="description">Status of call (0 = success)</p>
2453 <h3 class="function"><a name="httpUpdate">httpUpdate</a></h3>
2454 <p class="description">Update the current HTTP state for incoming data.</p>
2455 <p class="code">
2456 <a href="#http_status_t">http_status_t</a> httpUpdate (<br>
2457 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http<br>
2458 );</p>
2459 <h4 class="parameters">Parameters</h4>
2460 <dl>
2461 <dt>http</dt>
2462 <dd class="description">Connection to server</dd>
2463 </dl>
2464 <h4 class="returnvalue">Return Value</h4>
2465 <p class="description">HTTP status</p>
2466 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="httpWait">httpWait</a></h3>
2467 <p class="description">Wait for data available on a connection.</p>
2468 <p class="code">
2469 int httpWait (<br>
2470 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2471 &nbsp;&nbsp;&nbsp;&nbsp;int msec<br>
2472 );</p>
2473 <h4 class="parameters">Parameters</h4>
2474 <dl>
2475 <dt>http</dt>
2476 <dd class="description">Connection to server</dd>
2477 <dt>msec</dt>
2478 <dd class="description">Milliseconds to wait</dd>
2479 </dl>
2480 <h4 class="returnvalue">Return Value</h4>
2481 <p class="description">1 if data is available, 0 otherwise</p>
2482 <h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="httpWrite">httpWrite</a></h3>
2483 <p class="description">Write data to a HTTP connection.</p>
2484 <p class="code">
2485 int httpWrite (<br>
2486 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2487 &nbsp;&nbsp;&nbsp;&nbsp;const char *buffer,<br>
2488 &nbsp;&nbsp;&nbsp;&nbsp;int length<br>
2489 );</p>
2490 <h4 class="parameters">Parameters</h4>
2491 <dl>
2492 <dt>http</dt>
2493 <dd class="description">Connection to server</dd>
2494 <dt>buffer</dt>
2495 <dd class="description">Buffer for data</dd>
2496 <dt>length</dt>
2497 <dd class="description">Number of bytes to write</dd>
2498 </dl>
2499 <h4 class="returnvalue">Return Value</h4>
2500 <p class="description">Number of bytes written</p>
2501 <h4 class="discussion">Discussion</h4>
2502 <p class="discussion">This function is deprecated. Use the httpWrite2() function which can
2503 write more than 2GB of data.
2504
2505 </p>
2506 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="httpWrite2">httpWrite2</a></h3>
2507 <p class="description">Write data to a HTTP connection.</p>
2508 <p class="code">
2509 ssize_t httpWrite2 (<br>
2510 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
2511 &nbsp;&nbsp;&nbsp;&nbsp;const char *buffer,<br>
2512 &nbsp;&nbsp;&nbsp;&nbsp;size_t length<br>
2513 );</p>
2514 <h4 class="parameters">Parameters</h4>
2515 <dl>
2516 <dt>http</dt>
2517 <dd class="description">Connection to server</dd>
2518 <dt>buffer</dt>
2519 <dd class="description">Buffer for data</dd>
2520 <dt>length</dt>
2521 <dd class="description">Number of bytes to write</dd>
2522 </dl>
2523 <h4 class="returnvalue">Return Value</h4>
2524 <p class="description">Number of bytes written</p>
2525 <h3 class="function"><a name="ippAddBoolean">ippAddBoolean</a></h3>
2526 <p class="description">Add a boolean attribute to an IPP message.</p>
2527 <p class="code">
2528 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddBoolean (<br>
2529 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
2530 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
2531 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2532 &nbsp;&nbsp;&nbsp;&nbsp;char value<br>
2533 );</p>
2534 <h4 class="parameters">Parameters</h4>
2535 <dl>
2536 <dt>ipp</dt>
2537 <dd class="description">IPP message</dd>
2538 <dt>group</dt>
2539 <dd class="description">IPP group</dd>
2540 <dt>name</dt>
2541 <dd class="description">Name of attribute</dd>
2542 <dt>value</dt>
2543 <dd class="description">Value of attribute</dd>
2544 </dl>
2545 <h4 class="returnvalue">Return Value</h4>
2546 <p class="description">New attribute</p>
2547 <h3 class="function"><a name="ippAddBooleans">ippAddBooleans</a></h3>
2548 <p class="description">Add an array of boolean values.</p>
2549 <p class="code">
2550 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddBooleans (<br>
2551 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
2552 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
2553 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2554 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
2555 &nbsp;&nbsp;&nbsp;&nbsp;const char *values<br>
2556 );</p>
2557 <h4 class="parameters">Parameters</h4>
2558 <dl>
2559 <dt>ipp</dt>
2560 <dd class="description">IPP message</dd>
2561 <dt>group</dt>
2562 <dd class="description">IPP group</dd>
2563 <dt>name</dt>
2564 <dd class="description">Name of attribute</dd>
2565 <dt>num_values</dt>
2566 <dd class="description">Number of values</dd>
2567 <dt>values</dt>
2568 <dd class="description">Values</dd>
2569 </dl>
2570 <h4 class="returnvalue">Return Value</h4>
2571 <p class="description">New attribute</p>
2572 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="ippAddCollection">ippAddCollection</a></h3>
2573 <p class="description">Add a collection value.</p>
2574 <p class="code">
2575 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollection (<br>
2576 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
2577 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
2578 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2579 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *value<br>
2580 );</p>
2581 <h4 class="parameters">Parameters</h4>
2582 <dl>
2583 <dt>ipp</dt>
2584 <dd class="description">IPP message</dd>
2585 <dt>group</dt>
2586 <dd class="description">IPP group</dd>
2587 <dt>name</dt>
2588 <dd class="description">Name of attribute</dd>
2589 <dt>value</dt>
2590 <dd class="description">Value</dd>
2591 </dl>
2592 <h4 class="returnvalue">Return Value</h4>
2593 <p class="description">New attribute</p>
2594 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="ippAddCollections">ippAddCollections</a></h3>
2595 <p class="description">Add an array of collection values.</p>
2596 <p class="code">
2597 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddCollections (<br>
2598 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
2599 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
2600 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2601 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
2602 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#ipp_t">ipp_t</a> **values<br>
2603 );</p>
2604 <h4 class="parameters">Parameters</h4>
2605 <dl>
2606 <dt>ipp</dt>
2607 <dd class="description">IPP message</dd>
2608 <dt>group</dt>
2609 <dd class="description">IPP group</dd>
2610 <dt>name</dt>
2611 <dd class="description">Name of attribute</dd>
2612 <dt>num_values</dt>
2613 <dd class="description">Number of values</dd>
2614 <dt>values</dt>
2615 <dd class="description">Values</dd>
2616 </dl>
2617 <h4 class="returnvalue">Return Value</h4>
2618 <p class="description">New attribute</p>
2619 <h3 class="function"><a name="ippAddDate">ippAddDate</a></h3>
2620 <p class="description">Add a date attribute to an IPP message.</p>
2621 <p class="code">
2622 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddDate (<br>
2623 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
2624 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
2625 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2626 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#ipp_uchar_t">ipp_uchar_t</a> *value<br>
2627 );</p>
2628 <h4 class="parameters">Parameters</h4>
2629 <dl>
2630 <dt>ipp</dt>
2631 <dd class="description">IPP message</dd>
2632 <dt>group</dt>
2633 <dd class="description">IPP group</dd>
2634 <dt>name</dt>
2635 <dd class="description">Name of attribute</dd>
2636 <dt>value</dt>
2637 <dd class="description">Value</dd>
2638 </dl>
2639 <h4 class="returnvalue">Return Value</h4>
2640 <p class="description">New attribute</p>
2641 <h3 class="function"><a name="ippAddInteger">ippAddInteger</a></h3>
2642 <p class="description">Add a integer attribute to an IPP message.</p>
2643 <p class="code">
2644 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddInteger (<br>
2645 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
2646 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
2647 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> type,<br>
2648 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2649 &nbsp;&nbsp;&nbsp;&nbsp;int value<br>
2650 );</p>
2651 <h4 class="parameters">Parameters</h4>
2652 <dl>
2653 <dt>ipp</dt>
2654 <dd class="description">IPP message</dd>
2655 <dt>group</dt>
2656 <dd class="description">IPP group</dd>
2657 <dt>type</dt>
2658 <dd class="description">Type of attribute</dd>
2659 <dt>name</dt>
2660 <dd class="description">Name of attribute</dd>
2661 <dt>value</dt>
2662 <dd class="description">Value of attribute</dd>
2663 </dl>
2664 <h4 class="returnvalue">Return Value</h4>
2665 <p class="description">New attribute</p>
2666 <h3 class="function"><a name="ippAddIntegers">ippAddIntegers</a></h3>
2667 <p class="description">Add an array of integer values.</p>
2668 <p class="code">
2669 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddIntegers (<br>
2670 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
2671 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
2672 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> type,<br>
2673 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2674 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
2675 &nbsp;&nbsp;&nbsp;&nbsp;const int *values<br>
2676 );</p>
2677 <h4 class="parameters">Parameters</h4>
2678 <dl>
2679 <dt>ipp</dt>
2680 <dd class="description">IPP message</dd>
2681 <dt>group</dt>
2682 <dd class="description">IPP group</dd>
2683 <dt>type</dt>
2684 <dd class="description">Type of attribute</dd>
2685 <dt>name</dt>
2686 <dd class="description">Name of attribute</dd>
2687 <dt>num_values</dt>
2688 <dd class="description">Number of values</dd>
2689 <dt>values</dt>
2690 <dd class="description">Values</dd>
2691 </dl>
2692 <h4 class="returnvalue">Return Value</h4>
2693 <p class="description">New attribute</p>
2694 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ippAddOctetString">ippAddOctetString</a></h3>
2695 <p class="description">Add an octetString value to an IPP message.</p>
2696 <p class="code">
2697 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddOctetString (<br>
2698 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
2699 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
2700 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2701 &nbsp;&nbsp;&nbsp;&nbsp;const void *data,<br>
2702 &nbsp;&nbsp;&nbsp;&nbsp;int datalen<br>
2703 );</p>
2704 <h4 class="parameters">Parameters</h4>
2705 <dl>
2706 <dt>ipp</dt>
2707 <dd class="description">IPP message</dd>
2708 <dt>group</dt>
2709 <dd class="description">IPP group</dd>
2710 <dt>name</dt>
2711 <dd class="description">Name of attribute</dd>
2712 <dt>data</dt>
2713 <dd class="description">octetString data</dd>
2714 <dt>datalen</dt>
2715 <dd class="description">Length of data in bytes</dd>
2716 </dl>
2717 <h4 class="returnvalue">Return Value</h4>
2718 <p class="description">New attribute</p>
2719 <h3 class="function"><a name="ippAddRange">ippAddRange</a></h3>
2720 <p class="description">Add a range of values to an IPP message.</p>
2721 <p class="code">
2722 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddRange (<br>
2723 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
2724 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
2725 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2726 &nbsp;&nbsp;&nbsp;&nbsp;int lower,<br>
2727 &nbsp;&nbsp;&nbsp;&nbsp;int upper<br>
2728 );</p>
2729 <h4 class="parameters">Parameters</h4>
2730 <dl>
2731 <dt>ipp</dt>
2732 <dd class="description">IPP message</dd>
2733 <dt>group</dt>
2734 <dd class="description">IPP group</dd>
2735 <dt>name</dt>
2736 <dd class="description">Name of attribute</dd>
2737 <dt>lower</dt>
2738 <dd class="description">Lower value</dd>
2739 <dt>upper</dt>
2740 <dd class="description">Upper value</dd>
2741 </dl>
2742 <h4 class="returnvalue">Return Value</h4>
2743 <p class="description">New attribute</p>
2744 <h3 class="function"><a name="ippAddRanges">ippAddRanges</a></h3>
2745 <p class="description">Add ranges of values to an IPP message.</p>
2746 <p class="code">
2747 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddRanges (<br>
2748 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
2749 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
2750 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2751 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
2752 &nbsp;&nbsp;&nbsp;&nbsp;const int *lower,<br>
2753 &nbsp;&nbsp;&nbsp;&nbsp;const int *upper<br>
2754 );</p>
2755 <h4 class="parameters">Parameters</h4>
2756 <dl>
2757 <dt>ipp</dt>
2758 <dd class="description">IPP message</dd>
2759 <dt>group</dt>
2760 <dd class="description">IPP group</dd>
2761 <dt>name</dt>
2762 <dd class="description">Name of attribute</dd>
2763 <dt>num_values</dt>
2764 <dd class="description">Number of values</dd>
2765 <dt>lower</dt>
2766 <dd class="description">Lower values</dd>
2767 <dt>upper</dt>
2768 <dd class="description">Upper values</dd>
2769 </dl>
2770 <h4 class="returnvalue">Return Value</h4>
2771 <p class="description">New attribute</p>
2772 <h3 class="function"><a name="ippAddResolution">ippAddResolution</a></h3>
2773 <p class="description">Add a resolution value to an IPP message.</p>
2774 <p class="code">
2775 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddResolution (<br>
2776 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
2777 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
2778 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2779 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_res_t">ipp_res_t</a> units,<br>
2780 &nbsp;&nbsp;&nbsp;&nbsp;int xres,<br>
2781 &nbsp;&nbsp;&nbsp;&nbsp;int yres<br>
2782 );</p>
2783 <h4 class="parameters">Parameters</h4>
2784 <dl>
2785 <dt>ipp</dt>
2786 <dd class="description">IPP message</dd>
2787 <dt>group</dt>
2788 <dd class="description">IPP group</dd>
2789 <dt>name</dt>
2790 <dd class="description">Name of attribute</dd>
2791 <dt>units</dt>
2792 <dd class="description">Units for resolution</dd>
2793 <dt>xres</dt>
2794 <dd class="description">X resolution</dd>
2795 <dt>yres</dt>
2796 <dd class="description">Y resolution</dd>
2797 </dl>
2798 <h4 class="returnvalue">Return Value</h4>
2799 <p class="description">New attribute</p>
2800 <h3 class="function"><a name="ippAddResolutions">ippAddResolutions</a></h3>
2801 <p class="description">Add resolution values to an IPP message.</p>
2802 <p class="code">
2803 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddResolutions (<br>
2804 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
2805 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
2806 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2807 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
2808 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_res_t">ipp_res_t</a> units,<br>
2809 &nbsp;&nbsp;&nbsp;&nbsp;const int *xres,<br>
2810 &nbsp;&nbsp;&nbsp;&nbsp;const int *yres<br>
2811 );</p>
2812 <h4 class="parameters">Parameters</h4>
2813 <dl>
2814 <dt>ipp</dt>
2815 <dd class="description">IPP message</dd>
2816 <dt>group</dt>
2817 <dd class="description">IPP group</dd>
2818 <dt>name</dt>
2819 <dd class="description">Name of attribute</dd>
2820 <dt>num_values</dt>
2821 <dd class="description">Number of values</dd>
2822 <dt>units</dt>
2823 <dd class="description">Units for resolution</dd>
2824 <dt>xres</dt>
2825 <dd class="description">X resolutions</dd>
2826 <dt>yres</dt>
2827 <dd class="description">Y resolutions</dd>
2828 </dl>
2829 <h4 class="returnvalue">Return Value</h4>
2830 <p class="description">New attribute</p>
2831 <h3 class="function"><a name="ippAddSeparator">ippAddSeparator</a></h3>
2832 <p class="description">Add a group separator to an IPP message.</p>
2833 <p class="code">
2834 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddSeparator (<br>
2835 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
2836 );</p>
2837 <h4 class="parameters">Parameters</h4>
2838 <dl>
2839 <dt>ipp</dt>
2840 <dd class="description">IPP message</dd>
2841 </dl>
2842 <h4 class="returnvalue">Return Value</h4>
2843 <p class="description">New attribute</p>
2844 <h3 class="function"><a name="ippAddString">ippAddString</a></h3>
2845 <p class="description">Add a language-encoded string to an IPP message.</p>
2846 <p class="code">
2847 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddString (<br>
2848 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
2849 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
2850 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> type,<br>
2851 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2852 &nbsp;&nbsp;&nbsp;&nbsp;const char *charset,<br>
2853 &nbsp;&nbsp;&nbsp;&nbsp;const char *value<br>
2854 );</p>
2855 <h4 class="parameters">Parameters</h4>
2856 <dl>
2857 <dt>ipp</dt>
2858 <dd class="description">IPP message</dd>
2859 <dt>group</dt>
2860 <dd class="description">IPP group</dd>
2861 <dt>type</dt>
2862 <dd class="description">Type of attribute</dd>
2863 <dt>name</dt>
2864 <dd class="description">Name of attribute</dd>
2865 <dt>charset</dt>
2866 <dd class="description">Character set</dd>
2867 <dt>value</dt>
2868 <dd class="description">Value</dd>
2869 </dl>
2870 <h4 class="returnvalue">Return Value</h4>
2871 <p class="description">New attribute</p>
2872 <h3 class="function"><a name="ippAddStrings">ippAddStrings</a></h3>
2873 <p class="description">Add language-encoded strings to an IPP message.</p>
2874 <p class="code">
2875 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippAddStrings (<br>
2876 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
2877 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group,<br>
2878 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> type,<br>
2879 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2880 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
2881 &nbsp;&nbsp;&nbsp;&nbsp;const char *charset,<br>
2882 &nbsp;&nbsp;&nbsp;&nbsp;const char *const *values<br>
2883 );</p>
2884 <h4 class="parameters">Parameters</h4>
2885 <dl>
2886 <dt>ipp</dt>
2887 <dd class="description">IPP message</dd>
2888 <dt>group</dt>
2889 <dd class="description">IPP group</dd>
2890 <dt>type</dt>
2891 <dd class="description">Type of attribute</dd>
2892 <dt>name</dt>
2893 <dd class="description">Name of attribute</dd>
2894 <dt>num_values</dt>
2895 <dd class="description">Number of values</dd>
2896 <dt>charset</dt>
2897 <dd class="description">Character set</dd>
2898 <dt>values</dt>
2899 <dd class="description">Values</dd>
2900 </dl>
2901 <h4 class="returnvalue">Return Value</h4>
2902 <p class="description">New attribute</p>
2903 <h3 class="function"><a name="ippDateToTime">ippDateToTime</a></h3>
2904 <p class="description">Convert from RFC 1903 Date/Time format to UNIX time
2905 in seconds.</p>
2906 <p class="code">
2907 time_t ippDateToTime (<br>
2908 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#ipp_uchar_t">ipp_uchar_t</a> *date<br>
2909 );</p>
2910 <h4 class="parameters">Parameters</h4>
2911 <dl>
2912 <dt>date</dt>
2913 <dd class="description">RFC 1903 date info</dd>
2914 </dl>
2915 <h4 class="returnvalue">Return Value</h4>
2916 <p class="description">UNIX time value</p>
2917 <h3 class="function"><a name="ippDelete">ippDelete</a></h3>
2918 <p class="description">Delete an IPP message.</p>
2919 <p class="code">
2920 void ippDelete (<br>
2921 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
2922 );</p>
2923 <h4 class="parameters">Parameters</h4>
2924 <dl>
2925 <dt>ipp</dt>
2926 <dd class="description">IPP message</dd>
2927 </dl>
2928 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="ippDeleteAttribute">ippDeleteAttribute</a></h3>
2929 <p class="description">Delete a single attribute in an IPP message.</p>
2930 <p class="code">
2931 void ippDeleteAttribute (<br>
2932 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
2933 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attr<br>
2934 );</p>
2935 <h4 class="parameters">Parameters</h4>
2936 <dl>
2937 <dt>ipp</dt>
2938 <dd class="description">IPP message</dd>
2939 <dt>attr</dt>
2940 <dd class="description">Attribute to delete</dd>
2941 </dl>
2942 <h3 class="function"><a name="ippErrorString">ippErrorString</a></h3>
2943 <p class="description">Return a name for the given status code.</p>
2944 <p class="code">
2945 const char *ippErrorString (<br>
2946 &nbsp;&nbsp;&nbsp;&nbsp;ipp_status_t error<br>
2947 );</p>
2948 <h4 class="parameters">Parameters</h4>
2949 <dl>
2950 <dt>error</dt>
2951 <dd class="description">Error status</dd>
2952 </dl>
2953 <h4 class="returnvalue">Return Value</h4>
2954 <p class="description">Text string</p>
2955 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ippErrorValue">ippErrorValue</a></h3>
2956 <p class="description">Return a status code for the given name.</p>
2957 <p class="code">
2958 ipp_status_t ippErrorValue (<br>
2959 &nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
2960 );</p>
2961 <h4 class="parameters">Parameters</h4>
2962 <dl>
2963 <dt>name</dt>
2964 <dd class="description">Name</dd>
2965 </dl>
2966 <h4 class="returnvalue">Return Value</h4>
2967 <p class="description">IPP status code</p>
2968 <h3 class="function"><a name="ippFindAttribute">ippFindAttribute</a></h3>
2969 <p class="description">Find a named attribute in a request...</p>
2970 <p class="code">
2971 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFindAttribute (<br>
2972 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
2973 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2974 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> type<br>
2975 );</p>
2976 <h4 class="parameters">Parameters</h4>
2977 <dl>
2978 <dt>ipp</dt>
2979 <dd class="description">IPP message</dd>
2980 <dt>name</dt>
2981 <dd class="description">Name of attribute</dd>
2982 <dt>type</dt>
2983 <dd class="description">Type of attribute</dd>
2984 </dl>
2985 <h4 class="returnvalue">Return Value</h4>
2986 <p class="description">Matching attribute</p>
2987 <h3 class="function"><a name="ippFindNextAttribute">ippFindNextAttribute</a></h3>
2988 <p class="description">Find the next named attribute in a request...</p>
2989 <p class="code">
2990 <a href="#ipp_attribute_t">ipp_attribute_t</a> *ippFindNextAttribute (<br>
2991 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp,<br>
2992 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
2993 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> type<br>
2994 );</p>
2995 <h4 class="parameters">Parameters</h4>
2996 <dl>
2997 <dt>ipp</dt>
2998 <dd class="description">IPP message</dd>
2999 <dt>name</dt>
3000 <dd class="description">Name of attribute</dd>
3001 <dt>type</dt>
3002 <dd class="description">Type of attribute</dd>
3003 </dl>
3004 <h4 class="returnvalue">Return Value</h4>
3005 <p class="description">Matching attribute</p>
3006 <h3 class="function"><a name="ippLength">ippLength</a></h3>
3007 <p class="description">Compute the length of an IPP message.</p>
3008 <p class="code">
3009 size_t ippLength (<br>
3010 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
3011 );</p>
3012 <h4 class="parameters">Parameters</h4>
3013 <dl>
3014 <dt>ipp</dt>
3015 <dd class="description">IPP message</dd>
3016 </dl>
3017 <h4 class="returnvalue">Return Value</h4>
3018 <p class="description">Size of IPP message</p>
3019 <h3 class="function"><a name="ippNew">ippNew</a></h3>
3020 <p class="description">Allocate a new IPP message.</p>
3021 <p class="code">
3022 <a href="#ipp_t">ipp_t</a> *ippNew (void);</p>
3023 <h4 class="returnvalue">Return Value</h4>
3024 <p class="description">New IPP message</p>
3025 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ippNewRequest">ippNewRequest</a></h3>
3026 <p class="description">Allocate a new IPP request message.</p>
3027 <p class="code">
3028 <a href="#ipp_t">ipp_t</a> *ippNewRequest (<br>
3029 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_op_t">ipp_op_t</a> op<br>
3030 );</p>
3031 <h4 class="parameters">Parameters</h4>
3032 <dl>
3033 <dt>op</dt>
3034 <dd class="description">Operation code</dd>
3035 </dl>
3036 <h4 class="returnvalue">Return Value</h4>
3037 <p class="description">IPP request message</p>
3038 <h4 class="discussion">Discussion</h4>
3039 <p class="discussion">The new request message is initialized with the attributes-charset and
3040 attributes-natural-language attributes added. The
3041 attributes-natural-language value is derived from the current locale.
3042
3043 </p>
3044 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ippOpString">ippOpString</a></h3>
3045 <p class="description">Return a name for the given operation id.</p>
3046 <p class="code">
3047 const char *ippOpString (<br>
3048 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_op_t">ipp_op_t</a> op<br>
3049 );</p>
3050 <h4 class="parameters">Parameters</h4>
3051 <dl>
3052 <dt>op</dt>
3053 <dd class="description">Operation ID</dd>
3054 </dl>
3055 <h4 class="returnvalue">Return Value</h4>
3056 <p class="description">Name</p>
3057 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ippOpValue">ippOpValue</a></h3>
3058 <p class="description">Return an operation id for the given name.</p>
3059 <p class="code">
3060 <a href="#ipp_op_t">ipp_op_t</a> ippOpValue (<br>
3061 &nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
3062 );</p>
3063 <h4 class="parameters">Parameters</h4>
3064 <dl>
3065 <dt>name</dt>
3066 <dd class="description">Textual name</dd>
3067 </dl>
3068 <h4 class="returnvalue">Return Value</h4>
3069 <p class="description">Operation ID</p>
3070 <h3 class="function"><a name="ippPort">ippPort</a></h3>
3071 <p class="description">Return the default IPP port number.</p>
3072 <p class="code">
3073 int ippPort (void);</p>
3074 <h4 class="returnvalue">Return Value</h4>
3075 <p class="description">Port number</p>
3076 <h3 class="function"><a name="ippRead">ippRead</a></h3>
3077 <p class="description">Read data for an IPP message from a HTTP connection.</p>
3078 <p class="code">
3079 <a href="#ipp_state_t">ipp_state_t</a> ippRead (<br>
3080 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
3081 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
3082 );</p>
3083 <h4 class="parameters">Parameters</h4>
3084 <dl>
3085 <dt>http</dt>
3086 <dd class="description">HTTP connection</dd>
3087 <dt>ipp</dt>
3088 <dd class="description">IPP data</dd>
3089 </dl>
3090 <h4 class="returnvalue">Return Value</h4>
3091 <p class="description">Current state</p>
3092 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="ippReadFile">ippReadFile</a></h3>
3093 <p class="description">Read data for an IPP message from a file.</p>
3094 <p class="code">
3095 <a href="#ipp_state_t">ipp_state_t</a> ippReadFile (<br>
3096 &nbsp;&nbsp;&nbsp;&nbsp;int fd,<br>
3097 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
3098 );</p>
3099 <h4 class="parameters">Parameters</h4>
3100 <dl>
3101 <dt>fd</dt>
3102 <dd class="description">HTTP data</dd>
3103 <dt>ipp</dt>
3104 <dd class="description">IPP data</dd>
3105 </dl>
3106 <h4 class="returnvalue">Return Value</h4>
3107 <p class="description">Current state</p>
3108 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ippReadIO">ippReadIO</a></h3>
3109 <p class="description">Read data for an IPP message.</p>
3110 <p class="code">
3111 <a href="#ipp_state_t">ipp_state_t</a> ippReadIO (<br>
3112 &nbsp;&nbsp;&nbsp;&nbsp;void *src,<br>
3113 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_iocb_t">ipp_iocb_t</a> cb,<br>
3114 &nbsp;&nbsp;&nbsp;&nbsp;int blocking,<br>
3115 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *parent,<br>
3116 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
3117 );</p>
3118 <h4 class="parameters">Parameters</h4>
3119 <dl>
3120 <dt>src</dt>
3121 <dd class="description">Data source</dd>
3122 <dt>cb</dt>
3123 <dd class="description">Read callback function</dd>
3124 <dt>blocking</dt>
3125 <dd class="description">Use blocking IO?</dd>
3126 <dt>parent</dt>
3127 <dd class="description">Parent request, if any</dd>
3128 <dt>ipp</dt>
3129 <dd class="description">IPP data</dd>
3130 </dl>
3131 <h4 class="returnvalue">Return Value</h4>
3132 <p class="description">Current state</p>
3133 <h3 class="function"><a name="ippSetPort">ippSetPort</a></h3>
3134 <p class="description">Set the default port number.</p>
3135 <p class="code">
3136 void ippSetPort (<br>
3137 &nbsp;&nbsp;&nbsp;&nbsp;int p<br>
3138 );</p>
3139 <h4 class="parameters">Parameters</h4>
3140 <dl>
3141 <dt>p</dt>
3142 <dd class="description">Port number to use</dd>
3143 </dl>
3144 <h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="ippTagString">ippTagString</a></h3>
3145 <p class="description">Return the tag name corresponding to a tag value.</p>
3146 <p class="code">
3147 const char *ippTagString (<br>
3148 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> tag<br>
3149 );</p>
3150 <h4 class="parameters">Parameters</h4>
3151 <dl>
3152 <dt>tag</dt>
3153 <dd class="description">Tag value</dd>
3154 </dl>
3155 <h4 class="returnvalue">Return Value</h4>
3156 <p class="description">Tag name</p>
3157 <h4 class="discussion">Discussion</h4>
3158 <p class="discussion">The returned names are defined in RFC 2911 and 3382.
3159
3160 </p>
3161 <h3 class="function"><span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span><a name="ippTagValue">ippTagValue</a></h3>
3162 <p class="description">Return the tag value corresponding to a tag name.</p>
3163 <p class="code">
3164 <a href="#ipp_tag_t">ipp_tag_t</a> ippTagValue (<br>
3165 &nbsp;&nbsp;&nbsp;&nbsp;const char *name<br>
3166 );</p>
3167 <h4 class="parameters">Parameters</h4>
3168 <dl>
3169 <dt>name</dt>
3170 <dd class="description">Tag name</dd>
3171 </dl>
3172 <h4 class="returnvalue">Return Value</h4>
3173 <p class="description">Tag value</p>
3174 <h4 class="discussion">Discussion</h4>
3175 <p class="discussion">The tag names are defined in RFC 2911 and 3382.
3176
3177 </p>
3178 <h3 class="function"><a name="ippTimeToDate">ippTimeToDate</a></h3>
3179 <p class="description">Convert from UNIX time to RFC 1903 format.</p>
3180 <p class="code">
3181 const <a href="#ipp_uchar_t">ipp_uchar_t</a> *ippTimeToDate (<br>
3182 &nbsp;&nbsp;&nbsp;&nbsp;time_t t<br>
3183 );</p>
3184 <h4 class="parameters">Parameters</h4>
3185 <dl>
3186 <dt>t</dt>
3187 <dd class="description">UNIX time value</dd>
3188 </dl>
3189 <h4 class="returnvalue">Return Value</h4>
3190 <p class="description">RFC-1903 date/time data</p>
3191 <h3 class="function"><a name="ippWrite">ippWrite</a></h3>
3192 <p class="description">Write data for an IPP message to a HTTP connection.</p>
3193 <p class="code">
3194 <a href="#ipp_state_t">ipp_state_t</a> ippWrite (<br>
3195 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_t">http_t</a> *http,<br>
3196 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
3197 );</p>
3198 <h4 class="parameters">Parameters</h4>
3199 <dl>
3200 <dt>http</dt>
3201 <dd class="description">HTTP connection</dd>
3202 <dt>ipp</dt>
3203 <dd class="description">IPP data</dd>
3204 </dl>
3205 <h4 class="returnvalue">Return Value</h4>
3206 <p class="description">Current state</p>
3207 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span><a name="ippWriteFile">ippWriteFile</a></h3>
3208 <p class="description">Write data for an IPP message to a file.</p>
3209 <p class="code">
3210 <a href="#ipp_state_t">ipp_state_t</a> ippWriteFile (<br>
3211 &nbsp;&nbsp;&nbsp;&nbsp;int fd,<br>
3212 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
3213 );</p>
3214 <h4 class="parameters">Parameters</h4>
3215 <dl>
3216 <dt>fd</dt>
3217 <dd class="description">HTTP data</dd>
3218 <dt>ipp</dt>
3219 <dd class="description">IPP data</dd>
3220 </dl>
3221 <h4 class="returnvalue">Return Value</h4>
3222 <p class="description">Current state</p>
3223 <h3 class="function"><span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span><a name="ippWriteIO">ippWriteIO</a></h3>
3224 <p class="description">Write data for an IPP message.</p>
3225 <p class="code">
3226 <a href="#ipp_state_t">ipp_state_t</a> ippWriteIO (<br>
3227 &nbsp;&nbsp;&nbsp;&nbsp;void *dst,<br>
3228 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_iocb_t">ipp_iocb_t</a> cb,<br>
3229 &nbsp;&nbsp;&nbsp;&nbsp;int blocking,<br>
3230 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *parent,<br>
3231 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *ipp<br>
3232 );</p>
3233 <h4 class="parameters">Parameters</h4>
3234 <dl>
3235 <dt>dst</dt>
3236 <dd class="description">Destination</dd>
3237 <dt>cb</dt>
3238 <dd class="description">Write callback function</dd>
3239 <dt>blocking</dt>
3240 <dd class="description">Use blocking IO?</dd>
3241 <dt>parent</dt>
3242 <dd class="description">Parent IPP message</dd>
3243 <dt>ipp</dt>
3244 <dd class="description">IPP data</dd>
3245 </dl>
3246 <h4 class="returnvalue">Return Value</h4>
3247 <p class="description">Current state</p>
3248 <h2 class="title"><a name="TYPES">Data Types</a></h2>
3249 <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>
3250 <p class="description">Socket address union, which
3251 makes using IPv6 and other
3252 address types easier and
3253 more portable. </p>
3254 <p class="code">
3255 typedef union _http_addr_u / http_addr_t;
3256 </p>
3257 <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>
3258 <p class="description">Socket address list, which is
3259 used to enumerate all of the
3260 addresses that are associated
3261 with a hostname. </p>
3262 <p class="code">
3263 typedef struct <a href="#http_addrlist_s">http_addrlist_s</a> / http_addrlist_t;
3264 </p>
3265 <h3 class="typedef"><a name="http_auth_t">http_auth_t</a></h3>
3266 <p class="description">HTTP authentication types</p>
3267 <p class="code">
3268 typedef enum <a href="#http_auth_e">http_auth_e</a> http_auth_t;
3269 </p>
3270 <h3 class="typedef"><a name="http_encoding_t">http_encoding_t</a></h3>
3271 <p class="description">HTTP transfer encoding values</p>
3272 <p class="code">
3273 typedef enum <a href="#http_encoding_e">http_encoding_e</a> http_encoding_t;
3274 </p>
3275 <h3 class="typedef"><a name="http_encryption_t">http_encryption_t</a></h3>
3276 <p class="description">HTTP encryption values</p>
3277 <p class="code">
3278 typedef enum <a href="#http_encryption_e">http_encryption_e</a> http_encryption_t;
3279 </p>
3280 <h3 class="typedef"><a name="http_field_t">http_field_t</a></h3>
3281 <p class="description">HTTP field names</p>
3282 <p class="code">
3283 typedef enum <a href="#http_field_e">http_field_e</a> http_field_t;
3284 </p>
3285 <h3 class="typedef"><a name="http_keepalive_t">http_keepalive_t</a></h3>
3286 <p class="description">HTTP keep-alive values</p>
3287 <p class="code">
3288 typedef enum <a href="#http_keepalive_e">http_keepalive_e</a> http_keepalive_t;
3289 </p>
3290 <h3 class="typedef"><a name="http_state_t">http_state_t</a></h3>
3291 <p class="description">HTTP state values; states
3292 are server-oriented...</p>
3293 <p class="code">
3294 typedef enum <a href="#http_state_e">http_state_e</a> / http_state_t;
3295 </p>
3296 <h3 class="typedef"><a name="http_status_t">http_status_t</a></h3>
3297 <p class="description">HTTP status codes</p>
3298 <p class="code">
3299 typedef enum <a href="#http_status_e">http_status_e</a> http_status_t;
3300 </p>
3301 <h3 class="typedef"><a name="http_t">http_t</a></h3>
3302 <p class="description">HTTP connection type</p>
3303 <p class="code">
3304 typedef struct _http_s http_t;
3305 </p>
3306 <h3 class="typedef"><a name="http_uri_coding_t">http_uri_coding_t</a></h3>
3307 <p class="description">URI en/decode flags</p>
3308 <p class="code">
3309 typedef enum <a href="#http_uri_coding_e">http_uri_coding_e</a> http_uri_coding_t;
3310 </p>
3311 <h3 class="typedef"><span class="info">&nbsp;CUPS1.2&nbsp;</span><a name="http_uri_status_t">http_uri_status_t</a></h3>
3312 <p class="description">URI separation status </p>
3313 <p class="code">
3314 typedef enum <a href="#http_uri_status_e">http_uri_status_e</a> http_uri_status_t;
3315 </p>
3316 <h3 class="typedef"><a name="http_version_t">http_version_t</a></h3>
3317 <p class="description">HTTP version numbers</p>
3318 <p class="code">
3319 typedef enum <a href="#http_version_e">http_version_e</a> http_version_t;
3320 </p>
3321 <h3 class="typedef"><a name="ipp_attribute_t">ipp_attribute_t</a></h3>
3322 <p class="description">Attribute</p>
3323 <p class="code">
3324 typedef struct <a href="#ipp_attribute_s">ipp_attribute_s</a> ipp_attribute_t;
3325 </p>
3326 <h3 class="typedef"><a name="ipp_finish_t">ipp_finish_t</a></h3>
3327 <p class="description">Finishings</p>
3328 <p class="code">
3329 typedef enum <a href="#ipp_finish_e">ipp_finish_e</a> ipp_finish_t;
3330 </p>
3331 <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>
3332 <p class="description">IPP IO Callback Function </p>
3333 <p class="code">
3334 typedef ssize_t (*ipp_iocb_t)(void *, <a href="#ipp_uchar_t">ipp_uchar_t</a> *, size_t);
3335 </p>
3336 <h3 class="typedef"><a name="ipp_jstate_t">ipp_jstate_t</a></h3>
3337 <p class="description">Job states</p>
3338 <p class="code">
3339 typedef enum <a href="#ipp_jstate_e">ipp_jstate_e</a> ipp_jstate_t;
3340 </p>
3341 <h3 class="typedef"><a name="ipp_op_t">ipp_op_t</a></h3>
3342 <p class="description">IPP operations</p>
3343 <p class="code">
3344 typedef enum <a href="#ipp_op_e">ipp_op_e</a> ipp_op_t;
3345 </p>
3346 <h3 class="typedef"><a name="ipp_orient_t">ipp_orient_t</a></h3>
3347 <p class="description">Orientation values</p>
3348 <p class="code">
3349 typedef enum <a href="#ipp_orient_e">ipp_orient_e</a> ipp_orient_t;
3350 </p>
3351 <h3 class="typedef"><a name="ipp_pstate_t">ipp_pstate_t</a></h3>
3352 <p class="description">Printer states</p>
3353 <p class="code">
3354 typedef enum <a href="#ipp_pstate_e">ipp_pstate_e</a> ipp_pstate_t;
3355 </p>
3356 <h3 class="typedef"><a name="ipp_quality_t">ipp_quality_t</a></h3>
3357 <p class="description">Qualities</p>
3358 <p class="code">
3359 typedef enum <a href="#ipp_quality_e">ipp_quality_e</a> ipp_quality_t;
3360 </p>
3361 <h3 class="typedef"><a name="ipp_request_t">ipp_request_t</a></h3>
3362 <p class="description">Request Header</p>
3363 <p class="code">
3364 typedef union <a href="#ipp_request_u">ipp_request_u</a> ipp_request_t;
3365 </p>
3366 <h3 class="typedef"><a name="ipp_res_t">ipp_res_t</a></h3>
3367 <p class="description">Resolution units</p>
3368 <p class="code">
3369 typedef enum <a href="#ipp_res_e">ipp_res_e</a> ipp_res_t;
3370 </p>
3371 <h3 class="typedef"><a name="ipp_state_t">ipp_state_t</a></h3>
3372 <p class="description">IPP states</p>
3373 <p class="code">
3374 typedef enum <a href="#ipp_state_e">ipp_state_e</a> ipp_state_t;
3375 </p>
3376 <h3 class="typedef"><a name="ipp_t">ipp_t</a></h3>
3377 <p class="description">Attribute Value</p>
3378 <p class="code">
3379 typedef struct <a href="#ipp_s">ipp_s</a> ipp_t;
3380 </p>
3381 <h3 class="typedef"><a name="ipp_uchar_t">ipp_uchar_t</a></h3>
3382 <p class="description">IPP status codes</p>
3383 <p class="code">
3384 typedef typedef unsigned char ipp_uchar_t;
3385 </p>
3386 <h3 class="typedef"><a name="ipp_tag_t">ipp_tag_t</a></h3>
3387 <p class="description">Format tags for attributes</p>
3388 <p class="code">
3389 typedef enum <a href="#ipp_tag_e">ipp_tag_e</a> ipp_tag_t;
3390 </p>
3391 <h3 class="typedef"><a name="ipp_value_t">ipp_value_t</a></h3>
3392 <p class="description">Attribute Value</p>
3393 <p class="code">
3394 typedef union <a href="#ipp_value_u">ipp_value_u</a> ipp_value_t;
3395 </p>
3396 <h2 class="title"><a name="STRUCTURES">Structures</a></h2>
3397 <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>
3398 <p class="description">Socket address list, which is
3399 used to enumerate all of the
3400 addresses that are associated
3401 with a hostname. </p>
3402 <p class="code">struct http_addrlist_s {<br>
3403 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#http_addr_t">http_addr_t</a> addr;<br>
3404 &nbsp;&nbsp;&nbsp;&nbsp;struct <a href="#http_addrlist_s">http_addrlist_s</a> *next;<br>
3405 };</p>
3406 <h4 class="members">Members</h4>
3407 <dl>
3408 <dt>addr </dt>
3409 <dd class="description">Address</dd>
3410 <dt>next </dt>
3411 <dd class="description">Pointer to next address in list</dd>
3412 </dl>
3413 <h3 class="struct"><a name="ipp_attribute_s">ipp_attribute_s</a></h3>
3414 <p class="description">Attribute</p>
3415 <p class="code">struct ipp_attribute_s {<br>
3416 &nbsp;&nbsp;&nbsp;&nbsp;char *name;<br>
3417 &nbsp;&nbsp;&nbsp;&nbsp;struct <a href="#ipp_attribute_s">ipp_attribute_s</a> *next;<br>
3418 &nbsp;&nbsp;&nbsp;&nbsp;int num_values;<br>
3419 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> group_tag, value_tag;<br>
3420 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_value_t">ipp_value_t</a> values[1];<br>
3421 };</p>
3422 <h4 class="members">Members</h4>
3423 <dl>
3424 <dt>name </dt>
3425 <dd class="description">Name of attribute</dd>
3426 <dt>next </dt>
3427 <dd class="description">Next attribute in list</dd>
3428 <dt>num_values </dt>
3429 <dd class="description">Number of values</dd>
3430 <dt>value_tag </dt>
3431 <dd class="description">What type of value is it?</dd>
3432 <dt>values[1] </dt>
3433 <dd class="description">Values</dd>
3434 </dl>
3435 <h3 class="struct"><a name="ipp_s">ipp_s</a></h3>
3436 <p class="description">IPP Request/Response/Notification</p>
3437 <p class="code">struct ipp_s {<br>
3438 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *attrs;<br>
3439 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *current;<br>
3440 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_tag_t">ipp_tag_t</a> curtag;<br>
3441 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *last;<br>
3442 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_attribute_t">ipp_attribute_t</a> *prev;<br>
3443 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_request_t">ipp_request_t</a> request;<br>
3444 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_state_t">ipp_state_t</a> state;<br>
3445 &nbsp;&nbsp;&nbsp;&nbsp;int use;<br>
3446 };</p>
3447 <h4 class="members">Members</h4>
3448 <dl>
3449 <dt>attrs </dt>
3450 <dd class="description">Attributes</dd>
3451 <dt>current </dt>
3452 <dd class="description">Current attribute (for read/write)</dd>
3453 <dt>curtag </dt>
3454 <dd class="description">Current attribute group tag</dd>
3455 <dt>last </dt>
3456 <dd class="description">Last attribute in list</dd>
3457 <dt>prev <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
3458 <dd class="description">Previous attribute (for read) </dd>
3459 <dt>request </dt>
3460 <dd class="description">Request header</dd>
3461 <dt>state </dt>
3462 <dd class="description">State of request</dd>
3463 <dt>use </dt>
3464 <dd class="description">Use count</dd>
3465 </dl>
3466 <h2 class="title"><a name="UNIONS">Unions</a></h2>
3467 <h3 class="union"><a name="ipp_request_u">ipp_request_u</a></h3>
3468 <p class="description">Request Header</p>
3469 <p class="code">union ipp_request_u {<br>
3470 };</p>
3471 <h4 class="members">Members</h4>
3472 <dl>
3473 </dl>
3474 <h3 class="union"><a name="ipp_value_u">ipp_value_u</a></h3>
3475 <p class="description">Attribute Value</p>
3476 <p class="code">union ipp_value_u {<br>
3477 &nbsp;&nbsp;&nbsp;&nbsp;char boolean;<br>
3478 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_t">ipp_t</a> *collection;<br>
3479 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#ipp_uchar_t">ipp_uchar_t</a> date[11];<br>
3480 &nbsp;&nbsp;&nbsp;&nbsp;int integer;<br>
3481 };</p>
3482 <h4 class="members">Members</h4>
3483 <dl>
3484 <dt>boolean </dt>
3485 <dd class="description">Boolean value</dd>
3486 <dt>collection <span class="info">&nbsp;CUPS 1.1.19/Mac OS X 10.3&nbsp;</span></dt>
3487 <dd class="description">Collection value </dd>
3488 <dt>date[11] </dt>
3489 <dd class="description">Date/time value</dd>
3490 <dt>integer </dt>
3491 <dd class="description">Integer/enumerated value</dd>
3492 </dl>
3493 <h2 class="title"><a name="ENUMERATIONS">Constants</a></h2>
3494 <h3 class="enumeration"><a name="http_auth_e">http_auth_e</a></h3>
3495 <p class="description">HTTP authentication types</p>
3496 <h4 class="constants">Constants</h4>
3497 <dl>
3498 <dt>HTTP_AUTH_BASIC </dt>
3499 <dd class="description">Basic authentication in use</dd>
3500 <dt>HTTP_AUTH_MD5 </dt>
3501 <dd class="description">Digest authentication in use</dd>
3502 <dt>HTTP_AUTH_MD5_INT </dt>
3503 <dd class="description">Digest authentication in use for body</dd>
3504 <dt>HTTP_AUTH_MD5_SESS </dt>
3505 <dd class="description">MD5-session authentication in use</dd>
3506 <dt>HTTP_AUTH_MD5_SESS_INT </dt>
3507 <dd class="description">MD5-session authentication in use for body</dd>
3508 <dt>HTTP_AUTH_NEGOTIATE <span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span></dt>
3509 <dd class="description">GSSAPI authentication in use </dd>
3510 <dt>HTTP_AUTH_NONE </dt>
3511 <dd class="description">No authentication in use</dd>
3512 </dl>
3513 <h3 class="enumeration"><a name="http_encoding_e">http_encoding_e</a></h3>
3514 <p class="description">HTTP transfer encoding values</p>
3515 <h4 class="constants">Constants</h4>
3516 <dl>
3517 <dt>HTTP_ENCODE_CHUNKED </dt>
3518 <dd class="description">Data is chunked</dd>
3519 <dt>HTTP_ENCODE_FIELDS </dt>
3520 <dd class="description">Sending HTTP fields</dd>
3521 <dt>HTTP_ENCODE_LENGTH </dt>
3522 <dd class="description">Data is sent with Content-Length</dd>
3523 </dl>
3524 <h3 class="enumeration"><a name="http_encryption_e">http_encryption_e</a></h3>
3525 <p class="description">HTTP encryption values</p>
3526 <h4 class="constants">Constants</h4>
3527 <dl>
3528 <dt>HTTP_ENCRYPT_ALWAYS </dt>
3529 <dd class="description">Always encrypt (SSL)</dd>
3530 <dt>HTTP_ENCRYPT_IF_REQUESTED </dt>
3531 <dd class="description">Encrypt if requested (TLS upgrade)</dd>
3532 <dt>HTTP_ENCRYPT_NEVER </dt>
3533 <dd class="description">Never encrypt</dd>
3534 <dt>HTTP_ENCRYPT_REQUIRED </dt>
3535 <dd class="description">Encryption is required (TLS upgrade)</dd>
3536 </dl>
3537 <h3 class="enumeration"><a name="http_field_e">http_field_e</a></h3>
3538 <p class="description">HTTP field names</p>
3539 <h4 class="constants">Constants</h4>
3540 <dl>
3541 <dt>HTTP_FIELD_ACCEPT_LANGUAGE </dt>
3542 <dd class="description">Accept-Language field</dd>
3543 <dt>HTTP_FIELD_ACCEPT_RANGES </dt>
3544 <dd class="description">Accept-Ranges field</dd>
3545 <dt>HTTP_FIELD_AUTHORIZATION </dt>
3546 <dd class="description">Authorization field</dd>
3547 <dt>HTTP_FIELD_CONNECTION </dt>
3548 <dd class="description">Connection field</dd>
3549 <dt>HTTP_FIELD_CONTENT_ENCODING </dt>
3550 <dd class="description">Content-Encoding field</dd>
3551 <dt>HTTP_FIELD_CONTENT_LANGUAGE </dt>
3552 <dd class="description">Content-Language field</dd>
3553 <dt>HTTP_FIELD_CONTENT_LENGTH </dt>
3554 <dd class="description">Content-Length field</dd>
3555 <dt>HTTP_FIELD_CONTENT_LOCATION </dt>
3556 <dd class="description">Content-Location field</dd>
3557 <dt>HTTP_FIELD_CONTENT_MD5 </dt>
3558 <dd class="description">Content-MD5 field</dd>
3559 <dt>HTTP_FIELD_CONTENT_RANGE </dt>
3560 <dd class="description">Content-Range field</dd>
3561 <dt>HTTP_FIELD_CONTENT_TYPE </dt>
3562 <dd class="description">Content-Type field</dd>
3563 <dt>HTTP_FIELD_CONTENT_VERSION </dt>
3564 <dd class="description">Content-Version field</dd>
3565 <dt>HTTP_FIELD_DATE </dt>
3566 <dd class="description">Date field</dd>
3567 <dt>HTTP_FIELD_HOST </dt>
3568 <dd class="description">Host field</dd>
3569 <dt>HTTP_FIELD_IF_MODIFIED_SINCE </dt>
3570 <dd class="description">If-Modified-Since field</dd>
3571 <dt>HTTP_FIELD_IF_UNMODIFIED_SINCE </dt>
3572 <dd class="description">If-Unmodified-Since field</dd>
3573 <dt>HTTP_FIELD_KEEP_ALIVE </dt>
3574 <dd class="description">Keep-Alive field</dd>
3575 <dt>HTTP_FIELD_LAST_MODIFIED </dt>
3576 <dd class="description">Last-Modified field</dd>
3577 <dt>HTTP_FIELD_LINK </dt>
3578 <dd class="description">Link field</dd>
3579 <dt>HTTP_FIELD_LOCATION </dt>
3580 <dd class="description">Location field</dd>
3581 <dt>HTTP_FIELD_MAX </dt>
3582 <dd class="description">Maximum field index</dd>
3583 <dt>HTTP_FIELD_RANGE </dt>
3584 <dd class="description">Range field</dd>
3585 <dt>HTTP_FIELD_REFERER </dt>
3586 <dd class="description">Referer field</dd>
3587 <dt>HTTP_FIELD_RETRY_AFTER </dt>
3588 <dd class="description">Retry-After field</dd>
3589 <dt>HTTP_FIELD_TRANSFER_ENCODING </dt>
3590 <dd class="description">Transfer-Encoding field</dd>
3591 <dt>HTTP_FIELD_UNKNOWN </dt>
3592 <dd class="description">Unknown field</dd>
3593 <dt>HTTP_FIELD_UPGRADE </dt>
3594 <dd class="description">Upgrade field</dd>
3595 <dt>HTTP_FIELD_USER_AGENT </dt>
3596 <dd class="description">User-Agent field</dd>
3597 <dt>HTTP_FIELD_WWW_AUTHENTICATE </dt>
3598 <dd class="description">WWW-Authenticate field</dd>
3599 </dl>
3600 <h3 class="enumeration"><a name="http_keepalive_e">http_keepalive_e</a></h3>
3601 <p class="description">HTTP keep-alive values</p>
3602 <h4 class="constants">Constants</h4>
3603 <dl>
3604 <dt>HTTP_KEEPALIVE_OFF </dt>
3605 <dd class="description">No keep alive support</dd>
3606 <dt>HTTP_KEEPALIVE_ON </dt>
3607 <dd class="description">Use keep alive</dd>
3608 </dl>
3609 <h3 class="enumeration"><a name="http_state_e">http_state_e</a></h3>
3610 <p class="description">HTTP state values; states
3611 are server-oriented...</p>
3612 <h4 class="constants">Constants</h4>
3613 <dl>
3614 <dt>HTTP_CLOSE </dt>
3615 <dd class="description">CLOSE command, waiting for blank line</dd>
3616 <dt>HTTP_DELETE </dt>
3617 <dd class="description">DELETE command, waiting for blank line</dd>
3618 <dt>HTTP_GET </dt>
3619 <dd class="description">GET command, waiting for blank line</dd>
3620 <dt>HTTP_GET_SEND </dt>
3621 <dd class="description">GET command, sending data</dd>
3622 <dt>HTTP_HEAD </dt>
3623 <dd class="description">HEAD command, waiting for blank line</dd>
3624 <dt>HTTP_OPTIONS </dt>
3625 <dd class="description">OPTIONS command, waiting for blank line</dd>
3626 <dt>HTTP_POST </dt>
3627 <dd class="description">POST command, waiting for blank line</dd>
3628 <dt>HTTP_POST_RECV </dt>
3629 <dd class="description">POST command, receiving data</dd>
3630 <dt>HTTP_POST_SEND </dt>
3631 <dd class="description">POST command, sending data</dd>
3632 <dt>HTTP_PUT </dt>
3633 <dd class="description">PUT command, waiting for blank line</dd>
3634 <dt>HTTP_PUT_RECV </dt>
3635 <dd class="description">PUT command, receiving data</dd>
3636 <dt>HTTP_STATUS </dt>
3637 <dd class="description">Command complete, sending status</dd>
3638 <dt>HTTP_TRACE </dt>
3639 <dd class="description">TRACE command, waiting for blank line</dd>
3640 <dt>HTTP_WAITING </dt>
3641 <dd class="description">Waiting for command</dd>
3642 </dl>
3643 <h3 class="enumeration"><a name="http_status_e">http_status_e</a></h3>
3644 <p class="description">HTTP status codes</p>
3645 <h4 class="constants">Constants</h4>
3646 <dl>
3647 <dt>HTTP_ACCEPTED </dt>
3648 <dd class="description">DELETE command was successful</dd>
3649 <dt>HTTP_AUTHORIZATION_CANCELED </dt>
3650 <dd class="description">User cancelled authorization</dd>
3651 <dt>HTTP_BAD_GATEWAY </dt>
3652 <dd class="description">Bad gateway</dd>
3653 <dt>HTTP_BAD_REQUEST </dt>
3654 <dd class="description">Bad request</dd>
3655 <dt>HTTP_CONFLICT </dt>
3656 <dd class="description">Request is self-conflicting</dd>
3657 <dt>HTTP_CONTINUE </dt>
3658 <dd class="description">Everything OK, keep going...</dd>
3659 <dt>HTTP_CREATED </dt>
3660 <dd class="description">PUT command was successful</dd>
3661 <dt>HTTP_ERROR </dt>
3662 <dd class="description">An error response from httpXxxx()</dd>
3663 <dt>HTTP_EXPECTATION_FAILED </dt>
3664 <dd class="description">The expectation given in an Expect header field was not met</dd>
3665 <dt>HTTP_FORBIDDEN </dt>
3666 <dd class="description">Forbidden to access this URI</dd>
3667 <dt>HTTP_GATEWAY_TIMEOUT </dt>
3668 <dd class="description">Gateway connection timed out</dd>
3669 <dt>HTTP_GONE </dt>
3670 <dd class="description">Server has gone away</dd>
3671 <dt>HTTP_LENGTH_REQUIRED </dt>
3672 <dd class="description">A content length or encoding is required</dd>
3673 <dt>HTTP_METHOD_NOT_ALLOWED </dt>
3674 <dd class="description">Method is not allowed</dd>
3675 <dt>HTTP_MOVED_PERMANENTLY </dt>
3676 <dd class="description">Document has moved permanently</dd>
3677 <dt>HTTP_MOVED_TEMPORARILY </dt>
3678 <dd class="description">Document has moved temporarily</dd>
3679 <dt>HTTP_MULTIPLE_CHOICES </dt>
3680 <dd class="description">Multiple files match request</dd>
3681 <dt>HTTP_NOT_ACCEPTABLE </dt>
3682 <dd class="description">Not Acceptable</dd>
3683 <dt>HTTP_NOT_AUTHORITATIVE </dt>
3684 <dd class="description">Information isn't authoritative</dd>
3685 <dt>HTTP_NOT_FOUND </dt>
3686 <dd class="description">URI was not found</dd>
3687 <dt>HTTP_NOT_IMPLEMENTED </dt>
3688 <dd class="description">Feature not implemented</dd>
3689 <dt>HTTP_NOT_MODIFIED </dt>
3690 <dd class="description">File not modified</dd>
3691 <dt>HTTP_NOT_SUPPORTED </dt>
3692 <dd class="description">HTTP version not supported</dd>
3693 <dt>HTTP_NO_CONTENT </dt>
3694 <dd class="description">Successful command, no new data</dd>
3695 <dt>HTTP_OK </dt>
3696 <dd class="description">OPTIONS/GET/HEAD/POST/TRACE command was successful</dd>
3697 <dt>HTTP_PARTIAL_CONTENT </dt>
3698 <dd class="description">Only a partial file was recieved/sent</dd>
3699 <dt>HTTP_PAYMENT_REQUIRED </dt>
3700 <dd class="description">Payment required</dd>
3701 <dt>HTTP_PRECONDITION </dt>
3702 <dd class="description">Precondition failed</dd>
3703 <dt>HTTP_PROXY_AUTHENTICATION </dt>
3704 <dd class="description">Proxy Authentication is Required</dd>
3705 <dt>HTTP_REQUESTED_RANGE </dt>
3706 <dd class="description">The requested range is not satisfiable</dd>
3707 <dt>HTTP_REQUEST_TIMEOUT </dt>
3708 <dd class="description">Request timed out</dd>
3709 <dt>HTTP_REQUEST_TOO_LARGE </dt>
3710 <dd class="description">Request entity too large</dd>
3711 <dt>HTTP_RESET_CONTENT </dt>
3712 <dd class="description">Content was reset/recreated</dd>
3713 <dt>HTTP_SEE_OTHER </dt>
3714 <dd class="description">See this other link...</dd>
3715 <dt>HTTP_SERVER_ERROR </dt>
3716 <dd class="description">Internal server error</dd>
3717 <dt>HTTP_SERVICE_UNAVAILABLE </dt>
3718 <dd class="description">Service is unavailable</dd>
3719 <dt>HTTP_SWITCHING_PROTOCOLS </dt>
3720 <dd class="description">HTTP upgrade to TLS/SSL</dd>
3721 <dt>HTTP_UNAUTHORIZED </dt>
3722 <dd class="description">Unauthorized to access host</dd>
3723 <dt>HTTP_UNSUPPORTED_MEDIATYPE </dt>
3724 <dd class="description">The requested media type is unsupported</dd>
3725 <dt>HTTP_UPGRADE_REQUIRED </dt>
3726 <dd class="description">Upgrade to SSL/TLS required</dd>
3727 <dt>HTTP_URI_TOO_LONG </dt>
3728 <dd class="description">URI too long</dd>
3729 <dt>HTTP_USE_PROXY </dt>
3730 <dd class="description">Must use a proxy to access this URI</dd>
3731 </dl>
3732 <h3 class="enumeration"><a name="http_uri_coding_e">http_uri_coding_e</a></h3>
3733 <p class="description">URI en/decode flags</p>
3734 <h4 class="constants">Constants</h4>
3735 <dl>
3736 <dt>HTTP_URI_CODING_ALL </dt>
3737 <dd class="description">En/decode everything</dd>
3738 <dt>HTTP_URI_CODING_HOSTNAME </dt>
3739 <dd class="description">En/decode the hostname portion</dd>
3740 <dt>HTTP_URI_CODING_MOST </dt>
3741 <dd class="description">En/decode all but the query</dd>
3742 <dt>HTTP_URI_CODING_NONE </dt>
3743 <dd class="description">Don't en/decode anything</dd>
3744 <dt>HTTP_URI_CODING_QUERY </dt>
3745 <dd class="description">En/decode the query portion</dd>
3746 <dt>HTTP_URI_CODING_RESOURCE </dt>
3747 <dd class="description">En/decode the resource portion</dd>
3748 <dt>HTTP_URI_CODING_USERNAME </dt>
3749 <dd class="description">En/decode the username portion</dd>
3750 </dl>
3751 <h3 class="enumeration"><span class="info">&nbsp;CUPS1.2&nbsp;</span><a name="http_uri_status_e">http_uri_status_e</a></h3>
3752 <p class="description">URI separation status </p>
3753 <h4 class="constants">Constants</h4>
3754 <dl>
3755 <dt>HTTP_URI_BAD_ARGUMENTS </dt>
3756 <dd class="description">Bad arguments to function (error)</dd>
3757 <dt>HTTP_URI_BAD_HOSTNAME </dt>
3758 <dd class="description">Bad hostname in URI (error)</dd>
3759 <dt>HTTP_URI_BAD_PORT </dt>
3760 <dd class="description">Bad port number in URI (error)</dd>
3761 <dt>HTTP_URI_BAD_RESOURCE </dt>
3762 <dd class="description">Bad resource in URI (error)</dd>
3763 <dt>HTTP_URI_BAD_SCHEME </dt>
3764 <dd class="description">Bad scheme in URI (error)</dd>
3765 <dt>HTTP_URI_BAD_URI </dt>
3766 <dd class="description">Bad/empty URI (error)</dd>
3767 <dt>HTTP_URI_BAD_USERNAME </dt>
3768 <dd class="description">Bad username in URI (error)</dd>
3769 <dt>HTTP_URI_MISSING_RESOURCE </dt>
3770 <dd class="description">Missing resource in URI (warning)</dd>
3771 <dt>HTTP_URI_MISSING_SCHEME </dt>
3772 <dd class="description">Missing scheme in URI (warning)</dd>
3773 <dt>HTTP_URI_OK </dt>
3774 <dd class="description">URI decoded OK</dd>
3775 <dt>HTTP_URI_OVERFLOW </dt>
3776 <dd class="description">URI buffer for httpAssembleURI is too small</dd>
3777 <dt>HTTP_URI_UNKNOWN_SCHEME </dt>
3778 <dd class="description">Unknown scheme in URI (warning)</dd>
3779 </dl>
3780 <h3 class="enumeration"><a name="http_version_e">http_version_e</a></h3>
3781 <p class="description">HTTP version numbers</p>
3782 <h4 class="constants">Constants</h4>
3783 <dl>
3784 <dt>HTTP_0_9 </dt>
3785 <dd class="description">HTTP/0.9</dd>
3786 <dt>HTTP_1_0 </dt>
3787 <dd class="description">HTTP/1.0</dd>
3788 <dt>HTTP_1_1 </dt>
3789 <dd class="description">HTTP/1.1</dd>
3790 </dl>
3791 <h3 class="enumeration"><a name="ipp_finish_e">ipp_finish_e</a></h3>
3792 <p class="description">Finishings</p>
3793 <h4 class="constants">Constants</h4>
3794 <dl>
3795 <dt>IPP_FINISHINGS_BALE </dt>
3796 <dd class="description">Bale (any type)</dd>
3797 <dt>IPP_FINISHINGS_BIND </dt>
3798 <dd class="description">Bind</dd>
3799 <dt>IPP_FINISHINGS_BIND_BOTTOM </dt>
3800 <dd class="description">Bind on bottom</dd>
3801 <dt>IPP_FINISHINGS_BIND_LEFT </dt>
3802 <dd class="description">Bind on left</dd>
3803 <dt>IPP_FINISHINGS_BIND_RIGHT </dt>
3804 <dd class="description">Bind on right</dd>
3805 <dt>IPP_FINISHINGS_BIND_TOP </dt>
3806 <dd class="description">Bind on top</dd>
3807 <dt>IPP_FINISHINGS_BOOKLET_MAKER </dt>
3808 <dd class="description">Fold to make booklet</dd>
3809 <dt>IPP_FINISHINGS_COVER </dt>
3810 <dd class="description">Add cover</dd>
3811 <dt>IPP_FINISHINGS_EDGE_STITCH </dt>
3812 <dd class="description">Stitch along any side</dd>
3813 <dt>IPP_FINISHINGS_EDGE_STITCH_BOTTOM </dt>
3814 <dd class="description">Stitch along bottom edge</dd>
3815 <dt>IPP_FINISHINGS_EDGE_STITCH_LEFT </dt>
3816 <dd class="description">Stitch along left side</dd>
3817 <dt>IPP_FINISHINGS_EDGE_STITCH_RIGHT </dt>
3818 <dd class="description">Stitch along right side</dd>
3819 <dt>IPP_FINISHINGS_EDGE_STITCH_TOP </dt>
3820 <dd class="description">Stitch along top edge</dd>
3821 <dt>IPP_FINISHINGS_FOLD </dt>
3822 <dd class="description">Fold (any type)</dd>
3823 <dt>IPP_FINISHINGS_JOB_OFFSET </dt>
3824 <dd class="description">Offset for binding (any type)</dd>
3825 <dt>IPP_FINISHINGS_NONE </dt>
3826 <dd class="description">No finishing</dd>
3827 <dt>IPP_FINISHINGS_PUNCH </dt>
3828 <dd class="description">Punch (any location/count)</dd>
3829 <dt>IPP_FINISHINGS_SADDLE_STITCH </dt>
3830 <dd class="description">Staple interior</dd>
3831 <dt>IPP_FINISHINGS_STAPLE </dt>
3832 <dd class="description">Staple (any location)</dd>
3833 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_LEFT </dt>
3834 <dd class="description">Staple bottom left corner</dd>
3835 <dt>IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT </dt>
3836 <dd class="description">Staple bottom right corner</dd>
3837 <dt>IPP_FINISHINGS_STAPLE_DUAL_BOTTOM </dt>
3838 <dd class="description">Two staples on bottom</dd>
3839 <dt>IPP_FINISHINGS_STAPLE_DUAL_LEFT </dt>
3840 <dd class="description">Two staples on left</dd>
3841 <dt>IPP_FINISHINGS_STAPLE_DUAL_RIGHT </dt>
3842 <dd class="description">Two staples on right</dd>
3843 <dt>IPP_FINISHINGS_STAPLE_DUAL_TOP </dt>
3844 <dd class="description">Two staples on top</dd>
3845 <dt>IPP_FINISHINGS_STAPLE_TOP_LEFT </dt>
3846 <dd class="description">Staple top left corner</dd>
3847 <dt>IPP_FINISHINGS_STAPLE_TOP_RIGHT </dt>
3848 <dd class="description">Staple top right corner</dd>
3849 <dt>IPP_FINISHINGS_TRIM </dt>
3850 <dd class="description">Trim (any type)</dd>
3851 </dl>
3852 <h3 class="enumeration"><a name="ipp_jstate_e">ipp_jstate_e</a></h3>
3853 <p class="description">Job states</p>
3854 <h4 class="constants">Constants</h4>
3855 <dl>
3856 <dt>IPP_JOB_ABORTED </dt>
3857 <dd class="description">Job has aborted due to error</dd>
3858 <dt>IPP_JOB_CANCELED </dt>
3859 <dd class="description">Job has been canceled</dd>
3860 <dt>IPP_JOB_COMPLETED </dt>
3861 <dd class="description">Job has completed successfully</dd>
3862 <dt>IPP_JOB_HELD </dt>
3863 <dd class="description">Job is held for printing</dd>
3864 <dt>IPP_JOB_PENDING </dt>
3865 <dd class="description">Job is waiting to be printed</dd>
3866 <dt>IPP_JOB_PROCESSING </dt>
3867 <dd class="description">Job is currently printing</dd>
3868 <dt>IPP_JOB_STOPPED </dt>
3869 <dd class="description">Job has been stopped</dd>
3870 </dl>
3871 <h3 class="enumeration"><a name="ipp_op_e">ipp_op_e</a></h3>
3872 <p class="description">IPP operations</p>
3873 <h4 class="constants">Constants</h4>
3874 <dl>
3875 <dt>CUPS_ACCEPT_JOBS </dt>
3876 <dd class="description">Accept new jobs on a printer</dd>
3877 <dt>CUPS_ADD_MODIFY_CLASS </dt>
3878 <dd class="description">Add or modify a class</dd>
3879 <dt>CUPS_ADD_MODIFY_PRINTER </dt>
3880 <dd class="description">Add or modify a printer</dd>
3881 <dt>CUPS_AUTHENTICATE_JOB <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
3882 <dd class="description">Authenticate a job </dd>
3883 <dt>CUPS_DELETE_CLASS </dt>
3884 <dd class="description">Delete a class</dd>
3885 <dt>CUPS_DELETE_PRINTER </dt>
3886 <dd class="description">Delete a printer</dd>
3887 <dt>CUPS_GET_CLASSES <span class="info">&nbsp;DEPRECATED&nbsp;</span></dt>
3888 <dd class="description">Get a list of classes </dd>
3889 <dt>CUPS_GET_DEFAULT </dt>
3890 <dd class="description">Get the default printer</dd>
3891 <dt>CUPS_GET_DEVICES </dt>
3892 <dd class="description">Get a list of supported devices</dd>
3893 <dt>CUPS_GET_DOCUMENT <span class="info">&nbsp;CUPS 1.4/Mac OS X 10.6&nbsp;</span></dt>
3894 <dd class="description">Get a document file </dd>
3895 <dt>CUPS_GET_PPD <span class="info">&nbsp;CUPS 1.3/Mac OS X 10.5&nbsp;</span></dt>
3896 <dd class="description">Get a PPD file </dd>
3897 <dt>CUPS_GET_PPDS </dt>
3898 <dd class="description">Get a list of supported drivers</dd>
3899 <dt>CUPS_GET_PRINTERS </dt>
3900 <dd class="description">Get a list of printers and/or classes</dd>
3901 <dt>CUPS_MOVE_JOB </dt>
3902 <dd class="description">Move a job to a different printer</dd>
3903 <dt>CUPS_REJECT_JOBS </dt>
3904 <dd class="description">Reject new jobs on a printer</dd>
3905 <dt>CUPS_SET_DEFAULT </dt>
3906 <dd class="description">Set the default printer</dd>
3907 <dt>IPP_CANCEL_JOB </dt>
3908 <dd class="description">Cancel a job</dd>
3909 <dt>IPP_CANCEL_JOBS </dt>
3910 <dd class="description">Cancel-Jobs</dd>
3911 <dt>IPP_CANCEL_MY_JOBS </dt>
3912 <dd class="description">Cancel-My-Jobs</dd>
3913 <dt>IPP_CANCEL_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
3914 <dd class="description">Cancel a subscription </dd>
3915 <dt>IPP_CLOSE_JOB </dt>
3916 <dd class="description">Close-Job</dd>
3917 <dt>IPP_CREATE_JOB </dt>
3918 <dd class="description">Create an empty print job</dd>
3919 <dt>IPP_CREATE_JOB_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
3920 <dd class="description">Create a job subscription </dd>
3921 <dt>IPP_CREATE_PRINTER_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
3922 <dd class="description">Create a printer subscription </dd>
3923 <dt>IPP_DISABLE_PRINTER </dt>
3924 <dd class="description">Stop a printer</dd>
3925 <dt>IPP_ENABLE_PRINTER </dt>
3926 <dd class="description">Start a printer</dd>
3927 <dt>IPP_GET_JOBS </dt>
3928 <dd class="description">Get a list of jobs</dd>
3929 <dt>IPP_GET_JOB_ATTRIBUTES </dt>
3930 <dd class="description">Get job attributes</dd>
3931 <dt>IPP_GET_NOTIFICATIONS <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
3932 <dd class="description">Get notification events </dd>
3933 <dt>IPP_GET_PRINTER_ATTRIBUTES </dt>
3934 <dd class="description">Get printer attributes</dd>
3935 <dt>IPP_GET_PRINTER_SUPPORTED_VALUES </dt>
3936 <dd class="description">Get supported attribute values</dd>
3937 <dt>IPP_GET_SUBSCRIPTIONS <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
3938 <dd class="description">Get list of subscriptions </dd>
3939 <dt>IPP_GET_SUBSCRIPTION_ATTRIBUTES <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
3940 <dd class="description">Get subscription attributes </dd>
3941 <dt>IPP_HOLD_JOB </dt>
3942 <dd class="description">Hold a job for printing</dd>
3943 <dt>IPP_PAUSE_PRINTER </dt>
3944 <dd class="description">Stop a printer</dd>
3945 <dt>IPP_PRINT_JOB </dt>
3946 <dd class="description">Print a single file</dd>
3947 <dt>IPP_PURGE_JOBS </dt>
3948 <dd class="description">Cancel all jobs</dd>
3949 <dt>IPP_RELEASE_JOB </dt>
3950 <dd class="description">Release a job for printing</dd>
3951 <dt>IPP_RENEW_SUBSCRIPTION <span class="info">&nbsp;CUPS 1.2/Mac OS X 10.5&nbsp;</span></dt>
3952 <dd class="description">Renew a printer subscription </dd>
3953 <dt>IPP_RESTART_JOB </dt>
3954 <dd class="description">Reprint a job</dd>
3955 <dt>IPP_RESUBMIT_JOB </dt>
3956 <dd class="description">Resubmit-Job</dd>
3957 <dt>IPP_RESUME_PRINTER </dt>
3958 <dd class="description">Start a printer</dd>
3959 <dt>IPP_SEND_DOCUMENT </dt>
3960 <dd class="description">Add a file to a job</dd>
3961 <dt>IPP_SET_JOB_ATTRIBUTES </dt>
3962 <dd class="description">Set job attributes</dd>
3963 <dt>IPP_VALIDATE_JOB </dt>
3964 <dd class="description">Validate job options</dd>
3965 </dl>
3966 <h3 class="enumeration"><a name="ipp_orient_e">ipp_orient_e</a></h3>
3967 <p class="description">Orientation values</p>
3968 <h4 class="constants">Constants</h4>
3969 <dl>
3970 <dt>IPP_LANDSCAPE </dt>
3971 <dd class="description">90 degrees counter-clockwise</dd>
3972 <dt>IPP_PORTRAIT </dt>
3973 <dd class="description">No rotation</dd>
3974 <dt>IPP_REVERSE_LANDSCAPE </dt>
3975 <dd class="description">90 degrees clockwise</dd>
3976 <dt>IPP_REVERSE_PORTRAIT </dt>
3977 <dd class="description">180 degrees</dd>
3978 </dl>
3979 <h3 class="enumeration"><a name="ipp_pstate_e">ipp_pstate_e</a></h3>
3980 <p class="description">Printer states</p>
3981 <h4 class="constants">Constants</h4>
3982 <dl>
3983 <dt>IPP_PRINTER_IDLE </dt>
3984 <dd class="description">Printer is idle</dd>
3985 <dt>IPP_PRINTER_PROCESSING </dt>
3986 <dd class="description">Printer is working</dd>
3987 <dt>IPP_PRINTER_STOPPED </dt>
3988 <dd class="description">Printer is stopped</dd>
3989 </dl>
3990 <h3 class="enumeration"><a name="ipp_quality_e">ipp_quality_e</a></h3>
3991 <p class="description">Qualities</p>
3992 <h4 class="constants">Constants</h4>
3993 <dl>
3994 <dt>IPP_QUALITY_DRAFT </dt>
3995 <dd class="description">Draft quality</dd>
3996 <dt>IPP_QUALITY_HIGH </dt>
3997 <dd class="description">High quality</dd>
3998 <dt>IPP_QUALITY_NORMAL </dt>
3999 <dd class="description">Normal quality</dd>
4000 </dl>
4001 <h3 class="enumeration"><a name="ipp_res_e">ipp_res_e</a></h3>
4002 <p class="description">Resolution units</p>
4003 <h4 class="constants">Constants</h4>
4004 <dl>
4005 <dt>IPP_RES_PER_CM </dt>
4006 <dd class="description">Pixels per centimeter</dd>
4007 <dt>IPP_RES_PER_INCH </dt>
4008 <dd class="description">Pixels per inch</dd>
4009 </dl>
4010 <h3 class="enumeration"><a name="ipp_state_e">ipp_state_e</a></h3>
4011 <p class="description">IPP states</p>
4012 <h4 class="constants">Constants</h4>
4013 <dl>
4014 <dt>IPP_ATTRIBUTE </dt>
4015 <dd class="description">One or more attributes need to be sent/received</dd>
4016 <dt>IPP_DATA </dt>
4017 <dd class="description">IPP request data needs to be sent/received</dd>
4018 <dt>IPP_ERROR </dt>
4019 <dd class="description">An error occurred</dd>
4020 <dt>IPP_HEADER </dt>
4021 <dd class="description">The request header needs to be sent/received</dd>
4022 <dt>IPP_IDLE </dt>
4023 <dd class="description">Nothing is happening/request completed</dd>
4024 </dl>
4025 <h3 class="enumeration"><a name="ipp_status_e">ipp_status_e</a></h3>
4026 <p class="description">IPP status codes</p>
4027 <h4 class="constants">Constants</h4>
4028 <dl>
4029 <dt>CUPS_SEE_OTHER </dt>
4030 <dd class="description">cups-see-other</dd>
4031 <dt>IPP_ATTRIBUTES </dt>
4032 <dd class="description">client-error-attributes-or-values-not-supported</dd>
4033 <dt>IPP_ATTRIBUTES_NOT_SETTABLE </dt>
4034 <dd class="description">client-error-attributes-not-settable</dd>
4035 <dt>IPP_BAD_REQUEST </dt>
4036 <dd class="description">client-error-bad-request</dd>
4037 <dt>IPP_CHARSET </dt>
4038 <dd class="description">client-error-charset-not-supported</dd>
4039 <dt>IPP_COMPRESSION_ERROR </dt>
4040 <dd class="description">client-error-compression-error</dd>
4041 <dt>IPP_COMPRESSION_NOT_SUPPORTED </dt>
4042 <dd class="description">client-error-compression-not-supported</dd>
4043 <dt>IPP_CONFLICT </dt>
4044 <dd class="description">client-error-conflicting-attributes</dd>
4045 <dt>IPP_DEVICE_ERROR </dt>
4046 <dd class="description">server-error-device-error</dd>
4047 <dt>IPP_DOCUMENT_ACCESS_ERROR </dt>
4048 <dd class="description">client-error-document-access-error</dd>
4049 <dt>IPP_DOCUMENT_FORMAT </dt>
4050 <dd class="description">client-error-document-format-not-supported</dd>
4051 <dt>IPP_DOCUMENT_FORMAT_ERROR </dt>
4052 <dd class="description">client-error-document-format-error</dd>
4053 <dt>IPP_ERROR_JOB_CANCELED </dt>
4054 <dd class="description">server-error-job-canceled</dd>
4055 <dt>IPP_FORBIDDEN </dt>
4056 <dd class="description">client-error-forbidden</dd>
4057 <dt>IPP_GONE </dt>
4058 <dd class="description">client-error-gone</dd>
4059 <dt>IPP_IGNORED_ALL_NOTIFICATIONS </dt>
4060 <dd class="description">client-error-ignored-all-notifications</dd>
4061 <dt>IPP_IGNORED_ALL_SUBSCRIPTIONS </dt>
4062 <dd class="description">client-error-ignored-all-subscriptions</dd>
4063 <dt>IPP_INTERNAL_ERROR </dt>
4064 <dd class="description">server-error-internal-error</dd>
4065 <dt>IPP_MULTIPLE_JOBS_NOT_SUPPORTED </dt>
4066 <dd class="description">server-error-multiple-document-jobs-not-supported</dd>
4067 <dt>IPP_NOT_ACCEPTING </dt>
4068 <dd class="description">server-error-not-accepting-jobs</dd>
4069 <dt>IPP_NOT_AUTHENTICATED </dt>
4070 <dd class="description">client-error-not-authenticated</dd>
4071 <dt>IPP_NOT_AUTHORIZED </dt>
4072 <dd class="description">client-error-not-authorized</dd>
4073 <dt>IPP_NOT_FOUND </dt>
4074 <dd class="description">client-error-not-found</dd>
4075 <dt>IPP_NOT_POSSIBLE </dt>
4076 <dd class="description">client-error-not-possible</dd>
4077 <dt>IPP_OK </dt>
4078 <dd class="description">successful-ok</dd>
4079 <dt>IPP_OK_BUT_CANCEL_SUBSCRIPTION </dt>
4080 <dd class="description">successful-ok-but-cancel-subscription</dd>
4081 <dt>IPP_OK_CONFLICT </dt>
4082 <dd class="description">successful-ok-conflicting-attributes</dd>
4083 <dt>IPP_OK_EVENTS_COMPLETE </dt>
4084 <dd class="description">successful-ok-events-complete</dd>
4085 <dt>IPP_OK_IGNORED_NOTIFICATIONS </dt>
4086 <dd class="description">successful-ok-ignored-notifications</dd>
4087 <dt>IPP_OK_IGNORED_SUBSCRIPTIONS </dt>
4088 <dd class="description">successful-ok-ignored-subscriptions</dd>
4089 <dt>IPP_OK_SUBST </dt>
4090 <dd class="description">successful-ok-ignored-or-substituted-attributes</dd>
4091 <dt>IPP_OK_TOO_MANY_EVENTS </dt>
4092 <dd class="description">successful-ok-too-many-events</dd>
4093 <dt>IPP_OPERATION_NOT_SUPPORTED </dt>
4094 <dd class="description">server-error-operation-not-supported</dd>
4095 <dt>IPP_PRINTER_BUSY </dt>
4096 <dd class="description">server-error-busy</dd>
4097 <dt>IPP_PRINTER_IS_DEACTIVATED </dt>
4098 <dd class="description">server-error-printer-is-deactivated</dd>
4099 <dt>IPP_PRINT_SUPPORT_FILE_NOT_FOUND </dt>
4100 <dd class="description">client-error-print-support-file-not-found</dd>
4101 <dt>IPP_REQUEST_ENTITY </dt>
4102 <dd class="description">client-error-request-entity-too-large</dd>
4103 <dt>IPP_REQUEST_VALUE </dt>
4104 <dd class="description">client-error-request-value-too-long</dd>
4105 <dt>IPP_SERVICE_UNAVAILABLE </dt>
4106 <dd class="description">server-error-service-unavailable</dd>
4107 <dt>IPP_TEMPORARY_ERROR </dt>
4108 <dd class="description">server-error-temporary-error</dd>
4109 <dt>IPP_TIMEOUT </dt>
4110 <dd class="description">client-error-timeout</dd>
4111 <dt>IPP_TOO_MANY_SUBSCRIPTIONS </dt>
4112 <dd class="description">client-error-too-many-subscriptions</dd>
4113 <dt>IPP_URI_SCHEME </dt>
4114 <dd class="description">client-error-uri-scheme-not-supported</dd>
4115 <dt>IPP_VERSION_NOT_SUPPORTED </dt>
4116 <dd class="description">server-error-version-not-supported</dd>
4117 </dl>
4118 <h3 class="enumeration"><a name="ipp_tag_e">ipp_tag_e</a></h3>
4119 <p class="description">Format tags for attributes</p>
4120 <h4 class="constants">Constants</h4>
4121 <dl>
4122 <dt>IPP_TAG_ADMINDEFINE </dt>
4123 <dd class="description">Admin-defined value</dd>
4124 <dt>IPP_TAG_BEGIN_COLLECTION </dt>
4125 <dd class="description">Beginning of collection value</dd>
4126 <dt>IPP_TAG_BOOLEAN </dt>
4127 <dd class="description">Boolean value</dd>
4128 <dt>IPP_TAG_CHARSET </dt>
4129 <dd class="description">Character set value</dd>
4130 <dt>IPP_TAG_COPY </dt>
4131 <dd class="description">Bitflag for copied attribute values</dd>
4132 <dt>IPP_TAG_DATE </dt>
4133 <dd class="description">Date/time value</dd>
4134 <dt>IPP_TAG_DEFAULT </dt>
4135 <dd class="description">Default value</dd>
4136 <dt>IPP_TAG_DELETEATTR </dt>
4137 <dd class="description">Delete-attribute value</dd>
4138 <dt>IPP_TAG_END </dt>
4139 <dd class="description">End-of-attributes</dd>
4140 <dt>IPP_TAG_END_COLLECTION </dt>
4141 <dd class="description">End of collection value</dd>
4142 <dt>IPP_TAG_ENUM </dt>
4143 <dd class="description">Enumeration value</dd>
4144 <dt>IPP_TAG_EVENT_NOTIFICATION </dt>
4145 <dd class="description">Event group</dd>
4146 <dt>IPP_TAG_INTEGER </dt>
4147 <dd class="description">Integer value</dd>
4148 <dt>IPP_TAG_JOB </dt>
4149 <dd class="description">Job group</dd>
4150 <dt>IPP_TAG_KEYWORD </dt>
4151 <dd class="description">Keyword value</dd>
4152 <dt>IPP_TAG_LANGUAGE </dt>
4153 <dd class="description">Language value</dd>
4154 <dt>IPP_TAG_MASK </dt>
4155 <dd class="description">Mask for copied attribute values</dd>
4156 <dt>IPP_TAG_MEMBERNAME </dt>
4157 <dd class="description">Collection member name value</dd>
4158 <dt>IPP_TAG_MIMETYPE </dt>
4159 <dd class="description">MIME media type value</dd>
4160 <dt>IPP_TAG_NAME </dt>
4161 <dd class="description">Name value</dd>
4162 <dt>IPP_TAG_NAMELANG </dt>
4163 <dd class="description">Name-with-language value</dd>
4164 <dt>IPP_TAG_NOTSETTABLE </dt>
4165 <dd class="description">Not-settable value</dd>
4166 <dt>IPP_TAG_NOVALUE </dt>
4167 <dd class="description">No-value value</dd>
4168 <dt>IPP_TAG_OPERATION </dt>
4169 <dd class="description">Operation group</dd>
4170 <dt>IPP_TAG_PRINTER </dt>
4171 <dd class="description">Printer group</dd>
4172 <dt>IPP_TAG_RANGE </dt>
4173 <dd class="description">Range value</dd>
4174 <dt>IPP_TAG_RESOLUTION </dt>
4175 <dd class="description">Resolution value</dd>
4176 <dt>IPP_TAG_STRING </dt>
4177 <dd class="description">Octet string value</dd>
4178 <dt>IPP_TAG_SUBSCRIPTION </dt>
4179 <dd class="description">Subscription group</dd>
4180 <dt>IPP_TAG_TEXT </dt>
4181 <dd class="description">Text value</dd>
4182 <dt>IPP_TAG_TEXTLANG </dt>
4183 <dd class="description">Text-with-language value</dd>
4184 <dt>IPP_TAG_UNKNOWN </dt>
4185 <dd class="description">Unknown value</dd>
4186 <dt>IPP_TAG_UNSUPPORTED_GROUP </dt>
4187 <dd class="description">Unsupported attributes group</dd>
4188 <dt>IPP_TAG_UNSUPPORTED_VALUE </dt>
4189 <dd class="description">Unsupported value</dd>
4190 <dt>IPP_TAG_URI </dt>
4191 <dd class="description">URI value</dd>
4192 <dt>IPP_TAG_URISCHEME </dt>
4193 <dd class="description">URI scheme value</dd>
4194 <dt>IPP_TAG_ZERO </dt>
4195 <dd class="description">Zero tag - used for separators</dd>
4196 </dl>
4197 </div>
4198 </body>
4199 </html>