* Added direct support for download commands in XMLRPC. Now the first

parameter of the get_d/set_d commands is the info-hash.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@917 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2007-06-19 18:04:49 +00:00
parent 507ba5a7a0
commit 750ba89129
6 changed files with 170 additions and 27 deletions
+7
View File
@@ -102,6 +102,13 @@ DownloadList::find_hex(const char* hash) {
return std::find_if(begin(), end(), rak::equal(key, rak::on(std::mem_fun(&Download::download), std::mem_fun(&torrent::Download::info_hash))));
}
Download*
DownloadList::find_hex_ptr(const char* hash) {
iterator itr = find_hex(hash);
return itr != end() ? *itr : NULL;
}
Download*
DownloadList::create(std::istream* str, bool printLog) {
torrent::Object* object = new torrent::Object;
+1
View File
@@ -79,6 +79,7 @@ public:
void session_save();
iterator find_hex(const char* hash);
Download* find_hex_ptr(const char* hash);
// Might move this to DownloadFactory.
Download* create(std::istream* str, bool printLog);