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/Bonjour/BonjourRegisterQuery.h | |
parent | 26d623d3cfd8937fb52acf76ef33d230f5010538 (diff) | |
download | swift-contrib-e7ab68e8daf120d932d9eefc9053e9e064ca29af.zip swift-contrib-e7ab68e8daf120d932d9eefc9053e9e064ca29af.tar.bz2 |
Make DNSSD independent of LinkLocalServiceInfo.
Diffstat (limited to 'Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h')
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h index 41e5831..c85b90f 100644 --- a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h +++ b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h @@ -2,7 +2,6 @@ #include "Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuery.h" #include "Swiften/LinkLocal/DNSSD/DNSSDRegisterQuery.h" -#include "Swiften/LinkLocal/LinkLocalServiceInfo.h" #include "Swiften/Base/ByteArray.h" #include "Swiften/EventLoop/MainEventLoop.h" @@ -11,8 +10,7 @@ namespace Swift { class BonjourRegisterQuery : public DNSSDRegisterQuery, public BonjourQuery { public: - BonjourRegisterQuery(const String& name, int port, const LinkLocalServiceInfo& info, boost::shared_ptr<BonjourQuerier> querier) : BonjourQuery(querier) { - ByteArray txtRecord = info.toTXTRecord(); + BonjourRegisterQuery(const String& name, int port, const ByteArray& txtRecord, boost::shared_ptr<BonjourQuerier> querier) : BonjourQuery(querier) { DNSServiceErrorType result = DNSServiceRegister( &sdRef, 0, 0, name.getUTF8Data(), "_presence._tcp", NULL, NULL, port, txtRecord.getSize(), txtRecord.getData(), @@ -35,9 +33,8 @@ namespace Swift { stop(); } - void updateServiceInfo(const LinkLocalServiceInfo& info) { + void updateServiceInfo(const ByteArray& txtRecord) { boost::lock_guard<boost::mutex> lock(sdRefMutex); - ByteArray txtRecord = info.toTXTRecord(); DNSServiceUpdateRecord(sdRef, NULL, NULL, txtRecord.getSize(), txtRecord.getData(), 0); } |