]> arthur.barton.de Git - netatalk.git/blobdiff - etc/netatalk/afp_avahi.h
afpd: move mDNS service registration to netatalk process
[netatalk.git] / etc / netatalk / afp_avahi.h
diff --git a/etc/netatalk/afp_avahi.h b/etc/netatalk/afp_avahi.h
new file mode 100644 (file)
index 0000000..588a688
--- /dev/null
@@ -0,0 +1,39 @@
+/* -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2 -*- */
+/*
+ * Author:  Daniel S. Haischt <me@daniel.stefan.haischt.name>
+ * Purpose: Avahi based Zeroconf support
+ * Docs:    http://avahi.org/download/doxygen/
+ *
+ */
+
+#ifndef AFPD_AVAHI_H
+#define AFPD_AVAHI_H
+
+#include <stdlib.h>
+#include <assert.h>
+#include <string.h>
+
+#include <avahi-client/client.h>
+#include <avahi-client/publish.h>
+#include <avahi-common/alternative.h>
+#include <avahi-common/thread-watch.h>
+#include <avahi-common/malloc.h>
+#include <avahi-common/error.h>
+
+#include <atalk/logger.h>
+
+struct context {
+       /* Avahi stuff */
+  int               thread_running;
+  AvahiThreadedPoll *threaded_poll;
+  AvahiClient       *client;
+  AvahiEntryGroup   *group;
+       /* Netatalk stuff */
+       const AFPObj      *obj;
+};
+
+/* prototype definitions */
+void av_zeroconf_register(const AFPObj *obj);
+int av_zeroconf_unregister(void);
+
+#endif   /* AFPD_AVAHI_H */