mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-13 21:52:30 +00:00
* Added 'method.const' and 'method.const.enable' for setting the const flag for objects in object_storage.
* Added '<foo_list>.push_back' to all list objects in object_storage. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1242 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -108,6 +108,8 @@ public:
|
||||
static const size_t key_size = key_type::max_size;
|
||||
|
||||
local_iterator find_local(const torrent::raw_string& key);
|
||||
local_iterator find_local_const(const torrent::raw_string& key, unsigned int type = 0);
|
||||
local_iterator find_local_mutable(const torrent::raw_string& key, unsigned int type = 0);
|
||||
|
||||
iterator insert(const char* key_data, uint32_t key_size, const torrent::Object& object, unsigned int flags);
|
||||
iterator insert_c_str(const char* key, const torrent::Object& object, unsigned int flags) { return insert(key, std::strlen(key), object, flags); }
|
||||
@@ -116,6 +118,12 @@ public:
|
||||
iterator insert(const torrent::raw_string& key, const torrent::Object& object, unsigned int flags);
|
||||
iterator insert_str(const std::string& key, const torrent::Object& object, unsigned int flags);
|
||||
|
||||
bool has_flag(const torrent::raw_string& key, unsigned int flag);
|
||||
bool has_flag_str(const std::string& key, unsigned int flag) { return has_flag(torrent::raw_string::from_string(key), flag); }
|
||||
|
||||
void enable_flag(const torrent::raw_string& key, unsigned int flag);
|
||||
void enable_flag_str(const std::string& key, unsigned int flag) { enable_flag(torrent::raw_string::from_string(key), flag); }
|
||||
|
||||
// Access functions that throw on error.
|
||||
|
||||
const torrent::Object& get(const torrent::raw_string& key);
|
||||
@@ -138,6 +146,9 @@ public:
|
||||
const torrent::Object& set_c_str_list(const char* str, const torrent::Object::list_type& object) { return set_list(torrent::raw_string::from_c_str(str), object); }
|
||||
const torrent::Object& set_str_list(const std::string& str, const torrent::Object::list_type& object) { return set_list(torrent::raw_string::from_string(str), object); }
|
||||
|
||||
void list_push_back(const torrent::raw_string& key, const torrent::Object& object);
|
||||
void list_push_back_str(const std::string& str, const torrent::Object& object) { list_push_back(torrent::raw_string::from_string(str), object); }
|
||||
|
||||
// Functions callers:
|
||||
torrent::Object call_function(const torrent::raw_string& key, target_type target, const torrent::Object& object);
|
||||
torrent::Object call_function_str(const std::string& key, target_type target, const torrent::Object& object);
|
||||
|
||||
Reference in New Issue
Block a user