1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
3 <!-- SECTION: Programming -->
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; }
21 CUPS API introduction for the Common UNIX Printing System (CUPS).
23 Copyright 1997-2006 by Easy Software Products.
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
32 Attn: CUPS Licensing Information
33 Easy Software Products
34 44141 Airport View Drive, Suite 204
35 Hollywood, Maryland 20636 USA
38 EMail: cups-info@cups.org
39 WWW: http://www.cups.org
42 <h2 class='title'
>Introduction
</h2>
44 <p>The CUPS APIs provide...
</p>
46 <h2 class='title'
>General Usage
</h2>
48 <p>The
<var><cups/cups.h
></var> header file must be included to
49 use the CUPS functions.
</p>
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
59 <kbd>gcc -o myprogram myprogram.c -lcups
</kbd>
62 <h2 class='title'
>Compatibility
</h2>
64 <p>Unless otherwise specified, the CUPS API functions require
65 CUPS
1.1 or higher.
</p>
66 <h2 class='title'
>Contents
</h2>
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>
74 <h2 class='title'
><a name='ENUMERATIONS'
>Enumerations
</a></h2>
76 <li><a href='#cups_ptype_e'
><tt>cups_ptype_e
</tt></a> </li>
79 <h3 class='title'
><a name='cups_ptype_e'
>cups_ptype_e
</a></h3>
81 <p>Not a typedef'd enum so we can OR
</p>
83 <div class='table'
><table align='center' border='
1' width='
80%'
>
84 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
86 <tr><td><tt>CUPS_PRINTER_AUTHENTICATED
</tt> <span class='info'
> CUPS
1.2 </span></td><td>Printer requires authentication
</td></tr>
87 <tr><td><tt>CUPS_PRINTER_BIND
</tt> </td><td>Can bind output
</td></tr>
88 <tr><td><tt>CUPS_PRINTER_BW
</tt> </td><td>Can do B
&W printing
</td></tr>
89 <tr><td><tt>CUPS_PRINTER_CLASS
</tt> </td><td>Printer class
</td></tr>
90 <tr><td><tt>CUPS_PRINTER_COLLATE
</tt> </td><td>Can collage copies
</td></tr>
91 <tr><td><tt>CUPS_PRINTER_COLOR
</tt> </td><td>Can do color printing
</td></tr>
92 <tr><td><tt>CUPS_PRINTER_COPIES
</tt> </td><td>Can do copies
</td></tr>
93 <tr><td><tt>CUPS_PRINTER_COVER
</tt> </td><td>Can cover output
</td></tr>
94 <tr><td><tt>CUPS_PRINTER_DEFAULT
</tt> </td><td>Default printer on network
</td></tr>
95 <tr><td><tt>CUPS_PRINTER_DELETE
</tt> <span class='info'
> CUPS
1.2 </span></td><td>Delete printer
</td></tr>
96 <tr><td><tt>CUPS_PRINTER_DUPLEX
</tt> </td><td>Can do duplexing
</td></tr>
97 <tr><td><tt>CUPS_PRINTER_FAX
</tt> </td><td>Fax queue
</td></tr>
98 <tr><td><tt>CUPS_PRINTER_IMPLICIT
</tt> </td><td>Implicit class
</td></tr>
99 <tr><td><tt>CUPS_PRINTER_LARGE
</tt> </td><td>Can do D/E/A1/A0
</td></tr>
100 <tr><td><tt>CUPS_PRINTER_LOCAL
</tt> </td><td>Local printer or class
</td></tr>
101 <tr><td><tt>CUPS_PRINTER_MEDIUM
</tt> </td><td>Can do Tabloid/B/C/A3/A2
</td></tr>
102 <tr><td><tt>CUPS_PRINTER_NOT_SHARED
</tt> <span class='info'
> CUPS
1.2 </span></td><td>Printer is not shared
</td></tr>
103 <tr><td><tt>CUPS_PRINTER_OPTIONS
</tt> </td><td>~(CLASS | REMOTE | IMPLICIT)
</td></tr>
104 <tr><td><tt>CUPS_PRINTER_PUNCH
</tt> </td><td>Can punch output
</td></tr>
105 <tr><td><tt>CUPS_PRINTER_REJECTING
</tt> </td><td>Printer is rejecting jobs
</td></tr>
106 <tr><td><tt>CUPS_PRINTER_REMOTE
</tt> </td><td>Remote printer or class
</td></tr>
107 <tr><td><tt>CUPS_PRINTER_SMALL
</tt> </td><td>Can do Letter/Legal/A4
</td></tr>
108 <tr><td><tt>CUPS_PRINTER_SORT
</tt> </td><td>Can sort output
</td></tr>
109 <tr><td><tt>CUPS_PRINTER_STAPLE
</tt> </td><td>Can staple output
</td></tr>
110 <tr><td><tt>CUPS_PRINTER_VARIABLE
</tt> </td><td>Can do variable sizes
</td></tr>
111 </tbody></table></div>
113 <h2 class='title'
><a name='FUNCTIONS'
>Functions
</a></h2>
115 <li><a href='#cupsAddDest'
><tt>cupsAddDest()
</tt></a> </li>
116 <li><a href='#cupsAddOption'
><tt>cupsAddOption()
</tt></a> </li>
117 <li><a href='#cupsCancelJob'
><tt>cupsCancelJob()
</tt></a> </li>
118 <li><a href='#cupsDoAuthentication'
><tt>cupsDoAuthentication()
</tt></a> <span class='info'
> CUPS
1.1.20 </span></li>
119 <li><a href='#cupsDoFileRequest'
><tt>cupsDoFileRequest()
</tt></a> </li>
120 <li><a href='#cupsEncodeOptions'
><tt>cupsEncodeOptions()
</tt></a> </li>
121 <li><a href='#cupsEncodeOptions2'
><tt>cupsEncodeOptions2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
122 <li><a href='#cupsEncryption'
><tt>cupsEncryption()
</tt></a> </li>
123 <li><a href='#cupsFreeDests'
><tt>cupsFreeDests()
</tt></a> </li>
124 <li><a href='#cupsFreeJobs'
><tt>cupsFreeJobs()
</tt></a> </li>
125 <li><a href='#cupsFreeOptions'
><tt>cupsFreeOptions()
</tt></a> </li>
126 <li><a href='#cupsGetClasses'
><tt>cupsGetClasses()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
127 <li><a href='#cupsGetDefault'
><tt>cupsGetDefault()
</tt></a> </li>
128 <li><a href='#cupsGetDefault2'
><tt>cupsGetDefault2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
129 <li><a href='#cupsGetDest'
><tt>cupsGetDest()
</tt></a> </li>
130 <li><a href='#cupsGetDests'
><tt>cupsGetDests()
</tt></a> </li>
131 <li><a href='#cupsGetDests2'
><tt>cupsGetDests2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
132 <li><a href='#cupsGetFd'
><tt>cupsGetFd()
</tt></a> <span class='info'
> CUPS
1.1.20 </span></li>
133 <li><a href='#cupsGetFile'
><tt>cupsGetFile()
</tt></a> <span class='info'
> CUPS
1.1.20 </span></li>
134 <li><a href='#cupsGetJobs'
><tt>cupsGetJobs()
</tt></a> </li>
135 <li><a href='#cupsGetJobs2'
><tt>cupsGetJobs2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
136 <li><a href='#cupsGetOption'
><tt>cupsGetOption()
</tt></a> </li>
137 <li><a href='#cupsGetPPD'
><tt>cupsGetPPD()
</tt></a> </li>
138 <li><a href='#cupsGetPPD2'
><tt>cupsGetPPD2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
139 <li><a href='#cupsGetPassword'
><tt>cupsGetPassword()
</tt></a> </li>
140 <li><a href='#cupsGetPrinters'
><tt>cupsGetPrinters()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
141 <li><a href='#cupsLangDefault'
><tt>cupsLangDefault()
</tt></a> </li>
142 <li><a href='#cupsLangEncoding'
><tt>cupsLangEncoding()
</tt></a> </li>
143 <li><a href='#cupsLangFlush'
><tt>cupsLangFlush()
</tt></a> </li>
144 <li><a href='#cupsLangFree'
><tt>cupsLangFree()
</tt></a> </li>
145 <li><a href='#cupsLangGet'
><tt>cupsLangGet()
</tt></a> </li>
146 <li><a href='#cupsLastError'
><tt>cupsLastError()
</tt></a> </li>
147 <li><a href='#cupsLastErrorString'
><tt>cupsLastErrorString()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
148 <li><a href='#cupsMarkOptions'
><tt>cupsMarkOptions()
</tt></a> </li>
149 <li><a href='#cupsParseOptions'
><tt>cupsParseOptions()
</tt></a> </li>
150 <li><a href='#cupsPrintFile'
><tt>cupsPrintFile()
</tt></a> </li>
151 <li><a href='#cupsPrintFile2'
><tt>cupsPrintFile2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
152 <li><a href='#cupsPrintFiles'
><tt>cupsPrintFiles()
</tt></a> </li>
153 <li><a href='#cupsPrintFiles2'
><tt>cupsPrintFiles2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
154 <li><a href='#cupsPutFd'
><tt>cupsPutFd()
</tt></a> <span class='info'
> CUPS
1.1.20 </span></li>
155 <li><a href='#cupsPutFile'
><tt>cupsPutFile()
</tt></a> <span class='info'
> CUPS
1.1.20 </span></li>
156 <li><a href='#cupsServer'
><tt>cupsServer()
</tt></a> </li>
157 <li><a href='#cupsSetDests'
><tt>cupsSetDests()
</tt></a> </li>
158 <li><a href='#cupsSetDests2'
><tt>cupsSetDests2()
</tt></a> <span class='info'
> CUPS
1.1.21 </span></li>
159 <li><a href='#cupsSetEncryption'
><tt>cupsSetEncryption()
</tt></a> </li>
160 <li><a href='#cupsSetPasswordCB'
><tt>cupsSetPasswordCB()
</tt></a> </li>
161 <li><a href='#cupsSetServer'
><tt>cupsSetServer()
</tt></a> </li>
162 <li><a href='#cupsSetUser'
><tt>cupsSetUser()
</tt></a> </li>
163 <li><a href='#cupsTempFd'
><tt>cupsTempFd()
</tt></a> </li>
164 <li><a href='#cupsTempFile'
><tt>cupsTempFile()
</tt></a> <span class='info'
> DEPRECATED
</span></li>
165 <li><a href='#cupsTempFile2'
><tt>cupsTempFile2()
</tt></a> <span class='info'
> CUPS
1.2 </span></li>
166 <li><a href='#cupsUser'
><tt>cupsUser()
</tt></a> </li>
169 <h3 class='title'
><a name='cupsAddDest'
>cupsAddDest()
</a></h3>
171 <p>Add a destination to the list of destinations.
173 Use the cupsSaveDests() function to save the updated list of destinations
174 to the user's lpoptions file.
</p>
179 const
<a href='#char'
>char
</a> * name,
180 const
<a href='#char'
>char
</a> * instance,
182 <a href='#cups_dest_t'
>cups_dest_t
</a> ** dests);
185 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
186 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
188 <tr><td><tt>name
</tt></td><td>Name of destination
</td></tr>
189 <tr><td><tt>instance
</tt></td><td>Instance of destination or NULL for none/primary
</td></tr>
190 <tr><td><tt>num_dests
</tt></td><td>Number of destinations
</td></tr>
191 <tr><td><tt>dests
</tt></td><td>Destinations
</td></tr>
192 </tbody></table></div>
194 <p>New number of destinations
</p>
196 <h3 class='title'
><a name='cupsAddOption'
>cupsAddOption()
</a></h3>
198 <p>Add an option to an option array.
</p>
203 const
<a href='#char'
>char
</a> * name,
204 const
<a href='#char'
>char
</a> * value,
206 <a href='#cups_option_t'
>cups_option_t
</a> ** options);
209 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
210 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
212 <tr><td><tt>name
</tt></td><td>Name of option
</td></tr>
213 <tr><td><tt>value
</tt></td><td>Value of option
</td></tr>
214 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
215 <tr><td><tt>options
</tt></td><td>Pointer to options
</td></tr>
216 </tbody></table></div>
218 <p>Number of options
</p>
220 <h3 class='title'
><a name='cupsCancelJob'
>cupsCancelJob()
</a></h3>
222 <p>Cancel a print job on the default server.
224 Use the cupsLastError() and cupsLastErrorString() functions to get
225 the cause of any failure.
</p>
230 const
<a href='#char'
>char
</a> * name,
234 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
235 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
237 <tr><td><tt>name
</tt></td><td>Name of printer or class
</td></tr>
238 <tr><td><tt>job
</tt></td><td>Job ID
</td></tr>
239 </tbody></table></div>
241 <p>1 on success,
0 on failure
</p>
243 <h3 class='title'
><span class='info'
> CUPS
1.1.20 </span><a name='cupsDoAuthentication'
>cupsDoAuthentication()
</a></h3>
245 <p>Authenticate a request.
247 This function should be called in response to a HTTP_UNAUTHORIZED
248 status, prior to resubmitting your request.
254 cupsDoAuthentication(
256 const
<a href='#char'
>char
</a> * method,
257 const
<a href='#char'
>char
</a> * resource);
260 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
261 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
263 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
264 <tr><td><tt>method
</tt></td><td>Request method (GET, POST, PUT)
</td></tr>
265 <tr><td><tt>resource
</tt></td><td>Resource path
</td></tr>
266 </tbody></table></div>
268 <p>0 on success, -
1 on error
</p>
270 <h3 class='title'
><a name='cupsDoFileRequest'
>cupsDoFileRequest()
</a></h3>
272 <p>Do an IPP request.
274 This function sends any IPP request to the specified server, retrying
275 and authenticating as necessary.
</p>
282 const
<a href='#char'
>char
</a> * resource,
283 const
<a href='#char'
>char
</a> * filename);
286 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
287 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
289 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
290 <tr><td><tt>request
</tt></td><td>IPP request
</td></tr>
291 <tr><td><tt>resource
</tt></td><td>HTTP resource for POST
</td></tr>
292 <tr><td><tt>filename
</tt></td><td>File to send or NULL for none
</td></tr>
293 </tbody></table></div>
297 <h3 class='title'
><a name='cupsEncodeOptions'
>cupsEncodeOptions()
</a></h3>
299 <p>Encode printer options into IPP attributes.
301 This function adds operation, job, and then subscription attributes,
302 in that order. Use the cupsEncodeOptions2() function to add attributes
303 for a single group.
</p>
310 <a href='#cups_option_t'
>cups_option_t
</a> * options);
313 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
314 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
316 <tr><td><tt>ipp
</tt></td><td>Request to add to
</td></tr>
317 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
318 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
319 </tbody></table></div>
323 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='cupsEncodeOptions2'
>cupsEncodeOptions2()
</a></h3>
325 <p>Encode printer options into IPP attributes for a group.
327 This function only adds attributes for a single group. Call this
328 function multiple times for each group, or use cupsEncodeOptions()
329 to add the standard groups.
338 <a href='#cups_option_t'
>cups_option_t
</a> * options,
339 ipp_tag_t group_tag);
342 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
343 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
345 <tr><td><tt>ipp
</tt></td><td>Request to add to
</td></tr>
346 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
347 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
348 <tr><td><tt>group_tag
</tt></td><td>Group to encode
</td></tr>
349 </tbody></table></div>
353 <h3 class='title'
><a name='cupsEncryption'
>cupsEncryption()
</a></h3>
355 <p>Get the default encryption settings.
357 The default encryption setting comes from the CUPS_ENCRYPTION
358 environment variable, then the ~/.cupsrc file, and finally the
359 /etc/cups/client.conf file. If not set, the default is
360 HTTP_ENCRYPT_IF_REQUESTED.
</p>
364 cupsEncryption(void);
369 <p>Encryption settings
</p>
371 <h3 class='title'
><a name='cupsFreeDests'
>cupsFreeDests()
</a></h3>
373 <p>Free the memory used by the list of destinations.
</p>
379 <a href='#cups_dest_t'
>cups_dest_t
</a> * dests);
382 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
383 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
385 <tr><td><tt>num_dests
</tt></td><td>Number of destinations
</td></tr>
386 <tr><td><tt>dests
</tt></td><td>Destinations
</td></tr>
387 </tbody></table></div>
391 <h3 class='title'
><a name='cupsFreeJobs'
>cupsFreeJobs()
</a></h3>
393 <p>Free memory used by job data.
</p>
399 <a href='#cups_job_t'
>cups_job_t
</a> * jobs);
402 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
403 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
405 <tr><td><tt>num_jobs
</tt></td><td>Number of jobs
</td></tr>
406 <tr><td><tt>jobs
</tt></td><td>Jobs
</td></tr>
407 </tbody></table></div>
411 <h3 class='title'
><a name='cupsFreeOptions'
>cupsFreeOptions()
</a></h3>
413 <p>Free all memory used by options.
</p>
419 <a href='#cups_option_t'
>cups_option_t
</a> * options);
422 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
423 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
425 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
426 <tr><td><tt>options
</tt></td><td>Pointer to options
</td></tr>
427 </tbody></table></div>
431 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='cupsGetClasses'
>cupsGetClasses()
</a></h3>
433 <p>Get a list of printer classes from the default server.
435 This function is deprecated - use cupsGetDests() instead.
442 <a href='#char'
>char
</a> *** classes);
445 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
446 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
448 <tr><td><tt>classes
</tt></td><td>Classes
</td></tr>
449 </tbody></table></div>
451 <p>Number of classes
</p>
453 <h3 class='title'
><a name='cupsGetDefault'
>cupsGetDefault()
</a></h3>
455 <p>Get the default printer or class for the default server.
457 This function returns the default printer or class as defined by
458 the LPDEST or PRINTER environment variables. If these environment
459 variables are not set, the server default destination is returned.
460 Applications should use the cupsGetDests() and cupsGetDest() functions
461 to get the user-defined default printer, as this function does not
462 support the lpoptions-defined default printer.
</p>
465 const
<a href='#char'
>char
</a> *
466 cupsGetDefault(void);
471 <p>Default printer or NULL
</p>
473 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='cupsGetDefault2'
>cupsGetDefault2()
</a></h3>
475 <p>Get the default printer or class for the specified server.
477 This function returns the default printer or class as defined by
478 the LPDEST or PRINTER environment variables. If these environment
479 variables are not set, the server default destination is returned.
480 Applications should use the cupsGetDests() and cupsGetDest() functions
481 to get the user-defined default printer, as this function does not
482 support the lpoptions-defined default printer.
487 const
<a href='#char'
>char
</a> *
492 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
493 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
495 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
496 </tbody></table></div>
498 <p>Default printer or NULL
</p>
500 <h3 class='title'
><a name='cupsGetDest'
>cupsGetDest()
</a></h3>
502 <p>Get the named destination from the list.
504 Use the cupsGetDests() or cupsGetDests2() functions to get a
505 list of supported destinations for the current user.
</p>
508 <a href='#cups_dest_t'
>cups_dest_t
</a> *
510 const
<a href='#char'
>char
</a> * name,
511 const
<a href='#char'
>char
</a> * instance,
513 <a href='#cups_dest_t'
>cups_dest_t
</a> * dests);
516 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
517 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
519 <tr><td><tt>name
</tt></td><td>Name of destination
</td></tr>
520 <tr><td><tt>instance
</tt></td><td>Instance of destination
</td></tr>
521 <tr><td><tt>num_dests
</tt></td><td>Number of destinations
</td></tr>
522 <tr><td><tt>dests
</tt></td><td>Destinations
</td></tr>
523 </tbody></table></div>
525 <p>Destination pointer or NULL
</p>
527 <h3 class='title'
><a name='cupsGetDests'
>cupsGetDests()
</a></h3>
529 <p>Get the list of destinations from the default server.
</p>
534 <a href='#cups_dest_t'
>cups_dest_t
</a> ** dests);
537 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
538 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
540 <tr><td><tt>dests
</tt></td><td>Destinations
</td></tr>
541 </tbody></table></div>
543 <p>Number of destinations
</p>
545 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='cupsGetDests2'
>cupsGetDests2()
</a></h3>
547 <p>Get the list of destinations from the specified server.
555 <a href='#cups_dest_t'
>cups_dest_t
</a> ** dests);
558 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
559 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
561 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
562 <tr><td><tt>dests
</tt></td><td>Destinations
</td></tr>
563 </tbody></table></div>
565 <p>Number of destinations
</p>
567 <h3 class='title'
><span class='info'
> CUPS
1.1.20 </span><a name='cupsGetFd'
>cupsGetFd()
</a></h3>
569 <p>Get a file from the server.
571 This function returns HTTP_OK when the file is successfully retrieved.
579 const
<a href='#char'
>char
</a> * resource,
583 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
584 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
586 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
587 <tr><td><tt>resource
</tt></td><td>Resource name
</td></tr>
588 <tr><td><tt>fd
</tt></td><td>File descriptor
</td></tr>
589 </tbody></table></div>
593 <h3 class='title'
><span class='info'
> CUPS
1.1.20 </span><a name='cupsGetFile'
>cupsGetFile()
</a></h3>
595 <p>Get a file from the server.
597 This function returns HTTP_OK when the file is successfully retrieved.
605 const
<a href='#char'
>char
</a> * resource,
606 const
<a href='#char'
>char
</a> * filename);
609 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
610 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
612 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
613 <tr><td><tt>resource
</tt></td><td>Resource name
</td></tr>
614 <tr><td><tt>filename
</tt></td><td>Filename
</td></tr>
615 </tbody></table></div>
619 <h3 class='title'
><a name='cupsGetJobs'
>cupsGetJobs()
</a></h3>
621 <p>Get the jobs from the default server.
</p>
626 <a href='#cups_job_t'
>cups_job_t
</a> ** jobs,
627 const
<a href='#char'
>char
</a> * mydest,
632 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
633 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
635 <tr><td><tt>jobs
</tt></td><td>Job data
</td></tr>
636 <tr><td><tt>mydest
</tt></td><td>Only show jobs for dest?
</td></tr>
637 <tr><td><tt>myjobs
</tt></td><td>Only show my jobs?
</td></tr>
638 <tr><td><tt>completed
</tt></td><td>Only show completed jobs?
</td></tr>
639 </tbody></table></div>
641 <p>Number of jobs
</p>
643 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='cupsGetJobs2'
>cupsGetJobs2()
</a></h3>
645 <p>Get the jobs from the specified server.
653 <a href='#cups_job_t'
>cups_job_t
</a> ** jobs,
654 const
<a href='#char'
>char
</a> * mydest,
659 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
660 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
662 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
663 <tr><td><tt>jobs
</tt></td><td>Job data
</td></tr>
664 <tr><td><tt>mydest
</tt></td><td>Only show jobs for dest?
</td></tr>
665 <tr><td><tt>myjobs
</tt></td><td>Only show my jobs?
</td></tr>
666 <tr><td><tt>completed
</tt></td><td>Only show completed jobs?
</td></tr>
667 </tbody></table></div>
669 <p>Number of jobs
</p>
671 <h3 class='title'
><a name='cupsGetOption'
>cupsGetOption()
</a></h3>
673 <p>Get an option value.
</p>
676 const
<a href='#char'
>char
</a> *
678 const
<a href='#char'
>char
</a> * name,
680 <a href='#cups_option_t'
>cups_option_t
</a> * options);
683 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
684 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
686 <tr><td><tt>name
</tt></td><td>Name of option
</td></tr>
687 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
688 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
689 </tbody></table></div>
691 <p>Option value or NULL
</p>
693 <h3 class='title'
><a name='cupsGetPPD'
>cupsGetPPD()
</a></h3>
695 <p>Get the PPD file for a printer on the default server.
697 For classes, cupsGetPPD() returns the PPD file for the first printer
701 const
<a href='#char'
>char
</a> *
703 const
<a href='#char'
>char
</a> * name);
706 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
707 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
709 <tr><td><tt>name
</tt></td><td>Printer name
</td></tr>
710 </tbody></table></div>
712 <p>Filename for PPD file
</p>
714 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='cupsGetPPD2'
>cupsGetPPD2()
</a></h3>
716 <p>Get the PPD file for a printer from the specified server.
718 For classes, cupsGetPPD2() returns the PPD file for the first printer
724 const
<a href='#char'
>char
</a> *
727 const
<a href='#char'
>char
</a> * name);
730 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
731 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
733 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
734 <tr><td><tt>name
</tt></td><td>Printer name
</td></tr>
735 </tbody></table></div>
737 <p>Filename for PPD file
</p>
739 <h3 class='title'
><a name='cupsGetPassword'
>cupsGetPassword()
</a></h3>
741 <p>Get a password from the user.
743 Returns NULL if the user does not provide a password.
</p>
746 const
<a href='#char'
>char
</a> *
748 const
<a href='#char'
>char
</a> * prompt);
751 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
752 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
754 <tr><td><tt>prompt
</tt></td><td>Prompt string
</td></tr>
755 </tbody></table></div>
759 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='cupsGetPrinters'
>cupsGetPrinters()
</a></h3>
761 <p>Get a list of printers from the default server.
763 This function is deprecated - use cupsGetDests() instead.
770 <a href='#char'
>char
</a> *** printers);
773 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
774 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
776 <tr><td><tt>printers
</tt></td><td>Printers
</td></tr>
777 </tbody></table></div>
779 <p>Number of printers
</p>
781 <h3 class='title'
><a name='cupsLangDefault'
>cupsLangDefault()
</a></h3>
783 <p>Return the default language.
</p>
787 cupsLangDefault(void);
794 <h3 class='title'
><a name='cupsLangEncoding'
>cupsLangEncoding()
</a></h3>
796 <p>Return the character encoding (us-ascii, etc.)
797 for the given language.
</p>
800 const
<a href='#char'
>char
</a> *
805 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
806 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
808 <tr><td><tt>lang
</tt></td><td>Language data
</td></tr>
809 </tbody></table></div>
811 <p>Character encoding
</p>
813 <h3 class='title'
><a name='cupsLangFlush'
>cupsLangFlush()
</a></h3>
815 <p>Flush all language data out of the cache.
</p>
826 <h3 class='title'
><a name='cupsLangFree'
>cupsLangFree()
</a></h3>
828 <p>Free language data.
830 This does not actually free anything; use cupsLangFlush() for that.
</p>
838 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
839 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
841 <tr><td><tt>lang
</tt></td><td>Language to free
</td></tr>
842 </tbody></table></div>
846 <h3 class='title'
><a name='cupsLangGet'
>cupsLangGet()
</a></h3>
848 <p>Get a language.
</p>
853 const
<a href='#char'
>char
</a> * language);
856 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
857 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
859 <tr><td><tt>language
</tt></td><td>Language or locale
</td></tr>
860 </tbody></table></div>
864 <h3 class='title'
><a name='cupsLastError'
>cupsLastError()
</a></h3>
866 <p>Return the last IPP status code.
</p>
875 <p>IPP status code from last request
</p>
877 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='cupsLastErrorString'
>cupsLastErrorString()
</a></h3>
879 <p>Return the last IPP status-message.
884 const
<a href='#char'
>char
</a> *
885 cupsLastErrorString(void);
890 <p>status-message text from last request
</p>
892 <h3 class='title'
><a name='cupsMarkOptions'
>cupsMarkOptions()
</a></h3>
894 <p>Mark command-line options in a PPD file.
</p>
901 <a href='#cups_option_t'
>cups_option_t
</a> * options);
904 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
905 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
907 <tr><td><tt>ppd
</tt></td><td>PPD file
</td></tr>
908 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
909 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
910 </tbody></table></div>
912 <p>1 if conflicting
</p>
914 <h3 class='title'
><a name='cupsParseOptions'
>cupsParseOptions()
</a></h3>
916 <p>Parse options from a command-line argument.
918 This function converts space-delimited name/value pairs according
919 to the PAPI text option ABNF specification. Collection values
920 (
"name={a=... b=... c=...}
") are stored with the curley brackets
921 intact - use cupsParseOptions() on the value to extract the collection
927 const
<a href='#char'
>char
</a> * arg,
929 <a href='#cups_option_t'
>cups_option_t
</a> ** options);
932 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
933 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
935 <tr><td><tt>arg
</tt></td><td>Argument to parse
</td></tr>
936 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
937 <tr><td><tt>options
</tt></td><td>Options found
</td></tr>
938 </tbody></table></div>
940 <p>Number of options found
</p>
942 <h3 class='title'
><a name='cupsPrintFile'
>cupsPrintFile()
</a></h3>
944 <p>Print a file to a printer or class on the default server.
</p>
949 const
<a href='#char'
>char
</a> * name,
950 const
<a href='#char'
>char
</a> * filename,
951 const
<a href='#char'
>char
</a> * title,
953 <a href='#cups_option_t'
>cups_option_t
</a> * options);
956 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
957 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
959 <tr><td><tt>name
</tt></td><td>Printer or class name
</td></tr>
960 <tr><td><tt>filename
</tt></td><td>File to print
</td></tr>
961 <tr><td><tt>title
</tt></td><td>Title of job
</td></tr>
962 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
963 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
964 </tbody></table></div>
968 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='cupsPrintFile2'
>cupsPrintFile2()
</a></h3>
970 <p>Print a file to a printer or class on the specified server.
978 const
<a href='#char'
>char
</a> * name,
979 const
<a href='#char'
>char
</a> * filename,
980 const
<a href='#char'
>char
</a> * title,
982 <a href='#cups_option_t'
>cups_option_t
</a> * options);
985 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
986 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
988 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
989 <tr><td><tt>name
</tt></td><td>Printer or class name
</td></tr>
990 <tr><td><tt>filename
</tt></td><td>File to print
</td></tr>
991 <tr><td><tt>title
</tt></td><td>Title of job
</td></tr>
992 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
993 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
994 </tbody></table></div>
998 <h3 class='title'
><a name='cupsPrintFiles'
>cupsPrintFiles()
</a></h3>
1000 <p>Print one or more files to a printer or class on the default server.
</p>
1005 const
<a href='#char'
>char
</a> * name,
1007 const
<a href='#char'
>char
</a> ** files,
1008 const
<a href='#char'
>char
</a> * title,
1010 <a href='#cups_option_t'
>cups_option_t
</a> * options);
1013 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1014 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1016 <tr><td><tt>name
</tt></td><td>Printer or class name
</td></tr>
1017 <tr><td><tt>num_files
</tt></td><td>Number of files
</td></tr>
1018 <tr><td><tt>files
</tt></td><td>File(s) to print
</td></tr>
1019 <tr><td><tt>title
</tt></td><td>Title of job
</td></tr>
1020 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
1021 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
1022 </tbody></table></div>
1026 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='cupsPrintFiles2'
>cupsPrintFiles2()
</a></h3>
1027 <h4>Description
</h4>
1028 <p>Print one or more files to a printer or class on the specified server.
1036 const
<a href='#char'
>char
</a> * name,
1038 const
<a href='#char'
>char
</a> ** files,
1039 const
<a href='#char'
>char
</a> * title,
1041 <a href='#cups_option_t'
>cups_option_t
</a> * options);
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>
1047 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1048 <tr><td><tt>name
</tt></td><td>Printer or class name
</td></tr>
1049 <tr><td><tt>num_files
</tt></td><td>Number of files
</td></tr>
1050 <tr><td><tt>files
</tt></td><td>File(s) to print
</td></tr>
1051 <tr><td><tt>title
</tt></td><td>Title of job
</td></tr>
1052 <tr><td><tt>num_options
</tt></td><td>Number of options
</td></tr>
1053 <tr><td><tt>options
</tt></td><td>Options
</td></tr>
1054 </tbody></table></div>
1058 <h3 class='title'
><span class='info'
> CUPS
1.1.20 </span><a name='cupsPutFd'
>cupsPutFd()
</a></h3>
1059 <h4>Description
</h4>
1060 <p>Put a file on the server.
1062 This function returns HTTP_CREATED when the file is stored successfully.
1070 const
<a href='#char'
>char
</a> * resource,
1074 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1075 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1077 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
1078 <tr><td><tt>resource
</tt></td><td>Resource name
</td></tr>
1079 <tr><td><tt>fd
</tt></td><td>File descriptor
</td></tr>
1080 </tbody></table></div>
1084 <h3 class='title'
><span class='info'
> CUPS
1.1.20 </span><a name='cupsPutFile'
>cupsPutFile()
</a></h3>
1085 <h4>Description
</h4>
1086 <p>Put a file on the server.
1088 This function returns HTTP_CREATED when the file is stored successfully.
1096 const
<a href='#char'
>char
</a> * resource,
1097 const
<a href='#char'
>char
</a> * filename);
1100 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1101 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1103 <tr><td><tt>http
</tt></td><td>HTTP connection to server
</td></tr>
1104 <tr><td><tt>resource
</tt></td><td>Resource name
</td></tr>
1105 <tr><td><tt>filename
</tt></td><td>Filename
</td></tr>
1106 </tbody></table></div>
1110 <h3 class='title'
><a name='cupsServer'
>cupsServer()
</a></h3>
1111 <h4>Description
</h4>
1112 <p>Return the hostname/address of the default server.
1114 The returned value can be a fully-qualified hostname, a numeric
1115 IPv4 or IPv6 address, or a domain socket pathname.
</p>
1118 const
<a href='#char'
>char
</a> *
1126 <h3 class='title'
><a name='cupsSetDests'
>cupsSetDests()
</a></h3>
1127 <h4>Description
</h4>
1128 <p>Save the list of destinations for the default server.
1130 This function saves the destinations to /etc/cups/lpoptions when run
1131 as root and ~/.lpoptions when run as a normal user.
</p>
1137 <a href='#cups_dest_t'
>cups_dest_t
</a> * dests);
1140 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1141 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1143 <tr><td><tt>num_dests
</tt></td><td>Number of destinations
</td></tr>
1144 <tr><td><tt>dests
</tt></td><td>Destinations
</td></tr>
1145 </tbody></table></div>
1149 <h3 class='title'
><span class='info'
> CUPS
1.1.21 </span><a name='cupsSetDests2'
>cupsSetDests2()
</a></h3>
1150 <h4>Description
</h4>
1151 <p>Save the list of destinations for the specified server.
1153 This function saves the destinations to /etc/cups/lpoptions when run
1154 as root and ~/.lpoptions when run as a normal user.
1163 <a href='#cups_dest_t'
>cups_dest_t
</a> * dests);
1166 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1167 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1169 <tr><td><tt>http
</tt></td><td>HTTP connection
</td></tr>
1170 <tr><td><tt>num_dests
</tt></td><td>Number of destinations
</td></tr>
1171 <tr><td><tt>dests
</tt></td><td>Destinations
</td></tr>
1172 </tbody></table></div>
1174 <p>0 on success, -
1 on error
</p>
1176 <h3 class='title'
><a name='cupsSetEncryption'
>cupsSetEncryption()
</a></h3>
1177 <h4>Description
</h4>
1178 <p>Set the encryption preference.
</p>
1183 http_encryption_t e);
1186 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1187 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1189 <tr><td><tt>e
</tt></td><td>New encryption preference
</td></tr>
1190 </tbody></table></div>
1194 <h3 class='title'
><a name='cupsSetPasswordCB'
>cupsSetPasswordCB()
</a></h3>
1195 <h4>Description
</h4>
1196 <p>Set the password callback for CUPS.
1198 Pass NULL to restore the default (console) password callback.
</p>
1203 cups_password_cb_t cb);
1206 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1207 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1209 <tr><td><tt>cb
</tt></td><td>Callback function
</td></tr>
1210 </tbody></table></div>
1214 <h3 class='title'
><a name='cupsSetServer'
>cupsSetServer()
</a></h3>
1215 <h4>Description
</h4>
1216 <p>Set the default server name.
1218 The
"server
" string can be a fully-qualified hostname, a numeric
1219 IPv4 or IPv6 address, or a domain socket pathname. Pass NULL to
1220 restore the default server name.
</p>
1225 const
<a href='#char'
>char
</a> * server);
1228 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1229 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1231 <tr><td><tt>server
</tt></td><td>Server name
</td></tr>
1232 </tbody></table></div>
1236 <h3 class='title'
><a name='cupsSetUser'
>cupsSetUser()
</a></h3>
1237 <h4>Description
</h4>
1238 <p>Set the default user name.
1240 Pass NULL to restore the default user name.
</p>
1245 const
<a href='#char'
>char
</a> * user);
1248 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1249 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1251 <tr><td><tt>user
</tt></td><td>User name
</td></tr>
1252 </tbody></table></div>
1256 <h3 class='title'
><a name='cupsTempFd'
>cupsTempFd()
</a></h3>
1257 <h4>Description
</h4>
1258 <p>Create a temporary file.
1260 The temporary filename is stored in the filename buffer.
</p>
1265 <a href='#char'
>char
</a> * filename,
1269 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1270 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1272 <tr><td><tt>filename
</tt></td><td>Pointer to buffer
</td></tr>
1273 <tr><td><tt>len
</tt></td><td>Size of buffer
</td></tr>
1274 </tbody></table></div>
1276 <p>New file descriptor
</p>
1278 <h3 class='title'
><span class='info'
> DEPRECATED
</span><a name='cupsTempFile'
>cupsTempFile()
</a></h3>
1279 <h4>Description
</h4>
1280 <p>Generate a temporary filename.
1282 The temporary filename is stored in the filename buffer.
1283 This function is deprecated - use cupsTempFd() or cupsTempFile2()
1289 <a href='#char'
>char
</a> *
1291 <a href='#char'
>char
</a> * filename,
1295 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1296 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1298 <tr><td><tt>filename
</tt></td><td>Pointer to buffer
</td></tr>
1299 <tr><td><tt>len
</tt></td><td>Size of buffer
</td></tr>
1300 </tbody></table></div>
1304 <h3 class='title'
><span class='info'
> CUPS
1.2 </span><a name='cupsTempFile2'
>cupsTempFile2()
</a></h3>
1305 <h4>Description
</h4>
1306 <p>Create a temporary CUPS file.
1308 The temporary filename is stored in the filename buffer.
1315 <a href='#char'
>char
</a> * filename,
1319 <div class='table'
><table align='center' border='
1' width='
80%' cellpadding='
5' cellspacing='
0'
>
1320 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1322 <tr><td><tt>filename
</tt></td><td>Pointer to buffer
</td></tr>
1323 <tr><td><tt>len
</tt></td><td>Size of buffer
</td></tr>
1324 </tbody></table></div>
1326 <p>CUPS file or NULL on error
</p>
1328 <h3 class='title'
><a name='cupsUser'
>cupsUser()
</a></h3>
1329 <h4>Description
</h4>
1330 <p>Return the current user's name.
</p>
1333 const
<a href='#char'
>char
</a> *
1341 <h2 class='title'
><a name='STRUCTURES'
>Structures
</a></h2>
1343 <li><a href='#cups_dest_s'
><tt>cups_dest_s
</tt></a> </li>
1344 <li><a href='#cups_job_s'
><tt>cups_job_s
</tt></a> </li>
1345 <li><a href='#cups_option_s'
><tt>cups_option_s
</tt></a> </li>
1348 <h3 class='title'
><a name='cups_dest_s'
>cups_dest_s
</a></h3>
1349 <h4>Description
</h4>
1355 <a href='#char'
>char
</a> *name, * instance;
1358 <a href='#cups_option_t'
>cups_option_t
</a> * options;
1362 <div class='table'
><table align='center' border='
1' width='
80%'
>
1363 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1365 <tr><td><tt>instance
</tt> </td><td>Local instance name or NULL
</td></tr>
1366 <tr><td><tt>is_default
</tt> </td><td>Is this printer the default?
</td></tr>
1367 <tr><td><tt>num_options
</tt> </td><td>Number of options
</td></tr>
1368 <tr><td><tt>options
</tt> </td><td>Options
</td></tr>
1369 </tbody></table></div>
1371 <h3 class='title'
><a name='cups_job_s'
>cups_job_s
</a></h3>
1372 <h4>Description
</h4>
1378 <a href='#char'
>char
</a> *dest, *title, *user, * format;
1381 time_t completed_time, creation_time, processing_time;
1386 <div class='table'
><table align='center' border='
1' width='
80%'
>
1387 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1389 <tr><td><tt>format
</tt> </td><td>Document format
</td></tr>
1390 <tr><td><tt>id
</tt> </td><td>The job ID
</td></tr>
1391 <tr><td><tt>priority
</tt> </td><td>Priority (
1-
100)
</td></tr>
1392 <tr><td><tt>processing_time
</tt> </td><td>Time the job was processed
</td></tr>
1393 <tr><td><tt>state
</tt> </td><td>Job state
</td></tr>
1394 </tbody></table></div>
1396 <h3 class='title'
><a name='cups_option_s'
>cups_option_s
</a></h3>
1397 <h4>Description
</h4>
1398 <p>Types and structures...
</p>
1401 struct cups_option_s
1403 <a href='#char'
>char
</a> * name;
1404 <a href='#char'
>char
</a> * value;
1408 <div class='table'
><table align='center' border='
1' width='
80%'
>
1409 <thead><tr><th>Name
</th><th>Description
</th></tr></thead>
1411 <tr><td><tt>name
</tt> </td><td>Name of option
</td></tr>
1412 <tr><td><tt>value
</tt> </td><td>Value of option
</td></tr>
1413 </tbody></table></div>
1415 <h2 class='title'
><a name='TYPES'
>Types
</a></h2>
1417 <li><a href='#char'
><tt>char
</tt></a> </li>
1418 <li><a href='#cups_dest_t'
><tt>cups_dest_t
</tt></a> </li>
1419 <li><a href='#cups_job_t'
><tt>cups_job_t
</tt></a> </li>
1420 <li><a href='#cups_option_t'
><tt>cups_option_t
</tt></a> </li>
1421 <li><a href='#cups_ptype_t'
><tt>cups_ptype_t
</tt></a> </li>
1424 <h3 class='title'
><a name='char'
>char
</a></h3>
1425 <h4>Description
</h4>
1426 <p>Printer Options
</p>
1429 typedef const * (*charcups_password_cb_t)(const
<a href='#char'
>char
</a> *);
1432 <h3 class='title'
><a name='cups_dest_t'
>cups_dest_t
</a></h3>
1433 <h4>Description
</h4>
1437 typedef struct
<a href='#cups_dest_s'
>cups_dest_s
</a> cups_dest_t;
1440 <h3 class='title'
><a name='cups_job_t'
>cups_job_t
</a></h3>
1441 <h4>Description
</h4>
1445 typedef struct
<a href='#cups_job_s'
>cups_job_s
</a> cups_job_t;
1448 <h3 class='title'
><a name='cups_option_t'
>cups_option_t
</a></h3>
1449 <h4>Description
</h4>
1450 <p>Types and structures...
</p>
1453 typedef struct
<a href='#cups_option_s'
>cups_option_s
</a> cups_option_t;
1456 <h3 class='title'
><a name='cups_ptype_t'
>cups_ptype_t
</a></h3>
1457 <h4>Description
</h4>
1458 <p>Printer Type/Capability Bits
</p>
1461 typedef unsigned cups_ptype_t;