mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-15 14:42:30 +00:00
* Moving download variables into command_download.cc.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@902 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "core/download.h"
|
||||
#include "utils/parse.h"
|
||||
|
||||
#include "command_download_slot.h"
|
||||
@@ -140,4 +141,22 @@ CommandDownloadSlot::call_string(Variable* rawVariable, core::Download* download
|
||||
// return variable->m_variable;
|
||||
// }
|
||||
|
||||
torrent::Object
|
||||
set_variable_d_fn_t::operator () (core::Download* download, const torrent::Object& arg1) {
|
||||
if (m_firstKey == NULL)
|
||||
download->bencode()->get_key(m_secondKey) = arg1;
|
||||
else
|
||||
download->bencode()->get_key(m_firstKey).get_key(m_secondKey) = arg1;
|
||||
|
||||
return torrent::Object();
|
||||
}
|
||||
|
||||
torrent::Object
|
||||
get_variable_d_fn_t::operator () (core::Download* download, const torrent::Object& arg1) {
|
||||
if (m_firstKey == NULL)
|
||||
return download->bencode()->get_key(m_secondKey);
|
||||
else
|
||||
return download->bencode()->get_key(m_firstKey).get_key(m_secondKey);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user