Index: doc/help/spec-ipp.html =================================================================== --- doc/help/spec-ipp.html (revision 6589) +++ doc/help/spec-ipp.html (working copy) @@ -2359,6 +2359,14 @@ 0x00400000 Queue requires authentication. + + 0x00800000 + Queue supports CUPS command files. + + + 0x01000000 + Queue was automatically discovered and added. + Index: cups/cups.h =================================================================== --- cups/cups.h (revision 6589) +++ cups/cups.h (working copy) @@ -107,6 +107,7 @@ CUPS_PRINTER_NOT_SHARED = 0x200000, /* Printer is not shared @since CUPS 1.2@ */ CUPS_PRINTER_AUTHENTICATED = 0x400000,/* Printer requires authentication @since CUPS 1.2@ */ CUPS_PRINTER_COMMANDS = 0x800000, /* Printer supports maintenance commands @since CUPS 1.2@ */ + CUPS_PRINTER_DISCOVERED = 0x1000000, /* Printer was automatically discovered and added @since CUPS 1.3@ */ CUPS_PRINTER_OPTIONS = 0xe6fffc /* ~(CLASS | REMOTE | IMPLICIT) */ }; Index: scheduler/ipp.c =================================================================== --- scheduler/ipp.c (revision 6589) +++ scheduler/ipp.c (working copy) @@ -4587,7 +4587,7 @@ * Add the CUPS-specific printer-type attribute... */ - type = printer->external_type; + type = printer->type; if (printer == DefaultPrinter) type |= CUPS_PRINTER_DEFAULT; Index: scheduler/dirsvc.c =================================================================== --- scheduler/dirsvc.c (revision 6589) +++ scheduler/dirsvc.c (working copy) @@ -199,7 +199,7 @@ */ if (!Browsing || !p->shared || - (p->external_type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT))) + (p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT))) return; /* @@ -318,7 +318,7 @@ p->accepting = 1; p->state = IPP_PRINTER_IDLE; - p->type |= CUPS_PRINTER_REMOTE; + p->type |= CUPS_PRINTER_REMOTE | CUPS_PRINTER_DISCOVERED; p->browse_time = now; p->browse_expire = now + BrowseTimeout; @@ -359,7 +359,7 @@ p->accepting = 1; p->state = IPP_PRINTER_IDLE; - p->type |= CUPS_PRINTER_REMOTE; + p->type |= CUPS_PRINTER_REMOTE | CUPS_PRINTER_DISCOVERED; p->browse_time = now; p->browse_expire = now + BrowseTimeout; @@ -626,7 +626,7 @@ cupsdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */ { if (!Browsing || !BrowseLocalProtocols || !BrowseInterval || !NumBrowsers || - (p->external_type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT))) + (p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT))) return; #ifdef HAVE_LIBSLP @@ -719,7 +719,7 @@ * Skip local destinations... */ - if (!(printer->type & CUPS_PRINTER_REMOTE)) + if (!(printer->type & CUPS_PRINTER_DISCOVERED)) continue; /* @@ -830,7 +830,7 @@ for (count = 0, p = (cupsd_printer_t *)cupsArrayFirst(Printers); count < max_count && p != NULL; p = (cupsd_printer_t *)cupsArrayNext(Printers)) - if (!(p->external_type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT)) && + if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT)) && p->shared && p->browse_time < ut) count ++; @@ -856,8 +856,7 @@ if (!p) break; - else if ((p->external_type & (CUPS_PRINTER_REMOTE | - CUPS_PRINTER_IMPLICIT)) || + else if ((p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT)) || !p->shared) continue; else if (p->browse_time < ut) @@ -904,7 +903,7 @@ * If this is a remote queue, see if it needs to be timed out... */ - if (p->type & CUPS_PRINTER_REMOTE) + if (p->type & CUPS_PRINTER_DISCOVERED) { if (p->browse_expire < to) { @@ -1740,7 +1739,7 @@ * See if we already have it listed in the Printers list, and add it if not... */ - type |= CUPS_PRINTER_REMOTE; + type |= CUPS_PRINTER_REMOTE | CUPS_PRINTER_DISCOVERED; type &= ~CUPS_PRINTER_IMPLICIT; update = 0; hptr = strchr(host, '.'); Index: scheduler/printers.c =================================================================== --- scheduler/printers.c (revision 6589) +++ scheduler/printers.c (working copy) @@ -68,19 +68,6 @@ /* - * Currently Bonjour printers that are shared by CUPS servers are added - * manually by the user on Mac OS X systems. While these printers *are* - * remote queues, the current print dialog will not show them if they - * (correctly) have the CUPS_PRINTER_REMOTE bit set. This may change - * in future releases, however the code to do this is currently disabled. - * - * Define BONJOUR_IS_REMOTE to 1 to get the correct behavior... - */ - -#define BONJOUR_IS_REMOTE 0 - - -/* * Local functions... */ @@ -1391,7 +1378,7 @@ * Skip remote destinations and printer classes... */ - if ((printer->type & CUPS_PRINTER_REMOTE) || + if ((printer->type & CUPS_PRINTER_DISCOVERED) || (printer->type & CUPS_PRINTER_CLASS) || (printer->type & CUPS_PRINTER_IMPLICIT)) continue; @@ -1596,15 +1583,9 @@ if (p->num_auth_info_required > 1 || strcmp(p->auth_info_required[0], "none")) - { - p->type |= CUPS_PRINTER_AUTHENTICATED; - p->external_type |= CUPS_PRINTER_AUTHENTICATED; - } + p->type |= CUPS_PRINTER_AUTHENTICATED; else - { - p->type &= ~CUPS_PRINTER_AUTHENTICATED; - p->external_type &= ~CUPS_PRINTER_AUTHENTICATED; - } + p->type &= ~CUPS_PRINTER_AUTHENTICATED; return (1); } @@ -1622,15 +1603,9 @@ if (attr->num_values > 1 || strcmp(attr->values[0].string.text, "none")) - { - p->type |= CUPS_PRINTER_AUTHENTICATED; - p->external_type |= CUPS_PRINTER_AUTHENTICATED; - } + p->type |= CUPS_PRINTER_AUTHENTICATED; else - { - p->type &= ~CUPS_PRINTER_AUTHENTICATED; - p->external_type &= ~CUPS_PRINTER_AUTHENTICATED; - } + p->type &= ~CUPS_PRINTER_AUTHENTICATED; for (i = 0; i < attr->num_values; i ++) { @@ -1735,7 +1710,7 @@ */ auth_supported = "requesting-user-name"; - if (!(p->type & CUPS_PRINTER_REMOTE)) + if (!(p->type & CUPS_PRINTER_DISCOVERED)) { if (p->type & CUPS_PRINTER_CLASS) snprintf(resource, sizeof(resource), "/classes/%s", p->name); @@ -1823,7 +1798,7 @@ ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "auth-info-required", NULL, "none"); - if (cupsArrayCount(Banners) > 0 && !(p->type & CUPS_PRINTER_REMOTE)) + if (cupsArrayCount(Banners) > 0 && !(p->type & CUPS_PRINTER_DISCOVERED)) { /* * Setup the job-sheets-default attribute... @@ -1846,7 +1821,7 @@ p->raw = 0; p->remote = 0; - if (p->type & CUPS_PRINTER_REMOTE) + if (p->type & CUPS_PRINTER_DISCOVERED) { /* * Tell the client this is a remote printer of some type... @@ -2227,9 +2202,7 @@ cupsdSetString(&p->product, ppd->product); #endif /* HAVE_DNSSD */ -#if BONJOUR_IS_REMOTE ppdattr = ppdFindAttr(ppd, "APRemoteQueueID", NULL); -#endif /* BONJOUR_IS_REMOTE */ /* * Close the PPD and set the type... @@ -2239,7 +2212,6 @@ printer_type = p->type; -#if BONJOUR_IS_REMOTE if (ppdattr) { /* @@ -2248,7 +2220,6 @@ printer_type |= CUPS_PRINTER_REMOTE; } -#endif /* BONJOUR_IS_REMOTE */ } else if (!access(filename, 0)) { @@ -2362,20 +2333,10 @@ } /* - * Save the local printer type value, which may have the CUPS_PRINTER_REMOTE - * bit set. We use this value when sending the printer-type attribute to - * clients so they know whether the printer is really remote. Doing it - * this way prevents the browsing code from timing out hardwired remote - * printers... - */ - - p->external_type = printer_type; - - /* * Copy the printer options into a browse attributes string we can re-use. */ - if (!(printer_type & CUPS_PRINTER_REMOTE)) + if (!(printer_type & CUPS_PRINTER_DISCOVERED)) { const char *valptr; /* Pointer into value */ char *attrptr; /* Pointer into attribute string */ @@ -2642,7 +2603,7 @@ * Can't set status of remote printers... */ - if (p->type & CUPS_PRINTER_REMOTE) + if (p->type & CUPS_PRINTER_DISCOVERED) return; /* @@ -2771,7 +2732,8 @@ * Remove remote printers if we are no longer browsing... */ - if (!Browsing && (p->type & (CUPS_PRINTER_IMPLICIT | CUPS_PRINTER_REMOTE))) + if (!Browsing && + (p->type & (CUPS_PRINTER_IMPLICIT | CUPS_PRINTER_DISCOVERED))) { if (p->type & CUPS_PRINTER_IMPLICIT) cupsArrayRemove(ImplicitPrinters, p); @@ -2793,7 +2755,7 @@ * Update printer attributes as needed... */ - if (!(p->type & CUPS_PRINTER_REMOTE)) + if (!(p->type & CUPS_PRINTER_DISCOVERED)) cupsdSetPrinterAttrs(p); } } @@ -2888,7 +2850,7 @@ if (dtype) *dtype = p->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT | - CUPS_PRINTER_REMOTE); + CUPS_PRINTER_REMOTE | CUPS_PRINTER_DISCOVERED); return (p->name); } @@ -2947,7 +2909,7 @@ if (dtype) *dtype = p->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT | - CUPS_PRINTER_REMOTE); + CUPS_PRINTER_REMOTE | CUPS_PRINTER_DISCOVERED); return (p->name); } Index: scheduler/printers.h =================================================================== --- scheduler/printers.h (revision 6589) +++ scheduler/printers.h (working copy) @@ -63,8 +63,7 @@ char *reasons[16]; /* printer-state-reasons strings */ time_t state_time; /* Time at this state */ char *job_sheets[2]; /* Banners/job sheets */ - cups_ptype_t type, /* Printer type (color, small, etc.) */ - external_type; /* Printer type that is advertised */ + cups_ptype_t type; /* Printer type (color, small, etc.) */ char *browse_attrs; /* Attributes sent with browse data */ time_t browse_expire; /* Expiration time for printer */ time_t browse_time; /* Last time update was sent/received */ Index: scripting/php/Makefile =================================================================== --- scripting/php/Makefile (revision 6589) +++ scripting/php/Makefile (working copy) @@ -3,7 +3,7 @@ # # PHP Makefile for the Common UNIX Printing System (CUPS). # -# Copyright 1997-2007 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 @@ -78,7 +78,7 @@ echo Installing $(PHPCUPS) in $(PHPDIR) $(INSTALL_DIR) $(PHPDIR) $(INSTALL_BIN) $(PHPCUPS) $(PHPDIR) - if test "x$(SYMROOT)" != x; then \ + if test "x$SYMROOT" != x; then \ $(INSTALL_DIR) $(SYMROOT); \ cp $(PHPCUPS) $(SYMROOT); \ fi