4 * Internet Printing Protocol definitions for CUPS.
6 * Copyright 2007-2013 by Apple Inc.
7 * Copyright 1997-2006 by Easy Software Products.
9 * These coded instructions, statements, and computer programs are the
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/".
15 * This file is subject to the Apple OS-Developed Software exception.
22 * Include necessary headers...
35 # endif /* __cplusplus */
39 * IPP version string...
42 # define IPP_VERSION "\002\001"
45 * IPP registered port number...
47 * Note: Applications should never use IPP_PORT, but instead use the
48 * ippPort() function to allow overrides via the IPP_PORT environment
49 * variable and services file if needed!
58 # define IPP_MAX_CHARSET 64 /* Maximum length of charset values w/nul */
59 # define IPP_MAX_KEYWORD 256 /* Maximum length of keyword values w/nul */
60 # define IPP_MAX_LANGUAGE 64 /* Maximum length of naturalLanguage values w/nul */
61 # define IPP_MAX_LENGTH 32767 /* Maximum size of any single value */
62 # define IPP_MAX_MIMETYPE 256 /* Maximum length of mimeMediaType values w/nul */
63 # define IPP_MAX_NAME 256 /* Maximum length of common name values w/nul */
64 # define IPP_MAX_OCTETSTRING 1023 /* Maximum length of octetString values w/o nul */
65 # define IPP_MAX_TEXT 1024 /* Maximum length of text values w/nul */
66 # define IPP_MAX_URI 1024 /* Maximum length of uri values w/nul */
67 # define IPP_MAX_URISCHEME 64 /* Maximum length of uriScheme values w/nul */
68 # define IPP_MAX_VALUES 8 /* Power-of-2 allocation increment */
72 * Types and structures...
75 typedef enum ipp_dstate_e
/**** Document states ****/
77 IPP_DOCUMENT_PENDING
= 3, /* Document is pending */
78 IPP_DOCUMENT_PROCESSING
= 5, /* Document is processing */
79 IPP_DOCUMENT_CANCELED
= 7, /* Document is canceled */
80 IPP_DOCUMENT_ABORTED
, /* Document is aborted */
81 IPP_DOCUMENT_COMPLETED
/* Document is completed */
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 */
92 typedef enum ipp_finishings_e
/**** Finishings ****/
94 IPP_FINISHINGS_NONE
= 3, /* No finishing */
95 IPP_FINISHINGS_STAPLE
, /* Staple (any location) */
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 */
105 IPP_FINISHINGS_JOG_OFFSET
, /* Offset for binding (any type) */
106 IPP_FINISHINGS_COAT
, /* Apply protective liquid or powder coating */
107 IPP_FINISHINGS_LAMINATE
, /* Apply protective (solid) material */
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 */
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 */
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 */
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 */
131 IPP_FINISHINGS_TRIM_AFTER_JOB
, /* Trim output after job */
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 */
148 IPP_FINISHINGS_FOLD_ACCORDIAN
= 90, /* Accordian-fold the paper vertically into four sections */
149 IPP_FINISHINGS_FOLD_DOUBLE_GATE
, /* Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically */
150 IPP_FINISHINGS_FOLD_GATE
, /* Fold the top and bottom quarters of the paper towards the midline */
151 IPP_FINISHINGS_FOLD_HALF
, /* Fold the paper in half vertically */
152 IPP_FINISHINGS_FOLD_HALF_Z
, /* Fold the paper in half horizontally, then Z-fold the paper vertically */
153 IPP_FINISHINGS_FOLD_LEFT_GATE
, /* Fold the top quarter of the paper towards the midline */
154 IPP_FINISHINGS_FOLD_LETTER
, /* Fold the paper into three sections vertically; sometimes also known as a C fold*/
155 IPP_FINISHINGS_FOLD_PARALLEL
, /* Fold the paper in half vertically two times, yielding four sections */
156 IPP_FINISHINGS_FOLD_POSTER
, /* Fold the paper in half horizontally and vertically; sometimes also called a cross fold */
157 IPP_FINISHINGS_FOLD_RIGHT_GATE
, /* Fold the bottom quarter of the paper towards the midline */
158 IPP_FINISHINGS_FOLD_Z
, /* Fold the paper vertically into three sections, forming a Z */
160 /* CUPS extensions for finishings (pre-standard versions of values above) */
161 IPP_FINISHINGS_CUPS_PUNCH_TOP_LEFT
= 0x40000046,
162 /* Punch 1 hole top left */
163 IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_LEFT
,/* Punch 1 hole bottom left */
164 IPP_FINISHINGS_CUPS_PUNCH_TOP_RIGHT
, /* Punch 1 hole top right */
165 IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_RIGHT
,
166 /* Punch 1 hole bottom right */
167 IPP_FINISHINGS_CUPS_PUNCH_DUAL_LEFT
, /* Punch 2 holes left side */
168 IPP_FINISHINGS_CUPS_PUNCH_DUAL_TOP
, /* Punch 2 holes top edge */
169 IPP_FINISHINGS_CUPS_PUNCH_DUAL_RIGHT
, /* Punch 2 holes right side */
170 IPP_FINISHINGS_CUPS_PUNCH_DUAL_BOTTOM
,/* Punch 2 holes bottom edge */
171 IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_LEFT
,/* Punch 3 holes left side */
172 IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_TOP
, /* Punch 3 holes top edge */
173 IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_RIGHT
,
174 /* Punch 3 holes right side */
175 IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_BOTTOM
,
176 /* Punch 3 holes bottom edge */
177 IPP_FINISHINGS_CUPS_PUNCH_QUAD_LEFT
, /* Punch 4 holes left side */
178 IPP_FINISHINGS_CUPS_PUNCH_QUAD_TOP
, /* Punch 4 holes top edge */
179 IPP_FINISHINGS_CUPS_PUNCH_QUAD_RIGHT
, /* Punch 4 holes right side */
180 IPP_FINISHINGS_CUPS_PUNCH_QUAD_BOTTOM
,/* Punch 4 holes bottom edge */
182 IPP_FINISHINGS_CUPS_FOLD_ACCORDIAN
= 0x4000005A,
183 /* Accordian-fold the paper vertically into four sections */
184 IPP_FINISHINGS_CUPS_FOLD_DOUBLE_GATE
, /* Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically */
185 IPP_FINISHINGS_CUPS_FOLD_GATE
, /* Fold the top and bottom quarters of the paper towards the midline */
186 IPP_FINISHINGS_CUPS_FOLD_HALF
, /* Fold the paper in half vertically */
187 IPP_FINISHINGS_CUPS_FOLD_HALF_Z
, /* Fold the paper in half horizontally, then Z-fold the paper vertically */
188 IPP_FINISHINGS_CUPS_FOLD_LEFT_GATE
, /* Fold the top quarter of the paper towards the midline */
189 IPP_FINISHINGS_CUPS_FOLD_LETTER
, /* Fold the paper into three sections vertically; sometimes also known as a C fold*/
190 IPP_FINISHINGS_CUPS_FOLD_PARALLEL
, /* Fold the paper in half vertically two times, yielding four sections */
191 IPP_FINISHINGS_CUPS_FOLD_POSTER
, /* Fold the paper in half horizontally and vertically; sometimes also called a cross fold */
192 IPP_FINISHINGS_CUPS_FOLD_RIGHT_GATE
, /* Fold the bottom quarter of the paper towards the midline */
193 IPP_FINISHINGS_CUPS_FOLD_Z
/* Fold the paper vertically into three sections, forming a Z */
195 # ifndef _CUPS_NO_DEPRECATED
196 # define IPP_FINISHINGS_JOB_OFFSET IPP_FINISHINGS_JOG_OFFSET
197 /* Long-time misspelling... */
198 typedef enum ipp_finishings_e ipp_finish_t
;
199 # endif /* !_CUPS_NO_DEPRECATED */
201 typedef enum ipp_jcollate_e
/**** Job collation types ****/
203 IPP_JCOLLATE_UNCOLLATED_SHEETS
= 3,
204 IPP_JCOLLATE_COLLATED_DOCUMENTS
,
205 IPP_JCOLLATE_UNCOLLATED_DOCUMENTS
207 # ifndef _CUPS_NO_DEPRECATED
208 # define IPP_JOB_UNCOLLATED_SHEETS IPP_JCOLLATE_UNCOLLATED_SHEETS
209 # define IPP_JOB_COLLATED_DOCUMENTS IPP_JCOLLATE_COLLATED_DOCUMENTS
210 # define IPP_JOB_UNCOLLATED_DOCUMENTS IPP_JCOLLATE_UNCOLLATED_DOCUMENTS
211 # endif /* !_CUPS_NO_DEPRECATED */
214 typedef enum ipp_jstate_e
/**** Job states ****/
216 IPP_JSTATE_PENDING
= 3, /* Job is waiting to be printed */
217 IPP_JSTATE_HELD
, /* Job is held for printing */
218 IPP_JSTATE_PROCESSING
, /* Job is currently printing */
219 IPP_JSTATE_STOPPED
, /* Job has been stopped */
220 IPP_JSTATE_CANCELED
, /* Job has been canceled */
221 IPP_JSTATE_ABORTED
, /* Job has aborted due to error */
222 IPP_JSTATE_COMPLETED
/* Job has completed successfully */
224 # ifndef _CUPS_NO_DEPRECATED
225 # define IPP_JOB_PENDING IPP_JSTATE_PENDING
226 # define IPP_JOB_HELD IPP_JSTATE_HELD
227 # define IPP_JOB_PROCESSING IPP_JSTATE_PROCESSING
228 # define IPP_JOB_STOPPED IPP_JSTATE_STOPPED
229 # define IPP_JOB_CANCELED IPP_JSTATE_CANCELED
230 # define IPP_JOB_ABORTED IPP_JSTATE_ABORTED
231 # define IPP_JOB_COMPLETED IPP_JSTATE_COMPLETED
232 /* Legacy name for canceled state */
233 # define IPP_JOB_CANCELLED IPP_JSTATE_CANCELED
234 # endif /* !_CUPS_NO_DEPRECATED */
237 typedef enum ipp_op_e
/**** IPP operations ****/
239 IPP_OP_CUPS_INVALID
= -1, /* Invalid operation name for @link ippOpValue@ */
240 IPP_OP_CUPS_NONE
= 0, /* No operation @private@ */
241 IPP_OP_PRINT_JOB
= 0x0002, /* Print a single file */
242 IPP_OP_PRINT_URI
, /* Print a single URL @private@ */
243 IPP_OP_VALIDATE_JOB
, /* Validate job options */
244 IPP_OP_CREATE_JOB
, /* Create an empty print job */
245 IPP_OP_SEND_DOCUMENT
, /* Add a file to a job */
246 IPP_OP_SEND_URI
, /* Add a URL to a job @private@ */
247 IPP_OP_CANCEL_JOB
, /* Cancel a job */
248 IPP_OP_GET_JOB_ATTRIBUTES
, /* Get job attributes */
249 IPP_OP_GET_JOBS
, /* Get a list of jobs */
250 IPP_OP_GET_PRINTER_ATTRIBUTES
, /* Get printer attributes */
251 IPP_OP_HOLD_JOB
, /* Hold a job for printing */
252 IPP_OP_RELEASE_JOB
, /* Release a job for printing */
253 IPP_OP_RESTART_JOB
, /* Reprint a job */
254 IPP_OP_PAUSE_PRINTER
= 0x0010, /* Stop a printer */
255 IPP_OP_RESUME_PRINTER
, /* Start a printer */
256 IPP_OP_PURGE_JOBS
, /* Cancel all jobs */
257 IPP_OP_SET_PRINTER_ATTRIBUTES
, /* Set printer attributes @private@ */
258 IPP_OP_SET_JOB_ATTRIBUTES
, /* Set job attributes */
259 IPP_OP_GET_PRINTER_SUPPORTED_VALUES
, /* Get supported attribute values */
260 IPP_OP_CREATE_PRINTER_SUBSCRIPTION
, /* Create a printer subscription @since CUPS 1.2/OS X 10.5@ */
261 IPP_OP_CREATE_JOB_SUBSCRIPTION
, /* Create a job subscription @since CUPS 1.2/OS X 10.5@ */
262 IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES
, /* Get subscription attributes @since CUPS 1.2/OS X 10.5@ */
263 IPP_OP_GET_SUBSCRIPTIONS
, /* Get list of subscriptions @since CUPS 1.2/OS X 10.5@ */
264 IPP_OP_RENEW_SUBSCRIPTION
, /* Renew a printer subscription @since CUPS 1.2/OS X 10.5@ */
265 IPP_OP_CANCEL_SUBSCRIPTION
, /* Cancel a subscription @since CUPS 1.2/OS X 10.5@ */
266 IPP_OP_GET_NOTIFICATIONS
, /* Get notification events @since CUPS 1.2/OS X 10.5@ */
267 IPP_OP_SEND_NOTIFICATIONS
, /* Send notification events @private@ */
268 IPP_OP_GET_RESOURCE_ATTRIBUTES
, /* Get resource attributes @private@ */
269 IPP_OP_GET_RESOURCE_DATA
, /* Get resource data @private@ */
270 IPP_OP_GET_RESOURCES
, /* Get list of resources @private@ */
271 IPP_OP_GET_PRINT_SUPPORT_FILES
, /* Get printer support files @private@ */
272 IPP_OP_ENABLE_PRINTER
, /* Start a printer */
273 IPP_OP_DISABLE_PRINTER
, /* Stop a printer */
274 IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB
,
275 /* Stop printer after the current job @private@ */
276 IPP_OP_HOLD_NEW_JOBS
, /* Hold new jobs @private@ */
277 IPP_OP_RELEASE_HELD_NEW_JOBS
, /* Release new jobs @private@ */
278 IPP_OP_DEACTIVATE_PRINTER
, /* Stop a printer @private@ */
279 IPP_OP_ACTIVATE_PRINTER
, /* Start a printer @private@ */
280 IPP_OP_RESTART_PRINTER
, /* Restart a printer @private@ */
281 IPP_OP_SHUTDOWN_PRINTER
, /* Turn a printer off @private@ */
282 IPP_OP_STARTUP_PRINTER
, /* Turn a printer on @private@ */
283 IPP_OP_REPROCESS_JOB
, /* Reprint a job @private@ */
284 IPP_OP_CANCEL_CURRENT_JOB
, /* Cancel the current job @private@ */
285 IPP_OP_SUSPEND_CURRENT_JOB
, /* Suspend the current job @private@ */
286 IPP_OP_RESUME_JOB
, /* Resume the current job @private@ */
287 IPP_OP_PROMOTE_JOB
, /* Promote a job to print sooner @private@ */
288 IPP_OP_SCHEDULE_JOB_AFTER
, /* Schedule a job to print after another @private@ */
289 IPP_OP_CANCEL_DOCUMENT
= 0x0033, /* Cancel-Document @private@ */
290 IPP_OP_GET_DOCUMENT_ATTRIBUTES
, /* Get-Document-Attributes @private@ */
291 IPP_OP_GET_DOCUMENTS
, /* Get-Documents @private@ */
292 IPP_OP_DELETE_DOCUMENT
, /* Delete-Document @private@ */
293 IPP_OP_SET_DOCUMENT_ATTRIBUTES
, /* Set-Document-Attributes @private@ */
294 IPP_OP_CANCEL_JOBS
, /* Cancel-Jobs */
295 IPP_OP_CANCEL_MY_JOBS
, /* Cancel-My-Jobs */
296 IPP_OP_RESUBMIT_JOB
, /* Resubmit-Job */
297 IPP_OP_CLOSE_JOB
, /* Close-Job */
298 IPP_OP_IDENTIFY_PRINTER
, /* Identify-Printer @private@ */
299 IPP_OP_VALIDATE_DOCUMENT
, /* Validate-Document @private@ */
300 IPP_OP_SEND_HARDCOPY_DOCUMENT
, /* Send-Hardcopy-Document @private@ */
302 IPP_OP_PRIVATE
= 0x4000, /* Reserved @private@ */
303 IPP_OP_CUPS_GET_DEFAULT
, /* Get the default printer */
304 IPP_OP_CUPS_GET_PRINTERS
, /* Get a list of printers and/or classes */
305 IPP_OP_CUPS_ADD_MODIFY_PRINTER
, /* Add or modify a printer */
306 IPP_OP_CUPS_DELETE_PRINTER
, /* Delete a printer */
307 IPP_OP_CUPS_GET_CLASSES
, /* Get a list of classes @deprecated@ */
308 IPP_OP_CUPS_ADD_MODIFY_CLASS
, /* Add or modify a class */
309 IPP_OP_CUPS_DELETE_CLASS
, /* Delete a class */
310 IPP_OP_CUPS_ACCEPT_JOBS
, /* Accept new jobs on a printer */
311 IPP_OP_CUPS_REJECT_JOBS
, /* Reject new jobs on a printer */
312 IPP_OP_CUPS_SET_DEFAULT
, /* Set the default printer */
313 IPP_OP_CUPS_GET_DEVICES
, /* Get a list of supported devices */
314 IPP_OP_CUPS_GET_PPDS
, /* Get a list of supported drivers */
315 IPP_OP_CUPS_MOVE_JOB
, /* Move a job to a different printer */
316 IPP_OP_CUPS_AUTHENTICATE_JOB
, /* Authenticate a job @since CUPS 1.2/OS X 10.5@ */
317 IPP_OP_CUPS_GET_PPD
, /* Get a PPD file @since CUPS 1.3/OS X 10.5@ */
318 IPP_OP_CUPS_GET_DOCUMENT
= 0x4027 /* Get a document file @since CUPS 1.4/OS X 10.6@ */
320 # ifndef _CUPS_NO_DEPRECATED
321 # define IPP_PRINT_JOB IPP_OP_PRINT_JOB
322 # define IPP_PRINT_URI IPP_OP_PRINT_URI
323 # define IPP_VALIDATE_JOB IPP_OP_VALIDATE_JOB
324 # define IPP_CREATE_JOB IPP_OP_CREATE_JOB
325 # define IPP_SEND_DOCUMENT IPP_OP_SEND_DOCUMENT
326 # define IPP_SEND_URI IPP_OP_SEND_URI
327 # define IPP_CANCEL_JOB IPP_OP_CANCEL_JOB
328 # define IPP_GET_JOB_ATTRIBUTES IPP_OP_GET_JOB_ATTRIBUTES
329 # define IPP_GET_JOBS IPP_OP_GET_JOBS
330 # define IPP_GET_PRINTER_ATTRIBUTES IPP_OP_GET_PRINTER_ATTRIBUTES
331 # define IPP_HOLD_JOB IPP_OP_HOLD_JOB
332 # define IPP_RELEASE_JOB IPP_OP_RELEASE_JOB
333 # define IPP_RESTART_JOB IPP_OP_RESTART_JOB
334 # define IPP_PAUSE_PRINTER IPP_OP_PAUSE_PRINTER
335 # define IPP_RESUME_PRINTER IPP_OP_RESUME_PRINTER
336 # define IPP_PURGE_JOBS IPP_OP_PURGE_JOBS
337 # define IPP_SET_PRINTER_ATTRIBUTES IPP_OP_SET_PRINTER_ATTRIBUTES
338 # define IPP_SET_JOB_ATTRIBUTES IPP_OP_SET_JOB_ATTRIBUTES
339 # define IPP_GET_PRINTER_SUPPORTED_VALUES IPP_OP_GET_PRINTER_SUPPORTED_VALUES
340 # define IPP_CREATE_PRINTER_SUBSCRIPTION IPP_OP_CREATE_PRINTER_SUBSCRIPTION
341 # define IPP_CREATE_JOB_SUBSCRIPTION IPP_OP_CREATE_JOB_SUBSCRIPTION
342 # define IPP_GET_SUBSCRIPTION_ATTRIBUTES IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES
343 # define IPP_GET_SUBSCRIPTIONS IPP_OP_GET_SUBSCRIPTIONS
344 # define IPP_RENEW_SUBSCRIPTION IPP_OP_RENEW_SUBSCRIPTION
345 # define IPP_CANCEL_SUBSCRIPTION IPP_OP_CANCEL_SUBSCRIPTION
346 # define IPP_GET_NOTIFICATIONS IPP_OP_GET_NOTIFICATIONS
347 # define IPP_SEND_NOTIFICATIONS IPP_OP_SEND_NOTIFICATIONS
348 # define IPP_GET_RESOURCE_ATTRIBUTES IPP_OP_GET_RESOURCE_ATTRIBUTES
349 # define IPP_GET_RESOURCE_DATA IPP_OP_GET_RESOURCE_DATA
350 # define IPP_GET_RESOURCES IPP_OP_GET_RESOURCES
351 # define IPP_GET_PRINT_SUPPORT_FILES IPP_OP_GET_PRINT_SUPPORT_FILES
352 # define IPP_ENABLE_PRINTER IPP_OP_ENABLE_PRINTER
353 # define IPP_DISABLE_PRINTER IPP_OP_DISABLE_PRINTER
354 # define IPP_PAUSE_PRINTER_AFTER_CURRENT_JOB IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB
355 # define IPP_HOLD_NEW_JOBS IPP_OP_HOLD_NEW_JOBS
356 # define IPP_RELEASE_HELD_NEW_JOBS IPP_OP_RELEASE_HELD_NEW_JOBS
357 # define IPP_DEACTIVATE_PRINTER IPP_OP_DEACTIVATE_PRINTER
358 # define IPP_ACTIVATE_PRINTER IPP_OP_ACTIVATE_PRINTER
359 # define IPP_RESTART_PRINTER IPP_OP_RESTART_PRINTER
360 # define IPP_SHUTDOWN_PRINTER IPP_OP_SHUTDOWN_PRINTER
361 # define IPP_STARTUP_PRINTER IPP_OP_STARTUP_PRINTER
362 # define IPP_REPROCESS_JOB IPP_OP_REPROCESS_JOB
363 # define IPP_CANCEL_CURRENT_JOB IPP_OP_CANCEL_CURRENT_JOB
364 # define IPP_SUSPEND_CURRENT_JOB IPP_OP_SUSPEND_CURRENT_JOB
365 # define IPP_RESUME_JOB IPP_OP_RESUME_JOB
366 # define IPP_PROMOTE_JOB IPP_OP_PROMOTE_JOB
367 # define IPP_SCHEDULE_JOB_AFTER IPP_OP_SCHEDULE_JOB_AFTER
368 # define IPP_CANCEL_DOCUMENT IPP_OP_CANCEL_DOCUMENT
369 # define IPP_GET_DOCUMENT_ATTRIBUTES IPP_OP_GET_DOCUMENT_ATTRIBUTES
370 # define IPP_GET_DOCUMENTS IPP_OP_GET_DOCUMENTS
371 # define IPP_DELETE_DOCUMENT IPP_OP_DELETE_DOCUMENT
372 # define IPP_SET_DOCUMENT_ATTRIBUTES IPP_OP_SET_DOCUMENT_ATTRIBUTES
373 # define IPP_CANCEL_JOBS IPP_OP_CANCEL_JOBS
374 # define IPP_CANCEL_MY_JOBS IPP_OP_CANCEL_MY_JOBS
375 # define IPP_RESUBMIT_JOB IPP_OP_RESUBMIT_JOB
376 # define IPP_CLOSE_JOB IPP_OP_CLOSE_JOB
377 # define IPP_IDENTIFY_PRINTER IPP_OP_IDENTIFY_PRINTER
378 # define IPP_VALIDATE_DOCUMENT IPP_OP_VALIDATE_DOCUMENT
379 # define IPP_PRIVATE IPP_OP_PRIVATE
380 # define CUPS_GET_DEFAULT IPP_OP_CUPS_GET_DEFAULT
381 # define CUPS_GET_PRINTERS IPP_OP_CUPS_GET_PRINTERS
382 # define CUPS_ADD_MODIFY_PRINTER IPP_OP_CUPS_ADD_MODIFY_PRINTER
383 # define CUPS_DELETE_PRINTER IPP_OP_CUPS_DELETE_PRINTER
384 # define CUPS_GET_CLASSES IPP_OP_CUPS_GET_CLASSES
385 # define CUPS_ADD_MODIFY_CLASS IPP_OP_CUPS_ADD_MODIFY_CLASS
386 # define CUPS_DELETE_CLASS IPP_OP_CUPS_DELETE_CLASS
387 # define CUPS_ACCEPT_JOBS IPP_OP_CUPS_ACCEPT_JOBS
388 # define CUPS_REJECT_JOBS IPP_OP_CUPS_REJECT_JOBS
389 # define CUPS_SET_DEFAULT IPP_OP_CUPS_SET_DEFAULT
390 # define CUPS_GET_DEVICES IPP_OP_CUPS_GET_DEVICES
391 # define CUPS_GET_PPDS IPP_OP_CUPS_GET_PPDS
392 # define CUPS_MOVE_JOB IPP_OP_CUPS_MOVE_JOB
393 # define CUPS_AUTHENTICATE_JOB IPP_OP_CUPS_AUTHENTICATE_JOB
394 # define CUPS_GET_PPD IPP_OP_CUPS_GET_PPD
395 # define CUPS_GET_DOCUMENT IPP_OP_CUPS_GET_DOCUMENT
397 # define CUPS_ADD_PRINTER IPP_OP_CUPS_ADD_MODIFY_PRINTER
398 # define CUPS_ADD_CLASS IPP_OP_CUPS_ADD_MODIFY_CLASS
399 # endif /* !_CUPS_NO_DEPRECATED */
402 typedef enum ipp_orient_e
/**** Orientation values ****/
404 IPP_ORIENT_PORTRAIT
= 3, /* No rotation */
405 IPP_ORIENT_LANDSCAPE
, /* 90 degrees counter-clockwise */
406 IPP_ORIENT_REVERSE_LANDSCAPE
, /* 90 degrees clockwise */
407 IPP_ORIENT_REVERSE_PORTRAIT
/* 180 degrees */
409 # ifndef _CUPS_NO_DEPRECATED
410 # define IPP_PORTRAIT IPP_ORIENT_PORTRAIT
411 # define IPP_LANDSCAPE IPP_ORIENT_LANDSCAPE
412 # define IPP_REVERSE_LANDSCAPE IPP_ORIENT_REVERSE_LANDSCAPE
413 # define IPP_REVERSE_PORTRAIT IPP_ORIENT_REVERSE_PORTRAIT
414 # endif /* !_CUPS_NO_DEPRECATED */
417 typedef enum ipp_pstate_e
/**** Printer states ****/
419 IPP_PSTATE_IDLE
= 3, /* Printer is idle */
420 IPP_PSTATE_PROCESSING
, /* Printer is working */
421 IPP_PSTATE_STOPPED
/* Printer is stopped */
423 # ifndef _CUPS_NO_DEPRECATED
424 # define IPP_PRINTER_IDLE IPP_PSTATE_IDLE
425 # define IPP_PRINTER_PROCESSING IPP_PSTATE_PROCESSING
426 # define IPP_PRINTER_STOPPED IPP_PSTATE_STOPPED
427 # endif /* _CUPS_NO_DEPRECATED */
430 typedef enum ipp_quality_e
/**** Qualities ****/
432 IPP_QUALITY_DRAFT
= 3, /* Draft quality */
433 IPP_QUALITY_NORMAL
, /* Normal quality */
434 IPP_QUALITY_HIGH
/* High quality */
437 typedef enum ipp_res_e
/**** Resolution units ****/
439 IPP_RES_PER_INCH
= 3, /* Pixels per inch */
440 IPP_RES_PER_CM
/* Pixels per centimeter */
443 typedef enum ipp_state_e
/**** IPP states ****/
445 IPP_STATE_ERROR
= -1, /* An error occurred */
446 IPP_STATE_IDLE
, /* Nothing is happening/request completed */
447 IPP_STATE_HEADER
, /* The request header needs to be sent/received */
448 IPP_STATE_ATTRIBUTE
, /* One or more attributes need to be sent/received */
449 IPP_STATE_DATA
/* IPP request data needs to be sent/received */
451 # ifndef _CUPS_NO_DEPRECATED
452 # define IPP_ERROR IPP_STATE_ERROR
453 # define IPP_IDLE IPP_STATE_IDLE
454 # define IPP_HEADER IPP_STATE_HEADER
455 # define IPP_ATTRIBUTE IPP_STATE_ATTRIBUTE
456 # define IPP_DATA IPP_STATE_DATA
457 # endif /* !_CUPS_NO_DEPRECATED */
460 typedef enum ipp_status_e
/**** IPP status codes ****/
462 IPP_STATUS_CUPS_INVALID
= -1, /* Invalid status name for @link ippErrorValue@ */
463 IPP_STATUS_OK
= 0x0000, /* successful-ok */
464 IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED
, /* successful-ok-ignored-or-substituted-attributes */
465 IPP_STATUS_OK_CONFLICTING
, /* successful-ok-conflicting-attributes */
466 IPP_STATUS_OK_IGNORED_SUBSCRIPTIONS
, /* successful-ok-ignored-subscriptions */
467 IPP_STATUS_OK_IGNORED_NOTIFICATIONS
, /* successful-ok-ignored-notifications @private@ */
468 IPP_STATUS_OK_TOO_MANY_EVENTS
, /* successful-ok-too-many-events */
469 IPP_STATUS_OK_BUT_CANCEL_SUBSCRIPTION
,/* successful-ok-but-cancel-subscription @private@ */
470 IPP_STATUS_OK_EVENTS_COMPLETE
, /* successful-ok-events-complete */
471 IPP_STATUS_REDIRECTION_OTHER_SITE
= 0x0200,
472 /* redirection-other-site @private@ */
473 IPP_STATUS_CUPS_SEE_OTHER
= 0x0280, /* cups-see-other */
474 IPP_STATUS_ERROR_BAD_REQUEST
= 0x0400,/* client-error-bad-request */
475 IPP_STATUS_ERROR_FORBIDDEN
, /* client-error-forbidden */
476 IPP_STATUS_ERROR_NOT_AUTHENTICATED
, /* client-error-not-authenticated */
477 IPP_STATUS_ERROR_NOT_AUTHORIZED
, /* client-error-not-authorized */
478 IPP_STATUS_ERROR_NOT_POSSIBLE
, /* client-error-not-possible */
479 IPP_STATUS_ERROR_TIMEOUT
, /* client-error-timeout */
480 IPP_STATUS_ERROR_NOT_FOUND
, /* client-error-not-found */
481 IPP_STATUS_ERROR_GONE
, /* client-error-gone */
482 IPP_STATUS_ERROR_REQUEST_ENTITY
, /* client-error-request-entity-too-large */
483 IPP_STATUS_ERROR_REQUEST_VALUE
, /* client-error-request-value-too-long */
484 IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED
,
485 /* client-error-document-format-not-supported */
486 IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES
,/* client-error-attributes-or-values-not-supported */
487 IPP_STATUS_ERROR_URI_SCHEME
, /* client-error-uri-scheme-not-supported */
488 IPP_STATUS_ERROR_CHARSET
, /* client-error-charset-not-supported */
489 IPP_STATUS_ERROR_CONFLICTING
, /* client-error-conflicting-attributes */
490 IPP_STATUS_ERROR_COMPRESSION_NOT_SUPPORTED
,
491 /* client-error-compression-not-supported */
492 IPP_STATUS_ERROR_COMPRESSION_ERROR
, /* client-error-compression-error */
493 IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR
,
494 /* client-error-document-format-error */
495 IPP_STATUS_ERROR_DOCUMENT_ACCESS
, /* client-error-document-access-error */
496 IPP_STATUS_ERROR_ATTRIBUTES_NOT_SETTABLE
,
497 /* client-error-attributes-not-settable */
498 IPP_STATUS_ERROR_IGNORED_ALL_SUBSCRIPTIONS
,
499 /* client-error-ignored-all-subscriptions */
500 IPP_STATUS_ERROR_TOO_MANY_SUBSCRIPTIONS
,
501 /* client-error-too-many-subscriptions */
502 IPP_STATUS_ERROR_IGNORED_ALL_NOTIFICATIONS
,
503 /* client-error-ignored-all-notifications @private@ */
504 IPP_STATUS_ERROR_PRINT_SUPPORT_FILE_NOT_FOUND
,
505 /* client-error-print-support-file-not-found @private@ */
506 IPP_STATUS_ERROR_DOCUMENT_PASSWORD
, /* client-error-document-password-error */
507 IPP_STATUS_ERROR_DOCUMENT_PERMISSION
, /* client-error-document-permission-error */
508 IPP_STATUS_ERROR_DOCUMENT_SECURITY
, /* client-error-document-security-error */
509 IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE
,/* client-error-document-unprintable-error */
511 /* Proposed extensions for paid printing */
512 IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED
= 0x049C,
513 /* cups-error-account-info-needed @since CUPS 1.7/OS X 10.9@ */
514 IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED
, /* cups-error-account-closed @since CUPS 1.7/OS X 10.9@ */
515 IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED
,
516 /* cups-error-account-limit-reached @since CUPS 1.7/OS X 10.9@ */
517 IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED
,
518 /* cups-error-account-authorization-failed @since CUPS 1.7/OS X 10.9@ */
520 IPP_STATUS_ERROR_INTERNAL
= 0x0500, /* server-error-internal-error */
521 IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED
,
522 /* server-error-operation-not-supported */
523 IPP_STATUS_ERROR_SERVICE_UNAVAILABLE
, /* server-error-service-unavailable */
524 IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED
,
525 /* server-error-version-not-supported */
526 IPP_STATUS_ERROR_DEVICE
, /* server-error-device-error */
527 IPP_STATUS_ERROR_TEMPORARY
, /* server-error-temporary-error */
528 IPP_STATUS_ERROR_NOT_ACCEPTING_JOBS
, /* server-error-not-accepting-jobs */
529 IPP_STATUS_ERROR_BUSY
, /* server-error-busy */
530 IPP_STATUS_ERROR_JOB_CANCELED
, /* server-error-job-canceled */
531 IPP_STATUS_ERROR_MULTIPLE_JOBS_NOT_SUPPORTED
,
532 /* server-error-multiple-document-jobs-not-supported */
533 IPP_STATUS_ERROR_PRINTER_IS_DEACTIVATED
,
534 /* server-error-printer-is-deactivated */
535 IPP_STATUS_ERROR_TOO_MANY_JOBS
, /* server-error-too-many-jobs */
536 IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS
, /* server-error-too-many-documents */
538 /* These are internal and never sent over the wire... */
539 IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED
= 0x1000,
540 /* cups-authentication-canceled - Authentication canceled by user @since CUPS 1.5/OS X 10.7@ */
541 IPP_STATUS_ERROR_CUPS_PKI
, /* cups-pki-error - Error negotiating a secure connection @since CUPS 1.5/OS X 10.7@ */
542 IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED
/* cups-upgrade-required - TLS upgrade required */
544 # ifndef _CUPS_NO_DEPRECATED
545 # define IPP_OK IPP_STATUS_OK
546 # define IPP_OK_SUBST IPP_STATUS_OK_IGNORED_OR_SUBSTITUTED
547 # define IPP_OK_CONFLICT IPP_STATUS_OK_CONFLICTING
548 # define IPP_OK_IGNORED_SUBSCRIPTIONS IPP_STATUS_OK_IGNORED_SUBSCRIPTIONS
549 # define IPP_OK_IGNORED_NOTIFICATIONS IPP_STATUS_OK_IGNORED_NOTIFICATIONS
550 # define IPP_OK_TOO_MANY_EVENTS IPP_STATUS_OK_TOO_MANY_EVENTS
551 # define IPP_OK_BUT_CANCEL_SUBSCRIPTION IPP_STATUS_OK_BUT_CANCEL_SUBSCRIPTION
552 # define IPP_OK_EVENTS_COMPLETE IPP_STATUS_OK_EVENTS_COMPLETE
553 # define IPP_REDIRECTION_OTHER_SITE IPP_STATUS_REDIRECTION_OTHER_SITE
554 # define CUPS_SEE_OTHER IPP_STATUS_CUPS_SEE_OTHER
555 # define IPP_BAD_REQUEST IPP_STATUS_ERROR_BAD_REQUEST
556 # define IPP_FORBIDDEN IPP_STATUS_ERROR_FORBIDDEN
557 # define IPP_NOT_AUTHENTICATED IPP_STATUS_ERROR_NOT_AUTHENTICATED
558 # define IPP_NOT_AUTHORIZED IPP_STATUS_ERROR_NOT_AUTHORIZED
559 # define IPP_NOT_POSSIBLE IPP_STATUS_ERROR_NOT_POSSIBLE
560 # define IPP_TIMEOUT IPP_STATUS_ERROR_TIMEOUT
561 # define IPP_NOT_FOUND IPP_STATUS_ERROR_NOT_FOUND
562 # define IPP_GONE IPP_STATUS_ERROR_GONE
563 # define IPP_REQUEST_ENTITY IPP_STATUS_ERROR_REQUEST_ENTITY
564 # define IPP_REQUEST_VALUE IPP_STATUS_ERROR_REQUEST_VALUE
565 # define IPP_DOCUMENT_FORMAT IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED
566 # define IPP_ATTRIBUTES IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES
567 # define IPP_URI_SCHEME IPP_STATUS_ERROR_URI_SCHEME
568 # define IPP_CHARSET IPP_STATUS_ERROR_CHARSET
569 # define IPP_CONFLICT IPP_STATUS_ERROR_CONFLICTING
570 # define IPP_COMPRESSION_NOT_SUPPORTED IPP_STATUS_ERROR_COMPRESSION_NOT_SUPPORTED
571 # define IPP_COMPRESSION_ERROR IPP_STATUS_ERROR_COMPRESSION_ERROR
572 # define IPP_DOCUMENT_FORMAT_ERROR IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR
573 # define IPP_DOCUMENT_ACCESS_ERROR IPP_STATUS_ERROR_DOCUMENT_ACCESS
574 # define IPP_ATTRIBUTES_NOT_SETTABLE IPP_STATUS_ERROR_ATTRIBUTES_NOT_SETTABLE
575 # define IPP_IGNORED_ALL_SUBSCRIPTIONS IPP_STATUS_ERROR_IGNORED_ALL_SUBSCRIPTIONS
576 # define IPP_TOO_MANY_SUBSCRIPTIONS IPP_STATUS_ERROR_TOO_MANY_SUBSCRIPTIONS
577 # define IPP_IGNORED_ALL_NOTIFICATIONS IPP_STATUS_ERROR_IGNORED_ALL_NOTIFICATIONS
578 # define IPP_PRINT_SUPPORT_FILE_NOT_FOUND IPP_STATUS_ERROR_PRINT_SUPPORT_FILE_NOT_FOUND
579 # define IPP_DOCUMENT_PASSWORD_ERROR IPP_STATUS_ERROR_DOCUMENT_PASSWORD
580 # define IPP_DOCUMENT_PERMISSION_ERROR IPP_STATUS_ERROR_DOCUMENT_PERMISSION
581 # define IPP_DOCUMENT_SECURITY_ERROR IPP_STATUS_ERROR_DOCUMENT_SECURITY
582 # define IPP_DOCUMENT_UNPRINTABLE_ERROR IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE
583 # define IPP_INTERNAL_ERROR IPP_STATUS_ERROR_INTERNAL
584 # define IPP_OPERATION_NOT_SUPPORTED IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED
585 # define IPP_SERVICE_UNAVAILABLE IPP_STATUS_ERROR_SERVICE_UNAVAILABLE
586 # define IPP_VERSION_NOT_SUPPORTED IPP_STATUS_ERROR_VERSION_NOT_SUPPORTED
587 # define IPP_DEVICE_ERROR IPP_STATUS_ERROR_DEVICE
588 # define IPP_TEMPORARY_ERROR IPP_STATUS_ERROR_TEMPORARY
589 # define IPP_NOT_ACCEPTING IPP_STATUS_ERROR_NOT_ACCEPTING_JOBS
590 # define IPP_PRINTER_BUSY IPP_STATUS_ERROR_BUSY
591 # define IPP_ERROR_JOB_CANCELED IPP_STATUS_ERROR_JOB_CANCELED
592 # define IPP_MULTIPLE_JOBS_NOT_SUPPORTED IPP_STATUS_ERROR_MULTIPLE_JOBS_NOT_SUPPORTED
593 # define IPP_PRINTER_IS_DEACTIVATED IPP_STATUS_ERROR_PRINTER_IS_DEACTIVATED
594 # define IPP_TOO_MANY_JOBS IPP_STATUS_ERROR_TOO_MANY_JOBS
595 # define IPP_TOO_MANY_DOCUMENTS IPP_STATUS_ERROR_TOO_MANY_DOCUMENTS
596 # define IPP_AUTHENTICATION_CANCELED IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED
597 # define IPP_PKI_ERROR IPP_STATUS_ERROR_CUPS_PKI
598 # define IPP_UPGRADE_REQUIRED IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED
599 /* Legacy name for canceled status */
600 # define IPP_ERROR_JOB_CANCELLED IPP_STATUS_ERROR_JOB_CANCELED
601 # endif /* _CUPS_NO_DEPRECATED */
604 typedef enum ipp_tag_e
/**** Format tags for attributes ****/
606 IPP_TAG_CUPS_INVALID
= -1, /* Invalid tag name for @link ippTagValue@ */
607 IPP_TAG_ZERO
= 0x00, /* Zero tag - used for separators */
608 IPP_TAG_OPERATION
, /* Operation group */
609 IPP_TAG_JOB
, /* Job group */
610 IPP_TAG_END
, /* End-of-attributes */
611 IPP_TAG_PRINTER
, /* Printer group */
612 IPP_TAG_UNSUPPORTED_GROUP
, /* Unsupported attributes group */
613 IPP_TAG_SUBSCRIPTION
, /* Subscription group */
614 IPP_TAG_EVENT_NOTIFICATION
, /* Event group */
615 IPP_TAG_RESOURCE
, /* Resource group @private@ */
616 IPP_TAG_DOCUMENT
, /* Document group */
617 IPP_TAG_UNSUPPORTED_VALUE
= 0x10, /* Unsupported value */
618 IPP_TAG_DEFAULT
, /* Default value */
619 IPP_TAG_UNKNOWN
, /* Unknown value */
620 IPP_TAG_NOVALUE
, /* No-value value */
621 IPP_TAG_NOTSETTABLE
= 0x15, /* Not-settable value */
622 IPP_TAG_DELETEATTR
, /* Delete-attribute value */
623 IPP_TAG_ADMINDEFINE
, /* Admin-defined value */
624 IPP_TAG_INTEGER
= 0x21, /* Integer value */
625 IPP_TAG_BOOLEAN
, /* Boolean value */
626 IPP_TAG_ENUM
, /* Enumeration value */
627 IPP_TAG_STRING
= 0x30, /* Octet string value */
628 IPP_TAG_DATE
, /* Date/time value */
629 IPP_TAG_RESOLUTION
, /* Resolution value */
630 IPP_TAG_RANGE
, /* Range value */
631 IPP_TAG_BEGIN_COLLECTION
, /* Beginning of collection value */
632 IPP_TAG_TEXTLANG
, /* Text-with-language value */
633 IPP_TAG_NAMELANG
, /* Name-with-language value */
634 IPP_TAG_END_COLLECTION
, /* End of collection value */
635 IPP_TAG_TEXT
= 0x41, /* Text value */
636 IPP_TAG_NAME
, /* Name value */
637 IPP_TAG_RESERVED_STRING
, /* Reserved for future string value @private@ */
638 IPP_TAG_KEYWORD
, /* Keyword value */
639 IPP_TAG_URI
, /* URI value */
640 IPP_TAG_URISCHEME
, /* URI scheme value */
641 IPP_TAG_CHARSET
, /* Character set value */
642 IPP_TAG_LANGUAGE
, /* Language value */
643 IPP_TAG_MIMETYPE
, /* MIME media type value */
644 IPP_TAG_MEMBERNAME
, /* Collection member name value */
645 IPP_TAG_EXTENSION
= 0x7f, /* Extension point for 32-bit tags */
646 IPP_TAG_CUPS_MASK
= 0x7fffffff, /* Mask for copied attribute values @private@ */
647 /* The following expression is used to avoid compiler warnings with +/-0x80000000 */
648 IPP_TAG_CUPS_CONST
= -0x7fffffff-1 /* Bitflag for copied/const attribute values @private@ */
650 # ifndef _CUPS_NO_DEPRECATED
651 # define IPP_TAG_MASK IPP_TAG_CUPS_MASK
652 # define IPP_TAG_COPY IPP_TAG_CUPS_CONST
653 # endif /* !_CUPS_NO_DEPRECATED */
656 typedef unsigned char ipp_uchar_t
; /**** Unsigned 8-bit integer/character ****/
657 typedef struct _ipp_s ipp_t
; /**** IPP request/response data ****/
658 typedef struct _ipp_attribute_s ipp_attribute_t
;
659 /**** IPP attribute ****/
661 /**** New in CUPS 1.2/OS X 10.5 ****/
662 typedef ssize_t (*ipp_iocb_t
)(void *context
, ipp_uchar_t
*buffer
, size_t bytes
);
663 /**** IPP IO Callback Function @since CUPS 1.2/OS X 10.5@ ****/
665 /**** New in CUPS 1.6/OS X 10.8 ****/
666 typedef int (*ipp_copycb_t
)(void *context
, ipp_t
*dst
, ipp_attribute_t
*attr
);
670 * The following structures are PRIVATE starting with CUPS 1.6/OS X 10.8.
671 * Please use the new accessor functions available in CUPS 1.6 and later, as
672 * these definitions will be moved to a private header file in a future release.
674 * Define _IPP_PRIVATE_STRUCTURES to 1 to cause the private IPP structures to be
675 * exposed in CUPS 1.6. This happens automatically on OS X when compiling for
676 * a deployment target of 10.7 or earlier.
678 * Define _IPP_PRIVATE_STRUCTURES to 0 to prevent the private IPP structures
679 * from being exposed. This is useful when migrating existing code to the new
683 # ifdef _IPP_PRIVATE_STRUCTURES
684 /* Somebody has overridden the value */
685 # elif defined(_CUPS_SOURCE) || defined(_CUPS_IPP_PRIVATE_H_)
687 # define _IPP_PRIVATE_STRUCTURES 1
688 # elif defined(__APPLE__)
689 # if defined(MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8
690 /* Building for 10.7 and earlier */
691 # define _IPP_PRIVATE_STRUCTURES 1
692 # elif !defined(MAC_OS_X_VERSION_10_8)
693 /* Building for 10.7 and earlier */
694 # define _IPP_PRIVATE_STRUCTURES 1
695 # endif /* MAC_OS_X_VERSION_10_8 && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8 */
697 # define _IPP_PRIVATE_STRUCTURES 0
698 # endif /* _CUPS_SOURCE || _CUPS_IPP_PRIVATE_H_ */
700 # if _IPP_PRIVATE_STRUCTURES
701 typedef union _ipp_request_u
/**** Request Header ****/
703 struct /* Any Header */
705 ipp_uchar_t version
[2]; /* Protocol version number */
706 int op_status
; /* Operation ID or status code*/
707 int request_id
; /* Request ID */
710 struct /* Operation Header */
712 ipp_uchar_t version
[2]; /* Protocol version number */
713 ipp_op_t operation_id
; /* Operation ID */
714 int request_id
; /* Request ID */
717 struct /* Status Header */
719 ipp_uchar_t version
[2]; /* Protocol version number */
720 ipp_status_t status_code
; /* Status code */
721 int request_id
; /* Request ID */
724 /**** New in CUPS 1.1.19 ****/
725 struct /* Event Header @since CUPS 1.1.19/OS X 10.3@ */
727 ipp_uchar_t version
[2]; /* Protocol version number */
728 ipp_status_t status_code
; /* Status code */
729 int request_id
; /* Request ID */
733 /**** New in CUPS 1.1.19 ****/
735 typedef union _ipp_value_u
/**** Attribute Value ****/
737 int integer
; /* Integer/enumerated value */
739 char boolean
; /* Boolean value */
741 ipp_uchar_t date
[11]; /* Date/time value */
745 int xres
, /* Horizontal resolution */
746 yres
; /* Vertical resolution */
747 ipp_res_t units
; /* Resolution units */
748 } resolution
; /* Resolution value */
752 int lower
, /* Lower value */
753 upper
; /* Upper value */
754 } range
; /* Range of integers value */
758 char *language
; /* Language code */
759 char *text
; /* String */
760 } string
; /* String with language value */
764 int length
; /* Length of attribute */
765 void *data
; /* Data in attribute */
766 } unknown
; /* Unknown attribute type */
768 /**** New in CUPS 1.1.19 ****/
769 ipp_t
*collection
; /* Collection value @since CUPS 1.1.19/OS X 10.3@ */
771 typedef _ipp_value_t ipp_value_t
; /**** Convenience typedef that will be removed @private@ ****/
773 struct _ipp_attribute_s
/**** Attribute ****/
775 ipp_attribute_t
*next
; /* Next attribute in list */
776 ipp_tag_t group_tag
, /* Job/Printer/Operation group tag */
777 value_tag
; /* What type of value is it? */
778 char *name
; /* Name of attribute */
779 int num_values
; /* Number of values */
780 _ipp_value_t values
[1]; /* Values */
783 struct _ipp_s
/**** IPP Request/Response/Notification ****/
785 ipp_state_t state
; /* State of request */
786 _ipp_request_t request
; /* Request header */
787 ipp_attribute_t
*attrs
; /* Attributes */
788 ipp_attribute_t
*last
; /* Last attribute in list */
789 ipp_attribute_t
*current
; /* Current attribute (for read/write) */
790 ipp_tag_t curtag
; /* Current attribute group tag */
792 /**** New in CUPS 1.2 ****/
793 ipp_attribute_t
*prev
; /* Previous attribute (for read) @since CUPS 1.2/OS X 10.5@ */
795 /**** New in CUPS 1.4.4 ****/
796 int use
; /* Use count @since CUPS 1.4.4/OS X 10.6.?@ */
798 # endif /* _IPP_PRIVATE_STRUCTURES */
805 extern ipp_attribute_t
*ippAddBoolean(ipp_t
*ipp
, ipp_tag_t group
,
806 const char *name
, char value
);
807 extern ipp_attribute_t
*ippAddBooleans(ipp_t
*ipp
, ipp_tag_t group
,
808 const char *name
, int num_values
,
810 extern ipp_attribute_t
*ippAddDate(ipp_t
*ipp
, ipp_tag_t group
,
811 const char *name
, const ipp_uchar_t
*value
);
812 extern ipp_attribute_t
*ippAddInteger(ipp_t
*ipp
, ipp_tag_t group
,
813 ipp_tag_t value_tag
, const char *name
,
815 extern ipp_attribute_t
*ippAddIntegers(ipp_t
*ipp
, ipp_tag_t group
,
816 ipp_tag_t value_tag
, const char *name
,
817 int num_values
, const int *values
);
818 extern ipp_attribute_t
*ippAddRange(ipp_t
*ipp
, ipp_tag_t group
,
819 const char *name
, int lower
, int upper
);
820 extern ipp_attribute_t
*ippAddRanges(ipp_t
*ipp
, ipp_tag_t group
,
821 const char *name
, int num_values
,
822 const int *lower
, const int *upper
);
823 extern ipp_attribute_t
*ippAddResolution(ipp_t
*ipp
, ipp_tag_t group
,
824 const char *name
, ipp_res_t units
,
826 extern ipp_attribute_t
*ippAddResolutions(ipp_t
*ipp
, ipp_tag_t group
,
827 const char *name
, int num_values
,
828 ipp_res_t units
, const int *xres
,
830 extern ipp_attribute_t
*ippAddSeparator(ipp_t
*ipp
);
831 extern ipp_attribute_t
*ippAddString(ipp_t
*ipp
, ipp_tag_t group
,
832 ipp_tag_t value_tag
, const char *name
,
833 const char *language
, const char *value
);
834 extern ipp_attribute_t
*ippAddStrings(ipp_t
*ipp
, ipp_tag_t group
,
835 ipp_tag_t value_tag
, const char *name
,
836 int num_values
, const char *language
,
837 const char * const *values
);
838 extern time_t ippDateToTime(const ipp_uchar_t
*date
);
839 extern void ippDelete(ipp_t
*ipp
);
840 extern const char *ippErrorString(ipp_status_t error
);
841 extern ipp_attribute_t
*ippFindAttribute(ipp_t
*ipp
, const char *name
,
842 ipp_tag_t value_tag
);
843 extern ipp_attribute_t
*ippFindNextAttribute(ipp_t
*ipp
, const char *name
,
844 ipp_tag_t value_tag
);
845 extern size_t ippLength(ipp_t
*ipp
);
846 extern ipp_t
*ippNew(void);
847 extern ipp_state_t
ippRead(http_t
*http
, ipp_t
*ipp
);
848 extern const ipp_uchar_t
*ippTimeToDate(time_t t
);
849 extern ipp_state_t
ippWrite(http_t
*http
, ipp_t
*ipp
);
850 extern int ippPort(void);
851 extern void ippSetPort(int p
);
853 /**** New in CUPS 1.1.19 ****/
854 extern ipp_attribute_t
*ippAddCollection(ipp_t
*ipp
, ipp_tag_t group
,
855 const char *name
, ipp_t
*value
) _CUPS_API_1_1_19
;
856 extern ipp_attribute_t
*ippAddCollections(ipp_t
*ipp
, ipp_tag_t group
,
857 const char *name
, int num_values
,
858 const ipp_t
**values
) _CUPS_API_1_1_19
;
859 extern void ippDeleteAttribute(ipp_t
*ipp
, ipp_attribute_t
*attr
) _CUPS_API_1_1_19
;
860 extern ipp_state_t
ippReadFile(int fd
, ipp_t
*ipp
) _CUPS_API_1_1_19
;
861 extern ipp_state_t
ippWriteFile(int fd
, ipp_t
*ipp
) _CUPS_API_1_1_19
;
863 /**** New in CUPS 1.2/OS X 10.5 ****/
864 extern ipp_attribute_t
*ippAddOctetString(ipp_t
*ipp
, ipp_tag_t group
,
866 const void *data
, int datalen
) _CUPS_API_1_2
;
867 extern ipp_status_t
ippErrorValue(const char *name
) _CUPS_API_1_2
;
868 extern ipp_t
*ippNewRequest(ipp_op_t op
) _CUPS_API_1_2
;
869 extern const char *ippOpString(ipp_op_t op
) _CUPS_API_1_2
;
870 extern ipp_op_t
ippOpValue(const char *name
) _CUPS_API_1_2
;
871 extern ipp_state_t
ippReadIO(void *src
, ipp_iocb_t cb
, int blocking
,
872 ipp_t
*parent
, ipp_t
*ipp
) _CUPS_API_1_2
;
873 extern ipp_state_t
ippWriteIO(void *dst
, ipp_iocb_t cb
, int blocking
,
874 ipp_t
*parent
, ipp_t
*ipp
) _CUPS_API_1_2
;
876 /**** New in CUPS 1.4/OS X 10.6 ****/
877 extern const char *ippTagString(ipp_tag_t tag
) _CUPS_API_1_4
;
878 extern ipp_tag_t
ippTagValue(const char *name
) _CUPS_API_1_4
;
880 /**** New in CUPS 1.6/OS X 10.8 ****/
881 extern ipp_attribute_t
*ippAddOutOfBand(ipp_t
*ipp
, ipp_tag_t group
,
882 ipp_tag_t value_tag
, const char *name
)
884 extern size_t ippAttributeString(ipp_attribute_t
*attr
, char *buffer
,
885 size_t bufsize
) _CUPS_API_1_6
;
886 extern ipp_attribute_t
*ippCopyAttribute(ipp_t
*dst
, ipp_attribute_t
*attr
,
887 int quickcopy
) _CUPS_API_1_6
;
888 extern int ippCopyAttributes(ipp_t
*dst
, ipp_t
*src
,
889 int quickcopy
, ipp_copycb_t cb
,
890 void *context
) _CUPS_API_1_6
;
891 extern int ippDeleteValues(ipp_t
*ipp
, ipp_attribute_t
**attr
,
892 int element
, int count
) _CUPS_API_1_6
;
893 extern const char *ippEnumString(const char *attrname
, int enumvalue
)
895 extern int ippEnumValue(const char *attrname
,
896 const char *enumstring
) _CUPS_API_1_6
;
897 extern ipp_attribute_t
*ippFirstAttribute(ipp_t
*ipp
) _CUPS_API_1_6
;
898 extern int ippGetBoolean(ipp_attribute_t
*attr
, int element
)
900 extern ipp_t
*ippGetCollection(ipp_attribute_t
*attr
,
901 int element
) _CUPS_API_1_6
;
902 extern int ippGetCount(ipp_attribute_t
*attr
) _CUPS_API_1_6
;
903 extern const ipp_uchar_t
*ippGetDate(ipp_attribute_t
*attr
, int element
)
905 extern ipp_tag_t
ippGetGroupTag(ipp_attribute_t
*attr
) _CUPS_API_1_6
;
906 extern int ippGetInteger(ipp_attribute_t
*attr
, int element
)
908 extern const char *ippGetName(ipp_attribute_t
*attr
) _CUPS_API_1_6
;
909 extern ipp_op_t
ippGetOperation(ipp_t
*ipp
) _CUPS_API_1_6
;
910 extern int ippGetRange(ipp_attribute_t
*attr
, int element
,
911 int *upper
) _CUPS_API_1_6
;
912 extern int ippGetRequestId(ipp_t
*ipp
) _CUPS_API_1_6
;
913 extern int ippGetResolution(ipp_attribute_t
*attr
, int element
,
914 int *yres
, ipp_res_t
*units
)
916 extern ipp_state_t
ippGetState(ipp_t
*ipp
) _CUPS_API_1_6
;
917 extern ipp_status_t
ippGetStatusCode(ipp_t
*ipp
) _CUPS_API_1_6
;
918 extern const char *ippGetString(ipp_attribute_t
*attr
, int element
,
919 const char **language
) _CUPS_API_1_6
;
920 extern ipp_tag_t
ippGetValueTag(ipp_attribute_t
*attr
) _CUPS_API_1_6
;
921 extern int ippGetVersion(ipp_t
*ipp
, int *minor
) _CUPS_API_1_6
;
922 extern ipp_attribute_t
*ippNextAttribute(ipp_t
*ipp
) _CUPS_API_1_6
;
923 extern int ippSetBoolean(ipp_t
*ipp
, ipp_attribute_t
**attr
,
924 int element
, int boolvalue
) _CUPS_API_1_6
;
925 extern int ippSetCollection(ipp_t
*ipp
, ipp_attribute_t
**attr
,
926 int element
, ipp_t
*colvalue
)
928 extern int ippSetDate(ipp_t
*ipp
, ipp_attribute_t
**attr
,
929 int element
, const ipp_uchar_t
*datevalue
)
931 extern int ippSetGroupTag(ipp_t
*ipp
, ipp_attribute_t
**attr
,
932 ipp_tag_t group_tag
) _CUPS_API_1_6
;
933 extern int ippSetInteger(ipp_t
*ipp
, ipp_attribute_t
**attr
,
934 int element
, int intvalue
) _CUPS_API_1_6
;
935 extern int ippSetName(ipp_t
*ipp
, ipp_attribute_t
**attr
,
936 const char *name
) _CUPS_API_1_6
;
937 extern int ippSetOperation(ipp_t
*ipp
, ipp_op_t op
) _CUPS_API_1_6
;
938 extern int ippSetRange(ipp_t
*ipp
, ipp_attribute_t
**attr
,
939 int element
, int lowervalue
, int uppervalue
)
941 extern int ippSetRequestId(ipp_t
*ipp
, int request_id
)
943 extern int ippSetResolution(ipp_t
*ipp
, ipp_attribute_t
**attr
,
944 int element
, ipp_res_t unitsvalue
,
945 int xresvalue
, int yresvalue
)
947 extern int ippSetState(ipp_t
*ipp
, ipp_state_t state
)
949 extern int ippSetStatusCode(ipp_t
*ipp
, ipp_status_t status
)
951 extern int ippSetString(ipp_t
*ipp
, ipp_attribute_t
**attr
,
952 int element
, const char *strvalue
)
954 extern int ippSetValueTag(ipp_t
*ipp
, ipp_attribute_t
**attr
,
955 ipp_tag_t value_tag
) _CUPS_API_1_6
;
956 extern int ippSetVersion(ipp_t
*ipp
, int major
, int minor
)
959 /**** New in CUPS 1.7 ****/
960 extern ipp_attribute_t
*ippAddStringf(ipp_t
*ipp
, ipp_tag_t group
,
961 ipp_tag_t value_tag
, const char *name
,
962 const char *language
, const char *format
,
964 extern ipp_attribute_t
*ippAddStringfv(ipp_t
*ipp
, ipp_tag_t group
,
965 ipp_tag_t value_tag
, const char *name
,
966 const char *language
,
967 const char *format
, va_list ap
)
969 extern int ippContainsInteger(ipp_attribute_t
*attr
, int value
)
971 extern int ippContainsString(ipp_attribute_t
*attr
,
972 const char *value
) _CUPS_API_1_7
;
973 extern cups_array_t
*ippCreateRequestedArray(ipp_t
*request
) _CUPS_API_1_7
;
974 extern void *ippGetOctetString(ipp_attribute_t
*attr
, int element
,
975 int *datalen
) _CUPS_API_1_7
;
976 extern ipp_t
*ippNewResponse(ipp_t
*request
) _CUPS_API_1_7
;
977 extern int ippSetOctetString(ipp_t
*ipp
, ipp_attribute_t
**attr
,
978 int element
, const void *data
,
979 int datalen
) _CUPS_API_1_7
;
980 extern int ippSetStringf(ipp_t
*ipp
, ipp_attribute_t
**attr
,
981 int element
, const char *format
,
983 extern int ippSetStringfv(ipp_t
*ipp
, ipp_attribute_t
**attr
,
984 int element
, const char *format
,
985 va_list ap
) _CUPS_API_1_7
;
986 extern int ippValidateAttribute(ipp_attribute_t
*attr
)
988 extern int ippValidateAttributes(ipp_t
*ipp
) _CUPS_API_1_7
;
991 /**** New in CUPS 2.0 ****/
992 extern const char *ippStateString(ipp_state_t state
) _CUPS_API_2_0
;
1001 # endif /* __cplusplus */
1002 #endif /* !_CUPS_IPP_H_ */