mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-13 21:52:30 +00:00
* Added VariableBool.
* Added views for downloads, that can be sorted. * Added options "view_add", "view_sort" and "view_new". git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@671 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -56,38 +56,26 @@ class VariableAny : public Variable {
|
||||
public:
|
||||
VariableAny(const torrent::Object& v = torrent::Object()) :
|
||||
m_variable(v) {}
|
||||
virtual ~VariableAny();
|
||||
|
||||
virtual const torrent::Object& get();
|
||||
virtual void set(const torrent::Object& arg);
|
||||
|
||||
private:
|
||||
protected:
|
||||
torrent::Object m_variable;
|
||||
};
|
||||
|
||||
class VariableValue : public Variable {
|
||||
class VariableValue : public VariableAny {
|
||||
public:
|
||||
VariableValue(int64_t v) : m_variable(v) {}
|
||||
virtual ~VariableValue();
|
||||
VariableValue(int64_t v) { m_variable = v; }
|
||||
|
||||
virtual const torrent::Object& get();
|
||||
virtual void set(const torrent::Object& arg);
|
||||
|
||||
private:
|
||||
torrent::Object m_variable;
|
||||
};
|
||||
|
||||
class VariableBool : public Variable {
|
||||
public:
|
||||
VariableBool(bool state) : m_variable(state ? (int64_t)1 : (int64_t)0) {}
|
||||
VariableBool(const torrent::Object& v = torrent::Object((int64_t)0)) { set(v); }
|
||||
virtual ~VariableBool();
|
||||
|
||||
virtual const torrent::Object& get();
|
||||
virtual void set(const torrent::Object& arg);
|
||||
};
|
||||
|
||||
private:
|
||||
torrent::Object m_variable;
|
||||
class VariableBool : public VariableAny {
|
||||
public:
|
||||
VariableBool(bool state = false) { m_variable = state ? (int64_t)1 : (int64_t)0; }
|
||||
|
||||
virtual void set(const torrent::Object& arg);
|
||||
};
|
||||
|
||||
class VariableObject : public Variable {
|
||||
@@ -99,13 +87,12 @@ public:
|
||||
const std::string& key,
|
||||
Type t = torrent::Object::TYPE_NONE) :
|
||||
m_bencode(b), m_root(root), m_key(key), m_type(t) {}
|
||||
virtual ~VariableObject();
|
||||
|
||||
virtual const torrent::Object& get();
|
||||
virtual void set(const torrent::Object& arg);
|
||||
|
||||
private:
|
||||
torrent::Object* m_bencode;
|
||||
torrent::Object* m_bencode;
|
||||
std::string m_root;
|
||||
std::string m_key;
|
||||
Type m_type;
|
||||
|
||||
Reference in New Issue
Block a user