]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | /* |
18ecb428 | 2 | * "$Id: cups.h 8781 2009-08-28 17:34:54Z mike $" |
ef416fc2 | 3 | * |
aaf19ab0 | 4 | * API definitions for CUPS. |
ef416fc2 | 5 | * |
dcb445bc | 6 | * Copyright 2007-2012 by Apple Inc. |
b86bc4cf | 7 | * Copyright 1997-2007 by Easy Software Products. |
ef416fc2 | 8 | * |
9 | * These coded instructions, statements, and computer programs are the | |
bc44d920 | 10 | * property of Apple Inc. and are protected by Federal copyright |
11 | * law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
12 | * which should have been included with this file. If this file is | |
13 | * file is missing or damaged, see the license at "http://www.cups.org/". | |
ef416fc2 | 14 | * |
15 | * This file is subject to the Apple OS-Developed Software exception. | |
16 | */ | |
17 | ||
18 | #ifndef _CUPS_CUPS_H_ | |
19 | # define _CUPS_CUPS_H_ | |
20 | ||
21 | /* | |
22 | * Include necessary headers... | |
23 | */ | |
24 | ||
b86bc4cf | 25 | # include <sys/types.h> |
26 | # if defined(WIN32) && !defined(__CUPS_SSIZE_T_DEFINED) | |
27 | # define __CUPS_SSIZE_T_DEFINED | |
6d2f911b | 28 | # include <stddef.h> |
b86bc4cf | 29 | /* Windows does not support the ssize_t type, so map it to off_t... */ |
30 | typedef off_t ssize_t; /* @private@ */ | |
31 | # endif /* WIN32 && !__CUPS_SSIZE_T_DEFINED */ | |
32 | ||
9c80ffa2 MS |
33 | # ifdef __BLOCKS__ |
34 | # include <dispatch/dispatch.h> | |
35 | # endif /* __BLOCKS__ */ | |
36 | ||
aaf19ab0 | 37 | # include "file.h" |
ef416fc2 | 38 | # include "ipp.h" |
fa73b229 | 39 | # include "language.h" |
40 | ||
ef416fc2 | 41 | |
ef416fc2 | 42 | /* |
43 | * C++ magic... | |
44 | */ | |
45 | ||
46 | # ifdef __cplusplus | |
47 | extern "C" { | |
48 | # endif /* __cplusplus */ | |
49 | ||
50 | ||
51 | /* | |
52 | * Constants... | |
53 | */ | |
54 | ||
dcb445bc MS |
55 | # define CUPS_VERSION 1.0599 |
56 | # define CUPS_VERSION_MAJOR 1 | |
57 | # define CUPS_VERSION_MINOR 6 | |
58 | # define CUPS_VERSION_PATCH -1 | |
59 | ||
60 | # define CUPS_BC_FD 3 | |
61 | /* Back-channel file descriptor for | |
62 | * select/poll */ | |
63 | # define CUPS_DATE_ANY (time_t)-1 | |
64 | # define CUPS_EXCLUDE_NONE (const char *)0 | |
65 | # define CUPS_FORMAT_AUTO "application/octet-stream" | |
66 | # define CUPS_FORMAT_COMMAND "application/vnd.cups-command" | |
67 | # define CUPS_FORMAT_JPEG "image/jpeg" | |
68 | # define CUPS_FORMAT_PDF "application/pdf" | |
69 | # define CUPS_FORMAT_POSTSCRIPT "application/postscript" | |
70 | # define CUPS_FORMAT_RAW "application/vnd.cups-raw" | |
71 | # define CUPS_FORMAT_TEXT "text/plain" | |
72 | # define CUPS_HTTP_DEFAULT (http_t *)0 | |
73 | # define CUPS_INCLUDE_ALL (const char *)0 | |
74 | # define CUPS_JOBID_ALL -1 | |
75 | # define CUPS_JOBID_CURRENT 0 | |
76 | # define CUPS_LENGTH_VARIABLE (ssize_t)0 | |
77 | # define CUPS_TIMEOUT_DEFAULT 0 | |
78 | # define CUPS_WHICHJOBS_ALL -1 | |
79 | # define CUPS_WHICHJOBS_ACTIVE 0 | |
80 | # define CUPS_WHICHJOBS_COMPLETED 1 | |
81 | ||
82 | /* Flags for cupsConnectDest and cupsEnumDests */ | |
83 | # define CUPS_DEST_FLAGS_NONE 0x00 | |
84 | /* No flags are set */ | |
85 | # define CUPS_DEST_FLAGS_UNCONNECTED 0x01 | |
86 | /* There is not connection */ | |
87 | # define CUPS_DEST_FLAGS_MORE 0x02 | |
88 | /* There are more destinations */ | |
89 | # define CUPS_DEST_FLAGS_REMOVED 0x04 | |
90 | /* The destination has gone away */ | |
91 | # define CUPS_DEST_FLAGS_ERROR 0x08 | |
92 | /* An error occurred */ | |
93 | # define CUPS_DEST_FLAGS_RESOLVING 0x10 | |
94 | /* The destination address is being | |
95 | * resolved */ | |
96 | # define CUPS_DEST_FLAGS_CONNECTING 0x20 | |
97 | /* A connection is being established */ | |
98 | # define CUPS_DEST_FLAGS_CANCELED 0x40 | |
99 | /* Operation was canceled */ | |
100 | ||
101 | /* Flags for cupsGetDestMediaByName/Size */ | |
102 | # define CUPS_MEDIA_FLAGS_DEFAULT 0x00 | |
103 | /* Find the closest size supported by | |
104 | * the printer */ | |
105 | # define CUPS_MEDIA_FLAGS_BORDERLESS 0x01 | |
106 | /* Find a borderless size */ | |
107 | # define CUPS_MEDIA_FLAGS_DUPLEX 0x02 | |
108 | /* Find a size compatible with 2-sided | |
109 | * printing */ | |
110 | # define CUPS_MEDIA_FLAGS_EXACT 0x04 | |
111 | /* Find an exact match for the size */ | |
112 | # define CUPS_MEDIA_FLAGS_READY 0x08 | |
113 | /* If the printer supports media | |
114 | * sensing, find the size amongst the | |
115 | * "ready" media. */ | |
116 | ||
117 | /* Options and values */ | |
118 | # define CUPS_COPIES "copies" | |
119 | # define CUPS_COPIES_SUPPORTED "copies-supported" | |
120 | ||
121 | # define CUPS_FINISHINGS "finishings" | |
122 | # define CUPS_FINISHINGS_SUPPORTED "finishings-supported" | |
123 | ||
124 | # define CUPS_FINISHINGS_BIND "7" | |
125 | # define CUPS_FINISHINGS_COVER "6" | |
126 | # define CUPS_FINISHINGS_FOLD "10" | |
127 | # define CUPS_FINISHINGS_NONE "3" | |
128 | # define CUPS_FINISHINGS_PUNCH "5" | |
129 | # define CUPS_FINISHINGS_STAPLE "4" | |
130 | # define CUPS_FINISHINGS_TRIM "11" | |
131 | ||
132 | # define CUPS_MEDIA "media" | |
133 | # define CUPS_MEDIA_READY "media-ready" | |
134 | # define CUPS_MEDIA_SUPPORTED "media-supported" | |
135 | ||
136 | # define CUPS_MEDIA_3X5 "na_index-3x5_3x5in" | |
137 | # define CUPS_MEDIA_4X6 "na_index-4x6_4x6in" | |
138 | # define CUPS_MEDIA_5X7 "na_5x7_5x7in" | |
139 | # define CUPS_MEDIA_8X10 "na_govt-letter_8x10in" | |
140 | # define CUPS_MEDIA_A3 "iso_a3_297x420mm" | |
141 | # define CUPS_MEDIA_A4 "iso_a4_210x297mm" | |
142 | # define CUPS_MEDIA_A5 "iso_a5_148x210mm" | |
143 | # define CUPS_MEDIA_A6 "iso_a6_105x148mm" | |
144 | # define CUPS_MEDIA_ENV10 "na_number-10_4.125x9.5in" | |
145 | # define CUPS_MEDIA_ENVDL "iso_dl_110x220mm" | |
146 | # define CUPS_MEDIA_LEGAL "na_legal_8.5x14in" | |
147 | # define CUPS_MEDIA_LETTER "na_letter_8.5x11in" | |
148 | # define CUPS_MEDIA_PHOTO_L "oe_photo-l_3.5x5in" | |
149 | # define CUPS_MEDIA_SUPERBA3 "na_super-b_13x19in" | |
150 | # define CUPS_MEDIA_TABLOID "na_ledger_11x17in" | |
151 | ||
152 | # define CUPS_MEDIA_SOURCE "media-source" | |
153 | # define CUPS_MEDIA_SOURCE_SUPPORTED "media-source-supported" | |
154 | ||
155 | # define CUPS_MEDIA_SOURCE_AUTO "auto" | |
156 | # define CUPS_MEDIA_SOURCE_MANUAL "manual" | |
157 | ||
158 | # define CUPS_MEDIA_TYPE "media-type" | |
159 | # define CUPS_MEDIA_TYPE_SUPPORTED "media-type-supported" | |
160 | ||
161 | # define CUPS_MEDIA_TYPE_AUTO "auto" | |
162 | # define CUPS_MEDIA_TYPE_ENVELOPE "envelope" | |
163 | # define CUPS_MEDIA_TYPE_LABELS "labels" | |
164 | # define CUPS_MEDIA_TYPE_LETTERHEAD "stationery-letterhead" | |
165 | # define CUPS_MEDIA_TYPE_PHOTO "photographic" | |
166 | # define CUPS_MEDIA_TYPE_PHOTO_GLOSSY "photographic-glossy" | |
167 | # define CUPS_MEDIA_TYPE_PHOTO_MATTE "photographic-matte" | |
168 | # define CUPS_MEDIA_TYPE_PLAIN "stationery" | |
169 | # define CUPS_MEDIA_TYPE_TRANSPARENCY "transparency" | |
170 | ||
171 | # define CUPS_NUMBER_UP "number-up" | |
172 | # define CUPS_NUMBER_UP_SUPPORTED "number-up-supported" | |
173 | ||
174 | # define CUPS_ORIENTATION "orientation-requested" | |
175 | # define CUPS_ORIENTATION_SUPPORTED "orientation-requested-supported" | |
176 | ||
177 | # define CUPS_ORIENTATION_PORTRAIT "3" | |
178 | # define CUPS_ORIENTATION_LANDSCAPE "4" | |
179 | ||
180 | # define CUPS_PRINT_COLOR_MODE "print-color-mode" | |
181 | # define CUPS_PRINT_COLOR_MODE_SUPPORTED "print-color-mode-supported" | |
182 | ||
183 | # define CUPS_PRINT_COLOR_MODE_AUTO "auto" | |
184 | # define CUPS_PRINT_COLOR_MODE_MONOCHROME "monochrome" | |
185 | # define CUPS_PRINT_COLOR_MODE_COLOR "color" | |
186 | ||
187 | # define CUPS_PRINT_QUALITY "print-quality" | |
188 | # define CUPS_PRINT_QUALITY_SUPPORTED "print-quality-supported" | |
189 | ||
190 | # define CUPS_PRINT_QUALITY_DRAFT "3" | |
191 | # define CUPS_PRINT_QUALITY_NORMAL "4" | |
192 | # define CUPS_PRINT_QUALITY_HIGH "5" | |
193 | ||
194 | # define CUPS_SIDES "sides" | |
195 | # define CUPS_SIDES_SUPPORTED "sides-supported" | |
196 | ||
197 | # define CUPS_SIDES_ONE_SIDED "one-sided" | |
198 | # define CUPS_SIDES_TWO_SIDED_PORTRAIT "two-sided-long-edge" | |
199 | # define CUPS_SIDES_TWO_SIDED_LANDSCAPE "two-sided-short-edge" | |
ef416fc2 | 200 | |
201 | ||
202 | /* | |
203 | * Types and structures... | |
204 | */ | |
205 | ||
dcb445bc MS |
206 | typedef unsigned cups_ptype_t; /* Printer type/capability bits */ |
207 | enum cups_ptype_e /* Printer type/capability bit | |
208 | * constants */ | |
5a738aea | 209 | { /* Not a typedef'd enum so we can OR */ |
ef416fc2 | 210 | CUPS_PRINTER_LOCAL = 0x0000, /* Local printer or class */ |
211 | CUPS_PRINTER_CLASS = 0x0001, /* Printer class */ | |
212 | CUPS_PRINTER_REMOTE = 0x0002, /* Remote printer or class */ | |
213 | CUPS_PRINTER_BW = 0x0004, /* Can do B&W printing */ | |
214 | CUPS_PRINTER_COLOR = 0x0008, /* Can do color printing */ | |
215 | CUPS_PRINTER_DUPLEX = 0x0010, /* Can do duplexing */ | |
216 | CUPS_PRINTER_STAPLE = 0x0020, /* Can staple output */ | |
217 | CUPS_PRINTER_COPIES = 0x0040, /* Can do copies */ | |
218 | CUPS_PRINTER_COLLATE = 0x0080, /* Can collage copies */ | |
219 | CUPS_PRINTER_PUNCH = 0x0100, /* Can punch output */ | |
220 | CUPS_PRINTER_COVER = 0x0200, /* Can cover output */ | |
221 | CUPS_PRINTER_BIND = 0x0400, /* Can bind output */ | |
222 | CUPS_PRINTER_SORT = 0x0800, /* Can sort output */ | |
223 | CUPS_PRINTER_SMALL = 0x1000, /* Can do Letter/Legal/A4 */ | |
224 | CUPS_PRINTER_MEDIUM = 0x2000, /* Can do Tabloid/B/C/A3/A2 */ | |
225 | CUPS_PRINTER_LARGE = 0x4000, /* Can do D/E/A1/A0 */ | |
226 | CUPS_PRINTER_VARIABLE = 0x8000, /* Can do variable sizes */ | |
dcb445bc MS |
227 | CUPS_PRINTER_IMPLICIT = 0x10000, /* Implicit class @private@ |
228 | * @since Deprecated@ */ | |
ef416fc2 | 229 | CUPS_PRINTER_DEFAULT = 0x20000, /* Default printer on network */ |
230 | CUPS_PRINTER_FAX = 0x40000, /* Fax queue */ | |
231 | CUPS_PRINTER_REJECTING = 0x80000, /* Printer is rejecting jobs */ | |
dcb445bc MS |
232 | CUPS_PRINTER_DELETE = 0x100000, /* Delete printer |
233 | * @since CUPS 1.2/Mac OS X 10.5@ */ | |
234 | CUPS_PRINTER_NOT_SHARED = 0x200000, /* Printer is not shared | |
235 | * @since CUPS 1.2/Mac OS X 10.5@ */ | |
236 | CUPS_PRINTER_AUTHENTICATED = 0x400000,/* Printer requires authentication | |
237 | * @since CUPS 1.2/Mac OS X 10.5@ */ | |
238 | CUPS_PRINTER_COMMANDS = 0x800000, /* Printer supports maintenance commands | |
239 | * @since CUPS 1.2/Mac OS X 10.5@ */ | |
240 | CUPS_PRINTER_DISCOVERED = 0x1000000, /* Printer was automatically discovered | |
241 | * and added @private@ | |
242 | * @since Deprecated@ */ | |
243 | CUPS_PRINTER_SCANNER = 0x2000000, /* Scanner-only device | |
244 | * @since CUPS 1.4/Mac OS X 10.6@ */ | |
245 | CUPS_PRINTER_MFP = 0x4000000, /* Printer with scanning capabilities | |
246 | * @since CUPS 1.4/Mac OS X 10.6@ */ | |
247 | CUPS_PRINTER_OPTIONS = 0x6fffc /* ~(CLASS | REMOTE | IMPLICIT | | |
248 | * DEFAULT | FAX | REJECTING | DELETE | | |
249 | * NOT_SHARED | AUTHENTICATED | | |
250 | * COMMANDS | DISCOVERED) @private@ */ | |
ef416fc2 | 251 | }; |
252 | ||
ef416fc2 | 253 | typedef struct cups_option_s /**** Printer Options ****/ |
254 | { | |
255 | char *name; /* Name of option */ | |
256 | char *value; /* Value of option */ | |
257 | } cups_option_t; | |
258 | ||
259 | typedef struct cups_dest_s /**** Destination ****/ | |
260 | { | |
261 | char *name, /* Printer or class name */ | |
262 | *instance; /* Local instance name or NULL */ | |
263 | int is_default; /* Is this printer the default? */ | |
264 | int num_options; /* Number of options */ | |
265 | cups_option_t *options; /* Options */ | |
266 | } cups_dest_t; | |
267 | ||
dcb445bc MS |
268 | typedef struct _cups_dinfo_s cups_dinfo_t; |
269 | /* Destination capability and status | |
270 | * information @since CUPS 1.6@ */ | |
271 | ||
ef416fc2 | 272 | typedef struct cups_job_s /**** Job ****/ |
273 | { | |
274 | int id; /* The job ID */ | |
ecdc0628 | 275 | char *dest; /* Printer or class name */ |
276 | char *title; /* Title/job name */ | |
277 | char *user; /* User the submitted the job */ | |
278 | char *format; /* Document format */ | |
ef416fc2 | 279 | ipp_jstate_t state; /* Job state */ |
ecdc0628 | 280 | int size; /* Size in kilobytes */ |
281 | int priority; /* Priority (1-100) */ | |
282 | time_t completed_time; /* Time the job was completed */ | |
283 | time_t creation_time; /* Time the job was created */ | |
284 | time_t processing_time; /* Time the job was processed */ | |
ef416fc2 | 285 | } cups_job_t; |
286 | ||
dcb445bc MS |
287 | typedef struct cups_size_s /**** Media Size @since CUPS 1.6@ ****/ |
288 | { | |
289 | char media[128]; /* Media name to use */ | |
290 | int width, /* Width in hundredths of millimeters */ | |
291 | length, /* Length in hundredths of | |
292 | * millimeters */ | |
293 | bottom, /* Bottom margin in hundredths of | |
294 | * millimeters */ | |
295 | left, /* Left margin in hundredths of | |
296 | * millimeters */ | |
297 | right, /* Right margin in hundredths of | |
298 | * millimeters */ | |
299 | top; /* Top margin in hundredths of | |
300 | * millimeters */ | |
301 | } cups_size_t; | |
302 | ||
7cf5915e | 303 | typedef int (*cups_client_cert_cb_t)(http_t *http, void *tls, |
321d8d57 | 304 | cups_array_t *distinguished_names, |
7cf5915e | 305 | void *user_data); |
dcb445bc MS |
306 | /* Client credentials callback |
307 | * @since CUPS 1.5/Mac OS X 10.7@ */ | |
7cf5915e | 308 | |
dcb445bc MS |
309 | typedef int (*cups_dest_cb_t)(void *user_data, unsigned flags, |
310 | cups_dest_t *dest); | |
311 | /* Destination enumeration callback | |
312 | * @since CUPS 1.6@ */ | |
9c80ffa2 MS |
313 | |
314 | # ifdef __BLOCKS__ | |
dcb445bc MS |
315 | typedef int (^cups_dest_block_t)(unsigned flags, cups_dest_t *dest); |
316 | /* Destination enumeration block | |
317 | * @since CUPS 1.6@ */ | |
9c80ffa2 MS |
318 | # endif /* __BLOCKS__ */ |
319 | ||
320 | typedef void (*cups_device_cb_t)(const char *device_class, | |
321 | const char *device_id, const char *device_info, | |
322 | const char *device_make_and_model, | |
323 | const char *device_uri, | |
324 | const char *device_location, void *user_data); | |
dcb445bc MS |
325 | /* Device callback |
326 | * @since CUPS 1.4/Mac OS X 10.6@ */ | |
9c80ffa2 MS |
327 | |
328 | typedef const char *(*cups_password_cb_t)(const char *prompt); | |
dcb445bc | 329 | /* Password callback */ |
9c80ffa2 MS |
330 | |
331 | typedef const char *(*cups_password_cb2_t)(const char *prompt, http_t *http, | |
332 | const char *method, | |
333 | const char *resource, | |
334 | void *user_data); | |
dcb445bc MS |
335 | /* New password callback |
336 | * @since CUPS 1.4/Mac OS X 10.6@ */ | |
9c80ffa2 | 337 | |
7cf5915e MS |
338 | typedef int (*cups_server_cert_cb_t)(http_t *http, void *tls, |
339 | cups_array_t *certs, void *user_data); | |
dcb445bc MS |
340 | /* Server credentials callback |
341 | * @since CUPS 1.5/Mac OS X 10.7@ */ | |
7cf5915e | 342 | |
ef416fc2 | 343 | |
344 | /* | |
345 | * Functions... | |
346 | */ | |
347 | ||
3d052e43 | 348 | extern int cupsCancelJob(const char *name, int job_id); |
ef416fc2 | 349 | extern ipp_t *cupsDoFileRequest(http_t *http, ipp_t *request, |
ecdc0628 | 350 | const char *resource, |
351 | const char *filename); | |
352 | extern ipp_t *cupsDoRequest(http_t *http, ipp_t *request, | |
353 | const char *resource); | |
ef416fc2 | 354 | extern http_encryption_t cupsEncryption(void); |
355 | extern void cupsFreeJobs(int num_jobs, cups_job_t *jobs); | |
356 | extern int cupsGetClasses(char ***classes) _CUPS_DEPRECATED; | |
357 | extern const char *cupsGetDefault(void); | |
5a738aea MS |
358 | extern int cupsGetJobs(cups_job_t **jobs, const char *name, |
359 | int myjobs, int whichjobs); | |
3d052e43 | 360 | extern const char *cupsGetPPD(const char *name); |
ef416fc2 | 361 | extern int cupsGetPrinters(char ***printers) _CUPS_DEPRECATED; |
362 | extern ipp_status_t cupsLastError(void); | |
3d052e43 | 363 | extern int cupsPrintFile(const char *name, const char *filename, |
ef416fc2 | 364 | const char *title, int num_options, |
365 | cups_option_t *options); | |
3d052e43 | 366 | extern int cupsPrintFiles(const char *name, int num_files, |
ef416fc2 | 367 | const char **files, const char *title, |
368 | int num_options, cups_option_t *options); | |
369 | extern char *cupsTempFile(char *filename, int len) _CUPS_DEPRECATED; | |
370 | extern int cupsTempFd(char *filename, int len); | |
371 | ||
372 | extern int cupsAddDest(const char *name, const char *instance, | |
373 | int num_dests, cups_dest_t **dests); | |
374 | extern void cupsFreeDests(int num_dests, cups_dest_t *dests); | |
375 | extern cups_dest_t *cupsGetDest(const char *name, const char *instance, | |
376 | int num_dests, cups_dest_t *dests); | |
377 | extern int cupsGetDests(cups_dest_t **dests); | |
378 | extern void cupsSetDests(int num_dests, cups_dest_t *dests); | |
379 | ||
380 | extern int cupsAddOption(const char *name, const char *value, | |
381 | int num_options, cups_option_t **options); | |
382 | extern void cupsEncodeOptions(ipp_t *ipp, int num_options, | |
383 | cups_option_t *options); | |
dcb445bc MS |
384 | extern void cupsFreeOptions(int num_options, |
385 | cups_option_t *options); | |
ef416fc2 | 386 | extern const char *cupsGetOption(const char *name, int num_options, |
387 | cups_option_t *options); | |
b423cd4c | 388 | extern int cupsParseOptions(const char *arg, int num_options, |
389 | cups_option_t **options); | |
ef416fc2 | 390 | |
391 | extern const char *cupsGetPassword(const char *prompt); | |
392 | extern const char *cupsServer(void); | |
393 | extern void cupsSetEncryption(http_encryption_t e); | |
394 | extern void cupsSetPasswordCB(cups_password_cb_t cb); | |
395 | extern void cupsSetServer(const char *server); | |
396 | extern void cupsSetUser(const char *user); | |
397 | extern const char *cupsUser(void); | |
398 | ||
399 | /**** New in CUPS 1.1.20 ****/ | |
400 | extern int cupsDoAuthentication(http_t *http, const char *method, | |
dcb445bc MS |
401 | const char *resource) |
402 | _CUPS_API_1_1_20; | |
ef416fc2 | 403 | extern http_status_t cupsGetFile(http_t *http, const char *resource, |
2fb76298 | 404 | const char *filename) _CUPS_API_1_1_20; |
ef416fc2 | 405 | extern http_status_t cupsGetFd(http_t *http, const char *resource, int fd); |
406 | extern http_status_t cupsPutFile(http_t *http, const char *resource, | |
2fb76298 | 407 | const char *filename) _CUPS_API_1_1_20; |
dcb445bc MS |
408 | extern http_status_t cupsPutFd(http_t *http, const char *resource, int fd) |
409 | _CUPS_API_1_1_20; | |
ef416fc2 | 410 | |
411 | /**** New in CUPS 1.1.21 ****/ | |
2fb76298 | 412 | extern const char *cupsGetDefault2(http_t *http) _CUPS_API_1_1_21; |
dcb445bc MS |
413 | extern int cupsGetDests2(http_t *http, cups_dest_t **dests) |
414 | _CUPS_API_1_1_21; | |
ef416fc2 | 415 | extern int cupsGetJobs2(http_t *http, cups_job_t **jobs, |
3d052e43 | 416 | const char *name, int myjobs, |
5a738aea | 417 | int whichjobs) _CUPS_API_1_1_21; |
dcb445bc MS |
418 | extern const char *cupsGetPPD2(http_t *http, const char *name) |
419 | _CUPS_API_1_1_21; | |
3d052e43 | 420 | extern int cupsPrintFile2(http_t *http, const char *name, |
ef416fc2 | 421 | const char *filename, |
422 | const char *title, int num_options, | |
2fb76298 | 423 | cups_option_t *options) _CUPS_API_1_1_21; |
3d052e43 | 424 | extern int cupsPrintFiles2(http_t *http, const char *name, |
ef416fc2 | 425 | int num_files, const char **files, |
426 | const char *title, int num_options, | |
dcb445bc MS |
427 | cups_option_t *options) |
428 | _CUPS_API_1_1_21; | |
ef416fc2 | 429 | extern int cupsSetDests2(http_t *http, int num_dests, |
2fb76298 | 430 | cups_dest_t *dests) _CUPS_API_1_1_21; |
ef416fc2 | 431 | |
b0f6947b | 432 | /**** New in CUPS 1.2/Mac OS X 10.5 ****/ |
ecdc0628 | 433 | extern ssize_t cupsBackChannelRead(char *buffer, size_t bytes, |
2fb76298 | 434 | double timeout) _CUPS_API_1_2; |
ecdc0628 | 435 | extern ssize_t cupsBackChannelWrite(const char *buffer, size_t bytes, |
2fb76298 | 436 | double timeout) _CUPS_API_1_2; |
ef416fc2 | 437 | extern void cupsEncodeOptions2(ipp_t *ipp, int num_options, |
438 | cups_option_t *options, | |
2fb76298 MS |
439 | ipp_tag_t group_tag) _CUPS_API_1_2; |
440 | extern const char *cupsLastErrorString(void) _CUPS_API_1_2; | |
dcb445bc MS |
441 | extern char *cupsNotifySubject(cups_lang_t *lang, ipp_t *event) |
442 | _CUPS_API_1_2; | |
443 | extern char *cupsNotifyText(cups_lang_t *lang, ipp_t *event) | |
444 | _CUPS_API_1_2; | |
b423cd4c | 445 | extern int cupsRemoveOption(const char *name, int num_options, |
2fb76298 MS |
446 | cups_option_t **options) _CUPS_API_1_2; |
447 | extern cups_file_t *cupsTempFile2(char *filename, int len) _CUPS_API_1_2; | |
ef416fc2 | 448 | |
b0f6947b | 449 | /**** New in CUPS 1.3/Mac OS X 10.5 ****/ |
b94498cf | 450 | extern ipp_t *cupsDoIORequest(http_t *http, ipp_t *request, |
451 | const char *resource, int infile, | |
2fb76298 | 452 | int outfile) _CUPS_API_1_3; |
dcb445bc MS |
453 | extern char *cupsGetServerPPD(http_t *http, const char *name) |
454 | _CUPS_API_1_3; | |
f7deaa1a | 455 | extern int cupsRemoveDest(const char *name, |
456 | const char *instance, | |
dcb445bc MS |
457 | int num_dests, cups_dest_t **dests) |
458 | _CUPS_API_1_3; | |
f7deaa1a | 459 | extern void cupsSetDefaultDest(const char *name, |
460 | const char *instance, | |
461 | int num_dests, | |
2fb76298 | 462 | cups_dest_t *dests) _CUPS_API_1_3; |
f7deaa1a | 463 | |
b0f6947b | 464 | /**** New in CUPS 1.4/Mac OS X 10.6 ****/ |
5a738aea MS |
465 | extern ipp_status_t cupsCancelJob2(http_t *http, const char *name, |
466 | int job_id, int purge) _CUPS_API_1_4; | |
3d052e43 MS |
467 | extern int cupsCreateJob(http_t *http, const char *name, |
468 | const char *title, int num_options, | |
469 | cups_option_t *options) _CUPS_API_1_4; | |
470 | extern ipp_status_t cupsFinishDocument(http_t *http, | |
471 | const char *name) _CUPS_API_1_4; | |
ae71f5de | 472 | extern ipp_status_t cupsGetDevices(http_t *http, int timeout, |
ed6e7faf | 473 | const char *include_schemes, |
38e73f87 | 474 | const char *exclude_schemes, |
ae71f5de MS |
475 | cups_device_cb_t callback, |
476 | void *user_data) _CUPS_API_1_4; | |
a4924f6c MS |
477 | extern cups_dest_t *cupsGetNamedDest(http_t *http, const char *name, |
478 | const char *instance) _CUPS_API_1_4; | |
f11a948a MS |
479 | extern const char *cupsGetPassword2(const char *prompt, http_t *http, |
480 | const char *method, | |
481 | const char *resource) _CUPS_API_1_4; | |
2e4ff8af MS |
482 | extern http_status_t cupsGetPPD3(http_t *http, const char *name, |
483 | time_t *modtime, char *buffer, | |
2fb76298 | 484 | size_t bufsize) _CUPS_API_1_4; |
3d052e43 MS |
485 | extern ipp_t *cupsGetResponse(http_t *http, |
486 | const char *resource) _CUPS_API_1_4; | |
487 | extern ssize_t cupsReadResponseData(http_t *http, char *buffer, | |
488 | size_t length) _CUPS_API_1_4; | |
489 | extern http_status_t cupsSendRequest(http_t *http, ipp_t *request, | |
490 | const char *resource, | |
491 | size_t length) _CUPS_API_1_4; | |
f11a948a MS |
492 | extern void cupsSetPasswordCB2(cups_password_cb2_t cb, |
493 | void *user_data) _CUPS_API_1_4; | |
3d052e43 MS |
494 | extern http_status_t cupsStartDocument(http_t *http, const char *name, |
495 | int job_id, const char *docname, | |
496 | const char *format, | |
497 | int last_document) _CUPS_API_1_4; | |
498 | extern http_status_t cupsWriteRequestData(http_t *http, const char *buffer, | |
499 | size_t length) _CUPS_API_1_4; | |
ef416fc2 | 500 | |
7cf5915e MS |
501 | /**** New in CUPS 1.5 ****/ |
502 | extern void cupsSetClientCertCB(cups_client_cert_cb_t cb, | |
503 | void *user_data) _CUPS_API_1_5; | |
504 | extern int cupsSetCredentials(cups_array_t *certs) _CUPS_API_1_5; | |
505 | extern void cupsSetServerCertCB(cups_server_cert_cb_t cb, | |
506 | void *user_data) _CUPS_API_1_5; | |
507 | ||
9c80ffa2 | 508 | /**** New in CUPS 1.6 ****/ |
dcb445bc MS |
509 | extern ipp_status_t cupsCancelDestJob(http_t *http, cups_dest_t *dest, |
510 | int job_id) _CUPS_API_1_6; | |
511 | extern int cupsCheckDestSupported(http_t *http, cups_dest_t *dest, | |
512 | cups_dinfo_t *info, | |
513 | const char *option, | |
514 | const char *value) _CUPS_API_1_6; | |
515 | extern ipp_status_t cupsCloseDestJob(http_t *http, cups_dest_t *dest, | |
516 | int job_id) _CUPS_API_1_6; | |
517 | extern http_t *cupsConnectDest(cups_dest_t *dest, unsigned flags, | |
518 | int msec, int *cancel, | |
519 | char *resource, size_t resourcesize, | |
520 | cups_dest_cb_t cb, void *user_data) | |
521 | _CUPS_API_1_6; | |
522 | # ifdef __BLOCKS__ | |
523 | extern http_t *cupsConnectDestBlock(cups_dest_t *dest, | |
524 | unsigned flags, int msec, | |
525 | int *cancel, char *resource, | |
526 | size_t resourcesize, | |
527 | cups_dest_block_t block) | |
528 | _CUPS_API_1_6; | |
529 | # endif /* __BLOCKS__ */ | |
530 | extern int cupsCopyDest(cups_dest_t *dest, int num_dests, | |
531 | cups_dest_t **dests) _CUPS_API_1_6; | |
532 | extern cups_dinfo_t *cupsCopyDestInfo(http_t *http, cups_dest_t *dest) | |
533 | _CUPS_API_1_6; | |
534 | extern int cupsCopyDestConflicts(http_t *http, cups_dest_t *dest, | |
535 | cups_dinfo_t *info, | |
536 | int num_options, | |
537 | cups_option_t *options, | |
538 | const char *new_option, | |
539 | const char *new_value, | |
540 | int *num_conflicts, | |
541 | cups_option_t **conflicts, | |
542 | int *num_resolved, | |
543 | cups_option_t **resolved) | |
544 | _CUPS_API_1_6; | |
545 | extern ipp_status_t cupsCreateDestJob(http_t *http, cups_dest_t *dest, | |
546 | cups_dinfo_t *info, int *job_id, | |
547 | const char *title, int num_options, | |
548 | cups_option_t *options) _CUPS_API_1_6; | |
549 | extern int cupsEnumDests(unsigned flags, int msec, int *cancel, | |
550 | cups_ptype_t type, cups_ptype_t mask, | |
551 | cups_dest_cb_t cb, void *user_data) | |
552 | _CUPS_API_1_6; | |
9c80ffa2 | 553 | # ifdef __BLOCKS__ |
dcb445bc MS |
554 | extern int cupsEnumDestsBlock(unsigned flags, int msec, |
555 | int *cancel, cups_ptype_t type, | |
556 | cups_ptype_t mask, | |
557 | cups_dest_block_t block) | |
558 | _CUPS_API_1_6; | |
9c80ffa2 | 559 | # endif /* __BLOCKS__ */ |
dcb445bc MS |
560 | extern ipp_status_t cupsFinishDestDocument(http_t *http, |
561 | cups_dest_t *dest) _CUPS_API_1_6; | |
562 | extern void cupsFreeDestInfo(cups_dinfo_t *dinfo) _CUPS_API_1_6; | |
563 | extern int cupsGetDestMediaByName(http_t *http, cups_dest_t *dest, | |
564 | cups_dinfo_t *dinfo, | |
565 | const char *media, | |
566 | unsigned flags, | |
567 | cups_size_t *size) _CUPS_API_1_6; | |
568 | extern int cupsGetDestMediaBySize(http_t *http, cups_dest_t *dest, | |
569 | cups_dinfo_t *dinfo, | |
570 | int width, int length, | |
571 | unsigned flags, | |
572 | cups_size_t *size) _CUPS_API_1_6; | |
573 | extern const char *cupsLocalizeDestOption(http_t *http, cups_dest_t *dest, | |
574 | cups_dinfo_t *info, | |
575 | const char *option) | |
576 | _CUPS_API_1_6; | |
577 | extern const char *cupsLocalizeDestValue(http_t *http, cups_dest_t *dest, | |
578 | cups_dinfo_t *info, | |
579 | const char *option, | |
580 | const char *value) | |
581 | _CUPS_API_1_6; | |
582 | extern http_status_t cupsStartDestDocument(http_t *http, cups_dest_t *dest, | |
583 | cups_dinfo_t *info, int job_id, | |
584 | const char *docname, | |
585 | const char *format, | |
586 | int num_options, | |
587 | cups_option_t *options, | |
588 | int last_document) _CUPS_API_1_6; | |
7cf5915e | 589 | |
ef416fc2 | 590 | # ifdef __cplusplus |
591 | } | |
592 | # endif /* __cplusplus */ | |
593 | ||
594 | #endif /* !_CUPS_CUPS_H_ */ | |
595 | ||
596 | /* | |
18ecb428 | 597 | * End of "$Id: cups.h 8781 2009-08-28 17:34:54Z mike $". |
ef416fc2 | 598 | */ |