summaryrefslogtreecommitdiffstats
path: root/dnssd/responder.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-22 00:17:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-22 00:17:47 +0000
commit847c48556bc8f7c17bd201ced9381e2fbb2d5d09 (patch)
tree1e5e47d7dcb6e0de81a8ce9f0464ab88e2d8babe /dnssd/responder.h
parentcfa3abbed0a36890d0c5a41fff2ef6c0f850de25 (diff)
downloadtdelibs-847c48556bc8f7c17bd201ced9381e2fbb2d5d09.tar.gz
tdelibs-847c48556bc8f7c17bd201ced9381e2fbb2d5d09.zip
Attempt to fix compilation when Avahi is not available
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1152784 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'dnssd/responder.h')
-rw-r--r--dnssd/responder.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/dnssd/responder.h b/dnssd/responder.h
index 32ccb7a0b..0eb59bfab 100644
--- a/dnssd/responder.h
+++ b/dnssd/responder.h
@@ -25,13 +25,18 @@
#include <qsocketnotifier.h>
#include <qsignal.h>
#include <config.h>
+#ifdef HAVE_DNSSD
#include <avahi-client/client.h>
+#else
+#define DNSServiceRef void*
+#endif
+
namespace DNSSD
{
/**
This class should not be used directly.
-
+
@author Jakub Stachowski
@short Internal class wrapping avahi client
*/
@@ -45,22 +50,28 @@ public:
~Responder();
static Responder& self();
+#ifdef HAVE_DNSSD
AvahiClientState state() const;
AvahiClient* client() const { return m_client; }
+#endif
void process();
signals:
void stateChanged(AvahiClientState);
private:
+#ifdef HAVE_DNSSD
AvahiClient* m_client;
+#endif
static Responder* m_self;
+#ifdef HAVE_DNSSD
friend void client_callback(AvahiClient*, AvahiClientState, void*);
+#endif
};
/* Utils functions */
bool domainIsLocal(const QString& domain);
-// Encodes domain name using utf8() or IDN
+// Encodes domain name using utf8() or IDN
QCString domainToDNS(const QString &domain);
QString DNSToDomain(const char* domain);