]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/ipp-support.c
More svn:properties changes.
[thirdparty/cups.git] / cups / ipp-support.c
index cceda0ff1421add4f3982b91e1269d64bdbe345a..e6111757710a27ed2572c6d0980cb830906f2fc7 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * "$Id: ipp-support.c 4785 2005-10-13 19:39:05Z mike $"
+ * "$Id$"
  *
  *   Internet Printing Protocol support functions for the Common UNIX
  *   Printing System (CUPS).
  *
- *   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -55,7 +55,8 @@ static const char * const ipp_status_oks[] =  /* "OK" status codes */
                  "successful-ok-ignored-subscriptions",
                  "successful-ok-ignored-notifications",
                  "successful-ok-too-many-events",
-                 "successful-ok-but-cancel-subscription"
+                 "successful-ok-but-cancel-subscription",
+                 "successful-ok-events-complete"
                },
                * const ipp_status_400s[] =     /* Client errors */
                {
@@ -145,10 +146,10 @@ static char       * const ipp_std_ops[] =
                {
                  "CUPS-Get-Default",
                  "CUPS-Get-Printers",
-                 "CUPS-Add-Printer",
+                 "CUPS-Add-Modify-Printer",
                  "CUPS-Delete-Printer",
                  "CUPS-Get-Classes",
-                 "CUPS-Add-Class",
+                 "CUPS-Add-Modify-Class",
                  "CUPS-Delete-Class",
                  "CUPS-Accept-Jobs",
                  "CUPS-Reject-Jobs",
@@ -174,7 +175,7 @@ ippErrorString(ipp_status_t error)  /* I - Error status */
   * See if the error code is a known value...
   */
 
-  if (error >= IPP_OK && error <= IPP_OK_BUT_CANCEL_SUBSCRIPTION)
+  if (error >= IPP_OK && error <= IPP_OK_EVENTS_COMPLETE)
     return (ipp_status_oks[error]);
   else if (error == IPP_REDIRECTION_OTHER_SITE)
     return ("redirection-other-site");
@@ -280,6 +281,12 @@ ippOpValue(const char *name)               /* I - Textual name */
     if (!strcasecmp(name, ipp_cups_ops[i]))
       return ((ipp_op_t)(i + 0x4001));
 
+  if (!strcasecmp(name, "CUPS-Add-Class"))
+    return (CUPS_ADD_MODIFY_CLASS);
+
+  if (!strcasecmp(name, "CUPS-Add-Printer"))
+    return (CUPS_ADD_MODIFY_PRINTER);
+
   return ((ipp_op_t)-1);
 }
 
@@ -321,12 +328,10 @@ ippPort(void)
 void
 ippSetPort(int p)                      /* I - Port number to use */
 {
-  fprintf(stderr, "ippSetPort(p=%d)\n", p);
-
   _cupsGlobals()->ipp_port = p;
 }
 
 
 /*
- * End of "$Id: ipp-support.c 4785 2005-10-13 19:39:05Z mike $".
+ * End of "$Id$".
  */