summaryrefslogtreecommitdiff
path: root/scheduler/printers.h
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2012-04-23 22:44:16 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2012-04-23 22:44:16 +0000
commitf3c17241a42a0845eae2099e6970b5aca9bbd836 (patch)
treee511e108810d2b80f72ff6cee5efafba472beb6a /scheduler/printers.h
parent271780fb877d849c9f41616f338e1e9dd2d69409 (diff)
downloadcups-f3c17241a42a0845eae2099e6970b5aca9bbd836.tar.gz
Merge changes from CUPS 1.6svn-r10437.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@3794 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'scheduler/printers.h')
-rw-r--r--scheduler/printers.h40
1 files changed, 30 insertions, 10 deletions
diff --git a/scheduler/printers.h b/scheduler/printers.h
index 41ae3b3f9..833d2332b 100644
--- a/scheduler/printers.h
+++ b/scheduler/printers.h
@@ -3,7 +3,7 @@
*
* Printer definitions for the CUPS scheduler.
*
- * Copyright 2007-2011 by Apple Inc.
+ * Copyright 2007-2012 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -15,6 +15,11 @@
#ifdef HAVE_DNSSD
# include <dns_sd.h>
+#elif defined(HAVE_AVAHI)
+# include <avahi-client/client.h>
+# include <avahi-client/publish.h>
+# include <avahi-common/error.h>
+# include <avahi-common/thread-watch.h>
#endif /* HAVE_DNSSD */
#include <cups/pwg-private.h>
@@ -33,6 +38,20 @@ typedef struct
/*
+ * DNS-SD types to make the code cleaner/clearer...
+ */
+
+#ifdef HAVE_DNSSD
+typedef DNSServiceRef cupsd_srv_t; /* Service reference */
+typedef TXTRecordRef cupsd_txt_t; /* TXT record */
+
+#elif defined(HAVE_AVAHI)
+typedef AvahiEntryGroup *cupsd_srv_t; /* Service reference */
+typedef AvahiStringList *cupsd_txt_t; /* TXT record */
+#endif /* HAVE_DNSSD */
+
+
+/*
* Printer/class information structure...
*/
@@ -92,16 +111,17 @@ struct cupsd_printer_s
time_t marker_time; /* Last time marker attributes were updated */
_ppd_cache_t *pc; /* PPD cache and mapping data */
-#ifdef HAVE_DNSSD
+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
char *reg_name, /* Name used for service registration */
- *pdl, /* pdl value for TXT record */
- *ipp_txt, /* IPP TXT record contents */
- *printer_txt; /* LPD TXT record contents */
- int ipp_len, /* IPP TXT record length */
- printer_len; /* LPD TXT record length */
- DNSServiceRef ipp_ref, /* Reference for _ipp._tcp,_cups */
- printer_ref; /* Reference for _printer._tcp */
-#endif /* HAVE_DNSSD */
+ *pdl; /* pdl value for TXT record */
+ cupsd_srv_t ipp_srv; /* IPP service(s) */
+# ifdef HAVE_DNSSD
+# ifdef HAVE_SSL
+ cupsd_srv_t ipps_srv; /* IPPS service(s) */
+# endif /* HAVE_SSL */
+ cupsd_srv_t printer_srv; /* LPD service */
+# endif /* HAVE_DNSSD */
+#endif /* HAVE_DNSSD || HAVE_AVAHI */
};