]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | /* |
d21dc0ed | 2 | * Internet Printing Protocol definitions for CUPS. |
ef416fc2 | 3 | * |
0fb02fb9 MS |
4 | * Copyright © 2007-2018 by Apple Inc. |
5 | * Copyright © 1997-2006 by Easy Software Products. | |
ef416fc2 | 6 | * |
0fb02fb9 MS |
7 | * Licensed under Apache License v2.0. See the file "LICENSE" for more |
8 | * information. | |
ef416fc2 | 9 | */ |
10 | ||
11 | #ifndef _CUPS_IPP_H_ | |
12 | # define _CUPS_IPP_H_ | |
13 | ||
14 | /* | |
15 | * Include necessary headers... | |
16 | */ | |
17 | ||
18 | # include "http.h" | |
c1420c87 | 19 | # include <stdarg.h> |
ef416fc2 | 20 | |
21 | ||
22 | /* | |
23 | * C++ magic... | |
24 | */ | |
25 | ||
26 | # ifdef __cplusplus | |
27 | extern "C" { | |
28 | # endif /* __cplusplus */ | |
29 | ||
30 | ||
31 | /* | |
32 | * IPP version string... | |
33 | */ | |
34 | ||
5a6b583a | 35 | # define IPP_VERSION "\002\001" |
ef416fc2 | 36 | |
37 | /* | |
38 | * IPP registered port number... | |
39 | * | |
40 | * Note: Applications should never use IPP_PORT, but instead use the | |
41 | * ippPort() function to allow overrides via the IPP_PORT environment | |
42 | * variable and services file if needed! | |
43 | */ | |
44 | ||
45 | # define IPP_PORT 631 | |
46 | ||
47 | /* | |
48 | * Common limits... | |
49 | */ | |
50 | ||
5a9febac MS |
51 | # define IPP_MAX_CHARSET 64 /* Maximum length of charset values w/nul */ |
52 | # define IPP_MAX_KEYWORD 256 /* Maximum length of keyword values w/nul */ | |
53 | # define IPP_MAX_LANGUAGE 64 /* Maximum length of naturalLanguage values w/nul */ | |
a41f09e2 | 54 | # define IPP_MAX_LENGTH 32767 /* Maximum size of any single value */ |
5a9febac MS |
55 | # define IPP_MAX_MIMETYPE 256 /* Maximum length of mimeMediaType values w/nul */ |
56 | # define IPP_MAX_NAME 256 /* Maximum length of common name values w/nul */ | |
57 | # define IPP_MAX_OCTETSTRING 1023 /* Maximum length of octetString values w/o nul */ | |
58 | # define IPP_MAX_TEXT 1024 /* Maximum length of text values w/nul */ | |
59 | # define IPP_MAX_URI 1024 /* Maximum length of uri values w/nul */ | |
60 | # define IPP_MAX_URISCHEME 64 /* Maximum length of uriScheme values w/nul */ | |
ef416fc2 | 61 | # define IPP_MAX_VALUES 8 /* Power-of-2 allocation increment */ |
62 | ||
7e86f2f6 MS |
63 | /* |
64 | * Macro to flag a text string attribute as "const" (static storage) vs. | |
65 | * allocated. | |
66 | */ | |
67 | ||
68 | # define IPP_CONST_TAG(x) (ipp_tag_t)(IPP_TAG_CUPS_CONST | (x)) | |
69 | ||
ef416fc2 | 70 | |
71 | /* | |
72 | * Types and structures... | |
73 | */ | |
74 | ||
718ee2ff | 75 | typedef enum ipp_dstate_e /**** Document states @exclude all@ ****/ |
ef416fc2 | 76 | { |
95f319b9 MS |
77 | IPP_DSTATE_PENDING = 3, /* Document is pending */ |
78 | IPP_DSTATE_PROCESSING = 5, /* Document is processing */ | |
79 | IPP_DSTATE_CANCELED = 7, /* Document is canceled */ | |
80 | IPP_DSTATE_ABORTED, /* Document is aborted */ | |
81 | IPP_DSTATE_COMPLETED /* Document is completed */ | |
a469f8a5 MS |
82 | |
83 | # ifndef _CUPS_NO_DEPRECATED | |
84 | # define IPP_DOCUMENT_PENDING IPP_DSTATE_PENDING | |
85 | # define IPP_DOCUMENT_PROCESSING IPP_DSTATE_PROCESSING | |
86 | # define IPP_DOCUMENT_CANCELED IPP_DSTATE_CANCELED | |
87 | # define IPP_DOCUMENT_ABORTED IPP_DSTATE_ABORTED | |
88 | # define IPP_DOCUMENT_COMPLETED IPP_DSTATE_COMPLETED | |
89 | # endif /* !_CUPS_NO_DEPRECATED */ | |
a2326b5b | 90 | } ipp_dstate_t; |
ef416fc2 | 91 | |
718ee2ff | 92 | typedef enum ipp_finishings_e /**** Finishings values ****/ |
ef416fc2 | 93 | { |
ecdc0628 | 94 | IPP_FINISHINGS_NONE = 3, /* No finishing */ |
718ee2ff | 95 | IPP_FINISHINGS_STAPLE, /* Staple (any location/method) */ |
ecdc0628 | 96 | IPP_FINISHINGS_PUNCH, /* Punch (any location/count) */ |
97 | IPP_FINISHINGS_COVER, /* Add cover */ | |
98 | IPP_FINISHINGS_BIND, /* Bind */ | |
99 | IPP_FINISHINGS_SADDLE_STITCH, /* Staple interior */ | |
100 | IPP_FINISHINGS_EDGE_STITCH, /* Stitch along any side */ | |
101 | IPP_FINISHINGS_FOLD, /* Fold (any type) */ | |
102 | IPP_FINISHINGS_TRIM, /* Trim (any type) */ | |
103 | IPP_FINISHINGS_BALE, /* Bale (any type) */ | |
104 | IPP_FINISHINGS_BOOKLET_MAKER, /* Fold to make booklet */ | |
6961465f | 105 | IPP_FINISHINGS_JOG_OFFSET, /* Offset for binding (any type) */ |
cd3614ae MS |
106 | IPP_FINISHINGS_COAT, /* Apply protective liquid or powder coating */ |
107 | IPP_FINISHINGS_LAMINATE, /* Apply protective (solid) material */ | |
ecdc0628 | 108 | IPP_FINISHINGS_STAPLE_TOP_LEFT = 20, /* Staple top left corner */ |
109 | IPP_FINISHINGS_STAPLE_BOTTOM_LEFT, /* Staple bottom left corner */ | |
110 | IPP_FINISHINGS_STAPLE_TOP_RIGHT, /* Staple top right corner */ | |
111 | IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT, /* Staple bottom right corner */ | |
112 | IPP_FINISHINGS_EDGE_STITCH_LEFT, /* Stitch along left side */ | |
113 | IPP_FINISHINGS_EDGE_STITCH_TOP, /* Stitch along top edge */ | |
114 | IPP_FINISHINGS_EDGE_STITCH_RIGHT, /* Stitch along right side */ | |
115 | IPP_FINISHINGS_EDGE_STITCH_BOTTOM, /* Stitch along bottom edge */ | |
116 | IPP_FINISHINGS_STAPLE_DUAL_LEFT, /* Two staples on left */ | |
117 | IPP_FINISHINGS_STAPLE_DUAL_TOP, /* Two staples on top */ | |
118 | IPP_FINISHINGS_STAPLE_DUAL_RIGHT, /* Two staples on right */ | |
119 | IPP_FINISHINGS_STAPLE_DUAL_BOTTOM, /* Two staples on bottom */ | |
cd3614ae MS |
120 | IPP_FINISHINGS_STAPLE_TRIPLE_LEFT, /* Three staples on left */ |
121 | IPP_FINISHINGS_STAPLE_TRIPLE_TOP, /* Three staples on top */ | |
122 | IPP_FINISHINGS_STAPLE_TRIPLE_RIGHT, /* Three staples on right */ | |
123 | IPP_FINISHINGS_STAPLE_TRIPLE_BOTTOM, /* Three staples on bottom */ | |
ecdc0628 | 124 | IPP_FINISHINGS_BIND_LEFT = 50, /* Bind on left */ |
125 | IPP_FINISHINGS_BIND_TOP, /* Bind on top */ | |
126 | IPP_FINISHINGS_BIND_RIGHT, /* Bind on right */ | |
a2326b5b MS |
127 | IPP_FINISHINGS_BIND_BOTTOM, /* Bind on bottom */ |
128 | IPP_FINISHINGS_TRIM_AFTER_PAGES = 60, /* Trim output after each page */ | |
129 | IPP_FINISHINGS_TRIM_AFTER_DOCUMENTS, /* Trim output after each document */ | |
130 | IPP_FINISHINGS_TRIM_AFTER_COPIES, /* Trim output after each copy */ | |
a469f8a5 | 131 | IPP_FINISHINGS_TRIM_AFTER_JOB, /* Trim output after job */ |
9475ec92 MS |
132 | IPP_FINISHINGS_PUNCH_TOP_LEFT = 70, /* Punch 1 hole top left */ |
133 | IPP_FINISHINGS_PUNCH_BOTTOM_LEFT, /* Punch 1 hole bottom left */ | |
134 | IPP_FINISHINGS_PUNCH_TOP_RIGHT, /* Punch 1 hole top right */ | |
135 | IPP_FINISHINGS_PUNCH_BOTTOM_RIGHT, /* Punch 1 hole bottom right */ | |
136 | IPP_FINISHINGS_PUNCH_DUAL_LEFT, /* Punch 2 holes left side */ | |
137 | IPP_FINISHINGS_PUNCH_DUAL_TOP, /* Punch 2 holes top edge */ | |
138 | IPP_FINISHINGS_PUNCH_DUAL_RIGHT, /* Punch 2 holes right side */ | |
139 | IPP_FINISHINGS_PUNCH_DUAL_BOTTOM, /* Punch 2 holes bottom edge */ | |
140 | IPP_FINISHINGS_PUNCH_TRIPLE_LEFT, /* Punch 3 holes left side */ | |
141 | IPP_FINISHINGS_PUNCH_TRIPLE_TOP, /* Punch 3 holes top edge */ | |
142 | IPP_FINISHINGS_PUNCH_TRIPLE_RIGHT, /* Punch 3 holes right side */ | |
143 | IPP_FINISHINGS_PUNCH_TRIPLE_BOTTOM, /* Punch 3 holes bottom edge */ | |
144 | IPP_FINISHINGS_PUNCH_QUAD_LEFT, /* Punch 4 holes left side */ | |
145 | IPP_FINISHINGS_PUNCH_QUAD_TOP, /* Punch 4 holes top edge */ | |
146 | IPP_FINISHINGS_PUNCH_QUAD_RIGHT, /* Punch 4 holes right side */ | |
147 | IPP_FINISHINGS_PUNCH_QUAD_BOTTOM, /* Punch 4 holes bottom edge */ | |
2a8afc20 MS |
148 | IPP_FINISHINGS_PUNCH_MULTIPLE_LEFT, /* Pucnh multiple holes left side */ |
149 | IPP_FINISHINGS_PUNCH_MULTIPLE_TOP, /* Pucnh multiple holes top edge */ | |
150 | IPP_FINISHINGS_PUNCH_MULTIPLE_RIGHT, /* Pucnh multiple holes right side */ | |
151 | IPP_FINISHINGS_PUNCH_MULTIPLE_BOTTOM, /* Pucnh multiple holes bottom edge */ | |
9475ec92 MS |
152 | IPP_FINISHINGS_FOLD_ACCORDIAN = 90, /* Accordian-fold the paper vertically into four sections */ |
153 | IPP_FINISHINGS_FOLD_DOUBLE_GATE, /* Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically */ | |
154 | IPP_FINISHINGS_FOLD_GATE, /* Fold the top and bottom quarters of the paper towards the midline */ | |
155 | IPP_FINISHINGS_FOLD_HALF, /* Fold the paper in half vertically */ | |
156 | IPP_FINISHINGS_FOLD_HALF_Z, /* Fold the paper in half horizontally, then Z-fold the paper vertically */ | |
157 | IPP_FINISHINGS_FOLD_LEFT_GATE, /* Fold the top quarter of the paper towards the midline */ | |
158 | IPP_FINISHINGS_FOLD_LETTER, /* Fold the paper into three sections vertically; sometimes also known as a C fold*/ | |
159 | IPP_FINISHINGS_FOLD_PARALLEL, /* Fold the paper in half vertically two times, yielding four sections */ | |
160 | IPP_FINISHINGS_FOLD_POSTER, /* Fold the paper in half horizontally and vertically; sometimes also called a cross fold */ | |
161 | IPP_FINISHINGS_FOLD_RIGHT_GATE, /* Fold the bottom quarter of the paper towards the midline */ | |
162 | IPP_FINISHINGS_FOLD_Z, /* Fold the paper vertically into three sections, forming a Z */ | |
2a8afc20 | 163 | IPP_FINISHINGS_FOLD_ENGINEERING_Z, /* Fold the paper vertically into two small sections and one larger, forming an elongated Z */ |
a469f8a5 | 164 | |
9475ec92 | 165 | /* CUPS extensions for finishings (pre-standard versions of values above) */ |
a469f8a5 | 166 | IPP_FINISHINGS_CUPS_PUNCH_TOP_LEFT = 0x40000046, |
718ee2ff MS |
167 | /* Punch 1 hole top left @exclude all@ */ |
168 | IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_LEFT,/* Punch 1 hole bottom left @exclude all@ */ | |
169 | IPP_FINISHINGS_CUPS_PUNCH_TOP_RIGHT, /* Punch 1 hole top right @exclude all@ */ | |
a469f8a5 | 170 | IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_RIGHT, |
718ee2ff MS |
171 | /* Punch 1 hole bottom right @exclude all@ */ |
172 | IPP_FINISHINGS_CUPS_PUNCH_DUAL_LEFT, /* Punch 2 holes left side @exclude all@ */ | |
173 | IPP_FINISHINGS_CUPS_PUNCH_DUAL_TOP, /* Punch 2 holes top edge @exclude all@ */ | |
174 | IPP_FINISHINGS_CUPS_PUNCH_DUAL_RIGHT, /* Punch 2 holes right side @exclude all@ */ | |
175 | IPP_FINISHINGS_CUPS_PUNCH_DUAL_BOTTOM,/* Punch 2 holes bottom edge @exclude all@ */ | |
176 | IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_LEFT,/* Punch 3 holes left side @exclude all@ */ | |
177 | IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_TOP, /* Punch 3 holes top edge @exclude all@ */ | |
a469f8a5 | 178 | IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_RIGHT, |
718ee2ff | 179 | /* Punch 3 holes right side @exclude all@ */ |
a469f8a5 | 180 | IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_BOTTOM, |
718ee2ff MS |
181 | /* Punch 3 holes bottom edge @exclude all@ */ |
182 | IPP_FINISHINGS_CUPS_PUNCH_QUAD_LEFT, /* Punch 4 holes left side @exclude all@ */ | |
183 | IPP_FINISHINGS_CUPS_PUNCH_QUAD_TOP, /* Punch 4 holes top edge @exclude all@ */ | |
184 | IPP_FINISHINGS_CUPS_PUNCH_QUAD_RIGHT, /* Punch 4 holes right side @exclude all@ */ | |
185 | IPP_FINISHINGS_CUPS_PUNCH_QUAD_BOTTOM,/* Punch 4 holes bottom edge @exclude all@ */ | |
6961465f MS |
186 | |
187 | IPP_FINISHINGS_CUPS_FOLD_ACCORDIAN = 0x4000005A, | |
718ee2ff MS |
188 | /* Accordian-fold the paper vertically into four sections @exclude all@ */ |
189 | IPP_FINISHINGS_CUPS_FOLD_DOUBLE_GATE, /* Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically @exclude all@ */ | |
190 | IPP_FINISHINGS_CUPS_FOLD_GATE, /* Fold the top and bottom quarters of the paper towards the midline @exclude all@ */ | |
191 | IPP_FINISHINGS_CUPS_FOLD_HALF, /* Fold the paper in half vertically @exclude all@ */ | |
192 | IPP_FINISHINGS_CUPS_FOLD_HALF_Z, /* Fold the paper in half horizontally, then Z-fold the paper vertically @exclude all@ */ | |
193 | IPP_FINISHINGS_CUPS_FOLD_LEFT_GATE, /* Fold the top quarter of the paper towards the midline @exclude all@ */ | |
194 | IPP_FINISHINGS_CUPS_FOLD_LETTER, /* Fold the paper into three sections vertically; sometimes also known as a C fold @exclude all@ */ | |
195 | IPP_FINISHINGS_CUPS_FOLD_PARALLEL, /* Fold the paper in half vertically two times, yielding four sections @exclude all@ */ | |
196 | IPP_FINISHINGS_CUPS_FOLD_POSTER, /* Fold the paper in half horizontally and vertically; sometimes also called a cross fold @exclude all@ */ | |
197 | IPP_FINISHINGS_CUPS_FOLD_RIGHT_GATE, /* Fold the bottom quarter of the paper towards the midline @exclude all@ */ | |
198 | IPP_FINISHINGS_CUPS_FOLD_Z /* Fold the paper vertically into three sections, forming a Z @exclude all@ */ | |
a469f8a5 MS |
199 | } ipp_finishings_t; |
200 | # ifndef _CUPS_NO_DEPRECATED | |
6961465f MS |
201 | # define IPP_FINISHINGS_JOB_OFFSET IPP_FINISHINGS_JOG_OFFSET |
202 | /* Long-time misspelling... */ | |
a469f8a5 MS |
203 | typedef enum ipp_finishings_e ipp_finish_t; |
204 | # endif /* !_CUPS_NO_DEPRECATED */ | |
ef416fc2 | 205 | |
78ac829c | 206 | typedef enum ipp_jcollate_e /**** Job collation types @deprecated@ @exclude all@ ****/ |
ef416fc2 | 207 | { |
a469f8a5 MS |
208 | IPP_JCOLLATE_UNCOLLATED_SHEETS = 3, |
209 | IPP_JCOLLATE_COLLATED_DOCUMENTS, | |
210 | IPP_JCOLLATE_UNCOLLATED_DOCUMENTS | |
211 | ||
212 | # ifndef _CUPS_NO_DEPRECATED | |
213 | # define IPP_JOB_UNCOLLATED_SHEETS IPP_JCOLLATE_UNCOLLATED_SHEETS | |
214 | # define IPP_JOB_COLLATED_DOCUMENTS IPP_JCOLLATE_COLLATED_DOCUMENTS | |
215 | # define IPP_JOB_UNCOLLATED_DOCUMENTS IPP_JCOLLATE_UNCOLLATED_DOCUMENTS | |
216 | # endif /* !_CUPS_NO_DEPRECATED */ | |
a2326b5b | 217 | } ipp_jcollate_t; |
ef416fc2 | 218 | |
5a6b583a | 219 | typedef enum ipp_jstate_e /**** Job states ****/ |
ef416fc2 | 220 | { |
a469f8a5 MS |
221 | IPP_JSTATE_PENDING = 3, /* Job is waiting to be printed */ |
222 | IPP_JSTATE_HELD, /* Job is held for printing */ | |
223 | IPP_JSTATE_PROCESSING, /* Job is currently printing */ | |
224 | IPP_JSTATE_STOPPED, /* Job has been stopped */ | |
225 | IPP_JSTATE_CANCELED, /* Job has been canceled */ | |
226 | IPP_JSTATE_ABORTED, /* Job has aborted due to error */ | |
227 | IPP_JSTATE_COMPLETED /* Job has completed successfully */ | |
228 | ||
229 | # ifndef _CUPS_NO_DEPRECATED | |
230 | # define IPP_JOB_PENDING IPP_JSTATE_PENDING | |
231 | # define IPP_JOB_HELD IPP_JSTATE_HELD | |
232 | # define IPP_JOB_PROCESSING IPP_JSTATE_PROCESSING | |
233 | # define IPP_JOB_STOPPED IPP_JSTATE_STOPPED | |
234 | # define IPP_JOB_CANCELED IPP_JSTATE_CANCELED | |
235 | # define IPP_JOB_ABORTED IPP_JSTATE_ABORTED | |
236 | # define IPP_JOB_COMPLETED IPP_JSTATE_COMPLETED | |
a2326b5b | 237 | /* Legacy name for canceled state */ |
a469f8a5 MS |
238 | # define IPP_JOB_CANCELLED IPP_JSTATE_CANCELED |
239 | # endif /* !_CUPS_NO_DEPRECATED */ | |
a2326b5b | 240 | } ipp_jstate_t; |
ef416fc2 | 241 | |
5a6b583a | 242 | typedef enum ipp_op_e /**** IPP operations ****/ |
ef416fc2 | 243 | { |
dcb445bc | 244 | IPP_OP_CUPS_INVALID = -1, /* Invalid operation name for @link ippOpValue@ */ |
a469f8a5 | 245 | IPP_OP_CUPS_NONE = 0, /* No operation @private@ */ |
78ac829c MS |
246 | IPP_OP_PRINT_JOB = 0x0002, /* Print-Job: Print a single file */ |
247 | IPP_OP_PRINT_URI, /* Print-URI: Print a single URL @exclude all@ */ | |
248 | IPP_OP_VALIDATE_JOB, /* Validate-Job: Validate job values prior to submission */ | |
249 | IPP_OP_CREATE_JOB, /* Create-Job: Create an empty print job */ | |
250 | IPP_OP_SEND_DOCUMENT, /* Send-Document: Add a file to a job */ | |
251 | IPP_OP_SEND_URI, /* Send-URI: Add a URL to a job @exclude all@ */ | |
252 | IPP_OP_CANCEL_JOB, /* Cancel-Job: Cancel a job */ | |
253 | IPP_OP_GET_JOB_ATTRIBUTES, /* Get-Job-Attribute: Get information about a job */ | |
254 | IPP_OP_GET_JOBS, /* Get-Jobs: Get a list of jobs */ | |
255 | IPP_OP_GET_PRINTER_ATTRIBUTES, /* Get-Printer-Attributes: Get information about a printer */ | |
256 | IPP_OP_HOLD_JOB, /* Hold-Job: Hold a job for printing */ | |
257 | IPP_OP_RELEASE_JOB, /* Release-Job: Release a job for printing */ | |
258 | IPP_OP_RESTART_JOB, /* Restart-Job: Reprint a job @deprecated@ */ | |
259 | IPP_OP_PAUSE_PRINTER = 0x0010, /* Pause-Printer: Stop a printer */ | |
260 | IPP_OP_RESUME_PRINTER, /* Resume-Printer: Start a printer */ | |
261 | IPP_OP_PURGE_JOBS, /* Purge-Jobs: Delete all jobs @deprecated@ @exclude all@ */ | |
262 | IPP_OP_SET_PRINTER_ATTRIBUTES, /* Set-Printer-Attributes: Set printer values */ | |
263 | IPP_OP_SET_JOB_ATTRIBUTES, /* Set-Job-Attributes: Set job values */ | |
264 | IPP_OP_GET_PRINTER_SUPPORTED_VALUES, /* Get-Printer-Supported-Values: Get supported values */ | |
265 | IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS, /* Create-Printer-Subscriptions: Create one or more printer subscriptions @since CUPS 1.2/macOS 10.5@ */ | |
266 | IPP_OP_CREATE_JOB_SUBSCRIPTIONS, /* Create-Job-Subscriptions: Create one of more job subscriptions @since CUPS 1.2/macOS 10.5@ */ | |
267 | IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES, /* Get-Subscription-Attributes: Get subscription information @since CUPS 1.2/macOS 10.5@ */ | |
268 | IPP_OP_GET_SUBSCRIPTIONS, /* Get-Subscriptions: Get list of subscriptions @since CUPS 1.2/macOS 10.5@ */ | |
269 | IPP_OP_RENEW_SUBSCRIPTION, /* Renew-Subscription: Renew a printer subscription @since CUPS 1.2/macOS 10.5@ */ | |
270 | IPP_OP_CANCEL_SUBSCRIPTION, /* Cancel-Subscription: Cancel a subscription @since CUPS 1.2/macOS 10.5@ */ | |
271 | IPP_OP_GET_NOTIFICATIONS, /* Get-Notifications: Get notification events @since CUPS 1.2/macOS 10.5@ */ | |
272 | IPP_OP_SEND_NOTIFICATIONS, /* Send-Notifications: Send notification events @private@ */ | |
273 | IPP_OP_GET_RESOURCE_ATTRIBUTES, /* Get-Resource-Attributes: Get resource information @private@ */ | |
65bebeac | 274 | IPP_OP_GET_RESOURCE_DATA, /* Get-Resource-Data: Get resource data @private@ @deprecated@ */ |
78ac829c MS |
275 | IPP_OP_GET_RESOURCES, /* Get-Resources: Get list of resources @private@ */ |
276 | IPP_OP_GET_PRINT_SUPPORT_FILES, /* Get-Printer-Support-Files: Get printer support files @private@ */ | |
277 | IPP_OP_ENABLE_PRINTER, /* Enable-Printer: Accept new jobs for a printer */ | |
278 | IPP_OP_DISABLE_PRINTER, /* Disable-Printer: Reject new jobs for a printer */ | |
a469f8a5 | 279 | IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB, |
78ac829c MS |
280 | /* Pause-Printer-After-Current-Job: Stop printer after the current job */ |
281 | IPP_OP_HOLD_NEW_JOBS, /* Hold-New-Jobs: Hold new jobs */ | |
282 | IPP_OP_RELEASE_HELD_NEW_JOBS, /* Release-Held-New-Jobs: Release new jobs that were previously held */ | |
283 | IPP_OP_DEACTIVATE_PRINTER, /* Deactivate-Printer: Stop a printer and do not accept jobs @deprecated@ @exclude all@ */ | |
284 | IPP_OP_ACTIVATE_PRINTER, /* Activate-Printer: Start a printer and accept jobs @deprecated@ @exclude all@ */ | |
285 | IPP_OP_RESTART_PRINTER, /* Restart-Printer: Restart a printer @exclude all@ */ | |
286 | IPP_OP_SHUTDOWN_PRINTER, /* Shutdown-Printer: Turn a printer off @exclude all@ */ | |
287 | IPP_OP_STARTUP_PRINTER, /* Startup-Printer: Turn a printer on @exclude all@ */ | |
288 | IPP_OP_REPROCESS_JOB, /* Reprocess-Job: Reprint a job @deprecated@ @exclude all@*/ | |
289 | IPP_OP_CANCEL_CURRENT_JOB, /* Cancel-Current-Job: Cancel the current job */ | |
290 | IPP_OP_SUSPEND_CURRENT_JOB, /* Suspend-Current-Job: Suspend the current job */ | |
291 | IPP_OP_RESUME_JOB, /* Resume-Job: Resume the current job */ | |
292 | IPP_OP_PROMOTE_JOB, /* Promote-Job: Promote a job to print sooner */ | |
293 | IPP_OP_SCHEDULE_JOB_AFTER, /* Schedule-Job-After: Schedule a job to print after another */ | |
294 | IPP_OP_CANCEL_DOCUMENT = 0x0033, /* Cancel-Document: Cancel a document @exclude all@ */ | |
295 | IPP_OP_GET_DOCUMENT_ATTRIBUTES, /* Get-Document-Attributes: Get document information @exclude all@ */ | |
296 | IPP_OP_GET_DOCUMENTS, /* Get-Documents: Get a list of documents in a job @exclude all@ */ | |
297 | IPP_OP_DELETE_DOCUMENT, /* Delete-Document: Delete a document @deprecated@ @exclude all@ */ | |
298 | IPP_OP_SET_DOCUMENT_ATTRIBUTES, /* Set-Document-Attributes: Set document values @exclude all@ */ | |
299 | IPP_OP_CANCEL_JOBS, /* Cancel-Jobs: Cancel all jobs (administrative) */ | |
300 | IPP_OP_CANCEL_MY_JOBS, /* Cancel-My-Jobs: Cancel a user's jobs */ | |
301 | IPP_OP_RESUBMIT_JOB, /* Resubmit-Job: Copy and reprint a job @exclude all@ */ | |
302 | IPP_OP_CLOSE_JOB, /* Close-Job: Close a job and start printing */ | |
303 | IPP_OP_IDENTIFY_PRINTER, /* Identify-Printer: Make the printer beep, flash, or display a message for identification */ | |
304 | IPP_OP_VALIDATE_DOCUMENT, /* Validate-Document: Validate document values prior to submission @exclude all@ */ | |
305 | IPP_OP_ADD_DOCUMENT_IMAGES, /* Add-Document-Images: Add image(s) from the specified scanner source @exclude all@ */ | |
306 | IPP_OP_ACKNOWLEDGE_DOCUMENT, /* Acknowledge-Document: Acknowledge processing of a document @exclude all@ */ | |
307 | IPP_OP_ACKNOWLEDGE_IDENTIFY_PRINTER, /* Acknowledge-Identify-Printer: Acknowledge action on an Identify-Printer request @exclude all@ */ | |
308 | IPP_OP_ACKNOWLEDGE_JOB, /* Acknowledge-Job: Acknowledge processing of a job @exclude all@ */ | |
309 | IPP_OP_FETCH_DOCUMENT, /* Fetch-Document: Fetch a document for processing @exclude all@ */ | |
310 | IPP_OP_FETCH_JOB, /* Fetch-Job: Fetch a job for processing @exclude all@ */ | |
311 | IPP_OP_GET_OUTPUT_DEVICE_ATTRIBUTES, /* Get-Output-Device-Attributes: Get printer information for a specific output device @exclude all@ */ | |
312 | IPP_OP_UPDATE_ACTIVE_JOBS, /* Update-Active-Jobs: Update the list of active jobs that a proxy has processed @exclude all@ */ | |
313 | IPP_OP_DEREGISTER_OUTPUT_DEVICE, /* Deregister-Output-Device: Remove an output device @exclude all@ */ | |
314 | IPP_OP_UPDATE_DOCUMENT_STATUS, /* Update-Document-Status: Update document values @exclude all@ */ | |
315 | IPP_OP_UPDATE_JOB_STATUS, /* Update-Job-Status: Update job values @exclude all@ */ | |
9b4bd602 | 316 | IPP_OP_UPDATE_OUTPUT_DEVICE_ATTRIBUTES, |
78ac829c MS |
317 | /* Update-Output-Device-Attributes: Update output device values @exclude all@ */ |
318 | IPP_OP_GET_NEXT_DOCUMENT_DATA, /* Get-Next-Document-Data: Scan more document data @exclude all@ */ | |
054eee9c MS |
319 | IPP_OP_ALLOCATE_PRINTER_RESOURCES, /* Allocate-Printer-Resources: Use resources for a printer. */ |
320 | IPP_OP_CREATE_PRINTER, /* Create-Printer: Create a new service. */ | |
321 | IPP_OP_DEALLOCATE_PRINTER_RESOURCES, /* Deallocate-Printer-Resources: Stop using resources for a printer. */ | |
322 | IPP_OP_DELETE_PRINTER, /* Delete-Printer: Delete an existing service. */ | |
323 | IPP_OP_GET_PRINTERS, /* Get-Printers: Get a list of services. */ | |
324 | IPP_OP_SHUTDOWN_ONE_PRINTER, /* Shutdown-One-Printer: Shutdown a service. */ | |
325 | IPP_OP_STARTUP_ONE_PRINTER, /* Startup-One-Printer: Start a service. */ | |
326 | IPP_OP_CANCEL_RESOURCE, /* Cancel-Resource: Uninstall a resource. */ | |
327 | IPP_OP_CREATE_RESOURCE, /* Create-Resource: Create a new (empty) resource. */ | |
328 | IPP_OP_INSTALL_RESOURCE, /* Install-Resource: Install a resource. */ | |
329 | IPP_OP_SEND_RESOURCE_DATA, /* Send-Resource-Data: Upload the data for a resource. */ | |
330 | IPP_OP_SET_RESOURCE_ATTRIBUTES, /* Set-Resource-Attributes: Set resource object attributes. */ | |
331 | IPP_OP_CREATE_RESOURCE_SUBSCRIPTIONS, /* Create-Resource-Subscriptions: Create event subscriptions for a resource. */ | |
332 | IPP_OP_CREATE_SYSTEM_SUBSCRIPTIONS, /* Create-System-Subscriptions: Create event subscriptions for a system. */ | |
333 | IPP_OP_DISABLE_ALL_PRINTERS, /* Disable-All-Printers: Stop accepting new jobs on all services. */ | |
334 | IPP_OP_ENABLE_ALL_PRINTERS, /* Enable-All-Printers: Start accepting new jobs on all services. */ | |
335 | IPP_OP_GET_SYSTEM_ATTRIBUTES, /* Get-System-Attributes: Get system object attributes. */ | |
336 | IPP_OP_GET_SYSTEM_SUPPORTED_VALUES, /* Get-System-Supported-Values: Get supported values for system object attributes. */ | |
337 | IPP_OP_PAUSE_ALL_PRINTERS, /* Pause-All-Printers: Stop all services immediately. */ | |
338 | IPP_OP_PAUSE_ALL_PRINTERS_AFTER_CURRENT_JOB, | |
339 | /* Pause-All-Printers-After-Current-Job: Stop all services after processing the current jobs. */ | |
340 | IPP_OP_REGISTER_OUTPUT_DEVICE, /* Register-Output-Device: Register a remote service. */ | |
341 | IPP_OP_RESTART_SYSTEM, /* Restart-System: Restart all services. */ | |
342 | IPP_OP_RESUME_ALL_PRINTERS, /* Resume-All-Printers: Start job processing on all services. */ | |
343 | IPP_OP_SET_SYSTEM_ATTRIBUTES, /* Set-System-Attributes: Set system object attributes. */ | |
344 | IPP_OP_SHUTDOWN_ALL_PRINTERS, /* Shutdown-All-Printers: Shutdown all services. */ | |
345 | IPP_OP_STARTUP_ALL_PRINTERS, /* Startup-All-Printers: Startup all services. */ | |
9475ec92 | 346 | |
a469f8a5 | 347 | IPP_OP_PRIVATE = 0x4000, /* Reserved @private@ */ |
78ac829c MS |
348 | IPP_OP_CUPS_GET_DEFAULT, /* CUPS-Get-Default: Get the default printer */ |
349 | IPP_OP_CUPS_GET_PRINTERS, /* CUPS-Get-Printers: Get a list of printers and/or classes */ | |
350 | IPP_OP_CUPS_ADD_MODIFY_PRINTER, /* CUPS-Add-Modify-Printer: Add or modify a printer */ | |
351 | IPP_OP_CUPS_DELETE_PRINTER, /* CUPS-Delete-Printer: Delete a printer */ | |
352 | IPP_OP_CUPS_GET_CLASSES, /* CUPS-Get-Classes: Get a list of classes @deprecated@ @exclude all@ */ | |
353 | IPP_OP_CUPS_ADD_MODIFY_CLASS, /* CUPS-Add-Modify-Class: Add or modify a class */ | |
354 | IPP_OP_CUPS_DELETE_CLASS, /* CUPS-Delete-Class: Delete a class */ | |
355 | IPP_OP_CUPS_ACCEPT_JOBS, /* CUPS-Accept-Jobs: Accept new jobs on a printer @exclude all@ */ | |
356 | IPP_OP_CUPS_REJECT_JOBS, /* CUPS-Reject-Jobs: Reject new jobs on a printer @exclude all@ */ | |
357 | IPP_OP_CUPS_SET_DEFAULT, /* CUPS-Set-Default: Set the default printer */ | |
358 | IPP_OP_CUPS_GET_DEVICES, /* CUPS-Get-Devices: Get a list of supported devices @deprecated@ */ | |
359 | IPP_OP_CUPS_GET_PPDS, /* CUPS-Get-PPDs: Get a list of supported drivers @deprecated@ */ | |
360 | IPP_OP_CUPS_MOVE_JOB, /* CUPS-Move-Job: Move a job to a different printer */ | |
361 | IPP_OP_CUPS_AUTHENTICATE_JOB, /* CUPS-Authenticate-Job: Authenticate a job @since CUPS 1.2/macOS 10.5@ */ | |
362 | IPP_OP_CUPS_GET_PPD, /* CUPS-Get-PPD: Get a PPD file @deprecated@ */ | |
363 | IPP_OP_CUPS_GET_DOCUMENT = 0x4027, /* CUPS-Get-Document: Get a document file @since CUPS 1.4/macOS 10.6@ */ | |
364 | IPP_OP_CUPS_CREATE_LOCAL_PRINTER /* CUPS-Create-Local-Printer: Create a local (temporary) printer @since CUPS 2.2@ */ | |
a469f8a5 MS |
365 | |
366 | # ifndef _CUPS_NO_DEPRECATED | |
367 | # define IPP_PRINT_JOB IPP_OP_PRINT_JOB | |
368 | # define IPP_PRINT_URI IPP_OP_PRINT_URI | |
369 | # define IPP_VALIDATE_JOB IPP_OP_VALIDATE_JOB | |
370 | # define IPP_CREATE_JOB IPP_OP_CREATE_JOB | |
371 | # define IPP_SEND_DOCUMENT IPP_OP_SEND_DOCUMENT | |
372 | # define IPP_SEND_URI IPP_OP_SEND_URI | |
373 | # define IPP_CANCEL_JOB IPP_OP_CANCEL_JOB | |
374 | # define IPP_GET_JOB_ATTRIBUTES IPP_OP_GET_JOB_ATTRIBUTES | |
375 | # define IPP_GET_JOBS IPP_OP_GET_JOBS | |
376 | # define IPP_GET_PRINTER_ATTRIBUTES IPP_OP_GET_PRINTER_ATTRIBUTES | |
377 | # define IPP_HOLD_JOB IPP_OP_HOLD_JOB | |
378 | # define IPP_RELEASE_JOB IPP_OP_RELEASE_JOB | |
379 | # define IPP_RESTART_JOB IPP_OP_RESTART_JOB | |
380 | # define IPP_PAUSE_PRINTER IPP_OP_PAUSE_PRINTER | |
381 | # define IPP_RESUME_PRINTER IPP_OP_RESUME_PRINTER | |
382 | # define IPP_PURGE_JOBS IPP_OP_PURGE_JOBS | |
383 | # define IPP_SET_PRINTER_ATTRIBUTES IPP_OP_SET_PRINTER_ATTRIBUTES | |
384 | # define IPP_SET_JOB_ATTRIBUTES IPP_OP_SET_JOB_ATTRIBUTES | |
385 | # define IPP_GET_PRINTER_SUPPORTED_VALUES IPP_OP_GET_PRINTER_SUPPORTED_VALUES | |
42404685 MS |
386 | # define IPP_CREATE_PRINTER_SUBSCRIPTION IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS |
387 | # define IPP_CREATE_JOB_SUBSCRIPTION IPP_OP_CREATE_JOB_SUBSCRIPTIONS | |
388 | # define IPP_OP_CREATE_PRINTER_SUBSCRIPTION IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS | |
78ac829c | 389 | # define IPP_OP_CREATE_JOB_SUBSCRIPTION IPP_OP_CREATE_JOB_SUBSCRIPTIONS |
a469f8a5 MS |
390 | # define IPP_GET_SUBSCRIPTION_ATTRIBUTES IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES |
391 | # define IPP_GET_SUBSCRIPTIONS IPP_OP_GET_SUBSCRIPTIONS | |
392 | # define IPP_RENEW_SUBSCRIPTION IPP_OP_RENEW_SUBSCRIPTION | |
393 | # define IPP_CANCEL_SUBSCRIPTION IPP_OP_CANCEL_SUBSCRIPTION | |
394 | # define IPP_GET_NOTIFICATIONS IPP_OP_GET_NOTIFICATIONS | |
395 | # define IPP_SEND_NOTIFICATIONS IPP_OP_SEND_NOTIFICATIONS | |
396 | # define IPP_GET_RESOURCE_ATTRIBUTES IPP_OP_GET_RESOURCE_ATTRIBUTES | |
397 | # define IPP_GET_RESOURCE_DATA IPP_OP_GET_RESOURCE_DATA | |
398 | # define IPP_GET_RESOURCES IPP_OP_GET_RESOURCES | |
399 | # define IPP_GET_PRINT_SUPPORT_FILES IPP_OP_GET_PRINT_SUPPORT_FILES | |
400 | # define IPP_ENABLE_PRINTER IPP_OP_ENABLE_PRINTER | |
401 | # define IPP_DISABLE_PRINTER IPP_OP_DISABLE_PRINTER | |
402 | # define IPP_PAUSE_PRINTER_AFTER_CURRENT_JOB IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB | |
403 | # define IPP_HOLD_NEW_JOBS IPP_OP_HOLD_NEW_JOBS | |
404 | # define IPP_RELEASE_HELD_NEW_JOBS IPP_OP_RELEASE_HELD_NEW_JOBS | |
405 | # define IPP_DEACTIVATE_PRINTER IPP_OP_DEACTIVATE_PRINTER | |
406 | # define IPP_ACTIVATE_PRINTER IPP_OP_ACTIVATE_PRINTER | |
407 | # define IPP_RESTART_PRINTER IPP_OP_RESTART_PRINTER | |
408 | # define IPP_SHUTDOWN_PRINTER IPP_OP_SHUTDOWN_PRINTER | |
409 | # define IPP_STARTUP_PRINTER IPP_OP_STARTUP_PRINTER | |
410 | # define IPP_REPROCESS_JOB IPP_OP_REPROCESS_JOB | |
411 | # define IPP_CANCEL_CURRENT_JOB IPP_OP_CANCEL_CURRENT_JOB | |
412 | # define IPP_SUSPEND_CURRENT_JOB IPP_OP_SUSPEND_CURRENT_JOB | |
413 | # define IPP_RESUME_JOB IPP_OP_RESUME_JOB | |
414 | # define IPP_PROMOTE_JOB IPP_OP_PROMOTE_JOB | |
415 | # define IPP_SCHEDULE_JOB_AFTER IPP_OP_SCHEDULE_JOB_AFTER | |
416 | # define IPP_CANCEL_DOCUMENT IPP_OP_CANCEL_DOCUMENT | |
417 | # define IPP_GET_DOCUMENT_ATTRIBUTES IPP_OP_GET_DOCUMENT_ATTRIBUTES | |
418 | # define IPP_GET_DOCUMENTS IPP_OP_GET_DOCUMENTS | |
419 | # define IPP_DELETE_DOCUMENT IPP_OP_DELETE_DOCUMENT | |
420 | # define IPP_SET_DOCUMENT_ATTRIBUTES IPP_OP_SET_DOCUMENT_ATTRIBUTES | |
421 | # define IPP_CANCEL_JOBS IPP_OP_CANCEL_JOBS | |
422 | # define IPP_CANCEL_MY_JOBS IPP_OP_CANCEL_MY_JOBS | |
423 | # define IPP_RESUBMIT_JOB IPP_OP_RESUBMIT_JOB | |
424 | # define IPP_CLOSE_JOB IPP_OP_CLOSE_JOB | |
425 | # define IPP_IDENTIFY_PRINTER IPP_OP_IDENTIFY_PRINTER | |
426 | # define IPP_VALIDATE_DOCUMENT IPP_OP_VALIDATE_DOCUMENT | |
e06e4eb5 | 427 | # define IPP_OP_SEND_HARDCOPY_DOCUMENT IPP_OP_ADD_DOCUMENT_IMAGES |
a469f8a5 MS |
428 | # define IPP_PRIVATE IPP_OP_PRIVATE |
429 | # define CUPS_GET_DEFAULT IPP_OP_CUPS_GET_DEFAULT | |
430 | # define CUPS_GET_PRINTERS IPP_OP_CUPS_GET_PRINTERS | |
431 | # define CUPS_ADD_MODIFY_PRINTER IPP_OP_CUPS_ADD_MODIFY_PRINTER | |
432 | # define CUPS_DELETE_PRINTER IPP_OP_CUPS_DELETE_PRINTER | |
433 | # define CUPS_GET_CLASSES IPP_OP_CUPS_GET_CLASSES | |
434 | # define CUPS_ADD_MODIFY_CLASS IPP_OP_CUPS_ADD_MODIFY_CLASS | |
435 | # define CUPS_DELETE_CLASS IPP_OP_CUPS_DELETE_CLASS | |
436 | # define CUPS_ACCEPT_JOBS IPP_OP_CUPS_ACCEPT_JOBS | |
437 | # define CUPS_REJECT_JOBS IPP_OP_CUPS_REJECT_JOBS | |
438 | # define CUPS_SET_DEFAULT IPP_OP_CUPS_SET_DEFAULT | |
439 | # define CUPS_GET_DEVICES IPP_OP_CUPS_GET_DEVICES | |
440 | # define CUPS_GET_PPDS IPP_OP_CUPS_GET_PPDS | |
441 | # define CUPS_MOVE_JOB IPP_OP_CUPS_MOVE_JOB | |
442 | # define CUPS_AUTHENTICATE_JOB IPP_OP_CUPS_AUTHENTICATE_JOB | |
443 | # define CUPS_GET_PPD IPP_OP_CUPS_GET_PPD | |
444 | # define CUPS_GET_DOCUMENT IPP_OP_CUPS_GET_DOCUMENT | |
445 | /* Legacy names */ | |
446 | # define CUPS_ADD_PRINTER IPP_OP_CUPS_ADD_MODIFY_PRINTER | |
447 | # define CUPS_ADD_CLASS IPP_OP_CUPS_ADD_MODIFY_CLASS | |
448 | # endif /* !_CUPS_NO_DEPRECATED */ | |
a2326b5b MS |
449 | } ipp_op_t; |
450 | ||
451 | typedef enum ipp_orient_e /**** Orientation values ****/ | |
452 | { | |
a469f8a5 MS |
453 | IPP_ORIENT_PORTRAIT = 3, /* No rotation */ |
454 | IPP_ORIENT_LANDSCAPE, /* 90 degrees counter-clockwise */ | |
455 | IPP_ORIENT_REVERSE_LANDSCAPE, /* 90 degrees clockwise */ | |
8f787fca MS |
456 | IPP_ORIENT_REVERSE_PORTRAIT, /* 180 degrees */ |
457 | IPP_ORIENT_NONE /* No rotation */ | |
a469f8a5 MS |
458 | |
459 | # ifndef _CUPS_NO_DEPRECATED | |
460 | # define IPP_PORTRAIT IPP_ORIENT_PORTRAIT | |
461 | # define IPP_LANDSCAPE IPP_ORIENT_LANDSCAPE | |
462 | # define IPP_REVERSE_LANDSCAPE IPP_ORIENT_REVERSE_LANDSCAPE | |
463 | # define IPP_REVERSE_PORTRAIT IPP_ORIENT_REVERSE_PORTRAIT | |
464 | # endif /* !_CUPS_NO_DEPRECATED */ | |
a2326b5b MS |
465 | } ipp_orient_t; |
466 | ||
65bebeac | 467 | typedef enum ipp_pstate_e /**** Printer state values ****/ |
a2326b5b | 468 | { |
a469f8a5 MS |
469 | IPP_PSTATE_IDLE = 3, /* Printer is idle */ |
470 | IPP_PSTATE_PROCESSING, /* Printer is working */ | |
471 | IPP_PSTATE_STOPPED /* Printer is stopped */ | |
472 | ||
473 | # ifndef _CUPS_NO_DEPRECATED | |
474 | # define IPP_PRINTER_IDLE IPP_PSTATE_IDLE | |
475 | # define IPP_PRINTER_PROCESSING IPP_PSTATE_PROCESSING | |
476 | # define IPP_PRINTER_STOPPED IPP_PSTATE_STOPPED | |
477 | # endif /* _CUPS_NO_DEPRECATED */ | |
a2326b5b MS |
478 | } ipp_pstate_t; |
479 | ||
65bebeac | 480 | typedef enum ipp_quality_e /**** Print quality values ****/ |
a2326b5b MS |
481 | { |
482 | IPP_QUALITY_DRAFT = 3, /* Draft quality */ | |
483 | IPP_QUALITY_NORMAL, /* Normal quality */ | |
484 | IPP_QUALITY_HIGH /* High quality */ | |
485 | } ipp_quality_t; | |
486 | ||
487 | typedef enum ipp_res_e /**** Resolution units ****/ | |
488 | { | |
489 | IPP_RES_PER_INCH = 3, /* Pixels per inch */ | |
490 | IPP_RES_PER_CM /* Pixels per centimeter */ | |
491 | } ipp_res_t; | |
492 | ||
17cc92f1 MS |
493 | typedef enum ipp_rstate_e /**** resource-state values ****/ |
494 | { | |
495 | IPP_RSTATE_PENDING = 3, /* Resource is created but has no data yet. */ | |
496 | IPP_RSTATE_AVAILABLE, /* Resource is available for installation. */ | |
497 | IPP_RSTATE_INSTALLED, /* Resource is installed. */ | |
498 | IPP_RSTATE_CANCELED, /* Resource has been canceled and is pending deletion. */ | |
499 | IPP_RSTATE_ABORTED /* Resource has been aborted and is pending deletion. */ | |
500 | } ipp_rstate_t; | |
501 | ||
502 | typedef enum ipp_sstate_e /**** system-state values ****/ | |
503 | { | |
504 | IPP_SSTATE_IDLE = 3, /* At least one printer is idle and none are processing a job. */ | |
505 | IPP_SSTATE_PROCESSING, /* At least one printer is processing a job. */ | |
506 | IPP_SSTATE_STOPPED /* All printers are stopped. */ | |
507 | } ipp_sstate_t; | |
508 | ||
65bebeac | 509 | typedef enum ipp_state_e /**** ipp_t state values ****/ |
a2326b5b | 510 | { |
a469f8a5 MS |
511 | IPP_STATE_ERROR = -1, /* An error occurred */ |
512 | IPP_STATE_IDLE, /* Nothing is happening/request completed */ | |
513 | IPP_STATE_HEADER, /* The request header needs to be sent/received */ | |
514 | IPP_STATE_ATTRIBUTE, /* One or more attributes need to be sent/received */ | |
515 | IPP_STATE_DATA /* IPP request data needs to be sent/received */ | |
516 | ||
517 | # ifndef _CUPS_NO_DEPRECATED | |
518 | # define IPP_ERROR IPP_STATE_ERROR | |
519 | # define IPP_IDLE IPP_STATE_IDLE | |
520 | # define IPP_HEADER IPP_STATE_HEADER | |
521 | # define IPP_ATTRIBUTE IPP_STATE_ATTRIBUTE | |
522 | # define IPP_DATA IPP_STATE_DATA | |
523 | # endif /* !_CUPS_NO_DEPRECATED */ | |
a2326b5b | 524 | } ipp_state_t; |
fa73b229 | 525 | |
65bebeac | 526 | typedef enum ipp_status_e /**** IPP status code values ****/ |
ef416fc2 | 527 | { |
dcb445bc | 528 | IPP_STATUS_CUPS_INVALID = -1, /* Invalid status name for @link ippErrorValue@ */ |
a469f8a5 MS |
529 | IPP_STATUS_OK = 0x0000, /* successful-ok */ |
530 | IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED, /* successful-ok-ignored-or-substituted-attributes */ | |
531 | IPP_STATUS_OK_CONFLICTING, /* successful-ok-conflicting-attributes */ | |
532 | IPP_STATUS_OK_IGNORED_SUBSCRIPTIONS, /* successful-ok-ignored-subscriptions */ | |
533 | IPP_STATUS_OK_IGNORED_NOTIFICATIONS, /* successful-ok-ignored-notifications @private@ */ | |
534 | IPP_STATUS_OK_TOO_MANY_EVENTS, /* successful-ok-too-many-events */ | |
535 | IPP_STATUS_OK_BUT_CANCEL_SUBSCRIPTION,/* successful-ok-but-cancel-subscription @private@ */ | |
536 | IPP_STATUS_OK_EVENTS_COMPLETE, /* successful-ok-events-complete */ | |
537 | IPP_STATUS_REDIRECTION_OTHER_SITE = 0x0200, | |
538 | /* redirection-other-site @private@ */ | |
78ac829c | 539 | IPP_STATUS_CUPS_SEE_OTHER = 0x0280, /* cups-see-other @private@ */ |
a469f8a5 MS |
540 | IPP_STATUS_ERROR_BAD_REQUEST = 0x0400,/* client-error-bad-request */ |
541 | IPP_STATUS_ERROR_FORBIDDEN, /* client-error-forbidden */ | |
542 | IPP_STATUS_ERROR_NOT_AUTHENTICATED, /* client-error-not-authenticated */ | |
543 | IPP_STATUS_ERROR_NOT_AUTHORIZED, /* client-error-not-authorized */ | |
544 | IPP_STATUS_ERROR_NOT_POSSIBLE, /* client-error-not-possible */ | |
545 | IPP_STATUS_ERROR_TIMEOUT, /* client-error-timeout */ | |
546 | IPP_STATUS_ERROR_NOT_FOUND, /* client-error-not-found */ | |
547 | IPP_STATUS_ERROR_GONE, /* client-error-gone */ | |
548 | IPP_STATUS_ERROR_REQUEST_ENTITY, /* client-error-request-entity-too-large */ | |
549 | IPP_STATUS_ERROR_REQUEST_VALUE, /* client-error-request-value-too-long */ | |
550 | IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED, | |
551 | /* client-error-document-format-not-supported */ | |
552 | IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES,/* client-error-attributes-or-values-not-supported */ | |
553 | IPP_STATUS_ERROR_URI_SCHEME, /* client-error-uri-scheme-not-supported */ | |
554 | IPP_STATUS_ERROR_CHARSET, /* client-error-charset-not-supported */ | |
555 | IPP_STATUS_ERROR_CONFLICTING, /* client-error-conflicting-attributes */ | |
556 | IPP_STATUS_ERROR_COMPRESSION_NOT_SUPPORTED, | |
557 | /* client-error-compression-not-supported */ | |
558 | IPP_STATUS_ERROR_COMPRESSION_ERROR, /* client-error-compression-error */ | |
559 | IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR, | |
560 | /* client-error-document-format-error */ | |
561 | IPP_STATUS_ERROR_DOCUMENT_ACCESS, /* client-error-document-access-error */ | |
562 | IPP_STATUS_ERROR_ATTRIBUTES_NOT_SETTABLE, | |
563 | /* client-error-attributes-not-settable */ | |
564 | IPP_STATUS_ERROR_IGNORED_ALL_SUBSCRIPTIONS, | |
565 | /* client-error-ignored-all-subscriptions */ | |
566 | IPP_STATUS_ERROR_TOO_MANY_SUBSCRIPTIONS, | |
567 | /* client-error-too-many-subscriptions */ | |
568 | IPP_STATUS_ERROR_IGNORED_ALL_NOTIFICATIONS, | |
569 | /* client-error-ignored-all-notifications @private@ */ | |
570 | IPP_STATUS_ERROR_PRINT_SUPPORT_FILE_NOT_FOUND, | |
571 | /* client-error-print-support-file-not-found @private@ */ | |
572 | IPP_STATUS_ERROR_DOCUMENT_PASSWORD, /* client-error-document-password-error */ | |
573 | IPP_STATUS_ERROR_DOCUMENT_PERMISSION, /* client-error-document-permission-error */ | |
574 | IPP_STATUS_ERROR_DOCUMENT_SECURITY, /* client-error-document-security-error */ | |
575 | IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE,/* client-error-document-unprintable-error */ | |
6b13fa61 MS |
576 | IPP_STATUS_ERROR_ACCOUNT_INFO_NEEDED, /* client-error-account-info-needed */ |
577 | IPP_STATUS_ERROR_ACCOUNT_CLOSED, /* client-error-account-closed */ | |
578 | IPP_STATUS_ERROR_ACCOUNT_LIMIT_REACHED, | |
579 | /* client-error-account-limit-reached */ | |
580 | IPP_STATUS_ERROR_ACCOUNT_AUTHORIZATION_FAILED, | |
581 | /* client-error-account-authorization-failed */ | |
c47d4869 | 582 | IPP_STATUS_ERROR_NOT_FETCHABLE, /* client-error-not-fetchable */ |
6b13fa61 MS |
583 | |
584 | /* Legacy status codes for paid printing */ | |
a469f8a5 | 585 | IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED = 0x049C, |
6b13fa61 MS |
586 | /* cups-error-account-info-needed @deprecated@ */ |
587 | IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED, /* cups-error-account-closed @deprecate@ */ | |
a469f8a5 | 588 | IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED, |
6b13fa61 | 589 | /* cups-error-account-limit-reached @deprecated@ */ |
a469f8a5 | 590 | IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED, |
6b13fa61 | 591 | /* cups-error-account-authorization-failed @deprecated@ */ |
a469f8a5 MS |
592 | |
593 | IPP_STATUS_ERROR_INTERNAL = 0x0500, /* server-error-internal-error */ | |
594 | IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED, | |
595 | /* server-error-operation-not-supported */ | |
596 | IPP_STATUS_ERROR_SERVICE_UNAVAILABLE, /* server-error-service-unavailable */ | |
597 | IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED, | |
598 | /* server-error-version-not-supported */ | |
599 | IPP_STATUS_ERROR_DEVICE, /* server-error-device-error */ | |
600 | IPP_STATUS_ERROR_TEMPORARY, /* server-error-temporary-error */ | |
601 | IPP_STATUS_ERROR_NOT_ACCEPTING_JOBS, /* server-error-not-accepting-jobs */ | |
602 | IPP_STATUS_ERROR_BUSY, /* server-error-busy */ | |
603 | IPP_STATUS_ERROR_JOB_CANCELED, /* server-error-job-canceled */ | |
604 | IPP_STATUS_ERROR_MULTIPLE_JOBS_NOT_SUPPORTED, | |
605 | /* server-error-multiple-document-jobs-not-supported */ | |
606 | IPP_STATUS_ERROR_PRINTER_IS_DEACTIVATED, | |
607 | /* server-error-printer-is-deactivated */ | |
608 | IPP_STATUS_ERROR_TOO_MANY_JOBS, /* server-error-too-many-jobs */ | |
609 | IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS, /* server-error-too-many-documents */ | |
610 | ||
611 | /* These are internal and never sent over the wire... */ | |
612 | IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED = 0x1000, | |
8072030b MS |
613 | /* cups-authentication-canceled - Authentication canceled by user @since CUPS 1.5/macOS 10.7@ */ |
614 | IPP_STATUS_ERROR_CUPS_PKI, /* cups-pki-error - Error negotiating a secure connection @since CUPS 1.5/macOS 10.7@ */ | |
78ac829c | 615 | IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED/* cups-upgrade-required - TLS upgrade required @since CUPS 1.5/macOS 10.7@ */ |
a469f8a5 MS |
616 | |
617 | # ifndef _CUPS_NO_DEPRECATED | |
618 | # define IPP_OK IPP_STATUS_OK | |
619 | # define IPP_OK_SUBST IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED | |
620 | # define IPP_OK_CONFLICT IPP_STATUS_OK_CONFLICTING | |
621 | # define IPP_OK_IGNORED_SUBSCRIPTIONS IPP_STATUS_OK_IGNORED_SUBSCRIPTIONS | |
622 | # define IPP_OK_IGNORED_NOTIFICATIONS IPP_STATUS_OK_IGNORED_NOTIFICATIONS | |
623 | # define IPP_OK_TOO_MANY_EVENTS IPP_STATUS_OK_TOO_MANY_EVENTS | |
624 | # define IPP_OK_BUT_CANCEL_SUBSCRIPTION IPP_STATUS_OK_BUT_CANCEL_SUBSCRIPTION | |
625 | # define IPP_OK_EVENTS_COMPLETE IPP_STATUS_OK_EVENTS_COMPLETE | |
626 | # define IPP_REDIRECTION_OTHER_SITE IPP_STATUS_REDIRECTION_OTHER_SITE | |
627 | # define CUPS_SEE_OTHER IPP_STATUS_CUPS_SEE_OTHER | |
628 | # define IPP_BAD_REQUEST IPP_STATUS_ERROR_BAD_REQUEST | |
629 | # define IPP_FORBIDDEN IPP_STATUS_ERROR_FORBIDDEN | |
630 | # define IPP_NOT_AUTHENTICATED IPP_STATUS_ERROR_NOT_AUTHENTICATED | |
631 | # define IPP_NOT_AUTHORIZED IPP_STATUS_ERROR_NOT_AUTHORIZED | |
632 | # define IPP_NOT_POSSIBLE IPP_STATUS_ERROR_NOT_POSSIBLE | |
633 | # define IPP_TIMEOUT IPP_STATUS_ERROR_TIMEOUT | |
634 | # define IPP_NOT_FOUND IPP_STATUS_ERROR_NOT_FOUND | |
635 | # define IPP_GONE IPP_STATUS_ERROR_GONE | |
636 | # define IPP_REQUEST_ENTITY IPP_STATUS_ERROR_REQUEST_ENTITY | |
637 | # define IPP_REQUEST_VALUE IPP_STATUS_ERROR_REQUEST_VALUE | |
638 | # define IPP_DOCUMENT_FORMAT IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED | |
639 | # define IPP_ATTRIBUTES IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES | |
640 | # define IPP_URI_SCHEME IPP_STATUS_ERROR_URI_SCHEME | |
641 | # define IPP_CHARSET IPP_STATUS_ERROR_CHARSET | |
642 | # define IPP_CONFLICT IPP_STATUS_ERROR_CONFLICTING | |
643 | # define IPP_COMPRESSION_NOT_SUPPORTED IPP_STATUS_ERROR_COMPRESSION_NOT_SUPPORTED | |
644 | # define IPP_COMPRESSION_ERROR IPP_STATUS_ERROR_COMPRESSION_ERROR | |
645 | # define IPP_DOCUMENT_FORMAT_ERROR IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR | |
646 | # define IPP_DOCUMENT_ACCESS_ERROR IPP_STATUS_ERROR_DOCUMENT_ACCESS | |
647 | # define IPP_ATTRIBUTES_NOT_SETTABLE IPP_STATUS_ERROR_ATTRIBUTES_NOT_SETTABLE | |
648 | # define IPP_IGNORED_ALL_SUBSCRIPTIONS IPP_STATUS_ERROR_IGNORED_ALL_SUBSCRIPTIONS | |
649 | # define IPP_TOO_MANY_SUBSCRIPTIONS IPP_STATUS_ERROR_TOO_MANY_SUBSCRIPTIONS | |
650 | # define IPP_IGNORED_ALL_NOTIFICATIONS IPP_STATUS_ERROR_IGNORED_ALL_NOTIFICATIONS | |
651 | # define IPP_PRINT_SUPPORT_FILE_NOT_FOUND IPP_STATUS_ERROR_PRINT_SUPPORT_FILE_NOT_FOUND | |
652 | # define IPP_DOCUMENT_PASSWORD_ERROR IPP_STATUS_ERROR_DOCUMENT_PASSWORD | |
653 | # define IPP_DOCUMENT_PERMISSION_ERROR IPP_STATUS_ERROR_DOCUMENT_PERMISSION | |
654 | # define IPP_DOCUMENT_SECURITY_ERROR IPP_STATUS_ERROR_DOCUMENT_SECURITY | |
655 | # define IPP_DOCUMENT_UNPRINTABLE_ERROR IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE | |
656 | # define IPP_INTERNAL_ERROR IPP_STATUS_ERROR_INTERNAL | |
657 | # define IPP_OPERATION_NOT_SUPPORTED IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED | |
658 | # define IPP_SERVICE_UNAVAILABLE IPP_STATUS_ERROR_SERVICE_UNAVAILABLE | |
659 | # define IPP_VERSION_NOT_SUPPORTED IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED | |
660 | # define IPP_DEVICE_ERROR IPP_STATUS_ERROR_DEVICE | |
661 | # define IPP_TEMPORARY_ERROR IPP_STATUS_ERROR_TEMPORARY | |
662 | # define IPP_NOT_ACCEPTING IPP_STATUS_ERROR_NOT_ACCEPTING_JOBS | |
663 | # define IPP_PRINTER_BUSY IPP_STATUS_ERROR_BUSY | |
664 | # define IPP_ERROR_JOB_CANCELED IPP_STATUS_ERROR_JOB_CANCELED | |
665 | # define IPP_MULTIPLE_JOBS_NOT_SUPPORTED IPP_STATUS_ERROR_MULTIPLE_JOBS_NOT_SUPPORTED | |
666 | # define IPP_PRINTER_IS_DEACTIVATED IPP_STATUS_ERROR_PRINTER_IS_DEACTIVATED | |
667 | # define IPP_TOO_MANY_JOBS IPP_STATUS_ERROR_TOO_MANY_JOBS | |
668 | # define IPP_TOO_MANY_DOCUMENTS IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS | |
669 | # define IPP_AUTHENTICATION_CANCELED IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED | |
670 | # define IPP_PKI_ERROR IPP_STATUS_ERROR_CUPS_PKI | |
671 | # define IPP_UPGRADE_REQUIRED IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED | |
672 | /* Legacy name for canceled status */ | |
673 | # define IPP_ERROR_JOB_CANCELLED IPP_STATUS_ERROR_JOB_CANCELED | |
674 | # endif /* _CUPS_NO_DEPRECATED */ | |
a2326b5b | 675 | } ipp_status_t; |
ef416fc2 | 676 | |
65bebeac | 677 | typedef enum ipp_tag_e /**** Value and group tag values for attributes ****/ |
ef416fc2 | 678 | { |
dcb445bc | 679 | IPP_TAG_CUPS_INVALID = -1, /* Invalid tag name for @link ippTagValue@ */ |
a2326b5b MS |
680 | IPP_TAG_ZERO = 0x00, /* Zero tag - used for separators */ |
681 | IPP_TAG_OPERATION, /* Operation group */ | |
682 | IPP_TAG_JOB, /* Job group */ | |
683 | IPP_TAG_END, /* End-of-attributes */ | |
684 | IPP_TAG_PRINTER, /* Printer group */ | |
685 | IPP_TAG_UNSUPPORTED_GROUP, /* Unsupported attributes group */ | |
686 | IPP_TAG_SUBSCRIPTION, /* Subscription group */ | |
687 | IPP_TAG_EVENT_NOTIFICATION, /* Event group */ | |
054eee9c MS |
688 | IPP_TAG_RESOURCE, /* Resource group */ |
689 | IPP_TAG_DOCUMENT, /* Document group */ | |
690 | IPP_TAG_SYSTEM, /* System group */ | |
a2326b5b MS |
691 | IPP_TAG_UNSUPPORTED_VALUE = 0x10, /* Unsupported value */ |
692 | IPP_TAG_DEFAULT, /* Default value */ | |
693 | IPP_TAG_UNKNOWN, /* Unknown value */ | |
694 | IPP_TAG_NOVALUE, /* No-value value */ | |
695 | IPP_TAG_NOTSETTABLE = 0x15, /* Not-settable value */ | |
696 | IPP_TAG_DELETEATTR, /* Delete-attribute value */ | |
697 | IPP_TAG_ADMINDEFINE, /* Admin-defined value */ | |
698 | IPP_TAG_INTEGER = 0x21, /* Integer value */ | |
699 | IPP_TAG_BOOLEAN, /* Boolean value */ | |
700 | IPP_TAG_ENUM, /* Enumeration value */ | |
701 | IPP_TAG_STRING = 0x30, /* Octet string value */ | |
702 | IPP_TAG_DATE, /* Date/time value */ | |
703 | IPP_TAG_RESOLUTION, /* Resolution value */ | |
704 | IPP_TAG_RANGE, /* Range value */ | |
718ee2ff | 705 | IPP_TAG_BEGIN_COLLECTION, /* Beginning of collection value @exclude all@ */ |
a2326b5b MS |
706 | IPP_TAG_TEXTLANG, /* Text-with-language value */ |
707 | IPP_TAG_NAMELANG, /* Name-with-language value */ | |
718ee2ff | 708 | IPP_TAG_END_COLLECTION, /* End of collection value @exclude all@ */ |
a2326b5b MS |
709 | IPP_TAG_TEXT = 0x41, /* Text value */ |
710 | IPP_TAG_NAME, /* Name value */ | |
711 | IPP_TAG_RESERVED_STRING, /* Reserved for future string value @private@ */ | |
712 | IPP_TAG_KEYWORD, /* Keyword value */ | |
713 | IPP_TAG_URI, /* URI value */ | |
714 | IPP_TAG_URISCHEME, /* URI scheme value */ | |
715 | IPP_TAG_CHARSET, /* Character set value */ | |
716 | IPP_TAG_LANGUAGE, /* Language value */ | |
717 | IPP_TAG_MIMETYPE, /* MIME media type value */ | |
718ee2ff MS |
718 | IPP_TAG_MEMBERNAME, /* Collection member name value @exclude all@ */ |
719 | IPP_TAG_EXTENSION = 0x7f, /* Extension point for 32-bit tags @exclude all@ */ | |
a469f8a5 | 720 | IPP_TAG_CUPS_MASK = 0x7fffffff, /* Mask for copied attribute values @private@ */ |
a2326b5b | 721 | /* The following expression is used to avoid compiler warnings with +/-0x80000000 */ |
a469f8a5 MS |
722 | IPP_TAG_CUPS_CONST = -0x7fffffff-1 /* Bitflag for copied/const attribute values @private@ */ |
723 | ||
724 | # ifndef _CUPS_NO_DEPRECATED | |
725 | # define IPP_TAG_MASK IPP_TAG_CUPS_MASK | |
726 | # define IPP_TAG_COPY IPP_TAG_CUPS_CONST | |
727 | # endif /* !_CUPS_NO_DEPRECATED */ | |
a2326b5b | 728 | } ipp_tag_t; |
ef416fc2 | 729 | |
718ee2ff | 730 | typedef unsigned char ipp_uchar_t; /**** Unsigned 8-bit integer/character @exclude all@ ****/ |
a2326b5b MS |
731 | typedef struct _ipp_s ipp_t; /**** IPP request/response data ****/ |
732 | typedef struct _ipp_attribute_s ipp_attribute_t; | |
733 | /**** IPP attribute ****/ | |
ef416fc2 | 734 | |
8072030b | 735 | /**** New in CUPS 1.2/macOS 10.5 ****/ |
a2326b5b | 736 | typedef ssize_t (*ipp_iocb_t)(void *context, ipp_uchar_t *buffer, size_t bytes); |
65bebeac | 737 | /**** ippReadIO/ippWriteIO callback function @since CUPS 1.2/macOS 10.5@ ****/ |
aaf19ab0 | 738 | |
8072030b | 739 | /**** New in CUPS 1.6/macOS 10.8 ****/ |
a2326b5b | 740 | typedef int (*ipp_copycb_t)(void *context, ipp_t *dst, ipp_attribute_t *attr); |
65bebeac | 741 | /**** ippCopyAttributes callback function @since CUPS 1.6/macOS 10.8 ****/ |
ef416fc2 | 742 | |
743 | ||
744 | /* | |
745 | * Prototypes... | |
746 | */ | |
747 | ||
fa73b229 | 748 | extern ipp_attribute_t *ippAddBoolean(ipp_t *ipp, ipp_tag_t group, |
749 | const char *name, char value); | |
750 | extern ipp_attribute_t *ippAddBooleans(ipp_t *ipp, ipp_tag_t group, | |
751 | const char *name, int num_values, | |
752 | const char *values); | |
753 | extern ipp_attribute_t *ippAddDate(ipp_t *ipp, ipp_tag_t group, | |
754 | const char *name, const ipp_uchar_t *value); | |
755 | extern ipp_attribute_t *ippAddInteger(ipp_t *ipp, ipp_tag_t group, | |
a2326b5b | 756 | ipp_tag_t value_tag, const char *name, |
fa73b229 | 757 | int value); |
758 | extern ipp_attribute_t *ippAddIntegers(ipp_t *ipp, ipp_tag_t group, | |
a2326b5b | 759 | ipp_tag_t value_tag, const char *name, |
fa73b229 | 760 | int num_values, const int *values); |
761 | extern ipp_attribute_t *ippAddRange(ipp_t *ipp, ipp_tag_t group, | |
762 | const char *name, int lower, int upper); | |
763 | extern ipp_attribute_t *ippAddRanges(ipp_t *ipp, ipp_tag_t group, | |
764 | const char *name, int num_values, | |
765 | const int *lower, const int *upper); | |
766 | extern ipp_attribute_t *ippAddResolution(ipp_t *ipp, ipp_tag_t group, | |
767 | const char *name, ipp_res_t units, | |
768 | int xres, int yres); | |
769 | extern ipp_attribute_t *ippAddResolutions(ipp_t *ipp, ipp_tag_t group, | |
770 | const char *name, int num_values, | |
771 | ipp_res_t units, const int *xres, | |
772 | const int *yres); | |
ef416fc2 | 773 | extern ipp_attribute_t *ippAddSeparator(ipp_t *ipp); |
fa73b229 | 774 | extern ipp_attribute_t *ippAddString(ipp_t *ipp, ipp_tag_t group, |
a2326b5b MS |
775 | ipp_tag_t value_tag, const char *name, |
776 | const char *language, const char *value); | |
fa73b229 | 777 | extern ipp_attribute_t *ippAddStrings(ipp_t *ipp, ipp_tag_t group, |
a2326b5b MS |
778 | ipp_tag_t value_tag, const char *name, |
779 | int num_values, const char *language, | |
fa73b229 | 780 | const char * const *values); |
ef416fc2 | 781 | extern time_t ippDateToTime(const ipp_uchar_t *date); |
782 | extern void ippDelete(ipp_t *ipp); | |
783 | extern const char *ippErrorString(ipp_status_t error); | |
784 | extern ipp_attribute_t *ippFindAttribute(ipp_t *ipp, const char *name, | |
a2326b5b | 785 | ipp_tag_t value_tag); |
ef416fc2 | 786 | extern ipp_attribute_t *ippFindNextAttribute(ipp_t *ipp, const char *name, |
a2326b5b | 787 | ipp_tag_t value_tag); |
ef416fc2 | 788 | extern size_t ippLength(ipp_t *ipp); |
789 | extern ipp_t *ippNew(void); | |
790 | extern ipp_state_t ippRead(http_t *http, ipp_t *ipp); | |
791 | extern const ipp_uchar_t *ippTimeToDate(time_t t); | |
792 | extern ipp_state_t ippWrite(http_t *http, ipp_t *ipp); | |
793 | extern int ippPort(void); | |
794 | extern void ippSetPort(int p); | |
795 | ||
796 | /**** New in CUPS 1.1.19 ****/ | |
fa73b229 | 797 | extern ipp_attribute_t *ippAddCollection(ipp_t *ipp, ipp_tag_t group, |
2fb76298 | 798 | const char *name, ipp_t *value) _CUPS_API_1_1_19; |
fa73b229 | 799 | extern ipp_attribute_t *ippAddCollections(ipp_t *ipp, ipp_tag_t group, |
800 | const char *name, int num_values, | |
2fb76298 MS |
801 | const ipp_t **values) _CUPS_API_1_1_19; |
802 | extern void ippDeleteAttribute(ipp_t *ipp, ipp_attribute_t *attr) _CUPS_API_1_1_19; | |
803 | extern ipp_state_t ippReadFile(int fd, ipp_t *ipp) _CUPS_API_1_1_19; | |
804 | extern ipp_state_t ippWriteFile(int fd, ipp_t *ipp) _CUPS_API_1_1_19; | |
ef416fc2 | 805 | |
8072030b | 806 | /**** New in CUPS 1.2/macOS 10.5 ****/ |
ef416fc2 | 807 | extern ipp_attribute_t *ippAddOctetString(ipp_t *ipp, ipp_tag_t group, |
808 | const char *name, | |
2fb76298 MS |
809 | const void *data, int datalen) _CUPS_API_1_2; |
810 | extern ipp_status_t ippErrorValue(const char *name) _CUPS_API_1_2; | |
811 | extern ipp_t *ippNewRequest(ipp_op_t op) _CUPS_API_1_2; | |
812 | extern const char *ippOpString(ipp_op_t op) _CUPS_API_1_2; | |
813 | extern ipp_op_t ippOpValue(const char *name) _CUPS_API_1_2; | |
a4d04587 | 814 | extern ipp_state_t ippReadIO(void *src, ipp_iocb_t cb, int blocking, |
2fb76298 | 815 | ipp_t *parent, ipp_t *ipp) _CUPS_API_1_2; |
a4d04587 | 816 | extern ipp_state_t ippWriteIO(void *dst, ipp_iocb_t cb, int blocking, |
2fb76298 | 817 | ipp_t *parent, ipp_t *ipp) _CUPS_API_1_2; |
ef416fc2 | 818 | |
8072030b | 819 | /**** New in CUPS 1.4/macOS 10.6 ****/ |
1ff0402e MS |
820 | extern const char *ippTagString(ipp_tag_t tag) _CUPS_API_1_4; |
821 | extern ipp_tag_t ippTagValue(const char *name) _CUPS_API_1_4; | |
822 | ||
8072030b | 823 | /**** New in CUPS 1.6/macOS 10.8 ****/ |
9c80ffa2 MS |
824 | extern ipp_attribute_t *ippAddOutOfBand(ipp_t *ipp, ipp_tag_t group, |
825 | ipp_tag_t value_tag, const char *name) | |
826 | _CUPS_API_1_6; | |
a2326b5b MS |
827 | extern size_t ippAttributeString(ipp_attribute_t *attr, char *buffer, |
828 | size_t bufsize) _CUPS_API_1_6; | |
829 | extern ipp_attribute_t *ippCopyAttribute(ipp_t *dst, ipp_attribute_t *attr, | |
830 | int quickcopy) _CUPS_API_1_6; | |
831 | extern int ippCopyAttributes(ipp_t *dst, ipp_t *src, | |
9c80ffa2 MS |
832 | int quickcopy, ipp_copycb_t cb, |
833 | void *context) _CUPS_API_1_6; | |
834 | extern int ippDeleteValues(ipp_t *ipp, ipp_attribute_t **attr, | |
835 | int element, int count) _CUPS_API_1_6; | |
836 | extern const char *ippEnumString(const char *attrname, int enumvalue) | |
837 | _CUPS_API_1_6; | |
838 | extern int ippEnumValue(const char *attrname, | |
839 | const char *enumstring) _CUPS_API_1_6; | |
a2326b5b MS |
840 | extern ipp_attribute_t *ippFirstAttribute(ipp_t *ipp) _CUPS_API_1_6; |
841 | extern int ippGetBoolean(ipp_attribute_t *attr, int element) | |
842 | _CUPS_API_1_6; | |
843 | extern ipp_t *ippGetCollection(ipp_attribute_t *attr, | |
844 | int element) _CUPS_API_1_6; | |
845 | extern int ippGetCount(ipp_attribute_t *attr) _CUPS_API_1_6; | |
9c80ffa2 MS |
846 | extern const ipp_uchar_t *ippGetDate(ipp_attribute_t *attr, int element) |
847 | _CUPS_API_1_6; | |
a2326b5b MS |
848 | extern ipp_tag_t ippGetGroupTag(ipp_attribute_t *attr) _CUPS_API_1_6; |
849 | extern int ippGetInteger(ipp_attribute_t *attr, int element) | |
850 | _CUPS_API_1_6; | |
851 | extern const char *ippGetName(ipp_attribute_t *attr) _CUPS_API_1_6; | |
852 | extern ipp_op_t ippGetOperation(ipp_t *ipp) _CUPS_API_1_6; | |
9c80ffa2 MS |
853 | extern int ippGetRange(ipp_attribute_t *attr, int element, |
854 | int *upper) _CUPS_API_1_6; | |
a2326b5b MS |
855 | extern int ippGetRequestId(ipp_t *ipp) _CUPS_API_1_6; |
856 | extern int ippGetResolution(ipp_attribute_t *attr, int element, | |
9c80ffa2 MS |
857 | int *yres, ipp_res_t *units) |
858 | _CUPS_API_1_6; | |
859 | extern ipp_state_t ippGetState(ipp_t *ipp) _CUPS_API_1_6; | |
a2326b5b MS |
860 | extern ipp_status_t ippGetStatusCode(ipp_t *ipp) _CUPS_API_1_6; |
861 | extern const char *ippGetString(ipp_attribute_t *attr, int element, | |
862 | const char **language) _CUPS_API_1_6; | |
863 | extern ipp_tag_t ippGetValueTag(ipp_attribute_t *attr) _CUPS_API_1_6; | |
864 | extern int ippGetVersion(ipp_t *ipp, int *minor) _CUPS_API_1_6; | |
865 | extern ipp_attribute_t *ippNextAttribute(ipp_t *ipp) _CUPS_API_1_6; | |
866 | extern int ippSetBoolean(ipp_t *ipp, ipp_attribute_t **attr, | |
867 | int element, int boolvalue) _CUPS_API_1_6; | |
868 | extern int ippSetCollection(ipp_t *ipp, ipp_attribute_t **attr, | |
9c80ffa2 MS |
869 | int element, ipp_t *colvalue) |
870 | _CUPS_API_1_6; | |
871 | extern int ippSetDate(ipp_t *ipp, ipp_attribute_t **attr, | |
872 | int element, const ipp_uchar_t *datevalue) | |
873 | _CUPS_API_1_6; | |
a2326b5b MS |
874 | extern int ippSetGroupTag(ipp_t *ipp, ipp_attribute_t **attr, |
875 | ipp_tag_t group_tag) _CUPS_API_1_6; | |
876 | extern int ippSetInteger(ipp_t *ipp, ipp_attribute_t **attr, | |
877 | int element, int intvalue) _CUPS_API_1_6; | |
9c80ffa2 MS |
878 | extern int ippSetName(ipp_t *ipp, ipp_attribute_t **attr, |
879 | const char *name) _CUPS_API_1_6; | |
a2326b5b | 880 | extern int ippSetOperation(ipp_t *ipp, ipp_op_t op) _CUPS_API_1_6; |
9c80ffa2 MS |
881 | extern int ippSetRange(ipp_t *ipp, ipp_attribute_t **attr, |
882 | int element, int lowervalue, int uppervalue) | |
883 | _CUPS_API_1_6; | |
a2326b5b MS |
884 | extern int ippSetRequestId(ipp_t *ipp, int request_id) |
885 | _CUPS_API_1_6; | |
886 | extern int ippSetResolution(ipp_t *ipp, ipp_attribute_t **attr, | |
887 | int element, ipp_res_t unitsvalue, | |
9c80ffa2 MS |
888 | int xresvalue, int yresvalue) |
889 | _CUPS_API_1_6; | |
890 | extern int ippSetState(ipp_t *ipp, ipp_state_t state) | |
891 | _CUPS_API_1_6; | |
892 | extern int ippSetStatusCode(ipp_t *ipp, ipp_status_t status) | |
893 | _CUPS_API_1_6; | |
a2326b5b | 894 | extern int ippSetString(ipp_t *ipp, ipp_attribute_t **attr, |
9c80ffa2 MS |
895 | int element, const char *strvalue) |
896 | _CUPS_API_1_6; | |
a2326b5b MS |
897 | extern int ippSetValueTag(ipp_t *ipp, ipp_attribute_t **attr, |
898 | ipp_tag_t value_tag) _CUPS_API_1_6; | |
9c80ffa2 MS |
899 | extern int ippSetVersion(ipp_t *ipp, int major, int minor) |
900 | _CUPS_API_1_6; | |
a2326b5b | 901 | |
a469f8a5 MS |
902 | /**** New in CUPS 1.7 ****/ |
903 | extern ipp_attribute_t *ippAddStringf(ipp_t *ipp, ipp_tag_t group, | |
904 | ipp_tag_t value_tag, const char *name, | |
905 | const char *language, const char *format, | |
906 | ...) _CUPS_API_1_7; | |
907 | extern ipp_attribute_t *ippAddStringfv(ipp_t *ipp, ipp_tag_t group, | |
908 | ipp_tag_t value_tag, const char *name, | |
909 | const char *language, | |
910 | const char *format, va_list ap) | |
911 | _CUPS_API_1_7; | |
912 | extern int ippContainsInteger(ipp_attribute_t *attr, int value) | |
913 | _CUPS_API_1_7; | |
914 | extern int ippContainsString(ipp_attribute_t *attr, | |
915 | const char *value) _CUPS_API_1_7; | |
db8b865d | 916 | extern cups_array_t *ippCreateRequestedArray(ipp_t *request) _CUPS_API_1_7; |
6961465f MS |
917 | extern void *ippGetOctetString(ipp_attribute_t *attr, int element, |
918 | int *datalen) _CUPS_API_1_7; | |
a469f8a5 | 919 | extern ipp_t *ippNewResponse(ipp_t *request) _CUPS_API_1_7; |
6961465f MS |
920 | extern int ippSetOctetString(ipp_t *ipp, ipp_attribute_t **attr, |
921 | int element, const void *data, | |
922 | int datalen) _CUPS_API_1_7; | |
a469f8a5 MS |
923 | extern int ippSetStringf(ipp_t *ipp, ipp_attribute_t **attr, |
924 | int element, const char *format, | |
925 | ...) _CUPS_API_1_7; | |
926 | extern int ippSetStringfv(ipp_t *ipp, ipp_attribute_t **attr, | |
927 | int element, const char *format, | |
928 | va_list ap) _CUPS_API_1_7; | |
c1420c87 MS |
929 | extern int ippValidateAttribute(ipp_attribute_t *attr) |
930 | _CUPS_API_1_7; | |
931 | extern int ippValidateAttributes(ipp_t *ipp) _CUPS_API_1_7; | |
a469f8a5 | 932 | |
ef416fc2 | 933 | |
d21dc0ed MS |
934 | /**** New in CUPS 2.0 ****/ |
935 | extern const char *ippStateString(ipp_state_t state) _CUPS_API_2_0; | |
936 | ||
937 | ||
ef416fc2 | 938 | /* |
939 | * C++ magic... | |
940 | */ | |
941 | ||
942 | # ifdef __cplusplus | |
943 | } | |
944 | # endif /* __cplusplus */ | |
945 | #endif /* !_CUPS_IPP_H_ */ |