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