mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-08 23:29:21 +00:00
* Added 'p.is_unwanted' and 'p.is_preferred' commands.
* Removed std::tr1:: in favor of std:: using namespace. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1202 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+97
-133
@@ -188,11 +188,6 @@ apply_d_connection_type(core::Download* download, const std::string& name) {
|
||||
return torrent::Object();
|
||||
}
|
||||
|
||||
const char*
|
||||
retrieve_d_connection_type(core::Download* download) {
|
||||
return torrent::option_as_string(torrent::OPTION_CONNECTION_TYPE, download->download()->connection_type());
|
||||
}
|
||||
|
||||
torrent::Object
|
||||
apply_d_choke_heuristics(core::Download* download, const std::string& name, bool is_down) {
|
||||
torrent::Download::HeuristicType t =
|
||||
@@ -206,15 +201,6 @@ apply_d_choke_heuristics(core::Download* download, const std::string& name, bool
|
||||
return torrent::Object();
|
||||
}
|
||||
|
||||
const char*
|
||||
retrieve_d_choke_heuristics(core::Download* download, bool is_down) {
|
||||
torrent::Download::HeuristicType t = is_down ?
|
||||
download->download()->download_choke_heuristic() :
|
||||
download->download()->upload_choke_heuristic();
|
||||
|
||||
return torrent::option_as_string(torrent::OPTION_CHOKE_HEURISTICS, t);
|
||||
}
|
||||
|
||||
const char*
|
||||
retrieve_d_priority_str(core::Download* download) {
|
||||
switch (download->priority()) {
|
||||
@@ -242,27 +228,6 @@ retrieve_d_ratio(core::Download* download) {
|
||||
return bytesDone > 0 ? (1000 * upTotal) / bytesDone : 0;
|
||||
}
|
||||
|
||||
torrent::Object
|
||||
retrieve_d_hash(core::Download* download) {
|
||||
const torrent::HashString* hashString = &download->info()->hash();
|
||||
|
||||
return torrent::Object(rak::transform_hex(hashString->begin(), hashString->end()));
|
||||
}
|
||||
|
||||
torrent::Object
|
||||
retrieve_d_local_id(core::Download* download) {
|
||||
const torrent::HashString* hashString = &download->info()->local_id();
|
||||
|
||||
return torrent::Object(rak::transform_hex(hashString->begin(), hashString->end()));
|
||||
}
|
||||
|
||||
torrent::Object
|
||||
retrieve_d_local_id_html(core::Download* download) {
|
||||
const torrent::HashString* hashString = &download->info()->local_id();
|
||||
|
||||
return torrent::Object(rak::copy_escape_html(hashString->begin(), hashString->end()));
|
||||
}
|
||||
|
||||
torrent::Object
|
||||
apply_d_custom(core::Download* download, const torrent::Object::list_type& args) {
|
||||
torrent::Object::list_const_iterator itr = args.begin();
|
||||
@@ -556,51 +521,50 @@ d_list_remove(core::Download* download, const torrent::Object& rawArgs, const ch
|
||||
|
||||
#define CMD_ON_INFO(func) rak::on(std::mem_fun(&core::Download::info), std::mem_fun(&torrent::DownloadInfo::func))
|
||||
|
||||
#define CMD2_ON_INFO(func) std::tr1::bind(&torrent::DownloadInfo::func, std::tr1::bind(&core::Download::info, std::tr1::placeholders::_1))
|
||||
#define CMD2_ON_DL(func) std::tr1::bind(&torrent::Download::func, std::tr1::bind(&core::Download::download, std::tr1::placeholders::_1))
|
||||
#define CMD2_ON_FL(func) std::tr1::bind(&torrent::FileList::func, std::tr1::bind(&core::Download::file_list, std::tr1::placeholders::_1))
|
||||
#define CMD2_ON_INFO(func) std::bind(&torrent::DownloadInfo::func, std::bind(&core::Download::info, std::placeholders::_1))
|
||||
#define CMD2_ON_DL(func) std::bind(&torrent::Download::func, std::bind(&core::Download::download, std::placeholders::_1))
|
||||
#define CMD2_ON_FL(func) std::bind(&torrent::FileList::func, std::bind(&core::Download::file_list, std::placeholders::_1))
|
||||
|
||||
#define CMD2_BIND_DL std::tr1::bind(&core::Download::download, std::tr1::placeholders::_1)
|
||||
#define CMD2_BIND_CL std::tr1::bind(&core::Download::connection_list, std::tr1::placeholders::_1)
|
||||
#define CMD2_BIND_FL std::tr1::bind(&core::Download::file_list, std::tr1::placeholders::_1)
|
||||
#define CMD2_BIND_PL std::tr1::bind(&core::Download::c_peer_list, std::tr1::placeholders::_1)
|
||||
#define CMD2_BIND_TL std::tr1::bind(&core::Download::tracker_list, std::tr1::placeholders::_1)
|
||||
#define CMD2_BIND_DL std::bind(&core::Download::download, std::placeholders::_1)
|
||||
#define CMD2_BIND_CL std::bind(&core::Download::connection_list, std::placeholders::_1)
|
||||
#define CMD2_BIND_FL std::bind(&core::Download::file_list, std::placeholders::_1)
|
||||
#define CMD2_BIND_PL std::bind(&core::Download::c_peer_list, std::placeholders::_1)
|
||||
#define CMD2_BIND_TL std::bind(&core::Download::tracker_list, std::placeholders::_1)
|
||||
|
||||
#define CMD2_DL_VAR_VALUE(key, first_key, second_key) \
|
||||
CMD2_DL(key, std::tr1::bind(&download_get_variable, std::tr1::placeholders::_1, first_key, second_key)); \
|
||||
CMD2_DL_VALUE_P(key ".set", std::tr1::bind(&download_set_variable_value, \
|
||||
std::tr1::placeholders::_1, std::tr1::placeholders::_2, \
|
||||
CMD2_DL(key, std::bind(&download_get_variable, std::placeholders::_1, first_key, second_key)); \
|
||||
CMD2_DL_VALUE_P(key ".set", std::bind(&download_set_variable_value, \
|
||||
std::placeholders::_1, std::placeholders::_2, \
|
||||
first_key, second_key));
|
||||
|
||||
#define CMD2_DL_VAR_VALUE_PUBLIC(key, first_key, second_key) \
|
||||
CMD2_DL(key, std::tr1::bind(&download_get_variable, std::tr1::placeholders::_1, first_key, second_key)); \
|
||||
CMD2_DL_VALUE(key ".set", std::tr1::bind(&download_set_variable_value, \
|
||||
std::tr1::placeholders::_1, std::tr1::placeholders::_2, \
|
||||
CMD2_DL(key, std::bind(&download_get_variable, std::placeholders::_1, first_key, second_key)); \
|
||||
CMD2_DL_VALUE(key ".set", std::bind(&download_set_variable_value, \
|
||||
std::placeholders::_1, std::placeholders::_2, \
|
||||
first_key, second_key));
|
||||
|
||||
#define CMD2_DL_VAR_STRING(key, first_key, second_key) \
|
||||
CMD2_DL(key, std::tr1::bind(&download_get_variable, std::tr1::placeholders::_1, first_key, second_key)); \
|
||||
CMD2_DL_STRING_P(key ".set", std::tr1::bind(&download_set_variable_string, \
|
||||
std::tr1::placeholders::_1, std::tr1::placeholders::_2, \
|
||||
CMD2_DL(key, std::bind(&download_get_variable, std::placeholders::_1, first_key, second_key)); \
|
||||
CMD2_DL_STRING_P(key ".set", std::bind(&download_set_variable_string, \
|
||||
std::placeholders::_1, std::placeholders::_2, \
|
||||
first_key, second_key));
|
||||
|
||||
#define CMD2_DL_VAR_STRING_PUBLIC(key, first_key, second_key) \
|
||||
CMD2_DL(key, std::tr1::bind(&download_get_variable, std::tr1::placeholders::_1, first_key, second_key)); \
|
||||
CMD2_DL_STRING(key ".set", std::tr1::bind(&download_set_variable_string, \
|
||||
std::tr1::placeholders::_1, std::tr1::placeholders::_2, \
|
||||
CMD2_DL(key, std::bind(&download_get_variable, std::placeholders::_1, first_key, second_key)); \
|
||||
CMD2_DL_STRING(key ".set", std::bind(&download_set_variable_string, \
|
||||
std::placeholders::_1, std::placeholders::_2, \
|
||||
first_key, second_key));
|
||||
|
||||
void
|
||||
initialize_command_download() {
|
||||
CMD2_DL("d.hash", std::tr1::bind(&retrieve_d_hash, std::tr1::placeholders::_1));
|
||||
CMD2_DL("d.local_id", std::tr1::bind(&retrieve_d_local_id, std::tr1::placeholders::_1));
|
||||
CMD2_DL("d.local_id_html", std::tr1::bind(&retrieve_d_local_id_html, std::tr1::placeholders::_1));
|
||||
CMD2_DL("d.bitfield", std::tr1::bind(&retrieve_d_bitfield, std::tr1::placeholders::_1));
|
||||
CMD2_DL("d.base_path", std::tr1::bind(&retrieve_d_base_path, std::tr1::placeholders::_1));
|
||||
CMD2_DL("d.base_filename", std::tr1::bind(&retrieve_d_base_filename, std::tr1::placeholders::_1));
|
||||
CMD2_DL("d.hash", std::bind(&rak::transform_hex_str<torrent::HashString>, CMD2_ON_INFO(hash)));
|
||||
CMD2_DL("d.local_id", std::bind(&rak::transform_hex_str<torrent::HashString>, CMD2_ON_INFO(local_id)));
|
||||
CMD2_DL("d.local_id_html", std::bind(&rak::copy_escape_html_str<torrent::HashString>, CMD2_ON_INFO(local_id)));
|
||||
CMD2_DL("d.bitfield", std::bind(&retrieve_d_bitfield, std::placeholders::_1));
|
||||
CMD2_DL("d.base_path", std::bind(&retrieve_d_base_path, std::placeholders::_1));
|
||||
CMD2_DL("d.base_filename", std::bind(&retrieve_d_base_filename, std::placeholders::_1));
|
||||
|
||||
CMD2_DL("d.name", CMD2_ON_INFO(name));
|
||||
|
||||
CMD2_DL("d.creation_date", CMD2_ON_INFO(creation_date));
|
||||
CMD2_DL("d.load_date", CMD2_ON_INFO(load_date));
|
||||
|
||||
@@ -608,19 +572,19 @@ initialize_command_download() {
|
||||
// Network related:
|
||||
//
|
||||
|
||||
CMD2_DL ("d.up.rate", std::tr1::bind(&torrent::Rate::rate, CMD2_ON_INFO(up_rate)));
|
||||
CMD2_DL ("d.up.total", std::tr1::bind(&torrent::Rate::total, CMD2_ON_INFO(up_rate)));
|
||||
CMD2_DL ("d.down.rate", std::tr1::bind(&torrent::Rate::rate, CMD2_ON_INFO(down_rate)));
|
||||
CMD2_DL ("d.down.total", std::tr1::bind(&torrent::Rate::total, CMD2_ON_INFO(down_rate)));
|
||||
CMD2_DL ("d.skip.rate", std::tr1::bind(&torrent::Rate::rate, CMD2_ON_INFO(skip_rate)));
|
||||
CMD2_DL ("d.skip.total", std::tr1::bind(&torrent::Rate::total, CMD2_ON_INFO(skip_rate)));
|
||||
CMD2_DL ("d.up.rate", std::bind(&torrent::Rate::rate, CMD2_ON_INFO(up_rate)));
|
||||
CMD2_DL ("d.up.total", std::bind(&torrent::Rate::total, CMD2_ON_INFO(up_rate)));
|
||||
CMD2_DL ("d.down.rate", std::bind(&torrent::Rate::rate, CMD2_ON_INFO(down_rate)));
|
||||
CMD2_DL ("d.down.total", std::bind(&torrent::Rate::total, CMD2_ON_INFO(down_rate)));
|
||||
CMD2_DL ("d.skip.rate", std::bind(&torrent::Rate::rate, CMD2_ON_INFO(skip_rate)));
|
||||
CMD2_DL ("d.skip.total", std::bind(&torrent::Rate::total, CMD2_ON_INFO(skip_rate)));
|
||||
|
||||
CMD2_DL ("d.peer_exchange", CMD2_ON_INFO(is_pex_enabled));
|
||||
CMD2_DL_VALUE_V ("d.peer_exchange.set", std::tr1::bind(&torrent::Download::set_pex_enabled, CMD2_BIND_DL, std::tr1::placeholders::_2));
|
||||
CMD2_DL ("d.peer_exchange", CMD2_ON_INFO(is_pex_enabled));
|
||||
CMD2_DL_VALUE_V ("d.peer_exchange.set", std::bind(&torrent::Download::set_pex_enabled, CMD2_BIND_DL, std::placeholders::_2));
|
||||
|
||||
CMD2_DL_LIST ("d.create_link", std::tr1::bind(&apply_d_change_link, std::tr1::placeholders::_1, std::tr1::placeholders::_2, 0));
|
||||
CMD2_DL_LIST ("d.delete_link", std::tr1::bind(&apply_d_change_link, std::tr1::placeholders::_1, std::tr1::placeholders::_2, 1));
|
||||
CMD2_DL ("d.delete_tied", std::tr1::bind(&apply_d_delete_tied, std::tr1::placeholders::_1));
|
||||
CMD2_DL_LIST ("d.create_link", std::bind(&apply_d_change_link, std::placeholders::_1, std::placeholders::_2, 0));
|
||||
CMD2_DL_LIST ("d.delete_link", std::bind(&apply_d_change_link, std::placeholders::_1, std::placeholders::_2, 1));
|
||||
CMD2_DL ("d.delete_tied", std::bind(&apply_d_delete_tied, std::placeholders::_1));
|
||||
|
||||
CMD2_FUNC_SINGLE("d.start", "d.hashing_failed.set=0 ;view.set_visible=started");
|
||||
CMD2_FUNC_SINGLE("d.stop", "view.set_visible=stopped");
|
||||
@@ -634,33 +598,33 @@ initialize_command_download() {
|
||||
|
||||
CMD2_DL ("d.is_open", CMD2_ON_INFO(is_open));
|
||||
CMD2_DL ("d.is_active", CMD2_ON_INFO(is_active));
|
||||
CMD2_DL ("d.is_hash_checked", std::tr1::bind(&torrent::Download::is_hash_checked, CMD2_BIND_DL));
|
||||
CMD2_DL ("d.is_hash_checking", std::tr1::bind(&torrent::Download::is_hash_checking, CMD2_BIND_DL));
|
||||
CMD2_DL ("d.is_multi_file", std::tr1::bind(&torrent::FileList::is_multi_file, CMD2_BIND_FL));
|
||||
CMD2_DL ("d.is_hash_checked", std::bind(&torrent::Download::is_hash_checked, CMD2_BIND_DL));
|
||||
CMD2_DL ("d.is_hash_checking", std::bind(&torrent::Download::is_hash_checking, CMD2_BIND_DL));
|
||||
CMD2_DL ("d.is_multi_file", std::bind(&torrent::FileList::is_multi_file, CMD2_BIND_FL));
|
||||
CMD2_DL ("d.is_private", CMD2_ON_INFO(is_private));
|
||||
CMD2_DL ("d.is_pex_active", CMD2_ON_INFO(is_pex_active));
|
||||
|
||||
CMD2_DL_V("d.resume", std::tr1::bind(&core::DownloadList::resume_default, control->core()->download_list(), std::tr1::placeholders::_1));
|
||||
CMD2_DL_V("d.pause", std::tr1::bind(&core::DownloadList::pause_default, control->core()->download_list(), std::tr1::placeholders::_1));
|
||||
CMD2_DL_V("d.open", std::tr1::bind(&core::DownloadList::open_throw, control->core()->download_list(), std::tr1::placeholders::_1));
|
||||
CMD2_DL_V("d.close", std::tr1::bind(&core::DownloadList::close_throw, control->core()->download_list(), std::tr1::placeholders::_1));
|
||||
CMD2_DL_V("d.erase", std::tr1::bind(&core::DownloadList::erase_ptr, control->core()->download_list(), std::tr1::placeholders::_1));
|
||||
CMD2_DL_V("d.check_hash", std::tr1::bind(&core::DownloadList::check_hash, control->core()->download_list(), std::tr1::placeholders::_1));
|
||||
CMD2_DL_V ("d.resume", std::bind(&core::DownloadList::resume_default, control->core()->download_list(), std::placeholders::_1));
|
||||
CMD2_DL_V ("d.pause", std::bind(&core::DownloadList::pause_default, control->core()->download_list(), std::placeholders::_1));
|
||||
CMD2_DL_V ("d.open", std::bind(&core::DownloadList::open_throw, control->core()->download_list(), std::placeholders::_1));
|
||||
CMD2_DL_V ("d.close", std::bind(&core::DownloadList::close_throw, control->core()->download_list(), std::placeholders::_1));
|
||||
CMD2_DL_V ("d.erase", std::bind(&core::DownloadList::erase_ptr, control->core()->download_list(), std::placeholders::_1));
|
||||
CMD2_DL_V ("d.check_hash", std::bind(&core::DownloadList::check_hash, control->core()->download_list(), std::placeholders::_1));
|
||||
|
||||
CMD2_DL ("d.save_resume", std::tr1::bind(&core::DownloadStore::save_resume, control->core()->download_store(), std::tr1::placeholders::_1));
|
||||
CMD2_DL ("d.save_full_session", std::tr1::bind(&core::DownloadStore::save_full, control->core()->download_store(), std::tr1::placeholders::_1));
|
||||
CMD2_DL ("d.save_resume", std::bind(&core::DownloadStore::save_resume, control->core()->download_store(), std::placeholders::_1));
|
||||
CMD2_DL ("d.save_full_session", std::bind(&core::DownloadStore::save_full, control->core()->download_store(), std::placeholders::_1));
|
||||
|
||||
CMD2_DL_V("d.update_priorities", CMD2_ON_DL(update_priorities));
|
||||
CMD2_DL_V ("d.update_priorities", CMD2_ON_DL(update_priorities));
|
||||
|
||||
CMD2_DL_STRING_V("add_peer", std::tr1::bind(&apply_d_add_peer, std::tr1::placeholders::_1, std::tr1::placeholders::_2));
|
||||
CMD2_DL_STRING_V("add_peer", std::bind(&apply_d_add_peer, std::placeholders::_1, std::placeholders::_2));
|
||||
|
||||
//
|
||||
// Custom settings:
|
||||
//
|
||||
|
||||
CMD2_DL_STRING("d.custom", std::tr1::bind(&retrieve_d_custom, std::tr1::placeholders::_1, std::tr1::placeholders::_2));
|
||||
CMD2_DL_STRING("d.custom_throw", std::tr1::bind(&retrieve_d_custom_throw, std::tr1::placeholders::_1, std::tr1::placeholders::_2));
|
||||
CMD2_DL_LIST ("d.custom.set", std::tr1::bind(&apply_d_custom, std::tr1::placeholders::_1, std::tr1::placeholders::_2));
|
||||
CMD2_DL_STRING("d.custom", std::bind(&retrieve_d_custom, std::placeholders::_1, std::placeholders::_2));
|
||||
CMD2_DL_STRING("d.custom_throw", std::bind(&retrieve_d_custom_throw, std::placeholders::_1, std::placeholders::_2));
|
||||
CMD2_DL_LIST ("d.custom.set", std::bind(&apply_d_custom, std::placeholders::_1, std::placeholders::_2));
|
||||
|
||||
CMD2_DL_VAR_STRING_PUBLIC("d.custom1", "rtorrent", "custom1");
|
||||
CMD2_DL_VAR_STRING_PUBLIC("d.custom2", "rtorrent", "custom2");
|
||||
@@ -700,56 +664,56 @@ initialize_command_download() {
|
||||
CMD2_DL_VAR_VALUE("d.state_counter", "rtorrent", "state_counter");
|
||||
CMD2_DL_VAR_VALUE_PUBLIC("d.ignore_commands", "rtorrent", "ignore_commands");
|
||||
|
||||
CMD2_DL ("d.connection_current", std::tr1::bind(&retrieve_d_connection_type, std::tr1::placeholders::_1));
|
||||
CMD2_DL_STRING("d.connection_current.set", std::tr1::bind(&apply_d_connection_type, std::tr1::placeholders::_1, std::tr1::placeholders::_2));
|
||||
CMD2_DL ("d.connection_current", std::bind(&torrent::option_as_string, torrent::OPTION_CONNECTION_TYPE, CMD2_ON_DL(connection_type)));
|
||||
CMD2_DL_STRING("d.connection_current.set", std::bind(&apply_d_connection_type, std::placeholders::_1, std::placeholders::_2));
|
||||
|
||||
CMD2_DL_VAR_STRING("d.connection_leech", "rtorrent", "connection_leech");
|
||||
CMD2_DL_VAR_STRING("d.connection_seed", "rtorrent", "connection_seed");
|
||||
|
||||
CMD2_DL ("d.up.choke_heuristics", std::tr1::bind(&retrieve_d_choke_heuristics, std::tr1::placeholders::_1, false));
|
||||
CMD2_DL_STRING("d.up.choke_heuristics.set", std::tr1::bind(&apply_d_choke_heuristics, std::tr1::placeholders::_1, std::tr1::placeholders::_2, false));
|
||||
CMD2_DL ("d.down.choke_heuristics", std::tr1::bind(&retrieve_d_choke_heuristics, std::tr1::placeholders::_1, true));
|
||||
CMD2_DL_STRING("d.down.choke_heuristics.set", std::tr1::bind(&apply_d_choke_heuristics, std::tr1::placeholders::_1, std::tr1::placeholders::_2, true));
|
||||
CMD2_DL ("d.up.choke_heuristics", std::bind(&torrent::option_as_string, torrent::OPTION_CHOKE_HEURISTICS, CMD2_ON_DL(upload_choke_heuristic)));
|
||||
CMD2_DL_STRING("d.up.choke_heuristics.set", std::bind(&apply_d_choke_heuristics, std::placeholders::_1, std::placeholders::_2, false));
|
||||
CMD2_DL ("d.down.choke_heuristics", std::bind(&torrent::option_as_string, torrent::OPTION_CHOKE_HEURISTICS, CMD2_ON_DL(download_choke_heuristic)));
|
||||
CMD2_DL_STRING("d.down.choke_heuristics.set", std::bind(&apply_d_choke_heuristics, std::placeholders::_1, std::placeholders::_2, true));
|
||||
|
||||
CMD2_DL_VAR_STRING("d.up.choke_heuristics.leech", "rtorrent", "choke_heuristics.up.leech");
|
||||
CMD2_DL_VAR_STRING("d.up.choke_heuristics.seed", "rtorrent", "choke_heuristics.up.seed");
|
||||
CMD2_DL_VAR_STRING("d.down.choke_heuristics.leech", "rtorrent", "choke_heuristics.down.leech");
|
||||
CMD2_DL_VAR_STRING("d.down.choke_heuristics.seed", "rtorrent", "choke_heuristics.down.seed");
|
||||
|
||||
CMD2_DL ("d.hashing_failed", std::tr1::bind(&core::Download::is_hash_failed, std::tr1::placeholders::_1));
|
||||
CMD2_DL_VALUE_V("d.hashing_failed.set", std::tr1::bind(&core::Download::set_hash_failed, std::tr1::placeholders::_1, std::tr1::placeholders::_2));
|
||||
CMD2_DL ("d.hashing_failed", std::bind(&core::Download::is_hash_failed, std::placeholders::_1));
|
||||
CMD2_DL_VALUE_V ("d.hashing_failed.set", std::bind(&core::Download::set_hash_failed, std::placeholders::_1, std::placeholders::_2));
|
||||
|
||||
CMD2_DL ("d.views", std::tr1::bind(&download_get_variable, std::tr1::placeholders::_1, "rtorrent", "views"));
|
||||
CMD2_DL ("d.views.has", std::tr1::bind(&d_list_has, std::tr1::placeholders::_1, std::tr1::placeholders::_2, "rtorrent", "views"));
|
||||
CMD2_DL ("d.views.remove", std::tr1::bind(&d_list_remove, std::tr1::placeholders::_1, std::tr1::placeholders::_2, "rtorrent", "views"));
|
||||
CMD2_DL ("d.views.push_back", std::tr1::bind(&d_list_push_back, std::tr1::placeholders::_1, std::tr1::placeholders::_2, "rtorrent", "views"));
|
||||
CMD2_DL ("d.views.push_back_unique", std::tr1::bind(&d_list_push_back_unique, std::tr1::placeholders::_1, std::tr1::placeholders::_2, "rtorrent", "views"));
|
||||
CMD2_DL ("d.views", std::bind(&download_get_variable, std::placeholders::_1, "rtorrent", "views"));
|
||||
CMD2_DL ("d.views.has", std::bind(&d_list_has, std::placeholders::_1, std::placeholders::_2, "rtorrent", "views"));
|
||||
CMD2_DL ("d.views.remove", std::bind(&d_list_remove, std::placeholders::_1, std::placeholders::_2, "rtorrent", "views"));
|
||||
CMD2_DL ("d.views.push_back", std::bind(&d_list_push_back, std::placeholders::_1, std::placeholders::_2, "rtorrent", "views"));
|
||||
CMD2_DL ("d.views.push_back_unique", std::bind(&d_list_push_back_unique, std::placeholders::_1, std::placeholders::_2, "rtorrent", "views"));
|
||||
|
||||
// This command really needs to be improved, so we have proper
|
||||
// logging support.
|
||||
CMD2_DL ("d.message", std::tr1::bind(&core::Download::message, std::tr1::placeholders::_1));
|
||||
CMD2_DL_STRING_V("d.message.set", std::tr1::bind(&core::Download::set_message, std::tr1::placeholders::_1, std::tr1::placeholders::_2));
|
||||
CMD2_DL ("d.message", std::bind(&core::Download::message, std::placeholders::_1));
|
||||
CMD2_DL_STRING_V("d.message.set", std::bind(&core::Download::set_message, std::placeholders::_1, std::placeholders::_2));
|
||||
|
||||
CMD2_DL ("d.max_file_size", CMD2_ON_FL(max_file_size));
|
||||
CMD2_DL_VALUE_V ("d.max_file_size.set", std::tr1::bind(&torrent::FileList::set_max_file_size, CMD2_BIND_FL, std::tr1::placeholders::_2));
|
||||
CMD2_DL ("d.max_file_size", CMD2_ON_FL(max_file_size));
|
||||
CMD2_DL_VALUE_V ("d.max_file_size.set", std::bind(&torrent::FileList::set_max_file_size, CMD2_BIND_FL, std::placeholders::_2));
|
||||
|
||||
CMD2_DL ("d.peers_min", std::tr1::bind(&torrent::ConnectionList::min_size, CMD2_BIND_CL));
|
||||
CMD2_DL_VALUE_V ("d.peers_min.set", std::tr1::bind(&torrent::ConnectionList::set_min_size, CMD2_BIND_CL, std::tr1::placeholders::_2));
|
||||
CMD2_DL ("d.peers_max", std::tr1::bind(&torrent::ConnectionList::max_size, CMD2_BIND_CL));
|
||||
CMD2_DL_VALUE_V ("d.peers_max.set", std::tr1::bind(&torrent::ConnectionList::set_max_size, CMD2_BIND_CL, std::tr1::placeholders::_2));
|
||||
CMD2_DL ("d.uploads_max", std::tr1::bind(&torrent::Download::uploads_max, CMD2_BIND_DL));
|
||||
CMD2_DL_VALUE_V ("d.uploads_max.set", std::tr1::bind(&torrent::Download::set_uploads_max, CMD2_BIND_DL, std::tr1::placeholders::_2));
|
||||
CMD2_DL ("d.peers_connected", std::tr1::bind(&torrent::ConnectionList::size, CMD2_BIND_CL));
|
||||
CMD2_DL ("d.peers_not_connected", std::tr1::bind(&torrent::PeerList::available_list_size, CMD2_BIND_PL));
|
||||
CMD2_DL ("d.peers_min", std::bind(&torrent::ConnectionList::min_size, CMD2_BIND_CL));
|
||||
CMD2_DL_VALUE_V ("d.peers_min.set", std::bind(&torrent::ConnectionList::set_min_size, CMD2_BIND_CL, std::placeholders::_2));
|
||||
CMD2_DL ("d.peers_max", std::bind(&torrent::ConnectionList::max_size, CMD2_BIND_CL));
|
||||
CMD2_DL_VALUE_V ("d.peers_max.set", std::bind(&torrent::ConnectionList::set_max_size, CMD2_BIND_CL, std::placeholders::_2));
|
||||
CMD2_DL ("d.uploads_max", std::bind(&torrent::Download::uploads_max, CMD2_BIND_DL));
|
||||
CMD2_DL_VALUE_V ("d.uploads_max.set", std::bind(&torrent::Download::set_uploads_max, CMD2_BIND_DL, std::placeholders::_2));
|
||||
CMD2_DL ("d.peers_connected", std::bind(&torrent::ConnectionList::size, CMD2_BIND_CL));
|
||||
CMD2_DL ("d.peers_not_connected", std::bind(&torrent::PeerList::available_list_size, CMD2_BIND_PL));
|
||||
|
||||
CMD2_DL ("d.peers_complete", CMD2_ON_DL(peers_complete));
|
||||
CMD2_DL ("d.peers_accounted", CMD2_ON_DL(peers_accounted));
|
||||
CMD2_DL ("d.peers_complete", CMD2_ON_DL(peers_complete));
|
||||
CMD2_DL ("d.peers_accounted", CMD2_ON_DL(peers_accounted));
|
||||
|
||||
CMD2_DL ("d.throttle_name", std::tr1::bind(&download_get_variable, std::tr1::placeholders::_1, "rtorrent", "throttle_name"));
|
||||
CMD2_DL_STRING_V("d.throttle_name.set", std::tr1::bind(&core::Download::set_throttle_name, std::tr1::placeholders::_1, std::tr1::placeholders::_2));
|
||||
CMD2_DL ("d.throttle_name", std::bind(&download_get_variable, std::placeholders::_1, "rtorrent", "throttle_name"));
|
||||
CMD2_DL_STRING_V("d.throttle_name.set", std::bind(&core::Download::set_throttle_name, std::placeholders::_1, std::placeholders::_2));
|
||||
|
||||
CMD2_DL ("d.bytes_done", CMD2_ON_DL(bytes_done));
|
||||
CMD2_DL ("d.ratio", std::tr1::bind(&retrieve_d_ratio, std::tr1::placeholders::_1));
|
||||
CMD2_DL ("d.ratio", std::bind(&retrieve_d_ratio, std::placeholders::_1));
|
||||
CMD2_DL ("d.chunks_hashed", CMD2_ON_DL(chunks_hashed));
|
||||
CMD2_DL ("d.free_diskspace", CMD2_ON_FL(free_diskspace));
|
||||
|
||||
@@ -764,25 +728,25 @@ initialize_command_download() {
|
||||
CMD2_DL ("d.completed_chunks", CMD2_ON_FL(completed_chunks));
|
||||
CMD2_DL ("d.left_bytes", CMD2_ON_FL(left_bytes));
|
||||
|
||||
CMD2_DL ("d.tracker_numwant", std::tr1::bind(&torrent::TrackerList::numwant, CMD2_BIND_TL));
|
||||
CMD2_DL_VALUE_V ("d.tracker_numwant.set", std::tr1::bind(&torrent::TrackerList::set_numwant, CMD2_BIND_TL, std::tr1::placeholders::_2));
|
||||
CMD2_DL ("d.tracker_focus", std::tr1::bind(&torrent::TrackerList::focus_index, CMD2_BIND_TL));
|
||||
CMD2_DL ("d.tracker_size", std::tr1::bind(&core::Download::tracker_list_size, std::tr1::placeholders::_1));
|
||||
CMD2_DL ("d.tracker_numwant", std::bind(&torrent::TrackerList::numwant, CMD2_BIND_TL));
|
||||
CMD2_DL_VALUE_V ("d.tracker_numwant.set", std::bind(&torrent::TrackerList::set_numwant, CMD2_BIND_TL, std::placeholders::_2));
|
||||
CMD2_DL ("d.tracker_focus", std::bind(&torrent::TrackerList::focus_index, CMD2_BIND_TL));
|
||||
CMD2_DL ("d.tracker_size", std::bind(&core::Download::tracker_list_size, std::placeholders::_1));
|
||||
|
||||
CMD2_DL ("d.directory", CMD2_ON_FL(root_dir));
|
||||
CMD2_DL_STRING_V("d.directory.set", std::tr1::bind(&apply_d_directory, std::tr1::placeholders::_1, std::tr1::placeholders::_2));
|
||||
CMD2_DL_STRING_V("d.directory.set", std::bind(&apply_d_directory, std::placeholders::_1, std::placeholders::_2));
|
||||
CMD2_DL ("d.directory_base", CMD2_ON_FL(root_dir));
|
||||
CMD2_DL_STRING_V("d.directory_base.set", std::tr1::bind(&core::Download::set_root_directory, std::tr1::placeholders::_1, std::tr1::placeholders::_2));
|
||||
CMD2_DL_STRING_V("d.directory_base.set", std::bind(&core::Download::set_root_directory, std::placeholders::_1, std::placeholders::_2));
|
||||
|
||||
CMD2_DL ("d.priority", std::tr1::bind(&core::Download::priority, std::tr1::placeholders::_1));
|
||||
CMD2_DL ("d.priority_str", std::tr1::bind(&retrieve_d_priority_str, std::tr1::placeholders::_1));
|
||||
CMD2_DL_VALUE_V ("d.priority.set", std::tr1::bind(&core::Download::set_priority, std::tr1::placeholders::_1, std::tr1::placeholders::_2));
|
||||
CMD2_DL ("d.priority", std::bind(&core::Download::priority, std::placeholders::_1));
|
||||
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.initialize_logs", std::tr1::bind(&cmd_d_initialize_logs, std::tr1::placeholders::_1));
|
||||
CMD2_DL ("d.initialize_logs", std::bind(&cmd_d_initialize_logs, std::placeholders::_1));
|
||||
|
||||
CMD2_DL_LIST ("f.multicall", std::tr1::bind(&f_multicall, std::tr1::placeholders::_1, std::tr1::placeholders::_2));
|
||||
CMD2_DL_LIST ("p.multicall", std::tr1::bind(&p_multicall, std::tr1::placeholders::_1, std::tr1::placeholders::_2));
|
||||
CMD2_DL_LIST ("t.multicall", std::tr1::bind(&t_multicall, std::tr1::placeholders::_1, std::tr1::placeholders::_2));
|
||||
CMD2_DL_LIST ("f.multicall", std::bind(&f_multicall, std::placeholders::_1, std::placeholders::_2));
|
||||
CMD2_DL_LIST ("p.multicall", std::bind(&p_multicall, std::placeholders::_1, std::placeholders::_2));
|
||||
CMD2_DL_LIST ("t.multicall", std::bind(&t_multicall, std::placeholders::_1, std::placeholders::_2));
|
||||
|
||||
CMD2_ANY_LIST ("p.call_target", std::tr1::bind(&p_call_target, std::tr1::placeholders::_2));
|
||||
CMD2_ANY_LIST ("p.call_target", std::bind(&p_call_target, std::placeholders::_2));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user