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