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