* Moving ChokeManager to 'torrent/download/choke_queue.h' and cleaning up code.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1221 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2011-04-24 11:17:33 +00:00
parent 8ae522b729
commit c845863f30
3 changed files with 14 additions and 2 deletions
+10
View File
@@ -50,6 +50,7 @@
#include <torrent/connection_manager.h>
#include <torrent/data/file.h>
#include <torrent/data/file_list.h>
#include <torrent/download/resource_manager.h>
#include <torrent/peer/connection_list.h>
#include <torrent/peer/peer_list.h>
#include <torrent/utils/option_strings.h>
@@ -742,6 +743,15 @@ initialize_command_download() {
CMD2_DL ("d.priority_str", std::bind(&retrieve_d_priority_str, std::placeholders::_1));
CMD2_DL_VALUE_V ("d.priority.set", std::bind(&core::Download::set_priority, std::placeholders::_1, std::placeholders::_2));
CMD2_DL ("d.group", std::bind(&torrent::resource_manager_entry::group,
std::bind(&torrent::ResourceManager::entry_at, torrent::resource_manager(),
std::bind(&core::Download::main, std::placeholders::_1))));
CMD2_DL_VALUE_V ("d.group.set", std::bind(&torrent::ResourceManager::set_group,
torrent::resource_manager(),
std::bind(&torrent::ResourceManager::find_throw, torrent::resource_manager(),
std::bind(&core::Download::main, std::placeholders::_1)),
std::placeholders::_2));
CMD2_DL ("d.initialize_logs", std::bind(&cmd_d_initialize_logs, std::placeholders::_1));
CMD2_DL_LIST ("f.multicall", std::bind(&f_multicall, std::placeholders::_1, std::placeholders::_2));
+3 -1
View File
@@ -71,7 +71,9 @@ public:
Download(download_type d);
~Download();
const torrent::DownloadInfo* info() const { return m_download.info(); }
const torrent::DownloadInfo* info() const { return m_download.info(); }
torrent::DownloadMain* main() { return m_download.main(); }
bool is_open() const { return m_download.info()->is_open(); }
bool is_active() const { return m_download.info()->is_active(); }
+1 -1
View File
@@ -177,7 +177,7 @@ Download::create_info() {
element->push_back("");
element->push_column("Connection type:", te_command("d.connection_current="));
element->push_column("Choke heuristic:", te_command("cat=$d.up.choke_heuristics=,\", \",$d.down.choke_heuristics="));
element->push_column("Choke heuristic:", te_command("cat=(d.up.choke_heuristics),\", \",(d.down.choke_heuristics),\", \",(d.group)"));
element->push_column("Safe sync:", te_command("if=$pieces.sync.always_safe=,yes,no"));
element->push_column("Send buffer:", te_command("cat=$convert.kb=$network.send_buffer.size=,\" KB\""));
element->push_column("Receive buffer:", te_command("cat=$convert.kb=$network.receive_buffer.size=,\" KB\""));