cups/scheduler/dirsvc.h

69 lines
1.9 KiB
C
Raw Permalink Normal View History

2022-05-13 20:08:20 +08:00
/*
* Directory services definitions for the CUPS scheduler.
*
2023-10-26 10:19:35 +08:00
* Copyright © 2021-2023 by OpenPrinting.
2023-01-11 16:57:48 +08:00
* Copyright © 2007-2017 by Apple Inc.
* Copyright © 1997-2007 by Easy Software Products, all rights reserved.
2022-05-13 20:08:20 +08:00
*
2023-01-11 16:57:48 +08:00
* Licensed under Apache License v2.0. See the file "LICENSE" for more
* information.
2022-05-13 20:08:20 +08:00
*/
/*
* Browse protocols...
*/
#define BROWSE_DNSSD 1 /* DNS Service Discovery (aka Bonjour) */
2023-01-11 16:57:48 +08:00
#define BROWSE_ALL 1 /* All protocols */
2022-05-13 20:08:20 +08:00
/*
* Globals...
*/
VAR int Browsing VALUE(TRUE),
/* Whether or not browsing is enabled */
BrowseWebIF VALUE(FALSE),
/* Whether the web interface is advertised */
BrowseLocalProtocols
VALUE(BROWSE_ALL);
/* Protocols to support for local printers */
2023-01-11 16:57:48 +08:00
#ifdef HAVE_DNSSD
2022-05-13 20:08:20 +08:00
VAR char *DNSSDComputerName VALUE(NULL),
/* Computer/server name */
*DNSSDHostName VALUE(NULL),
/* Hostname */
*DNSSDSubTypes VALUE(NULL);
/* Bonjour registration subtypes */
VAR cups_array_t *DNSSDAlias VALUE(NULL);
/* List of dynamic ServerAlias's */
VAR int DNSSDPort VALUE(0);
/* Port number to register */
VAR cups_array_t *DNSSDPrinters VALUE(NULL);
/* Printers we have registered */
2023-01-11 16:57:48 +08:00
# ifdef HAVE_MDNSRESPONDER
2022-05-13 20:08:20 +08:00
VAR DNSServiceRef DNSSDMaster VALUE(NULL);
/* Master DNS-SD service reference */
# else /* HAVE_AVAHI */
VAR AvahiThreadedPoll *DNSSDMaster VALUE(NULL);
/* Master polling interface for Avahi */
VAR AvahiClient *DNSSDClient VALUE(NULL);
/* Client information */
2023-01-11 16:57:48 +08:00
# endif /* HAVE_MDNSRESPONDER */
2022-05-13 20:08:20 +08:00
VAR cupsd_srv_t WebIFSrv VALUE(NULL);
/* Service reference for the web interface */
2023-01-11 16:57:48 +08:00
#endif /* HAVE_DNSSD */
2022-05-13 20:08:20 +08:00
/*
* Prototypes...
*/
extern void cupsdDeregisterPrinter(cupsd_printer_t *p, int removeit);
extern void cupsdRegisterPrinter(cupsd_printer_t *p);
extern void cupsdStartBrowsing(void);
extern void cupsdStopBrowsing(void);
2023-01-11 16:57:48 +08:00
#ifdef HAVE_DNSSD
2022-05-13 20:08:20 +08:00
extern void cupsdUpdateDNSSDName(void);
2023-01-11 16:57:48 +08:00
#endif /* HAVE_DNSSD */