* Make VariableMap handle both global and core::Download

variables. Variable now has functions for both void and
core::Download*, where the core::Download* is discarded if necessary.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@847 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2007-01-17 15:18:33 +00:00
parent d030c5401e
commit e59b5bf7b6
19 changed files with 414 additions and 133 deletions
+20
View File
@@ -44,6 +44,26 @@ namespace utils {
const torrent::Object Variable::m_emptyObject;
// Consider throwing an exception.
const torrent::Object&
Variable::get() {
return m_emptyObject;
}
void
Variable::set(const torrent::Object& arg) {
}
const torrent::Object&
Variable::get_d(core::Download* download) {
return get();
}
void
Variable::set_d(core::Download* download, const torrent::Object& arg) {
set(arg);
}
const char*
Variable::string_to_value_unit(const char* pos, value_type* value, int base, int unit) {
char* last;