aboutsummaryrefslogtreecommitdiffstats
path: root/src/zeroconf.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-27 22:18:45 +0100
committerMax Kellermann <max@duempel.org>2013-01-27 22:38:14 +0100
commit95c3f57b3027e0961a1e32036dcce0383fb5e6ee (patch)
treed9279be8c6c3bd46f95b674e8e59a84879f8de34 /src/zeroconf.c
parent068f191c0d9459554db536ac3d7f64f9b9338381 (diff)
downloadmpd-95c3f57b3027e0961a1e32036dcce0383fb5e6ee.tar.gz
mpd-95c3f57b3027e0961a1e32036dcce0383fb5e6ee.tar.xz
mpd-95c3f57b3027e0961a1e32036dcce0383fb5e6ee.zip
zeroconf: convert to C++
Diffstat (limited to '')
-rw-r--r--src/ZeroconfGlue.cxx (renamed from src/zeroconf.c)19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/zeroconf.c b/src/ZeroconfGlue.cxx
index a4611b67e..3facd5762 100644
--- a/src/zeroconf.c
+++ b/src/ZeroconfGlue.cxx
@@ -18,8 +18,9 @@
*/
#include "config.h"
-#include "zeroconf.h"
-#include "zeroconf-internal.h"
+#include "ZeroconfGlue.hxx"
+#include "ZeroconfAvahi.hxx"
+#include "ZeroconfBonjour.hxx"
#include "conf.h"
#include "Listen.hxx"
@@ -34,7 +35,8 @@
static int zeroconfEnabled;
-void initZeroconf(void)
+void
+ZeroconfInit()
{
const char *serviceName;
@@ -52,24 +54,25 @@ void initZeroconf(void)
serviceName = config_get_string(CONF_ZEROCONF_NAME, SERVICE_NAME);
#ifdef HAVE_AVAHI
- init_avahi(serviceName);
+ AvahiInit(serviceName);
#endif
#ifdef HAVE_BONJOUR
- init_zeroconf_osx(serviceName);
+ BonjourInit(serviceName);
#endif
}
-void finishZeroconf(void)
+void
+ZeroconfDeinit()
{
if (!zeroconfEnabled)
return;
#ifdef HAVE_AVAHI
- avahi_finish();
+ AvahiDeinit();
#endif /* HAVE_AVAHI */
#ifdef HAVE_BONJOUR
- bonjour_finish();
+ BonjourDeinit();
#endif
}