mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-09 03:32:29 +00:00
* 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:
+10
-2
@@ -39,6 +39,10 @@
|
||||
|
||||
#include <torrent/object.h>
|
||||
|
||||
namespace core {
|
||||
class Download;
|
||||
}
|
||||
|
||||
namespace utils {
|
||||
|
||||
class Variable {
|
||||
@@ -52,8 +56,12 @@ public:
|
||||
Variable() {}
|
||||
virtual ~Variable() {}
|
||||
|
||||
virtual const torrent::Object& get() = 0;
|
||||
virtual void set(const torrent::Object& arg) = 0;
|
||||
virtual const torrent::Object& get();
|
||||
virtual void set(const torrent::Object& arg);
|
||||
|
||||
// The default action is to throw away the 'download' argument.
|
||||
virtual const torrent::Object& get_d(core::Download* download);
|
||||
virtual void set_d(core::Download* download, const torrent::Object& arg);
|
||||
|
||||
static const char* string_to_value_unit(const char* pos, value_type* value, int base, int unit);
|
||||
static bool string_to_value_unit_nothrow(const char* pos, value_type* value, int base, int unit);
|
||||
|
||||
Reference in New Issue
Block a user