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