summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-31 16:38:15 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-31 16:38:15 (GMT)
commitaa60aa80d2d170a536c246ef6c221f92de7dd8ed (patch)
tree04a03dbe10024cbb21c42dffc73560d3cba0329d /Swiften/LinkLocal/DNSSD
parentd0f250d26bd1bdb405b2232159e7f84741d13e52 (diff)
downloadswift-contrib-aa60aa80d2d170a536c246ef6c221f92de7dd8ed.zip
swift-contrib-aa60aa80d2d170a536c246ef6c221f92de7dd8ed.tar.bz2
Adapt LinkLocalConnector to new LinkLocal infrastructure.
Diffstat (limited to 'Swiften/LinkLocal/DNSSD')
-rw-r--r--Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveHostnameQuery.h6
-rw-r--r--Swiften/LinkLocal/DNSSD/DNSSDResolveHostnameQuery.h1
-rw-r--r--Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDResolveHostnameQuery.h4
3 files changed, 10 insertions, 1 deletions
diff --git a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveHostnameQuery.h b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveHostnameQuery.h
index 6e2a852..7b5f19a 100644
--- a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveHostnameQuery.h
+++ b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveHostnameQuery.h
@@ -12,7 +12,7 @@ namespace Swift {
class BonjourQuerier;
class BonjourResolveHostnameQuery : public DNSSDResolveHostnameQuery, public BonjourQuery {
- public:
+ public:
BonjourResolveHostnameQuery(const String& hostname, int interfaceIndex, boost::shared_ptr<BonjourQuerier> querier) : BonjourQuery(querier) {
DNSServiceErrorType result = DNSServiceGetAddrInfo(
&sdRef, 0, interfaceIndex, kDNSServiceProtocol_IPv4,
@@ -33,6 +33,10 @@ namespace Swift {
}
}
+ void finish() {
+ BonjourQuery::finish();
+ }
+
private:
static void handleHostnameResolvedStatic(DNSServiceRef, DNSServiceFlags, uint32_t, DNSServiceErrorType errorCode, const char*, const struct sockaddr *address, uint32_t, void *context) {
static_cast<BonjourResolveHostnameQuery*>(context)->handleHostnameResolved(errorCode, address);
diff --git a/Swiften/LinkLocal/DNSSD/DNSSDResolveHostnameQuery.h b/Swiften/LinkLocal/DNSSD/DNSSDResolveHostnameQuery.h
index a2e218c..1b9f291 100644
--- a/Swiften/LinkLocal/DNSSD/DNSSDResolveHostnameQuery.h
+++ b/Swiften/LinkLocal/DNSSD/DNSSDResolveHostnameQuery.h
@@ -11,6 +11,7 @@ namespace Swift {
virtual ~DNSSDResolveHostnameQuery();
virtual void run() = 0;
+ virtual void finish() = 0;
boost::signal<void (const boost::optional<HostAddress>&)> onHostnameResolved;
};
diff --git a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDResolveHostnameQuery.h b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDResolveHostnameQuery.h
index 2ff84d3..1f9d7f1 100644
--- a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDResolveHostnameQuery.h
+++ b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDResolveHostnameQuery.h
@@ -19,6 +19,10 @@ namespace Swift {
FakeDNSSDQuery::run();
}
+ void finish() {
+ FakeDNSSDQuery::finish();
+ }
+
String hostname;
int interfaceIndex;
};