]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_avahi.h
Merge 2-2
[netatalk.git] / etc / afpd / afp_avahi.h
index dfdd384c425c98d28f1b1ae5a08010aa5b5ebf26..ae3366db506c59680a73b39a848e67a15c1a2ade 100644 (file)
 
 #include <avahi-client/client.h>
 #include <avahi-client/publish.h>
-
 #include <avahi-common/alternative.h>
-
-#ifndef HAVE_AVAHI_THREADED_POLL
-#include <avahi-common/simple-watch.h>
-#include <signal.h> /* SIG_BLOCK */
-#else
 #include <avahi-common/thread-watch.h>
-#endif
-
 #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 */