diff options
Diffstat (limited to 'Swiften/LinkLocal/BonjourQuery.h')
-rw-r--r-- | Swiften/LinkLocal/BonjourQuery.h | 28 |
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; + }; +} |