#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 */