2013-01-16 14:56:31 +01:00
|
|
|
#include "zeroconf.h"
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#ifdef HAVE_DBUS
|
|
|
|
#include "avahi.h"
|
|
|
|
#endif
|
|
|
|
|
2013-01-16 15:26:35 +01:00
|
|
|
#ifdef Q_OS_DARWIN
|
|
|
|
#include "bonjour.h"
|
|
|
|
#endif
|
|
|
|
|
2013-01-16 14:56:31 +01:00
|
|
|
Zeroconf* Zeroconf::sInstance = NULL;
|
|
|
|
|
|
|
|
Zeroconf::~Zeroconf() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Zeroconf* Zeroconf::GetZeroconf() {
|
|
|
|
if (!sInstance) {
|
|
|
|
#ifdef HAVE_DBUS
|
|
|
|
sInstance = new Avahi;
|
|
|
|
#endif // HAVE_DBUS
|
2013-01-16 15:26:35 +01:00
|
|
|
#ifdef Q_OS_DARWIN
|
|
|
|
sInstance = new Bonjour;
|
|
|
|
#endif
|
2013-01-16 14:56:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return sInstance;
|
|
|
|
}
|