]> git.ipfire.org Git - thirdparty/cups.git/blob - doc/help/api-cups.html
Load cups into easysw/current.
[thirdparty/cups.git] / doc / help / api-cups.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>CUPS API</title>
6 <meta name='keywords' content='Programming'>
7 <meta name='creator' content='Mini-XML v2.3'>
8 <style type='text/css'><!--
9 h1, h2, h3, p { font-family: sans-serif; text-align: justify; }
10 tt, pre a:link, pre a:visited, tt a:link, tt a:visited { font-weight: bold; color: #7f0000; }
11 pre { font-weight: bold; color: #7f0000; margin-left: 2em; }
12 span.info { background: #000000; border: solid thin #000000; color: #ffffff; font-size: 80%; font-style: italic; font-weight: bold; white-space: nowrap; }
13 h3 span.info { float: right; font-size: 100%; }
14 h1.title, h2.title, h3.title { border-bottom: solid 2px #000000; }
15 --></style>
16 </head>
17 <body>
18 <!--
19 "$Id: api-cups.shtml 6649 2007-07-11 21:46:42Z mike $"
20
21 CUPS API introduction for the Common UNIX Printing System (CUPS).
22
23 Copyright 2007 by Apple Inc.
24 Copyright 1997-2006 by Easy Software Products, all rights reserved.
25
26 These coded instructions, statements, and computer programs are the
27 property of Apple Inc. and are protected by Federal copyright
28 law. Distribution and use rights are outlined in the file "LICENSE.txt"
29 which should have been included with this file. If this file is
30 file is missing or damaged, see the license at "http://www.cups.org/".
31 -->
32
33 <h2 class='title'>Introduction</h2>
34
35 <p>The CUPS library provides a whole collection of interfaces
36 needed to support the internal needs of the CUPS software as well
37 as the needs of applications, filters, printer drivers, and
38 backends.</p>
39
40 <p>Unlike the rest of CUPS, the CUPS API library is provided
41 under the GNU Library General Public License. This means that you
42 can use the CUPS API library in both proprietary and open-source
43 programs.</p>
44
45 <h2 class='title'>General Usage</h2>
46
47 <p>The <var>&lt;cups/cups.h&gt;</var> header file must be included to
48 use the CUPS functions.</p>
49
50 <p>Programs using these functions must be linked to the CUPS
51 library: <var>libcups.a</var>, <var>libcups.so.2</var>,
52 <var>libcups.2.dylib</var>, <var>libcups_s.a</var>, or
53 <var>libcups2.lib</var> depending on the platform. The following
54 command compiles <var>myprogram.c</var> using GCC and the CUPS
55 library:</p>
56
57 <pre class='command'>
58 <kbd>gcc -o myprogram myprogram.c -lcups</kbd>
59 </pre>
60
61 <h2 class='title'>Compatibility</h2>
62
63 <p>Unless otherwise specified, the CUPS API functions require
64 CUPS 1.1 or higher.</p>
65 <h2 class='title'>Contents</h2>
66 <ul>
67 <li><a href='#ENUMERATIONS'>Enumerations</a></li>
68 <li><a href='#FUNCTIONS'>Functions</a></li>
69 <li><a href='#STRUCTURES'>Structures</a></li>
70 <li><a href='#TYPES'>Types</a></li>
71 </ul>
72 <!-- NEW PAGE -->
73 <h2 class='title'><a name='ENUMERATIONS'>Enumerations</a></h2>
74 <ul>
75 <li><a href='#cups_ptype_e'><tt>cups_ptype_e</tt></a> </li>
76 </ul>
77 <!-- NEW PAGE -->
78 <h3 class='title'><a name='cups_ptype_e'>cups_ptype_e</a></h3>
79 <h4>Description</h4>
80 <p>Not a typedef'd enum so we can OR
81 <h4>Values</h4>
82 <div class='table'><table align='center' border='1' width='80%' summary='Values'>
83 <thead><tr><th>Name</th><th>Description</th></tr></thead>
84 <tbody>
85 <tr><td><tt>CUPS_PRINTER_AUTHENTICATED</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>Printer requires authentication
86 </td></tr>
87 <tr><td><tt>CUPS_PRINTER_BIND</tt> </td><td>Can bind output
88 </td></tr>
89 <tr><td><tt>CUPS_PRINTER_BW</tt> </td><td>Can do B&amp;W printing
90 </td></tr>
91 <tr><td><tt>CUPS_PRINTER_CLASS</tt> </td><td>Printer class
92 </td></tr>
93 <tr><td><tt>CUPS_PRINTER_COLLATE</tt> </td><td>Can collage copies
94 </td></tr>
95 <tr><td><tt>CUPS_PRINTER_COLOR</tt> </td><td>Can do color printing
96 </td></tr>
97 <tr><td><tt>CUPS_PRINTER_COMMANDS</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>Printer supports maintenance commands
98 </td></tr>
99 <tr><td><tt>CUPS_PRINTER_COPIES</tt> </td><td>Can do copies
100 </td></tr>
101 <tr><td><tt>CUPS_PRINTER_COVER</tt> </td><td>Can cover output
102 </td></tr>
103 <tr><td><tt>CUPS_PRINTER_DEFAULT</tt> </td><td>Default printer on network
104 </td></tr>
105 <tr><td><tt>CUPS_PRINTER_DELETE</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>Delete printer
106 </td></tr>
107 <tr><td><tt>CUPS_PRINTER_DISCOVERED</tt> <span class='info'>&nbsp;CUPS 1.3&nbsp;</span></td><td>Printer was automatically discovered and added
108 </td></tr>
109 <tr><td><tt>CUPS_PRINTER_DUPLEX</tt> </td><td>Can do duplexing
110 </td></tr>
111 <tr><td><tt>CUPS_PRINTER_FAX</tt> </td><td>Fax queue
112 </td></tr>
113 <tr><td><tt>CUPS_PRINTER_IMPLICIT</tt> </td><td>Implicit class
114 </td></tr>
115 <tr><td><tt>CUPS_PRINTER_LARGE</tt> </td><td>Can do D/E/A1/A0
116 </td></tr>
117 <tr><td><tt>CUPS_PRINTER_LOCAL</tt> </td><td>Local printer or class
118 </td></tr>
119 <tr><td><tt>CUPS_PRINTER_MEDIUM</tt> </td><td>Can do Tabloid/B/C/A3/A2
120 </td></tr>
121 <tr><td><tt>CUPS_PRINTER_NOT_SHARED</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>Printer is not shared
122 </td></tr>
123 <tr><td><tt>CUPS_PRINTER_OPTIONS</tt> </td><td>~(CLASS | REMOTE | IMPLICIT | DEFAULT | FAX | REJECTING | DELETE | NOT_SHARED | AUTHENTICATED | COMMANDS | DISCOVERED)
124 </td></tr>
125 <tr><td><tt>CUPS_PRINTER_PUNCH</tt> </td><td>Can punch output
126 </td></tr>
127 <tr><td><tt>CUPS_PRINTER_REJECTING</tt> </td><td>Printer is rejecting jobs
128 </td></tr>
129 <tr><td><tt>CUPS_PRINTER_REMOTE</tt> </td><td>Remote printer or class
130 </td></tr>
131 <tr><td><tt>CUPS_PRINTER_SMALL</tt> </td><td>Can do Letter/Legal/A4
132 </td></tr>
133 <tr><td><tt>CUPS_PRINTER_SORT</tt> </td><td>Can sort output
134 </td></tr>
135 <tr><td><tt>CUPS_PRINTER_STAPLE</tt> </td><td>Can staple output
136 </td></tr>
137 <tr><td><tt>CUPS_PRINTER_VARIABLE</tt> </td><td>Can do variable sizes
138 </td></tr>
139 </tbody></table></div>
140 <!-- NEW PAGE -->
141 <h2 class='title'><a name='FUNCTIONS'>Functions</a></h2>
142 <ul>
143 <li><a href='#cupsAddDest'><tt>cupsAddDest()</tt></a> </li>
144 <li><a href='#cupsAddOption'><tt>cupsAddOption()</tt></a> </li>
145 <li><a href='#cupsCancelJob'><tt>cupsCancelJob()</tt></a> </li>
146 <li><a href='#cupsEncryption'><tt>cupsEncryption()</tt></a> </li>
147 <li><a href='#cupsFreeDests'><tt>cupsFreeDests()</tt></a> </li>
148 <li><a href='#cupsFreeJobs'><tt>cupsFreeJobs()</tt></a> </li>
149 <li><a href='#cupsFreeOptions'><tt>cupsFreeOptions()</tt></a> </li>
150 <li><a href='#cupsGetClasses'><tt>cupsGetClasses()</tt></a> <span class='info'>&nbsp;DEPRECATED&nbsp;</span></li>
151 <li><a href='#cupsGetDefault'><tt>cupsGetDefault()</tt></a> </li>
152 <li><a href='#cupsGetDefault2'><tt>cupsGetDefault2()</tt></a> <span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span></li>
153 <li><a href='#cupsGetDest'><tt>cupsGetDest()</tt></a> </li>
154 <li><a href='#cupsGetDests'><tt>cupsGetDests()</tt></a> </li>
155 <li><a href='#cupsGetDests2'><tt>cupsGetDests2()</tt></a> <span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span></li>
156 <li><a href='#cupsGetFd'><tt>cupsGetFd()</tt></a> <span class='info'>&nbsp;CUPS 1.1.20&nbsp;</span></li>
157 <li><a href='#cupsGetFile'><tt>cupsGetFile()</tt></a> <span class='info'>&nbsp;CUPS 1.1.20&nbsp;</span></li>
158 <li><a href='#cupsGetJobs'><tt>cupsGetJobs()</tt></a> </li>
159 <li><a href='#cupsGetJobs2'><tt>cupsGetJobs2()</tt></a> <span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span></li>
160 <li><a href='#cupsGetOption'><tt>cupsGetOption()</tt></a> </li>
161 <li><a href='#cupsGetPPD'><tt>cupsGetPPD()</tt></a> </li>
162 <li><a href='#cupsGetPPD2'><tt>cupsGetPPD2()</tt></a> <span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span></li>
163 <li><a href='#cupsGetPassword'><tt>cupsGetPassword()</tt></a> </li>
164 <li><a href='#cupsGetPrinters'><tt>cupsGetPrinters()</tt></a> <span class='info'>&nbsp;DEPRECATED&nbsp;</span></li>
165 <li><a href='#cupsGetServerPPD'><tt>cupsGetServerPPD()</tt></a> <span class='info'>&nbsp;CUPS 1.3&nbsp;</span></li>
166 <li><a href='#cupsLangDefault'><tt>cupsLangDefault()</tt></a> </li>
167 <li><a href='#cupsLangEncoding'><tt>cupsLangEncoding()</tt></a> </li>
168 <li><a href='#cupsLangFlush'><tt>cupsLangFlush()</tt></a> </li>
169 <li><a href='#cupsLangFree'><tt>cupsLangFree()</tt></a> </li>
170 <li><a href='#cupsLangGet'><tt>cupsLangGet()</tt></a> </li>
171 <li><a href='#cupsLastError'><tt>cupsLastError()</tt></a> </li>
172 <li><a href='#cupsLastErrorString'><tt>cupsLastErrorString()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
173 <li><a href='#cupsMarkOptions'><tt>cupsMarkOptions()</tt></a> </li>
174 <li><a href='#cupsNotifySubject'><tt>cupsNotifySubject()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
175 <li><a href='#cupsNotifyText'><tt>cupsNotifyText()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
176 <li><a href='#cupsParseOptions'><tt>cupsParseOptions()</tt></a> </li>
177 <li><a href='#cupsPrintFile'><tt>cupsPrintFile()</tt></a> </li>
178 <li><a href='#cupsPrintFile2'><tt>cupsPrintFile2()</tt></a> <span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span></li>
179 <li><a href='#cupsPrintFiles'><tt>cupsPrintFiles()</tt></a> </li>
180 <li><a href='#cupsPrintFiles2'><tt>cupsPrintFiles2()</tt></a> <span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span></li>
181 <li><a href='#cupsPutFd'><tt>cupsPutFd()</tt></a> <span class='info'>&nbsp;CUPS 1.1.20&nbsp;</span></li>
182 <li><a href='#cupsPutFile'><tt>cupsPutFile()</tt></a> <span class='info'>&nbsp;CUPS 1.1.20&nbsp;</span></li>
183 <li><a href='#cupsRemoveDest'><tt>cupsRemoveDest()</tt></a> <span class='info'>&nbsp;CUPS 1.3&nbsp;</span></li>
184 <li><a href='#cupsRemoveOption'><tt>cupsRemoveOption()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
185 <li><a href='#cupsServer'><tt>cupsServer()</tt></a> </li>
186 <li><a href='#cupsSetDefaultDest'><tt>cupsSetDefaultDest()</tt></a> <span class='info'>&nbsp;CUPS 1.3&nbsp;</span></li>
187 <li><a href='#cupsSetDests'><tt>cupsSetDests()</tt></a> </li>
188 <li><a href='#cupsSetDests2'><tt>cupsSetDests2()</tt></a> <span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span></li>
189 <li><a href='#cupsSetEncryption'><tt>cupsSetEncryption()</tt></a> </li>
190 <li><a href='#cupsSetPasswordCB'><tt>cupsSetPasswordCB()</tt></a> </li>
191 <li><a href='#cupsSetServer'><tt>cupsSetServer()</tt></a> </li>
192 <li><a href='#cupsSetUser'><tt>cupsSetUser()</tt></a> </li>
193 <li><a href='#cupsTempFd'><tt>cupsTempFd()</tt></a> </li>
194 <li><a href='#cupsTempFile'><tt>cupsTempFile()</tt></a> <span class='info'>&nbsp;DEPRECATED&nbsp;</span></li>
195 <li><a href='#cupsTempFile2'><tt>cupsTempFile2()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
196 <li><a href='#cupsUser'><tt>cupsUser()</tt></a> </li>
197 </ul>
198 <!-- NEW PAGE -->
199 <h3 class='title'><a name='cupsAddDest'>cupsAddDest()</a></h3>
200 <h4>Description</h4>
201 <p>Add a destination to the list of destinations.
202 <p>This function cannot be used to add a new class or printer queue,
203 it only adds a new container of saved options for the named
204 destination or instance.
205 <p>If the named destination already exists, the destination list is
206 returned unchanged. Adding a new instance of a destination creates
207 a copy of that destination's options.
208 <p>Use the cupsSaveDests() function to save the updated list of
209 destinations to the user's lpoptions file.
210 <h4>Syntax</h4>
211 <p><tt>
212 int<br>
213 cupsAddDest(
214 const char * name,
215 const char * instance,
216 int num_dests,
217 <a href='#cups_dest_t'>cups_dest_t</a> ** dests);
218 </tt></p>
219 <h4>Arguments</h4>
220 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
221 <thead><tr><th>Name</th><th>Description</th></tr></thead>
222 <tbody>
223 <tr><td><tt>name</tt></td><td>Destination name</td></tr>
224 <tr><td><tt>instance</tt></td><td>Instance name or NULL for none/primary</td></tr>
225 <tr><td><tt>num_dests</tt></td><td>Number of destinations</td></tr>
226 <tr><td><tt>dests</tt></td><td>Destinations</td></tr>
227 </tbody></table></div>
228 <h4>Returns</h4>
229 <p>New number of destinations</p>
230 <!-- NEW PAGE -->
231 <h3 class='title'><a name='cupsAddOption'>cupsAddOption()</a></h3>
232 <h4>Description</h4>
233 <p>Add an option to an option array.
234 <h4>Syntax</h4>
235 <p><tt>
236 int<br>
237 cupsAddOption(
238 const char * name,
239 const char * value,
240 int num_options,
241 <a href='#cups_option_t'>cups_option_t</a> ** options);
242 </tt></p>
243 <h4>Arguments</h4>
244 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
245 <thead><tr><th>Name</th><th>Description</th></tr></thead>
246 <tbody>
247 <tr><td><tt>name</tt></td><td>Name of option</td></tr>
248 <tr><td><tt>value</tt></td><td>Value of option</td></tr>
249 <tr><td><tt>num_options</tt></td><td>Number of options</td></tr>
250 <tr><td><tt>options</tt></td><td>Pointer to options</td></tr>
251 </tbody></table></div>
252 <h4>Returns</h4>
253 <p>Number of options</p>
254 <!-- NEW PAGE -->
255 <h3 class='title'><a name='cupsCancelJob'>cupsCancelJob()</a></h3>
256 <h4>Description</h4>
257 <p>Cancel a print job on the default server.
258 <p>Use the cupsLastError() and cupsLastErrorString() functions to get
259 the cause of any failure.
260 <h4>Syntax</h4>
261 <p><tt>
262 int<br>
263 cupsCancelJob(
264 const char * name,
265 int job);
266 </tt></p>
267 <h4>Arguments</h4>
268 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
269 <thead><tr><th>Name</th><th>Description</th></tr></thead>
270 <tbody>
271 <tr><td><tt>name</tt></td><td>Name of printer or class</td></tr>
272 <tr><td><tt>job</tt></td><td>Job ID</td></tr>
273 </tbody></table></div>
274 <h4>Returns</h4>
275 <p>1 on success, 0 on failure</p>
276 <!-- NEW PAGE -->
277 <h3 class='title'><a name='cupsEncryption'>cupsEncryption()</a></h3>
278 <h4>Description</h4>
279 <p>Get the default encryption settings.
280 <p>The default encryption setting comes from the CUPS_ENCRYPTION
281 environment variable, then the ~/.cupsrc file, and finally the
282 /etc/cups/client.conf file. If not set, the default is
283 HTTP_ENCRYPT_IF_REQUESTED.
284 <h4>Syntax</h4>
285 <p><tt>
286 http_encryption_t<br>
287 cupsEncryption(void);
288 </tt></p>
289 <h4>Arguments</h4>
290 <p>None.</p>
291 <h4>Returns</h4>
292 <p>Encryption settings</p>
293 <!-- NEW PAGE -->
294 <h3 class='title'><a name='cupsFreeDests'>cupsFreeDests()</a></h3>
295 <h4>Description</h4>
296 <p>Free the memory used by the list of destinations.
297 <h4>Syntax</h4>
298 <p><tt>
299 void<br>
300 cupsFreeDests(
301 int num_dests,
302 <a href='#cups_dest_t'>cups_dest_t</a> * dests);
303 </tt></p>
304 <h4>Arguments</h4>
305 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
306 <thead><tr><th>Name</th><th>Description</th></tr></thead>
307 <tbody>
308 <tr><td><tt>num_dests</tt></td><td>Number of destinations</td></tr>
309 <tr><td><tt>dests</tt></td><td>Destinations</td></tr>
310 </tbody></table></div>
311 <h4>Returns</h4>
312 <p>Nothing.</p>
313 <!-- NEW PAGE -->
314 <h3 class='title'><a name='cupsFreeJobs'>cupsFreeJobs()</a></h3>
315 <h4>Description</h4>
316 <p>Free memory used by job data.
317 <h4>Syntax</h4>
318 <p><tt>
319 void<br>
320 cupsFreeJobs(
321 int num_jobs,
322 <a href='#cups_job_t'>cups_job_t</a> * jobs);
323 </tt></p>
324 <h4>Arguments</h4>
325 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
326 <thead><tr><th>Name</th><th>Description</th></tr></thead>
327 <tbody>
328 <tr><td><tt>num_jobs</tt></td><td>Number of jobs</td></tr>
329 <tr><td><tt>jobs</tt></td><td>Jobs</td></tr>
330 </tbody></table></div>
331 <h4>Returns</h4>
332 <p>Nothing.</p>
333 <!-- NEW PAGE -->
334 <h3 class='title'><a name='cupsFreeOptions'>cupsFreeOptions()</a></h3>
335 <h4>Description</h4>
336 <p>Free all memory used by options.
337 <h4>Syntax</h4>
338 <p><tt>
339 void<br>
340 cupsFreeOptions(
341 int num_options,
342 <a href='#cups_option_t'>cups_option_t</a> * options);
343 </tt></p>
344 <h4>Arguments</h4>
345 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
346 <thead><tr><th>Name</th><th>Description</th></tr></thead>
347 <tbody>
348 <tr><td><tt>num_options</tt></td><td>Number of options</td></tr>
349 <tr><td><tt>options</tt></td><td>Pointer to options</td></tr>
350 </tbody></table></div>
351 <h4>Returns</h4>
352 <p>Nothing.</p>
353 <!-- NEW PAGE -->
354 <h3 class='title'><span class='info'>&nbsp;DEPRECATED&nbsp;</span><a name='cupsGetClasses'>cupsGetClasses()</a></h3>
355 <h4>Description</h4>
356 <p>Get a list of printer classes from the default server.
357 <p>This function is deprecated - use cupsGetDests() instead.
358
359
360 <h4>Syntax</h4>
361 <p><tt>
362 int<br>
363 cupsGetClasses(
364 char *** classes);
365 </tt></p>
366 <h4>Arguments</h4>
367 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
368 <thead><tr><th>Name</th><th>Description</th></tr></thead>
369 <tbody>
370 <tr><td><tt>classes</tt></td><td>Classes</td></tr>
371 </tbody></table></div>
372 <h4>Returns</h4>
373 <p>Number of classes</p>
374 <!-- NEW PAGE -->
375 <h3 class='title'><a name='cupsGetDefault'>cupsGetDefault()</a></h3>
376 <h4>Description</h4>
377 <p>Get the default printer or class for the default server.
378 <p>This function returns the default printer or class as defined by
379 the LPDEST or PRINTER environment variables. If these environment
380 variables are not set, the server default destination is returned.
381 Applications should use the cupsGetDests() and cupsGetDest() functions
382 to get the user-defined default printer, as this function does not
383 support the lpoptions-defined default printer.
384 <h4>Syntax</h4>
385 <p><tt>
386 const char *<br>
387 cupsGetDefault(void);
388 </tt></p>
389 <h4>Arguments</h4>
390 <p>None.</p>
391 <h4>Returns</h4>
392 <p>Default printer or NULL</p>
393 <!-- NEW PAGE -->
394 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span><a name='cupsGetDefault2'>cupsGetDefault2()</a></h3>
395 <h4>Description</h4>
396 <p>Get the default printer or class for the specified server.
397 <p>This function returns the default printer or class as defined by
398 the LPDEST or PRINTER environment variables. If these environment
399 variables are not set, the server default destination is returned.
400 Applications should use the cupsGetDests() and cupsGetDest() functions
401 to get the user-defined default printer, as this function does not
402 support the lpoptions-defined default printer.
403
404
405 <h4>Syntax</h4>
406 <p><tt>
407 const char *<br>
408 cupsGetDefault2(
409 http_t * http);
410 </tt></p>
411 <h4>Arguments</h4>
412 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
413 <thead><tr><th>Name</th><th>Description</th></tr></thead>
414 <tbody>
415 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
416 </tbody></table></div>
417 <h4>Returns</h4>
418 <p>Default printer or NULL</p>
419 <!-- NEW PAGE -->
420 <h3 class='title'><a name='cupsGetDest'>cupsGetDest()</a></h3>
421 <h4>Description</h4>
422 <p>Get the named destination from the list.
423 <p>Use the cupsGetDests() or cupsGetDests2() functions to get a
424 list of supported destinations for the current user.
425 <h4>Syntax</h4>
426 <p><tt>
427 <a href='#cups_dest_t'>cups_dest_t</a> *<br>
428 cupsGetDest(
429 const char * name,
430 const char * instance,
431 int num_dests,
432 <a href='#cups_dest_t'>cups_dest_t</a> * dests);
433 </tt></p>
434 <h4>Arguments</h4>
435 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
436 <thead><tr><th>Name</th><th>Description</th></tr></thead>
437 <tbody>
438 <tr><td><tt>name</tt></td><td>Destination name or NULL for the default destination</td></tr>
439 <tr><td><tt>instance</tt></td><td>Instance name or NULL</td></tr>
440 <tr><td><tt>num_dests</tt></td><td>Number of destinations</td></tr>
441 <tr><td><tt>dests</tt></td><td>Destinations</td></tr>
442 </tbody></table></div>
443 <h4>Returns</h4>
444 <p>Destination pointer or NULL</p>
445 <!-- NEW PAGE -->
446 <h3 class='title'><a name='cupsGetDests'>cupsGetDests()</a></h3>
447 <h4>Description</h4>
448 <p>Get the list of destinations from the default server.
449 <p>Starting with CUPS 1.2, the returned list of destinations include the
450 printer-info, printer-is-accepting-jobs, printer-is-shared,
451 printer-make-and-model, printer-state, printer-state-change-time,
452 printer-state-reasons, and printer-type attributes as options.
453 <p>Use the cupsFreeDests() function to free the destination list and
454 the cupsGetDest() function to find a particular destination.
455 <h4>Syntax</h4>
456 <p><tt>
457 int<br>
458 cupsGetDests(
459 <a href='#cups_dest_t'>cups_dest_t</a> ** dests);
460 </tt></p>
461 <h4>Arguments</h4>
462 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
463 <thead><tr><th>Name</th><th>Description</th></tr></thead>
464 <tbody>
465 <tr><td><tt>dests</tt></td><td>Destinations</td></tr>
466 </tbody></table></div>
467 <h4>Returns</h4>
468 <p>Number of destinations</p>
469 <!-- NEW PAGE -->
470 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span><a name='cupsGetDests2'>cupsGetDests2()</a></h3>
471 <h4>Description</h4>
472 <p>Get the list of destinations from the specified server.
473 <p>Starting with CUPS 1.2, the returned list of destinations include the
474 printer-info, printer-is-accepting-jobs, printer-is-shared,
475 printer-make-and-model, printer-state, printer-state-change-time,
476 printer-state-reasons, and printer-type attributes as options.
477 <p>Use the cupsFreeDests() function to free the destination list and
478 the cupsGetDest() function to find a particular destination.
479
480
481 <h4>Syntax</h4>
482 <p><tt>
483 int<br>
484 cupsGetDests2(
485 http_t * http,
486 <a href='#cups_dest_t'>cups_dest_t</a> ** dests);
487 </tt></p>
488 <h4>Arguments</h4>
489 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
490 <thead><tr><th>Name</th><th>Description</th></tr></thead>
491 <tbody>
492 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
493 <tr><td><tt>dests</tt></td><td>Destinations</td></tr>
494 </tbody></table></div>
495 <h4>Returns</h4>
496 <p>Number of destinations</p>
497 <!-- NEW PAGE -->
498 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.20&nbsp;</span><a name='cupsGetFd'>cupsGetFd()</a></h3>
499 <h4>Description</h4>
500 <p>Get a file from the server.
501 <p>This function returns HTTP_OK when the file is successfully retrieved.
502
503
504 <h4>Syntax</h4>
505 <p><tt>
506 http_status_t<br>
507 cupsGetFd(
508 http_t * http,
509 const char * resource,
510 int fd);
511 </tt></p>
512 <h4>Arguments</h4>
513 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
514 <thead><tr><th>Name</th><th>Description</th></tr></thead>
515 <tbody>
516 <tr><td><tt>http</tt></td><td>HTTP connection to server</td></tr>
517 <tr><td><tt>resource</tt></td><td>Resource name</td></tr>
518 <tr><td><tt>fd</tt></td><td>File descriptor</td></tr>
519 </tbody></table></div>
520 <h4>Returns</h4>
521 <p>HTTP status</p>
522 <!-- NEW PAGE -->
523 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.20&nbsp;</span><a name='cupsGetFile'>cupsGetFile()</a></h3>
524 <h4>Description</h4>
525 <p>Get a file from the server.
526 <p>This function returns HTTP_OK when the file is successfully retrieved.
527
528
529 <h4>Syntax</h4>
530 <p><tt>
531 http_status_t<br>
532 cupsGetFile(
533 http_t * http,
534 const char * resource,
535 const char * filename);
536 </tt></p>
537 <h4>Arguments</h4>
538 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
539 <thead><tr><th>Name</th><th>Description</th></tr></thead>
540 <tbody>
541 <tr><td><tt>http</tt></td><td>HTTP connection to server</td></tr>
542 <tr><td><tt>resource</tt></td><td>Resource name</td></tr>
543 <tr><td><tt>filename</tt></td><td>Filename</td></tr>
544 </tbody></table></div>
545 <h4>Returns</h4>
546 <p>HTTP status</p>
547 <!-- NEW PAGE -->
548 <h3 class='title'><a name='cupsGetJobs'>cupsGetJobs()</a></h3>
549 <h4>Description</h4>
550 <p>Get the jobs from the default server.
551 <h4>Syntax</h4>
552 <p><tt>
553 int<br>
554 cupsGetJobs(
555 <a href='#cups_job_t'>cups_job_t</a> ** jobs,
556 const char * mydest,
557 int myjobs,
558 int completed);
559 </tt></p>
560 <h4>Arguments</h4>
561 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
562 <thead><tr><th>Name</th><th>Description</th></tr></thead>
563 <tbody>
564 <tr><td><tt>jobs</tt></td><td>Job data</td></tr>
565 <tr><td><tt>mydest</tt></td><td>NULL = all destinations, *
566 otherwise show jobs for mydest</td></tr>
567 <tr><td><tt>myjobs</tt></td><td>0 = all users, 1 = mine</td></tr>
568 <tr><td><tt>completed</tt></td><td>-1 = show all, 0 = active, *
569 1 = completed jobs</td></tr>
570 </tbody></table></div>
571 <h4>Returns</h4>
572 <p>Number of jobs</p>
573 <!-- NEW PAGE -->
574 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span><a name='cupsGetJobs2'>cupsGetJobs2()</a></h3>
575 <h4>Description</h4>
576 <p>Get the jobs from the specified server.
577
578
579 <h4>Syntax</h4>
580 <p><tt>
581 int<br>
582 cupsGetJobs2(
583 http_t * http,
584 <a href='#cups_job_t'>cups_job_t</a> ** jobs,
585 const char * mydest,
586 int myjobs,
587 int completed);
588 </tt></p>
589 <h4>Arguments</h4>
590 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
591 <thead><tr><th>Name</th><th>Description</th></tr></thead>
592 <tbody>
593 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
594 <tr><td><tt>jobs</tt></td><td>Job data</td></tr>
595 <tr><td><tt>mydest</tt></td><td>NULL = all destinations, *
596 otherwise show jobs for mydest</td></tr>
597 <tr><td><tt>myjobs</tt></td><td>0 = all users, 1 = mine</td></tr>
598 <tr><td><tt>completed</tt></td><td>-1 = show all, 0 = active, *
599 1 = completed jobs</td></tr>
600 </tbody></table></div>
601 <h4>Returns</h4>
602 <p>Number of jobs</p>
603 <!-- NEW PAGE -->
604 <h3 class='title'><a name='cupsGetOption'>cupsGetOption()</a></h3>
605 <h4>Description</h4>
606 <p>Get an option value.
607 <h4>Syntax</h4>
608 <p><tt>
609 const char *<br>
610 cupsGetOption(
611 const char * name,
612 int num_options,
613 <a href='#cups_option_t'>cups_option_t</a> * options);
614 </tt></p>
615 <h4>Arguments</h4>
616 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
617 <thead><tr><th>Name</th><th>Description</th></tr></thead>
618 <tbody>
619 <tr><td><tt>name</tt></td><td>Name of option</td></tr>
620 <tr><td><tt>num_options</tt></td><td>Number of options</td></tr>
621 <tr><td><tt>options</tt></td><td>Options</td></tr>
622 </tbody></table></div>
623 <h4>Returns</h4>
624 <p>Option value or NULL</p>
625 <!-- NEW PAGE -->
626 <h3 class='title'><a name='cupsGetPPD'>cupsGetPPD()</a></h3>
627 <h4>Description</h4>
628 <p>Get the PPD file for a printer on the default server.
629 <p>For classes, cupsGetPPD() returns the PPD file for the first printer
630 in the class.
631 <h4>Syntax</h4>
632 <p><tt>
633 const char *<br>
634 cupsGetPPD(
635 const char * name);
636 </tt></p>
637 <h4>Arguments</h4>
638 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
639 <thead><tr><th>Name</th><th>Description</th></tr></thead>
640 <tbody>
641 <tr><td><tt>name</tt></td><td>Printer name</td></tr>
642 </tbody></table></div>
643 <h4>Returns</h4>
644 <p>Filename for PPD file</p>
645 <!-- NEW PAGE -->
646 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span><a name='cupsGetPPD2'>cupsGetPPD2()</a></h3>
647 <h4>Description</h4>
648 <p>Get the PPD file for a printer from the specified server.
649 <p>For classes, cupsGetPPD2() returns the PPD file for the first printer
650 in the class.
651
652
653 <h4>Syntax</h4>
654 <p><tt>
655 const char *<br>
656 cupsGetPPD2(
657 http_t * http,
658 const char * name);
659 </tt></p>
660 <h4>Arguments</h4>
661 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
662 <thead><tr><th>Name</th><th>Description</th></tr></thead>
663 <tbody>
664 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
665 <tr><td><tt>name</tt></td><td>Printer name</td></tr>
666 </tbody></table></div>
667 <h4>Returns</h4>
668 <p>Filename for PPD file</p>
669 <!-- NEW PAGE -->
670 <h3 class='title'><a name='cupsGetPassword'>cupsGetPassword()</a></h3>
671 <h4>Description</h4>
672 <p>Get a password from the user.
673 <p>Uses the current password callback function. Returns NULL if the
674 user does not provide a password.
675 <h4>Syntax</h4>
676 <p><tt>
677 const char *<br>
678 cupsGetPassword(
679 const char * prompt);
680 </tt></p>
681 <h4>Arguments</h4>
682 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
683 <thead><tr><th>Name</th><th>Description</th></tr></thead>
684 <tbody>
685 <tr><td><tt>prompt</tt></td><td>Prompt string</td></tr>
686 </tbody></table></div>
687 <h4>Returns</h4>
688 <p>Password</p>
689 <!-- NEW PAGE -->
690 <h3 class='title'><span class='info'>&nbsp;DEPRECATED&nbsp;</span><a name='cupsGetPrinters'>cupsGetPrinters()</a></h3>
691 <h4>Description</h4>
692 <p>Get a list of printers from the default server.
693 <p>This function is deprecated - use cupsGetDests() instead.
694
695
696 <h4>Syntax</h4>
697 <p><tt>
698 int<br>
699 cupsGetPrinters(
700 char *** printers);
701 </tt></p>
702 <h4>Arguments</h4>
703 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
704 <thead><tr><th>Name</th><th>Description</th></tr></thead>
705 <tbody>
706 <tr><td><tt>printers</tt></td><td>Printers</td></tr>
707 </tbody></table></div>
708 <h4>Returns</h4>
709 <p>Number of printers</p>
710 <!-- NEW PAGE -->
711 <h3 class='title'><span class='info'>&nbsp;CUPS 1.3&nbsp;</span><a name='cupsGetServerPPD'>cupsGetServerPPD()</a></h3>
712 <h4>Description</h4>
713 <p>Get an available PPD file from the server.
714 <p>This function returns the named PPD file from the server. The
715 list of available PPDs is provided by the IPP CUPS_GET_PPDS
716 operation.
717 <p>You must remove (unlink) the PPD file when you are finished with
718 it. The PPD filename is stored in a static location that will be
719 overwritten on the next call to cupsGetPPD(), cupsGetPPD2(), or
720 cupsGetServerPPD().
721
722
723 <h4>Syntax</h4>
724 <p><tt>
725 char *<br>
726 cupsGetServerPPD(
727 http_t * http,
728 const char * name);
729 </tt></p>
730 <h4>Arguments</h4>
731 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
732 <thead><tr><th>Name</th><th>Description</th></tr></thead>
733 <tbody>
734 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
735 <tr><td><tt>name</tt></td><td>Name of PPD file (&quot;ppd-name&quot;)</td></tr>
736 </tbody></table></div>
737 <h4>Returns</h4>
738 <p>Name of PPD file or NULL on error</p>
739 <!-- NEW PAGE -->
740 <h3 class='title'><a name='cupsLangDefault'>cupsLangDefault()</a></h3>
741 <h4>Description</h4>
742 <p>Return the default language.
743 <h4>Syntax</h4>
744 <p><tt>
745 cups_lang_t *<br>
746 cupsLangDefault(void);
747 </tt></p>
748 <h4>Arguments</h4>
749 <p>None.</p>
750 <h4>Returns</h4>
751 <p>Language data</p>
752 <!-- NEW PAGE -->
753 <h3 class='title'><a name='cupsLangEncoding'>cupsLangEncoding()</a></h3>
754 <h4>Description</h4>
755 <p>Return the character encoding (us-ascii, etc.)
756 for the given language.
757 <h4>Syntax</h4>
758 <p><tt>
759 const char *<br>
760 cupsLangEncoding(
761 cups_lang_t * lang);
762 </tt></p>
763 <h4>Arguments</h4>
764 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
765 <thead><tr><th>Name</th><th>Description</th></tr></thead>
766 <tbody>
767 <tr><td><tt>lang</tt></td><td>Language data</td></tr>
768 </tbody></table></div>
769 <h4>Returns</h4>
770 <p>Character encoding</p>
771 <!-- NEW PAGE -->
772 <h3 class='title'><a name='cupsLangFlush'>cupsLangFlush()</a></h3>
773 <h4>Description</h4>
774 <p>Flush all language data out of the cache.
775 <h4>Syntax</h4>
776 <p><tt>
777 void<br>
778 cupsLangFlush(void);
779 </tt></p>
780 <h4>Arguments</h4>
781 <p>None.</p>
782 <h4>Returns</h4>
783 <p>Nothing.</p>
784 <!-- NEW PAGE -->
785 <h3 class='title'><a name='cupsLangFree'>cupsLangFree()</a></h3>
786 <h4>Description</h4>
787 <p>Free language data.
788 <p>This does not actually free anything; use cupsLangFlush() for that.
789 <h4>Syntax</h4>
790 <p><tt>
791 void<br>
792 cupsLangFree(
793 cups_lang_t * lang);
794 </tt></p>
795 <h4>Arguments</h4>
796 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
797 <thead><tr><th>Name</th><th>Description</th></tr></thead>
798 <tbody>
799 <tr><td><tt>lang</tt></td><td>Language to free</td></tr>
800 </tbody></table></div>
801 <h4>Returns</h4>
802 <p>Nothing.</p>
803 <!-- NEW PAGE -->
804 <h3 class='title'><a name='cupsLangGet'>cupsLangGet()</a></h3>
805 <h4>Description</h4>
806 <p>Get a language.
807 <h4>Syntax</h4>
808 <p><tt>
809 cups_lang_t *<br>
810 cupsLangGet(
811 const char * language);
812 </tt></p>
813 <h4>Arguments</h4>
814 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
815 <thead><tr><th>Name</th><th>Description</th></tr></thead>
816 <tbody>
817 <tr><td><tt>language</tt></td><td>Language or locale</td></tr>
818 </tbody></table></div>
819 <h4>Returns</h4>
820 <p>Language data</p>
821 <!-- NEW PAGE -->
822 <h3 class='title'><a name='cupsLastError'>cupsLastError()</a></h3>
823 <h4>Description</h4>
824 <p>Return the last IPP status code.
825 <h4>Syntax</h4>
826 <p><tt>
827 ipp_status_t<br>
828 cupsLastError(void);
829 </tt></p>
830 <h4>Arguments</h4>
831 <p>None.</p>
832 <h4>Returns</h4>
833 <p>IPP status code from last request</p>
834 <!-- NEW PAGE -->
835 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='cupsLastErrorString'>cupsLastErrorString()</a></h3>
836 <h4>Description</h4>
837 <p>Return the last IPP status-message.
838
839
840 <h4>Syntax</h4>
841 <p><tt>
842 const char *<br>
843 cupsLastErrorString(void);
844 </tt></p>
845 <h4>Arguments</h4>
846 <p>None.</p>
847 <h4>Returns</h4>
848 <p>status-message text from last request</p>
849 <!-- NEW PAGE -->
850 <h3 class='title'><a name='cupsMarkOptions'>cupsMarkOptions()</a></h3>
851 <h4>Description</h4>
852 <p>Mark command-line options in a PPD file.
853 <h4>Syntax</h4>
854 <p><tt>
855 int<br>
856 cupsMarkOptions(
857 ppd_file_t * ppd,
858 int num_options,
859 <a href='#cups_option_t'>cups_option_t</a> * options);
860 </tt></p>
861 <h4>Arguments</h4>
862 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
863 <thead><tr><th>Name</th><th>Description</th></tr></thead>
864 <tbody>
865 <tr><td><tt>ppd</tt></td><td>PPD file</td></tr>
866 <tr><td><tt>num_options</tt></td><td>Number of options</td></tr>
867 <tr><td><tt>options</tt></td><td>Options</td></tr>
868 </tbody></table></div>
869 <h4>Returns</h4>
870 <p>1 if conflicting</p>
871 <!-- NEW PAGE -->
872 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='cupsNotifySubject'>cupsNotifySubject()</a></h3>
873 <h4>Description</h4>
874 <p>Return the subject for the given notification message.
875 <p>The returned string must be freed by the caller using free().
876
877
878 <h4>Syntax</h4>
879 <p><tt>
880 char *<br>
881 cupsNotifySubject(
882 cups_lang_t * lang,
883 ipp_t * event);
884 </tt></p>
885 <h4>Arguments</h4>
886 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
887 <thead><tr><th>Name</th><th>Description</th></tr></thead>
888 <tbody>
889 <tr><td><tt>lang</tt></td><td>Language data</td></tr>
890 <tr><td><tt>event</tt></td><td>Event data</td></tr>
891 </tbody></table></div>
892 <h4>Returns</h4>
893 <p>Subject string or NULL</p>
894 <!-- NEW PAGE -->
895 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='cupsNotifyText'>cupsNotifyText()</a></h3>
896 <h4>Description</h4>
897 <p>Return the text for the given notification message.
898 <p>The returned string must be freed by the caller using free().
899
900
901 <h4>Syntax</h4>
902 <p><tt>
903 char *<br>
904 cupsNotifyText(
905 cups_lang_t * lang,
906 ipp_t * event);
907 </tt></p>
908 <h4>Arguments</h4>
909 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
910 <thead><tr><th>Name</th><th>Description</th></tr></thead>
911 <tbody>
912 <tr><td><tt>lang</tt></td><td>Language data</td></tr>
913 <tr><td><tt>event</tt></td><td>Event data</td></tr>
914 </tbody></table></div>
915 <h4>Returns</h4>
916 <p>Message text or NULL</p>
917 <!-- NEW PAGE -->
918 <h3 class='title'><a name='cupsParseOptions'>cupsParseOptions()</a></h3>
919 <h4>Description</h4>
920 <p>Parse options from a command-line argument.
921 <p>This function converts space-delimited name/value pairs according
922 to the PAPI text option ABNF specification. Collection values
923 (&quot;name={a=... b=... c=...}&quot;) are stored with the curley brackets
924 intact - use cupsParseOptions() on the value to extract the collection
925 attributes.
926 <h4>Syntax</h4>
927 <p><tt>
928 int<br>
929 cupsParseOptions(
930 const char * arg,
931 int num_options,
932 <a href='#cups_option_t'>cups_option_t</a> ** options);
933 </tt></p>
934 <h4>Arguments</h4>
935 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
936 <thead><tr><th>Name</th><th>Description</th></tr></thead>
937 <tbody>
938 <tr><td><tt>arg</tt></td><td>Argument to parse</td></tr>
939 <tr><td><tt>num_options</tt></td><td>Number of options</td></tr>
940 <tr><td><tt>options</tt></td><td>Options found</td></tr>
941 </tbody></table></div>
942 <h4>Returns</h4>
943 <p>Number of options found</p>
944 <!-- NEW PAGE -->
945 <h3 class='title'><a name='cupsPrintFile'>cupsPrintFile()</a></h3>
946 <h4>Description</h4>
947 <p>Print a file to a printer or class on the default server.
948 <h4>Syntax</h4>
949 <p><tt>
950 int<br>
951 cupsPrintFile(
952 const char * name,
953 const char * filename,
954 const char * title,
955 int num_options,
956 <a href='#cups_option_t'>cups_option_t</a> * options);
957 </tt></p>
958 <h4>Arguments</h4>
959 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
960 <thead><tr><th>Name</th><th>Description</th></tr></thead>
961 <tbody>
962 <tr><td><tt>name</tt></td><td>Printer or class name</td></tr>
963 <tr><td><tt>filename</tt></td><td>File to print</td></tr>
964 <tr><td><tt>title</tt></td><td>Title of job</td></tr>
965 <tr><td><tt>num_options</tt></td><td>Number of options</td></tr>
966 <tr><td><tt>options</tt></td><td>Options</td></tr>
967 </tbody></table></div>
968 <h4>Returns</h4>
969 <p>Job ID</p>
970 <!-- NEW PAGE -->
971 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span><a name='cupsPrintFile2'>cupsPrintFile2()</a></h3>
972 <h4>Description</h4>
973 <p>Print a file to a printer or class on the specified server.
974
975
976 <h4>Syntax</h4>
977 <p><tt>
978 int<br>
979 cupsPrintFile2(
980 http_t * http,
981 const char * name,
982 const char * filename,
983 const char * title,
984 int num_options,
985 <a href='#cups_option_t'>cups_option_t</a> * options);
986 </tt></p>
987 <h4>Arguments</h4>
988 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
989 <thead><tr><th>Name</th><th>Description</th></tr></thead>
990 <tbody>
991 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
992 <tr><td><tt>name</tt></td><td>Printer or class name</td></tr>
993 <tr><td><tt>filename</tt></td><td>File to print</td></tr>
994 <tr><td><tt>title</tt></td><td>Title of job</td></tr>
995 <tr><td><tt>num_options</tt></td><td>Number of options</td></tr>
996 <tr><td><tt>options</tt></td><td>Options</td></tr>
997 </tbody></table></div>
998 <h4>Returns</h4>
999 <p>Job ID</p>
1000 <!-- NEW PAGE -->
1001 <h3 class='title'><a name='cupsPrintFiles'>cupsPrintFiles()</a></h3>
1002 <h4>Description</h4>
1003 <p>Print one or more files to a printer or class on the
1004 default server.
1005 <h4>Syntax</h4>
1006 <p><tt>
1007 int<br>
1008 cupsPrintFiles(
1009 const char * name,
1010 int num_files,
1011 const char ** files,
1012 const char * title,
1013 int num_options,
1014 <a href='#cups_option_t'>cups_option_t</a> * options);
1015 </tt></p>
1016 <h4>Arguments</h4>
1017 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
1018 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1019 <tbody>
1020 <tr><td><tt>name</tt></td><td>Printer or class name</td></tr>
1021 <tr><td><tt>num_files</tt></td><td>Number of files</td></tr>
1022 <tr><td><tt>files</tt></td><td>File(s) to print</td></tr>
1023 <tr><td><tt>title</tt></td><td>Title of job</td></tr>
1024 <tr><td><tt>num_options</tt></td><td>Number of options</td></tr>
1025 <tr><td><tt>options</tt></td><td>Options</td></tr>
1026 </tbody></table></div>
1027 <h4>Returns</h4>
1028 <p>Job ID</p>
1029 <!-- NEW PAGE -->
1030 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span><a name='cupsPrintFiles2'>cupsPrintFiles2()</a></h3>
1031 <h4>Description</h4>
1032 <p>Print one or more files to a printer or class on the
1033 specified server.
1034
1035
1036 <h4>Syntax</h4>
1037 <p><tt>
1038 int<br>
1039 cupsPrintFiles2(
1040 http_t * http,
1041 const char * name,
1042 int num_files,
1043 const char ** files,
1044 const char * title,
1045 int num_options,
1046 <a href='#cups_option_t'>cups_option_t</a> * options);
1047 </tt></p>
1048 <h4>Arguments</h4>
1049 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
1050 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1051 <tbody>
1052 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1053 <tr><td><tt>name</tt></td><td>Printer or class name</td></tr>
1054 <tr><td><tt>num_files</tt></td><td>Number of files</td></tr>
1055 <tr><td><tt>files</tt></td><td>File(s) to print</td></tr>
1056 <tr><td><tt>title</tt></td><td>Title of job</td></tr>
1057 <tr><td><tt>num_options</tt></td><td>Number of options</td></tr>
1058 <tr><td><tt>options</tt></td><td>Options</td></tr>
1059 </tbody></table></div>
1060 <h4>Returns</h4>
1061 <p>Job ID</p>
1062 <!-- NEW PAGE -->
1063 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.20&nbsp;</span><a name='cupsPutFd'>cupsPutFd()</a></h3>
1064 <h4>Description</h4>
1065 <p>Put a file on the server.
1066 <p>This function returns HTTP_CREATED when the file is stored successfully.
1067
1068
1069 <h4>Syntax</h4>
1070 <p><tt>
1071 http_status_t<br>
1072 cupsPutFd(
1073 http_t * http,
1074 const char * resource,
1075 int fd);
1076 </tt></p>
1077 <h4>Arguments</h4>
1078 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
1079 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1080 <tbody>
1081 <tr><td><tt>http</tt></td><td>HTTP connection to server</td></tr>
1082 <tr><td><tt>resource</tt></td><td>Resource name</td></tr>
1083 <tr><td><tt>fd</tt></td><td>File descriptor</td></tr>
1084 </tbody></table></div>
1085 <h4>Returns</h4>
1086 <p>HTTP status</p>
1087 <!-- NEW PAGE -->
1088 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.20&nbsp;</span><a name='cupsPutFile'>cupsPutFile()</a></h3>
1089 <h4>Description</h4>
1090 <p>Put a file on the server.
1091 <p>This function returns HTTP_CREATED when the file is stored successfully.
1092
1093
1094 <h4>Syntax</h4>
1095 <p><tt>
1096 http_status_t<br>
1097 cupsPutFile(
1098 http_t * http,
1099 const char * resource,
1100 const char * filename);
1101 </tt></p>
1102 <h4>Arguments</h4>
1103 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
1104 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1105 <tbody>
1106 <tr><td><tt>http</tt></td><td>HTTP connection to server</td></tr>
1107 <tr><td><tt>resource</tt></td><td>Resource name</td></tr>
1108 <tr><td><tt>filename</tt></td><td>Filename</td></tr>
1109 </tbody></table></div>
1110 <h4>Returns</h4>
1111 <p>HTTP status</p>
1112 <!-- NEW PAGE -->
1113 <h3 class='title'><span class='info'>&nbsp;CUPS 1.3&nbsp;</span><a name='cupsRemoveDest'>cupsRemoveDest()</a></h3>
1114 <h4>Description</h4>
1115 <p>Remove a destination from the destination list.
1116 <p>Removing a destination/instance does not delete the class or printer
1117 queue, merely the lpoptions for that destination/instance. Use the
1118 cupsSetDests() or cupsSetDests2() functions to save the new options
1119 for the user.
1120
1121
1122 <h4>Syntax</h4>
1123 <p><tt>
1124 int<br>
1125 cupsRemoveDest(
1126 const char * name,
1127 const char * instance,
1128 int num_dests,
1129 <a href='#cups_dest_t'>cups_dest_t</a> ** dests);
1130 </tt></p>
1131 <h4>Arguments</h4>
1132 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
1133 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1134 <tbody>
1135 <tr><td><tt>name</tt></td><td>Destination name</td></tr>
1136 <tr><td><tt>instance</tt></td><td>Instance name or NULL</td></tr>
1137 <tr><td><tt>num_dests</tt></td><td>Number of destinations</td></tr>
1138 <tr><td><tt>dests</tt></td><td>Destinations</td></tr>
1139 </tbody></table></div>
1140 <h4>Returns</h4>
1141 <p>New number of destinations</p>
1142 <!-- NEW PAGE -->
1143 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='cupsRemoveOption'>cupsRemoveOption()</a></h3>
1144 <h4>Description</h4>
1145 <p>Remove an option from an option array.
1146
1147
1148 <h4>Syntax</h4>
1149 <p><tt>
1150 int<br>
1151 cupsRemoveOption(
1152 const char * name,
1153 int num_options,
1154 <a href='#cups_option_t'>cups_option_t</a> ** options);
1155 </tt></p>
1156 <h4>Arguments</h4>
1157 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
1158 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1159 <tbody>
1160 <tr><td><tt>name</tt></td><td>Option name</td></tr>
1161 <tr><td><tt>num_options</tt></td><td>Current number of options</td></tr>
1162 <tr><td><tt>options</tt></td><td>Options</td></tr>
1163 </tbody></table></div>
1164 <h4>Returns</h4>
1165 <p>New number of options</p>
1166 <!-- NEW PAGE -->
1167 <h3 class='title'><a name='cupsServer'>cupsServer()</a></h3>
1168 <h4>Description</h4>
1169 <p>Return the hostname/address of the default server.
1170 <p>The returned value can be a fully-qualified hostname, a numeric
1171 IPv4 or IPv6 address, or a domain socket pathname.
1172 <h4>Syntax</h4>
1173 <p><tt>
1174 const char *<br>
1175 cupsServer(void);
1176 </tt></p>
1177 <h4>Arguments</h4>
1178 <p>None.</p>
1179 <h4>Returns</h4>
1180 <p>Server name</p>
1181 <!-- NEW PAGE -->
1182 <h3 class='title'><span class='info'>&nbsp;CUPS 1.3&nbsp;</span><a name='cupsSetDefaultDest'>cupsSetDefaultDest()</a></h3>
1183 <h4>Description</h4>
1184 <p>Set the default destination.
1185
1186
1187 <h4>Syntax</h4>
1188 <p><tt>
1189 void<br>
1190 cupsSetDefaultDest(
1191 const char * name,
1192 const char * instance,
1193 int num_dests,
1194 <a href='#cups_dest_t'>cups_dest_t</a> * dests);
1195 </tt></p>
1196 <h4>Arguments</h4>
1197 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
1198 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1199 <tbody>
1200 <tr><td><tt>name</tt></td><td>Destination name</td></tr>
1201 <tr><td><tt>instance</tt></td><td>Instance name or NULL</td></tr>
1202 <tr><td><tt>num_dests</tt></td><td>Number of destinations</td></tr>
1203 <tr><td><tt>dests</tt></td><td>Destinations</td></tr>
1204 </tbody></table></div>
1205 <h4>Returns</h4>
1206 <p>Nothing.</p>
1207 <!-- NEW PAGE -->
1208 <h3 class='title'><a name='cupsSetDests'>cupsSetDests()</a></h3>
1209 <h4>Description</h4>
1210 <p>Save the list of destinations for the default server.
1211 <p>This function saves the destinations to /etc/cups/lpoptions when run
1212 as root and ~/.cups/lpoptions when run as a normal user.
1213 <h4>Syntax</h4>
1214 <p><tt>
1215 void<br>
1216 cupsSetDests(
1217 int num_dests,
1218 <a href='#cups_dest_t'>cups_dest_t</a> * dests);
1219 </tt></p>
1220 <h4>Arguments</h4>
1221 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
1222 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1223 <tbody>
1224 <tr><td><tt>num_dests</tt></td><td>Number of destinations</td></tr>
1225 <tr><td><tt>dests</tt></td><td>Destinations</td></tr>
1226 </tbody></table></div>
1227 <h4>Returns</h4>
1228 <p>Nothing.</p>
1229 <!-- NEW PAGE -->
1230 <h3 class='title'><span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span><a name='cupsSetDests2'>cupsSetDests2()</a></h3>
1231 <h4>Description</h4>
1232 <p>Save the list of destinations for the specified server.
1233 <p>This function saves the destinations to /etc/cups/lpoptions when run
1234 as root and ~/.cups/lpoptions when run as a normal user.
1235
1236
1237 <h4>Syntax</h4>
1238 <p><tt>
1239 int<br>
1240 cupsSetDests2(
1241 http_t * http,
1242 int num_dests,
1243 <a href='#cups_dest_t'>cups_dest_t</a> * dests);
1244 </tt></p>
1245 <h4>Arguments</h4>
1246 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
1247 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1248 <tbody>
1249 <tr><td><tt>http</tt></td><td>HTTP connection</td></tr>
1250 <tr><td><tt>num_dests</tt></td><td>Number of destinations</td></tr>
1251 <tr><td><tt>dests</tt></td><td>Destinations</td></tr>
1252 </tbody></table></div>
1253 <h4>Returns</h4>
1254 <p>0 on success, -1 on error</p>
1255 <!-- NEW PAGE -->
1256 <h3 class='title'><a name='cupsSetEncryption'>cupsSetEncryption()</a></h3>
1257 <h4>Description</h4>
1258 <p>Set the encryption preference.
1259 <h4>Syntax</h4>
1260 <p><tt>
1261 void<br>
1262 cupsSetEncryption(
1263 http_encryption_t e);
1264 </tt></p>
1265 <h4>Arguments</h4>
1266 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
1267 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1268 <tbody>
1269 <tr><td><tt>e</tt></td><td>New encryption preference</td></tr>
1270 </tbody></table></div>
1271 <h4>Returns</h4>
1272 <p>Nothing.</p>
1273 <!-- NEW PAGE -->
1274 <h3 class='title'><a name='cupsSetPasswordCB'>cupsSetPasswordCB()</a></h3>
1275 <h4>Description</h4>
1276 <p>Set the password callback for CUPS.
1277 <p>Pass NULL to restore the default (console) password callback.
1278 <h4>Syntax</h4>
1279 <p><tt>
1280 void<br>
1281 cupsSetPasswordCB(
1282 <a href='#cups_password_cb_t'>cups_password_cb_t</a> cb);
1283 </tt></p>
1284 <h4>Arguments</h4>
1285 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
1286 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1287 <tbody>
1288 <tr><td><tt>cb</tt></td><td>Callback function</td></tr>
1289 </tbody></table></div>
1290 <h4>Returns</h4>
1291 <p>Nothing.</p>
1292 <!-- NEW PAGE -->
1293 <h3 class='title'><a name='cupsSetServer'>cupsSetServer()</a></h3>
1294 <h4>Description</h4>
1295 <p>Set the default server name.
1296 <p>The &quot;server&quot; string can be a fully-qualified hostname, a numeric
1297 IPv4 or IPv6 address, or a domain socket pathname. Pass NULL to
1298 restore the default server name.
1299 <h4>Syntax</h4>
1300 <p><tt>
1301 void<br>
1302 cupsSetServer(
1303 const char * server);
1304 </tt></p>
1305 <h4>Arguments</h4>
1306 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
1307 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1308 <tbody>
1309 <tr><td><tt>server</tt></td><td>Server name</td></tr>
1310 </tbody></table></div>
1311 <h4>Returns</h4>
1312 <p>Nothing.</p>
1313 <!-- NEW PAGE -->
1314 <h3 class='title'><a name='cupsSetUser'>cupsSetUser()</a></h3>
1315 <h4>Description</h4>
1316 <p>Set the default user name.
1317 <p>Pass NULL to restore the default user name.
1318 <h4>Syntax</h4>
1319 <p><tt>
1320 void<br>
1321 cupsSetUser(
1322 const char * user);
1323 </tt></p>
1324 <h4>Arguments</h4>
1325 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
1326 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1327 <tbody>
1328 <tr><td><tt>user</tt></td><td>User name</td></tr>
1329 </tbody></table></div>
1330 <h4>Returns</h4>
1331 <p>Nothing.</p>
1332 <!-- NEW PAGE -->
1333 <h3 class='title'><a name='cupsTempFd'>cupsTempFd()</a></h3>
1334 <h4>Description</h4>
1335 <p>Creates a temporary file.
1336 <p>The temporary filename is returned in the filename buffer.
1337 The temporary file is opened for reading and writing.
1338 <h4>Syntax</h4>
1339 <p><tt>
1340 int<br>
1341 cupsTempFd(
1342 char * filename,
1343 int len);
1344 </tt></p>
1345 <h4>Arguments</h4>
1346 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
1347 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1348 <tbody>
1349 <tr><td><tt>filename</tt></td><td>Pointer to buffer</td></tr>
1350 <tr><td><tt>len</tt></td><td>Size of buffer</td></tr>
1351 </tbody></table></div>
1352 <h4>Returns</h4>
1353 <p>New file descriptor or -1 on error</p>
1354 <!-- NEW PAGE -->
1355 <h3 class='title'><span class='info'>&nbsp;DEPRECATED&nbsp;</span><a name='cupsTempFile'>cupsTempFile()</a></h3>
1356 <h4>Description</h4>
1357 <p>Generates a temporary filename.
1358 <p>The temporary filename is returned in the filename buffer.
1359 This function is deprecated - use cupsTempFd() or cupsTempFile2()
1360 instead.
1361
1362
1363 <h4>Syntax</h4>
1364 <p><tt>
1365 char *<br>
1366 cupsTempFile(
1367 char * filename,
1368 int len);
1369 </tt></p>
1370 <h4>Arguments</h4>
1371 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
1372 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1373 <tbody>
1374 <tr><td><tt>filename</tt></td><td>Pointer to buffer</td></tr>
1375 <tr><td><tt>len</tt></td><td>Size of buffer</td></tr>
1376 </tbody></table></div>
1377 <h4>Returns</h4>
1378 <p>Filename or NULL on error</p>
1379 <!-- NEW PAGE -->
1380 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='cupsTempFile2'>cupsTempFile2()</a></h3>
1381 <h4>Description</h4>
1382 <p>Creates a temporary CUPS file.
1383 <p>The temporary filename is returned in the filename buffer.
1384 The temporary file is opened for writing.
1385
1386
1387 <h4>Syntax</h4>
1388 <p><tt>
1389 cups_file_t *<br>
1390 cupsTempFile2(
1391 char * filename,
1392 int len);
1393 </tt></p>
1394 <h4>Arguments</h4>
1395 <div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0' summary='Arguments'>
1396 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1397 <tbody>
1398 <tr><td><tt>filename</tt></td><td>Pointer to buffer</td></tr>
1399 <tr><td><tt>len</tt></td><td>Size of buffer</td></tr>
1400 </tbody></table></div>
1401 <h4>Returns</h4>
1402 <p>CUPS file or NULL on error</p>
1403 <!-- NEW PAGE -->
1404 <h3 class='title'><a name='cupsUser'>cupsUser()</a></h3>
1405 <h4>Description</h4>
1406 <p>Return the current user's name.
1407 <h4>Syntax</h4>
1408 <p><tt>
1409 const char *<br>
1410 cupsUser(void);
1411 </tt></p>
1412 <h4>Arguments</h4>
1413 <p>None.</p>
1414 <h4>Returns</h4>
1415 <p>User name</p>
1416 <!-- NEW PAGE -->
1417 <h2 class='title'><a name='STRUCTURES'>Structures</a></h2>
1418 <ul>
1419 <li><a href='#cups_dest_s'><tt>cups_dest_s</tt></a> </li>
1420 <li><a href='#cups_job_s'><tt>cups_job_s</tt></a> </li>
1421 <li><a href='#cups_option_s'><tt>cups_option_s</tt></a> </li>
1422 </ul>
1423 <!-- NEW PAGE -->
1424 <h3 class='title'><a name='cups_dest_s'>cups_dest_s</a></h3>
1425 <h4>Description</h4>
1426 <p>Destination
1427 <h4>Definition</h4>
1428 <p><tt>
1429 struct cups_dest_s<br>
1430 {<br>
1431 &nbsp;&nbsp;char *name, * instance;<br>
1432 &nbsp;&nbsp;int is_default;<br>
1433 &nbsp;&nbsp;int num_options;<br>
1434 &nbsp;&nbsp;<a href='#cups_option_t'>cups_option_t</a> * options;<br>
1435 };</tt></p>
1436 <h4>Members</h4>
1437 <div class='table'><table align='center' border='1' width='80%' summary='Members'>
1438 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1439 <tbody>
1440 <tr><td><tt>instance</tt> </td><td>Local instance name or NULL
1441 </td></tr>
1442 <tr><td><tt>is_default</tt> </td><td>Is this printer the default?
1443 </td></tr>
1444 <tr><td><tt>num_options</tt> </td><td>Number of options
1445 </td></tr>
1446 <tr><td><tt>options</tt> </td><td>Options
1447 </td></tr>
1448 </tbody></table></div>
1449 <!-- NEW PAGE -->
1450 <h3 class='title'><a name='cups_job_s'>cups_job_s</a></h3>
1451 <h4>Description</h4>
1452 <p>Job
1453 <h4>Definition</h4>
1454 <p><tt>
1455 struct cups_job_s<br>
1456 {<br>
1457 &nbsp;&nbsp;time_t completed_time;<br>
1458 &nbsp;&nbsp;time_t creation_time;<br>
1459 &nbsp;&nbsp;char * dest;<br>
1460 &nbsp;&nbsp;char * format;<br>
1461 &nbsp;&nbsp;int id;<br>
1462 &nbsp;&nbsp;int priority;<br>
1463 &nbsp;&nbsp;time_t processing_time;<br>
1464 &nbsp;&nbsp;int size;<br>
1465 &nbsp;&nbsp;ipp_jstate_t state;<br>
1466 &nbsp;&nbsp;char * title;<br>
1467 &nbsp;&nbsp;char * user;<br>
1468 };</tt></p>
1469 <h4>Members</h4>
1470 <div class='table'><table align='center' border='1' width='80%' summary='Members'>
1471 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1472 <tbody>
1473 <tr><td><tt>completed_time</tt> </td><td>Time the job was completed
1474 </td></tr>
1475 <tr><td><tt>creation_time</tt> </td><td>Time the job was created
1476 </td></tr>
1477 <tr><td><tt>dest</tt> </td><td>Printer or class name
1478 </td></tr>
1479 <tr><td><tt>format</tt> </td><td>Document format
1480 </td></tr>
1481 <tr><td><tt>id</tt> </td><td>The job ID
1482 </td></tr>
1483 <tr><td><tt>priority</tt> </td><td>Priority (1-100)
1484 </td></tr>
1485 <tr><td><tt>processing_time</tt> </td><td>Time the job was processed
1486 </td></tr>
1487 <tr><td><tt>size</tt> </td><td>Size in kilobytes
1488 </td></tr>
1489 <tr><td><tt>state</tt> </td><td>Job state
1490 </td></tr>
1491 <tr><td><tt>title</tt> </td><td>Title/job name
1492 </td></tr>
1493 <tr><td><tt>user</tt> </td><td>User the submitted the job
1494 </td></tr>
1495 </tbody></table></div>
1496 <!-- NEW PAGE -->
1497 <h3 class='title'><a name='cups_option_s'>cups_option_s</a></h3>
1498 <h4>Description</h4>
1499 <p>Printer Options
1500 <h4>Definition</h4>
1501 <p><tt>
1502 struct cups_option_s<br>
1503 {<br>
1504 &nbsp;&nbsp;char * name;<br>
1505 &nbsp;&nbsp;char * value;<br>
1506 };</tt></p>
1507 <h4>Members</h4>
1508 <div class='table'><table align='center' border='1' width='80%' summary='Members'>
1509 <thead><tr><th>Name</th><th>Description</th></tr></thead>
1510 <tbody>
1511 <tr><td><tt>name</tt> </td><td>Name of option
1512 </td></tr>
1513 <tr><td><tt>value</tt> </td><td>Value of option
1514 </td></tr>
1515 </tbody></table></div>
1516 <!-- NEW PAGE -->
1517 <h2 class='title'><a name='TYPES'>Types</a></h2>
1518 <ul>
1519 <li><a href='#cups_dest_t'><tt>cups_dest_t</tt></a> </li>
1520 <li><a href='#cups_job_t'><tt>cups_job_t</tt></a> </li>
1521 <li><a href='#cups_option_t'><tt>cups_option_t</tt></a> </li>
1522 <li><a href='#cups_password_cb_t'><tt>cups_password_cb_t</tt></a> </li>
1523 <li><a href='#cups_ptype_t'><tt>cups_ptype_t</tt></a> </li>
1524 </ul>
1525 <!-- NEW PAGE -->
1526 <h3 class='title'><a name='cups_dest_t'>cups_dest_t</a></h3>
1527 <h4>Description</h4>
1528 <p>Destination
1529 <h4>Definition</h4>
1530 <p><tt>
1531 typedef struct <a href='#cups_dest_s'>cups_dest_s</a> cups_dest_t;
1532 </tt></p>
1533 <!-- NEW PAGE -->
1534 <h3 class='title'><a name='cups_job_t'>cups_job_t</a></h3>
1535 <h4>Description</h4>
1536 <p>Job
1537 <h4>Definition</h4>
1538 <p><tt>
1539 typedef struct <a href='#cups_job_s'>cups_job_s</a> cups_job_t;
1540 </tt></p>
1541 <!-- NEW PAGE -->
1542 <h3 class='title'><a name='cups_option_t'>cups_option_t</a></h3>
1543 <h4>Description</h4>
1544 <p>Printer Options
1545 <h4>Definition</h4>
1546 <p><tt>
1547 typedef struct <a href='#cups_option_s'>cups_option_s</a> cups_option_t;
1548 </tt></p>
1549 <!-- NEW PAGE -->
1550 <h3 class='title'><a name='cups_password_cb_t'>cups_password_cb_t</a></h3>
1551 <h4>Description</h4>
1552 <p>Password callback
1553 <h4>Definition</h4>
1554 <p><tt>
1555 typedef const char * (*cups_password_cb_t)(const char *);
1556 </tt></p>
1557 <!-- NEW PAGE -->
1558 <h3 class='title'><a name='cups_ptype_t'>cups_ptype_t</a></h3>
1559 <h4>Description</h4>
1560 <p>Printer Type/Capability Bits
1561 <h4>Definition</h4>
1562 <p><tt>
1563 typedef unsigned cups_ptype_t;
1564 </tt></p>
1565 </body>
1566 </html>