]> arthur.barton.de Git - netatalk.git/blob - etc/afpd/afp_zeroconf.c
Merge remote-tracking branch 'remotes/origin/branch-netatalk-2-1'
[netatalk.git] / etc / afpd / afp_zeroconf.c
1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2 -*- */
2 /*
3  * Author:  Daniel S. Haischt <me@daniel.stefan.haischt.name>
4  * Purpose: Zeroconf facade, that abstracts access to a
5  *          particular Zeroconf implementation
6  * Doc:     http://www.dns-sd.org/
7  *
8  */
9
10 #ifdef HAVE_CONFIG_H
11 #include <config.h>
12 #endif
13
14 #include "afp_zeroconf.h"
15 #include "afp_config.h"
16
17 #ifdef HAVE_AVAHI
18 #include "afp_avahi.h"
19 #endif
20
21
22 /*
23  * Functions (actually they are just facades)
24  */
25 void zeroconf_register(const AFPConfig *configs)
26 {
27 #if defined (HAVE_AVAHI)
28   LOG(log_debug, logtype_afpd, "Attempting to register with mDNS using Avahi");
29
30         av_zeroconf_setup(configs);
31   av_zeroconf_run();
32 #endif
33 }
34
35 void zeroconf_deregister(void)
36 {
37 #if defined (HAVE_AVAHI)
38   LOG(log_debug, logtype_afpd, "Attempting to de-register mDNS using Avahi");
39         av_zeroconf_shutdown();
40 #endif
41 }