summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-23 19:04:08 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-23 20:55:44 (GMT)
commit714e831bb9ea2b14cba3c2696c12e2e13b1bb9d7 (patch)
treee752e00c5ff683ba3550fc663c19f9241c3792f6 /Swiften/LinkLocal/BonjourQuery.h
parent3a0309d2d897bf4f399610e52ad439c002e16f9c (diff)
downloadswift-714e831bb9ea2b14cba3c2696c12e2e13b1bb9d7.zip
swift-714e831bb9ea2b14cba3c2696c12e2e13b1bb9d7.tar.bz2
Add beginning of new DNS-SD query framework.
Diffstat (limited to 'Swiften/LinkLocal/BonjourQuery.h')
-rw-r--r--Swiften/LinkLocal/BonjourQuery.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/Swiften/LinkLocal/BonjourQuery.h b/Swiften/LinkLocal/BonjourQuery.h
new file mode 100644
index 0000000..2a47f73
--- /dev/null
+++ b/Swiften/LinkLocal/BonjourQuery.h
@@ -0,0 +1,28 @@
+#pragma once
+
+#include <dns_sd.h>
+#include <boost/shared_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <boost/thread/mutex.hpp>
+
+namespace Swift {
+ class BonjourQuerier;
+
+ class BonjourQuery : public boost::enable_shared_from_this<BonjourQuery> {
+ public:
+ BonjourQuery(boost::shared_ptr<BonjourQuerier>);
+ virtual ~BonjourQuery();
+
+ void processResult();
+ int getSocketID() const;
+
+ protected:
+ void run();
+ void finish();
+
+ protected:
+ boost::shared_ptr<BonjourQuerier> querier;
+ mutable boost::mutex sdRefMutex;
+ DNSServiceRef sdRef;
+ };
+}