summaryrefslogtreecommitdiffstats
path: root/dnssd/responder.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 03:46:01 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 03:46:01 +0000
commit865f314dd5ed55508f45a32973b709b79a541e36 (patch)
treedc1a3a884bb2fc10a89a3c46313897d22c5771eb /dnssd/responder.h
parentce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (diff)
downloadtdelibs-865f314dd5ed55508f45a32973b709b79a541e36.tar.gz
tdelibs-865f314dd5ed55508f45a32973b709b79a541e36.zip
kdelibs update to Trinity v3.5.11
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1061230 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'dnssd/responder.h')
-rw-r--r--dnssd/responder.h34
1 files changed, 14 insertions, 20 deletions
diff --git a/dnssd/responder.h b/dnssd/responder.h
index 6e36d3357..32ccb7a0b 100644
--- a/dnssd/responder.h
+++ b/dnssd/responder.h
@@ -25,12 +25,7 @@
#include <qsocketnotifier.h>
#include <qsignal.h>
#include <config.h>
-#ifdef HAVE_DNSSD
-#include <dns_sd.h>
-#else
-#define DNSServiceRef void*
-#endif
-
+#include <avahi-client/client.h>
namespace DNSSD
{
@@ -38,30 +33,28 @@ namespace DNSSD
This class should not be used directly.
@author Jakub Stachowski
-@short Internal class wrapping dns_sd.h interface
+@short Internal class wrapping avahi client
*/
class Responder : public QObject
{
Q_OBJECT
public:
- Responder(DNSServiceRef ref=0,QObject *parent = 0, const char *name = 0);
+ Responder();
~Responder();
- /**
- Returns true if it is possible to use mDNS service publishing and discovery.
- It needs mDNSResponder running.
- */
- bool isRunning() const;
- void setRef(DNSServiceRef ref);
- void stop();
-public slots:
+ static Responder& self();
+ AvahiClientState state() const;
+ AvahiClient* client() const { return m_client; }
void process();
-protected:
- DNSServiceRef m_ref;
- bool m_running;
- QSocketNotifier *m_socket;
+signals:
+ void stateChanged(AvahiClientState);
+private:
+ AvahiClient* m_client;
+ static Responder* m_self;
+ friend void client_callback(AvahiClient*, AvahiClientState, void*);
+
};
/* Utils functions */
@@ -71,6 +64,7 @@ bool domainIsLocal(const QString& domain);
QCString domainToDNS(const QString &domain);
QString DNSToDomain(const char* domain);
+
}
#endif