diff options
Diffstat (limited to 'Swiften/LinkLocal/DNSSD/PlatformDNSSDQuerierFactory.cpp')
-rw-r--r-- | Swiften/LinkLocal/DNSSD/PlatformDNSSDQuerierFactory.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Swiften/LinkLocal/DNSSD/PlatformDNSSDQuerierFactory.cpp b/Swiften/LinkLocal/DNSSD/PlatformDNSSDQuerierFactory.cpp new file mode 100644 index 0000000..e704b72 --- /dev/null +++ b/Swiften/LinkLocal/DNSSD/PlatformDNSSDQuerierFactory.cpp @@ -0,0 +1,25 @@ +#include "Swiften/LinkLocal/DNSSD/PlatformDNSSDQuerierFactory.h" + +#ifdef HAVE_SWIFTEN_CONFIG_H +#include "Swiften/config.h" +#endif +#if defined(HAVE_BONJOUR) +#include "Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuerier.h" +#elif defined(HAVE_AVAHI) +#include "Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.h" +#endif + + +namespace Swift { + +boost::shared_ptr<DNSSDQuerier> PlatformDNSSDQuerierFactory::createQuerier() { +#if defined(HAVE_BONJOUR) + return boost::shared_ptr<DNSSDQuerier>(new BonjourQuerier()); +#elif defined(HAVE_AVAHI) + return boost::shared_ptr<DNSSDQuerier>(new AvahiQuerier()); +#else + return boost::shared_ptr<DNSSDQuerier>(); +#endif +} + +} |