summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-27 19:06:56 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-27 19:07:55 (GMT)
commit6810a2896f27e7ee07aee847f5e8dbccd1f6ec89 (patch)
treef7ea87f030e57cb4494a4f897506fb18fc3d2241 /Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h
parenta7da393cfc807048d320ddba8a1c7d24ef23a46e (diff)
downloadswift-6810a2896f27e7ee07aee847f5e8dbccd1f6ec89.zip
swift-6810a2896f27e7ee07aee847f5e8dbccd1f6ec89.tar.bz2
Remove MainEventLoop singleton.
The event loop now needs to be explicitly passed to clients using it.
Diffstat (limited to 'Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h')
-rw-r--r--Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h
index 8155a33..9d8516b 100644
--- a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h
+++ b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourRegisterQuery.h
@@ -9,14 +9,14 @@
#include "Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuery.h"
#include "Swiften/LinkLocal/DNSSD/DNSSDRegisterQuery.h"
#include "Swiften/Base/ByteArray.h"
-#include "Swiften/EventLoop/MainEventLoop.h"
+#include "Swiften/EventLoop/EventLoop.h"
namespace Swift {
class BonjourQuerier;
class BonjourRegisterQuery : public DNSSDRegisterQuery, public BonjourQuery {
public:
- BonjourRegisterQuery(const String& name, int port, const ByteArray& txtRecord, boost::shared_ptr<BonjourQuerier> querier) : BonjourQuery(querier) {
+ BonjourRegisterQuery(const String& name, int port, const ByteArray& txtRecord, boost::shared_ptr<BonjourQuerier> querier, EventLoop* eventLoop) : BonjourQuery(querier, eventLoop) {
DNSServiceErrorType result = DNSServiceRegister(
&sdRef, 0, 0, name.getUTF8Data(), "_presence._tcp", NULL, NULL, port,
txtRecord.getSize(), txtRecord.getData(),
@@ -31,7 +31,7 @@ namespace Swift {
run();
}
else {
- MainEventLoop::postEvent(boost::bind(boost::ref(onRegisterFinished), boost::optional<DNSSDServiceID>()), shared_from_this());
+ eventLoop->postEvent(boost::bind(boost::ref(onRegisterFinished), boost::optional<DNSSDServiceID>()), shared_from_this());
}
}
@@ -51,10 +51,10 @@ namespace Swift {
void handleServiceRegistered(DNSServiceErrorType errorCode, const char *name, const char *regtype, const char *domain) {
if (errorCode != kDNSServiceErr_NoError) {
- MainEventLoop::postEvent(boost::bind(boost::ref(onRegisterFinished), boost::optional<DNSSDServiceID>()), shared_from_this());
+ eventLoop->postEvent(boost::bind(boost::ref(onRegisterFinished), boost::optional<DNSSDServiceID>()), shared_from_this());
}
else {
- MainEventLoop::postEvent(boost::bind(boost::ref(onRegisterFinished), boost::optional<DNSSDServiceID>(DNSSDServiceID(name, domain, regtype, 0))), shared_from_this());
+ eventLoop->postEvent(boost::bind(boost::ref(onRegisterFinished), boost::optional<DNSSDServiceID>(DNSSDServiceID(name, domain, regtype, 0))), shared_from_this());
}
}
};