mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-10 12:12:31 +00:00
* Moved hash and torrent size checking to initialize so it will be
caught when loading a torrent. * Added VariableMap to core::Download and started moving various settings. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@624 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -61,6 +61,36 @@ private:
|
||||
torrent::Bencode m_variable;
|
||||
};
|
||||
|
||||
class VariableBool : public Variable {
|
||||
public:
|
||||
VariableBool(bool state) : m_variable(state ? (int64_t)1 : (int64_t)0) {}
|
||||
VariableBool(const torrent::Bencode& v = torrent::Bencode((int64_t)0)) { set(v); }
|
||||
virtual ~VariableBool();
|
||||
|
||||
virtual const torrent::Bencode& get();
|
||||
virtual void set(const torrent::Bencode& arg);
|
||||
|
||||
private:
|
||||
torrent::Bencode m_variable;
|
||||
};
|
||||
|
||||
class VariableBencode : public Variable {
|
||||
public:
|
||||
typedef torrent::Bencode::Type Type;
|
||||
|
||||
VariableBencode(torrent::Bencode* b, const std::string& key, Type t = torrent::Bencode::TYPE_NONE) :
|
||||
m_bencode(b), m_key(key), m_type(t) {}
|
||||
virtual ~VariableBencode();
|
||||
|
||||
virtual const torrent::Bencode& get();
|
||||
virtual void set(const torrent::Bencode& arg);
|
||||
|
||||
private:
|
||||
torrent::Bencode* m_bencode;
|
||||
std::string m_key;
|
||||
Type m_type;
|
||||
};
|
||||
|
||||
template <typename Get = std::string, typename Set = const std::string&>
|
||||
class VariableSlotString : public Variable {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user