]> git.ipfire.org Git - thirdparty/cups.git/blame - doc/help/api-admin.html
Update API documentation.
[thirdparty/cups.git] / doc / help / api-admin.html
CommitLineData
73721e3e 1<!DOCTYPE html>
dffa3c74
MS
2<html>
3<!-- SECTION: Programming -->
abacc52b
MS
4 <head>
5 <title>Administration APIs</title>
6 <meta name="keywords" content="Programming">
7 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
93d79201 8 <meta name="creator" content="codedoc v3.2">
abacc52b
MS
9 <meta name="author" content="Unknown">
10 <meta name="copyright" content="Unknown">
798d6e29 11 <meta name="version" content="0.0">
abacc52b 12 <style type="text/css"><!--
dffa3c74
MS
13BODY {
14 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
15}
16
17H1, H2, H3, H4, H5, H6, P, TD, TH {
18 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
19}
20
73721e3e
MS
21H1 { font-size: 2em; }
22H2 { font-size: 1.75em; }
23H3 { font-size: 1.5em; }
24H4 { font-size: 1.25em; }
25
dffa3c74
MS
26KBD {
27 font-family: monaco, courier, monospace;
28 font-weight: bold;
29}
30
31PRE {
32 font-family: monaco, courier, monospace;
33}
34
699fe020
MS
35BLOCKQUOTE {
36 border-left: solid 2px #777;
37 margin: 1em 0;
38 padding: 10px;
39}
40
41BLOCKQUOTE OL LI {
42 margin-left: -1em;
43}
44
45PRE.command, PRE.example {
46 background: #eee;
47 margin: 0 36pt;
dffa3c74
MS
48 padding: 10px;
49}
50
51P.compact {
52 margin: 0;
53}
54
55P.example {
56 font-style: italic;
57 margin-left: 36pt;
58}
59
60DL.man DD {
61 margin-left: 5em;
62}
63
64DL.man DT {
65 margin-left: 0;
66}
67
68PRE.man {
69 margin: 0;
70}
71
dffa3c74
MS
72PRE.command EM, PRE.example EM {
73 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
74}
75
76P.command {
77 font-family: monaco, courier, monospace;
78 margin-left: 36pt;
79}
80
81P.formula {
82 font-style: italic;
83 margin-left: 36pt;
84}
85
dffa3c74
MS
86A IMG {
87 border: none;
88}
89
90A:link:hover IMG {
91 background: #f0f0f0;
92 border-radius: 10px;
93 -moz-border-radius: 10px;
94}
95
96A:link, A:visited {
97 font-weight: inherit;
98 text-decoration: none;
99}
100
101A:link:hover, A:visited:hover, A:active {
102 text-decoration: underline;
103}
104
105SUB, SUP {
106 font-size: 50%;
107}
108
109TR.data, TD.data, TR.data TD {
110 margin-top: 10pt;
111 padding: 5pt;
112 border-bottom: solid 1pt #999999;
113}
114
115TR.data TH {
116 border-bottom: solid 1pt #999999;
117 padding-top: 10pt;
118 padding-left: 5pt;
119 text-align: left;
120}
121
122DIV.table TABLE {
123 border: solid thin #999999;
124 border-collapse: collapse;
125 border-spacing: 0;
126 margin-left: auto;
127 margin-right: auto;
128}
129
130DIV.table CAPTION {
131 caption-side: top;
132 font-size: 120%;
133 font-style: italic;
134 font-weight: bold;
135 margin-left: auto;
136 margin-right: auto;
137}
138
139DIV.table TABLE TD {
140 border: solid thin #cccccc;
699fe020 141 padding: 5pt 10pt 0;
dffa3c74
MS
142}
143
144DIV.table TABLE TH {
145 background: #cccccc;
146 border: none;
147 border-bottom: solid thin #999999;
148}
149
150DIV.figure TABLE {
151 margin-left: auto;
152 margin-right: auto;
153}
154
155DIV.figure CAPTION {
156 caption-side: bottom;
157 font-size: 120%;
158 font-style: italic;
159 font-weight: bold;
160 margin-left: auto;
161 margin-right: auto;
162}
163
164TH.label {
165 text-align: right;
166 vertical-align: top;
167}
168
169TH.sublabel {
170 text-align: right;
171 font-weight: normal;
172}
173
174HR {
175 border: solid thin;
176}
177
178SPAN.info {
179 background: black;
180 border: thin solid black;
181 color: white;
182 font-size: 80%;
183 font-style: italic;
184 font-weight: bold;
185 white-space: nowrap;
186}
187
188H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
189 float: right;
190 font-size: 100%;
191}
192
193H1.title {
194}
195
196H2.title, H3.title {
197 border-bottom: solid 2pt #000000;
198}
199
200DIV.indent, TABLE.indent {
201 margin-top: 2em;
202 margin-left: auto;
203 margin-right: auto;
204 width: 90%;
205}
206
207TABLE.indent {
208 border-collapse: collapse;
209}
210
211TABLE.indent TD, TABLE.indent TH {
212 padding: 0;
213}
214
215TABLE.list {
216 border-collapse: collapse;
217 margin-left: auto;
218 margin-right: auto;
219 width: 90%;
220}
221
222TABLE.list TH {
223 background: white;
224 border-bottom: solid thin #cccccc;
225 color: #444444;
226 padding-top: 10pt;
227 padding-left: 5pt;
228 text-align: left;
229 vertical-align: bottom;
230 white-space: nowrap;
231}
232
233TABLE.list TH A {
234 color: #4444cc;
235}
236
237TABLE.list TD {
238 border-bottom: solid thin #eeeeee;
239 padding-top: 5pt;
240 padding-left: 5pt;
241}
242
243TABLE.list TR:nth-child(even) {
244 background: #f8f8f8;
245}
246
247TABLE.list TR:nth-child(odd) {
248 background: #f4f4f4;
249}
250
251DT {
252 margin-left: 36pt;
253 margin-top: 12pt;
254}
255
256DD {
257 margin-left: 54pt;
258}
259
260DL.category DT {
261 font-weight: bold;
262}
263
264P.summary {
265 margin-left: 36pt;
266 font-family: monaco, courier, monospace;
267}
268
269DIV.summary TABLE {
270 border: solid thin #999999;
271 border-collapse: collapse;
272 border-spacing: 0;
273 margin: 10px;
274}
275
276DIV.summary TABLE TD, DIV.summary TABLE TH {
277 border: solid thin #999999;
278 padding: 5px;
279 text-align: left;
280 vertical-align: top;
281}
282
283DIV.summary TABLE THEAD TH {
284 background: #eeeeee;
285}
286
287/* API documentation styles... */
288div.body h1 {
699fe020
MS
289 font-size: 250%;
290 font-weight: bold;
dffa3c74
MS
291 margin: 0;
292}
293div.body h2 {
699fe020 294 font-size: 250%;
dffa3c74
MS
295 margin-top: 1.5em;
296}
699fe020
MS
297div.body h3 {
298 font-size: 150%;
dffa3c74
MS
299 margin-bottom: 0.5em;
300 margin-top: 1.5em;
301}
699fe020
MS
302div.body h4 {
303 font-size: 110%;
304 margin-bottom: 0.5em;
305 margin-top: 1.5em;
306}
307div.body h5 {
308 font-size: 100%;
309 margin-bottom: 0.5em;
310 margin-top: 1.5em;
311}
312div.contents {
313 background: #e8e8e8;
314 border: solid thin black;
315 padding: 10px;
316}
317div.contents h1 {
318 font-size: 110%;
319}
320div.contents h2 {
321 font-size: 100%;
322}
323div.contents ul.contents {
324 font-size: 80%;
325}
326.class {
327 border-bottom: solid 2px gray;
328}
329.constants {
dffa3c74
MS
330}
331.description {
332 margin-top: 0.5em;
333}
699fe020
MS
334.discussion {
335}
336.enumeration {
337 border-bottom: solid 2px gray;
338}
339.function {
340 border-bottom: solid 2px gray;
341 margin-bottom: 0;
342}
343.members {
344}
345.method {
346}
347.parameters {
348}
349.returnvalue {
350}
351.struct {
352 border-bottom: solid 2px gray;
353}
354.typedef {
355 border-bottom: solid 2px gray;
356}
357.union {
358 border-bottom: solid 2px gray;
359}
360.variable {
361}
362h1, h2, h3, h4, h5, h6 {
363 page-break-inside: avoid;
364}
365blockquote {
366 border: solid thin gray;
367 box-shadow: 3px 3px 5px rgba(0,0,0,0.5);
73721e3e 368 padding: 10px 10px 0px;
699fe020
MS
369 page-break-inside: avoid;
370}
371p code, li code, p.code, pre, ul.code li {
372 background: rgba(127,127,127,0.1);
373 border: thin dotted gray;
374 font-family: monospace;
699fe020
MS
375 hyphens: manual;
376 -webkit-hyphens: manual;
377 page-break-inside: avoid;
378}
379p.code, pre, ul.code li {
380 padding: 10px;
381}
382p code, li code {
383 padding: 2px 5px;
384}
385a:link, a:visited {
386 text-decoration: none;
387}
388span.info {
389 background: black;
390 border: solid thin black;
391 color: white;
392 font-size: 80%;
393 font-style: italic;
394 font-weight: bold;
395 white-space: nowrap;
396}
73721e3e
MS
397h2 span.info, h3 span.info, h4 span.info {
398 border-radius: 10px;
699fe020 399 float: right;
73721e3e 400 font-size: 80%;
699fe020 401 padding: 3px 6px;
dffa3c74 402}
73721e3e
MS
403h2.title span.info, h3.title span.info, h4.title span.info {
404 border-bottom-left-radius: 0px;
405 border-bottom-right-radius: 0px;
406}
407h2.title span.info {
408 padding: 4px 6px;
409}
dffa3c74
MS
410ul.code, ul.contents, ul.subcontents {
411 list-style-type: none;
412 margin: 0;
413 padding-left: 0;
414}
415ul.code li {
416 margin: 0;
417}
418ul.contents > li {
419 margin-top: 1em;
420}
421ul.contents li ul.code, ul.contents li ul.subcontents {
422 padding-left: 2em;
423}
699fe020
MS
424table.list {
425 border-collapse: collapse;
426 width: 100%;
427}
428table.list tr:nth-child(even) {
429 background: rgba(127,127,127,0.1);]n}
430table.list th {
431 border-right: 2px solid gray;
432 font-family: monospace;
433 padding: 5px 10px 5px 2px;
434 text-align: right;
435 vertical-align: top;
dffa3c74 436}
699fe020
MS
437table.list td {
438 padding: 5px 2px 5px 10px;
439 text-align: left;
440 vertical-align: top;
dffa3c74 441}
699fe020 442h1.title {
dffa3c74 443}
699fe020
MS
444h2.title {
445 border-bottom: solid 2px black;
dffa3c74 446}
699fe020
MS
447h3.title {
448 border-bottom: solid 2px black;
dffa3c74
MS
449}
450--></style>
abacc52b
MS
451 </head>
452 <body>
93d79201 453 <div class="header">
dffa3c74
MS
454<!--
455 Administrative API header for CUPS.
456
53f8d64f 457 Copyright © 2016 by Apple Inc.
dffa3c74 458
53f8d64f
MS
459 Licensed under Apache License v2.0. See the file "LICENSE" for more
460 information.
dffa3c74
MS
461-->
462
463<h1 class='title'>Administrative APIs</h1>
464
465<div class='summary'><table summary='General Information'>
466<thead>
467<tr>
468 <th>Header</th>
469 <th>cups/adminutil.h</th>
470</tr>
471</thead>
472<tbody>
473<tr>
474 <th>Library</th>
475 <td>-lcups</td>
476</tr>
477<tr>
478 <th>See Also</th>
479 <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a><br>
480 Programming: <a href='api-cups.html' target='_top'>CUPS API</a><br>
481 Programming: <a href='api-httpipp.html' target='_top'>HTTP and IPP APIs</a></td>
482</tr>
483</tbody>
484</table></div>
93d79201 485 </div>
abacc52b
MS
486 <div class="contents">
487 <h2 class="title">Contents</h2>
488 <ul class="contents">
489 <li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
490 <li><a href="#SETTINGS">Scheduler Settings</a></li>
491 <li><a href="#DEVICES">Devices</a></li>
492 </ul></li>
493 <li><a href="#FUNCTIONS">Functions</a><ul class="subcontents">
494 <li><a href="#cupsAdminCreateWindowsPPD">cupsAdminCreateWindowsPPD</a></li>
495 <li><a href="#cupsAdminExportSamba">cupsAdminExportSamba</a></li>
496 <li><a href="#cupsAdminGetServerSettings">cupsAdminGetServerSettings</a></li>
497 <li><a href="#cupsAdminSetServerSettings">cupsAdminSetServerSettings</a></li>
498 <li><a href="#cupsGetDevices">cupsGetDevices</a></li>
499 </ul></li>
500 <li><a href="#TYPES">Data Types</a><ul class="subcontents">
501 <li><a href="#cups_device_cb_t">cups_device_cb_t</a></li>
502 </ul></li>
503 </ul>
504 </div>
505 <div class="body">
dffa3c74
MS
506<!--
507 Administrative API documentation for CUPS.
508
53f8d64f 509 Copyright © 2016 by Apple Inc.
dffa3c74 510
53f8d64f
MS
511 Licensed under Apache License v2.0. See the file "LICENSE" for more
512 information.
dffa3c74
MS
513-->
514
515<h2 class="title"><a name="OVERVIEW">Overview</a></h2>
516
517<p>The administrative APIs provide convenience functions to perform certain administrative functions with the CUPS scheduler.</p>
518
73721e3e 519<blockquote><b>Note:</b>
dffa3c74
MS
520 <p>Administrative functions normally require administrative privileges to execute and must not be used in ordinary user applications!</p>
521</blockquote>
522
523<h3><a name="SETTINGS">Scheduler Settings</a></h3>
524
525<p>The <a href="#cupsAdminGetServerSettings"><code>cupsAdminGetServerSettings</code></a> and <a href="#cupsAdminSetServerSettings"><code>cupsAdminSetServerSettings</code></a> functions allow you to get and set simple directives and their values, respectively, in the <var>cupsd.conf</var> file for the CUPS scheduler. Settings are stored in CUPS option arrays which provide a simple list of string name/value pairs. While any simple <var>cupsd.conf</var> directive name can be specified, the following convenience names are also defined to control common complex directives:</p>
526
527<ul>
528 <li><code>CUPS_SERVER_DEBUG_LOGGING</code></li>: For <code>cupsAdminGetServerSettings</code>, a value of "1" means that the <code>LogLevel</code> directive is set to <code>debug</code> or <code>debug2</code> while a value of "0" means it is set to any other value. For <code>cupsAdminSetServerSettings</code> a value of "1" sets the <code>LogLeveL</code> to <code>debug</code> while a value of "0" sets it to <code>warn</code>.</li>
529 <li><code>CUPS_SERVER_REMOTE_ADMIN</code></li>: A value of "1" specifies that administrative requests are accepted from remote addresses while "0" specifies that requests are only accepted from local addresses (loopback interface and domain sockets).</li>
530 <li><code>CUPS_SERVER_REMOTE_ANY</code></li>: A value of "1" specifies that requests are accepts from any address while "0" specifies that requests are only accepted from the local subnet (when sharing is enabled) or local addresses (loopback interface and domain sockets).</li>
531 <li><code>CUPS_SERVER_SHARE_PRINTERS</code></li>: A value of "1" specifies that printer sharing is enabled for selected printers and remote requests are accepted while a value of "0" specifies that printer sharing is disables and remote requests are not accepted.</li>
532 <li><code>CUPS_SERVER_USER_CANCEL_ANY</code></li>: A value of "1" specifies that the default security policy allows any user to cancel any print job, regardless of the owner. A value of "0" specifies that only administrative users can cancel other user's jobs.</li>
533</ul>
534
535<blockquote><b>Note:</b>
536 <p>Changing settings will restart the CUPS scheduler.</p>
537 <p>When printer sharing or the web interface are enabled, the scheduler's launch-on-demand functionality is effectively disabled. This can affect power usage, system performance, and the security profile of a system.</p>
538</blockquote>
539
540<p>The recommended way to make changes to the <var>cupsd.conf</var> is to first call <a href="#cupsAdminGetServerSettings"><code>cupsAdminGetServerSettings</code></a>, make any changes to the returned option array, and then call <a href="#cupsAdminSetServerSettings"><code>cupsAdminSetServerSettings</code></a> to save those settings. For example, to enable the web interface:</p>
541
542<pre class="example">
543#include &lt;cups/cups.h&gt;
544#include &lt;cups/adminutil.h&gt;
545
546void
547enable_web_interface(void)
548{
549 int num_settings = 0; /* Number of settings */
550 cups_option_t *settings = NULL; /* Settings */
551
552
553 if (!<a href="#cupsAdminGetServerSettings">cupsAdminGetServerSettings</a>(CUPS_HTTP_DEFAULT, &amp;num_settings, &amp;settings))
554 {
555 fprintf(stderr, "ERROR: Unable to get server settings: %s\n", cupsLastErrorString());
556 return;
557 }
558
559 num_settings = <a href="api-cups.html#cupsAddOption">cupsAddOption</a>("WebInterface", "Yes", num_settings, &amp;settings);
560
561 if (!<a href="#cupsAdminSetServerSettings">cupsAdminSetServerSettings</a>(CUPS_HTTP_DEFAULT, num_settings, settings))
562 {
563 fprintf(stderr, "ERROR: Unable to set server settings: %s\n", cupsLastErrorString());
564 }
565
566 <a href="api-cups.html#cupsFreeOptions">cupsFreeOptions</a>(num_settings, settings);
567}
568</pre>
569
570<h3><a name="DEVICES">Devices</a></h3>
571
572<p>Printers can be discovered through the CUPS scheduler using the <a href="#cupsGetDevices"><code>cupsGetDevices</code></a> API. Typically this API is used to locate printers to add the the system. Each device that is found will cause a supplied callback function to be executed. For example, to list the available printer devices that can be found within 30 seconds:</p>
573
574<pre class="example">
575#include &lt;cups/cups.h&gt;
576#include &lt;cups/adminutil.h&gt;
577
578
579void
580get_devices_cb(
581 const char *device_class, /* I - Class */
582 const char *device_id, /* I - 1284 device ID */
583 const char *device_info, /* I - Description */
584 const char *device_make_and_model, /* I - Make and model */
585 const char *device_uri, /* I - Device URI */
586 const char *device_location, /* I - Location */
587 void *user_data) /* I - User data */
588{
589 puts(device_uri);
590}
591
592
593void
594show_devices(void)
595{
596 <a href="#cupsGetDevices">cupsGetDevices</a>(CUPS_HTTP_DEFAULT, 30, NULL, NULL, get_devices_cb, NULL);
597}
598</pre>
abacc52b
MS
599 <h2 class="title"><a id="FUNCTIONS">Functions</a></h2>
600<h3 class="function"><span class="info">&#160;DEPRECATED&#160;</span><a id="cupsAdminCreateWindowsPPD">cupsAdminCreateWindowsPPD</a></h3>
601 <p class="description">Create the Windows PPD file for a printer.</p>
dffa3c74 602<p class="code">
98d88c8d 603char *cupsAdminCreateWindowsPPD(http_t *http, const char *dest, char *buffer, int bufsize);</p>
dffa3c74 604<h4 class="parameters">Parameters</h4>
98d88c8d
MS
605<table class="list"><tbody>
606<tr><th>http</th>
607 <td class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></td></tr>
608<tr><th>dest</th>
609 <td class="description">Printer or class</td></tr>
610<tr><th>buffer</th>
611 <td class="description">Filename buffer</td></tr>
612<tr><th>bufsize</th>
613 <td class="description">Size of filename buffer</td></tr>
614</tbody></table>
dffa3c74 615<h4 class="returnvalue">Return Value</h4>
abacc52b
MS
616 <p class="description">PPD file or NULL</p>
617<h3 class="function"><span class="info">&#160;DEPRECATED&#160;</span><a id="cupsAdminExportSamba">cupsAdminExportSamba</a></h3>
618 <p class="description">Export a printer to Samba.</p>
dffa3c74 619<p class="code">
98d88c8d 620int cupsAdminExportSamba(const char *dest, const char *ppd, const char *samba_server, const char *samba_user, const char *samba_password, FILE *logfile);</p>
dffa3c74 621<h4 class="parameters">Parameters</h4>
98d88c8d
MS
622<table class="list"><tbody>
623<tr><th>dest</th>
624 <td class="description">Destination to export</td></tr>
625<tr><th>ppd</th>
626 <td class="description">PPD file</td></tr>
627<tr><th>samba_server</th>
628 <td class="description">Samba server</td></tr>
629<tr><th>samba_user</th>
630 <td class="description">Samba username</td></tr>
631<tr><th>samba_password</th>
632 <td class="description">Samba password</td></tr>
633<tr><th>logfile</th>
634 <td class="description">Log file, if any</td></tr>
635</tbody></table>
dffa3c74 636<h4 class="returnvalue">Return Value</h4>
abacc52b
MS
637 <p class="description">1 on success, 0 on failure</p>
638<h3 class="function"><span class="info">&#160;CUPS 1.3/macOS 10.5&#160;</span><a id="cupsAdminGetServerSettings">cupsAdminGetServerSettings</a></h3>
639 <p class="description">Get settings from the server.</p>
dffa3c74 640<p class="code">
98d88c8d 641int cupsAdminGetServerSettings(http_t *http, int *num_settings, cups_option_t **settings);</p>
dffa3c74 642<h4 class="parameters">Parameters</h4>
98d88c8d
MS
643<table class="list"><tbody>
644<tr><th>http</th>
645 <td class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></td></tr>
646<tr><th>num_settings</th>
647 <td class="description">Number of settings</td></tr>
648<tr><th>settings</th>
649 <td class="description">Settings</td></tr>
650</tbody></table>
dffa3c74 651<h4 class="returnvalue">Return Value</h4>
abacc52b 652 <p class="description">1 on success, 0 on failure</p>
dffa3c74 653<h4 class="discussion">Discussion</h4>
abacc52b 654 <p class="discussion">The returned settings should be freed with cupsFreeOptions() when
dffa3c74
MS
655you are done with them.
656
657</p>
abacc52b
MS
658<h3 class="function"><span class="info">&#160;CUPS 1.3/macOS 10.5&#160;</span><a id="cupsAdminSetServerSettings">cupsAdminSetServerSettings</a></h3>
659 <p class="description">Set settings on the server.</p>
dffa3c74 660<p class="code">
98d88c8d 661int cupsAdminSetServerSettings(http_t *http, int num_settings, cups_option_t *settings);</p>
dffa3c74 662<h4 class="parameters">Parameters</h4>
98d88c8d
MS
663<table class="list"><tbody>
664<tr><th>http</th>
665 <td class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></td></tr>
666<tr><th>num_settings</th>
667 <td class="description">Number of settings</td></tr>
668<tr><th>settings</th>
669 <td class="description">Settings</td></tr>
670</tbody></table>
dffa3c74 671<h4 class="returnvalue">Return Value</h4>
abacc52b 672 <p class="description">1 on success, 0 on failure</p>
06a5a4d3 673<h3 class="function"><span class="info">&#160;DEPRECATED&#160;</span><a id="cupsGetDevices">cupsGetDevices</a></h3>
abacc52b 674 <p class="description">Get available printer devices.</p>
dffa3c74 675<p class="code">
98d88c8d 676ipp_status_t cupsGetDevices(http_t *http, int timeout, const char *include_schemes, const char *exclude_schemes, <a href="#cups_device_cb_t">cups_device_cb_t</a> callback, void *user_data);</p>
dffa3c74 677<h4 class="parameters">Parameters</h4>
98d88c8d
MS
678<table class="list"><tbody>
679<tr><th>http</th>
680 <td class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></td></tr>
681<tr><th>timeout</th>
682 <td class="description">Timeout in seconds or <code>CUPS_TIMEOUT_DEFAULT</code></td></tr>
683<tr><th>include_schemes</th>
684 <td class="description">Comma-separated URI schemes to include or <code>CUPS_INCLUDE_ALL</code></td></tr>
685<tr><th>exclude_schemes</th>
686 <td class="description">Comma-separated URI schemes to exclude or <code>CUPS_EXCLUDE_NONE</code></td></tr>
687<tr><th>callback</th>
688 <td class="description">Callback function</td></tr>
689<tr><th>user_data</th>
690 <td class="description">User data pointer</td></tr>
691</tbody></table>
dffa3c74 692<h4 class="returnvalue">Return Value</h4>
abacc52b 693 <p class="description">Request status - <code>IPP_OK</code> on success.</p>
dffa3c74 694<h4 class="discussion">Discussion</h4>
abacc52b 695 <p class="discussion">This function sends a CUPS-Get-Devices request and streams the discovered
dffa3c74
MS
696devices to the specified callback function. The &quot;timeout&quot; parameter controls
697how long the request lasts, while the &quot;include_schemes&quot; and &quot;exclude_schemes&quot;
698parameters provide comma-delimited lists of backends to include or omit from
06a5a4d3
MS
699the request respectively.<br>
700<br>
701This function is deprecated with the IPP printer discovery functionality
702being provided by the <a href="#cupsEnumDests"><code>cupsEnumDests</code></a> and @cupsGetDests@ functions.
dffa3c74
MS
703
704</p>
abacc52b
MS
705 <h2 class="title"><a id="TYPES">Data Types</a></h2>
706 <h3 class="typedef"><a id="cups_device_cb_t"><span class="info">&#160;CUPS 1.4/macOS 10.6&#160;</span>cups_device_cb_t</a></h3>
707 <p class="description">Device callback
dffa3c74 708</p>
abacc52b 709 <p class="code">
dffa3c74
MS
710typedef void (*cups_device_cb_t)(const char *device_class, const char *device_id, const char *device_info, const char *device_make_and_model, const char *device_uri, const char *device_location, void *user_data);
711</p>
abacc52b
MS
712 </div>
713 </body>
dffa3c74 714</html>