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