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