1 /* 2 * Directory services definitions for the CUPS scheduler. 3 * 4 * Copyright © 2020-2024 by OpenPrinting. 5 * Copyright © 2007-2017 by Apple Inc. 6 * Copyright © 1997-2007 by Easy Software Products, all rights reserved. 7 * 8 * Licensed under Apache License v2.0. See the file "LICENSE" for more 9 * information. 10 */ 11 12 /* 13 * Browse protocols... 14 */ 15 16 #define BROWSE_DNSSD 1 /* DNS Service Discovery (aka Bonjour) */ 17 #define BROWSE_ALL 1 /* All protocols */ 18 19 20 /* 21 * Globals... 22 */ 23 24 VAR int Browsing VALUE(TRUE), 25 /* Whether or not browsing is enabled */ 26 BrowseWebIF VALUE(FALSE), 27 /* Whether the web interface is advertised */ 28 BrowseLocalProtocols 29 VALUE(BROWSE_ALL); 30 /* Protocols to support for local printers */ 31 #ifdef HAVE_DNSSD 32 VAR char *DNSSDComputerName VALUE(NULL), 33 /* Computer/server name */ 34 *DNSSDHostName VALUE(NULL), 35 /* Hostname */ 36 *DNSSDSubTypes VALUE(NULL); 37 /* Bonjour registration subtypes */ 38 VAR cups_array_t *DNSSDAlias VALUE(NULL); 39 /* List of dynamic ServerAlias's */ 40 VAR int DNSSDPort VALUE(0); 41 /* Port number to register */ 42 VAR cups_array_t *DNSSDPrinters VALUE(NULL); 43 /* Printers we have registered */ 44 # ifdef HAVE_MDNSRESPONDER 45 VAR DNSServiceRef DNSSDMaster VALUE(NULL); 46 /* Master DNS-SD service reference */ 47 # else /* HAVE_AVAHI */ 48 VAR AvahiThreadedPoll *DNSSDMaster VALUE(NULL); 49 /* Master polling interface for Avahi */ 50 VAR AvahiClient *DNSSDClient VALUE(NULL); 51 /* Client information */ 52 # endif /* HAVE_MDNSRESPONDER */ 53 VAR cupsd_srv_t WebIFSrv VALUE(NULL); 54 /* Service reference for the web interface */ 55 #endif /* HAVE_DNSSD */ 56 57 58 /* 59 * Prototypes... 60 */ 61 62 extern void cupsdDeregisterPrinter(cupsd_printer_t *p, int removeit); 63 extern void cupsdRegisterPrinter(cupsd_printer_t *p); 64 extern void cupsdStartBrowsing(void); 65 extern void cupsdStopBrowsing(void); 66 #ifdef HAVE_DNSSD 67 extern void cupsdUpdateDNSSDName(void); 68 #endif /* HAVE_DNSSD */ 69