diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-10-27 19:06:56 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-10-27 19:07:55 (GMT) |
commit | 6810a2896f27e7ee07aee847f5e8dbccd1f6ec89 (patch) | |
tree | f7ea87f030e57cb4494a4f897506fb18fc3d2241 /Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h | |
parent | a7da393cfc807048d320ddba8a1c7d24ef23a46e (diff) | |
download | swift-contrib-6810a2896f27e7ee07aee847f5e8dbccd1f6ec89.zip swift-contrib-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/Avahi/AvahiBrowseQuery.h')
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h b/Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h index f8ec795..3bee907 100644 --- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h +++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h @@ -10,7 +10,7 @@ #include "Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.h" #include "Swiften/LinkLocal/DNSSD/DNSSDBrowseQuery.h" -#include "Swiften/EventLoop/MainEventLoop.h" +#include "Swiften/EventLoop/EventLoop.h" namespace Swift { class AvahiQuerier; @@ -27,7 +27,7 @@ namespace Swift { browser = avahi_service_browser_new(querier->getClient(), AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_presence._tcp", NULL, static_cast<AvahiLookupFlags>(0), &handleServiceDiscoveredStatic, this); if (!browser) { std::cout << "Error" << std::endl; - MainEventLoop::postEvent(boost::bind(boost::ref(onError)), shared_from_this()); + eventLoop->postEvent(boost::bind(boost::ref(onError)), shared_from_this()); } avahi_threaded_poll_unlock(querier->getThreadedPoll()); } @@ -49,18 +49,18 @@ namespace Swift { switch (event) { case AVAHI_BROWSER_FAILURE: std::cout << "Service browse error" << std::endl; - MainEventLoop::postEvent(boost::bind(boost::ref(onError)), shared_from_this()); + eventLoop->postEvent(boost::bind(boost::ref(onError)), shared_from_this()); break; case AVAHI_BROWSER_NEW: { DNSSDServiceID service(name, domain, type, interfaceIndex); std::cout << "Service discovered " << name << " " << domain << " " << type << " " << interfaceIndex << std::endl; - MainEventLoop::postEvent(boost::bind(boost::ref(onServiceAdded), service), shared_from_this()); + eventLoop->postEvent(boost::bind(boost::ref(onServiceAdded), service), shared_from_this()); break; } case AVAHI_BROWSER_REMOVE: { std::cout << "Service went away " << name << " " << domain << " " << type << " " << interfaceIndex << std::endl; DNSSDServiceID service(name, domain, type, interfaceIndex); - MainEventLoop::postEvent(boost::bind(boost::ref(onServiceRemoved), service), shared_from_this()); + eventLoop->postEvent(boost::bind(boost::ref(onServiceRemoved), service), shared_from_this()); break; } case AVAHI_BROWSER_ALL_FOR_NOW: |