]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Mirror fix from trunk.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Tue, 25 Mar 2014 18:01:47 +0000 (18:01 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Tue, 25 Mar 2014 18:01:47 +0000 (18:01 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11734 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES.txt
cups/encode.c
cups/ipp-support.c
cups/ipp.h
doc/help/man-ipptoolfile.html
man/ipptoolfile.man
scheduler/ipp.c

index d00552df18d1526cb2faf029eebab9403f9a1fed..c03be409e13c3151d2d7d725eb81f889bcbab84a 100644 (file)
@@ -1,4 +1,4 @@
-CHANGES.txt - 1.7.2 - 2014-03-05
+CHANGES.txt - 1.7.2 - 2014-03-25
 --------------------------------
 
 CHANGES IN CUPS V1.7.2
@@ -8,6 +8,8 @@ CHANGES IN CUPS V1.7.2
        - Documentation fixes (STR #3259, STR #4346)
        - Fixed the Japanese localization (STR #4385)
        - Added a German localization (STR #4363)
+       - Fixed documentation and naming of Create-Job/Printer-Subscriptions
+         operations (STR #4389)
        - Updated Linux "relro" support (STR #4349)
        - cupsEnumDests did not set the "is_default" field (STR #4332)
        - cupsDoIORequest could miss the server status, causing failed lpadmin
index efdb4f7ad412d020be7cd454c2383b524ada2982..ce5d6c22e4cae1613c8f2cc3614cdb2c39dac5f5 100644 (file)
@@ -64,8 +64,8 @@ static const ipp_op_t ipp_sub_creation[] =
   IPP_OP_PRINT_JOB,
   IPP_OP_PRINT_URI,
   IPP_OP_CREATE_JOB,
-  IPP_OP_CREATE_PRINTER_SUBSCRIPTION,
-  IPP_OP_CREATE_JOB_SUBSCRIPTION,
+  IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS,
+  IPP_OP_CREATE_JOB_SUBSCRIPTIONS,
   IPP_OP_CUPS_NONE
 };
 
index f6380d8ac524dc6f8ab7764dcffc33f59ad94ea6..7d33982b2d74f3d5a9123d35e1e66fd4bc9f36a7 100644 (file)
@@ -175,8 +175,8 @@ static const char * const ipp_std_ops[] =
                  "Set-Printer-Attributes",
                  "Set-Job-Attributes",
                  "Get-Printer-Supported-Values",
-                 "Create-Printer-Subscription",
-                 "Create-Job-Subscription",
+                 "Create-Printer-Subscriptions",
+                 "Create-Job-Subscriptions",
                  "Get-Subscription-Attributes",
                  "Get-Subscriptions",
                  "Renew-Subscription",
@@ -2083,6 +2083,12 @@ ippOpValue(const char *name)             /* I - Textual name */
     if (!_cups_strcasecmp(name, ipp_cups_ops2[i]))
       return ((ipp_op_t)(i + 0x4027));
 
+  if (!_cups_strcasecmp(name, "Create-Job-Subscription"))
+    return (IPP_OP_CREATE_JOB_SUBSCRIPTIONS);
+
+  if (!_cups_strcasecmp(name, "Create-Printer-Subscription"))
+    return (IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS);
+
   if (!_cups_strcasecmp(name, "CUPS-Add-Class"))
     return (IPP_OP_CUPS_ADD_MODIFY_CLASS);
 
index 10ff50c1a1293b6fa24496f0f48883694b2698c4..d57ea527e0d5443691a0f98f62c7bfd0a95bd084 100644 (file)
@@ -1,18 +1,18 @@
 /*
  * "$Id$"
  *
- *   Internet Printing Protocol definitions for CUPS.
+ * Internet Printing Protocol definitions for CUPS.
  *
- *   Copyright 2007-2013 by Apple Inc.
- *   Copyright 1997-2006 by Easy Software Products.
+ * 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/".
+ * 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/".
  *
- *   This file is subject to the Apple OS-Developed Software exception.
+ * This file is subject to the Apple OS-Developed Software exception.
  */
 
 #ifndef _CUPS_IPP_H_
@@ -251,8 +251,8 @@ typedef enum ipp_op_e                       /**** IPP operations ****/
   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_SUBSCRIPTION,  /* Create a printer subscription @since CUPS 1.2/OS X 10.5@ */
-  IPP_OP_CREATE_JOB_SUBSCRIPTION,      /* Create a job subscription @since CUPS 1.2/OS X 10.5@ */
+  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@ */
@@ -331,8 +331,10 @@ typedef enum ipp_op_e                      /**** IPP operations ****/
 #    define IPP_SET_PRINTER_ATTRIBUTES         IPP_OP_SET_PRINTER_ATTRIBUTES
 #    define IPP_SET_JOB_ATTRIBUTES             IPP_OP_SET_JOB_ATTRIBUTES
 #    define IPP_GET_PRINTER_SUPPORTED_VALUES   IPP_OP_GET_PRINTER_SUPPORTED_VALUES
-#    define IPP_CREATE_PRINTER_SUBSCRIPTION    IPP_OP_CREATE_PRINTER_SUBSCRIPTION
-#    define IPP_CREATE_JOB_SUBSCRIPTION                IPP_OP_CREATE_JOB_SUBSCRIPTION
+#    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_GET_SUBSCRIPTION_ATTRIBUTES    IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES
 #    define IPP_GET_SUBSCRIPTIONS              IPP_OP_GET_SUBSCRIPTIONS
 #    define IPP_RENEW_SUBSCRIPTION             IPP_OP_RENEW_SUBSCRIPTION
index e655bec978aa2f551265d90b485fe6ea38ecad6c..ce64e2550c089848fa9f49c362071d2f20f07498 100644 (file)
@@ -530,8 +530,8 @@ RFC 2911 and other IPP extension specifications. Here is a complete list:
     Cancel-Subscription
     Close-Job
     Create-Job
-    Create-Job-Subscription
-    Create-Printer-Subscription
+    Create-Job-Subscriptions
+    Create-Printer-Subscriptions
     Deactivate-Printer
     Disable-Printer
     Enable-Printer
index 4b0246fbfa059e6f42a0263d086da389373a204a..1c630ffb04a510bf049b703155b80427fc081766 100644 (file)
@@ -11,7 +11,7 @@
 .\" 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/".
 .\"
-.TH ipptoolfile 5 "CUPS" "20 February 2014" "Apple Inc."
+.TH ipptoolfile 5 "CUPS" "25 March 2014" "Apple Inc."
 .SH NAME
 ipptoolfile \- ipptool file format
 
@@ -423,8 +423,8 @@ RFC 2911 and other IPP extension specifications. Here is a complete list:
     Cancel-Subscription
     Close-Job
     Create-Job
-    Create-Job-Subscription
-    Create-Printer-Subscription
+    Create-Job-Subscriptions
+    Create-Printer-Subscriptions
     Deactivate-Printer
     Disable-Printer
     Enable-Printer
index 8dce9b0ca354dd34e8ec4087a8567fec966b03ea..6fb5a0abf85432352f8264eebf352a12010089f1 100644 (file)
@@ -85,7 +85,7 @@ static void   copy_subscription_attrs(cupsd_client_t *con,
                                        cups_array_t *exclude);
 static void    create_job(cupsd_client_t *con, ipp_attribute_t *uri);
 static cups_array_t *create_requested_array(ipp_t *request);
-static void    create_subscription(cupsd_client_t *con, ipp_attribute_t *uri);
+static void    create_subscriptions(cupsd_client_t *con, ipp_attribute_t *uri);
 static void    delete_printer(cupsd_client_t *con, ipp_attribute_t *uri);
 static void    get_default(cupsd_client_t *con);
 static void    get_devices(cupsd_client_t *con);
@@ -437,176 +437,176 @@ cupsdProcessIPPRequest(
 
        switch (con->request->request.op.operation_id)
        {
-         case IPP_PRINT_JOB :
+         case IPP_OP_PRINT_JOB :
               print_job(con, uri);
               break;
 
-         case IPP_VALIDATE_JOB :
+         case IPP_OP_VALIDATE_JOB :
               validate_job(con, uri);
               break;
 
-         case IPP_CREATE_JOB :
+         case IPP_OP_CREATE_JOB :
               create_job(con, uri);
               break;
 
-         case IPP_SEND_DOCUMENT :
+         case IPP_OP_SEND_DOCUMENT :
               send_document(con, uri);
               break;
 
-         case IPP_CANCEL_JOB :
+         case IPP_OP_CANCEL_JOB :
               cancel_job(con, uri);
               break;
 
-         case IPP_GET_JOB_ATTRIBUTES :
+         case IPP_OP_GET_JOB_ATTRIBUTES :
               get_job_attrs(con, uri);
               break;
 
-         case IPP_GET_JOBS :
+         case IPP_OP_GET_JOBS :
               get_jobs(con, uri);
               break;
 
-         case IPP_GET_PRINTER_ATTRIBUTES :
+         case IPP_OP_GET_PRINTER_ATTRIBUTES :
               get_printer_attrs(con, uri);
               break;
 
-         case IPP_GET_PRINTER_SUPPORTED_VALUES :
+         case IPP_OP_GET_PRINTER_SUPPORTED_VALUES :
               get_printer_supported(con, uri);
               break;
 
-         case IPP_HOLD_JOB :
+         case IPP_OP_HOLD_JOB :
               hold_job(con, uri);
               break;
 
-         case IPP_RELEASE_JOB :
+         case IPP_OP_RELEASE_JOB :
               release_job(con, uri);
               break;
 
-         case IPP_RESTART_JOB :
+         case IPP_OP_RESTART_JOB :
               restart_job(con, uri);
               break;
 
-         case IPP_PAUSE_PRINTER :
+         case IPP_OP_PAUSE_PRINTER :
               stop_printer(con, uri);
              break;
 
-         case IPP_RESUME_PRINTER :
+         case IPP_OP_RESUME_PRINTER :
               start_printer(con, uri);
              break;
 
-         case IPP_PURGE_JOBS :
-         case IPP_CANCEL_JOBS :
-         case IPP_CANCEL_MY_JOBS :
+         case IPP_OP_PURGE_JOBS :
+         case IPP_OP_CANCEL_JOBS :
+         case IPP_OP_CANCEL_MY_JOBS :
               cancel_all_jobs(con, uri);
               break;
 
-         case IPP_SET_JOB_ATTRIBUTES :
+         case IPP_OP_SET_JOB_ATTRIBUTES :
               set_job_attrs(con, uri);
               break;
 
-         case IPP_SET_PRINTER_ATTRIBUTES :
+         case IPP_OP_SET_PRINTER_ATTRIBUTES :
               set_printer_attrs(con, uri);
               break;
 
-         case IPP_HOLD_NEW_JOBS :
+         case IPP_OP_HOLD_NEW_JOBS :
               hold_new_jobs(con, uri);
               break;
 
-         case IPP_RELEASE_HELD_NEW_JOBS :
+         case IPP_OP_RELEASE_HELD_NEW_JOBS :
               release_held_new_jobs(con, uri);
               break;
 
-         case IPP_CLOSE_JOB :
+         case IPP_OP_CLOSE_JOB :
               close_job(con, uri);
               break;
 
-         case CUPS_GET_DEFAULT :
+         case IPP_OP_CUPS_GET_DEFAULT :
               get_default(con);
               break;
 
-         case CUPS_GET_PRINTERS :
+         case IPP_OP_CUPS_GET_PRINTERS :
               get_printers(con, 0);
               break;
 
-         case CUPS_GET_CLASSES :
+         case IPP_OP_CUPS_GET_CLASSES :
               get_printers(con, CUPS_PRINTER_CLASS);
               break;
 
-         case CUPS_ADD_PRINTER :
+         case IPP_OP_CUPS_ADD_MODIFY_PRINTER :
               add_printer(con, uri);
               break;
 
-         case CUPS_DELETE_PRINTER :
+         case IPP_OP_CUPS_DELETE_PRINTER :
               delete_printer(con, uri);
               break;
 
-         case CUPS_ADD_CLASS :
+         case IPP_OP_CUPS_ADD_MODIFY_CLASS :
               add_class(con, uri);
               break;
 
-         case CUPS_DELETE_CLASS :
+         case IPP_OP_CUPS_DELETE_CLASS :
               delete_printer(con, uri);
               break;
 
-         case CUPS_ACCEPT_JOBS :
-         case IPP_ENABLE_PRINTER :
+         case IPP_OP_CUPS_ACCEPT_JOBS :
+         case IPP_OP_ENABLE_PRINTER :
               accept_jobs(con, uri);
               break;
 
-         case CUPS_REJECT_JOBS :
-         case IPP_DISABLE_PRINTER :
+         case IPP_OP_CUPS_REJECT_JOBS :
+         case IPP_OP_DISABLE_PRINTER :
               reject_jobs(con, uri);
               break;
 
-         case CUPS_SET_DEFAULT :
+         case IPP_OP_CUPS_SET_DEFAULT :
               set_default(con, uri);
               break;
 
-         case CUPS_GET_DEVICES :
+         case IPP_OP_CUPS_GET_DEVICES :
               get_devices(con);
               break;
 
-          case CUPS_GET_DOCUMENT :
+          case IPP_OP_CUPS_GET_DOCUMENT :
              get_document(con, uri);
              break;
 
-         case CUPS_GET_PPD :
+         case IPP_OP_CUPS_GET_PPD :
               get_ppd(con, uri);
               break;
 
-         case CUPS_GET_PPDS :
+         case IPP_OP_CUPS_GET_PPDS :
               get_ppds(con);
               break;
 
-         case CUPS_MOVE_JOB :
+         case IPP_OP_CUPS_MOVE_JOB :
               move_job(con, uri);
               break;
 
-         case CUPS_AUTHENTICATE_JOB :
+         case IPP_OP_CUPS_AUTHENTICATE_JOB :
               authenticate_job(con, uri);
               break;
 
-          case IPP_CREATE_PRINTER_SUBSCRIPTION :
-         case IPP_CREATE_JOB_SUBSCRIPTION :
-             create_subscription(con, uri);
+          case IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS :
+         case IPP_OP_CREATE_JOB_SUBSCRIPTIONS :
+             create_subscriptions(con, uri);
              break;
 
-          case IPP_GET_SUBSCRIPTION_ATTRIBUTES :
+          case IPP_OP_GET_SUBSCRIPTION_ATTRIBUTES :
              get_subscription_attrs(con, sub_id);
              break;
 
-         case IPP_GET_SUBSCRIPTIONS :
+         case IPP_OP_GET_SUBSCRIPTIONS :
              get_subscriptions(con, uri);
              break;
 
-         case IPP_RENEW_SUBSCRIPTION :
+         case IPP_OP_RENEW_SUBSCRIPTION :
              renew_subscription(con, sub_id);
              break;
 
-         case IPP_CANCEL_SUBSCRIPTION :
+         case IPP_OP_CANCEL_SUBSCRIPTION :
              cancel_subscription(con, sub_id);
              break;
 
-          case IPP_GET_NOTIFICATIONS :
+          case IPP_OP_GET_NOTIFICATIONS :
              get_notifications(con);
              break;
 
@@ -5224,11 +5224,11 @@ create_requested_array(ipp_t *request)  /* I - IPP request */
 
 
 /*
- * 'create_subscription()' - Create a notification subscription.
+ * 'create_subscriptions()' - Create one or more notification subscriptions.
  */
 
 static void
-create_subscription(
+create_subscriptions(
     cupsd_client_t  *con,              /* I - Client connection */
     ipp_attribute_t *uri)              /* I - Printer URI */
 {
@@ -5276,9 +5276,7 @@ create_subscription(
   * Is the destination valid?
   */
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG,
-                  "cupsdCreateSubscription(con=%p(%d), uri=\"%s\")",
-                  con, con->http.fd, uri->values[0].string.text);
+  cupsdLogMessage(CUPSD_LOG_DEBUG, "create_subscriptions(con=%p(%d), uri=\"%s\")", con, con->http.fd, uri->values[0].string.text);
 
   httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, scheme,
                   sizeof(scheme), userpass, sizeof(userpass), host,
@@ -5529,7 +5527,7 @@ create_subscription(
     if (MaxLeaseDuration && (lease == 0 || lease > MaxLeaseDuration))
     {
       cupsdLogMessage(CUPSD_LOG_INFO,
-                      "create_subscription: Limiting notify-lease-duration to "
+                      "create_subscriptions: Limiting notify-lease-duration to "
                      "%d seconds.",
                      MaxLeaseDuration);
       lease = MaxLeaseDuration;