]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix documentation and naming of subscription operations (STR #4389)
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Tue, 25 Mar 2014 18:01:41 +0000 (18:01 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Tue, 25 Mar 2014 18:01:41 +0000 (18:01 +0000)
(also maintaining compatibility mappings for names and enums...)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11733 a1ca3aef-8c08-0410-bb20-df032aa958be

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

index 7ef0ef95f2ad6e07f362a9977dae0cc4dbc6fa61..e7f22683f088e5c6fe8e414294b0c2c9bdd68243 100644 (file)
@@ -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 fb590246cff6a87987fd39f7865c12b7e00e87c4..ced37798d5049e1dd63f3b477e29716dc200d5f0 100644 (file)
@@ -56,8 +56,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 a5c233e205aeed57df3a92edcd1a9387d8042a99..7ef5819fd38d5b3c2cf34d32b0102d5620391314 100644 (file)
@@ -162,8 +162,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",
@@ -2065,6 +2065,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 d5dc936934c960a1e1b5663843e7673cdab91e4f..a55ed40350d8a127414fc6d20f705a4753630d1d 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Internet Printing Protocol definitions for CUPS.
  *
- * Copyright 2007-2013 by Apple Inc.
+ * Copyright 2007-2014 by Apple Inc.
  * Copyright 1997-2006 by Easy Software Products.
  *
  * These coded instructions, statements, and computer programs are the
@@ -264,8 +264,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@ */
@@ -344,8 +344,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 76f7a00118c2a7c0e6603ed8705ad7973ffe3b14..612876df13620cf1a4906cf113ecf8c998caf1b3 100644 (file)
@@ -418,8 +418,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 d00fddb4195f0fc14df2cebd2ea58071c7bf26af..0a99ec9fc216995741d1a313d37ece69145a4d73 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);
@@ -434,176 +434,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;
 
@@ -690,7 +690,7 @@ cupsdProcessIPPRequest(
 
       cupsdAddSelect(httpGetFd(con->http), (cupsd_selfunc_t)cupsdReadClient,
                     (cupsd_selfunc_t)cupsdWriteClient, con);
-    
+
       return (1);
     }
     else
@@ -5201,11 +5201,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 */
 {
@@ -5253,9 +5253,7 @@ create_subscription(
   * Is the destination valid?
   */
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG,
-                  "cupsdCreateSubscription(con=%p(%d), uri=\"%s\")",
-                  con, con->number, uri->values[0].string.text);
+  cupsdLogMessage(CUPSD_LOG_DEBUG, "create_subscriptions(con=%p(%d), uri=\"%s\")", con, con->number, uri->values[0].string.text);
 
   httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, scheme,
                   sizeof(scheme), userpass, sizeof(userpass), host,
@@ -5506,7 +5504,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;