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