]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_avahi.h
Merge remote branch 'origin/product-2-2' into develop
[netatalk.git] / etc / afpd / afp_avahi.h
index de6f3db7da3fdb2df2037cf63b575c8d45ae1ee0..ae3366db506c59680a73b39a848e67a15c1a2ade 100644 (file)
 
 #include <avahi-client/client.h>
 #include <avahi-client/publish.h>
-
 #include <avahi-common/alternative.h>
-
-#ifndef HAVE_AVAHI_THREADED_POLL\r
-#include <avahi-common/simple-watch.h>
-#include <signal.h> /* SIG_BLOCK */\r
-#else\r
-#include <avahi-common/thread-watch.h>\r
-#endif
-
+#include <avahi-common/thread-watch.h>
 #include <avahi-common/malloc.h>
 #include <avahi-common/error.h>
 
 #include <atalk/logger.h>
 
-#define AFP_DNS_SERVICE_TYPE "_afpovertcp._tcp"
+#include "afp_config.h"
 
 struct context {
-  int thread_running;
-  pthread_t thread_id;
-  pthread_mutex_t mutex;
-  char *name;
-#ifndef HAVE_AVAHI_THREADED_POLL
-  AvahiSimplePoll   *simple_poll;
-#else
+       /* Avahi stuff */
+  int               thread_running;
   AvahiThreadedPoll *threaded_poll;
-#endif
   AvahiClient       *client;
   AvahiEntryGroup   *group;
-  unsigned long     port;
+       /* Netatalk stuff */
+       const AFPObj      *obj;
 };
 
 /* prototype definitions */
-void* av_zeroconf_setup(unsigned long, const char *);
-int av_zeroconf_run(void*);
-int av_zeroconf_unregister(void*);
-void av_zeroconf_shutdown(void*);
-void av_zeroconf_lock(void *);
-void av_zeroconf_unlock(void *);
+void av_zeroconf_register(const AFPObj *obj);
+int av_zeroconf_unregister(void);
 
 #endif   /* AFPD_AVAHI_H */