New log window available through 'l'.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@343 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-03-12 19:16:30 +00:00
parent ab69ae3fe6
commit c36ee96550
13 changed files with 230 additions and 64 deletions
+14 -3
View File
@@ -27,10 +27,15 @@ Manager::initialize() {
torrent::initialize();
torrent::listen_open(m_portFirst, m_portLast);
// Register log signals.
}
void
Manager::cleanup() {
// Need to disconnect log signals? Not really since we won't receive
// any more.
torrent::cleanup();
core::CurlStack::cleanup();
}
@@ -101,13 +106,15 @@ Manager::receive_http_done(CurlGet* http) {
} catch (torrent::local_error& e) {
// What to do? Keep in list for now.
m_log.push_front(e.what());
m_logImportant.push_front(e.what());
m_logComplete.push_front(e.what());
}
}
void
Manager::receive_http_failed(std::string msg) {
m_log.push_front("Http download error: \"" + msg + "\"");
m_logImportant.push_front("Http download error: \"" + msg + "\"");
m_logComplete.push_front("Http download error: \"" + msg + "\"");
}
void
@@ -119,7 +126,8 @@ Manager::create_file(const std::string& uri) {
} catch (torrent::local_error& e) {
// What to do? Keep in list for now.
m_log.push_front(e.what());
m_logImportant.push_front(e.what());
m_logComplete.push_front(e.what());
}
}
@@ -143,6 +151,9 @@ Manager::create_final(std::istream* s) {
if (m_debugTracker >= 0)
(*itr)->get_download().signal_tracker_dump(sigc::mem_fun(*this, &Manager::receive_debug_tracker));
// If we want to monitor network stuff.
(*itr)->get_download().signal_network_log(sigc::mem_fun(m_logComplete, &Log::push_front));
return itr;
}