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