* Put both global and download specific commands in a single

CommandMap.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@914 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2007-06-17 03:14:38 +00:00
parent 297b4b5f1d
commit e9db89e6d6
36 changed files with 330 additions and 345 deletions
+1 -10
View File
@@ -48,7 +48,7 @@
#include <torrent/tracker_list.h>
#include <torrent/data/file_list.h>
#include "rpc/command_map.h"
#include "rpc/parse_commands.h"
#include "control.h"
#include "download.h"
@@ -205,15 +205,6 @@ Download::receive_chunk_failed(__UNUSED uint32_t idx) {
m_chunksFailed++;
}
int64_t Download::get_value(const char* key) { return control->download_variables()->call_command_d_value(key, this); }
const std::string Download::get_string(const char* key) { return control->download_variables()->call_command_d_string(key, this); }
int64_t Download::get_std_value(const std::string& key) { return control->download_variables()->call_command_d_value(key.c_str(), this); }
const std::string Download::get_std_string(const std::string& key) { return control->download_variables()->call_command_d_string(key.c_str(), this); }
void Download::set(const char* key, const torrent::Object& value) { control->download_variables()->call_command_d(key, this, value); }
void Download::set_value(const char* key, int64_t value) { control->download_variables()->call_command_d_set_value(key, this, value); }
void Download::set_string(const char* key, const std::string& value) { control->download_variables()->call_command_d_set_string(key, this, value); }
// Clean up.
void
Download::set_root_directory(const std::string& path) {