diff --git a/src/core/curl_stack.cc b/src/core/curl_stack.cc index a801bdb8..aeaef3e3 100644 --- a/src/core/curl_stack.cc +++ b/src/core/curl_stack.cc @@ -46,6 +46,8 @@ #include "curl_socket.h" #include "curl_stack.h" +namespace std { using namespace tr1; } + namespace core { CurlStack::CurlStack() : @@ -131,9 +133,11 @@ CurlStack::transfer_done(void* handle, const char* msg) { throw torrent::internal_error("Could not find CurlGet with the right easy_handle."); if (msg == NULL) - (*itr)->signal_done().emit(); + std::for_each((*itr)->signal_done().begin(), (*itr)->signal_done().end(), + std::bind(&torrent::Http::slot_void::operator(), std::placeholders::_1)); else - (*itr)->signal_failed().emit(msg); + std::for_each((*itr)->signal_failed().begin(), (*itr)->signal_failed().end(), + std::bind(&torrent::Http::slot_string::operator(), std::placeholders::_1, msg)); } void diff --git a/src/core/download_factory.cc b/src/core/download_factory.cc index f7c50cc5..45fc3c95 100644 --- a/src/core/download_factory.cc +++ b/src/core/download_factory.cc @@ -156,8 +156,8 @@ DownloadFactory::receive_load() { m_stream = new std::stringstream; HttpQueue::iterator itr = m_manager->http_queue()->insert(m_uri, m_stream); - (*itr)->signal_done().slots().push_front(sigc::mem_fun(*this, &DownloadFactory::receive_loaded)); - (*itr)->signal_failed().slots().push_front(sigc::mem_fun(*this, &DownloadFactory::receive_failed)); + (*itr)->signal_done().push_front(std::bind(&DownloadFactory::receive_loaded, this)); + (*itr)->signal_failed().push_front(std::bind(&DownloadFactory::receive_failed, this, std::placeholders::_1)); m_variables["tied_to_file"] = (int64_t)false; diff --git a/src/core/http_queue.cc b/src/core/http_queue.cc index 9ab4be9b..5c3d6958 100644 --- a/src/core/http_queue.cc +++ b/src/core/http_queue.cc @@ -46,6 +46,8 @@ #include "http_queue.h" #include "curl_get.h" +namespace std { using namespace tr1; } + namespace core { HttpQueue::iterator @@ -58,8 +60,8 @@ HttpQueue::insert(const std::string& url, std::iostream* s) { iterator itr = Base::insert(end(), h.get()); - h->signal_done().connect(sigc::bind(sigc::mem_fun(this, &HttpQueue::erase), itr)); - h->signal_failed().connect(sigc::bind<0>(sigc::hide(sigc::mem_fun(this, &HttpQueue::erase)), itr)); + h->signal_done().push_back(std::bind(&HttpQueue::erase, this, itr)); + h->signal_failed().push_back(std::bind(&HttpQueue::erase, this, itr)); (*itr)->start();