]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
CUPS_PRINTER_xxx -> CUPS_PTYPE_xxx with source compatibility changes.
authorMichael R Sweet <msweet@msweet.org>
Thu, 5 Oct 2023 15:52:42 +0000 (11:52 -0400)
committerMichael R Sweet <msweet@msweet.org>
Thu, 5 Oct 2023 15:52:42 +0000 (11:52 -0400)
Add CUPS_PTYPE_FOLD to support fold finishing.

cups/cups.h
cups/dest.c
cups/testcups.c
cups/testdest.c
scheduler/classes.c
scheduler/client.c
scheduler/dirsvc.c
scheduler/ipp.c
scheduler/job.c
scheduler/printers.c

index 569f192c842d2a1e60b8761cb2459cbfa4616cab..44abd202722ad8836e26411a3172f87c59807002 100644 (file)
@@ -211,35 +211,66 @@ typedef unsigned cups_media_flags_t;      // Combined flags for @link cupsGetDestMedi
 
 enum cups_ptype_e                      // Printer type/capability flags
 {
-  CUPS_PRINTER_LOCAL = 0x0000,                 // Local printer or class
-  CUPS_PRINTER_CLASS = 0x0001,                 // Printer class
-  CUPS_PRINTER_REMOTE = 0x0002,                        // Remote printer or class
-  CUPS_PRINTER_BW = 0x0004,                    // Can do B&W printing
-  CUPS_PRINTER_COLOR = 0x0008,                 // Can do color printing
-  CUPS_PRINTER_DUPLEX = 0x0010,                        // Can do two-sided printing
-  CUPS_PRINTER_STAPLE = 0x0020,                        // Can staple output
-  CUPS_PRINTER_COPIES = 0x0040,                        // Can do copies in hardware
-  CUPS_PRINTER_COLLATE = 0x0080,               // Can quickly collate copies
-  CUPS_PRINTER_PUNCH = 0x0100,                 // Can punch output
-  CUPS_PRINTER_COVER = 0x0200,                 // Can cover output
-  CUPS_PRINTER_BIND = 0x0400,                  // Can bind output
-  CUPS_PRINTER_SORT = 0x0800,                  // Can sort output
-  CUPS_PRINTER_SMALL = 0x1000,                 // Can print on Letter/Legal/A4-size media
-  CUPS_PRINTER_MEDIUM = 0x2000,                        // Can print on Tabloid/B/C/A3/A2-size media
-  CUPS_PRINTER_LARGE = 0x4000,                 // Can print on D/E/A1/A0-size media
-  CUPS_PRINTER_VARIABLE = 0x8000,              // Can print on rolls and custom-size media
-  CUPS_PRINTER_DEFAULT = 0x20000,              // Default printer on network
-  CUPS_PRINTER_FAX = 0x40000,                  // Fax queue
-  CUPS_PRINTER_REJECTING = 0x80000,            // Printer is rejecting jobs
-  CUPS_PRINTER_NOT_SHARED = 0x200000,          // Printer is not shared
-  CUPS_PRINTER_AUTHENTICATED = 0x400000,       // Printer requires authentication
-  CUPS_PRINTER_COMMANDS = 0x800000,            // Printer supports maintenance commands
-  CUPS_PRINTER_DISCOVERED = 0x1000000,         // Printer was discovered
-  CUPS_PRINTER_SCANNER = 0x2000000,            // Scanner-only device
-  CUPS_PRINTER_MFP = 0x4000000,                        // Printer with scanning capabilities
-  CUPS_PRINTER_3D = 0x8000000,                 // Printer with 3D capabilities @exclude all@ @private@ @deprecated@
-  CUPS_PRINTER_OPTIONS = 0x6fffc               // ~(CLASS | REMOTE | IMPLICIT | DEFAULT | FAX | REJECTING | DELETE | NOT_SHARED | AUTHENTICATED | COMMANDS | DISCOVERED) @private@
+  CUPS_PTYPE_LOCAL = 0x0000,                   // Local printer or class
+  CUPS_PTYPE_CLASS = 0x0001,                   // Printer class
+  CUPS_PTYPE_REMOTE = 0x0002,                  // Remote printer or class
+  CUPS_PTYPE_BW = 0x0004,                      // Can do B&W printing
+  CUPS_PTYPE_COLOR = 0x0008,                   // Can do color printing
+  CUPS_PTYPE_DUPLEX = 0x0010,                  // Can do two-sided printing
+  CUPS_PTYPE_STAPLE = 0x0020,                  // Can staple output
+  CUPS_PTYPE_COPIES = 0x0040,                  // Can do copies in hardware
+  CUPS_PTYPE_COLLATE = 0x0080,                 // Can quickly collate copies
+  CUPS_PTYPE_PUNCH = 0x0100,                   // Can punch output
+  CUPS_PTYPE_COVER = 0x0200,                   // Can cover output
+  CUPS_PTYPE_BIND = 0x0400,                    // Can bind output
+  CUPS_PTYPE_SORT = 0x0800,                    // Can sort output
+  CUPS_PTYPE_SMALL = 0x1000,                   // Can print on Letter/Legal/A4-size media
+  CUPS_PTYPE_MEDIUM = 0x2000,                  // Can print on Tabloid/B/C/A3/A2-size media
+  CUPS_PTYPE_LARGE = 0x4000,                   // Can print on D/E/A1/A0-size media
+  CUPS_PTYPE_VARIABLE = 0x8000,                        // Can print on rolls and custom-size media
+  CUPS_PTYPE_DEFAULT = 0x20000,                        // Default printer on network
+  CUPS_PTYPE_FAX = 0x40000,                    // Fax queue
+  CUPS_PTYPE_REJECTING = 0x80000,              // Printer is rejecting jobs
+  CUPS_PTYPE_NOT_SHARED = 0x200000,            // Printer is not shared
+  CUPS_PTYPE_AUTHENTICATED = 0x400000,         // Printer requires authentication
+  CUPS_PTYPE_COMMANDS = 0x800000,              // Printer supports maintenance commands
+  CUPS_PTYPE_DISCOVERED = 0x1000000,           // Printer was discovered
+  CUPS_PTYPE_SCANNER = 0x2000000,              // Scanner-only device
+  CUPS_PTYPE_MFP = 0x4000000,                  // Printer with scanning capabilities
+  CUPS_PTYPE_3D = 0x8000000,                   // Printer with 3D capabilities @exclude all@ @private@ @deprecated@
+  CUPS_PTYPE_FOLD = 0x10000000,                        // Can fold output @since CUPS 2.5@
+  CUPS_PTYPE_OPTIONS = 0x1006fffc              // ~(CLASS | REMOTE | IMPLICIT | DEFAULT | FAX | REJECTING | DELETE | NOT_SHARED | AUTHENTICATED | COMMANDS | DISCOVERED) @private@
 };
+#  ifndef _CUPS_NO_DEPRECATED
+#    define CUPS_PRINTER_LOCAL         CUPS_PTYPE_LOCAL
+#    define CUPS_PRINTER_CLASS         CUPS_PTYPE_CLASS
+#    define CUPS_PRINTER_REMOTE                CUPS_PTYPE_REMOTE
+#    define CUPS_PRINTER_BW            CUPS_PTYPE_BW
+#    define CUPS_PRINTER_COLOR         CUPS_PTYPE_COLOR
+#    define CUPS_PRINTER_DUPLEX                CUPS_PTYPE_DUPLEX
+#    define CUPS_PRINTER_STAPLE                CUPS_PTYPE_STAPLE
+#    define CUPS_PRINTER_COPIES                CUPS_PTYPE_COPIES
+#    define CUPS_PRINTER_COLLATE       CUPS_PTYPE_COLLATE
+#    define CUPS_PRINTER_PUNCH         CUPS_PTYPE_PUNCH
+#    define CUPS_PRINTER_COVER         CUPS_PTYPE_COVER
+#    define CUPS_PRINTER_BIND          CUPS_PTYPE_BIND
+#    define CUPS_PRINTER_SORT          CUPS_PTYPE_SORT
+#    define CUPS_PRINTER_SMALL         CUPS_PTYPE_SMALL
+#    define CUPS_PRINTER_MEDIUM                CUPS_PTYPE_MEDIUM
+#    define CUPS_PRINTER_LARGE         CUPS_PTYPE_LARGE
+#    define CUPS_PRINTER_VARIABLE      CUPS_PTYPE_VARIABLE
+#    define CUPS_PRINTER_DEFAULT       CUPS_PTYPE_DEFAULT
+#    define CUPS_PRINTER_FAX           CUPS_PTYPE_FAX
+#    define CUPS_PRINTER_REJECTING     CUPS_PTYPE_REJECTING
+#    define CUPS_PRINTER_NOT           CUPS_PTYPE_NOT
+#    define CUPS_PRINTER_AUTHENTICATED CUPS_PTYPE_AUTHENTICATED
+#    define CUPS_PRINTER_COMMANDS      CUPS_PTYPE_COMMANDS
+#    define CUPS_PRINTER_DISCOVERED    CUPS_PTYPE_DISCOVERED
+#    define CUPS_PRINTER_SCANNER       CUPS_PTYPE_SCANNER
+#    define CUPS_PRINTER_MFP           CUPS_PTYPE_MFP
+#    define CUPS_PRINTER_3D            CUPS_PTYPE_3D
+#    define CUPS_PRINTER_OPTIONS       CUPS_PTYPE_OPTIONS
+#  endif // !_CUPS_NO_DEPRECATED
 typedef unsigned cups_ptype_t;         // Combined printer type/capability flags
 
 typedef enum cups_whichjobs_e          // Which jobs for @link cupsGetJobs@
index 82d92698691d131743e802e64bc6a529deb0fa47..906d2bd5c8e8666cde0c7075537cc44652ad08b1 100644 (file)
@@ -860,7 +860,7 @@ _cupsCreateDest(const char *name,   // I - Printer name
 //
 // The @code type@ and @code mask@ arguments allow the caller to filter the
 // destinations that are enumerated.  Passing 0 for both will enumerate all
-// printers.  The constant @code CUPS_PRINTER_DISCOVERED@ is used to filter on
+// printers.  The constant @code CUPS_PTYPE_DISCOVERED@ is used to filter on
 // destinations that are available but have not yet been added locally.
 //
 // Enumeration happens on the current thread and does not return until all
@@ -897,7 +897,7 @@ cupsEnumDests(
 //
 // The @code type@ and @code mask@ arguments allow the caller to filter the
 // destinations that are enumerated.  Passing 0 for both will enumerate all
-// printers.  The constant @code CUPS_PRINTER_DISCOVERED@ is used to filter on
+// printers.  The constant @code CUPS_PTYPE_DISCOVERED@ is used to filter on
 // destinations that are available but have not yet been added locally.
 //
 // Enumeration happens on the current thread and does not return until all
@@ -1599,7 +1599,7 @@ cupsGetDests2(http_t      *http,  // I - Connection to server or @code CUPS_HTTP_
     * cupsd.
     */
 
-    cups_enum_dests(http, 0, _CUPS_DNSSD_GET_DESTS, NULL, 0, CUPS_PRINTER_DISCOVERED, (cups_dest_cb_t)cups_get_cb, &data);
+    cups_enum_dests(http, 0, _CUPS_DNSSD_GET_DESTS, NULL, 0, CUPS_PTYPE_DISCOVERED, (cups_dest_cb_t)cups_get_cb, &data);
   }
   else
   {
@@ -2698,7 +2698,7 @@ cups_dest_query_cb(
                        model[256],     // Model
                        uriname[1024],  // Name for URI
                        uri[1024];      // Printer URI
-    cups_ptype_t       type = CUPS_PRINTER_DISCOVERED | CUPS_PRINTER_BW;
+    cups_ptype_t       type = CUPS_PTYPE_DISCOVERED | CUPS_PTYPE_BW;
                                        // Printer type
     bool               saw_printer_type = false;
                                        // Did we see a printer-type key?
@@ -2805,66 +2805,66 @@ cups_dest_query_cb(
       {
         // Value is either NNNN or 0xXXXX
        saw_printer_type = true;
-        type             = (cups_ptype_t)strtol(value, NULL, 0) | CUPS_PRINTER_DISCOVERED;
+        type             = (cups_ptype_t)strtol(value, NULL, 0) | CUPS_PTYPE_DISCOVERED;
       }
       else if (!saw_printer_type)
       {
        if (!_cups_strcasecmp(key, "air") && !_cups_strcasecmp(value, "t"))
        {
-         type |= CUPS_PRINTER_AUTHENTICATED;
+         type |= CUPS_PTYPE_AUTHENTICATED;
        }
        else if (!_cups_strcasecmp(key, "bind") && !_cups_strcasecmp(value, "t"))
        {
-         type |= CUPS_PRINTER_BIND;
+         type |= CUPS_PTYPE_BIND;
        }
        else if (!_cups_strcasecmp(key, "collate") && !_cups_strcasecmp(value, "t"))
        {
-         type |= CUPS_PRINTER_COLLATE;
+         type |= CUPS_PTYPE_COLLATE;
        }
        else if (!_cups_strcasecmp(key, "color") && !_cups_strcasecmp(value, "t"))
        {
-         type |= CUPS_PRINTER_COLOR;
+         type |= CUPS_PTYPE_COLOR;
        }
        else if (!_cups_strcasecmp(key, "copies") && !_cups_strcasecmp(value, "t"))
        {
-         type |= CUPS_PRINTER_COPIES;
+         type |= CUPS_PTYPE_COPIES;
        }
        else if (!_cups_strcasecmp(key, "duplex") && !_cups_strcasecmp(value, "t"))
        {
-         type |= CUPS_PRINTER_DUPLEX;
+         type |= CUPS_PTYPE_DUPLEX;
        }
        else if (!_cups_strcasecmp(key, "fax") && !_cups_strcasecmp(value, "t"))
        {
-         type |= CUPS_PRINTER_MFP;
+         type |= CUPS_PTYPE_MFP;
        }
        else if (!_cups_strcasecmp(key, "papercustom") && !_cups_strcasecmp(value, "t"))
        {
-         type |= CUPS_PRINTER_VARIABLE;
+         type |= CUPS_PTYPE_VARIABLE;
        }
        else if (!_cups_strcasecmp(key, "papermax"))
        {
          if (!_cups_strcasecmp(value, "legal-a4"))
-           type |= CUPS_PRINTER_SMALL;
+           type |= CUPS_PTYPE_SMALL;
          else if (!_cups_strcasecmp(value, "isoc-a2"))
-           type |= CUPS_PRINTER_MEDIUM;
+           type |= CUPS_PTYPE_MEDIUM;
          else if (!_cups_strcasecmp(value, ">isoc-a2"))
-           type |= CUPS_PRINTER_LARGE;
+           type |= CUPS_PTYPE_LARGE;
        }
        else if (!_cups_strcasecmp(key, "punch") && !_cups_strcasecmp(value, "t"))
        {
-         type |= CUPS_PRINTER_PUNCH;
+         type |= CUPS_PTYPE_PUNCH;
        }
        else if (!_cups_strcasecmp(key, "scan") && !_cups_strcasecmp(value, "t"))
        {
-         type |= CUPS_PRINTER_MFP;
+         type |= CUPS_PTYPE_MFP;
        }
        else if (!_cups_strcasecmp(key, "sort") && !_cups_strcasecmp(value, "t"))
        {
-         type |= CUPS_PRINTER_SORT;
+         type |= CUPS_PTYPE_SORT;
        }
        else if (!_cups_strcasecmp(key, "staple") && !_cups_strcasecmp(value, "t"))
        {
-         type |= CUPS_PRINTER_STAPLE;
+         type |= CUPS_PTYPE_STAPLE;
        }
       }
     }
@@ -3139,7 +3139,7 @@ cups_enum_dests(
   data.user_data = user_data;
   data.devices   = cupsArrayNew3((cups_array_func_t)cups_dnssd_compare_devices, NULL, NULL, 0, NULL, (cups_afree_func_t)cups_dnssd_free_device);
 
-  if (!(mask & CUPS_PRINTER_DISCOVERED) || !(type & CUPS_PRINTER_DISCOVERED))
+  if (!(mask & CUPS_PTYPE_DISCOVERED) || !(type & CUPS_PTYPE_DISCOVERED))
   {
     // Get the list of local printers and pass them to the callback function...
     num_dests = _cupsGetDests(http, IPP_OP_CUPS_GET_PRINTERS, NULL, &dests, type, mask);
@@ -3225,7 +3225,7 @@ cups_enum_dests(
   }
 
   // Return early if the caller doesn't want to do discovery...
-  if ((mask & CUPS_PRINTER_DISCOVERED) && !(type & CUPS_PRINTER_DISCOVERED))
+  if ((mask & CUPS_PTYPE_DISCOVERED) && !(type & CUPS_PTYPE_DISCOVERED))
     goto enum_finished;
 
   // Get DNS-SD printers...
index e71d56f2a6cf5314a2312fb436008541b7cf6df0..e9753d08c861d24858f6c8a6432a531b325a5efb 100644 (file)
@@ -54,9 +54,9 @@ main(int  argc,                               /* I - Number of command-line arguments */
   {
     if (!strcmp(argv[1], "enum"))
     {
-      cups_ptype_t     mask = CUPS_PRINTER_LOCAL,
+      cups_ptype_t     mask = CUPS_PTYPE_LOCAL,
                                        /* Printer type mask */
-                       type = CUPS_PRINTER_LOCAL;
+                       type = CUPS_PTYPE_LOCAL;
                                        /* Printer type */
       int              msec = 0;       /* Timeout in milliseconds */
 
@@ -66,85 +66,85 @@ main(int  argc,                             /* I - Number of command-line arguments */
           msec = (int)(atof(argv[i]) * 1000);
         else if (!_cups_strcasecmp(argv[i], "bw"))
         {
-          mask |= CUPS_PRINTER_BW;
-          type |= CUPS_PRINTER_BW;
+          mask |= CUPS_PTYPE_BW;
+          type |= CUPS_PTYPE_BW;
         }
         else if (!_cups_strcasecmp(argv[i], "color"))
         {
-          mask |= CUPS_PRINTER_COLOR;
-          type |= CUPS_PRINTER_COLOR;
+          mask |= CUPS_PTYPE_COLOR;
+          type |= CUPS_PTYPE_COLOR;
         }
         else if (!_cups_strcasecmp(argv[i], "mono"))
         {
-          mask |= CUPS_PRINTER_COLOR;
+          mask |= CUPS_PTYPE_COLOR;
         }
         else if (!_cups_strcasecmp(argv[i], "duplex"))
         {
-          mask |= CUPS_PRINTER_DUPLEX;
-          type |= CUPS_PRINTER_DUPLEX;
+          mask |= CUPS_PTYPE_DUPLEX;
+          type |= CUPS_PTYPE_DUPLEX;
         }
         else if (!_cups_strcasecmp(argv[i], "simplex"))
         {
-          mask |= CUPS_PRINTER_DUPLEX;
+          mask |= CUPS_PTYPE_DUPLEX;
         }
         else if (!_cups_strcasecmp(argv[i], "staple"))
         {
-          mask |= CUPS_PRINTER_STAPLE;
-          type |= CUPS_PRINTER_STAPLE;
+          mask |= CUPS_PTYPE_STAPLE;
+          type |= CUPS_PTYPE_STAPLE;
         }
         else if (!_cups_strcasecmp(argv[i], "copies"))
         {
-          mask |= CUPS_PRINTER_COPIES;
-          type |= CUPS_PRINTER_COPIES;
+          mask |= CUPS_PTYPE_COPIES;
+          type |= CUPS_PTYPE_COPIES;
         }
         else if (!_cups_strcasecmp(argv[i], "collate"))
         {
-          mask |= CUPS_PRINTER_COLLATE;
-          type |= CUPS_PRINTER_COLLATE;
+          mask |= CUPS_PTYPE_COLLATE;
+          type |= CUPS_PTYPE_COLLATE;
         }
         else if (!_cups_strcasecmp(argv[i], "punch"))
         {
-          mask |= CUPS_PRINTER_PUNCH;
-          type |= CUPS_PRINTER_PUNCH;
+          mask |= CUPS_PTYPE_PUNCH;
+          type |= CUPS_PTYPE_PUNCH;
         }
         else if (!_cups_strcasecmp(argv[i], "cover"))
         {
-          mask |= CUPS_PRINTER_COVER;
-          type |= CUPS_PRINTER_COVER;
+          mask |= CUPS_PTYPE_COVER;
+          type |= CUPS_PTYPE_COVER;
         }
         else if (!_cups_strcasecmp(argv[i], "bind"))
         {
-          mask |= CUPS_PRINTER_BIND;
-          type |= CUPS_PRINTER_BIND;
+          mask |= CUPS_PTYPE_BIND;
+          type |= CUPS_PTYPE_BIND;
         }
         else if (!_cups_strcasecmp(argv[i], "sort"))
         {
-          mask |= CUPS_PRINTER_SORT;
-          type |= CUPS_PRINTER_SORT;
+          mask |= CUPS_PTYPE_SORT;
+          type |= CUPS_PTYPE_SORT;
         }
         else if (!_cups_strcasecmp(argv[i], "mfp"))
         {
-          mask |= CUPS_PRINTER_MFP;
-          type |= CUPS_PRINTER_MFP;
+          mask |= CUPS_PTYPE_MFP;
+          type |= CUPS_PTYPE_MFP;
         }
         else if (!_cups_strcasecmp(argv[i], "printer"))
         {
-          mask |= CUPS_PRINTER_MFP;
+          mask |= CUPS_PTYPE_MFP;
         }
         else if (!_cups_strcasecmp(argv[i], "large"))
         {
-          mask |= CUPS_PRINTER_LARGE;
-          type |= CUPS_PRINTER_LARGE;
+          mask |= CUPS_PTYPE_LARGE;
+          type |= CUPS_PTYPE_LARGE;
         }
         else if (!_cups_strcasecmp(argv[i], "medium"))
         {
-          mask |= CUPS_PRINTER_MEDIUM;
-          type |= CUPS_PRINTER_MEDIUM;
+          mask |= CUPS_PTYPE_MEDIUM;
+          type |= CUPS_PTYPE_MEDIUM;
         }
         else if (!_cups_strcasecmp(argv[i], "small"))
         {
-          mask |= CUPS_PRINTER_SMALL;
-          type |= CUPS_PRINTER_SMALL;
+          mask |= CUPS_PTYPE_SMALL;
+          type |= CUPS_PTYPE_SMALL;
         }
         else
           fprintf(stderr, "Unknown argument \"%s\" ignored...\n", argv[i]);
index 0a907383c678db55520aa2b94c9063664907f980..36ee1b906d58be0de909f4b113899a3580f214f4 100644 (file)
@@ -70,38 +70,38 @@ main(int  argc,                             /* I - Number of command-line arguments */
     {
       if (!strcmp(argv[i], "grayscale"))
       {
-        type |= CUPS_PRINTER_BW;
-       mask |= CUPS_PRINTER_BW;
+        type |= CUPS_PTYPE_BW;
+       mask |= CUPS_PTYPE_BW;
       }
       else if (!strcmp(argv[i], "color"))
       {
-        type |= CUPS_PRINTER_COLOR;
-       mask |= CUPS_PRINTER_COLOR;
+        type |= CUPS_PTYPE_COLOR;
+       mask |= CUPS_PTYPE_COLOR;
       }
       else if (!strcmp(argv[i], "duplex"))
       {
-        type |= CUPS_PRINTER_DUPLEX;
-       mask |= CUPS_PRINTER_DUPLEX;
+        type |= CUPS_PTYPE_DUPLEX;
+       mask |= CUPS_PTYPE_DUPLEX;
       }
       else if (!strcmp(argv[i], "staple"))
       {
-        type |= CUPS_PRINTER_STAPLE;
-       mask |= CUPS_PRINTER_STAPLE;
+        type |= CUPS_PTYPE_STAPLE;
+       mask |= CUPS_PTYPE_STAPLE;
       }
       else if (!strcmp(argv[i], "small"))
       {
-        type |= CUPS_PRINTER_SMALL;
-       mask |= CUPS_PRINTER_SMALL;
+        type |= CUPS_PTYPE_SMALL;
+       mask |= CUPS_PTYPE_SMALL;
       }
       else if (!strcmp(argv[i], "medium"))
       {
-        type |= CUPS_PRINTER_MEDIUM;
-       mask |= CUPS_PRINTER_MEDIUM;
+        type |= CUPS_PTYPE_MEDIUM;
+       mask |= CUPS_PTYPE_MEDIUM;
       }
       else if (!strcmp(argv[i], "large"))
       {
-        type |= CUPS_PRINTER_LARGE;
-       mask |= CUPS_PRINTER_LARGE;
+        type |= CUPS_PTYPE_LARGE;
+       mask |= CUPS_PTYPE_LARGE;
       }
       else
         usage(argv[i]);
index cc3963670fa5b04670b07d1d89d9da0950d980f5..1ada5f4d924fcf7107080e9f35ad049fb76aa397 100644 (file)
@@ -35,7 +35,7 @@ cupsdAddClass(const char *name)               /* I - Name of class */
     * Change from a printer to a class...
     */
 
-    c->type = CUPS_PRINTER_CLASS;
+    c->type = CUPS_PTYPE_CLASS;
 
     httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
                     ServerName, RemotePort, "/classes/%s", name);
@@ -165,7 +165,7 @@ cupsdDeletePrinterFromClasses(
   for (c = (cupsd_printer_t *)cupsArrayFirst(Printers);
        c;
        c = (cupsd_printer_t *)cupsArrayNext(Printers))
-    if (c->type & CUPS_PRINTER_CLASS)
+    if (c->type & CUPS_PTYPE_CLASS)
       changed |= cupsdDeletePrinterFromClass(c, p);
 
   return (changed);
@@ -221,7 +221,7 @@ cupsdFindAvailablePrinter(
 
     if (c->printers[i]->accepting &&
         (c->printers[i]->state == IPP_PSTATE_IDLE ||
-         ((c->printers[i]->type & CUPS_PRINTER_REMOTE) && !c->printers[i]->job)))
+         ((c->printers[i]->type & CUPS_PTYPE_REMOTE) && !c->printers[i]->job)))
     {
       c->last_printer = i;
       return (c->printers[i]);
@@ -245,7 +245,7 @@ cupsdFindClass(const char *name)    /* I - Name of class */
   cupsd_printer_t      *c;             /* Current class/printer */
 
 
-  if ((c = cupsdFindDest(name)) != NULL && (c->type & CUPS_PRINTER_CLASS))
+  if ((c = cupsdFindDest(name)) != NULL && (c->type & CUPS_PTYPE_CLASS))
     return (c);
   else
     return (NULL);
@@ -308,7 +308,7 @@ cupsdLoadAllClasses(void)
 
         if ((p = cupsdFindDest(value)) != NULL)
        {
-         p->type = CUPS_PRINTER_CLASS;
+         p->type = CUPS_PTYPE_CLASS;
          cupsdSetStringf(&p->uri, "ipp://%s:%d/classes/%s", ServerName,
                          LocalPort, value);
          cupsdSetString(&p->error_policy, "retry-job");
@@ -416,7 +416,7 @@ cupsdLoadAllClasses(void)
          cupsdSetString(&temp->make_model, "Remote Printer on unknown");
 
           temp->state = IPP_PSTATE_STOPPED;
-         temp->type  |= CUPS_PRINTER_REMOTE;
+         temp->type  |= CUPS_PTYPE_REMOTE;
 
          cupsdSetString(&temp->location, "Location Unknown");
          cupsdSetString(&temp->info, "No Information Available");
@@ -696,8 +696,8 @@ cupsdSaveAllClasses(void)
     * Skip remote destinations and regular printers...
     */
 
-    if ((pclass->type & CUPS_PRINTER_REMOTE) ||
-        !(pclass->type & CUPS_PRINTER_CLASS))
+    if ((pclass->type & CUPS_PTYPE_REMOTE) ||
+        !(pclass->type & CUPS_PTYPE_CLASS))
       continue;
 
    /*
index b41b9ec6da357c246677e87882930609699b07fc..102fd9fd2c215becc42c09429eded9e1017fe994 100644 (file)
@@ -2695,13 +2695,13 @@ get_file(cupsd_client_t *con,           /* I  - Client connection */
       return (NULL);
     }
 
-    if (p->type & CUPS_PRINTER_CLASS)
+    if (p->type & CUPS_PTYPE_CLASS)
     {
       int i;                           /* Looping var */
 
       for (i = 0; i < p->num_printers; i ++)
       {
-       if (!(p->printers[i]->type & CUPS_PRINTER_CLASS))
+       if (!(p->printers[i]->type & CUPS_PTYPE_CLASS))
        {
          snprintf(filename, len, "%s/ppd/%s.ppd", ServerRoot, p->printers[i]->name);
          if (!access(filename, 0))
@@ -2732,13 +2732,13 @@ get_file(cupsd_client_t *con,           /* I  - Client connection */
       return (NULL);
     }
 
-    if (p->type & CUPS_PRINTER_CLASS)
+    if (p->type & CUPS_PTYPE_CLASS)
     {
       int i;                           /* Looping var */
 
       for (i = 0; i < p->num_printers; i ++)
       {
-       if (!(p->printers[i]->type & CUPS_PRINTER_CLASS))
+       if (!(p->printers[i]->type & CUPS_PTYPE_CLASS))
        {
          snprintf(filename, len, "%s/images/%s.png", CacheDir, p->printers[i]->name);
          if (!access(filename, 0))
index 6b926cfdd177ae979ea2ecdc78fa415f85ac191f..eed166c0ee83efbf849263e2385c04f760b4b672 100644 (file)
@@ -94,7 +94,7 @@ cupsdDeregisterPrinter(
                  removeit);
 
   if (!Browsing || !p->shared ||
-      (p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
+      (p->type & (CUPS_PTYPE_REMOTE | CUPS_PTYPE_SCANNER)))
     return;
 
  /*
@@ -118,7 +118,7 @@ cupsdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */
                   p->name);
 
   if (!Browsing || !BrowseLocalProtocols ||
-      (p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
+      (p->type & (CUPS_PTYPE_REMOTE | CUPS_PTYPE_SCANNER)))
     return;
 
   if ((BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDMaster)
@@ -328,7 +328,7 @@ dnssdBuildTxtRecord(
 
   keyvalue[count  ][0] = "rp";
   keyvalue[count++][1] = rp_str;
-  snprintf(rp_str, sizeof(rp_str), "%s/%s", (p->type & CUPS_PRINTER_CLASS) ? "classes" : "printers", p->name);
+  snprintf(rp_str, sizeof(rp_str), "%s/%s", (p->type & CUPS_PTYPE_CLASS) ? "classes" : "printers", p->name);
 
   keyvalue[count  ][0] = "ty";
   keyvalue[count++][1] = p->make_model ? p->make_model : "Unknown";
@@ -370,7 +370,7 @@ dnssdBuildTxtRecord(
     }
   }
 
-  httpAssembleURIf(HTTP_URI_CODING_ALL, adminurl_str, sizeof(adminurl_str), admin_scheme,  NULL, admin_hostname, DNSSDPort, "/%s/%s", (p->type & CUPS_PRINTER_CLASS) ? "classes" : "printers", p->name);
+  httpAssembleURIf(HTTP_URI_CODING_ALL, adminurl_str, sizeof(adminurl_str), admin_scheme,  NULL, admin_hostname, DNSSDPort, "/%s/%s", (p->type & CUPS_PTYPE_CLASS) ? "classes" : "printers", p->name);
   keyvalue[count  ][0] = "adminurl";
   keyvalue[count++][1] = adminurl_str;
 
@@ -428,7 +428,7 @@ dnssdBuildTxtRecord(
   keyvalue[count  ][0] = "mopria-certified";
   keyvalue[count++][1] = "1.3";
 
-  if (p->type & CUPS_PRINTER_FAX)
+  if (p->type & CUPS_PTYPE_FAX)
   {
     keyvalue[count  ][0] = "Fax";
     keyvalue[count++][1] = "T";
@@ -436,61 +436,61 @@ dnssdBuildTxtRecord(
     keyvalue[count++][1] = rp_str;
   }
 
-  if (p->type & CUPS_PRINTER_COLOR)
+  if (p->type & CUPS_PTYPE_COLOR)
   {
     keyvalue[count  ][0] = "Color";
-    keyvalue[count++][1] = (p->type & CUPS_PRINTER_COLOR) ? "T" : "F";
+    keyvalue[count++][1] = (p->type & CUPS_PTYPE_COLOR) ? "T" : "F";
   }
 
-  if (p->type & CUPS_PRINTER_DUPLEX)
+  if (p->type & CUPS_PTYPE_DUPLEX)
   {
     keyvalue[count  ][0] = "Duplex";
-    keyvalue[count++][1] = (p->type & CUPS_PRINTER_DUPLEX) ? "T" : "F";
+    keyvalue[count++][1] = (p->type & CUPS_PTYPE_DUPLEX) ? "T" : "F";
   }
 
-  if (p->type & CUPS_PRINTER_STAPLE)
+  if (p->type & CUPS_PTYPE_STAPLE)
   {
     keyvalue[count  ][0] = "Staple";
-    keyvalue[count++][1] = (p->type & CUPS_PRINTER_STAPLE) ? "T" : "F";
+    keyvalue[count++][1] = (p->type & CUPS_PTYPE_STAPLE) ? "T" : "F";
   }
 
-  if (p->type & CUPS_PRINTER_COPIES)
+  if (p->type & CUPS_PTYPE_COPIES)
   {
     keyvalue[count  ][0] = "Copies";
-    keyvalue[count++][1] = (p->type & CUPS_PRINTER_COPIES) ? "T" : "F";
+    keyvalue[count++][1] = (p->type & CUPS_PTYPE_COPIES) ? "T" : "F";
   }
 
-  if (p->type & CUPS_PRINTER_COLLATE)
+  if (p->type & CUPS_PTYPE_COLLATE)
   {
     keyvalue[count  ][0] = "Collate";
-    keyvalue[count++][1] = (p->type & CUPS_PRINTER_COLLATE) ? "T" : "F";
+    keyvalue[count++][1] = (p->type & CUPS_PTYPE_COLLATE) ? "T" : "F";
   }
 
-  if (p->type & CUPS_PRINTER_PUNCH)
+  if (p->type & CUPS_PTYPE_PUNCH)
   {
     keyvalue[count  ][0] = "Punch";
-    keyvalue[count++][1] = (p->type & CUPS_PRINTER_PUNCH) ? "T" : "F";
+    keyvalue[count++][1] = (p->type & CUPS_PTYPE_PUNCH) ? "T" : "F";
   }
 
-  if (p->type & CUPS_PRINTER_BIND)
+  if (p->type & CUPS_PTYPE_BIND)
   {
     keyvalue[count  ][0] = "Bind";
-    keyvalue[count++][1] = (p->type & CUPS_PRINTER_BIND) ? "T" : "F";
+    keyvalue[count++][1] = (p->type & CUPS_PTYPE_BIND) ? "T" : "F";
   }
 
-  if (p->type & CUPS_PRINTER_SORT)
+  if (p->type & CUPS_PTYPE_SORT)
   {
     keyvalue[count  ][0] = "Sort";
-    keyvalue[count++][1] = (p->type & CUPS_PRINTER_SORT) ? "T" : "F";
+    keyvalue[count++][1] = (p->type & CUPS_PTYPE_SORT) ? "T" : "F";
   }
 
-  if (p->type & CUPS_PRINTER_MFP)
+  if (p->type & CUPS_PTYPE_MFP)
   {
     keyvalue[count  ][0] = "Scan";
-    keyvalue[count++][1] = (p->type & CUPS_PRINTER_MFP) ? "T" : "F";
+    keyvalue[count++][1] = (p->type & CUPS_PTYPE_MFP) ? "T" : "F";
   }
 
-  snprintf(type_str, sizeof(type_str), "0x%X", p->type | CUPS_PRINTER_REMOTE);
+  snprintf(type_str, sizeof(type_str), "0x%X", p->type | CUPS_PTYPE_REMOTE);
 
   keyvalue[count  ][0] = "printer-type";
   keyvalue[count++][1] = type_str;
@@ -642,7 +642,7 @@ dnssdDeregisterAllPrinters(
   for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
        p;
        p = (cupsd_printer_t *)cupsArrayNext(Printers))
-    if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
+    if (!(p->type & (CUPS_PTYPE_REMOTE | CUPS_PTYPE_SCANNER)))
       dnssdDeregisterPrinter(p, 1, from_callback);
 }
 
@@ -870,7 +870,7 @@ dnssdRegisterAllPrinters(int from_callback) /* I - Called from callback? */
   for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
        p;
        p = (cupsd_printer_t *)cupsArrayNext(Printers))
-    if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
+    if (!(p->type & (CUPS_PTYPE_REMOTE | CUPS_PTYPE_SCANNER)))
       dnssdRegisterPrinter(p, from_callback);
 }
 
@@ -1209,7 +1209,7 @@ dnssdRegisterPrinter(
     * Use the "_fax-ipp" service type for fax queues, otherwise use "_ipp"...
     */
 
-    if (p->type & CUPS_PRINTER_FAX)
+    if (p->type & CUPS_PTYPE_FAX)
       status = dnssdRegisterInstance(NULL, p, name, "_fax-ipp._tcp", DNSSDSubTypes, DNSSDPort, &ipp_txt, 1, from_callback);
     else
       status = dnssdRegisterInstance(NULL, p, name, "_ipp._tcp", DNSSDSubTypes, DNSSDPort, &ipp_txt, 1, from_callback);
@@ -1565,7 +1565,7 @@ get_auth_info_required(
   * Figure out the authentication data requirements to advertise...
   */
 
-  if (p->type & CUPS_PRINTER_CLASS)
+  if (p->type & CUPS_PTYPE_CLASS)
     snprintf(resource, sizeof(resource), "/classes/%s", p->name);
   else
     snprintf(resource, sizeof(resource), "/printers/%s", p->name);
index 0203f3feb44dfee267bb05bfd790411f65f63a32..52c1fa7c31d81aa4adff4515425e5765fda0695d 100644 (file)
@@ -518,7 +518,7 @@ cupsdProcessIPPRequest(
                break;
 
            case IPP_OP_CUPS_GET_CLASSES :
-               get_printers(con, CUPS_PRINTER_CLASS);
+               get_printers(con, CUPS_PTYPE_CLASS);
                break;
 
            case IPP_OP_CUPS_ADD_MODIFY_PRINTER :
@@ -714,7 +714,7 @@ cupsdTimeoutJob(cupsd_job_t *job)   /* I - Job to timeout */
   printer = cupsdFindDest(job->dest);
   attr    = ippFindAttribute(job->attrs, "job-sheets", IPP_TAG_NAME);
 
-  if (printer && !(printer->type & CUPS_PRINTER_REMOTE) &&
+  if (printer && !(printer->type & CUPS_PTYPE_REMOTE) &&
       attr && attr->num_values > 1)
   {
    /*
@@ -785,7 +785,7 @@ accept_jobs(cupsd_client_t  *con,   /* I - Client connection */
   cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE, printer, NULL,
                 "Now accepting jobs.");
 
-  if (dtype & CUPS_PRINTER_CLASS)
+  if (dtype & CUPS_PTYPE_CLASS)
   {
     cupsdMarkDirty(CUPSD_DIRTY_CLASSES);
 
@@ -956,7 +956,7 @@ add_class(cupsd_client_t  *con,             /* I - Client connection */
 
   if ((attr = ippFindAttribute(con->request, "printer-is-shared", IPP_TAG_BOOLEAN)) != NULL)
   {
-    if (pclass->type & CUPS_PRINTER_REMOTE)
+    if (pclass->type & CUPS_PTYPE_REMOTE)
     {
      /*
       * Cannot re-share remote printers.
@@ -1052,7 +1052,7 @@ add_class(cupsd_client_t  *con,           /* I - Client connection */
 
        return;
       }
-      else if (dtype & CUPS_PRINTER_CLASS)
+      else if (dtype & CUPS_PTYPE_CLASS)
       {
         send_ipp_status(con, IPP_STATUS_ERROR_BAD_REQUEST,
                        _("Nested classes are not allowed."));
@@ -1576,7 +1576,7 @@ add_job(cupsd_client_t  *con,             /* I - Client connection */
     return (NULL);
   }
 
-  job->dtype   = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE);
+  job->dtype   = printer->type & (CUPS_PTYPE_CLASS | CUPS_PTYPE_REMOTE);
   job->attrs   = con->request;
   job->dirty   = 1;
   con->request = ippNewRequest(job->attrs->request.op.operation_id);
@@ -1745,7 +1745,7 @@ add_job(cupsd_client_t  *con,             /* I - Client connection */
     ippSetString(job->attrs, &job->reasons, 0, "none");
   }
 
-  if (!(printer->type & CUPS_PRINTER_REMOTE) || Classification)
+  if (!(printer->type & CUPS_PTYPE_REMOTE) || Classification)
   {
    /*
     * Add job sheets options...
@@ -1878,7 +1878,7 @@ add_job(cupsd_client_t  *con,             /* I - Client connection */
     * See if we need to add the starting sheet...
     */
 
-    if (!(printer->type & CUPS_PRINTER_REMOTE))
+    if (!(printer->type & CUPS_PTYPE_REMOTE))
     {
       cupsdLogJob(job, CUPSD_LOG_INFO, "Adding start banner page \"%s\".",
                  attr->values[0].string.text);
@@ -2515,7 +2515,7 @@ add_printer(cupsd_client_t  *con, /* I - Client connection */
       return;
     }
 
-    if (printer->type & CUPS_PRINTER_REMOTE)
+    if (printer->type & CUPS_PTYPE_REMOTE)
     {
      /*
       * Cannot re-share remote printers.
@@ -4816,7 +4816,7 @@ copy_job_attrs(cupsd_client_t *con,       /* I - Client connection */
   {
     httpAssembleURIf(HTTP_URI_CODING_ALL, job_uri, sizeof(job_uri), "ipp", NULL,
                     con->clientname, con->clientport,
-                    (job->dtype & CUPS_PRINTER_CLASS) ? "/classes/%s" :
+                    (job->dtype & CUPS_PTYPE_CLASS) ? "/classes/%s" :
                                                         "/printers/%s",
                     job->dest);
     ippAddString(con->response, IPP_TAG_JOB, IPP_TAG_URI,
@@ -4938,7 +4938,7 @@ copy_printer_attrs(
         }
         else
        {
-         httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), is_encrypted ? "ipps" : "ipp", NULL, con->clientname, con->clientport, (p2->type & CUPS_PRINTER_CLASS) ? "/classes/%s" : "/printers/%s", p2->name);
+         httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), is_encrypted ? "ipps" : "ipp", NULL, con->clientname, con->clientport, (p2->type & CUPS_PTYPE_CLASS) ? "/classes/%s" : "/printers/%s", p2->name);
          member_uris->values[i].string.text = _cupsStrAlloc(uri);
         }
       }
@@ -4981,7 +4981,7 @@ copy_printer_attrs(
       "stop-printer"
     };
 
-    if (printer->type & CUPS_PRINTER_CLASS)
+    if (printer->type & CUPS_PTYPE_CLASS)
       ippAddString(con->response, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_NAME), "printer-error-policy-supported", NULL, "retry-current-job");
     else
       ippAddStrings(con->response, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_NAME), "printer-error-policy-supported", sizeof(errors) / sizeof(errors[0]), NULL, errors);
@@ -5005,7 +5005,7 @@ copy_printer_attrs(
 
   if (!ra || cupsArrayFind(ra, "printer-more-info"))
   {
-    httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), is_encrypted ? "https" : "http", NULL, con->clientname, con->clientport, (printer->type & CUPS_PRINTER_CLASS) ? "/classes/%s" : "/printers/%s", printer->name);
+    httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), is_encrypted ? "https" : "http", NULL, con->clientname, con->clientport, (printer->type & CUPS_PTYPE_CLASS) ? "/classes/%s" : "/printers/%s", printer->name);
     ippAddString(con->response, IPP_TAG_PRINTER, IPP_TAG_URI, "printer-more-info", NULL, uri);
   }
 
@@ -5045,13 +5045,13 @@ copy_printer_attrs(
     type = printer->type;
 
     if (printer == DefaultPrinter)
-      type |= CUPS_PRINTER_DEFAULT;
+      type |= CUPS_PTYPE_DEFAULT;
 
     if (!printer->accepting)
-      type |= CUPS_PRINTER_REJECTING;
+      type |= CUPS_PTYPE_REJECTING;
 
     if (!printer->shared)
-      type |= CUPS_PRINTER_NOT_SHARED;
+      type |= CUPS_PTYPE_NOT_SHARED;
 
     ippAddInteger(con->response, IPP_TAG_PRINTER, IPP_TAG_ENUM, "printer-type", (int)type);
   }
@@ -5061,7 +5061,7 @@ copy_printer_attrs(
 
   if (!ra || cupsArrayFind(ra, "printer-uri-supported"))
   {
-    httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), is_encrypted ? "ipps" : "ipp", NULL, con->clientname, con->clientport, (printer->type & CUPS_PRINTER_CLASS) ? "/classes/%s" : "/printers/%s", printer->name);
+    httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), is_encrypted ? "ipps" : "ipp", NULL, con->clientname, con->clientport, (printer->type & CUPS_PTYPE_CLASS) ? "/classes/%s" : "/printers/%s", printer->name);
     ippAddString(con->response, IPP_TAG_PRINTER, IPP_TAG_URI, "printer-uri-supported", NULL, uri);
     cupsdLogMessage(CUPSD_LOG_DEBUG2, "printer-uri-supported=\"%s\"", uri);
   }
@@ -5806,7 +5806,7 @@ create_subscriptions(
   }
   else if (!strncmp(resource, "/classes", 8) && strlen(resource) <= 9)
   {
-    dtype   = CUPS_PRINTER_CLASS;
+    dtype   = CUPS_PTYPE_CLASS;
     printer = NULL;
   }
   else if (!cupsdValidateDest(uri->values[0].string.text, &dtype, &printer))
@@ -6173,7 +6173,7 @@ delete_printer(cupsd_client_t  *con,      /* I - Client connection */
 
   cupsdAddEvent(CUPSD_EVENT_PRINTER_DELETED, printer, NULL,
                 "%s \"%s\" deleted by \"%s\".",
-               (dtype & CUPS_PRINTER_CLASS) ? "Class" : "Printer",
+               (dtype & CUPS_PTYPE_CLASS) ? "Class" : "Printer",
                printer->name, get_username(con));
 
   cupsdExpireSubscriptions(printer, NULL);
@@ -6203,7 +6203,7 @@ delete_printer(cupsd_client_t  *con,      /* I - Client connection */
 
   temporary = printer->temporary;
 
-  if (dtype & CUPS_PRINTER_CLASS)
+  if (dtype & CUPS_PTYPE_CLASS)
   {
     cupsdLogMessage(CUPSD_LOG_INFO, "Class \"%s\" deleted by \"%s\".",
                     printer->name, get_username(con));
@@ -6695,14 +6695,14 @@ get_jobs(cupsd_client_t  *con,          /* I - Client connection */
   {
     dest    = NULL;
     dtype   = (cups_ptype_t)0;
-    dmask   = CUPS_PRINTER_CLASS;
+    dmask   = CUPS_PTYPE_CLASS;
     printer = NULL;
   }
   else if (!strncmp(resource, "/classes", 8) && strlen(resource) <= 9)
   {
     dest    = NULL;
-    dtype   = CUPS_PRINTER_CLASS;
-    dmask   = CUPS_PRINTER_CLASS;
+    dtype   = CUPS_PTYPE_CLASS;
+    dmask   = CUPS_PTYPE_CLASS;
     printer = NULL;
   }
   else if ((dest = cupsdValidateDest(uri->values[0].string.text, &dtype,
@@ -6718,8 +6718,8 @@ get_jobs(cupsd_client_t  *con,            /* I - Client connection */
   }
   else
   {
-    dtype &= CUPS_PRINTER_CLASS;
-    dmask = CUPS_PRINTER_CLASS;
+    dtype &= CUPS_PTYPE_CLASS;
+    dmask = CUPS_PTYPE_CLASS;
   }
 
  /*
@@ -7273,16 +7273,16 @@ get_ppd(cupsd_client_t  *con,           /* I - Client connection */
 
     snprintf(filename, sizeof(filename), "%s/ppd/%s.ppd", ServerRoot, dest->name);
 
-    if ((dtype & CUPS_PRINTER_REMOTE) && access(filename, 0))
+    if ((dtype & CUPS_PTYPE_REMOTE) && access(filename, 0))
     {
       send_ipp_status(con, IPP_STATUS_CUPS_SEE_OTHER, _("See remote printer."));
       ippAddString(con->response, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, dest->uri);
       return;
     }
-    else if (dtype & CUPS_PRINTER_CLASS)
+    else if (dtype & CUPS_PTYPE_CLASS)
     {
       for (i = 0; i < dest->num_printers; i ++)
-        if (!(dest->printers[i]->type & CUPS_PRINTER_CLASS))
+        if (!(dest->printers[i]->type & CUPS_PTYPE_CLASS))
        {
          snprintf(filename, sizeof(filename), "%s/ppd/%s.ppd", ServerRoot, dest->printers[i]->name);
 
@@ -7616,7 +7616,7 @@ get_printer_supported(
 
 static void
 get_printers(cupsd_client_t *con,      /* I - Client connection */
-             int            type)      /* I - 0 or CUPS_PRINTER_CLASS */
+             int            type)      /* I - 0 or CUPS_PTYPE_CLASS */
 {
   http_status_t        status;                 /* Policy status */
   ipp_attribute_t *attr;               /* Current attribute */
@@ -7739,7 +7739,7 @@ get_printers(cupsd_client_t *con, /* I - Client connection */
     if (printer_id && printer->printer_id != printer_id)
       continue;
 
-    if ((!type || (printer->type & CUPS_PRINTER_CLASS) == type) &&
+    if ((!type || (printer->type & CUPS_PTYPE_CLASS) == type) &&
         (printer->type & printer_mask) == printer_type &&
        (!location ||
         (printer->location && !_cups_strcasecmp(printer->location, location))))
@@ -8216,7 +8216,7 @@ hold_new_jobs(cupsd_client_t  *con,       /* I - Connection */
 
   cupsdSetPrinterReasons(printer, "+hold-new-jobs");
 
-  if (dtype & CUPS_PRINTER_CLASS)
+  if (dtype & CUPS_PTYPE_CLASS)
     cupsdLogMessage(CUPSD_LOG_INFO,
                     "Class \"%s\" now holding pending/new jobs (\"%s\").",
                     printer->name, get_username(con));
@@ -9076,7 +9076,7 @@ reject_jobs(cupsd_client_t  *con, /* I - Client connection */
   cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE, printer, NULL,
                 "No longer accepting jobs.");
 
-  if (dtype & CUPS_PRINTER_CLASS)
+  if (dtype & CUPS_PTYPE_CLASS)
   {
     cupsdMarkDirty(CUPSD_DIRTY_CLASSES);
 
@@ -9149,7 +9149,7 @@ release_held_new_jobs(
 
   cupsdSetPrinterReasons(printer, "-hold-new-jobs");
 
-  if (dtype & CUPS_PRINTER_CLASS)
+  if (dtype & CUPS_PTYPE_CLASS)
     cupsdLogMessage(CUPSD_LOG_INFO,
                     "Class \"%s\" now printing pending/new jobs (\"%s\").",
                     printer->name, get_username(con));
@@ -10193,7 +10193,7 @@ send_http_error(
       cupsd_location_t *auth;          /* Pointer to authentication element */
 
 
-      if (printer->type & CUPS_PRINTER_CLASS)
+      if (printer->type & CUPS_PTYPE_CLASS)
        snprintf(resource, sizeof(resource), "/classes/%s", printer->name);
       else
        snprintf(resource, sizeof(resource), "/printers/%s", printer->name);
@@ -10972,7 +10972,7 @@ set_printer_defaults(
         continue;
 
       if (strcmp(attr->values[0].string.text, "retry-current-job") &&
-          ((printer->type & CUPS_PRINTER_CLASS) ||
+          ((printer->type & CUPS_PTYPE_CLASS) ||
           (strcmp(attr->values[0].string.text, "abort-job") &&
            strcmp(attr->values[0].string.text, "retry-job") &&
            strcmp(attr->values[0].string.text, "stop-printer"))))
@@ -11124,7 +11124,7 @@ start_printer(cupsd_client_t  *con,     /* I - Client connection */
 
   cupsdStartPrinter(printer, 1);
 
-  if (dtype & CUPS_PRINTER_CLASS)
+  if (dtype & CUPS_PTYPE_CLASS)
     cupsdLogMessage(CUPSD_LOG_INFO, "Class \"%s\" started by \"%s\".",
                     printer->name, get_username(con));
   else
@@ -11213,7 +11213,7 @@ stop_printer(cupsd_client_t  *con,      /* I - Client connection */
 
   cupsdStopPrinter(printer, 1);
 
-  if (dtype & CUPS_PRINTER_CLASS)
+  if (dtype & CUPS_PTYPE_CLASS)
     cupsdLogMessage(CUPSD_LOG_INFO, "Class \"%s\" stopped by \"%s\".",
                     printer->name, get_username(con));
   else
index 6b5ae84ec25ee7822806107e4d3bd3d6f0914f10..ba98bf1f058a636fc700c4158a39f2b688184b81 100644 (file)
@@ -350,7 +350,7 @@ cupsdCheckJobs(void)
       printer = cupsdFindDest(job->dest);
       pclass  = NULL;
 
-      while (printer && (printer->type & CUPS_PRINTER_CLASS))
+      while (printer && (printer->type & CUPS_PTYPE_CLASS))
       {
        /*
         * If the class is remote, just pass it to the remote server...
@@ -360,7 +360,7 @@ cupsdCheckJobs(void)
 
         if (pclass->state == IPP_PSTATE_STOPPED)
          printer = NULL;
-        else if (pclass->type & CUPS_PRINTER_REMOTE)
+        else if (pclass->type & CUPS_PTYPE_REMOTE)
          break;
        else
          printer = cupsdFindAvailablePrinter(printer->name);
@@ -842,7 +842,7 @@ cupsdContinueJob(cupsd_job_t *job)  /* I - Job */
                 job->job_sheets->values[0].string.text,
                 job->job_sheets->values[1].string.text);
 
-  if (job->printer->type & CUPS_PRINTER_REMOTE)
+  if (job->printer->type & CUPS_PTYPE_REMOTE)
     banner_page = 0;
   else if (job->job_sheets == NULL)
     banner_page = 0;
@@ -1072,7 +1072,7 @@ cupsdContinueJob(cupsd_job_t *job)        /* I - Job */
     envp[envc ++] = classification;
   }
 
-  if (job->dtype & CUPS_PRINTER_CLASS)
+  if (job->dtype & CUPS_PTYPE_CLASS)
   {
     snprintf(class_name, sizeof(class_name), "CLASS=%s", job->dest);
     envp[envc ++] = class_name;
@@ -2111,7 +2111,7 @@ cupsdMoveJob(cupsd_job_t     *job,        /* I - Job */
                p->name);
 
   cupsdSetString(&job->dest, p->name);
-  job->dtype = p->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE);
+  job->dtype = p->type & (CUPS_PTYPE_CLASS | CUPS_PTYPE_REMOTE);
 
   if ((attr = ippFindAttribute(job->attrs, "job-printer-uri",
                                IPP_TAG_URI)) != NULL)
@@ -3246,7 +3246,7 @@ finalize_job(cupsd_job_t *job,            /* I - Job */
          * act...
          */
 
-          if (job->dtype & CUPS_PRINTER_CLASS)
+          if (job->dtype & CUPS_PTYPE_CLASS)
          {
           /*
            * Queued on a class - mark the job as pending and we'll retry on
@@ -3277,7 +3277,7 @@ finalize_job(cupsd_job_t *job,            /* I - Job */
              ippSetString(job->attrs, &job->reasons, 0, "none");
            }
           }
-         else if ((job->printer->type & CUPS_PRINTER_FAX) ||
+         else if ((job->printer->type & CUPS_PTYPE_FAX) ||
                   !strcmp(job->printer->error_policy, "retry-job"))
          {
             if (job_state == IPP_JSTATE_COMPLETED)
@@ -3864,7 +3864,7 @@ get_options(cupsd_job_t *job,             /* I - Job */
   * Map destination-uris value...
   */
 
-  if ((job->printer->type & CUPS_PRINTER_FAX) && (attr = ippFindAttribute(job->attrs, "destination-uris", IPP_TAG_BEGIN_COLLECTION)) != NULL)
+  if ((job->printer->type & CUPS_PTYPE_FAX) && (attr = ippFindAttribute(job->attrs, "destination-uris", IPP_TAG_BEGIN_COLLECTION)) != NULL)
   {
     ipp_t *ipp = ippGetCollection(attr, 0);    // Collection value
     const char *destination_uri = ippGetString(ippFindAttribute(ipp, "destination-uri", IPP_TAG_URI), 0, NULL);
@@ -3971,7 +3971,7 @@ get_options(cupsd_job_t *job,             /* I - Job */
           strcmp(attr->name, "job-password") &&
           strcmp(attr->name, "job-password-encryption") &&
           strcmp(attr->name, "job-uuid") &&
-          !(job->printer->type & CUPS_PRINTER_REMOTE))
+          !(job->printer->type & CUPS_PTYPE_REMOTE))
        continue;
 
       if ((!strcmp(attr->name, "job-impressions") ||
@@ -5432,7 +5432,7 @@ update_job(cupsd_job_t *job)              /* I - Job to check */
                   "%s", job->printer->state_message);
   if (event & CUPSD_EVENT_PRINTER_STATE)
     cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE, job->printer, NULL,
-                 (job->printer->type & CUPS_PRINTER_CLASS) ?
+                 (job->printer->type & CUPS_PTYPE_CLASS) ?
                      "Class \"%s\" state changed." :
                      "Printer \"%s\" state changed.",
                  job->printer->name);
index 46ebe613f2e1a9caf2643b17bcaedf1a0dc94b21..7bca3bdc9b4e0b8cf1177f7e75ebb6bd6a73cc33 100644 (file)
@@ -818,7 +818,7 @@ cupsdFindPrinter(const char *name)  /* I - Name of printer to find */
   cupsd_printer_t      *p;             /* Printer in list */
 
 
-  if ((p = cupsdFindDest(name)) != NULL && (p->type & CUPS_PRINTER_CLASS))
+  if ((p = cupsdFindDest(name)) != NULL && (p->type & CUPS_PTYPE_CLASS))
     return (NULL);
   else
     return (p);
@@ -1448,7 +1448,7 @@ cupsdSaveAllPrinters(void)
     * Skip printer classes and temporary queues...
     */
 
-    if ((printer->type & CUPS_PRINTER_CLASS) || printer->temporary)
+    if ((printer->type & CUPS_PTYPE_CLASS) || printer->temporary)
       continue;
 
    /*
@@ -1778,9 +1778,9 @@ cupsdSetAuthInfoRequired(
 
     if (p->num_auth_info_required > 1 ||
         strcmp(p->auth_info_required[0], "none"))
-      p->type |= CUPS_PRINTER_AUTHENTICATED;
+      p->type |= CUPS_PTYPE_AUTHENTICATED;
     else
-      p->type &= (cups_ptype_t)~CUPS_PRINTER_AUTHENTICATED;
+      p->type &= (cups_ptype_t)~CUPS_PTYPE_AUTHENTICATED;
 
     return (1);
   }
@@ -2204,7 +2204,7 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
 
   auth_supported = "requesting-user-name";
 
-  if (p->type & CUPS_PRINTER_CLASS)
+  if (p->type & CUPS_PTYPE_CLASS)
     snprintf(resource, sizeof(resource), "/classes/%s", p->name);
   else
     snprintf(resource, sizeof(resource), "/printers/%s", p->name);
@@ -2229,12 +2229,12 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
 #endif /* HAVE_GSSAPI */
 
     if (auth_type != CUPSD_AUTH_NONE)
-      p->type |= CUPS_PRINTER_AUTHENTICATED;
+      p->type |= CUPS_PTYPE_AUTHENTICATED;
     else
-      p->type &= (cups_ptype_t)~CUPS_PRINTER_AUTHENTICATED;
+      p->type &= (cups_ptype_t)~CUPS_PTYPE_AUTHENTICATED;
   }
   else
-    p->type &= (cups_ptype_t)~CUPS_PRINTER_AUTHENTICATED;
+    p->type &= (cups_ptype_t)~CUPS_PTYPE_AUTHENTICATED;
 
  /*
   * Create the required IPP attributes for a printer...
@@ -2315,10 +2315,10 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
   * or class...
   */
 
-  if (p->type & CUPS_PRINTER_CLASS)
+  if (p->type & CUPS_PTYPE_CLASS)
   {
     p->raw = 1;
-    p->type &= (cups_ptype_t)~CUPS_PRINTER_OPTIONS;
+    p->type &= (cups_ptype_t)~CUPS_PTYPE_OPTIONS;
 
    /*
     * Add class-specific attributes...
@@ -2337,14 +2337,14 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
 
       attr    = ippAddStrings(p->attrs, IPP_TAG_PRINTER, IPP_TAG_NAME,
                              "member-names", p->num_printers, NULL, NULL);
-      p->type |= CUPS_PRINTER_OPTIONS;
+      p->type |= CUPS_PTYPE_OPTIONS;
 
       for (i = 0; i < p->num_printers; i ++)
       {
        if (attr != NULL)
          attr->values[i].string.text = _cupsStrAlloc(p->printers[i]->name);
 
-       p->type &= (cups_ptype_t)~CUPS_PRINTER_OPTIONS | p->printers[i]->type;
+       p->type &= (cups_ptype_t)~CUPS_PTYPE_OPTIONS | p->printers[i]->type;
       }
     }
   }
@@ -2377,7 +2377,7 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
           filter = (char *)cupsArrayNext(p->pc->filters))
        add_printer_filter(p, p->filetype, filter);
     }
-    else if (!(p->type & CUPS_PRINTER_REMOTE))
+    else if (!(p->type & CUPS_PTYPE_REMOTE))
     {
      /*
       * Add a filter from application/vnd.cups-raw to printer/name to
@@ -2502,7 +2502,7 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
   * Force sharing off for remote queues...
   */
 
-  if (p->type & CUPS_PRINTER_REMOTE)
+  if (p->type & CUPS_PTYPE_REMOTE)
     p->shared = 0;
 
  /*
@@ -2702,7 +2702,7 @@ cupsdSetPrinterState(
     cupsdAddEvent(s == IPP_PSTATE_STOPPED ? CUPSD_EVENT_PRINTER_STOPPED :
                       CUPSD_EVENT_PRINTER_STATE, p, NULL,
                  "%s \"%s\" state changed to %s.",
-                 (p->type & CUPS_PRINTER_CLASS) ? "Class" : "Printer",
+                 (p->type & CUPS_PTYPE_CLASS) ? "Class" : "Printer",
                  p->name, printer_states[p->state - IPP_PSTATE_IDLE]);
 
    /*
@@ -3015,7 +3015,7 @@ cupsdValidateDest(
       *printer = p;
 
     if (dtype)
-      *dtype = p->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE);
+      *dtype = p->type & (CUPS_PTYPE_CLASS | CUPS_PTYPE_REMOTE);
 
     return (p->name);
   }
@@ -3071,7 +3071,7 @@ cupsdValidateDest(
         *printer = p;
 
       if (dtype)
-       *dtype = p->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE);
+       *dtype = p->type & (CUPS_PTYPE_CLASS | CUPS_PTYPE_REMOTE);
 
       return (p->name);
     }
@@ -3358,7 +3358,7 @@ add_printer_defaults(cupsd_printer_t *p)/* I - Printer */
     ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_NOVALUE, "orientation-requested-default", NULL, NULL);
 
   if (!cupsGetOption("print-color-mode", p->num_options, p->options))
-    ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "print-color-mode-default", NULL, (p->type & CUPS_PRINTER_COLOR) ? "color" : "monochrome");
+    ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "print-color-mode-default", NULL, (p->type & CUPS_PTYPE_COLOR) ? "color" : "monochrome");
 
   if (!cupsGetOption("print-quality", p->num_options, p->options))
     ippAddInteger(p->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM, "print-quality-default", IPP_QUALITY_NORMAL);
@@ -3739,7 +3739,7 @@ delete_printer_filters(
 static void
 dirty_printer(cupsd_printer_t *p)      /* I - Printer */
 {
-  if (p->type & CUPS_PRINTER_CLASS)
+  if (p->type & CUPS_PTYPE_CLASS)
     cupsdMarkDirty(CUPSD_DIRTY_CLASSES);
   else
     cupsdMarkDirty(CUPSD_DIRTY_PRINTERS);
@@ -3943,15 +3943,15 @@ load_ppd(cupsd_printer_t *p)            /* I - Printer */
 
   cupsdClearString(&(p->make_model));
 
-  p->type &= (cups_ptype_t)~CUPS_PRINTER_OPTIONS;
-  p->type |= CUPS_PRINTER_BW;
+  p->type &= (cups_ptype_t)~CUPS_PTYPE_OPTIONS;
+  p->type |= CUPS_PTYPE_BW;
 
   finishings[0]  = IPP_FINISHINGS_NONE;
   num_finishings = 1;
 
   p->ppd_attrs = ippNew();
 
-  if (p->type & CUPS_PRINTER_FAX)
+  if (p->type & CUPS_PTYPE_FAX)
   {
     /* confirmation-sheet-print-default */
     ippAddBoolean(p->ppd_attrs, IPP_TAG_PRINTER, "confirmation-sheet-default", 0);
@@ -4036,14 +4036,14 @@ load_ppd(cupsd_printer_t *p)            /* I - Printer */
     ppdMarkDefaults(ppd);
 
     if (ppd->color_device)
-      p->type |= CUPS_PRINTER_COLOR;
+      p->type |= CUPS_PTYPE_COLOR;
     if (ppd->variable_sizes)
-      p->type |= CUPS_PRINTER_VARIABLE;
+      p->type |= CUPS_PTYPE_VARIABLE;
     if (!ppd->manual_copies)
-      p->type |= CUPS_PRINTER_COPIES;
+      p->type |= CUPS_PTYPE_COPIES;
     if ((ppd_attr = ppdFindAttr(ppd, "cupsFax", NULL)) != NULL)
       if (ppd_attr->value && !_cups_strcasecmp(ppd_attr->value, "true"))
-       p->type |= CUPS_PRINTER_FAX;
+       p->type |= CUPS_PTYPE_FAX;
 
     ippAddBoolean(p->ppd_attrs, IPP_TAG_PRINTER, "color-supported", (char)ppd->color_device);
 
@@ -4741,7 +4741,7 @@ load_ppd(cupsd_printer_t *p)              /* I - Printer */
     if (duplex && duplex->num_choices > 1 &&
        !ppdInstallableConflict(ppd, duplex->keyword, "DuplexTumble"))
     {
-      p->type |= CUPS_PRINTER_DUPLEX;
+      p->type |= CUPS_PTYPE_DUPLEX;
 
       ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "pwg-raster-document-sheet-back", NULL, "normal");
 
@@ -4769,7 +4769,7 @@ load_ppd(cupsd_printer_t *p)              /* I - Printer */
     }
 
     if (ppdFindOption(ppd, "Collate") != NULL)
-      p->type |= CUPS_PRINTER_COLLATE;
+      p->type |= CUPS_PTYPE_COLLATE;
 
     if (p->pc && p->pc->finishings)
     {
@@ -4796,11 +4796,11 @@ load_ppd(cupsd_printer_t *p)            /* I - Printer */
           case IPP_FINISHINGS_EDGE_STITCH_TOP :
           case IPP_FINISHINGS_EDGE_STITCH_RIGHT :
           case IPP_FINISHINGS_EDGE_STITCH_BOTTOM :
-              p->type |= CUPS_PRINTER_BIND;
+              p->type |= CUPS_PTYPE_BIND;
               break;
 
           case IPP_FINISHINGS_COVER :
-              p->type |= CUPS_PRINTER_COVER;
+              p->type |= CUPS_PTYPE_COVER;
               break;
 
           case IPP_FINISHINGS_PUNCH :
@@ -4820,7 +4820,7 @@ load_ppd(cupsd_printer_t *p)              /* I - Printer */
           case IPP_FINISHINGS_PUNCH_QUAD_TOP :
           case IPP_FINISHINGS_PUNCH_QUAD_RIGHT :
           case IPP_FINISHINGS_PUNCH_QUAD_BOTTOM :
-              p->type |= CUPS_PRINTER_PUNCH;
+              p->type |= CUPS_PTYPE_PUNCH;
               break;
 
           case IPP_FINISHINGS_STAPLE :
@@ -4836,7 +4836,7 @@ load_ppd(cupsd_printer_t *p)              /* I - Printer */
           case IPP_FINISHINGS_STAPLE_TRIPLE_TOP :
           case IPP_FINISHINGS_STAPLE_TRIPLE_RIGHT :
           case IPP_FINISHINGS_STAPLE_TRIPLE_BOTTOM :
-              p->type |= CUPS_PRINTER_STAPLE;
+              p->type |= CUPS_PTYPE_STAPLE;
               break;
 
           default :
@@ -4871,20 +4871,20 @@ load_ppd(cupsd_printer_t *p)            /* I - Printer */
 
     for (i = 0; i < ppd->num_sizes; i ++)
       if (ppd->sizes[i].length > 1728)
-       p->type |= CUPS_PRINTER_LARGE;
+       p->type |= CUPS_PTYPE_LARGE;
       else if (ppd->sizes[i].length > 1008)
-       p->type |= CUPS_PRINTER_MEDIUM;
+       p->type |= CUPS_PTYPE_MEDIUM;
       else
-       p->type |= CUPS_PRINTER_SMALL;
+       p->type |= CUPS_PTYPE_SMALL;
 
     if ((ppd_attr = ppdFindAttr(ppd, "APICADriver", NULL)) != NULL &&
         ppd_attr->value && !_cups_strcasecmp(ppd_attr->value, "true"))
     {
       if ((ppd_attr = ppdFindAttr(ppd, "APScannerOnly", NULL)) != NULL &&
          ppd_attr->value && !_cups_strcasecmp(ppd_attr->value, "true"))
-        p->type |= CUPS_PRINTER_SCANNER;
+        p->type |= CUPS_PTYPE_SCANNER;
       else
-        p->type |= CUPS_PRINTER_MFP;
+        p->type |= CUPS_PTYPE_MFP;
     }
 
    /*
@@ -4900,13 +4900,13 @@ load_ppd(cupsd_printer_t *p)            /* I - Printer */
        if (!_cups_strncasecmp(filter, "application/vnd.cups-command", 28) &&
            _cups_isspace(filter[28]))
        {
-         p->type |= CUPS_PRINTER_COMMANDS;
+         p->type |= CUPS_PTYPE_COMMANDS;
          break;
        }
       }
     }
 
-    if (p->type & CUPS_PRINTER_COMMANDS)
+    if (p->type & CUPS_PTYPE_COMMANDS)
     {
       char     *commands,              /* Copy of commands */
                *start,                 /* Start of name */
@@ -5025,7 +5025,7 @@ load_ppd(cupsd_printer_t *p)              /* I - Printer */
     }
 
     if (ppdFindAttr(ppd, "APRemoteQueueID", NULL))
-      p->type |= CUPS_PRINTER_REMOTE;
+      p->type |= CUPS_PTYPE_REMOTE;
 
 #ifdef HAVE_APPLICATIONSERVICES_H
    /*
@@ -5193,7 +5193,7 @@ load_ppd(cupsd_printer_t *p)              /* I - Printer */
       * Tell the client this is really a hard-wired remote printer.
       */
 
-      p->type |= CUPS_PRINTER_REMOTE;
+      p->type |= CUPS_PTYPE_REMOTE;
 
      /*
       * Then set the make-and-model accordingly...