diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-07-26 15:06:11 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-07-26 15:17:35 (GMT) |
commit | e7ab68e8daf120d932d9eefc9053e9e064ca29af (patch) | |
tree | 82d7b1c6073b69c8dc91f0d72f5a32a8e9a2a67c /Swiften/LinkLocal/DNSSD/Fake | |
parent | 26d623d3cfd8937fb52acf76ef33d230f5010538 (diff) | |
download | swift-e7ab68e8daf120d932d9eefc9053e9e064ca29af.zip swift-e7ab68e8daf120d932d9eefc9053e9e064ca29af.tar.bz2 |
Make DNSSD independent of LinkLocalServiceInfo.
Diffstat (limited to 'Swiften/LinkLocal/DNSSD/Fake')
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp | 2 | ||||
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h | 4 | ||||
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDRegisterQuery.h | 9 |
3 files changed, 8 insertions, 7 deletions
diff --git a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp index 222500a..88c7774 100644 --- a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp +++ b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp @@ -17,7 +17,7 @@ boost::shared_ptr<DNSSDBrowseQuery> FakeDNSSDQuerier::createBrowseQuery() { return boost::shared_ptr<DNSSDBrowseQuery>(new FakeDNSSDBrowseQuery(shared_from_this())); } -boost::shared_ptr<DNSSDRegisterQuery> FakeDNSSDQuerier::createRegisterQuery(const String& name, int port, const LinkLocalServiceInfo& info) { +boost::shared_ptr<DNSSDRegisterQuery> FakeDNSSDQuerier::createRegisterQuery(const String& name, int port, const ByteArray& info) { return boost::shared_ptr<DNSSDRegisterQuery>(new FakeDNSSDRegisterQuery(name, port, info, shared_from_this())); } diff --git a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h index 6c5f343..43b717e 100644 --- a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h +++ b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h @@ -11,7 +11,7 @@ #include "Swiften/LinkLocal/DNSSD/DNSSDResolveServiceQuery.h" namespace Swift { - class LinkLocalServiceInfo; + class ByteArray; class FakeDNSSDQuery; class FakeDNSSDBrowseQuery; @@ -24,7 +24,7 @@ namespace Swift { boost::shared_ptr<DNSSDBrowseQuery> createBrowseQuery(); boost::shared_ptr<DNSSDRegisterQuery> createRegisterQuery( - const String& name, int port, const LinkLocalServiceInfo& info); + const String& name, int port, const ByteArray& info); boost::shared_ptr<DNSSDResolveServiceQuery> createResolveServiceQuery( const DNSSDServiceID&); boost::shared_ptr<DNSSDResolveHostnameQuery> createResolveHostnameQuery( diff --git a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDRegisterQuery.h b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDRegisterQuery.h index b4646fd..82ec623 100644 --- a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDRegisterQuery.h +++ b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDRegisterQuery.h @@ -2,7 +2,7 @@ #include "Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuery.h" #include "Swiften/LinkLocal/DNSSD/DNSSDRegisterQuery.h" -#include "Swiften/LinkLocal/LinkLocalServiceInfo.h" +#include "Swiften/Base/ByteArray.h" #include "Swiften/Base/String.h" namespace Swift { @@ -10,14 +10,15 @@ namespace Swift { class FakeDNSSDRegisterQuery : public DNSSDRegisterQuery, public FakeDNSSDQuery { public: - FakeDNSSDRegisterQuery(const String& name, int port, const LinkLocalServiceInfo& info, boost::shared_ptr<FakeDNSSDQuerier> querier) : FakeDNSSDQuery(querier), name(name), port(port), info(info) { + FakeDNSSDRegisterQuery(const String& name, int port, const ByteArray& info, boost::shared_ptr<FakeDNSSDQuerier> querier) : FakeDNSSDQuery(querier), name(name), port(port), info(info) { } void registerService() { run(); } - void updateServiceInfo(const LinkLocalServiceInfo&) { + void updateServiceInfo(const ByteArray& i) { + info = i; } void unregisterService() { @@ -26,6 +27,6 @@ namespace Swift { String name; int port; - LinkLocalServiceInfo info; + ByteArray info; }; } |