diff options
-rw-r--r-- | Slimber/Qt/main.cpp | 2 | ||||
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h | 2 | ||||
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.cpp | 10 | ||||
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.h | 4 | ||||
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.cpp | 2 | ||||
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.h | 4 | ||||
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Avahi/AvahiRegisterQuery.h | 2 | ||||
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.h | 2 | ||||
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveServiceQuery.h | 2 |
9 files changed, 17 insertions, 13 deletions
diff --git a/Slimber/Qt/main.cpp b/Slimber/Qt/main.cpp index 6c6ea26..7b58907 100644 --- a/Slimber/Qt/main.cpp +++ b/Slimber/Qt/main.cpp @@ -29,7 +29,7 @@ QMessageBox::critical(0, QObject::tr("Systray"), QObject::tr("No system tray")); app.setQuitOnLastWindowClosed(false); QtMenulet menulet; - MainController controller(&menulet); + MainController controller(&menulet, &eventLoop); return app.exec(); } diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h b/Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h index 3bee907..163a5f6 100644 --- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h +++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h @@ -17,7 +17,7 @@ namespace Swift { class AvahiBrowseQuery : public DNSSDBrowseQuery, public AvahiQuery { public: - AvahiBrowseQuery(boost::shared_ptr<AvahiQuerier> q) : AvahiQuery(q), browser(NULL) { + AvahiBrowseQuery(boost::shared_ptr<AvahiQuerier> q, EventLoop* eventLoop) : AvahiQuery(q, eventLoop), browser(NULL) { } void startBrowsing() { diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.cpp b/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.cpp index 642d19a..f9f2f8f 100644 --- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.cpp +++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.cpp @@ -15,26 +15,26 @@ namespace Swift { -AvahiQuerier::AvahiQuerier() : client(NULL), threadedPoll(NULL) { +AvahiQuerier::AvahiQuerier(EventLoop* eventLoop) : eventLoop(eventLoop), client(NULL), threadedPoll(NULL) { } AvahiQuerier::~AvahiQuerier() { } boost::shared_ptr<DNSSDBrowseQuery> AvahiQuerier::createBrowseQuery() { - return boost::shared_ptr<DNSSDBrowseQuery>(new AvahiBrowseQuery(shared_from_this())); + return boost::shared_ptr<DNSSDBrowseQuery>(new AvahiBrowseQuery(shared_from_this(), eventLoop)); } boost::shared_ptr<DNSSDRegisterQuery> AvahiQuerier::createRegisterQuery(const String& name, int port, const ByteArray& info) { - return boost::shared_ptr<DNSSDRegisterQuery>(new AvahiRegisterQuery(name, port, info, shared_from_this())); + return boost::shared_ptr<DNSSDRegisterQuery>(new AvahiRegisterQuery(name, port, info, shared_from_this(), eventLoop)); } boost::shared_ptr<DNSSDResolveServiceQuery> AvahiQuerier::createResolveServiceQuery(const DNSSDServiceID& service) { - return boost::shared_ptr<DNSSDResolveServiceQuery>(new AvahiResolveServiceQuery(service, shared_from_this())); + return boost::shared_ptr<DNSSDResolveServiceQuery>(new AvahiResolveServiceQuery(service, shared_from_this(), eventLoop)); } boost::shared_ptr<DNSSDResolveHostnameQuery> AvahiQuerier::createResolveHostnameQuery(const String& hostname, int interfaceIndex) { - return boost::shared_ptr<DNSSDResolveHostnameQuery>(new AvahiResolveHostnameQuery(hostname, interfaceIndex, shared_from_this())); + return boost::shared_ptr<DNSSDResolveHostnameQuery>(new AvahiResolveHostnameQuery(hostname, interfaceIndex, shared_from_this(), eventLoop)); } void AvahiQuerier::start() { diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.h b/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.h index e526d83..d900ade 100644 --- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.h +++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuerier.h @@ -19,12 +19,13 @@ namespace Swift { class ByteArray; + class EventLoop; class AvahiQuerier : public DNSSDQuerier, public boost::enable_shared_from_this<AvahiQuerier> { public: - AvahiQuerier(); + AvahiQuerier(EventLoop* eventLoop); ~AvahiQuerier(); boost::shared_ptr<DNSSDBrowseQuery> createBrowseQuery(); @@ -47,6 +48,7 @@ namespace Swift { } private: + EventLoop* eventLoop; AvahiClient* client; AvahiThreadedPoll* threadedPoll; }; diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.cpp b/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.cpp index 662a35d..1b40dfd 100644 --- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.cpp +++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.cpp @@ -9,7 +9,7 @@ namespace Swift { -AvahiQuery::AvahiQuery(boost::shared_ptr<AvahiQuerier> q) : querier(q) { +AvahiQuery::AvahiQuery(boost::shared_ptr<AvahiQuerier> q, EventLoop* eventLoop) : querier(q), eventLoop(eventLoop) { } AvahiQuery::~AvahiQuery() { diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.h b/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.h index ea3717e..f5df032 100644 --- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.h +++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.h @@ -13,16 +13,18 @@ namespace Swift { class AvahiQuerier; + class EventLoop; class AvahiQuery : public EventOwner, public boost::enable_shared_from_this<AvahiQuery> { public: - AvahiQuery(boost::shared_ptr<AvahiQuerier>); + AvahiQuery(boost::shared_ptr<AvahiQuerier>, EventLoop* eventLoop); virtual ~AvahiQuery(); protected: boost::shared_ptr<AvahiQuerier> querier; + EventLoop* eventLoop; }; } diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiRegisterQuery.h b/Swiften/LinkLocal/DNSSD/Avahi/AvahiRegisterQuery.h index 3e5a758..780a0ca 100644 --- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiRegisterQuery.h +++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiRegisterQuery.h @@ -18,7 +18,7 @@ namespace Swift { class AvahiRegisterQuery : public DNSSDRegisterQuery, public AvahiQuery { public: - AvahiRegisterQuery(const String& name, int port, const ByteArray& txtRecord, boost::shared_ptr<AvahiQuerier> querier) : AvahiQuery(querier), name(name), port(port), txtRecord(txtRecord), group(0) { + AvahiRegisterQuery(const String& name, int port, const ByteArray& txtRecord, boost::shared_ptr<AvahiQuerier> querier, EventLoop* eventLoop) : AvahiQuery(querier, eventLoop), name(name), port(port), txtRecord(txtRecord), group(0) { } void registerService() { diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.h b/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.h index 6803fd0..ebbc68f 100644 --- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.h +++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.h @@ -19,7 +19,7 @@ namespace Swift { class AvahiResolveHostnameQuery : public DNSSDResolveHostnameQuery, public AvahiQuery { public: - AvahiResolveHostnameQuery(const String& hostname, int, boost::shared_ptr<AvahiQuerier> querier) : AvahiQuery(querier), hostname(hostname) { + AvahiResolveHostnameQuery(const String& hostname, int, boost::shared_ptr<AvahiQuerier> querier, EventLoop* eventLoop) : AvahiQuery(querier, eventLoop), hostname(hostname) { std::cout << "Resolving hostname " << hostname << std::endl; } diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveServiceQuery.h b/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveServiceQuery.h index 402f84f..a7985ec 100644 --- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveServiceQuery.h +++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveServiceQuery.h @@ -17,7 +17,7 @@ namespace Swift { class AvahiResolveServiceQuery : public DNSSDResolveServiceQuery, public AvahiQuery { public: - AvahiResolveServiceQuery(const DNSSDServiceID& service, boost::shared_ptr<AvahiQuerier> querier) : AvahiQuery(querier), service(service), resolver(NULL) { + AvahiResolveServiceQuery(const DNSSDServiceID& service, boost::shared_ptr<AvahiQuerier> querier, EventLoop* eventLoop) : AvahiQuery(querier, eventLoop), service(service), resolver(NULL) { } void start() { |