* Cleaning up command names. The deprecated commands will be redirected.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1131 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2010-02-16 17:29:53 +00:00
parent 31abf85846
commit 3cae3d37be
15 changed files with 130 additions and 108 deletions
+5 -5
View File
@@ -233,17 +233,17 @@ DownloadFactory::receive_success() {
if (!rpc::call_command_value("get_use_udp_trackers"))
download->enable_udp_trackers(false);
if (rpc::call_command_value("get_max_file_size") > 0)
rpc::call_command("d.set_max_file_size", rpc::call_command_void("get_max_file_size"), rpc::make_target(download));
if (rpc::call_command_value("system.file.max_size") > 0)
rpc::call_command("d.set_max_file_size", rpc::call_command_void("system.file.max_size"), rpc::make_target(download));
// Check first if we already have these values set in the session
// torrent, so that it is safe to change the values.
//
// Need to also catch the exceptions.
if (rpc::call_command_value("get_split_file_size") >= 0)
if (rpc::call_command_value("system.file.split_size") >= 0)
torrent::file_split_all(download->download()->file_list(),
rpc::call_command_value("get_split_file_size"),
rpc::call_command_string("split_suffix"));
rpc::call_command_value("system.file.split_size"),
rpc::call_command_string("system.file.split_suffix"));
if (!rtorrent->has_key_string("directory"))
rpc::call_command("d.set_directory", m_variables["directory"], rpc::make_target(download));
+2 -2
View File
@@ -220,7 +220,7 @@ DownloadList::open_throw(Download* download) {
int openFlags = download->resume_flags();
if (rpc::call_command_value("system.file_allocate"))
if (rpc::call_command_value("system.file.allocate"))
openFlags |= torrent::Download::open_enable_fallocate;
download->download()->open(openFlags);
@@ -560,7 +560,7 @@ DownloadList::confirm_finished(Download* download) {
// the download.
//
// Obsolete.
if (!download->is_active() && rpc::call_command_value("get_session_on_completion") != 0) {
if (!download->is_active() && rpc::call_command_value("system.session.on_completion") != 0) {
// torrent::resume_save_progress(*download->download(), download->download()->bencode()->get_key("libtorrent_resume"));
control->core()->download_store()->save_resume(download);
}
+2 -2
View File
@@ -77,7 +77,7 @@ namespace core {
void
receive_tracker_dump(const std::string& url, const char* data, size_t size) {
const std::string& filename = rpc::call_command_string("get_log.tracker");
const std::string& filename = rpc::call_command_string("log.tracker");
if (filename.empty())
return;
@@ -94,7 +94,7 @@ receive_tracker_dump(const std::string& url, const char* data, size_t size) {
void
Manager::handshake_log(const sockaddr* sa, int msg, int err, const torrent::HashString* hash) {
if (!rpc::call_command_value("get_handshake_log"))
if (!rpc::call_command_value("log.handshake"))
return;
std::string peer;