X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=cups%2Fipp.h;h=6402855a757dd21c2448ca2dd662ee8b269b1b0a;hb=5754bcceeb6b5d810a3161dd42eaa0c1268e7c1d;hp=a55ed40350d8a127414fc6d20f705a4753630d1d;hpb=42404685b74b7dc2d0270cd6aef413e3e0eaed8d;p=thirdparty%2Fcups.git diff --git a/cups/ipp.h b/cups/ipp.h index a55ed4035..6402855a7 100644 --- a/cups/ipp.h +++ b/cups/ipp.h @@ -1,18 +1,11 @@ /* - * "$Id$" - * * Internet Printing Protocol definitions for CUPS. * - * Copyright 2007-2014 by Apple Inc. - * Copyright 1997-2006 by Easy Software Products. - * - * These coded instructions, statements, and computer programs are the - * property of Apple Inc. and are protected by Federal copyright - * law. Distribution and use rights are outlined in the file "LICENSE.txt" - * which should have been included with this file. If this file is - * file is missing or damaged, see the license at "http://www.cups.org/". + * Copyright © 2007-2018 by Apple Inc. + * Copyright © 1997-2006 by Easy Software Products. * - * This file is subject to the Apple OS-Developed Software exception. + * Licensed under Apache License v2.0. See the file "LICENSE" for more + * information. */ #ifndef _CUPS_IPP_H_ @@ -79,13 +72,13 @@ extern "C" { * Types and structures... */ -typedef enum ipp_dstate_e /**** Document states ****/ +typedef enum ipp_dstate_e /**** Document states @exclude all@ ****/ { - IPP_DOCUMENT_PENDING = 3, /* Document is pending */ - IPP_DOCUMENT_PROCESSING = 5, /* Document is processing */ - IPP_DOCUMENT_CANCELED = 7, /* Document is canceled */ - IPP_DOCUMENT_ABORTED, /* Document is aborted */ - IPP_DOCUMENT_COMPLETED /* Document is completed */ + IPP_DSTATE_PENDING = 3, /* Document is pending */ + IPP_DSTATE_PROCESSING = 5, /* Document is processing */ + IPP_DSTATE_CANCELED = 7, /* Document is canceled */ + IPP_DSTATE_ABORTED, /* Document is aborted */ + IPP_DSTATE_COMPLETED /* Document is completed */ # ifndef _CUPS_NO_DEPRECATED # define IPP_DOCUMENT_PENDING IPP_DSTATE_PENDING @@ -96,10 +89,10 @@ typedef enum ipp_dstate_e /**** Document states ****/ # endif /* !_CUPS_NO_DEPRECATED */ } ipp_dstate_t; -typedef enum ipp_finishings_e /**** Finishings ****/ +typedef enum ipp_finishings_e /**** Finishings values ****/ { IPP_FINISHINGS_NONE = 3, /* No finishing */ - IPP_FINISHINGS_STAPLE, /* Staple (any location) */ + IPP_FINISHINGS_STAPLE, /* Staple (any location/method) */ IPP_FINISHINGS_PUNCH, /* Punch (any location/count) */ IPP_FINISHINGS_COVER, /* Add cover */ IPP_FINISHINGS_BIND, /* Bind */ @@ -152,6 +145,10 @@ typedef enum ipp_finishings_e /**** Finishings ****/ IPP_FINISHINGS_PUNCH_QUAD_TOP, /* Punch 4 holes top edge */ IPP_FINISHINGS_PUNCH_QUAD_RIGHT, /* Punch 4 holes right side */ IPP_FINISHINGS_PUNCH_QUAD_BOTTOM, /* Punch 4 holes bottom edge */ + IPP_FINISHINGS_PUNCH_MULTIPLE_LEFT, /* Pucnh multiple holes left side */ + IPP_FINISHINGS_PUNCH_MULTIPLE_TOP, /* Pucnh multiple holes top edge */ + IPP_FINISHINGS_PUNCH_MULTIPLE_RIGHT, /* Pucnh multiple holes right side */ + IPP_FINISHINGS_PUNCH_MULTIPLE_BOTTOM, /* Pucnh multiple holes bottom edge */ IPP_FINISHINGS_FOLD_ACCORDIAN = 90, /* Accordian-fold the paper vertically into four sections */ IPP_FINISHINGS_FOLD_DOUBLE_GATE, /* Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically */ IPP_FINISHINGS_FOLD_GATE, /* Fold the top and bottom quarters of the paper towards the midline */ @@ -163,41 +160,42 @@ typedef enum ipp_finishings_e /**** Finishings ****/ IPP_FINISHINGS_FOLD_POSTER, /* Fold the paper in half horizontally and vertically; sometimes also called a cross fold */ IPP_FINISHINGS_FOLD_RIGHT_GATE, /* Fold the bottom quarter of the paper towards the midline */ IPP_FINISHINGS_FOLD_Z, /* Fold the paper vertically into three sections, forming a Z */ + IPP_FINISHINGS_FOLD_ENGINEERING_Z, /* Fold the paper vertically into two small sections and one larger, forming an elongated Z */ /* CUPS extensions for finishings (pre-standard versions of values above) */ IPP_FINISHINGS_CUPS_PUNCH_TOP_LEFT = 0x40000046, - /* Punch 1 hole top left */ - IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_LEFT,/* Punch 1 hole bottom left */ - IPP_FINISHINGS_CUPS_PUNCH_TOP_RIGHT, /* Punch 1 hole top right */ + /* Punch 1 hole top left @exclude all@ */ + IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_LEFT,/* Punch 1 hole bottom left @exclude all@ */ + IPP_FINISHINGS_CUPS_PUNCH_TOP_RIGHT, /* Punch 1 hole top right @exclude all@ */ IPP_FINISHINGS_CUPS_PUNCH_BOTTOM_RIGHT, - /* Punch 1 hole bottom right */ - IPP_FINISHINGS_CUPS_PUNCH_DUAL_LEFT, /* Punch 2 holes left side */ - IPP_FINISHINGS_CUPS_PUNCH_DUAL_TOP, /* Punch 2 holes top edge */ - IPP_FINISHINGS_CUPS_PUNCH_DUAL_RIGHT, /* Punch 2 holes right side */ - IPP_FINISHINGS_CUPS_PUNCH_DUAL_BOTTOM,/* Punch 2 holes bottom edge */ - IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_LEFT,/* Punch 3 holes left side */ - IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_TOP, /* Punch 3 holes top edge */ + /* Punch 1 hole bottom right @exclude all@ */ + IPP_FINISHINGS_CUPS_PUNCH_DUAL_LEFT, /* Punch 2 holes left side @exclude all@ */ + IPP_FINISHINGS_CUPS_PUNCH_DUAL_TOP, /* Punch 2 holes top edge @exclude all@ */ + IPP_FINISHINGS_CUPS_PUNCH_DUAL_RIGHT, /* Punch 2 holes right side @exclude all@ */ + IPP_FINISHINGS_CUPS_PUNCH_DUAL_BOTTOM,/* Punch 2 holes bottom edge @exclude all@ */ + IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_LEFT,/* Punch 3 holes left side @exclude all@ */ + IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_TOP, /* Punch 3 holes top edge @exclude all@ */ IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_RIGHT, - /* Punch 3 holes right side */ + /* Punch 3 holes right side @exclude all@ */ IPP_FINISHINGS_CUPS_PUNCH_TRIPLE_BOTTOM, - /* Punch 3 holes bottom edge */ - IPP_FINISHINGS_CUPS_PUNCH_QUAD_LEFT, /* Punch 4 holes left side */ - IPP_FINISHINGS_CUPS_PUNCH_QUAD_TOP, /* Punch 4 holes top edge */ - IPP_FINISHINGS_CUPS_PUNCH_QUAD_RIGHT, /* Punch 4 holes right side */ - IPP_FINISHINGS_CUPS_PUNCH_QUAD_BOTTOM,/* Punch 4 holes bottom edge */ + /* Punch 3 holes bottom edge @exclude all@ */ + IPP_FINISHINGS_CUPS_PUNCH_QUAD_LEFT, /* Punch 4 holes left side @exclude all@ */ + IPP_FINISHINGS_CUPS_PUNCH_QUAD_TOP, /* Punch 4 holes top edge @exclude all@ */ + IPP_FINISHINGS_CUPS_PUNCH_QUAD_RIGHT, /* Punch 4 holes right side @exclude all@ */ + IPP_FINISHINGS_CUPS_PUNCH_QUAD_BOTTOM,/* Punch 4 holes bottom edge @exclude all@ */ IPP_FINISHINGS_CUPS_FOLD_ACCORDIAN = 0x4000005A, - /* Accordian-fold the paper vertically into four sections */ - IPP_FINISHINGS_CUPS_FOLD_DOUBLE_GATE, /* Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically */ - IPP_FINISHINGS_CUPS_FOLD_GATE, /* Fold the top and bottom quarters of the paper towards the midline */ - IPP_FINISHINGS_CUPS_FOLD_HALF, /* Fold the paper in half vertically */ - IPP_FINISHINGS_CUPS_FOLD_HALF_Z, /* Fold the paper in half horizontally, then Z-fold the paper vertically */ - IPP_FINISHINGS_CUPS_FOLD_LEFT_GATE, /* Fold the top quarter of the paper towards the midline */ - IPP_FINISHINGS_CUPS_FOLD_LETTER, /* Fold the paper into three sections vertically; sometimes also known as a C fold*/ - IPP_FINISHINGS_CUPS_FOLD_PARALLEL, /* Fold the paper in half vertically two times, yielding four sections */ - IPP_FINISHINGS_CUPS_FOLD_POSTER, /* Fold the paper in half horizontally and vertically; sometimes also called a cross fold */ - IPP_FINISHINGS_CUPS_FOLD_RIGHT_GATE, /* Fold the bottom quarter of the paper towards the midline */ - IPP_FINISHINGS_CUPS_FOLD_Z /* Fold the paper vertically into three sections, forming a Z */ + /* Accordian-fold the paper vertically into four sections @exclude all@ */ + IPP_FINISHINGS_CUPS_FOLD_DOUBLE_GATE, /* Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically @exclude all@ */ + IPP_FINISHINGS_CUPS_FOLD_GATE, /* Fold the top and bottom quarters of the paper towards the midline @exclude all@ */ + IPP_FINISHINGS_CUPS_FOLD_HALF, /* Fold the paper in half vertically @exclude all@ */ + IPP_FINISHINGS_CUPS_FOLD_HALF_Z, /* Fold the paper in half horizontally, then Z-fold the paper vertically @exclude all@ */ + IPP_FINISHINGS_CUPS_FOLD_LEFT_GATE, /* Fold the top quarter of the paper towards the midline @exclude all@ */ + IPP_FINISHINGS_CUPS_FOLD_LETTER, /* Fold the paper into three sections vertically; sometimes also known as a C fold @exclude all@ */ + IPP_FINISHINGS_CUPS_FOLD_PARALLEL, /* Fold the paper in half vertically two times, yielding four sections @exclude all@ */ + IPP_FINISHINGS_CUPS_FOLD_POSTER, /* Fold the paper in half horizontally and vertically; sometimes also called a cross fold @exclude all@ */ + IPP_FINISHINGS_CUPS_FOLD_RIGHT_GATE, /* Fold the bottom quarter of the paper towards the midline @exclude all@ */ + IPP_FINISHINGS_CUPS_FOLD_Z /* Fold the paper vertically into three sections, forming a Z @exclude all@ */ } ipp_finishings_t; # ifndef _CUPS_NO_DEPRECATED # define IPP_FINISHINGS_JOB_OFFSET IPP_FINISHINGS_JOG_OFFSET @@ -205,7 +203,7 @@ typedef enum ipp_finishings_e /**** Finishings ****/ typedef enum ipp_finishings_e ipp_finish_t; # endif /* !_CUPS_NO_DEPRECATED */ -typedef enum ipp_jcollate_e /**** Job collation types ****/ +typedef enum ipp_jcollate_e /**** Job collation types @deprecated@ @exclude all@ ****/ { IPP_JCOLLATE_UNCOLLATED_SHEETS = 3, IPP_JCOLLATE_COLLATED_DOCUMENTS, @@ -245,84 +243,125 @@ typedef enum ipp_op_e /**** IPP operations ****/ { IPP_OP_CUPS_INVALID = -1, /* Invalid operation name for @link ippOpValue@ */ IPP_OP_CUPS_NONE = 0, /* No operation @private@ */ - IPP_OP_PRINT_JOB = 0x0002, /* Print a single file */ - IPP_OP_PRINT_URI, /* Print a single URL @private@ */ - IPP_OP_VALIDATE_JOB, /* Validate job options */ - IPP_OP_CREATE_JOB, /* Create an empty print job */ - IPP_OP_SEND_DOCUMENT, /* Add a file to a job */ - IPP_OP_SEND_URI, /* Add a URL to a job @private@ */ - IPP_OP_CANCEL_JOB, /* Cancel a job */ - IPP_OP_GET_JOB_ATTRIBUTES, /* Get job attributes */ - IPP_OP_GET_JOBS, /* Get a list of jobs */ - IPP_OP_GET_PRINTER_ATTRIBUTES, /* Get printer attributes */ - IPP_OP_HOLD_JOB, /* Hold a job for printing */ - IPP_OP_RELEASE_JOB, /* Release a job for printing */ - IPP_OP_RESTART_JOB, /* Reprint a job */ - IPP_OP_PAUSE_PRINTER = 0x0010, /* Stop a printer */ - IPP_OP_RESUME_PRINTER, /* Start a printer */ - IPP_OP_PURGE_JOBS, /* Cancel all jobs */ - IPP_OP_SET_PRINTER_ATTRIBUTES, /* Set printer attributes @private@ */ - IPP_OP_SET_JOB_ATTRIBUTES, /* Set job attributes */ - IPP_OP_GET_PRINTER_SUPPORTED_VALUES, /* Get supported attribute values */ - IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS, /* Create one or more printer subscriptions @since CUPS 1.2/OS X 10.5@ */ - IPP_OP_CREATE_JOB_SUBSCRIPTIONS, /* Create one of more job subscriptions @since CUPS 1.2/OS X 10.5@ */ - IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES, /* Get subscription attributes @since CUPS 1.2/OS X 10.5@ */ - IPP_OP_GET_SUBSCRIPTIONS, /* Get list of subscriptions @since CUPS 1.2/OS X 10.5@ */ - IPP_OP_RENEW_SUBSCRIPTION, /* Renew a printer subscription @since CUPS 1.2/OS X 10.5@ */ - IPP_OP_CANCEL_SUBSCRIPTION, /* Cancel a subscription @since CUPS 1.2/OS X 10.5@ */ - IPP_OP_GET_NOTIFICATIONS, /* Get notification events @since CUPS 1.2/OS X 10.5@ */ - IPP_OP_SEND_NOTIFICATIONS, /* Send notification events @private@ */ - IPP_OP_GET_RESOURCE_ATTRIBUTES, /* Get resource attributes @private@ */ - IPP_OP_GET_RESOURCE_DATA, /* Get resource data @private@ */ - IPP_OP_GET_RESOURCES, /* Get list of resources @private@ */ - IPP_OP_GET_PRINT_SUPPORT_FILES, /* Get printer support files @private@ */ - IPP_OP_ENABLE_PRINTER, /* Start a printer */ - IPP_OP_DISABLE_PRINTER, /* Stop a printer */ + IPP_OP_PRINT_JOB = 0x0002, /* Print-Job: Print a single file */ + IPP_OP_PRINT_URI, /* Print-URI: Print a single URL @exclude all@ */ + IPP_OP_VALIDATE_JOB, /* Validate-Job: Validate job values prior to submission */ + IPP_OP_CREATE_JOB, /* Create-Job: Create an empty print job */ + IPP_OP_SEND_DOCUMENT, /* Send-Document: Add a file to a job */ + IPP_OP_SEND_URI, /* Send-URI: Add a URL to a job @exclude all@ */ + IPP_OP_CANCEL_JOB, /* Cancel-Job: Cancel a job */ + IPP_OP_GET_JOB_ATTRIBUTES, /* Get-Job-Attribute: Get information about a job */ + IPP_OP_GET_JOBS, /* Get-Jobs: Get a list of jobs */ + IPP_OP_GET_PRINTER_ATTRIBUTES, /* Get-Printer-Attributes: Get information about a printer */ + IPP_OP_HOLD_JOB, /* Hold-Job: Hold a job for printing */ + IPP_OP_RELEASE_JOB, /* Release-Job: Release a job for printing */ + IPP_OP_RESTART_JOB, /* Restart-Job: Reprint a job @deprecated@ */ + IPP_OP_PAUSE_PRINTER = 0x0010, /* Pause-Printer: Stop a printer */ + IPP_OP_RESUME_PRINTER, /* Resume-Printer: Start a printer */ + IPP_OP_PURGE_JOBS, /* Purge-Jobs: Delete all jobs @deprecated@ @exclude all@ */ + IPP_OP_SET_PRINTER_ATTRIBUTES, /* Set-Printer-Attributes: Set printer values */ + IPP_OP_SET_JOB_ATTRIBUTES, /* Set-Job-Attributes: Set job values */ + IPP_OP_GET_PRINTER_SUPPORTED_VALUES, /* Get-Printer-Supported-Values: Get supported values */ + IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS, /* Create-Printer-Subscriptions: Create one or more printer subscriptions @since CUPS 1.2/macOS 10.5@ */ + IPP_OP_CREATE_JOB_SUBSCRIPTIONS, /* Create-Job-Subscriptions: Create one of more job subscriptions @since CUPS 1.2/macOS 10.5@ */ + IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES, /* Get-Subscription-Attributes: Get subscription information @since CUPS 1.2/macOS 10.5@ */ + IPP_OP_GET_SUBSCRIPTIONS, /* Get-Subscriptions: Get list of subscriptions @since CUPS 1.2/macOS 10.5@ */ + IPP_OP_RENEW_SUBSCRIPTION, /* Renew-Subscription: Renew a printer subscription @since CUPS 1.2/macOS 10.5@ */ + IPP_OP_CANCEL_SUBSCRIPTION, /* Cancel-Subscription: Cancel a subscription @since CUPS 1.2/macOS 10.5@ */ + IPP_OP_GET_NOTIFICATIONS, /* Get-Notifications: Get notification events @since CUPS 1.2/macOS 10.5@ */ + IPP_OP_SEND_NOTIFICATIONS, /* Send-Notifications: Send notification events @private@ */ + IPP_OP_GET_RESOURCE_ATTRIBUTES, /* Get-Resource-Attributes: Get resource information @private@ */ + IPP_OP_GET_RESOURCE_DATA, /* Get-Resource-Data: Get resource data @private@ @deprecated@ */ + IPP_OP_GET_RESOURCES, /* Get-Resources: Get list of resources @private@ */ + IPP_OP_GET_PRINT_SUPPORT_FILES, /* Get-Printer-Support-Files: Get printer support files @private@ */ + IPP_OP_ENABLE_PRINTER, /* Enable-Printer: Accept new jobs for a printer */ + IPP_OP_DISABLE_PRINTER, /* Disable-Printer: Reject new jobs for a printer */ IPP_OP_PAUSE_PRINTER_AFTER_CURRENT_JOB, - /* Stop printer after the current job @private@ */ - IPP_OP_HOLD_NEW_JOBS, /* Hold new jobs @private@ */ - IPP_OP_RELEASE_HELD_NEW_JOBS, /* Release new jobs @private@ */ - IPP_OP_DEACTIVATE_PRINTER, /* Stop a printer @private@ */ - IPP_OP_ACTIVATE_PRINTER, /* Start a printer @private@ */ - IPP_OP_RESTART_PRINTER, /* Restart a printer @private@ */ - IPP_OP_SHUTDOWN_PRINTER, /* Turn a printer off @private@ */ - IPP_OP_STARTUP_PRINTER, /* Turn a printer on @private@ */ - IPP_OP_REPROCESS_JOB, /* Reprint a job @private@ */ - IPP_OP_CANCEL_CURRENT_JOB, /* Cancel the current job @private@ */ - IPP_OP_SUSPEND_CURRENT_JOB, /* Suspend the current job @private@ */ - IPP_OP_RESUME_JOB, /* Resume the current job @private@ */ - IPP_OP_PROMOTE_JOB, /* Promote a job to print sooner @private@ */ - IPP_OP_SCHEDULE_JOB_AFTER, /* Schedule a job to print after another @private@ */ - IPP_OP_CANCEL_DOCUMENT = 0x0033, /* Cancel-Document @private@ */ - IPP_OP_GET_DOCUMENT_ATTRIBUTES, /* Get-Document-Attributes @private@ */ - IPP_OP_GET_DOCUMENTS, /* Get-Documents @private@ */ - IPP_OP_DELETE_DOCUMENT, /* Delete-Document @private@ */ - IPP_OP_SET_DOCUMENT_ATTRIBUTES, /* Set-Document-Attributes @private@ */ - IPP_OP_CANCEL_JOBS, /* Cancel-Jobs */ - IPP_OP_CANCEL_MY_JOBS, /* Cancel-My-Jobs */ - IPP_OP_RESUBMIT_JOB, /* Resubmit-Job */ - IPP_OP_CLOSE_JOB, /* Close-Job */ - IPP_OP_IDENTIFY_PRINTER, /* Identify-Printer @private@ */ - IPP_OP_VALIDATE_DOCUMENT, /* Validate-Document @private@ */ - IPP_OP_SEND_HARDCOPY_DOCUMENT, /* Send-Hardcopy-Document @private@ */ + /* Pause-Printer-After-Current-Job: Stop printer after the current job */ + IPP_OP_HOLD_NEW_JOBS, /* Hold-New-Jobs: Hold new jobs */ + IPP_OP_RELEASE_HELD_NEW_JOBS, /* Release-Held-New-Jobs: Release new jobs that were previously held */ + IPP_OP_DEACTIVATE_PRINTER, /* Deactivate-Printer: Stop a printer and do not accept jobs @deprecated@ @exclude all@ */ + IPP_OP_ACTIVATE_PRINTER, /* Activate-Printer: Start a printer and accept jobs @deprecated@ @exclude all@ */ + IPP_OP_RESTART_PRINTER, /* Restart-Printer: Restart a printer @exclude all@ */ + IPP_OP_SHUTDOWN_PRINTER, /* Shutdown-Printer: Turn a printer off @exclude all@ */ + IPP_OP_STARTUP_PRINTER, /* Startup-Printer: Turn a printer on @exclude all@ */ + IPP_OP_REPROCESS_JOB, /* Reprocess-Job: Reprint a job @deprecated@ @exclude all@*/ + IPP_OP_CANCEL_CURRENT_JOB, /* Cancel-Current-Job: Cancel the current job */ + IPP_OP_SUSPEND_CURRENT_JOB, /* Suspend-Current-Job: Suspend the current job */ + IPP_OP_RESUME_JOB, /* Resume-Job: Resume the current job */ + IPP_OP_PROMOTE_JOB, /* Promote-Job: Promote a job to print sooner */ + IPP_OP_SCHEDULE_JOB_AFTER, /* Schedule-Job-After: Schedule a job to print after another */ + IPP_OP_CANCEL_DOCUMENT = 0x0033, /* Cancel-Document: Cancel a document @exclude all@ */ + IPP_OP_GET_DOCUMENT_ATTRIBUTES, /* Get-Document-Attributes: Get document information @exclude all@ */ + IPP_OP_GET_DOCUMENTS, /* Get-Documents: Get a list of documents in a job @exclude all@ */ + IPP_OP_DELETE_DOCUMENT, /* Delete-Document: Delete a document @deprecated@ @exclude all@ */ + IPP_OP_SET_DOCUMENT_ATTRIBUTES, /* Set-Document-Attributes: Set document values @exclude all@ */ + IPP_OP_CANCEL_JOBS, /* Cancel-Jobs: Cancel all jobs (administrative) */ + IPP_OP_CANCEL_MY_JOBS, /* Cancel-My-Jobs: Cancel a user's jobs */ + IPP_OP_RESUBMIT_JOB, /* Resubmit-Job: Copy and reprint a job @exclude all@ */ + IPP_OP_CLOSE_JOB, /* Close-Job: Close a job and start printing */ + IPP_OP_IDENTIFY_PRINTER, /* Identify-Printer: Make the printer beep, flash, or display a message for identification */ + IPP_OP_VALIDATE_DOCUMENT, /* Validate-Document: Validate document values prior to submission @exclude all@ */ + IPP_OP_ADD_DOCUMENT_IMAGES, /* Add-Document-Images: Add image(s) from the specified scanner source @exclude all@ */ + IPP_OP_ACKNOWLEDGE_DOCUMENT, /* Acknowledge-Document: Acknowledge processing of a document @exclude all@ */ + IPP_OP_ACKNOWLEDGE_IDENTIFY_PRINTER, /* Acknowledge-Identify-Printer: Acknowledge action on an Identify-Printer request @exclude all@ */ + IPP_OP_ACKNOWLEDGE_JOB, /* Acknowledge-Job: Acknowledge processing of a job @exclude all@ */ + IPP_OP_FETCH_DOCUMENT, /* Fetch-Document: Fetch a document for processing @exclude all@ */ + IPP_OP_FETCH_JOB, /* Fetch-Job: Fetch a job for processing @exclude all@ */ + IPP_OP_GET_OUTPUT_DEVICE_ATTRIBUTES, /* Get-Output-Device-Attributes: Get printer information for a specific output device @exclude all@ */ + IPP_OP_UPDATE_ACTIVE_JOBS, /* Update-Active-Jobs: Update the list of active jobs that a proxy has processed @exclude all@ */ + IPP_OP_DEREGISTER_OUTPUT_DEVICE, /* Deregister-Output-Device: Remove an output device @exclude all@ */ + IPP_OP_UPDATE_DOCUMENT_STATUS, /* Update-Document-Status: Update document values @exclude all@ */ + IPP_OP_UPDATE_JOB_STATUS, /* Update-Job-Status: Update job values @exclude all@ */ + IPP_OP_UPDATE_OUTPUT_DEVICE_ATTRIBUTES, + /* Update-Output-Device-Attributes: Update output device values @exclude all@ */ + IPP_OP_GET_NEXT_DOCUMENT_DATA, /* Get-Next-Document-Data: Scan more document data @exclude all@ */ + IPP_OP_ALLOCATE_PRINTER_RESOURCES, /* Allocate-Printer-Resources: Use resources for a printer. */ + IPP_OP_CREATE_PRINTER, /* Create-Printer: Create a new service. */ + IPP_OP_DEALLOCATE_PRINTER_RESOURCES, /* Deallocate-Printer-Resources: Stop using resources for a printer. */ + IPP_OP_DELETE_PRINTER, /* Delete-Printer: Delete an existing service. */ + IPP_OP_GET_PRINTERS, /* Get-Printers: Get a list of services. */ + IPP_OP_SHUTDOWN_ONE_PRINTER, /* Shutdown-One-Printer: Shutdown a service. */ + IPP_OP_STARTUP_ONE_PRINTER, /* Startup-One-Printer: Start a service. */ + IPP_OP_CANCEL_RESOURCE, /* Cancel-Resource: Uninstall a resource. */ + IPP_OP_CREATE_RESOURCE, /* Create-Resource: Create a new (empty) resource. */ + IPP_OP_INSTALL_RESOURCE, /* Install-Resource: Install a resource. */ + IPP_OP_SEND_RESOURCE_DATA, /* Send-Resource-Data: Upload the data for a resource. */ + IPP_OP_SET_RESOURCE_ATTRIBUTES, /* Set-Resource-Attributes: Set resource object attributes. */ + IPP_OP_CREATE_RESOURCE_SUBSCRIPTIONS, /* Create-Resource-Subscriptions: Create event subscriptions for a resource. */ + IPP_OP_CREATE_SYSTEM_SUBSCRIPTIONS, /* Create-System-Subscriptions: Create event subscriptions for a system. */ + IPP_OP_DISABLE_ALL_PRINTERS, /* Disable-All-Printers: Stop accepting new jobs on all services. */ + IPP_OP_ENABLE_ALL_PRINTERS, /* Enable-All-Printers: Start accepting new jobs on all services. */ + IPP_OP_GET_SYSTEM_ATTRIBUTES, /* Get-System-Attributes: Get system object attributes. */ + IPP_OP_GET_SYSTEM_SUPPORTED_VALUES, /* Get-System-Supported-Values: Get supported values for system object attributes. */ + IPP_OP_PAUSE_ALL_PRINTERS, /* Pause-All-Printers: Stop all services immediately. */ + IPP_OP_PAUSE_ALL_PRINTERS_AFTER_CURRENT_JOB, + /* Pause-All-Printers-After-Current-Job: Stop all services after processing the current jobs. */ + IPP_OP_REGISTER_OUTPUT_DEVICE, /* Register-Output-Device: Register a remote service. */ + IPP_OP_RESTART_SYSTEM, /* Restart-System: Restart all services. */ + IPP_OP_RESUME_ALL_PRINTERS, /* Resume-All-Printers: Start job processing on all services. */ + IPP_OP_SET_SYSTEM_ATTRIBUTES, /* Set-System-Attributes: Set system object attributes. */ + IPP_OP_SHUTDOWN_ALL_PRINTERS, /* Shutdown-All-Printers: Shutdown all services. */ + IPP_OP_STARTUP_ALL_PRINTERS, /* Startup-All-Printers: Startup all services. */ IPP_OP_PRIVATE = 0x4000, /* Reserved @private@ */ - IPP_OP_CUPS_GET_DEFAULT, /* Get the default printer */ - IPP_OP_CUPS_GET_PRINTERS, /* Get a list of printers and/or classes */ - IPP_OP_CUPS_ADD_MODIFY_PRINTER, /* Add or modify a printer */ - IPP_OP_CUPS_DELETE_PRINTER, /* Delete a printer */ - IPP_OP_CUPS_GET_CLASSES, /* Get a list of classes @deprecated@ */ - IPP_OP_CUPS_ADD_MODIFY_CLASS, /* Add or modify a class */ - IPP_OP_CUPS_DELETE_CLASS, /* Delete a class */ - IPP_OP_CUPS_ACCEPT_JOBS, /* Accept new jobs on a printer */ - IPP_OP_CUPS_REJECT_JOBS, /* Reject new jobs on a printer */ - IPP_OP_CUPS_SET_DEFAULT, /* Set the default printer */ - IPP_OP_CUPS_GET_DEVICES, /* Get a list of supported devices */ - IPP_OP_CUPS_GET_PPDS, /* Get a list of supported drivers */ - IPP_OP_CUPS_MOVE_JOB, /* Move a job to a different printer */ - IPP_OP_CUPS_AUTHENTICATE_JOB, /* Authenticate a job @since CUPS 1.2/OS X 10.5@ */ - IPP_OP_CUPS_GET_PPD, /* Get a PPD file @since CUPS 1.3/OS X 10.5@ */ - IPP_OP_CUPS_GET_DOCUMENT = 0x4027 /* Get a document file @since CUPS 1.4/OS X 10.6@ */ + IPP_OP_CUPS_GET_DEFAULT, /* CUPS-Get-Default: Get the default printer */ + IPP_OP_CUPS_GET_PRINTERS, /* CUPS-Get-Printers: Get a list of printers and/or classes */ + IPP_OP_CUPS_ADD_MODIFY_PRINTER, /* CUPS-Add-Modify-Printer: Add or modify a printer */ + IPP_OP_CUPS_DELETE_PRINTER, /* CUPS-Delete-Printer: Delete a printer */ + IPP_OP_CUPS_GET_CLASSES, /* CUPS-Get-Classes: Get a list of classes @deprecated@ @exclude all@ */ + IPP_OP_CUPS_ADD_MODIFY_CLASS, /* CUPS-Add-Modify-Class: Add or modify a class */ + IPP_OP_CUPS_DELETE_CLASS, /* CUPS-Delete-Class: Delete a class */ + IPP_OP_CUPS_ACCEPT_JOBS, /* CUPS-Accept-Jobs: Accept new jobs on a printer @exclude all@ */ + IPP_OP_CUPS_REJECT_JOBS, /* CUPS-Reject-Jobs: Reject new jobs on a printer @exclude all@ */ + IPP_OP_CUPS_SET_DEFAULT, /* CUPS-Set-Default: Set the default printer */ + IPP_OP_CUPS_GET_DEVICES, /* CUPS-Get-Devices: Get a list of supported devices @deprecated@ */ + IPP_OP_CUPS_GET_PPDS, /* CUPS-Get-PPDs: Get a list of supported drivers @deprecated@ */ + IPP_OP_CUPS_MOVE_JOB, /* CUPS-Move-Job: Move a job to a different printer */ + IPP_OP_CUPS_AUTHENTICATE_JOB, /* CUPS-Authenticate-Job: Authenticate a job @since CUPS 1.2/macOS 10.5@ */ + IPP_OP_CUPS_GET_PPD, /* CUPS-Get-PPD: Get a PPD file @deprecated@ */ + IPP_OP_CUPS_GET_DOCUMENT = 0x4027, /* CUPS-Get-Document: Get a document file @since CUPS 1.4/macOS 10.6@ */ + IPP_OP_CUPS_CREATE_LOCAL_PRINTER /* CUPS-Create-Local-Printer: Create a local (temporary) printer @since CUPS 2.2@ */ # ifndef _CUPS_NO_DEPRECATED # define IPP_PRINT_JOB IPP_OP_PRINT_JOB @@ -347,7 +386,7 @@ typedef enum ipp_op_e /**** IPP operations ****/ # define IPP_CREATE_PRINTER_SUBSCRIPTION IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS # define IPP_CREATE_JOB_SUBSCRIPTION IPP_OP_CREATE_JOB_SUBSCRIPTIONS # define IPP_OP_CREATE_PRINTER_SUBSCRIPTION IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS -# define IPP_OP_CREATE_JOB_SUBSCRIPTION IPP_OP_CREATE_JOB_SUBSCRIPTIONS +# define IPP_OP_CREATE_JOB_SUBSCRIPTION IPP_OP_CREATE_JOB_SUBSCRIPTIONS # define IPP_GET_SUBSCRIPTION_ATTRIBUTES IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES # define IPP_GET_SUBSCRIPTIONS IPP_OP_GET_SUBSCRIPTIONS # define IPP_RENEW_SUBSCRIPTION IPP_OP_RENEW_SUBSCRIPTION @@ -385,6 +424,7 @@ typedef enum ipp_op_e /**** IPP operations ****/ # define IPP_CLOSE_JOB IPP_OP_CLOSE_JOB # define IPP_IDENTIFY_PRINTER IPP_OP_IDENTIFY_PRINTER # define IPP_VALIDATE_DOCUMENT IPP_OP_VALIDATE_DOCUMENT +# define IPP_OP_SEND_HARDCOPY_DOCUMENT IPP_OP_ADD_DOCUMENT_IMAGES # define IPP_PRIVATE IPP_OP_PRIVATE # define CUPS_GET_DEFAULT IPP_OP_CUPS_GET_DEFAULT # define CUPS_GET_PRINTERS IPP_OP_CUPS_GET_PRINTERS @@ -424,7 +464,7 @@ typedef enum ipp_orient_e /**** Orientation values ****/ # endif /* !_CUPS_NO_DEPRECATED */ } ipp_orient_t; -typedef enum ipp_pstate_e /**** Printer states ****/ +typedef enum ipp_pstate_e /**** Printer state values ****/ { IPP_PSTATE_IDLE = 3, /* Printer is idle */ IPP_PSTATE_PROCESSING, /* Printer is working */ @@ -437,7 +477,7 @@ typedef enum ipp_pstate_e /**** Printer states ****/ # endif /* _CUPS_NO_DEPRECATED */ } ipp_pstate_t; -typedef enum ipp_quality_e /**** Qualities ****/ +typedef enum ipp_quality_e /**** Print quality values ****/ { IPP_QUALITY_DRAFT = 3, /* Draft quality */ IPP_QUALITY_NORMAL, /* Normal quality */ @@ -450,7 +490,23 @@ typedef enum ipp_res_e /**** Resolution units ****/ IPP_RES_PER_CM /* Pixels per centimeter */ } ipp_res_t; -typedef enum ipp_state_e /**** IPP states ****/ +typedef enum ipp_rstate_e /**** resource-state values ****/ +{ + IPP_RSTATE_PENDING = 3, /* Resource is created but has no data yet. */ + IPP_RSTATE_AVAILABLE, /* Resource is available for installation. */ + IPP_RSTATE_INSTALLED, /* Resource is installed. */ + IPP_RSTATE_CANCELED, /* Resource has been canceled and is pending deletion. */ + IPP_RSTATE_ABORTED /* Resource has been aborted and is pending deletion. */ +} ipp_rstate_t; + +typedef enum ipp_sstate_e /**** system-state values ****/ +{ + IPP_SSTATE_IDLE = 3, /* At least one printer is idle and none are processing a job. */ + IPP_SSTATE_PROCESSING, /* At least one printer is processing a job. */ + IPP_SSTATE_STOPPED /* All printers are stopped. */ +} ipp_sstate_t; + +typedef enum ipp_state_e /**** ipp_t state values ****/ { IPP_STATE_ERROR = -1, /* An error occurred */ IPP_STATE_IDLE, /* Nothing is happening/request completed */ @@ -467,7 +523,7 @@ typedef enum ipp_state_e /**** IPP states ****/ # endif /* !_CUPS_NO_DEPRECATED */ } ipp_state_t; -typedef enum ipp_status_e /**** IPP status codes ****/ +typedef enum ipp_status_e /**** IPP status code values ****/ { IPP_STATUS_CUPS_INVALID = -1, /* Invalid status name for @link ippErrorValue@ */ IPP_STATUS_OK = 0x0000, /* successful-ok */ @@ -480,7 +536,7 @@ typedef enum ipp_status_e /**** IPP status codes ****/ IPP_STATUS_OK_EVENTS_COMPLETE, /* successful-ok-events-complete */ IPP_STATUS_REDIRECTION_OTHER_SITE = 0x0200, /* redirection-other-site @private@ */ - IPP_STATUS_CUPS_SEE_OTHER = 0x0280, /* cups-see-other */ + IPP_STATUS_CUPS_SEE_OTHER = 0x0280, /* cups-see-other @private@ */ IPP_STATUS_ERROR_BAD_REQUEST = 0x0400,/* client-error-bad-request */ IPP_STATUS_ERROR_FORBIDDEN, /* client-error-forbidden */ IPP_STATUS_ERROR_NOT_AUTHENTICATED, /* client-error-not-authenticated */ @@ -517,15 +573,22 @@ typedef enum ipp_status_e /**** IPP status codes ****/ IPP_STATUS_ERROR_DOCUMENT_PERMISSION, /* client-error-document-permission-error */ IPP_STATUS_ERROR_DOCUMENT_SECURITY, /* client-error-document-security-error */ IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE,/* client-error-document-unprintable-error */ - - /* Proposed extensions for paid printing */ + IPP_STATUS_ERROR_ACCOUNT_INFO_NEEDED, /* client-error-account-info-needed */ + IPP_STATUS_ERROR_ACCOUNT_CLOSED, /* client-error-account-closed */ + IPP_STATUS_ERROR_ACCOUNT_LIMIT_REACHED, + /* client-error-account-limit-reached */ + IPP_STATUS_ERROR_ACCOUNT_AUTHORIZATION_FAILED, + /* client-error-account-authorization-failed */ + IPP_STATUS_ERROR_NOT_FETCHABLE, /* client-error-not-fetchable */ + + /* Legacy status codes for paid printing */ IPP_STATUS_ERROR_CUPS_ACCOUNT_INFO_NEEDED = 0x049C, - /* cups-error-account-info-needed @since CUPS 1.7/OS X 10.9@ */ - IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED, /* cups-error-account-closed @since CUPS 1.7/OS X 10.9@ */ + /* cups-error-account-info-needed @deprecated@ */ + IPP_STATUS_ERROR_CUPS_ACCOUNT_CLOSED, /* cups-error-account-closed @deprecate@ */ IPP_STATUS_ERROR_CUPS_ACCOUNT_LIMIT_REACHED, - /* cups-error-account-limit-reached @since CUPS 1.7/OS X 10.9@ */ + /* cups-error-account-limit-reached @deprecated@ */ IPP_STATUS_ERROR_CUPS_ACCOUNT_AUTHORIZATION_FAILED, - /* cups-error-account-authorization-failed @since CUPS 1.7/OS X 10.9@ */ + /* cups-error-account-authorization-failed @deprecated@ */ IPP_STATUS_ERROR_INTERNAL = 0x0500, /* server-error-internal-error */ IPP_STATUS_ERROR_OPERATION_NOT_SUPPORTED, @@ -547,9 +610,9 @@ typedef enum ipp_status_e /**** IPP status codes ****/ /* These are internal and never sent over the wire... */ IPP_STATUS_ERROR_CUPS_AUTHENTICATION_CANCELED = 0x1000, - /* cups-authentication-canceled - Authentication canceled by user @since CUPS 1.5/OS X 10.7@ */ - IPP_STATUS_ERROR_CUPS_PKI, /* cups-pki-error - Error negotiating a secure connection @since CUPS 1.5/OS X 10.7@ */ - IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED/* cups-upgrade-required - TLS upgrade required */ + /* cups-authentication-canceled - Authentication canceled by user @since CUPS 1.5/macOS 10.7@ */ + IPP_STATUS_ERROR_CUPS_PKI, /* cups-pki-error - Error negotiating a secure connection @since CUPS 1.5/macOS 10.7@ */ + IPP_STATUS_ERROR_CUPS_UPGRADE_REQUIRED/* cups-upgrade-required - TLS upgrade required @since CUPS 1.5/macOS 10.7@ */ # ifndef _CUPS_NO_DEPRECATED # define IPP_OK IPP_STATUS_OK @@ -611,7 +674,7 @@ typedef enum ipp_status_e /**** IPP status codes ****/ # endif /* _CUPS_NO_DEPRECATED */ } ipp_status_t; -typedef enum ipp_tag_e /**** Format tags for attributes ****/ +typedef enum ipp_tag_e /**** Value and group tag values for attributes ****/ { IPP_TAG_CUPS_INVALID = -1, /* Invalid tag name for @link ippTagValue@ */ IPP_TAG_ZERO = 0x00, /* Zero tag - used for separators */ @@ -622,8 +685,9 @@ typedef enum ipp_tag_e /**** Format tags for attributes ****/ IPP_TAG_UNSUPPORTED_GROUP, /* Unsupported attributes group */ IPP_TAG_SUBSCRIPTION, /* Subscription group */ IPP_TAG_EVENT_NOTIFICATION, /* Event group */ - IPP_TAG_RESOURCE, /* Resource group @private@ */ + IPP_TAG_RESOURCE, /* Resource group */ IPP_TAG_DOCUMENT, /* Document group */ + IPP_TAG_SYSTEM, /* System group */ IPP_TAG_UNSUPPORTED_VALUE = 0x10, /* Unsupported value */ IPP_TAG_DEFAULT, /* Default value */ IPP_TAG_UNKNOWN, /* Unknown value */ @@ -638,10 +702,10 @@ typedef enum ipp_tag_e /**** Format tags for attributes ****/ IPP_TAG_DATE, /* Date/time value */ IPP_TAG_RESOLUTION, /* Resolution value */ IPP_TAG_RANGE, /* Range value */ - IPP_TAG_BEGIN_COLLECTION, /* Beginning of collection value */ + IPP_TAG_BEGIN_COLLECTION, /* Beginning of collection value @exclude all@ */ IPP_TAG_TEXTLANG, /* Text-with-language value */ IPP_TAG_NAMELANG, /* Name-with-language value */ - IPP_TAG_END_COLLECTION, /* End of collection value */ + IPP_TAG_END_COLLECTION, /* End of collection value @exclude all@ */ IPP_TAG_TEXT = 0x41, /* Text value */ IPP_TAG_NAME, /* Name value */ IPP_TAG_RESERVED_STRING, /* Reserved for future string value @private@ */ @@ -651,8 +715,8 @@ typedef enum ipp_tag_e /**** Format tags for attributes ****/ IPP_TAG_CHARSET, /* Character set value */ IPP_TAG_LANGUAGE, /* Language value */ IPP_TAG_MIMETYPE, /* MIME media type value */ - IPP_TAG_MEMBERNAME, /* Collection member name value */ - IPP_TAG_EXTENSION = 0x7f, /* Extension point for 32-bit tags */ + IPP_TAG_MEMBERNAME, /* Collection member name value @exclude all@ */ + IPP_TAG_EXTENSION = 0x7f, /* Extension point for 32-bit tags @exclude all@ */ IPP_TAG_CUPS_MASK = 0x7fffffff, /* Mask for copied attribute values @private@ */ /* The following expression is used to avoid compiler warnings with +/-0x80000000 */ IPP_TAG_CUPS_CONST = -0x7fffffff-1 /* Bitflag for copied/const attribute values @private@ */ @@ -663,149 +727,18 @@ typedef enum ipp_tag_e /**** Format tags for attributes ****/ # endif /* !_CUPS_NO_DEPRECATED */ } ipp_tag_t; -typedef unsigned char ipp_uchar_t; /**** Unsigned 8-bit integer/character ****/ +typedef unsigned char ipp_uchar_t; /**** Unsigned 8-bit integer/character @exclude all@ ****/ typedef struct _ipp_s ipp_t; /**** IPP request/response data ****/ typedef struct _ipp_attribute_s ipp_attribute_t; /**** IPP attribute ****/ -/**** New in CUPS 1.2/OS X 10.5 ****/ +/**** New in CUPS 1.2/macOS 10.5 ****/ typedef ssize_t (*ipp_iocb_t)(void *context, ipp_uchar_t *buffer, size_t bytes); - /**** IPP IO Callback Function @since CUPS 1.2/OS X 10.5@ ****/ + /**** ippReadIO/ippWriteIO callback function @since CUPS 1.2/macOS 10.5@ ****/ -/**** New in CUPS 1.6/OS X 10.8 ****/ +/**** New in CUPS 1.6/macOS 10.8 ****/ typedef int (*ipp_copycb_t)(void *context, ipp_t *dst, ipp_attribute_t *attr); - - -/* - * The following structures are PRIVATE starting with CUPS 1.6/OS X 10.8. - * Please use the new accessor functions available in CUPS 1.6 and later, as - * these definitions will be moved to a private header file in a future release. - * - * Define _IPP_PRIVATE_STRUCTURES to 1 to cause the private IPP structures to be - * exposed in CUPS 1.6. This happens automatically on OS X when compiling for - * a deployment target of 10.7 or earlier. - * - * Define _IPP_PRIVATE_STRUCTURES to 0 to prevent the private IPP structures - * from being exposed. This is useful when migrating existing code to the new - * accessors. - */ - -# ifdef _IPP_PRIVATE_STRUCTURES - /* Somebody has overridden the value */ -# elif defined(_CUPS_SOURCE) || defined(_CUPS_IPP_PRIVATE_H_) - /* Building CUPS */ -# define _IPP_PRIVATE_STRUCTURES 1 -# elif defined(__APPLE__) -# if defined(MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8 - /* Building for 10.7 and earlier */ -# define _IPP_PRIVATE_STRUCTURES 1 -# elif !defined(MAC_OS_X_VERSION_10_8) - /* Building for 10.7 and earlier */ -# define _IPP_PRIVATE_STRUCTURES 1 -# endif /* MAC_OS_X_VERSION_10_8 && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8 */ -# else -# define _IPP_PRIVATE_STRUCTURES 0 -# endif /* _CUPS_SOURCE || _CUPS_IPP_PRIVATE_H_ */ - -# if _IPP_PRIVATE_STRUCTURES -typedef union _ipp_request_u /**** Request Header ****/ -{ - struct /* Any Header */ - { - ipp_uchar_t version[2]; /* Protocol version number */ - int op_status; /* Operation ID or status code*/ - int request_id; /* Request ID */ - } any; - - struct /* Operation Header */ - { - ipp_uchar_t version[2]; /* Protocol version number */ - ipp_op_t operation_id; /* Operation ID */ - int request_id; /* Request ID */ - } op; - - struct /* Status Header */ - { - ipp_uchar_t version[2]; /* Protocol version number */ - ipp_status_t status_code; /* Status code */ - int request_id; /* Request ID */ - } status; - - /**** New in CUPS 1.1.19 ****/ - struct /* Event Header @since CUPS 1.1.19/OS X 10.3@ */ - { - ipp_uchar_t version[2]; /* Protocol version number */ - ipp_status_t status_code; /* Status code */ - int request_id; /* Request ID */ - } event; -} _ipp_request_t; - -/**** New in CUPS 1.1.19 ****/ - -typedef union _ipp_value_u /**** Attribute Value ****/ -{ - int integer; /* Integer/enumerated value */ - - char boolean; /* Boolean value */ - - ipp_uchar_t date[11]; /* Date/time value */ - - struct - { - int xres, /* Horizontal resolution */ - yres; /* Vertical resolution */ - ipp_res_t units; /* Resolution units */ - } resolution; /* Resolution value */ - - struct - { - int lower, /* Lower value */ - upper; /* Upper value */ - } range; /* Range of integers value */ - - struct - { - char *language; /* Language code */ - char *text; /* String */ - } string; /* String with language value */ - - struct - { - int length; /* Length of attribute */ - void *data; /* Data in attribute */ - } unknown; /* Unknown attribute type */ - -/**** New in CUPS 1.1.19 ****/ - ipp_t *collection; /* Collection value @since CUPS 1.1.19/OS X 10.3@ */ -} _ipp_value_t; -typedef _ipp_value_t ipp_value_t; /**** Convenience typedef that will be removed @private@ ****/ - -struct _ipp_attribute_s /**** Attribute ****/ -{ - ipp_attribute_t *next; /* Next attribute in list */ - ipp_tag_t group_tag, /* Job/Printer/Operation group tag */ - value_tag; /* What type of value is it? */ - char *name; /* Name of attribute */ - int num_values; /* Number of values */ - _ipp_value_t values[1]; /* Values */ -}; - -struct _ipp_s /**** IPP Request/Response/Notification ****/ -{ - ipp_state_t state; /* State of request */ - _ipp_request_t request; /* Request header */ - ipp_attribute_t *attrs; /* Attributes */ - ipp_attribute_t *last; /* Last attribute in list */ - ipp_attribute_t *current; /* Current attribute (for read/write) */ - ipp_tag_t curtag; /* Current attribute group tag */ - -/**** New in CUPS 1.2 ****/ - ipp_attribute_t *prev; /* Previous attribute (for read) @since CUPS 1.2/OS X 10.5@ */ - -/**** New in CUPS 1.4.4 ****/ - int use; /* Use count @since CUPS 1.4.4/OS X 10.6.?@ */ -}; -# endif /* _IPP_PRIVATE_STRUCTURES */ + /**** ippCopyAttributes callback function @since CUPS 1.6/macOS 10.8 ****/ /* @@ -813,52 +746,52 @@ struct _ipp_s /**** IPP Request/Response/Notification ****/ */ extern ipp_attribute_t *ippAddBoolean(ipp_t *ipp, ipp_tag_t group, - const char *name, char value); + const char *name, char value) _CUPS_PUBLIC; extern ipp_attribute_t *ippAddBooleans(ipp_t *ipp, ipp_tag_t group, const char *name, int num_values, - const char *values); + const char *values) _CUPS_PUBLIC; extern ipp_attribute_t *ippAddDate(ipp_t *ipp, ipp_tag_t group, - const char *name, const ipp_uchar_t *value); + const char *name, const ipp_uchar_t *value) _CUPS_PUBLIC; extern ipp_attribute_t *ippAddInteger(ipp_t *ipp, ipp_tag_t group, ipp_tag_t value_tag, const char *name, - int value); + int value) _CUPS_PUBLIC; extern ipp_attribute_t *ippAddIntegers(ipp_t *ipp, ipp_tag_t group, ipp_tag_t value_tag, const char *name, - int num_values, const int *values); + int num_values, const int *values) _CUPS_PUBLIC; extern ipp_attribute_t *ippAddRange(ipp_t *ipp, ipp_tag_t group, - const char *name, int lower, int upper); + const char *name, int lower, int upper) _CUPS_PUBLIC; extern ipp_attribute_t *ippAddRanges(ipp_t *ipp, ipp_tag_t group, const char *name, int num_values, - const int *lower, const int *upper); + const int *lower, const int *upper) _CUPS_PUBLIC; extern ipp_attribute_t *ippAddResolution(ipp_t *ipp, ipp_tag_t group, const char *name, ipp_res_t units, - int xres, int yres); + int xres, int yres) _CUPS_PUBLIC; extern ipp_attribute_t *ippAddResolutions(ipp_t *ipp, ipp_tag_t group, const char *name, int num_values, ipp_res_t units, const int *xres, - const int *yres); -extern ipp_attribute_t *ippAddSeparator(ipp_t *ipp); + const int *yres) _CUPS_PUBLIC; +extern ipp_attribute_t *ippAddSeparator(ipp_t *ipp) _CUPS_PUBLIC; extern ipp_attribute_t *ippAddString(ipp_t *ipp, ipp_tag_t group, ipp_tag_t value_tag, const char *name, - const char *language, const char *value); + const char *language, const char *value) _CUPS_PUBLIC; extern ipp_attribute_t *ippAddStrings(ipp_t *ipp, ipp_tag_t group, ipp_tag_t value_tag, const char *name, int num_values, const char *language, - const char * const *values); -extern time_t ippDateToTime(const ipp_uchar_t *date); -extern void ippDelete(ipp_t *ipp); -extern const char *ippErrorString(ipp_status_t error); + const char * const *values) _CUPS_PUBLIC; +extern time_t ippDateToTime(const ipp_uchar_t *date) _CUPS_PUBLIC; +extern void ippDelete(ipp_t *ipp) _CUPS_PUBLIC; +extern const char *ippErrorString(ipp_status_t error) _CUPS_PUBLIC; extern ipp_attribute_t *ippFindAttribute(ipp_t *ipp, const char *name, - ipp_tag_t value_tag); + ipp_tag_t value_tag) _CUPS_PUBLIC; extern ipp_attribute_t *ippFindNextAttribute(ipp_t *ipp, const char *name, - ipp_tag_t value_tag); -extern size_t ippLength(ipp_t *ipp); -extern ipp_t *ippNew(void); -extern ipp_state_t ippRead(http_t *http, ipp_t *ipp); -extern const ipp_uchar_t *ippTimeToDate(time_t t); -extern ipp_state_t ippWrite(http_t *http, ipp_t *ipp); -extern int ippPort(void); -extern void ippSetPort(int p); + ipp_tag_t value_tag) _CUPS_PUBLIC; +extern size_t ippLength(ipp_t *ipp) _CUPS_PUBLIC; +extern ipp_t *ippNew(void) _CUPS_PUBLIC; +extern ipp_state_t ippRead(http_t *http, ipp_t *ipp) _CUPS_PUBLIC; +extern const ipp_uchar_t *ippTimeToDate(time_t t) _CUPS_PUBLIC; +extern ipp_state_t ippWrite(http_t *http, ipp_t *ipp) _CUPS_PUBLIC; +extern int ippPort(void) _CUPS_PUBLIC; +extern void ippSetPort(int p) _CUPS_PUBLIC; /**** New in CUPS 1.1.19 ****/ extern ipp_attribute_t *ippAddCollection(ipp_t *ipp, ipp_tag_t group, @@ -870,7 +803,7 @@ extern void ippDeleteAttribute(ipp_t *ipp, ipp_attribute_t *attr) _CUPS_API_1_1 extern ipp_state_t ippReadFile(int fd, ipp_t *ipp) _CUPS_API_1_1_19; extern ipp_state_t ippWriteFile(int fd, ipp_t *ipp) _CUPS_API_1_1_19; -/**** New in CUPS 1.2/OS X 10.5 ****/ +/**** New in CUPS 1.2/macOS 10.5 ****/ extern ipp_attribute_t *ippAddOctetString(ipp_t *ipp, ipp_tag_t group, const char *name, const void *data, int datalen) _CUPS_API_1_2; @@ -883,11 +816,11 @@ extern ipp_state_t ippReadIO(void *src, ipp_iocb_t cb, int blocking, extern ipp_state_t ippWriteIO(void *dst, ipp_iocb_t cb, int blocking, ipp_t *parent, ipp_t *ipp) _CUPS_API_1_2; -/**** New in CUPS 1.4/OS X 10.6 ****/ +/**** New in CUPS 1.4/macOS 10.6 ****/ extern const char *ippTagString(ipp_tag_t tag) _CUPS_API_1_4; extern ipp_tag_t ippTagValue(const char *name) _CUPS_API_1_4; -/**** New in CUPS 1.6/OS X 10.8 ****/ +/**** New in CUPS 1.6/macOS 10.8 ****/ extern ipp_attribute_t *ippAddOutOfBand(ipp_t *ipp, ipp_tag_t group, ipp_tag_t value_tag, const char *name) _CUPS_API_1_6; @@ -1010,7 +943,3 @@ extern const char *ippStateString(ipp_state_t state) _CUPS_API_2_0; } # endif /* __cplusplus */ #endif /* !_CUPS_IPP_H_ */ - -/* - * End of "$Id$". - */