]> git.ipfire.org Git - thirdparty/cups.git/blob - doc/help/api-httpipp.html
Load cups into easysw/current.
[thirdparty/cups.git] / doc / help / api-httpipp.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2 <html>
3 <!-- SECTION: Programming -->
4 <head>
5 <title>HTTP and IPP APIs</title>
6 <meta name='keywords' content='Programming'>
7 <meta name='creator' content='Mini-XML v2.3'>
8 <style type='text/css'><!--
9 h1, h2, h3, p { font-family: sans-serif; text-align: justify; }
10 tt, pre a:link, pre a:visited, tt a:link, tt a:visited { font-weight: bold; color: #7f0000; }
11 pre { font-weight: bold; color: #7f0000; margin-left: 2em; }
12 span.info { background: #000000; border: solid thin #000000; color: #ffffff; font-size: 80%; font-style: italic; font-weight: bold; white-space: nowrap; }
13 h3 span.info { float: right; font-size: 100%; }
14 h1.title, h2.title, h3.title { border-bottom: solid 2px #000000; }
15 --></style>
16 </head>
17 <body>
18 <!--
19 "$Id: api-httpipp.shtml 5138 2006-02-21 10:49:06Z mike $"
20
21 HTTP and IPP API introduction for the Common UNIX Printing System (CUPS).
22
23 Copyright 1997-2006 by Easy Software Products.
24
25 These coded instructions, statements, and computer programs are the
26 property of Easy Software Products and are protected by Federal
27 copyright law. Distribution and use rights are outlined in the file
28 "LICENSE.txt" which should have been included with this file. If this
29 file is missing or damaged please contact Easy Software Products
30 at:
31
32 Attn: CUPS Licensing Information
33 Easy Software Products
34 44141 Airport View Drive, Suite 204
35 Hollywood, Maryland 20636 USA
36
37 Voice: (301) 373-9600
38 EMail: cups-info@cups.org
39 WWW: http://www.cups.org
40 -->
41
42 <h2 class='title'>Introduction</h2>
43
44 <p>The CUPS HTTP and IPP APIs provide low-level access to the
45 HTTP and IPP protocols and CUPS scheduler. They are typically
46 used by monitoring and administration programs to perform
47 specific functions not supported by the high-level CUPS API
48 functions.</p>
49
50 <h2 class='title'>General Usage</h2>
51
52 <p>The <var>&lt;cups/cups.h&gt;</var> header file must be included to
53 use the HTTP and IPP functions.</p>
54
55 <p>Programs using these functions must be linked to the CUPS
56 library: <var>libcups.a</var>, <var>libcups.so.2</var>,
57 <var>libcups.2.dylib</var>, <var>libcups_s.a</var>, or
58 <var>libcups2.lib</var> depending on the platform. The following
59 command compiles <var>myprogram.c</var> using GCC and the CUPS
60 library:</p>
61
62 <pre class='command'>
63 <kbd>gcc -o myprogram myprogram.c -lcups</kbd>
64 </pre>
65
66 <h2 class='title'>Compatibility</h2>
67
68 <p>Unless otherwise specified, the HTTP and IPP API functions
69 require CUPS 1.1 or higher.</p>
70 <h2 class='title'>Contents</h2>
71 <ul>
72 <li><a href='#ENUMERATIONS'>Enumerations</a></li>
73 <li><a href='#FUNCTIONS'>Functions</a></li>
74 <li><a href='#STRUCTURES'>Structures</a></li>
75 <li><a href='#TYPES'>Types</a></li>
76 <li><a href='#UNIONS'>Unions</a></li>
77 </ul>
78 <!-- NEW PAGE -->
79 <h2 class='title'><a name='ENUMERATIONS'>Enumerations</a></h2>
80 <ul>
81 <li><a href='#http_auth_e'><tt>http_auth_e</tt></a> </li>
82 <li><a href='#http_encoding_e'><tt>http_encoding_e</tt></a> </li>
83 <li><a href='#http_encryption_e'><tt>http_encryption_e</tt></a> </li>
84 <li><a href='#http_field_e'><tt>http_field_e</tt></a> </li>
85 <li><a href='#http_keepalive_e'><tt>http_keepalive_e</tt></a> </li>
86 <li><a href='#http_status_e'><tt>http_status_e</tt></a> </li>
87 <li><a href='#ipp_res_e'><tt>ipp_res_e</tt></a> </li>
88 <li><a href='#ipp_status_e'><tt>ipp_status_e</tt></a> </li>
89 <li><a href='#ipp_tag_e'><tt>ipp_tag_e</tt></a> </li>
90 </ul>
91 <!-- NEW PAGE -->
92 <h3 class='title'><a name='http_auth_e'>http_auth_e</a></h3>
93 <h4>Description</h4>
94 <p>HTTP authentication types</p>
95 <h4>Values</h4>
96 <div class='table'><table align='center' border='1' width='80%'>
97 <thead><tr><th>Name</th><th>Description</th></tr></thead>
98 <tbody>
99 <tr><td><tt>HTTP_AUTH_BASIC</tt> </td><td>Basic authentication in use</td></tr>
100 <tr><td><tt>HTTP_AUTH_MD5</tt> </td><td>Digest authentication in use</td></tr>
101 <tr><td><tt>HTTP_AUTH_MD5_INT</tt> </td><td>Digest authentication in use for body</td></tr>
102 <tr><td><tt>HTTP_AUTH_MD5_SESS</tt> </td><td>MD5-session authentication in use</td></tr>
103 <tr><td><tt>HTTP_AUTH_MD5_SESS_INT</tt> </td><td>MD5-session authentication in use for body</td></tr>
104 <tr><td><tt>HTTP_AUTH_NEGOTIATE</tt> <span class='info'>&nbsp;CUPS 1.3&nbsp;</span></td><td>GSSAPI authentication in use </td></tr>
105 <tr><td><tt>HTTP_AUTH_NONE</tt> </td><td>No authentication in use</td></tr>
106 </tbody></table></div>
107 <!-- NEW PAGE -->
108 <h3 class='title'><a name='http_encoding_e'>http_encoding_e</a></h3>
109 <h4>Description</h4>
110 <p>HTTP transfer encoding values</p>
111 <h4>Values</h4>
112 <div class='table'><table align='center' border='1' width='80%'>
113 <thead><tr><th>Name</th><th>Description</th></tr></thead>
114 <tbody>
115 <tr><td><tt>HTTP_ENCODE_CHUNKED</tt> </td><td>Data is chunked</td></tr>
116 <tr><td><tt>HTTP_ENCODE_FIELDS</tt> </td><td>Sending HTTP fields</td></tr>
117 <tr><td><tt>HTTP_ENCODE_LENGTH</tt> </td><td>Data is sent with Content-Length</td></tr>
118 </tbody></table></div>
119 <!-- NEW PAGE -->
120 <h3 class='title'><a name='http_encryption_e'>http_encryption_e</a></h3>
121 <h4>Description</h4>
122 <p>HTTP encryption values</p>
123 <h4>Values</h4>
124 <div class='table'><table align='center' border='1' width='80%'>
125 <thead><tr><th>Name</th><th>Description</th></tr></thead>
126 <tbody>
127 <tr><td><tt>HTTP_ENCRYPT_ALWAYS</tt> </td><td>Always encrypt (SSL)</td></tr>
128 <tr><td><tt>HTTP_ENCRYPT_IF_REQUESTED</tt> </td><td>Encrypt if requested (TLS upgrade)</td></tr>
129 <tr><td><tt>HTTP_ENCRYPT_NEVER</tt> </td><td>Never encrypt</td></tr>
130 <tr><td><tt>HTTP_ENCRYPT_REQUIRED</tt> </td><td>Encryption is required (TLS upgrade)</td></tr>
131 </tbody></table></div>
132 <!-- NEW PAGE -->
133 <h3 class='title'><a name='http_field_e'>http_field_e</a></h3>
134 <h4>Description</h4>
135 <p>HTTP field names</p>
136 <h4>Values</h4>
137 <div class='table'><table align='center' border='1' width='80%'>
138 <thead><tr><th>Name</th><th>Description</th></tr></thead>
139 <tbody>
140 <tr><td><tt>HTTP_FIELD_ACCEPT_LANGUAGE</tt> </td><td>Accept-Language field</td></tr>
141 <tr><td><tt>HTTP_FIELD_ACCEPT_RANGES</tt> </td><td>Accept-Ranges field</td></tr>
142 <tr><td><tt>HTTP_FIELD_AUTHORIZATION</tt> </td><td>Authorization field</td></tr>
143 <tr><td><tt>HTTP_FIELD_CONNECTION</tt> </td><td>Connection field</td></tr>
144 <tr><td><tt>HTTP_FIELD_CONTENT_ENCODING</tt> </td><td>Content-Encoding field</td></tr>
145 <tr><td><tt>HTTP_FIELD_CONTENT_LANGUAGE</tt> </td><td>Content-Language field</td></tr>
146 <tr><td><tt>HTTP_FIELD_CONTENT_LENGTH</tt> </td><td>Content-Length field</td></tr>
147 <tr><td><tt>HTTP_FIELD_CONTENT_LOCATION</tt> </td><td>Content-Location field</td></tr>
148 <tr><td><tt>HTTP_FIELD_CONTENT_MD5</tt> </td><td>Content-MD5 field</td></tr>
149 <tr><td><tt>HTTP_FIELD_CONTENT_RANGE</tt> </td><td>Content-Range field</td></tr>
150 <tr><td><tt>HTTP_FIELD_CONTENT_TYPE</tt> </td><td>Content-Type field</td></tr>
151 <tr><td><tt>HTTP_FIELD_CONTENT_VERSION</tt> </td><td>Content-Version field</td></tr>
152 <tr><td><tt>HTTP_FIELD_DATE</tt> </td><td>Date field</td></tr>
153 <tr><td><tt>HTTP_FIELD_HOST</tt> </td><td>Host field</td></tr>
154 <tr><td><tt>HTTP_FIELD_IF_MODIFIED_SINCE</tt> </td><td>If-Modified-Since field</td></tr>
155 <tr><td><tt>HTTP_FIELD_IF_UNMODIFIED_SINCE</tt> </td><td>If-Unmodified-Since field</td></tr>
156 <tr><td><tt>HTTP_FIELD_KEEP_ALIVE</tt> </td><td>Keep-Alive field</td></tr>
157 <tr><td><tt>HTTP_FIELD_LAST_MODIFIED</tt> </td><td>Last-Modified field</td></tr>
158 <tr><td><tt>HTTP_FIELD_LINK</tt> </td><td>Link field</td></tr>
159 <tr><td><tt>HTTP_FIELD_LOCATION</tt> </td><td>Location field</td></tr>
160 <tr><td><tt>HTTP_FIELD_MAX</tt> </td><td>Maximum field index</td></tr>
161 <tr><td><tt>HTTP_FIELD_RANGE</tt> </td><td>Range field</td></tr>
162 <tr><td><tt>HTTP_FIELD_REFERER</tt> </td><td>Referer field</td></tr>
163 <tr><td><tt>HTTP_FIELD_RETRY_AFTER</tt> </td><td>Retry-After field</td></tr>
164 <tr><td><tt>HTTP_FIELD_TRANSFER_ENCODING</tt> </td><td>Transfer-Encoding field</td></tr>
165 <tr><td><tt>HTTP_FIELD_UNKNOWN</tt> </td><td>Unknown field</td></tr>
166 <tr><td><tt>HTTP_FIELD_UPGRADE</tt> </td><td>Upgrade field</td></tr>
167 <tr><td><tt>HTTP_FIELD_USER_AGENT</tt> </td><td>User-Agent field</td></tr>
168 <tr><td><tt>HTTP_FIELD_WWW_AUTHENTICATE</tt> </td><td>WWW-Authenticate field</td></tr>
169 </tbody></table></div>
170 <!-- NEW PAGE -->
171 <h3 class='title'><a name='http_keepalive_e'>http_keepalive_e</a></h3>
172 <h4>Description</h4>
173 <p>Types and structures...</p>
174 <h4>Values</h4>
175 <div class='table'><table align='center' border='1' width='80%'>
176 <thead><tr><th>Name</th><th>Description</th></tr></thead>
177 <tbody>
178 <tr><td><tt>HTTP_KEEPALIVE_OFF</tt> </td><td>No keep alive support</td></tr>
179 <tr><td><tt>HTTP_KEEPALIVE_ON</tt> </td><td>Use keep alive</td></tr>
180 </tbody></table></div>
181 <!-- NEW PAGE -->
182 <h3 class='title'><a name='http_status_e'>http_status_e</a></h3>
183 <h4>Description</h4>
184 <p>HTTP status codes</p>
185 <h4>Values</h4>
186 <div class='table'><table align='center' border='1' width='80%'>
187 <thead><tr><th>Name</th><th>Description</th></tr></thead>
188 <tbody>
189 <tr><td><tt>HTTP_ACCEPTED</tt> </td><td>DELETE command was successful</td></tr>
190 <tr><td><tt>HTTP_BAD_GATEWAY</tt> </td><td>Bad gateway</td></tr>
191 <tr><td><tt>HTTP_BAD_REQUEST</tt> </td><td>Bad request</td></tr>
192 <tr><td><tt>HTTP_CONFLICT</tt> </td><td>Request is self-conflicting</td></tr>
193 <tr><td><tt>HTTP_CONTINUE</tt> </td><td>Everything OK, keep going...</td></tr>
194 <tr><td><tt>HTTP_CREATED</tt> </td><td>PUT command was successful</td></tr>
195 <tr><td><tt>HTTP_ERROR</tt> </td><td>An error response from httpXxxx()</td></tr>
196 <tr><td><tt>HTTP_EXPECTATION_FAILED</tt> </td><td>The expectation given in an Expect header field was not met</td></tr>
197 <tr><td><tt>HTTP_FORBIDDEN</tt> </td><td>Forbidden to access this URI</td></tr>
198 <tr><td><tt>HTTP_GATEWAY_TIMEOUT</tt> </td><td>Gateway connection timed out</td></tr>
199 <tr><td><tt>HTTP_GONE</tt> </td><td>Server has gone away</td></tr>
200 <tr><td><tt>HTTP_LENGTH_REQUIRED</tt> </td><td>A content length or encoding is required</td></tr>
201 <tr><td><tt>HTTP_METHOD_NOT_ALLOWED</tt> </td><td>Method is not allowed</td></tr>
202 <tr><td><tt>HTTP_MOVED_PERMANENTLY</tt> </td><td>Document has moved permanently</td></tr>
203 <tr><td><tt>HTTP_MOVED_TEMPORARILY</tt> </td><td>Document has moved temporarily</td></tr>
204 <tr><td><tt>HTTP_MULTIPLE_CHOICES</tt> </td><td>Multiple files match request</td></tr>
205 <tr><td><tt>HTTP_NOT_ACCEPTABLE</tt> </td><td>Not Acceptable</td></tr>
206 <tr><td><tt>HTTP_NOT_AUTHORITATIVE</tt> </td><td>Information isn't authoritative</td></tr>
207 <tr><td><tt>HTTP_NOT_FOUND</tt> </td><td>URI was not found</td></tr>
208 <tr><td><tt>HTTP_NOT_IMPLEMENTED</tt> </td><td>Feature not implemented</td></tr>
209 <tr><td><tt>HTTP_NOT_MODIFIED</tt> </td><td>File not modified</td></tr>
210 <tr><td><tt>HTTP_NOT_SUPPORTED</tt> </td><td>HTTP version not supported</td></tr>
211 <tr><td><tt>HTTP_NO_CONTENT</tt> </td><td>Successful command, no new data</td></tr>
212 <tr><td><tt>HTTP_OK</tt> </td><td>OPTIONS/GET/HEAD/POST/TRACE command was successful</td></tr>
213 <tr><td><tt>HTTP_PARTIAL_CONTENT</tt> </td><td>Only a partial file was recieved/sent</td></tr>
214 <tr><td><tt>HTTP_PAYMENT_REQUIRED</tt> </td><td>Payment required</td></tr>
215 <tr><td><tt>HTTP_PRECONDITION</tt> </td><td>Precondition failed</td></tr>
216 <tr><td><tt>HTTP_PROXY_AUTHENTICATION</tt> </td><td>Proxy Authentication is Required</td></tr>
217 <tr><td><tt>HTTP_REQUESTED_RANGE</tt> </td><td>The requested range is not satisfiable</td></tr>
218 <tr><td><tt>HTTP_REQUEST_TIMEOUT</tt> </td><td>Request timed out</td></tr>
219 <tr><td><tt>HTTP_REQUEST_TOO_LARGE</tt> </td><td>Request entity too large</td></tr>
220 <tr><td><tt>HTTP_RESET_CONTENT</tt> </td><td>Content was reset/recreated</td></tr>
221 <tr><td><tt>HTTP_SEE_OTHER</tt> </td><td>See this other link...</td></tr>
222 <tr><td><tt>HTTP_SERVER_ERROR</tt> </td><td>Internal server error</td></tr>
223 <tr><td><tt>HTTP_SERVICE_UNAVAILABLE</tt> </td><td>Service is unavailable</td></tr>
224 <tr><td><tt>HTTP_SWITCHING_PROTOCOLS</tt> </td><td>HTTP upgrade to TLS/SSL</td></tr>
225 <tr><td><tt>HTTP_UNAUTHORIZED</tt> </td><td>Unauthorized to access host</td></tr>
226 <tr><td><tt>HTTP_UNSUPPORTED_MEDIATYPE</tt> </td><td>The requested media type is unsupported</td></tr>
227 <tr><td><tt>HTTP_UPGRADE_REQUIRED</tt> </td><td>Upgrade to SSL/TLS required</td></tr>
228 <tr><td><tt>HTTP_URI_TOO_LONG</tt> </td><td>URI too long</td></tr>
229 <tr><td><tt>HTTP_USE_PROXY</tt> </td><td>Must use a proxy to access this URI</td></tr>
230 </tbody></table></div>
231 <!-- NEW PAGE -->
232 <h3 class='title'><a name='ipp_res_e'>ipp_res_e</a></h3>
233 <h4>Description</h4>
234 <p>Types and structures...</p>
235 <h4>Values</h4>
236 <div class='table'><table align='center' border='1' width='80%'>
237 <thead><tr><th>Name</th><th>Description</th></tr></thead>
238 <tbody>
239 <tr><td><tt>IPP_RES_PER_CM</tt> </td><td>Pixels per centimeter</td></tr>
240 <tr><td><tt>IPP_RES_PER_INCH</tt> </td><td>Pixels per inch</td></tr>
241 </tbody></table></div>
242 <!-- NEW PAGE -->
243 <h3 class='title'><a name='ipp_status_e'>ipp_status_e</a></h3>
244 <h4>Description</h4>
245 <p>IPP status codes...</p>
246 <h4>Values</h4>
247 <div class='table'><table align='center' border='1' width='80%'>
248 <thead><tr><th>Name</th><th>Description</th></tr></thead>
249 <tbody>
250 <tr><td><tt>IPP_ATTRIBUTES</tt> </td><td>client-error-attributes-or-values-not-supported</td></tr>
251 <tr><td><tt>IPP_ATTRIBUTES_NOT_SETTABLE</tt> </td><td>client-error-attributes-not-settable</td></tr>
252 <tr><td><tt>IPP_BAD_REQUEST</tt> </td><td>client-error-bad-request</td></tr>
253 <tr><td><tt>IPP_CHARSET</tt> </td><td>client-error-charset-not-supported</td></tr>
254 <tr><td><tt>IPP_COMPRESSION_ERROR</tt> </td><td>client-error-compression-error</td></tr>
255 <tr><td><tt>IPP_COMPRESSION_NOT_SUPPORTED</tt> </td><td>client-error-compression-not-supported</td></tr>
256 <tr><td><tt>IPP_CONFLICT</tt> </td><td>client-error-conflicting-attributes</td></tr>
257 <tr><td><tt>IPP_DEVICE_ERROR</tt> </td><td>server-error-device-error</td></tr>
258 <tr><td><tt>IPP_DOCUMENT_ACCESS_ERROR</tt> </td><td>client-error-document-access-error</td></tr>
259 <tr><td><tt>IPP_DOCUMENT_FORMAT</tt> </td><td>client-error-document-format-not-supported</td></tr>
260 <tr><td><tt>IPP_DOCUMENT_FORMAT_ERROR</tt> </td><td>client-error-document-format-error</td></tr>
261 <tr><td><tt>IPP_ERROR_JOB_CANCELED</tt> </td><td>server-error-job-canceled</td></tr>
262 <tr><td><tt>IPP_FORBIDDEN</tt> </td><td>client-error-forbidden</td></tr>
263 <tr><td><tt>IPP_GONE</tt> </td><td>client-error-gone</td></tr>
264 <tr><td><tt>IPP_IGNORED_ALL_NOTIFICATIONS</tt> </td><td>client-error-ignored-all-notifications</td></tr>
265 <tr><td><tt>IPP_IGNORED_ALL_SUBSCRIPTIONS</tt> </td><td>client-error-ignored-all-subscriptions</td></tr>
266 <tr><td><tt>IPP_INTERNAL_ERROR</tt> </td><td>server-error-internal-error</td></tr>
267 <tr><td><tt>IPP_MULTIPLE_JOBS_NOT_SUPPORTED</tt> </td><td>server-error-multiple-document-jobs-not-supported</td></tr>
268 <tr><td><tt>IPP_NOT_ACCEPTING</tt> </td><td>server-error-not-accepting-jobs</td></tr>
269 <tr><td><tt>IPP_NOT_AUTHENTICATED</tt> </td><td>client-error-not-authenticated</td></tr>
270 <tr><td><tt>IPP_NOT_AUTHORIZED</tt> </td><td>client-error-not-authorized</td></tr>
271 <tr><td><tt>IPP_NOT_FOUND</tt> </td><td>client-error-not-found</td></tr>
272 <tr><td><tt>IPP_NOT_POSSIBLE</tt> </td><td>client-error-not-possible</td></tr>
273 <tr><td><tt>IPP_OK</tt> </td><td>successful-ok</td></tr>
274 <tr><td><tt>IPP_OK_BUT_CANCEL_SUBSCRIPTION</tt> </td><td>successful-ok-but-cancel-subscription</td></tr>
275 <tr><td><tt>IPP_OK_CONFLICT</tt> </td><td>successful-ok-conflicting-attributes</td></tr>
276 <tr><td><tt>IPP_OK_EVENTS_COMPLETE</tt> </td><td>successful-ok-events-complete</td></tr>
277 <tr><td><tt>IPP_OK_IGNORED_NOTIFICATIONS</tt> </td><td>successful-ok-ignored-notifications</td></tr>
278 <tr><td><tt>IPP_OK_IGNORED_SUBSCRIPTIONS</tt> </td><td>successful-ok-ignored-subscriptions</td></tr>
279 <tr><td><tt>IPP_OK_SUBST</tt> </td><td>successful-ok-ignored-or-substituted-attributes</td></tr>
280 <tr><td><tt>IPP_OK_TOO_MANY_EVENTS</tt> </td><td>successful-ok-too-many-events</td></tr>
281 <tr><td><tt>IPP_OPERATION_NOT_SUPPORTED</tt> </td><td>server-error-operation-not-supported</td></tr>
282 <tr><td><tt>IPP_PRINTER_BUSY</tt> </td><td>server-error-busy</td></tr>
283 <tr><td><tt>IPP_PRINTER_IS_DEACTIVATED</tt> </td><td>server-error-printer-is-deactivated</td></tr>
284 <tr><td><tt>IPP_PRINT_SUPPORT_FILE_NOT_FOUND</tt> </td><td>client-error-print-support-file-not-found</td></tr>
285 <tr><td><tt>IPP_REDIRECTION_OTHER_SITE</tt> </td><td></td></tr>
286 <tr><td><tt>IPP_REQUEST_ENTITY</tt> </td><td>client-error-request-entity-too-large</td></tr>
287 <tr><td><tt>IPP_REQUEST_VALUE</tt> </td><td>client-error-request-value-too-long</td></tr>
288 <tr><td><tt>IPP_SERVICE_UNAVAILABLE</tt> </td><td>server-error-service-unavailable</td></tr>
289 <tr><td><tt>IPP_TEMPORARY_ERROR</tt> </td><td>server-error-temporary-error</td></tr>
290 <tr><td><tt>IPP_TIMEOUT</tt> </td><td>client-error-timeout</td></tr>
291 <tr><td><tt>IPP_TOO_MANY_SUBSCRIPTIONS</tt> </td><td>client-error-too-many-subscriptions</td></tr>
292 <tr><td><tt>IPP_URI_SCHEME</tt> </td><td>client-error-uri-scheme-not-supported</td></tr>
293 <tr><td><tt>IPP_VERSION_NOT_SUPPORTED</tt> </td><td>server-error-version-not-supported</td></tr>
294 </tbody></table></div>
295 <!-- NEW PAGE -->
296 <h3 class='title'><a name='ipp_tag_e'>ipp_tag_e</a></h3>
297 <h4>Description</h4>
298 <p>Format tags for attributes...</p>
299 <h4>Values</h4>
300 <div class='table'><table align='center' border='1' width='80%'>
301 <thead><tr><th>Name</th><th>Description</th></tr></thead>
302 <tbody>
303 <tr><td><tt>IPP_TAG_ADMINDEFINE</tt> </td><td>Admin-defined value</td></tr>
304 <tr><td><tt>IPP_TAG_BEGIN_COLLECTION</tt> </td><td>Beginning of collection value</td></tr>
305 <tr><td><tt>IPP_TAG_BOOLEAN</tt> </td><td>Boolean value</td></tr>
306 <tr><td><tt>IPP_TAG_CHARSET</tt> </td><td>Character set value</td></tr>
307 <tr><td><tt>IPP_TAG_COPY</tt> </td><td>Bitflag for copied attribute values</td></tr>
308 <tr><td><tt>IPP_TAG_DATE</tt> </td><td>Date/time value</td></tr>
309 <tr><td><tt>IPP_TAG_DEFAULT</tt> </td><td>Default value</td></tr>
310 <tr><td><tt>IPP_TAG_DELETEATTR</tt> </td><td>Delete-attribute value</td></tr>
311 <tr><td><tt>IPP_TAG_END</tt> </td><td>End-of-attributes</td></tr>
312 <tr><td><tt>IPP_TAG_END_COLLECTION</tt> </td><td>End of collection value</td></tr>
313 <tr><td><tt>IPP_TAG_ENUM</tt> </td><td>Enumeration value</td></tr>
314 <tr><td><tt>IPP_TAG_EVENT_NOTIFICATION</tt> </td><td>Event group</td></tr>
315 <tr><td><tt>IPP_TAG_INTEGER</tt> </td><td>Integer value</td></tr>
316 <tr><td><tt>IPP_TAG_JOB</tt> </td><td>Job group</td></tr>
317 <tr><td><tt>IPP_TAG_KEYWORD</tt> </td><td>Keyword value</td></tr>
318 <tr><td><tt>IPP_TAG_LANGUAGE</tt> </td><td>Language value</td></tr>
319 <tr><td><tt>IPP_TAG_MASK</tt> </td><td>Mask for copied attribute values</td></tr>
320 <tr><td><tt>IPP_TAG_MEMBERNAME</tt> </td><td>Collection member name value</td></tr>
321 <tr><td><tt>IPP_TAG_MIMETYPE</tt> </td><td>MIME media type value</td></tr>
322 <tr><td><tt>IPP_TAG_NAME</tt> </td><td>Name value</td></tr>
323 <tr><td><tt>IPP_TAG_NAMELANG</tt> </td><td>Name-with-language value</td></tr>
324 <tr><td><tt>IPP_TAG_NOTSETTABLE</tt> </td><td>Not-settable value</td></tr>
325 <tr><td><tt>IPP_TAG_NOVALUE</tt> </td><td>No-value value</td></tr>
326 <tr><td><tt>IPP_TAG_OPERATION</tt> </td><td>Operation group</td></tr>
327 <tr><td><tt>IPP_TAG_PRINTER</tt> </td><td>Printer group</td></tr>
328 <tr><td><tt>IPP_TAG_RANGE</tt> </td><td>Range value</td></tr>
329 <tr><td><tt>IPP_TAG_RESOLUTION</tt> </td><td>Resolution value</td></tr>
330 <tr><td><tt>IPP_TAG_STRING</tt> </td><td>Octet string value</td></tr>
331 <tr><td><tt>IPP_TAG_SUBSCRIPTION</tt> </td><td>Subscription group</td></tr>
332 <tr><td><tt>IPP_TAG_TEXT</tt> </td><td>Text value</td></tr>
333 <tr><td><tt>IPP_TAG_TEXTLANG</tt> </td><td>Text-with-language value</td></tr>
334 <tr><td><tt>IPP_TAG_UNKNOWN</tt> </td><td>Unknown value</td></tr>
335 <tr><td><tt>IPP_TAG_UNSUPPORTED_GROUP</tt> </td><td>Unsupported attributes group</td></tr>
336 <tr><td><tt>IPP_TAG_UNSUPPORTED_VALUE</tt> </td><td>Unsupported value</td></tr>
337 <tr><td><tt>IPP_TAG_URI</tt> </td><td>URI value</td></tr>
338 <tr><td><tt>IPP_TAG_URISCHEME</tt> </td><td>URI scheme value</td></tr>
339 <tr><td><tt>IPP_TAG_ZERO</tt> </td><td>Zero tag - used for separators</td></tr>
340 </tbody></table></div>
341 <!-- NEW PAGE -->
342 <h2 class='title'><a name='FUNCTIONS'>Functions</a></h2>
343 <ul>
344 <li><a href='#cupsDoAuthentication'><tt>cupsDoAuthentication()</tt></a> <span class='info'>&nbsp;CUPS 1.1.20&nbsp;</span></li>
345 <li><a href='#cupsDoFileRequest'><tt>cupsDoFileRequest()</tt></a> </li>
346 <li><a href='#cupsDoRequest'><tt>cupsDoRequest()</tt></a> </li>
347 <li><a href='#cupsEncodeOptions'><tt>cupsEncodeOptions()</tt></a> </li>
348 <li><a href='#cupsEncodeOptions2'><tt>cupsEncodeOptions2()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
349 <li><a href='#httpAddrAny'><tt>httpAddrAny()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
350 <li><a href='#httpAddrEqual'><tt>httpAddrEqual()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
351 <li><a href='#httpAddrLength'><tt>httpAddrLength()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
352 <li><a href='#httpAddrLocalhost'><tt>httpAddrLocalhost()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
353 <li><a href='#httpAddrLookup'><tt>httpAddrLookup()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
354 <li><a href='#httpAddrString'><tt>httpAddrString()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
355 <li><a href='#httpAssembleURI'><tt>httpAssembleURI()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
356 <li><a href='#httpAssembleURIf'><tt>httpAssembleURIf()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
357 <li><a href='#httpBlocking'><tt>httpBlocking()</tt></a> </li>
358 <li><a href='#httpCheck'><tt>httpCheck()</tt></a> </li>
359 <li><a href='#httpClearCookie'><tt>httpClearCookie()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
360 <li><a href='#httpClearFields'><tt>httpClearFields()</tt></a> </li>
361 <li><a href='#httpClose'><tt>httpClose()</tt></a> </li>
362 <li><a href='#httpConnect'><tt>httpConnect()</tt></a> </li>
363 <li><a href='#httpConnectEncrypt'><tt>httpConnectEncrypt()</tt></a> </li>
364 <li><a href='#httpDecode64'><tt>httpDecode64()</tt></a> <span class='info'>&nbsp;DEPRECATED&nbsp;</span></li>
365 <li><a href='#httpDecode64_2'><tt>httpDecode64_2()</tt></a> <span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span></li>
366 <li><a href='#httpDelete'><tt>httpDelete()</tt></a> </li>
367 <li><a href='#httpEncode64'><tt>httpEncode64()</tt></a> <span class='info'>&nbsp;DEPRECATED&nbsp;</span></li>
368 <li><a href='#httpEncode64_2'><tt>httpEncode64_2()</tt></a> <span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span></li>
369 <li><a href='#httpEncryption'><tt>httpEncryption()</tt></a> </li>
370 <li><a href='#httpError'><tt>httpError()</tt></a> </li>
371 <li><a href='#httpFlush'><tt>httpFlush()</tt></a> </li>
372 <li><a href='#httpFlushWrite'><tt>httpFlushWrite()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
373 <li><a href='#httpGet'><tt>httpGet()</tt></a> </li>
374 <li><a href='#httpGetBlocking'><tt>httpGetBlocking()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
375 <li><a href='#httpGetCookie'><tt>httpGetCookie()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
376 <li><a href='#httpGetDateString'><tt>httpGetDateString()</tt></a> <span class='info'>&nbsp;DEPRECATED&nbsp;</span></li>
377 <li><a href='#httpGetDateString2'><tt>httpGetDateString2()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
378 <li><a href='#httpGetDateTime'><tt>httpGetDateTime()</tt></a> </li>
379 <li><a href='#httpGetFd'><tt>httpGetFd()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
380 <li><a href='#httpGetField'><tt>httpGetField()</tt></a> </li>
381 <li><a href='#httpGetHostByName'><tt>httpGetHostByName()</tt></a> <span class='info'>&nbsp;DEPRECATED&nbsp;</span></li>
382 <li><a href='#httpGetHostname'><tt>httpGetHostname()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
383 <li><a href='#httpGetLength'><tt>httpGetLength()</tt></a> <span class='info'>&nbsp;DEPRECATED&nbsp;</span></li>
384 <li><a href='#httpGetLength2'><tt>httpGetLength2()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
385 <li><a href='#httpGetStatus'><tt>httpGetStatus()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
386 <li><a href='#httpGetSubField'><tt>httpGetSubField()</tt></a> <span class='info'>&nbsp;DEPRECATED&nbsp;</span></li>
387 <li><a href='#httpGetSubField2'><tt>httpGetSubField2()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
388 <li><a href='#httpGets'><tt>httpGets()</tt></a> </li>
389 <li><a href='#httpHead'><tt>httpHead()</tt></a> </li>
390 <li><a href='#httpInitialize'><tt>httpInitialize()</tt></a> </li>
391 <li><a href='#httpMD5'><tt>httpMD5()</tt></a> </li>
392 <li><a href='#httpMD5Final'><tt>httpMD5Final()</tt></a> </li>
393 <li><a href='#httpMD5String'><tt>httpMD5String()</tt></a> </li>
394 <li><a href='#httpOptions'><tt>httpOptions()</tt></a> </li>
395 <li><a href='#httpPost'><tt>httpPost()</tt></a> </li>
396 <li><a href='#httpPut'><tt>httpPut()</tt></a> </li>
397 <li><a href='#httpRead'><tt>httpRead()</tt></a> <span class='info'>&nbsp;DEPRECATED&nbsp;</span></li>
398 <li><a href='#httpRead2'><tt>httpRead2()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
399 <li><a href='#httpReconnect'><tt>httpReconnect()</tt></a> </li>
400 <li><a href='#httpSeparate'><tt>httpSeparate()</tt></a> <span class='info'>&nbsp;DEPRECATED&nbsp;</span></li>
401 <li><a href='#httpSeparate2'><tt>httpSeparate2()</tt></a> <span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span></li>
402 <li><a href='#httpSeparateURI'><tt>httpSeparateURI()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
403 <li><a href='#httpSetCookie'><tt>httpSetCookie()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
404 <li><a href='#httpSetExpect'><tt>httpSetExpect()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
405 <li><a href='#httpSetField'><tt>httpSetField()</tt></a> </li>
406 <li><a href='#httpSetLength'><tt>httpSetLength()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
407 <li><a href='#httpStatus'><tt>httpStatus()</tt></a> </li>
408 <li><a href='#httpTrace'><tt>httpTrace()</tt></a> </li>
409 <li><a href='#httpUpdate'><tt>httpUpdate()</tt></a> </li>
410 <li><a href='#httpWait'><tt>httpWait()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
411 <li><a href='#httpWrite'><tt>httpWrite()</tt></a> <span class='info'>&nbsp;DEPRECATED&nbsp;</span></li>
412 <li><a href='#httpWrite2'><tt>httpWrite2()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
413 <li><a href='#ippAddBoolean'><tt>ippAddBoolean()</tt></a> </li>
414 <li><a href='#ippAddBooleans'><tt>ippAddBooleans()</tt></a> </li>
415 <li><a href='#ippAddCollection'><tt>ippAddCollection()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
416 <li><a href='#ippAddCollections'><tt>ippAddCollections()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
417 <li><a href='#ippAddDate'><tt>ippAddDate()</tt></a> </li>
418 <li><a href='#ippAddInteger'><tt>ippAddInteger()</tt></a> </li>
419 <li><a href='#ippAddIntegers'><tt>ippAddIntegers()</tt></a> </li>
420 <li><a href='#ippAddOctetString'><tt>ippAddOctetString()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
421 <li><a href='#ippAddRange'><tt>ippAddRange()</tt></a> </li>
422 <li><a href='#ippAddRanges'><tt>ippAddRanges()</tt></a> </li>
423 <li><a href='#ippAddResolution'><tt>ippAddResolution()</tt></a> </li>
424 <li><a href='#ippAddResolutions'><tt>ippAddResolutions()</tt></a> </li>
425 <li><a href='#ippAddSeparator'><tt>ippAddSeparator()</tt></a> </li>
426 <li><a href='#ippAddString'><tt>ippAddString()</tt></a> </li>
427 <li><a href='#ippAddStrings'><tt>ippAddStrings()</tt></a> </li>
428 <li><a href='#ippDateToTime'><tt>ippDateToTime()</tt></a> </li>
429 <li><a href='#ippDelete'><tt>ippDelete()</tt></a> </li>
430 <li><a href='#ippDeleteAttribute'><tt>ippDeleteAttribute()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
431 <li><a href='#ippErrorString'><tt>ippErrorString()</tt></a> </li>
432 <li><a href='#ippErrorValue'><tt>ippErrorValue()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
433 <li><a href='#ippFindAttribute'><tt>ippFindAttribute()</tt></a> </li>
434 <li><a href='#ippFindNextAttribute'><tt>ippFindNextAttribute()</tt></a> </li>
435 <li><a href='#ippLength'><tt>ippLength()</tt></a> </li>
436 <li><a href='#ippNew'><tt>ippNew()</tt></a> </li>
437 <li><a href='#ippNewRequest'><tt>ippNewRequest()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
438 <li><a href='#ippOpString'><tt>ippOpString()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
439 <li><a href='#ippOpValue'><tt>ippOpValue()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
440 <li><a href='#ippPort'><tt>ippPort()</tt></a> </li>
441 <li><a href='#ippRead'><tt>ippRead()</tt></a> </li>
442 <li><a href='#ippReadFile'><tt>ippReadFile()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
443 <li><a href='#ippReadIO'><tt>ippReadIO()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
444 <li><a href='#ippSetPort'><tt>ippSetPort()</tt></a> </li>
445 <li><a href='#ippTimeToDate'><tt>ippTimeToDate()</tt></a> </li>
446 <li><a href='#ippWrite'><tt>ippWrite()</tt></a> </li>
447 <li><a href='#ippWriteFile'><tt>ippWriteFile()</tt></a> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></li>
448 <li><a href='#ippWriteIO'><tt>ippWriteIO()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
449 </ul>
450 <!-- NEW PAGE -->
451 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.20&nbsp;</span><a name='cupsDoAuthentication'>cupsDoAuthentication()</a></h3>
452 <h4>Description</h4>
453 <p>Authenticate a request.
454
455 This function should be called in response to a HTTP_UNAUTHORIZED
456 status, prior to resubmitting your request.
457
458 </p>
459 <h4>Syntax</h4>
460 <pre>
461 int
462 cupsDoAuthentication(
463 <a href='#http_t'>http_t</a> * http,
464 const char * method,
465 const char * resource);
466 </pre>
467 <h4>Arguments</h4>
468 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
469 <thead><tr><th>Name</th><th>Description</th></tr></thead>
470 <tbody>
471 <tr><td><tt>http</tt></td><td>HTTP connection to server</td></tr>
472 <tr><td><tt>method</tt></td><td>Request method (GET, POST, PUT)</td></tr>
473 <tr><td><tt>resource</tt></td><td>Resource path</td></tr>
474 </tbody></table></div>
475 <h4>Returns</h4>
476 <p>0 on success, -1 on error</p>
477 <!-- NEW PAGE -->
478 <h3 class='title'><a name='cupsDoFileRequest'>cupsDoFileRequest()</a></h3>
479 <h4>Description</h4>
480 <p>Do an IPP request with a file.
481
482 This function sends the IPP request to the specified server, retrying
483 and authenticating as necessary. The request is freed with ippDelete()
484 after receiving a valid IPP response.</p>
485 <h4>Syntax</h4>
486 <pre>
487 <a href='#ipp_t'>ipp_t</a> *
488 cupsDoFileRequest(
489 <a href='#http_t'>http_t</a> * http,
490 <a href='#ipp_t'>ipp_t</a> * request,
491 const char * resource,
492 const char * filename);
493 </pre>
494 <h4>Arguments</h4>
495 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
496 <thead><tr><th>Name</th><th>Description</th></tr></thead>
497 <tbody>
498 <tr><td><tt>http</tt></td><td>HTTP connection to server</td></tr>
499 <tr><td><tt>request</tt></td><td>IPP request</td></tr>
500 <tr><td><tt>resource</tt></td><td>HTTP resource for POST</td></tr>
501 <tr><td><tt>filename</tt></td><td>File to send or NULL for none</td></tr>
502 </tbody></table></div>
503 <h4>Returns</h4>
504 <p>Response data</p>
505 <!-- NEW PAGE -->
506 <h3 class='title'><a name='cupsDoRequest'>cupsDoRequest()</a></h3>
507 <h4>Description</h4>
508 <p>Do an IPP request.
509
510 This function sends the IPP request to the specified server, retrying
511 and authenticating as necessary. The request is freed with ippDelete()
512 after receiving a valid IPP response.</p>
513 <h4>Syntax</h4>
514 <pre>
515 <a href='#ipp_t'>ipp_t</a> *
516 cupsDoRequest(
517 <a href='#http_t'>http_t</a> * http,
518 <a href='#ipp_t'>ipp_t</a> * request,
519 const char * resource);
520 </pre>
521 <h4>Arguments</h4>
522 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
523 <thead><tr><th>Name</th><th>Description</th></tr></thead>
524 <tbody>
525 <tr><td><tt>http</tt></td><td>HTTP connection to server</td></tr>
526 <tr><td><tt>request</tt></td><td>IPP request</td></tr>
527 <tr><td><tt>resource</tt></td><td>HTTP resource for POST</td></tr>
528 </tbody></table></div>
529 <h4>Returns</h4>
530 <p>Response data</p>
531 <!-- NEW PAGE -->
532 <h3 class='title'><a name='cupsEncodeOptions'>cupsEncodeOptions()</a></h3>
533 <h4>Description</h4>
534 <p>Encode printer options into IPP attributes.
535
536 This function adds operation, job, and then subscription attributes,
537 in that order. Use the cupsEncodeOptions2() function to add attributes
538 for a single group.</p>
539 <h4>Syntax</h4>
540 <pre>
541 void
542 cupsEncodeOptions(
543 <a href='#ipp_t'>ipp_t</a> * ipp,
544 int num_options,
545 cups_option_t * options);
546 </pre>
547 <h4>Arguments</h4>
548 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
549 <thead><tr><th>Name</th><th>Description</th></tr></thead>
550 <tbody>
551 <tr><td><tt>ipp</tt></td><td>Request to add to</td></tr>
552 <tr><td><tt>num_options</tt></td><td>Number of options</td></tr>
553 <tr><td><tt>options</tt></td><td>Options</td></tr>
554 </tbody></table></div>
555 <h4>Returns</h4>
556 <p>Nothing.</p>
557 <!-- NEW PAGE -->
558 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='cupsEncodeOptions2'>cupsEncodeOptions2()</a></h3>
559 <h4>Description</h4>
560 <p>Encode printer options into IPP attributes for a group.
561
562 This function only adds attributes for a single group. Call this
563 function multiple times for each group, or use cupsEncodeOptions()
564 to add the standard groups.
565
566 </p>
567 <h4>Syntax</h4>
568 <pre>
569 void
570 cupsEncodeOptions2(
571 <a href='#ipp_t'>ipp_t</a> * ipp,
572 int num_options,
573 cups_option_t * options,
574 ipp_tag_t group_tag);
575 </pre>
576 <h4>Arguments</h4>
577 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
578 <thead><tr><th>Name</th><th>Description</th></tr></thead>
579 <tbody>
580 <tr><td><tt>ipp</tt></td><td>Request to add to</td></tr>
581 <tr><td><tt>num_options</tt></td><td>Number of options</td></tr>
582 <tr><td><tt>options</tt></td><td>Options</td></tr>
583 <tr><td><tt>group_tag</tt></td><td>Group to encode</td></tr>
584 </tbody></table></div>
585 <h4>Returns</h4>
586 <p>Nothing.</p>
587 <!-- NEW PAGE -->
588 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpAddrAny'>httpAddrAny()</a></h3>
589 <h4>Description</h4>
590 <p>Check for the &quot;any&quot; address.
591
592 </p>
593 <h4>Syntax</h4>
594 <pre>
595 int
596 httpAddrAny(
597 const <a href='#http_addr_t'>http_addr_t</a> * addr);
598 </pre>
599 <h4>Arguments</h4>
600 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
601 <thead><tr><th>Name</th><th>Description</th></tr></thead>
602 <tbody>
603 <tr><td><tt>addr</tt></td><td>Address to check</td></tr>
604 </tbody></table></div>
605 <h4>Returns</h4>
606 <p>1 if &quot;any&quot;, 0 otherwise</p>
607 <!-- NEW PAGE -->
608 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpAddrEqual'>httpAddrEqual()</a></h3>
609 <h4>Description</h4>
610 <p>Compare two addresses.
611
612 </p>
613 <h4>Syntax</h4>
614 <pre>
615 int
616 httpAddrEqual(
617 const <a href='#http_addr_t'>http_addr_t</a> * addr1,
618 const <a href='#http_addr_t'>http_addr_t</a> * addr2);
619 </pre>
620 <h4>Arguments</h4>
621 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
622 <thead><tr><th>Name</th><th>Description</th></tr></thead>
623 <tbody>
624 <tr><td><tt>addr1</tt></td><td>First address</td></tr>
625 <tr><td><tt>addr2</tt></td><td>Second address</td></tr>
626 </tbody></table></div>
627 <h4>Returns</h4>
628 <p>1 if equal, 0 if not</p>
629 <!-- NEW PAGE -->
630 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpAddrLength'>httpAddrLength()</a></h3>
631 <h4>Description</h4>
632 <p>Return the length of the address in bytes.
633
634 </p>
635 <h4>Syntax</h4>
636 <pre>
637 int
638 httpAddrLength(
639 const <a href='#http_addr_t'>http_addr_t</a> * addr);
640 </pre>
641 <h4>Arguments</h4>
642 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
643 <thead><tr><th>Name</th><th>Description</th></tr></thead>
644 <tbody>
645 <tr><td><tt>addr</tt></td><td>Address</td></tr>
646 </tbody></table></div>
647 <h4>Returns</h4>
648 <p>Length in bytes</p>
649 <!-- NEW PAGE -->
650 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpAddrLocalhost'>httpAddrLocalhost()</a></h3>
651 <h4>Description</h4>
652 <p>Check for the local loopback address.
653
654 </p>
655 <h4>Syntax</h4>
656 <pre>
657 int
658 httpAddrLocalhost(
659 const <a href='#http_addr_t'>http_addr_t</a> * addr);
660 </pre>
661 <h4>Arguments</h4>
662 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
663 <thead><tr><th>Name</th><th>Description</th></tr></thead>
664 <tbody>
665 <tr><td><tt>addr</tt></td><td>Address to check</td></tr>
666 </tbody></table></div>
667 <h4>Returns</h4>
668 <p>1 if local host, 0 otherwise</p>
669 <!-- NEW PAGE -->
670 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpAddrLookup'>httpAddrLookup()</a></h3>
671 <h4>Description</h4>
672 <p>Lookup the hostname associated with the address.
673
674 </p>
675 <h4>Syntax</h4>
676 <pre>
677 char *
678 httpAddrLookup(
679 const <a href='#http_addr_t'>http_addr_t</a> * addr,
680 char * name,
681 int namelen);
682 </pre>
683 <h4>Arguments</h4>
684 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
685 <thead><tr><th>Name</th><th>Description</th></tr></thead>
686 <tbody>
687 <tr><td><tt>addr</tt></td><td>Address to lookup</td></tr>
688 <tr><td><tt>name</tt></td><td>Host name buffer</td></tr>
689 <tr><td><tt>namelen</tt></td><td>Size of name buffer</td></tr>
690 </tbody></table></div>
691 <h4>Returns</h4>
692 <p>Host name</p>
693 <!-- NEW PAGE -->
694 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpAddrString'>httpAddrString()</a></h3>
695 <h4>Description</h4>
696 <p>Convert an address to a numeric string.
697
698 </p>
699 <h4>Syntax</h4>
700 <pre>
701 char *
702 httpAddrString(
703 const <a href='#http_addr_t'>http_addr_t</a> * addr,
704 char * s,
705 int slen);
706 </pre>
707 <h4>Arguments</h4>
708 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
709 <thead><tr><th>Name</th><th>Description</th></tr></thead>
710 <tbody>
711 <tr><td><tt>addr</tt></td><td>Address to convert</td></tr>
712 <tr><td><tt>s</tt></td><td>String buffer</td></tr>
713 <tr><td><tt>slen</tt></td><td>Length of string</td></tr>
714 </tbody></table></div>
715 <h4>Returns</h4>
716 <p>Numeric address string</p>
717 <!-- NEW PAGE -->
718 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpAssembleURI'>httpAssembleURI()</a></h3>
719 <h4>Description</h4>
720 <p>Assemble a uniform resource identifier from its
721 components.
722
723 This function escapes reserved characters in the URI depending on the
724 value of the &quot;encoding&quot; argument. You should use this function in
725 place of traditional string functions whenever you need to create a
726 URI string.
727
728 </p>
729 <h4>Syntax</h4>
730 <pre>
731 http_uri_status_t
732 httpAssembleURI(
733 http_uri_coding_t encoding,
734 char * uri,
735 int urilen,
736 const char * scheme,
737 const char * username,
738 const char * host,
739 int port,
740 const char * resource);
741 </pre>
742 <h4>Arguments</h4>
743 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
744 <thead><tr><th>Name</th><th>Description</th></tr></thead>
745 <tbody>
746 <tr><td><tt>encoding</tt></td><td>Encoding flags</td></tr>
747 <tr><td><tt>uri</tt></td><td>URI buffer</td></tr>
748 <tr><td><tt>urilen</tt></td><td>Size of URI buffer</td></tr>
749 <tr><td><tt>scheme</tt></td><td>Scheme name</td></tr>
750 <tr><td><tt>username</tt></td><td>Username</td></tr>
751 <tr><td><tt>host</tt></td><td>Hostname or address</td></tr>
752 <tr><td><tt>port</tt></td><td>Port number</td></tr>
753 <tr><td><tt>resource</tt></td><td>Resource</td></tr>
754 </tbody></table></div>
755 <h4>Returns</h4>
756 <p>URI status</p>
757 <!-- NEW PAGE -->
758 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpAssembleURIf'>httpAssembleURIf()</a></h3>
759 <h4>Description</h4>
760 <p>Assemble a uniform resource identifier from its
761 components with a formatted resource.
762
763 This function creates a formatted version of the resource string
764 argument &quot;resourcef&quot; and escapes reserved characters in the URI
765 depending on the value of the &quot;encoding&quot; argument. You should use
766 this function in place of traditional string functions whenever
767 you need to create a URI string.
768
769 </p>
770 <h4>Syntax</h4>
771 <pre>
772 http_uri_status_t
773 httpAssembleURIf(
774 http_uri_coding_t encoding,
775 char * uri,
776 int urilen,
777 const char * scheme,
778 const char * username,
779 const char * host,
780 int port,
781 const char * resourcef,
782 ...);
783 </pre>
784 <h4>Arguments</h4>
785 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
786 <thead><tr><th>Name</th><th>Description</th></tr></thead>
787 <tbody>
788 <tr><td><tt>encoding</tt></td><td>Encoding flags</td></tr>
789 <tr><td><tt>uri</tt></td><td>URI buffer</td></tr>
790 <tr><td><tt>urilen</tt></td><td>Size of URI buffer</td></tr>
791 <tr><td><tt>scheme</tt></td><td>Scheme name</td></tr>
792 <tr><td><tt>username</tt></td><td>Username</td></tr>
793 <tr><td><tt>host</tt></td><td>Hostname or address</td></tr>
794 <tr><td><tt>port</tt></td><td>Port number</td></tr>
795 <tr><td><tt>resourcef</tt></td><td>Printf-style resource</td></tr>
796 <tr><td><tt>...</tt></td><td>Additional arguments as needed</td></tr>
797 </tbody></table></div>
798 <h4>Returns</h4>
799 <p>URI status</p>
800 <!-- NEW PAGE -->
801 <h3 class='title'><a name='httpBlocking'>httpBlocking()</a></h3>
802 <h4>Description</h4>
803 <p>Set blocking/non-blocking behavior on a connection.</p>
804 <h4>Syntax</h4>
805 <pre>
806 void
807 httpBlocking(
808 <a href='#http_t'>http_t</a> * http,
809 int b);
810 </pre>
811 <h4>Arguments</h4>
812 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
813 <thead><tr><th>Name</th><th>Description</th></tr></thead>
814 <tbody>
815 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
816 <tr><td><tt>b</tt></td><td>1 = blocking, 0 = non-blocking</td></tr>
817 </tbody></table></div>
818 <h4>Returns</h4>
819 <p>Nothing.</p>
820 <!-- NEW PAGE -->
821 <h3 class='title'><a name='httpCheck'>httpCheck()</a></h3>
822 <h4>Description</h4>
823 <p>Check to see if there is a pending response from the server.</p>
824 <h4>Syntax</h4>
825 <pre>
826 int
827 httpCheck(
828 <a href='#http_t'>http_t</a> * http);
829 </pre>
830 <h4>Arguments</h4>
831 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
832 <thead><tr><th>Name</th><th>Description</th></tr></thead>
833 <tbody>
834 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
835 </tbody></table></div>
836 <h4>Returns</h4>
837 <p>0 = no data, 1 = data available</p>
838 <!-- NEW PAGE -->
839 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='httpClearCookie'>httpClearCookie()</a></h3>
840 <h4>Description</h4>
841 <p>Clear the cookie value(s).
842
843 </p>
844 <h4>Syntax</h4>
845 <pre>
846 void
847 httpClearCookie(
848 <a href='#http_t'>http_t</a> * http);
849 </pre>
850 <h4>Arguments</h4>
851 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
852 <thead><tr><th>Name</th><th>Description</th></tr></thead>
853 <tbody>
854 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
855 </tbody></table></div>
856 <h4>Returns</h4>
857 <p>Nothing.</p>
858 <!-- NEW PAGE -->
859 <h3 class='title'><a name='httpClearFields'>httpClearFields()</a></h3>
860 <h4>Description</h4>
861 <p>Clear HTTP request fields.</p>
862 <h4>Syntax</h4>
863 <pre>
864 void
865 httpClearFields(
866 <a href='#http_t'>http_t</a> * http);
867 </pre>
868 <h4>Arguments</h4>
869 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
870 <thead><tr><th>Name</th><th>Description</th></tr></thead>
871 <tbody>
872 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
873 </tbody></table></div>
874 <h4>Returns</h4>
875 <p>Nothing.</p>
876 <!-- NEW PAGE -->
877 <h3 class='title'><a name='httpClose'>httpClose()</a></h3>
878 <h4>Description</h4>
879 <p>Close an HTTP connection...</p>
880 <h4>Syntax</h4>
881 <pre>
882 void
883 httpClose(
884 <a href='#http_t'>http_t</a> * http);
885 </pre>
886 <h4>Arguments</h4>
887 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
888 <thead><tr><th>Name</th><th>Description</th></tr></thead>
889 <tbody>
890 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
891 </tbody></table></div>
892 <h4>Returns</h4>
893 <p>Nothing.</p>
894 <!-- NEW PAGE -->
895 <h3 class='title'><a name='httpConnect'>httpConnect()</a></h3>
896 <h4>Description</h4>
897 <p>Connect to a HTTP server.</p>
898 <h4>Syntax</h4>
899 <pre>
900 <a href='#http_t'>http_t</a> *
901 httpConnect(
902 const char * host,
903 int port);
904 </pre>
905 <h4>Arguments</h4>
906 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
907 <thead><tr><th>Name</th><th>Description</th></tr></thead>
908 <tbody>
909 <tr><td><tt>host</tt></td><td>Host to connect to</td></tr>
910 <tr><td><tt>port</tt></td><td>Port number</td></tr>
911 </tbody></table></div>
912 <h4>Returns</h4>
913 <p>New HTTP connection</p>
914 <!-- NEW PAGE -->
915 <h3 class='title'><a name='httpConnectEncrypt'>httpConnectEncrypt()</a></h3>
916 <h4>Description</h4>
917 <p>Connect to a HTTP server using encryption.</p>
918 <h4>Syntax</h4>
919 <pre>
920 <a href='#http_t'>http_t</a> *
921 httpConnectEncrypt(
922 const char * host,
923 int port,
924 <a href='#http_encryption_t'>http_encryption_t</a> encryption);
925 </pre>
926 <h4>Arguments</h4>
927 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
928 <thead><tr><th>Name</th><th>Description</th></tr></thead>
929 <tbody>
930 <tr><td><tt>host</tt></td><td>Host to connect to</td></tr>
931 <tr><td><tt>port</tt></td><td>Port number</td></tr>
932 <tr><td><tt>encryption</tt></td><td>Type of encryption to use</td></tr>
933 </tbody></table></div>
934 <h4>Returns</h4>
935 <p>New HTTP connection</p>
936 <!-- NEW PAGE -->
937 <h3 class='title'><span class='info'>&nbsp;DEPRECATED&nbsp;</span><a name='httpDecode64'>httpDecode64()</a></h3>
938 <h4>Description</h4>
939 <p>Base64-decode a string.
940
941 This function is deprecated. Use the httpDecode64_2() function instead
942 which provides buffer length arguments.
943
944 </p>
945 <h4>Syntax</h4>
946 <pre>
947 char *
948 httpDecode64(
949 char * out,
950 const char * in);
951 </pre>
952 <h4>Arguments</h4>
953 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
954 <thead><tr><th>Name</th><th>Description</th></tr></thead>
955 <tbody>
956 <tr><td><tt>out</tt></td><td>String to write to</td></tr>
957 <tr><td><tt>in</tt></td><td>String to read from</td></tr>
958 </tbody></table></div>
959 <h4>Returns</h4>
960 <p>Decoded string</p>
961 <!-- NEW PAGE -->
962 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span><a name='httpDecode64_2'>httpDecode64_2()</a></h3>
963 <h4>Description</h4>
964 <p>Base64-decode a string.
965
966 </p>
967 <h4>Syntax</h4>
968 <pre>
969 char *
970 httpDecode64_2(
971 char * out,
972 int * outlen,
973 const char * in);
974 </pre>
975 <h4>Arguments</h4>
976 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
977 <thead><tr><th>Name</th><th>Description</th></tr></thead>
978 <tbody>
979 <tr><td><tt>out</tt></td><td>String to write to</td></tr>
980 <tr><td><tt>outlen</tt></td><td>Size of output string</td></tr>
981 <tr><td><tt>in</tt></td><td>String to read from</td></tr>
982 </tbody></table></div>
983 <h4>Returns</h4>
984 <p>Decoded string</p>
985 <!-- NEW PAGE -->
986 <h3 class='title'><a name='httpDelete'>httpDelete()</a></h3>
987 <h4>Description</h4>
988 <p>Send a DELETE request to the server.</p>
989 <h4>Syntax</h4>
990 <pre>
991 int
992 httpDelete(
993 <a href='#http_t'>http_t</a> * http,
994 const char * uri);
995 </pre>
996 <h4>Arguments</h4>
997 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
998 <thead><tr><th>Name</th><th>Description</th></tr></thead>
999 <tbody>
1000 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1001 <tr><td><tt>uri</tt></td><td>URI to delete</td></tr>
1002 </tbody></table></div>
1003 <h4>Returns</h4>
1004 <p>Status of call (0 = success)</p>
1005 <!-- NEW PAGE -->
1006 <h3 class='title'><span class='info'>&nbsp;DEPRECATED&nbsp;</span><a name='httpEncode64'>httpEncode64()</a></h3>
1007 <h4>Description</h4>
1008 <p>Base64-encode a string.
1009
1010 This function is deprecated. Use the httpEncode64_2() function instead
1011 which provides buffer length arguments.
1012
1013 </p>
1014 <h4>Syntax</h4>
1015 <pre>
1016 char *
1017 httpEncode64(
1018 char * out,
1019 const char * in);
1020 </pre>
1021 <h4>Arguments</h4>
1022 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1023 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1024 <tbody>
1025 <tr><td><tt>out</tt></td><td>String to write to</td></tr>
1026 <tr><td><tt>in</tt></td><td>String to read from</td></tr>
1027 </tbody></table></div>
1028 <h4>Returns</h4>
1029 <p>Encoded string</p>
1030 <!-- NEW PAGE -->
1031 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span><a name='httpEncode64_2'>httpEncode64_2()</a></h3>
1032 <h4>Description</h4>
1033 <p>Base64-encode a string.
1034
1035 </p>
1036 <h4>Syntax</h4>
1037 <pre>
1038 char *
1039 httpEncode64_2(
1040 char * out,
1041 int outlen,
1042 const char * in,
1043 int inlen);
1044 </pre>
1045 <h4>Arguments</h4>
1046 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1047 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1048 <tbody>
1049 <tr><td><tt>out</tt></td><td>String to write to</td></tr>
1050 <tr><td><tt>outlen</tt></td><td>Size of output string</td></tr>
1051 <tr><td><tt>in</tt></td><td>String to read from</td></tr>
1052 <tr><td><tt>inlen</tt></td><td>Size of input string</td></tr>
1053 </tbody></table></div>
1054 <h4>Returns</h4>
1055 <p>Encoded string</p>
1056 <!-- NEW PAGE -->
1057 <h3 class='title'><a name='httpEncryption'>httpEncryption()</a></h3>
1058 <h4>Description</h4>
1059 <p>Set the required encryption on the link.</p>
1060 <h4>Syntax</h4>
1061 <pre>
1062 int
1063 httpEncryption(
1064 <a href='#http_t'>http_t</a> * http,
1065 <a href='#http_encryption_t'>http_encryption_t</a> e);
1066 </pre>
1067 <h4>Arguments</h4>
1068 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1069 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1070 <tbody>
1071 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1072 <tr><td><tt>e</tt></td><td>New encryption preference</td></tr>
1073 </tbody></table></div>
1074 <h4>Returns</h4>
1075 <p>-1 on error, 0 on success</p>
1076 <!-- NEW PAGE -->
1077 <h3 class='title'><a name='httpError'>httpError()</a></h3>
1078 <h4>Description</h4>
1079 <p>Get the last error on a connection.</p>
1080 <h4>Syntax</h4>
1081 <pre>
1082 int
1083 httpError(
1084 <a href='#http_t'>http_t</a> * http);
1085 </pre>
1086 <h4>Arguments</h4>
1087 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1088 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1089 <tbody>
1090 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1091 </tbody></table></div>
1092 <h4>Returns</h4>
1093 <p>Error code (errno) value</p>
1094 <!-- NEW PAGE -->
1095 <h3 class='title'><a name='httpFlush'>httpFlush()</a></h3>
1096 <h4>Description</h4>
1097 <p>Flush data from a HTTP connection.</p>
1098 <h4>Syntax</h4>
1099 <pre>
1100 void
1101 httpFlush(
1102 <a href='#http_t'>http_t</a> * http);
1103 </pre>
1104 <h4>Arguments</h4>
1105 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1106 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1107 <tbody>
1108 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1109 </tbody></table></div>
1110 <h4>Returns</h4>
1111 <p>Nothing.</p>
1112 <!-- NEW PAGE -->
1113 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpFlushWrite'>httpFlushWrite()</a></h3>
1114 <h4>Description</h4>
1115 <p>Flush data in write buffer.
1116
1117 </p>
1118 <h4>Syntax</h4>
1119 <pre>
1120 int
1121 httpFlushWrite(
1122 <a href='#http_t'>http_t</a> * http);
1123 </pre>
1124 <h4>Arguments</h4>
1125 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1126 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1127 <tbody>
1128 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1129 </tbody></table></div>
1130 <h4>Returns</h4>
1131 <p>Bytes written or -1 on error</p>
1132 <!-- NEW PAGE -->
1133 <h3 class='title'><a name='httpGet'>httpGet()</a></h3>
1134 <h4>Description</h4>
1135 <p>Send a GET request to the server.</p>
1136 <h4>Syntax</h4>
1137 <pre>
1138 int
1139 httpGet(
1140 <a href='#http_t'>http_t</a> * http,
1141 const char * uri);
1142 </pre>
1143 <h4>Arguments</h4>
1144 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1145 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1146 <tbody>
1147 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1148 <tr><td><tt>uri</tt></td><td>URI to get</td></tr>
1149 </tbody></table></div>
1150 <h4>Returns</h4>
1151 <p>Status of call (0 = success)</p>
1152 <!-- NEW PAGE -->
1153 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpGetBlocking'>httpGetBlocking()</a></h3>
1154 <h4>Description</h4>
1155 <p>Get the blocking/non-block state of a connection.
1156
1157 </p>
1158 <h4>Syntax</h4>
1159 <pre>
1160 int
1161 httpGetBlocking(
1162 <a href='#http_t'>http_t</a> * http);
1163 </pre>
1164 <h4>Arguments</h4>
1165 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1166 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1167 <tbody>
1168 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1169 </tbody></table></div>
1170 <h4>Returns</h4>
1171 <p>1 if blocking, 0 if non-blocking</p>
1172 <!-- NEW PAGE -->
1173 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='httpGetCookie'>httpGetCookie()</a></h3>
1174 <h4>Description</h4>
1175 <p>Get any cookie data from the response.
1176
1177 </p>
1178 <h4>Syntax</h4>
1179 <pre>
1180 const char *
1181 httpGetCookie(
1182 <a href='#http_t'>http_t</a> * http);
1183 </pre>
1184 <h4>Arguments</h4>
1185 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1186 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1187 <tbody>
1188 <tr><td><tt>http</tt></td><td>HTTP connecion</td></tr>
1189 </tbody></table></div>
1190 <h4>Returns</h4>
1191 <p>Cookie data or NULL</p>
1192 <!-- NEW PAGE -->
1193 <h3 class='title'><span class='info'>&nbsp;DEPRECATED&nbsp;</span><a name='httpGetDateString'>httpGetDateString()</a></h3>
1194 <h4>Description</h4>
1195 <p>Get a formatted date/time string from a time value.
1196
1197 </p>
1198 <h4>Syntax</h4>
1199 <pre>
1200 const char *
1201 httpGetDateString(
1202 time_t t);
1203 </pre>
1204 <h4>Arguments</h4>
1205 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1206 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1207 <tbody>
1208 <tr><td><tt>t</tt></td><td>UNIX time</td></tr>
1209 </tbody></table></div>
1210 <h4>Returns</h4>
1211 <p>Date/time string</p>
1212 <!-- NEW PAGE -->
1213 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpGetDateString2'>httpGetDateString2()</a></h3>
1214 <h4>Description</h4>
1215 <p>Get a formatted date/time string from a time value.
1216
1217 </p>
1218 <h4>Syntax</h4>
1219 <pre>
1220 const char *
1221 httpGetDateString2(
1222 time_t t,
1223 char * s,
1224 int slen);
1225 </pre>
1226 <h4>Arguments</h4>
1227 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1228 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1229 <tbody>
1230 <tr><td><tt>t</tt></td><td>UNIX time</td></tr>
1231 <tr><td><tt>s</tt></td><td>String buffer</td></tr>
1232 <tr><td><tt>slen</tt></td><td>Size of string buffer</td></tr>
1233 </tbody></table></div>
1234 <h4>Returns</h4>
1235 <p>Date/time string</p>
1236 <!-- NEW PAGE -->
1237 <h3 class='title'><a name='httpGetDateTime'>httpGetDateTime()</a></h3>
1238 <h4>Description</h4>
1239 <p>Get a time value from a formatted date/time string.</p>
1240 <h4>Syntax</h4>
1241 <pre>
1242 time_t
1243 httpGetDateTime(
1244 const char * s);
1245 </pre>
1246 <h4>Arguments</h4>
1247 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1248 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1249 <tbody>
1250 <tr><td><tt>s</tt></td><td>Date/time string</td></tr>
1251 </tbody></table></div>
1252 <h4>Returns</h4>
1253 <p>UNIX time</p>
1254 <!-- NEW PAGE -->
1255 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpGetFd'>httpGetFd()</a></h3>
1256 <h4>Description</h4>
1257 <p>Get the file descriptor associated with a connection.
1258
1259 </p>
1260 <h4>Syntax</h4>
1261 <pre>
1262 int
1263 httpGetFd(
1264 <a href='#http_t'>http_t</a> * http);
1265 </pre>
1266 <h4>Arguments</h4>
1267 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1268 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1269 <tbody>
1270 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1271 </tbody></table></div>
1272 <h4>Returns</h4>
1273 <p>File descriptor or -1 if none</p>
1274 <!-- NEW PAGE -->
1275 <h3 class='title'><a name='httpGetField'>httpGetField()</a></h3>
1276 <h4>Description</h4>
1277 <p>Get a field value from a request/response.</p>
1278 <h4>Syntax</h4>
1279 <pre>
1280 const char *
1281 httpGetField(
1282 <a href='#http_t'>http_t</a> * http,
1283 http_field_t field);
1284 </pre>
1285 <h4>Arguments</h4>
1286 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1287 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1288 <tbody>
1289 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1290 <tr><td><tt>field</tt></td><td>Field to get</td></tr>
1291 </tbody></table></div>
1292 <h4>Returns</h4>
1293 <p>Field value</p>
1294 <!-- NEW PAGE -->
1295 <h3 class='title'><span class='info'>&nbsp;DEPRECATED&nbsp;</span><a name='httpGetHostByName'>httpGetHostByName()</a></h3>
1296 <h4>Description</h4>
1297 <p>Lookup a hostname or IPv4 address, and return
1298 address records for the specified name.
1299
1300 </p>
1301 <h4>Syntax</h4>
1302 <pre>
1303 struct hostent *
1304 httpGetHostByName(
1305 const char * name);
1306 </pre>
1307 <h4>Arguments</h4>
1308 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1309 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1310 <tbody>
1311 <tr><td><tt>name</tt></td><td>Hostname or IP address</td></tr>
1312 </tbody></table></div>
1313 <h4>Returns</h4>
1314 <p>Host entry</p>
1315 <!-- NEW PAGE -->
1316 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpGetHostname'>httpGetHostname()</a></h3>
1317 <h4>Description</h4>
1318 <p>Get the FQDN for the connection or local system.
1319
1320 When &quot;http&quot; points to a connected socket, return the hostname or
1321 address that was used in the call to httpConnect() or httpConnectEncrypt().
1322 Otherwise, return the FQDN for the local system using both gethostname()
1323 and gethostbyname() to get the local hostname with domain.
1324
1325 </p>
1326 <h4>Syntax</h4>
1327 <pre>
1328 const char *
1329 httpGetHostname(
1330 <a href='#http_t'>http_t</a> * http,
1331 char * s,
1332 int slen);
1333 </pre>
1334 <h4>Arguments</h4>
1335 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1336 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1337 <tbody>
1338 <tr><td><tt>http</tt></td><td>HTTP connection or NULL</td></tr>
1339 <tr><td><tt>s</tt></td><td>String buffer for name</td></tr>
1340 <tr><td><tt>slen</tt></td><td>Size of buffer</td></tr>
1341 </tbody></table></div>
1342 <h4>Returns</h4>
1343 <p>FQDN for connection or system</p>
1344 <!-- NEW PAGE -->
1345 <h3 class='title'><span class='info'>&nbsp;DEPRECATED&nbsp;</span><a name='httpGetLength'>httpGetLength()</a></h3>
1346 <h4>Description</h4>
1347 <p>Get the amount of data remaining from the
1348 content-length or transfer-encoding fields.
1349
1350 This function is deprecated and will not return lengths larger than
1351 2^31 - 1; use httpGetLength2() instead.
1352
1353 </p>
1354 <h4>Syntax</h4>
1355 <pre>
1356 int
1357 httpGetLength(
1358 <a href='#http_t'>http_t</a> * http);
1359 </pre>
1360 <h4>Arguments</h4>
1361 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1362 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1363 <tbody>
1364 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1365 </tbody></table></div>
1366 <h4>Returns</h4>
1367 <p>Content length</p>
1368 <!-- NEW PAGE -->
1369 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpGetLength2'>httpGetLength2()</a></h3>
1370 <h4>Description</h4>
1371 <p>Get the amount of data remaining from the
1372 content-length or transfer-encoding fields.
1373
1374 This function returns the complete content length, even for
1375 content larger than 2^31 - 1.
1376
1377 </p>
1378 <h4>Syntax</h4>
1379 <pre>
1380 off_t
1381 httpGetLength2(
1382 <a href='#http_t'>http_t</a> * http);
1383 </pre>
1384 <h4>Arguments</h4>
1385 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1386 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1387 <tbody>
1388 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1389 </tbody></table></div>
1390 <h4>Returns</h4>
1391 <p>Content length</p>
1392 <!-- NEW PAGE -->
1393 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpGetStatus'>httpGetStatus()</a></h3>
1394 <h4>Description</h4>
1395 <p>Get the status of the last HTTP request.
1396
1397 </p>
1398 <h4>Syntax</h4>
1399 <pre>
1400 http_status_t
1401 httpGetStatus(
1402 <a href='#http_t'>http_t</a> * http);
1403 </pre>
1404 <h4>Arguments</h4>
1405 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1406 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1407 <tbody>
1408 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1409 </tbody></table></div>
1410 <h4>Returns</h4>
1411 <p>HTTP status</p>
1412 <!-- NEW PAGE -->
1413 <h3 class='title'><span class='info'>&nbsp;DEPRECATED&nbsp;</span><a name='httpGetSubField'>httpGetSubField()</a></h3>
1414 <h4>Description</h4>
1415 <p>Get a sub-field value.
1416
1417 </p>
1418 <h4>Syntax</h4>
1419 <pre>
1420 char *
1421 httpGetSubField(
1422 <a href='#http_t'>http_t</a> * http,
1423 http_field_t field,
1424 const char * name,
1425 char * value);
1426 </pre>
1427 <h4>Arguments</h4>
1428 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1429 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1430 <tbody>
1431 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1432 <tr><td><tt>field</tt></td><td>Field index</td></tr>
1433 <tr><td><tt>name</tt></td><td>Name of sub-field</td></tr>
1434 <tr><td><tt>value</tt></td><td>Value string</td></tr>
1435 </tbody></table></div>
1436 <h4>Returns</h4>
1437 <p>Value or NULL</p>
1438 <!-- NEW PAGE -->
1439 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpGetSubField2'>httpGetSubField2()</a></h3>
1440 <h4>Description</h4>
1441 <p>Get a sub-field value.
1442
1443 </p>
1444 <h4>Syntax</h4>
1445 <pre>
1446 char *
1447 httpGetSubField2(
1448 <a href='#http_t'>http_t</a> * http,
1449 http_field_t field,
1450 const char * name,
1451 char * value,
1452 int valuelen);
1453 </pre>
1454 <h4>Arguments</h4>
1455 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1456 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1457 <tbody>
1458 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1459 <tr><td><tt>field</tt></td><td>Field index</td></tr>
1460 <tr><td><tt>name</tt></td><td>Name of sub-field</td></tr>
1461 <tr><td><tt>value</tt></td><td>Value string</td></tr>
1462 <tr><td><tt>valuelen</tt></td><td>Size of value buffer</td></tr>
1463 </tbody></table></div>
1464 <h4>Returns</h4>
1465 <p>Value or NULL</p>
1466 <!-- NEW PAGE -->
1467 <h3 class='title'><a name='httpGets'>httpGets()</a></h3>
1468 <h4>Description</h4>
1469 <p>Get a line of text from a HTTP connection.</p>
1470 <h4>Syntax</h4>
1471 <pre>
1472 char *
1473 httpGets(
1474 char * line,
1475 int length,
1476 <a href='#http_t'>http_t</a> * http);
1477 </pre>
1478 <h4>Arguments</h4>
1479 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1480 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1481 <tbody>
1482 <tr><td><tt>line</tt></td><td>Line to read into</td></tr>
1483 <tr><td><tt>length</tt></td><td>Max length of buffer</td></tr>
1484 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1485 </tbody></table></div>
1486 <h4>Returns</h4>
1487 <p>Line or NULL</p>
1488 <!-- NEW PAGE -->
1489 <h3 class='title'><a name='httpHead'>httpHead()</a></h3>
1490 <h4>Description</h4>
1491 <p>Send a HEAD request to the server.</p>
1492 <h4>Syntax</h4>
1493 <pre>
1494 int
1495 httpHead(
1496 <a href='#http_t'>http_t</a> * http,
1497 const char * uri);
1498 </pre>
1499 <h4>Arguments</h4>
1500 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1501 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1502 <tbody>
1503 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1504 <tr><td><tt>uri</tt></td><td>URI for head</td></tr>
1505 </tbody></table></div>
1506 <h4>Returns</h4>
1507 <p>Status of call (0 = success)</p>
1508 <!-- NEW PAGE -->
1509 <h3 class='title'><a name='httpInitialize'>httpInitialize()</a></h3>
1510 <h4>Description</h4>
1511 <p>Initialize the HTTP interface library and set the
1512 default HTTP proxy (if any).</p>
1513 <h4>Syntax</h4>
1514 <pre>
1515 void
1516 httpInitialize(void);
1517 </pre>
1518 <h4>Arguments</h4>
1519 <p>None.</p>
1520 <h4>Returns</h4>
1521 <p>Nothing.</p>
1522 <!-- NEW PAGE -->
1523 <h3 class='title'><a name='httpMD5'>httpMD5()</a></h3>
1524 <h4>Description</h4>
1525 <p>Compute the MD5 sum of the username:group:password.</p>
1526 <h4>Syntax</h4>
1527 <pre>
1528 char *
1529 httpMD5(
1530 const char * username,
1531 const char * realm,
1532 const char * passwd,
1533 char md5[33]);
1534 </pre>
1535 <h4>Arguments</h4>
1536 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1537 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1538 <tbody>
1539 <tr><td><tt>username</tt></td><td>User name</td></tr>
1540 <tr><td><tt>realm</tt></td><td>Realm name</td></tr>
1541 <tr><td><tt>passwd</tt></td><td>Password string</td></tr>
1542 <tr><td><tt>md5[33]</tt></td><td>MD5 string</td></tr>
1543 </tbody></table></div>
1544 <h4>Returns</h4>
1545 <p>MD5 sum</p>
1546 <!-- NEW PAGE -->
1547 <h3 class='title'><a name='httpMD5Final'>httpMD5Final()</a></h3>
1548 <h4>Description</h4>
1549 <p>Combine the MD5 sum of the username, group, and password
1550 with the server-supplied nonce value, method, and
1551 request-uri.</p>
1552 <h4>Syntax</h4>
1553 <pre>
1554 char *
1555 httpMD5Final(
1556 const char * nonce,
1557 const char * method,
1558 const char * resource,
1559 char md5[33]);
1560 </pre>
1561 <h4>Arguments</h4>
1562 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1563 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1564 <tbody>
1565 <tr><td><tt>nonce</tt></td><td>Server nonce value</td></tr>
1566 <tr><td><tt>method</tt></td><td>METHOD (GET, POST, etc.)</td></tr>
1567 <tr><td><tt>resource</tt></td><td>Resource path</td></tr>
1568 <tr><td><tt>md5[33]</tt></td><td>MD5 sum</td></tr>
1569 </tbody></table></div>
1570 <h4>Returns</h4>
1571 <p>New sum</p>
1572 <!-- NEW PAGE -->
1573 <h3 class='title'><a name='httpMD5String'>httpMD5String()</a></h3>
1574 <h4>Description</h4>
1575 <p>Convert an MD5 sum to a character string.</p>
1576 <h4>Syntax</h4>
1577 <pre>
1578 char *
1579 httpMD5String(
1580 const unsigned char * sum,
1581 char md5[33]);
1582 </pre>
1583 <h4>Arguments</h4>
1584 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1585 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1586 <tbody>
1587 <tr><td><tt>sum</tt></td><td>MD5 sum data</td></tr>
1588 <tr><td><tt>md5[33]</tt></td><td>MD5 sum in hex</td></tr>
1589 </tbody></table></div>
1590 <h4>Returns</h4>
1591 <p>MD5 sum in hex</p>
1592 <!-- NEW PAGE -->
1593 <h3 class='title'><a name='httpOptions'>httpOptions()</a></h3>
1594 <h4>Description</h4>
1595 <p>Send an OPTIONS request to the server.</p>
1596 <h4>Syntax</h4>
1597 <pre>
1598 int
1599 httpOptions(
1600 <a href='#http_t'>http_t</a> * http,
1601 const char * uri);
1602 </pre>
1603 <h4>Arguments</h4>
1604 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1605 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1606 <tbody>
1607 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1608 <tr><td><tt>uri</tt></td><td>URI for options</td></tr>
1609 </tbody></table></div>
1610 <h4>Returns</h4>
1611 <p>Status of call (0 = success)</p>
1612 <!-- NEW PAGE -->
1613 <h3 class='title'><a name='httpPost'>httpPost()</a></h3>
1614 <h4>Description</h4>
1615 <p>Send a POST request to the server.</p>
1616 <h4>Syntax</h4>
1617 <pre>
1618 int
1619 httpPost(
1620 <a href='#http_t'>http_t</a> * http,
1621 const char * uri);
1622 </pre>
1623 <h4>Arguments</h4>
1624 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1625 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1626 <tbody>
1627 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1628 <tr><td><tt>uri</tt></td><td>URI for post</td></tr>
1629 </tbody></table></div>
1630 <h4>Returns</h4>
1631 <p>Status of call (0 = success)</p>
1632 <!-- NEW PAGE -->
1633 <h3 class='title'><a name='httpPut'>httpPut()</a></h3>
1634 <h4>Description</h4>
1635 <p>Send a PUT request to the server.</p>
1636 <h4>Syntax</h4>
1637 <pre>
1638 int
1639 httpPut(
1640 <a href='#http_t'>http_t</a> * http,
1641 const char * uri);
1642 </pre>
1643 <h4>Arguments</h4>
1644 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1645 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1646 <tbody>
1647 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1648 <tr><td><tt>uri</tt></td><td>URI to put</td></tr>
1649 </tbody></table></div>
1650 <h4>Returns</h4>
1651 <p>Status of call (0 = success)</p>
1652 <!-- NEW PAGE -->
1653 <h3 class='title'><span class='info'>&nbsp;DEPRECATED&nbsp;</span><a name='httpRead'>httpRead()</a></h3>
1654 <h4>Description</h4>
1655 <p>Read data from a HTTP connection.
1656
1657 This function is deprecated. Use the httpRead2() function which can
1658 read more than 2GB of data.
1659
1660 </p>
1661 <h4>Syntax</h4>
1662 <pre>
1663 int
1664 httpRead(
1665 <a href='#http_t'>http_t</a> * http,
1666 char * buffer,
1667 int length);
1668 </pre>
1669 <h4>Arguments</h4>
1670 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1671 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1672 <tbody>
1673 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1674 <tr><td><tt>buffer</tt></td><td>Buffer for data</td></tr>
1675 <tr><td><tt>length</tt></td><td>Maximum number of bytes</td></tr>
1676 </tbody></table></div>
1677 <h4>Returns</h4>
1678 <p>Number of bytes read</p>
1679 <!-- NEW PAGE -->
1680 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpRead2'>httpRead2()</a></h3>
1681 <h4>Description</h4>
1682 <p>Read data from a HTTP connection.
1683
1684 </p>
1685 <h4>Syntax</h4>
1686 <pre>
1687 ssize_t
1688 httpRead2(
1689 <a href='#http_t'>http_t</a> * http,
1690 char * buffer,
1691 size_t length);
1692 </pre>
1693 <h4>Arguments</h4>
1694 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1695 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1696 <tbody>
1697 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1698 <tr><td><tt>buffer</tt></td><td>Buffer for data</td></tr>
1699 <tr><td><tt>length</tt></td><td>Maximum number of bytes</td></tr>
1700 </tbody></table></div>
1701 <h4>Returns</h4>
1702 <p>Number of bytes read</p>
1703 <!-- NEW PAGE -->
1704 <h3 class='title'><a name='httpReconnect'>httpReconnect()</a></h3>
1705 <h4>Description</h4>
1706 <p>Reconnect to a HTTP server.</p>
1707 <h4>Syntax</h4>
1708 <pre>
1709 int
1710 httpReconnect(
1711 <a href='#http_t'>http_t</a> * http);
1712 </pre>
1713 <h4>Arguments</h4>
1714 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1715 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1716 <tbody>
1717 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1718 </tbody></table></div>
1719 <h4>Returns</h4>
1720 <p>0 on success, non-zero on failure</p>
1721 <!-- NEW PAGE -->
1722 <h3 class='title'><span class='info'>&nbsp;DEPRECATED&nbsp;</span><a name='httpSeparate'>httpSeparate()</a></h3>
1723 <h4>Description</h4>
1724 <p>Separate a Universal Resource Identifier into its
1725 components.
1726
1727 This function is deprecated; use the httpSeparateURI() function instead.
1728
1729 </p>
1730 <h4>Syntax</h4>
1731 <pre>
1732 void
1733 httpSeparate(
1734 const char * uri,
1735 char * scheme,
1736 char * username,
1737 char * host,
1738 int * port,
1739 char * resource);
1740 </pre>
1741 <h4>Arguments</h4>
1742 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1743 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1744 <tbody>
1745 <tr><td><tt>uri</tt></td><td>Universal Resource Identifier</td></tr>
1746 <tr><td><tt>scheme</tt></td><td>Scheme [32] (http, https, etc.)</td></tr>
1747 <tr><td><tt>username</tt></td><td>Username [1024]</td></tr>
1748 <tr><td><tt>host</tt></td><td>Hostname [1024]</td></tr>
1749 <tr><td><tt>port</tt></td><td>Port number to use</td></tr>
1750 <tr><td><tt>resource</tt></td><td>Resource/filename [1024]</td></tr>
1751 </tbody></table></div>
1752 <h4>Returns</h4>
1753 <p>Nothing.</p>
1754 <!-- NEW PAGE -->
1755 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span><a name='httpSeparate2'>httpSeparate2()</a></h3>
1756 <h4>Description</h4>
1757 <p>Separate a Universal Resource Identifier into its
1758 components.
1759
1760 This function is deprecated; use the httpSeparateURI() function instead.
1761
1762
1763 </p>
1764 <h4>Syntax</h4>
1765 <pre>
1766 void
1767 httpSeparate2(
1768 const char * uri,
1769 char * scheme,
1770 int schemelen,
1771 char * username,
1772 int usernamelen,
1773 char * host,
1774 int hostlen,
1775 int * port,
1776 char * resource,
1777 int resourcelen);
1778 </pre>
1779 <h4>Arguments</h4>
1780 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1781 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1782 <tbody>
1783 <tr><td><tt>uri</tt></td><td>Universal Resource Identifier</td></tr>
1784 <tr><td><tt>scheme</tt></td><td>Scheme (http, https, etc.)</td></tr>
1785 <tr><td><tt>schemelen</tt></td><td>Size of scheme buffer</td></tr>
1786 <tr><td><tt>username</tt></td><td>Username</td></tr>
1787 <tr><td><tt>usernamelen</tt></td><td>Size of username buffer</td></tr>
1788 <tr><td><tt>host</tt></td><td>Hostname</td></tr>
1789 <tr><td><tt>hostlen</tt></td><td>Size of hostname buffer</td></tr>
1790 <tr><td><tt>port</tt></td><td>Port number to use</td></tr>
1791 <tr><td><tt>resource</tt></td><td>Resource/filename</td></tr>
1792 <tr><td><tt>resourcelen</tt></td><td>Size of resource buffer</td></tr>
1793 </tbody></table></div>
1794 <h4>Returns</h4>
1795 <p>Nothing.</p>
1796 <!-- NEW PAGE -->
1797 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpSeparateURI'>httpSeparateURI()</a></h3>
1798 <h4>Description</h4>
1799 <p>Separate a Universal Resource Identifier into its
1800 components.
1801
1802 </p>
1803 <h4>Syntax</h4>
1804 <pre>
1805 http_uri_status_t
1806 httpSeparateURI(
1807 http_uri_coding_t decoding,
1808 const char * uri,
1809 char * scheme,
1810 int schemelen,
1811 char * username,
1812 int usernamelen,
1813 char * host,
1814 int hostlen,
1815 int * port,
1816 char * resource,
1817 int resourcelen);
1818 </pre>
1819 <h4>Arguments</h4>
1820 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1821 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1822 <tbody>
1823 <tr><td><tt>decoding</tt></td><td>Decoding flags</td></tr>
1824 <tr><td><tt>uri</tt></td><td>Universal Resource Identifier</td></tr>
1825 <tr><td><tt>scheme</tt></td><td>Scheme (http, https, etc.)</td></tr>
1826 <tr><td><tt>schemelen</tt></td><td>Size of scheme buffer</td></tr>
1827 <tr><td><tt>username</tt></td><td>Username</td></tr>
1828 <tr><td><tt>usernamelen</tt></td><td>Size of username buffer</td></tr>
1829 <tr><td><tt>host</tt></td><td>Hostname</td></tr>
1830 <tr><td><tt>hostlen</tt></td><td>Size of hostname buffer</td></tr>
1831 <tr><td><tt>port</tt></td><td>Port number to use</td></tr>
1832 <tr><td><tt>resource</tt></td><td>Resource/filename</td></tr>
1833 <tr><td><tt>resourcelen</tt></td><td>Size of resource buffer</td></tr>
1834 </tbody></table></div>
1835 <h4>Returns</h4>
1836 <p>Result of separation</p>
1837 <!-- NEW PAGE -->
1838 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='httpSetCookie'>httpSetCookie()</a></h3>
1839 <h4>Description</h4>
1840 <p>Set the cookie value(s)...
1841
1842 </p>
1843 <h4>Syntax</h4>
1844 <pre>
1845 void
1846 httpSetCookie(
1847 <a href='#http_t'>http_t</a> * http,
1848 const char * cookie);
1849 </pre>
1850 <h4>Arguments</h4>
1851 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1852 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1853 <tbody>
1854 <tr><td><tt>http</tt></td><td>Connection</td></tr>
1855 <tr><td><tt>cookie</tt></td><td>Cookie string</td></tr>
1856 </tbody></table></div>
1857 <h4>Returns</h4>
1858 <p>Nothing.</p>
1859 <!-- NEW PAGE -->
1860 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpSetExpect'>httpSetExpect()</a></h3>
1861 <h4>Description</h4>
1862 <p>Set the Expect: header in a request.
1863
1864 Currently only HTTP_CONTINUE is supported for the &quot;expect&quot; argument.
1865
1866 </p>
1867 <h4>Syntax</h4>
1868 <pre>
1869 void
1870 httpSetExpect(
1871 <a href='#http_t'>http_t</a> * http,
1872 http_status_t expect);
1873 </pre>
1874 <h4>Arguments</h4>
1875 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1876 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1877 <tbody>
1878 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1879 <tr><td><tt>expect</tt></td><td>HTTP status to expect (HTTP_CONTINUE)</td></tr>
1880 </tbody></table></div>
1881 <h4>Returns</h4>
1882 <p>Nothing.</p>
1883 <!-- NEW PAGE -->
1884 <h3 class='title'><a name='httpSetField'>httpSetField()</a></h3>
1885 <h4>Description</h4>
1886 <p>Set the value of an HTTP header.</p>
1887 <h4>Syntax</h4>
1888 <pre>
1889 void
1890 httpSetField(
1891 <a href='#http_t'>http_t</a> * http,
1892 http_field_t field,
1893 const char * value);
1894 </pre>
1895 <h4>Arguments</h4>
1896 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1897 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1898 <tbody>
1899 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1900 <tr><td><tt>field</tt></td><td>Field index</td></tr>
1901 <tr><td><tt>value</tt></td><td>Value</td></tr>
1902 </tbody></table></div>
1903 <h4>Returns</h4>
1904 <p>Nothing.</p>
1905 <!-- NEW PAGE -->
1906 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpSetLength'>httpSetLength()</a></h3>
1907 <h4>Description</h4>
1908 <p>Set the content-length and content-encoding.
1909
1910 </p>
1911 <h4>Syntax</h4>
1912 <pre>
1913 void
1914 httpSetLength(
1915 <a href='#http_t'>http_t</a> * http,
1916 size_t length);
1917 </pre>
1918 <h4>Arguments</h4>
1919 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1920 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1921 <tbody>
1922 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1923 <tr><td><tt>length</tt></td><td>Length (0 for chunked)</td></tr>
1924 </tbody></table></div>
1925 <h4>Returns</h4>
1926 <p>Nothing.</p>
1927 <!-- NEW PAGE -->
1928 <h3 class='title'><a name='httpStatus'>httpStatus()</a></h3>
1929 <h4>Description</h4>
1930 <p>Return a short string describing a HTTP status code.</p>
1931 <h4>Syntax</h4>
1932 <pre>
1933 const char *
1934 httpStatus(
1935 http_status_t status);
1936 </pre>
1937 <h4>Arguments</h4>
1938 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1939 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1940 <tbody>
1941 <tr><td><tt>status</tt></td><td>HTTP status code</td></tr>
1942 </tbody></table></div>
1943 <h4>Returns</h4>
1944 <p>String or NULL</p>
1945 <!-- NEW PAGE -->
1946 <h3 class='title'><a name='httpTrace'>httpTrace()</a></h3>
1947 <h4>Description</h4>
1948 <p>Send an TRACE request to the server.</p>
1949 <h4>Syntax</h4>
1950 <pre>
1951 int
1952 httpTrace(
1953 <a href='#http_t'>http_t</a> * http,
1954 const char * uri);
1955 </pre>
1956 <h4>Arguments</h4>
1957 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1958 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1959 <tbody>
1960 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1961 <tr><td><tt>uri</tt></td><td>URI for trace</td></tr>
1962 </tbody></table></div>
1963 <h4>Returns</h4>
1964 <p>Status of call (0 = success)</p>
1965 <!-- NEW PAGE -->
1966 <h3 class='title'><a name='httpUpdate'>httpUpdate()</a></h3>
1967 <h4>Description</h4>
1968 <p>Update the current HTTP state for incoming data.</p>
1969 <h4>Syntax</h4>
1970 <pre>
1971 http_status_t
1972 httpUpdate(
1973 <a href='#http_t'>http_t</a> * http);
1974 </pre>
1975 <h4>Arguments</h4>
1976 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1977 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1978 <tbody>
1979 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1980 </tbody></table></div>
1981 <h4>Returns</h4>
1982 <p>HTTP status</p>
1983 <!-- NEW PAGE -->
1984 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='httpWait'>httpWait()</a></h3>
1985 <h4>Description</h4>
1986 <p>Wait for data available on a connection.
1987
1988 </p>
1989 <h4>Syntax</h4>
1990 <pre>
1991 int
1992 httpWait(
1993 <a href='#http_t'>http_t</a> * http,
1994 int msec);
1995 </pre>
1996 <h4>Arguments</h4>
1997 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
1998 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1999 <tbody>
2000 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
2001 <tr><td><tt>msec</tt></td><td>Milliseconds to wait</td></tr>
2002 </tbody></table></div>
2003 <h4>Returns</h4>
2004 <p>1 if data is available, 0 otherwise</p>
2005 <!-- NEW PAGE -->
2006 <h3 class='title'><span class='info'>&nbsp;DEPRECATED&nbsp;</span><a name='httpWrite'>httpWrite()</a></h3>
2007 <h4>Description</h4>
2008 <p>Write data to a HTTP connection.
2009
2010 This function is deprecated. Use the httpWrite2() function which can
2011 write more than 2GB of data.
2012
2013 </p>
2014 <h4>Syntax</h4>
2015 <pre>
2016 int
2017 httpWrite(
2018 <a href='#http_t'>http_t</a> * http,
2019 const char * buffer,
2020 int length);
2021 </pre>
2022 <h4>Arguments</h4>
2023 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2024 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2025 <tbody>
2026 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
2027 <tr><td><tt>buffer</tt></td><td>Buffer for data</td></tr>
2028 <tr><td><tt>length</tt></td><td>Number of bytes to write</td></tr>
2029 </tbody></table></div>
2030 <h4>Returns</h4>
2031 <p>Number of bytes written</p>
2032 <!-- NEW PAGE -->
2033 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='httpWrite2'>httpWrite2()</a></h3>
2034 <h4>Description</h4>
2035 <p>Write data to a HTTP connection.
2036
2037 </p>
2038 <h4>Syntax</h4>
2039 <pre>
2040 ssize_t
2041 httpWrite2(
2042 <a href='#http_t'>http_t</a> * http,
2043 const char * buffer,
2044 size_t length);
2045 </pre>
2046 <h4>Arguments</h4>
2047 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2048 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2049 <tbody>
2050 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
2051 <tr><td><tt>buffer</tt></td><td>Buffer for data</td></tr>
2052 <tr><td><tt>length</tt></td><td>Number of bytes to write</td></tr>
2053 </tbody></table></div>
2054 <h4>Returns</h4>
2055 <p>Number of bytes written</p>
2056 <!-- NEW PAGE -->
2057 <h3 class='title'><a name='ippAddBoolean'>ippAddBoolean()</a></h3>
2058 <h4>Description</h4>
2059 <p>Add a boolean attribute to an IPP message.</p>
2060 <h4>Syntax</h4>
2061 <pre>
2062 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *
2063 ippAddBoolean(
2064 <a href='#ipp_t'>ipp_t</a> * ipp,
2065 ipp_tag_t group,
2066 const char * name,
2067 char value);
2068 </pre>
2069 <h4>Arguments</h4>
2070 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2071 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2072 <tbody>
2073 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2074 <tr><td><tt>group</tt></td><td>IPP group</td></tr>
2075 <tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
2076 <tr><td><tt>value</tt></td><td>Value of attribute</td></tr>
2077 </tbody></table></div>
2078 <h4>Returns</h4>
2079 <p>New attribute</p>
2080 <!-- NEW PAGE -->
2081 <h3 class='title'><a name='ippAddBooleans'>ippAddBooleans()</a></h3>
2082 <h4>Description</h4>
2083 <p>Add an array of boolean values.</p>
2084 <h4>Syntax</h4>
2085 <pre>
2086 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *
2087 ippAddBooleans(
2088 <a href='#ipp_t'>ipp_t</a> * ipp,
2089 ipp_tag_t group,
2090 const char * name,
2091 int num_values,
2092 const char * values);
2093 </pre>
2094 <h4>Arguments</h4>
2095 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2096 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2097 <tbody>
2098 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2099 <tr><td><tt>group</tt></td><td>IPP group</td></tr>
2100 <tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
2101 <tr><td><tt>num_values</tt></td><td>Number of values</td></tr>
2102 <tr><td><tt>values</tt></td><td>Values</td></tr>
2103 </tbody></table></div>
2104 <h4>Returns</h4>
2105 <p>New attribute</p>
2106 <!-- NEW PAGE -->
2107 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='ippAddCollection'>ippAddCollection()</a></h3>
2108 <h4>Description</h4>
2109 <p>Add a collection value.
2110
2111 </p>
2112 <h4>Syntax</h4>
2113 <pre>
2114 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *
2115 ippAddCollection(
2116 <a href='#ipp_t'>ipp_t</a> * ipp,
2117 ipp_tag_t group,
2118 const char * name,
2119 <a href='#ipp_t'>ipp_t</a> * value);
2120 </pre>
2121 <h4>Arguments</h4>
2122 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2123 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2124 <tbody>
2125 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2126 <tr><td><tt>group</tt></td><td>IPP group</td></tr>
2127 <tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
2128 <tr><td><tt>value</tt></td><td>Value</td></tr>
2129 </tbody></table></div>
2130 <h4>Returns</h4>
2131 <p>New attribute</p>
2132 <!-- NEW PAGE -->
2133 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='ippAddCollections'>ippAddCollections()</a></h3>
2134 <h4>Description</h4>
2135 <p>Add an array of collection values.
2136
2137 </p>
2138 <h4>Syntax</h4>
2139 <pre>
2140 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *
2141 ippAddCollections(
2142 <a href='#ipp_t'>ipp_t</a> * ipp,
2143 ipp_tag_t group,
2144 const char * name,
2145 int num_values,
2146 const <a href='#ipp_t'>ipp_t</a> ** values);
2147 </pre>
2148 <h4>Arguments</h4>
2149 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2150 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2151 <tbody>
2152 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2153 <tr><td><tt>group</tt></td><td>IPP group</td></tr>
2154 <tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
2155 <tr><td><tt>num_values</tt></td><td>Number of values</td></tr>
2156 <tr><td><tt>values</tt></td><td>Values</td></tr>
2157 </tbody></table></div>
2158 <h4>Returns</h4>
2159 <p>New attribute</p>
2160 <!-- NEW PAGE -->
2161 <h3 class='title'><a name='ippAddDate'>ippAddDate()</a></h3>
2162 <h4>Description</h4>
2163 <p>Add a date attribute to an IPP message.</p>
2164 <h4>Syntax</h4>
2165 <pre>
2166 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *
2167 ippAddDate(
2168 <a href='#ipp_t'>ipp_t</a> * ipp,
2169 ipp_tag_t group,
2170 const char * name,
2171 const <a href='#ipp_uchar_t'>ipp_uchar_t</a> * value);
2172 </pre>
2173 <h4>Arguments</h4>
2174 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2175 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2176 <tbody>
2177 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2178 <tr><td><tt>group</tt></td><td>IPP group</td></tr>
2179 <tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
2180 <tr><td><tt>value</tt></td><td>Value</td></tr>
2181 </tbody></table></div>
2182 <h4>Returns</h4>
2183 <p>New attribute</p>
2184 <!-- NEW PAGE -->
2185 <h3 class='title'><a name='ippAddInteger'>ippAddInteger()</a></h3>
2186 <h4>Description</h4>
2187 <p>Add a integer attribute to an IPP message.</p>
2188 <h4>Syntax</h4>
2189 <pre>
2190 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *
2191 ippAddInteger(
2192 <a href='#ipp_t'>ipp_t</a> * ipp,
2193 ipp_tag_t group,
2194 ipp_tag_t type,
2195 const char * name,
2196 int value);
2197 </pre>
2198 <h4>Arguments</h4>
2199 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2200 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2201 <tbody>
2202 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2203 <tr><td><tt>group</tt></td><td>IPP group</td></tr>
2204 <tr><td><tt>type</tt></td><td>Type of attribute</td></tr>
2205 <tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
2206 <tr><td><tt>value</tt></td><td>Value of attribute</td></tr>
2207 </tbody></table></div>
2208 <h4>Returns</h4>
2209 <p>New attribute</p>
2210 <!-- NEW PAGE -->
2211 <h3 class='title'><a name='ippAddIntegers'>ippAddIntegers()</a></h3>
2212 <h4>Description</h4>
2213 <p>Add an array of integer values.</p>
2214 <h4>Syntax</h4>
2215 <pre>
2216 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *
2217 ippAddIntegers(
2218 <a href='#ipp_t'>ipp_t</a> * ipp,
2219 ipp_tag_t group,
2220 ipp_tag_t type,
2221 const char * name,
2222 int num_values,
2223 const int * values);
2224 </pre>
2225 <h4>Arguments</h4>
2226 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2227 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2228 <tbody>
2229 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2230 <tr><td><tt>group</tt></td><td>IPP group</td></tr>
2231 <tr><td><tt>type</tt></td><td>Type of attribute</td></tr>
2232 <tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
2233 <tr><td><tt>num_values</tt></td><td>Number of values</td></tr>
2234 <tr><td><tt>values</tt></td><td>Values</td></tr>
2235 </tbody></table></div>
2236 <h4>Returns</h4>
2237 <p>New attribute</p>
2238 <!-- NEW PAGE -->
2239 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ippAddOctetString'>ippAddOctetString()</a></h3>
2240 <h4>Description</h4>
2241 <p>Add an octetString value to an IPP message.
2242
2243 </p>
2244 <h4>Syntax</h4>
2245 <pre>
2246 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *
2247 ippAddOctetString(
2248 <a href='#ipp_t'>ipp_t</a> * ipp,
2249 ipp_tag_t group,
2250 const char * name,
2251 const void * data,
2252 int datalen);
2253 </pre>
2254 <h4>Arguments</h4>
2255 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2256 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2257 <tbody>
2258 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2259 <tr><td><tt>group</tt></td><td>IPP group</td></tr>
2260 <tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
2261 <tr><td><tt>data</tt></td><td>octetString data</td></tr>
2262 <tr><td><tt>datalen</tt></td><td>Length of data in bytes</td></tr>
2263 </tbody></table></div>
2264 <h4>Returns</h4>
2265 <p>New attribute</p>
2266 <!-- NEW PAGE -->
2267 <h3 class='title'><a name='ippAddRange'>ippAddRange()</a></h3>
2268 <h4>Description</h4>
2269 <p>Add a range of values to an IPP message.</p>
2270 <h4>Syntax</h4>
2271 <pre>
2272 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *
2273 ippAddRange(
2274 <a href='#ipp_t'>ipp_t</a> * ipp,
2275 ipp_tag_t group,
2276 const char * name,
2277 int lower,
2278 int upper);
2279 </pre>
2280 <h4>Arguments</h4>
2281 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2282 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2283 <tbody>
2284 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2285 <tr><td><tt>group</tt></td><td>IPP group</td></tr>
2286 <tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
2287 <tr><td><tt>lower</tt></td><td>Lower value</td></tr>
2288 <tr><td><tt>upper</tt></td><td>Upper value</td></tr>
2289 </tbody></table></div>
2290 <h4>Returns</h4>
2291 <p>New attribute</p>
2292 <!-- NEW PAGE -->
2293 <h3 class='title'><a name='ippAddRanges'>ippAddRanges()</a></h3>
2294 <h4>Description</h4>
2295 <p>Add ranges of values to an IPP message.</p>
2296 <h4>Syntax</h4>
2297 <pre>
2298 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *
2299 ippAddRanges(
2300 <a href='#ipp_t'>ipp_t</a> * ipp,
2301 ipp_tag_t group,
2302 const char * name,
2303 int num_values,
2304 const int * lower,
2305 const int * upper);
2306 </pre>
2307 <h4>Arguments</h4>
2308 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2309 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2310 <tbody>
2311 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2312 <tr><td><tt>group</tt></td><td>IPP group</td></tr>
2313 <tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
2314 <tr><td><tt>num_values</tt></td><td>Number of values</td></tr>
2315 <tr><td><tt>lower</tt></td><td>Lower values</td></tr>
2316 <tr><td><tt>upper</tt></td><td>Upper values</td></tr>
2317 </tbody></table></div>
2318 <h4>Returns</h4>
2319 <p>New attribute</p>
2320 <!-- NEW PAGE -->
2321 <h3 class='title'><a name='ippAddResolution'>ippAddResolution()</a></h3>
2322 <h4>Description</h4>
2323 <p>Add a resolution value to an IPP message.</p>
2324 <h4>Syntax</h4>
2325 <pre>
2326 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *
2327 ippAddResolution(
2328 <a href='#ipp_t'>ipp_t</a> * ipp,
2329 ipp_tag_t group,
2330 const char * name,
2331 ipp_res_t units,
2332 int xres,
2333 int yres);
2334 </pre>
2335 <h4>Arguments</h4>
2336 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2337 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2338 <tbody>
2339 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2340 <tr><td><tt>group</tt></td><td>IPP group</td></tr>
2341 <tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
2342 <tr><td><tt>units</tt></td><td>Units for resolution</td></tr>
2343 <tr><td><tt>xres</tt></td><td>X resolution</td></tr>
2344 <tr><td><tt>yres</tt></td><td>Y resolution</td></tr>
2345 </tbody></table></div>
2346 <h4>Returns</h4>
2347 <p>New attribute</p>
2348 <!-- NEW PAGE -->
2349 <h3 class='title'><a name='ippAddResolutions'>ippAddResolutions()</a></h3>
2350 <h4>Description</h4>
2351 <p>Add resolution values to an IPP message.</p>
2352 <h4>Syntax</h4>
2353 <pre>
2354 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *
2355 ippAddResolutions(
2356 <a href='#ipp_t'>ipp_t</a> * ipp,
2357 ipp_tag_t group,
2358 const char * name,
2359 int num_values,
2360 ipp_res_t units,
2361 const int * xres,
2362 const int * yres);
2363 </pre>
2364 <h4>Arguments</h4>
2365 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2366 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2367 <tbody>
2368 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2369 <tr><td><tt>group</tt></td><td>IPP group</td></tr>
2370 <tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
2371 <tr><td><tt>num_values</tt></td><td>Number of values</td></tr>
2372 <tr><td><tt>units</tt></td><td>Units for resolution</td></tr>
2373 <tr><td><tt>xres</tt></td><td>X resolutions</td></tr>
2374 <tr><td><tt>yres</tt></td><td>Y resolutions</td></tr>
2375 </tbody></table></div>
2376 <h4>Returns</h4>
2377 <p>New attribute</p>
2378 <!-- NEW PAGE -->
2379 <h3 class='title'><a name='ippAddSeparator'>ippAddSeparator()</a></h3>
2380 <h4>Description</h4>
2381 <p>Add a group separator to an IPP message.</p>
2382 <h4>Syntax</h4>
2383 <pre>
2384 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *
2385 ippAddSeparator(
2386 <a href='#ipp_t'>ipp_t</a> * ipp);
2387 </pre>
2388 <h4>Arguments</h4>
2389 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2390 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2391 <tbody>
2392 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2393 </tbody></table></div>
2394 <h4>Returns</h4>
2395 <p>New attribute</p>
2396 <!-- NEW PAGE -->
2397 <h3 class='title'><a name='ippAddString'>ippAddString()</a></h3>
2398 <h4>Description</h4>
2399 <p>Add a language-encoded string to an IPP message.</p>
2400 <h4>Syntax</h4>
2401 <pre>
2402 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *
2403 ippAddString(
2404 <a href='#ipp_t'>ipp_t</a> * ipp,
2405 ipp_tag_t group,
2406 ipp_tag_t type,
2407 const char * name,
2408 const char * charset,
2409 const char * value);
2410 </pre>
2411 <h4>Arguments</h4>
2412 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2413 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2414 <tbody>
2415 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2416 <tr><td><tt>group</tt></td><td>IPP group</td></tr>
2417 <tr><td><tt>type</tt></td><td>Type of attribute</td></tr>
2418 <tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
2419 <tr><td><tt>charset</tt></td><td>Character set</td></tr>
2420 <tr><td><tt>value</tt></td><td>Value</td></tr>
2421 </tbody></table></div>
2422 <h4>Returns</h4>
2423 <p>New attribute</p>
2424 <!-- NEW PAGE -->
2425 <h3 class='title'><a name='ippAddStrings'>ippAddStrings()</a></h3>
2426 <h4>Description</h4>
2427 <p>Add language-encoded strings to an IPP message.</p>
2428 <h4>Syntax</h4>
2429 <pre>
2430 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *
2431 ippAddStrings(
2432 <a href='#ipp_t'>ipp_t</a> * ipp,
2433 ipp_tag_t group,
2434 ipp_tag_t type,
2435 const char * name,
2436 int num_values,
2437 const char * charset,
2438 const char *const * values);
2439 </pre>
2440 <h4>Arguments</h4>
2441 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2442 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2443 <tbody>
2444 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2445 <tr><td><tt>group</tt></td><td>IPP group</td></tr>
2446 <tr><td><tt>type</tt></td><td>Type of attribute</td></tr>
2447 <tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
2448 <tr><td><tt>num_values</tt></td><td>Number of values</td></tr>
2449 <tr><td><tt>charset</tt></td><td>Character set</td></tr>
2450 <tr><td><tt>values</tt></td><td>Values</td></tr>
2451 </tbody></table></div>
2452 <h4>Returns</h4>
2453 <p>New attribute</p>
2454 <!-- NEW PAGE -->
2455 <h3 class='title'><a name='ippDateToTime'>ippDateToTime()</a></h3>
2456 <h4>Description</h4>
2457 <p>Convert from RFC 1903 Date/Time format to UNIX time
2458 in seconds.</p>
2459 <h4>Syntax</h4>
2460 <pre>
2461 time_t
2462 ippDateToTime(
2463 const <a href='#ipp_uchar_t'>ipp_uchar_t</a> * date);
2464 </pre>
2465 <h4>Arguments</h4>
2466 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2467 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2468 <tbody>
2469 <tr><td><tt>date</tt></td><td>RFC 1903 date info</td></tr>
2470 </tbody></table></div>
2471 <h4>Returns</h4>
2472 <p>UNIX time value</p>
2473 <!-- NEW PAGE -->
2474 <h3 class='title'><a name='ippDelete'>ippDelete()</a></h3>
2475 <h4>Description</h4>
2476 <p>Delete an IPP message.</p>
2477 <h4>Syntax</h4>
2478 <pre>
2479 void
2480 ippDelete(
2481 <a href='#ipp_t'>ipp_t</a> * ipp);
2482 </pre>
2483 <h4>Arguments</h4>
2484 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2485 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2486 <tbody>
2487 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2488 </tbody></table></div>
2489 <h4>Returns</h4>
2490 <p>Nothing.</p>
2491 <!-- NEW PAGE -->
2492 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='ippDeleteAttribute'>ippDeleteAttribute()</a></h3>
2493 <h4>Description</h4>
2494 <p>Delete a single attribute in an IPP message.
2495
2496 </p>
2497 <h4>Syntax</h4>
2498 <pre>
2499 void
2500 ippDeleteAttribute(
2501 <a href='#ipp_t'>ipp_t</a> * ipp,
2502 <a href='#ipp_attribute_t'>ipp_attribute_t</a> * attr);
2503 </pre>
2504 <h4>Arguments</h4>
2505 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2506 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2507 <tbody>
2508 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2509 <tr><td><tt>attr</tt></td><td>Attribute to delete</td></tr>
2510 </tbody></table></div>
2511 <h4>Returns</h4>
2512 <p>Nothing.</p>
2513 <!-- NEW PAGE -->
2514 <h3 class='title'><a name='ippErrorString'>ippErrorString()</a></h3>
2515 <h4>Description</h4>
2516 <p>Return a name for the given status code.</p>
2517 <h4>Syntax</h4>
2518 <pre>
2519 const char *
2520 ippErrorString(
2521 ipp_status_t error);
2522 </pre>
2523 <h4>Arguments</h4>
2524 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2525 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2526 <tbody>
2527 <tr><td><tt>error</tt></td><td>Error status</td></tr>
2528 </tbody></table></div>
2529 <h4>Returns</h4>
2530 <p>Text string</p>
2531 <!-- NEW PAGE -->
2532 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ippErrorValue'>ippErrorValue()</a></h3>
2533 <h4>Description</h4>
2534 <p>Return a status code for the given name.
2535
2536 </p>
2537 <h4>Syntax</h4>
2538 <pre>
2539 ipp_status_t
2540 ippErrorValue(
2541 const char * name);
2542 </pre>
2543 <h4>Arguments</h4>
2544 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2545 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2546 <tbody>
2547 <tr><td><tt>name</tt></td><td>Name</td></tr>
2548 </tbody></table></div>
2549 <h4>Returns</h4>
2550 <p>IPP status code</p>
2551 <!-- NEW PAGE -->
2552 <h3 class='title'><a name='ippFindAttribute'>ippFindAttribute()</a></h3>
2553 <h4>Description</h4>
2554 <p>Find a named attribute in a request...</p>
2555 <h4>Syntax</h4>
2556 <pre>
2557 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *
2558 ippFindAttribute(
2559 <a href='#ipp_t'>ipp_t</a> * ipp,
2560 const char * name,
2561 ipp_tag_t type);
2562 </pre>
2563 <h4>Arguments</h4>
2564 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2565 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2566 <tbody>
2567 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2568 <tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
2569 <tr><td><tt>type</tt></td><td>Type of attribute</td></tr>
2570 </tbody></table></div>
2571 <h4>Returns</h4>
2572 <p>Matching attribute</p>
2573 <!-- NEW PAGE -->
2574 <h3 class='title'><a name='ippFindNextAttribute'>ippFindNextAttribute()</a></h3>
2575 <h4>Description</h4>
2576 <p>Find the next named attribute in a request...</p>
2577 <h4>Syntax</h4>
2578 <pre>
2579 <a href='#ipp_attribute_t'>ipp_attribute_t</a> *
2580 ippFindNextAttribute(
2581 <a href='#ipp_t'>ipp_t</a> * ipp,
2582 const char * name,
2583 ipp_tag_t type);
2584 </pre>
2585 <h4>Arguments</h4>
2586 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2587 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2588 <tbody>
2589 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2590 <tr><td><tt>name</tt></td><td>Name of attribute</td></tr>
2591 <tr><td><tt>type</tt></td><td>Type of attribute</td></tr>
2592 </tbody></table></div>
2593 <h4>Returns</h4>
2594 <p>Matching attribute</p>
2595 <!-- NEW PAGE -->
2596 <h3 class='title'><a name='ippLength'>ippLength()</a></h3>
2597 <h4>Description</h4>
2598 <p>Compute the length of an IPP message.</p>
2599 <h4>Syntax</h4>
2600 <pre>
2601 size_t
2602 ippLength(
2603 <a href='#ipp_t'>ipp_t</a> * ipp);
2604 </pre>
2605 <h4>Arguments</h4>
2606 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2607 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2608 <tbody>
2609 <tr><td><tt>ipp</tt></td><td>IPP message</td></tr>
2610 </tbody></table></div>
2611 <h4>Returns</h4>
2612 <p>Size of IPP message</p>
2613 <!-- NEW PAGE -->
2614 <h3 class='title'><a name='ippNew'>ippNew()</a></h3>
2615 <h4>Description</h4>
2616 <p>Allocate a new IPP message.</p>
2617 <h4>Syntax</h4>
2618 <pre>
2619 <a href='#ipp_t'>ipp_t</a> *
2620 ippNew(void);
2621 </pre>
2622 <h4>Arguments</h4>
2623 <p>None.</p>
2624 <h4>Returns</h4>
2625 <p>New IPP message</p>
2626 <!-- NEW PAGE -->
2627 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ippNewRequest'>ippNewRequest()</a></h3>
2628 <h4>Description</h4>
2629 <p>Allocate a new IPP request message.
2630
2631 The new request message is initialized with the attributes-charset and
2632 attributes-natural-language attributes added. The
2633 attributes-natural-language value is derived from the current locale.
2634
2635 </p>
2636 <h4>Syntax</h4>
2637 <pre>
2638 <a href='#ipp_t'>ipp_t</a> *
2639 ippNewRequest(
2640 ipp_op_t op);
2641 </pre>
2642 <h4>Arguments</h4>
2643 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2644 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2645 <tbody>
2646 <tr><td><tt>op</tt></td><td>Operation code</td></tr>
2647 </tbody></table></div>
2648 <h4>Returns</h4>
2649 <p>IPP request message</p>
2650 <!-- NEW PAGE -->
2651 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ippOpString'>ippOpString()</a></h3>
2652 <h4>Description</h4>
2653 <p>Return a name for the given operation id.
2654
2655 </p>
2656 <h4>Syntax</h4>
2657 <pre>
2658 const char *
2659 ippOpString(
2660 ipp_op_t op);
2661 </pre>
2662 <h4>Arguments</h4>
2663 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2664 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2665 <tbody>
2666 <tr><td><tt>op</tt></td><td>Operation ID</td></tr>
2667 </tbody></table></div>
2668 <h4>Returns</h4>
2669 <p>Name</p>
2670 <!-- NEW PAGE -->
2671 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ippOpValue'>ippOpValue()</a></h3>
2672 <h4>Description</h4>
2673 <p>Return an operation id for the given name.
2674
2675 </p>
2676 <h4>Syntax</h4>
2677 <pre>
2678 ipp_op_t
2679 ippOpValue(
2680 const char * name);
2681 </pre>
2682 <h4>Arguments</h4>
2683 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2684 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2685 <tbody>
2686 <tr><td><tt>name</tt></td><td>Textual name</td></tr>
2687 </tbody></table></div>
2688 <h4>Returns</h4>
2689 <p>Operation ID</p>
2690 <!-- NEW PAGE -->
2691 <h3 class='title'><a name='ippPort'>ippPort()</a></h3>
2692 <h4>Description</h4>
2693 <p>Return the default IPP port number.</p>
2694 <h4>Syntax</h4>
2695 <pre>
2696 int
2697 ippPort(void);
2698 </pre>
2699 <h4>Arguments</h4>
2700 <p>None.</p>
2701 <h4>Returns</h4>
2702 <p>Port number</p>
2703 <!-- NEW PAGE -->
2704 <h3 class='title'><a name='ippRead'>ippRead()</a></h3>
2705 <h4>Description</h4>
2706 <p>Read data for an IPP message from a HTTP connection.</p>
2707 <h4>Syntax</h4>
2708 <pre>
2709 ipp_state_t
2710 ippRead(
2711 <a href='#http_t'>http_t</a> * http,
2712 <a href='#ipp_t'>ipp_t</a> * ipp);
2713 </pre>
2714 <h4>Arguments</h4>
2715 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2716 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2717 <tbody>
2718 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
2719 <tr><td><tt>ipp</tt></td><td>IPP data</td></tr>
2720 </tbody></table></div>
2721 <h4>Returns</h4>
2722 <p>Current state</p>
2723 <!-- NEW PAGE -->
2724 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='ippReadFile'>ippReadFile()</a></h3>
2725 <h4>Description</h4>
2726 <p>Read data for an IPP message from a file.
2727
2728 </p>
2729 <h4>Syntax</h4>
2730 <pre>
2731 ipp_state_t
2732 ippReadFile(
2733 int fd,
2734 <a href='#ipp_t'>ipp_t</a> * ipp);
2735 </pre>
2736 <h4>Arguments</h4>
2737 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2738 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2739 <tbody>
2740 <tr><td><tt>fd</tt></td><td>HTTP data</td></tr>
2741 <tr><td><tt>ipp</tt></td><td>IPP data</td></tr>
2742 </tbody></table></div>
2743 <h4>Returns</h4>
2744 <p>Current state</p>
2745 <!-- NEW PAGE -->
2746 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ippReadIO'>ippReadIO()</a></h3>
2747 <h4>Description</h4>
2748 <p>Read data for an IPP message.
2749
2750 </p>
2751 <h4>Syntax</h4>
2752 <pre>
2753 ipp_state_t
2754 ippReadIO(
2755 void * src,
2756 <a href='#ipp_iocb_t'>ipp_iocb_t</a> cb,
2757 int blocking,
2758 <a href='#ipp_t'>ipp_t</a> * parent,
2759 <a href='#ipp_t'>ipp_t</a> * ipp);
2760 </pre>
2761 <h4>Arguments</h4>
2762 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2763 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2764 <tbody>
2765 <tr><td><tt>src</tt></td><td>Data source</td></tr>
2766 <tr><td><tt>cb</tt></td><td>Read callback function</td></tr>
2767 <tr><td><tt>blocking</tt></td><td>Use blocking IO?</td></tr>
2768 <tr><td><tt>parent</tt></td><td>Parent request, if any</td></tr>
2769 <tr><td><tt>ipp</tt></td><td>IPP data</td></tr>
2770 </tbody></table></div>
2771 <h4>Returns</h4>
2772 <p>Current state</p>
2773 <!-- NEW PAGE -->
2774 <h3 class='title'><a name='ippSetPort'>ippSetPort()</a></h3>
2775 <h4>Description</h4>
2776 <p>Set the default port number.</p>
2777 <h4>Syntax</h4>
2778 <pre>
2779 void
2780 ippSetPort(
2781 int p);
2782 </pre>
2783 <h4>Arguments</h4>
2784 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2785 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2786 <tbody>
2787 <tr><td><tt>p</tt></td><td>Port number to use</td></tr>
2788 </tbody></table></div>
2789 <h4>Returns</h4>
2790 <p>Nothing.</p>
2791 <!-- NEW PAGE -->
2792 <h3 class='title'><a name='ippTimeToDate'>ippTimeToDate()</a></h3>
2793 <h4>Description</h4>
2794 <p>Convert from UNIX time to RFC 1903 format.</p>
2795 <h4>Syntax</h4>
2796 <pre>
2797 const <a href='#ipp_uchar_t'>ipp_uchar_t</a> *
2798 ippTimeToDate(
2799 time_t t);
2800 </pre>
2801 <h4>Arguments</h4>
2802 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2803 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2804 <tbody>
2805 <tr><td><tt>t</tt></td><td>UNIX time value</td></tr>
2806 </tbody></table></div>
2807 <h4>Returns</h4>
2808 <p>RFC-1903 date/time data</p>
2809 <!-- NEW PAGE -->
2810 <h3 class='title'><a name='ippWrite'>ippWrite()</a></h3>
2811 <h4>Description</h4>
2812 <p>Write data for an IPP message to a HTTP connection.</p>
2813 <h4>Syntax</h4>
2814 <pre>
2815 ipp_state_t
2816 ippWrite(
2817 <a href='#http_t'>http_t</a> * http,
2818 <a href='#ipp_t'>ipp_t</a> * ipp);
2819 </pre>
2820 <h4>Arguments</h4>
2821 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2822 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2823 <tbody>
2824 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
2825 <tr><td><tt>ipp</tt></td><td>IPP data</td></tr>
2826 </tbody></table></div>
2827 <h4>Returns</h4>
2828 <p>Current state</p>
2829 <!-- NEW PAGE -->
2830 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span><a name='ippWriteFile'>ippWriteFile()</a></h3>
2831 <h4>Description</h4>
2832 <p>Write data for an IPP message to a file.
2833
2834 </p>
2835 <h4>Syntax</h4>
2836 <pre>
2837 ipp_state_t
2838 ippWriteFile(
2839 int fd,
2840 <a href='#ipp_t'>ipp_t</a> * ipp);
2841 </pre>
2842 <h4>Arguments</h4>
2843 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2844 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2845 <tbody>
2846 <tr><td><tt>fd</tt></td><td>HTTP data</td></tr>
2847 <tr><td><tt>ipp</tt></td><td>IPP data</td></tr>
2848 </tbody></table></div>
2849 <h4>Returns</h4>
2850 <p>Current state</p>
2851 <!-- NEW PAGE -->
2852 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ippWriteIO'>ippWriteIO()</a></h3>
2853 <h4>Description</h4>
2854 <p>Write data for an IPP message.
2855
2856 </p>
2857 <h4>Syntax</h4>
2858 <pre>
2859 ipp_state_t
2860 ippWriteIO(
2861 void * dst,
2862 <a href='#ipp_iocb_t'>ipp_iocb_t</a> cb,
2863 int blocking,
2864 <a href='#ipp_t'>ipp_t</a> * parent,
2865 <a href='#ipp_t'>ipp_t</a> * ipp);
2866 </pre>
2867 <h4>Arguments</h4>
2868 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
2869 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2870 <tbody>
2871 <tr><td><tt>dst</tt></td><td>Destination</td></tr>
2872 <tr><td><tt>cb</tt></td><td>Write callback function</td></tr>
2873 <tr><td><tt>blocking</tt></td><td>Use blocking IO?</td></tr>
2874 <tr><td><tt>parent</tt></td><td>Parent IPP message</td></tr>
2875 <tr><td><tt>ipp</tt></td><td>IPP data</td></tr>
2876 </tbody></table></div>
2877 <h4>Returns</h4>
2878 <p>Current state</p>
2879 <!-- NEW PAGE -->
2880 <h2 class='title'><a name='STRUCTURES'>Structures</a></h2>
2881 <ul>
2882 <li><a href='#http_addrlist_s'><tt>http_addrlist_s</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
2883 <li><a href='#ipp_attribute_s'><tt>ipp_attribute_s</tt></a> </li>
2884 <li><a href='#ipp_s'><tt>ipp_s</tt></a> </li>
2885 </ul>
2886 <!-- NEW PAGE -->
2887 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='http_addrlist_s'>http_addrlist_s</a></h3>
2888 <h4>Description</h4>
2889 <p>Socket address list, which is
2890 used to enumerate all of the
2891 addresses that are associated
2892 with a hostname. </p>
2893 <h4>Definition</h4>
2894 <pre>
2895 struct http_addrlist_s
2896 {
2897 <a href='#http_addr_t'>http_addr_t</a> addr;
2898 struct <a href='#http_addrlist_s'>http_addrlist_s</a> * next;
2899 };
2900 </pre>
2901 <h4>Members</h4>
2902 <div class='table'><table align='center' border='1' width='80%'>
2903 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2904 <tbody>
2905 <tr><td><tt>addr</tt> </td><td>Address</td></tr>
2906 <tr><td><tt>next</tt> </td><td>Pointer to next address in list</td></tr>
2907 </tbody></table></div>
2908 <!-- NEW PAGE -->
2909 <h3 class='title'><a name='ipp_attribute_s'>ipp_attribute_s</a></h3>
2910 <h4>Description</h4>
2911 <p>Attribute</p>
2912 <h4>Definition</h4>
2913 <pre>
2914 struct ipp_attribute_s
2915 {
2916 char * name;
2917 struct <a href='#ipp_attribute_s'>ipp_attribute_s</a> * next;
2918 int num_values;
2919 ipp_tag_t group_tag, value_tag;
2920 <a href='#ipp_value_t'>ipp_value_t</a> values[1];
2921 };
2922 </pre>
2923 <h4>Members</h4>
2924 <div class='table'><table align='center' border='1' width='80%'>
2925 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2926 <tbody>
2927 <tr><td><tt>name</tt> </td><td>Name of attribute</td></tr>
2928 <tr><td><tt>next</tt> </td><td>Next attribute in list</td></tr>
2929 <tr><td><tt>num_values</tt> </td><td>Number of values</td></tr>
2930 <tr><td><tt>value_tag</tt> </td><td>What type of value is it?</td></tr>
2931 <tr><td><tt>values[1]</tt> </td><td>Values</td></tr>
2932 </tbody></table></div>
2933 <!-- NEW PAGE -->
2934 <h3 class='title'><a name='ipp_s'>ipp_s</a></h3>
2935 <h4>Description</h4>
2936 <p>IPP Request/Response/Notification</p>
2937 <h4>Definition</h4>
2938 <pre>
2939 struct ipp_s
2940 {
2941 <a href='#ipp_attribute_t'>ipp_attribute_t</a> * attrs;
2942 <a href='#ipp_attribute_t'>ipp_attribute_t</a> * current;
2943 ipp_tag_t curtag;
2944 <a href='#ipp_attribute_t'>ipp_attribute_t</a> * last;
2945 <a href='#ipp_attribute_t'>ipp_attribute_t</a> * prev;
2946 <a href='#ipp_request_t'>ipp_request_t</a> request;
2947 ipp_state_t state;
2948 };
2949 </pre>
2950 <h4>Members</h4>
2951 <div class='table'><table align='center' border='1' width='80%'>
2952 <thead><tr><th>Name</th><th>Description</th></tr></thead>
2953 <tbody>
2954 <tr><td><tt>attrs</tt> </td><td>Attributes</td></tr>
2955 <tr><td><tt>current</tt> </td><td>Current attribute (for read/write)</td></tr>
2956 <tr><td><tt>curtag</tt> </td><td>Current attribute group tag</td></tr>
2957 <tr><td><tt>last</tt> </td><td>Last attribute in list</td></tr>
2958 <tr><td><tt>prev</tt> </td><td>Previous attribute (for read)</td></tr>
2959 <tr><td><tt>request</tt> </td><td>Request header</td></tr>
2960 <tr><td><tt>state</tt> </td><td>State of request</td></tr>
2961 </tbody></table></div>
2962 <!-- NEW PAGE -->
2963 <h2 class='title'><a name='TYPES'>Types</a></h2>
2964 <ul>
2965 <li><a href='#http_addrlist_t'><tt>http_addrlist_t</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
2966 <li><a href='#http_auth_t'><tt>http_auth_t</tt></a> </li>
2967 <li><a href='#http_encoding_t'><tt>http_encoding_t</tt></a> </li>
2968 <li><a href='#http_encryption_t'><tt>http_encryption_t</tt></a> </li>
2969 <li><a href='#http_t'><tt>http_t</tt></a> </li>
2970 <li><a href='#ipp_attribute_t'><tt>ipp_attribute_t</tt></a> </li>
2971 <li><a href='#ipp_iocb_t'><tt>ipp_iocb_t</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
2972 <li><a href='#ipp_request_t'><tt>ipp_request_t</tt></a> </li>
2973 <li><a href='#ipp_t'><tt>ipp_t</tt></a> </li>
2974 <li><a href='#ipp_uchar_t'><tt>ipp_uchar_t</tt></a> </li>
2975 <li><a href='#ipp_value_t'><tt>ipp_value_t</tt></a> </li>
2976 </ul>
2977 <!-- NEW PAGE -->
2978 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='http_addrlist_t'>http_addrlist_t</a></h3>
2979 <h4>Description</h4>
2980 <p>Socket address list, which is
2981 used to enumerate all of the
2982 addresses that are associated
2983 with a hostname. </p>
2984 <h4>Definition</h4>
2985 <pre>
2986 typedef struct <a href='#http_addrlist_s'>http_addrlist_s</a> / http_addrlist_t;
2987 </pre>
2988 <!-- NEW PAGE -->
2989 <h3 class='title'><a name='http_auth_t'>http_auth_t</a></h3>
2990 <h4>Description</h4>
2991 <p>HTTP authentication types</p>
2992 <h4>Definition</h4>
2993 <pre>
2994 typedef enum <a href='#http_auth_e'>http_auth_e</a> http_auth_t;
2995 </pre>
2996 <!-- NEW PAGE -->
2997 <h3 class='title'><a name='http_encoding_t'>http_encoding_t</a></h3>
2998 <h4>Description</h4>
2999 <p>HTTP transfer encoding values</p>
3000 <h4>Definition</h4>
3001 <pre>
3002 typedef enum <a href='#http_encoding_e'>http_encoding_e</a> http_encoding_t;
3003 </pre>
3004 <!-- NEW PAGE -->
3005 <h3 class='title'><a name='http_encryption_t'>http_encryption_t</a></h3>
3006 <h4>Description</h4>
3007 <p>HTTP encryption values</p>
3008 <h4>Definition</h4>
3009 <pre>
3010 typedef enum <a href='#http_encryption_e'>http_encryption_e</a> http_encryption_t;
3011 </pre>
3012 <!-- NEW PAGE -->
3013 <h3 class='title'><a name='http_t'>http_t</a></h3>
3014 <h4>Description</h4>
3015 <p>HTTP connection type</p>
3016 <h4>Definition</h4>
3017 <pre>
3018 typedef struct _http_s http_t;
3019 </pre>
3020 <!-- NEW PAGE -->
3021 <h3 class='title'><a name='ipp_attribute_t'>ipp_attribute_t</a></h3>
3022 <h4>Description</h4>
3023 <p>Attribute</p>
3024 <h4>Definition</h4>
3025 <pre>
3026 typedef struct <a href='#ipp_attribute_s'>ipp_attribute_s</a> ipp_attribute_t;
3027 </pre>
3028 <!-- NEW PAGE -->
3029 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='ipp_iocb_t'>ipp_iocb_t</a></h3>
3030 <h4>Description</h4>
3031 <p>IPP IO Callback Function </p>
3032 <h4>Definition</h4>
3033 <pre>
3034 typedef ssize_t (*ipp_iocb_t)(void *, <a href='#ipp_uchar_t'>ipp_uchar_t</a> *, size_t);
3035 </pre>
3036 <!-- NEW PAGE -->
3037 <h3 class='title'><a name='ipp_request_t'>ipp_request_t</a></h3>
3038 <h4>Description</h4>
3039 <p>Request Header</p>
3040 <h4>Definition</h4>
3041 <pre>
3042 typedef union <a href='#ipp_request_u'>ipp_request_u</a> ipp_request_t;
3043 </pre>
3044 <!-- NEW PAGE -->
3045 <h3 class='title'><a name='ipp_t'>ipp_t</a></h3>
3046 <h4>Description</h4>
3047 <p>Attribute Value</p>
3048 <h4>Definition</h4>
3049 <pre>
3050 typedef struct <a href='#ipp_s'>ipp_s</a> ipp_t;
3051 </pre>
3052 <!-- NEW PAGE -->
3053 <h3 class='title'><a name='ipp_uchar_t'>ipp_uchar_t</a></h3>
3054 <h4>Description</h4>
3055 <p>IPP status codes...</p>
3056 <h4>Definition</h4>
3057 <pre>
3058 typedef typedef unsigned char ipp_uchar_t;
3059 </pre>
3060 <!-- NEW PAGE -->
3061 <h3 class='title'><a name='ipp_value_t'>ipp_value_t</a></h3>
3062 <h4>Description</h4>
3063 <p>New in CUPS 1.1.19</p>
3064 <h4>Definition</h4>
3065 <pre>
3066 typedef union <a href='#ipp_value_u'>ipp_value_u</a> ipp_value_t;
3067 </pre>
3068 <!-- NEW PAGE -->
3069 <h2 class='title'><a name='UNIONS'>Unions</a></h2>
3070 <ul>
3071 <li><a href='#ipp_request_u'><tt>ipp_request_u</tt></a> </li>
3072 <li><a href='#ipp_value_u'><tt>ipp_value_u</tt></a> </li>
3073 </ul>
3074 <!-- NEW PAGE -->
3075 <h3 class='title'><a name='ipp_request_u'>ipp_request_u</a></h3>
3076 <h4>Description</h4>
3077 <p>Request Header</p>
3078 <h4>Definition</h4>
3079 <pre>
3080 union ipp_request_u
3081 {
3082 };
3083 </pre>
3084 <h4>Members</h4>
3085 <div class='table'><table align='center' border='1' width='80%'>
3086 <thead><tr><th>Name</th><th>Description</th></tr></thead>
3087 <tbody>
3088 </tbody></table></div>
3089 <!-- NEW PAGE -->
3090 <h3 class='title'><a name='ipp_value_u'>ipp_value_u</a></h3>
3091 <h4>Description</h4>
3092 <p>New in CUPS 1.1.19</p>
3093 <h4>Definition</h4>
3094 <pre>
3095 union ipp_value_u
3096 {
3097 char boolean;
3098 <a href='#ipp_t'>ipp_t</a> * collection;
3099 <a href='#ipp_uchar_t'>ipp_uchar_t</a> date[11];
3100 int integer;
3101 };
3102 </pre>
3103 <h4>Members</h4>
3104 <div class='table'><table align='center' border='1' width='80%'>
3105 <thead><tr><th>Name</th><th>Description</th></tr></thead>
3106 <tbody>
3107 <tr><td><tt>boolean</tt> </td><td>Boolean value</td></tr>
3108 <tr><td><tt>collection</tt> </td><td>Collection value</td></tr>
3109 <tr><td><tt>date[11]</tt> </td><td>Date/time value</td></tr>
3110 <tr><td><tt>integer</tt> </td><td>Integer/enumerated value</td></tr>
3111 </tbody></table></div>
3112 </body>
3113 </html>