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