summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-25 08:35:33 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-25 09:23:17 (GMT)
commitb33a2937fe4a3cae0017892ad7f5c27b8a6f976d (patch)
tree35d0e88461026b6ca31e3dc7246bc6b8d3100f9f /Swiften/LinkLocal/BonjourQuerier.cpp
parentef4284acb29aca0bdf792ab40356c7955902e307 (diff)
downloadswift-contrib-b33a2937fe4a3cae0017892ad7f5c27b8a6f976d.zip
swift-contrib-b33a2937fe4a3cae0017892ad7f5c27b8a6f976d.tar.bz2
Implement more DNSSD queries.
Diffstat (limited to 'Swiften/LinkLocal/BonjourQuerier.cpp')
-rw-r--r--Swiften/LinkLocal/BonjourQuerier.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/Swiften/LinkLocal/BonjourQuerier.cpp b/Swiften/LinkLocal/BonjourQuerier.cpp
index 7764f51..42ba12a 100644
--- a/Swiften/LinkLocal/BonjourQuerier.cpp
+++ b/Swiften/LinkLocal/BonjourQuerier.cpp
@@ -2,11 +2,12 @@
#include <unistd.h>
#include <sys/socket.h>
-#include <netinet/in.h>
#include <fcntl.h>
#include "Swiften/LinkLocal/BonjourBrowseQuery.h"
#include "Swiften/LinkLocal/BonjourRegisterQuery.h"
+#include "Swiften/LinkLocal/BonjourResolveServiceQuery.h"
+#include "Swiften/LinkLocal/BonjourResolveHostnameQuery.h"
#include "Swiften/Base/foreach.h"
namespace Swift {
@@ -32,6 +33,14 @@ boost::shared_ptr<DNSSDRegisterQuery> BonjourQuerier::createRegisterQuery(const
return boost::shared_ptr<DNSSDRegisterQuery>(new BonjourRegisterQuery(name, port, info, shared_from_this()));
}
+boost::shared_ptr<DNSSDResolveServiceQuery> BonjourQuerier::createResolveServiceQuery(const LinkLocalServiceID& service) {
+ return boost::shared_ptr<DNSSDResolveServiceQuery>(new BonjourResolveServiceQuery(service, shared_from_this()));
+}
+
+boost::shared_ptr<DNSSDResolveHostnameQuery> BonjourQuerier::createResolveHostnameQuery(const String& hostname, int interfaceIndex) {
+ return boost::shared_ptr<DNSSDResolveHostnameQuery>(new BonjourResolveHostnameQuery(hostname, interfaceIndex, shared_from_this()));
+}
+
void BonjourQuerier::addRunningQuery(boost::shared_ptr<BonjourQuery> query) {
{
boost::lock_guard<boost::mutex> lock(runningQueriesMutex);