mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-07 10:42:31 +00:00
* Renamed 't.get_enabled' to 't.is_enabled'.
* The torrent is no longer closed on finished for on_finished commands, instead d.set_directory causes the download to call close_directly. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@974 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+22
-16
@@ -62,34 +62,40 @@ apply_t_set_enabled(torrent::Tracker* tracker, int64_t state) {
|
||||
rpc::commands.insert_tracker(key, commandTrackerSlotsItr++, &rpc::CommandSlot<torrent::Tracker*>::function, rpc::CommandMap::flag_dont_delete | rpc::CommandMap::flag_public_xmlrpc, parm, doc);
|
||||
|
||||
#define ADD_CT_VOID(key, slot) \
|
||||
ADD_CT_SLOT_PUBLIC("t.get_" key, call_unknown, rpc::object_fn(slot), "i:", "")
|
||||
ADD_CT_SLOT_PUBLIC("t." key, call_unknown, rpc::object_void_fn<torrent::Tracker*>(slot), "i:", "")
|
||||
|
||||
#define ADD_CT_VOID_UNI(key, get) \
|
||||
ADD_CT_SLOT_PUBLIC("t.get_" key, call_unknown, rpc::object_void_fn<torrent::Tracker*>(get), "i:", "")
|
||||
|
||||
#define ADD_CT_VALUE_UNI(key, get) \
|
||||
ADD_CT_SLOT_PUBLIC("t.get_" key, call_unknown, rpc::object_void_fn<torrent::Tracker*>(get), "i:", "")
|
||||
|
||||
#define ADD_CT_VALUE_BI(key, set, get) \
|
||||
ADD_CT_SLOT_PUBLIC("t.set_" key, call_value, rpc::object_value_fn<torrent::Tracker*>(set), "i:i", "") \
|
||||
ADD_CT_SLOT_PUBLIC("t.set_" key, call_value, rpc::object_value_fn<torrent::Tracker*>(set), "i:i", "") \
|
||||
ADD_CT_SLOT_PUBLIC("t.get_" key, call_unknown, rpc::object_void_fn<torrent::Tracker*>(get), "i:", "")
|
||||
|
||||
#define ADD_CT_BOOL(key, set, get) \
|
||||
ADD_CT_SLOT_PUBLIC("t.set_" key, call_value, rpc::object_value_fn<torrent::Tracker*>(set), "i:i", "") \
|
||||
ADD_CT_SLOT_PUBLIC("t.is_" key, call_unknown, rpc::object_void_fn<torrent::Tracker*>(get), "i:", "")
|
||||
|
||||
#define ADD_CT_STRING_UNI(key, get) \
|
||||
ADD_CT_SLOT_PUBLIC("t.get_" key, call_unknown, rpc::object_void_fn<torrent::Tracker*>(get), "s:", "")
|
||||
|
||||
void
|
||||
initialize_command_tracker() {
|
||||
ADD_CT_STRING_UNI("url", std::mem_fun(&torrent::Tracker::url));
|
||||
ADD_CT_VALUE_UNI("group", std::mem_fun(&torrent::Tracker::group));
|
||||
ADD_CT_VALUE_UNI("type", std::mem_fun(&torrent::Tracker::tracker_type));
|
||||
ADD_CT_STRING_UNI("id", std::mem_fun(&torrent::Tracker::tracker_id));
|
||||
ADD_CT_STRING_UNI("url", std::mem_fun(&torrent::Tracker::url));
|
||||
ADD_CT_VOID_UNI("group", std::mem_fun(&torrent::Tracker::group));
|
||||
ADD_CT_VOID_UNI("type", std::mem_fun(&torrent::Tracker::tracker_type));
|
||||
ADD_CT_STRING_UNI("id", std::mem_fun(&torrent::Tracker::tracker_id));
|
||||
|
||||
ADD_CT_VALUE_BI("enabled", std::ptr_fun(&apply_t_set_enabled), std::mem_fun(&torrent::Tracker::is_enabled));
|
||||
ADD_CT_VOID("is_open", std::mem_fun(&torrent::Tracker::is_open));
|
||||
ADD_CT_BOOL("enabled", std::ptr_fun(&apply_t_set_enabled), std::mem_fun(&torrent::Tracker::is_enabled));
|
||||
|
||||
ADD_CT_VOID_UNI("normal_interval", std::mem_fun(&torrent::Tracker::normal_interval));
|
||||
ADD_CT_VOID_UNI("min_interval", std::mem_fun(&torrent::Tracker::min_interval));
|
||||
|
||||
ADD_CT_VALUE_UNI("is_open", std::mem_fun(&torrent::Tracker::is_open));
|
||||
|
||||
ADD_CT_VALUE_UNI("normal_interval", std::mem_fun(&torrent::Tracker::normal_interval));
|
||||
ADD_CT_VALUE_UNI("min_interval", std::mem_fun(&torrent::Tracker::min_interval));
|
||||
|
||||
ADD_CT_VALUE_UNI("scrape_time_last", std::mem_fun(&torrent::Tracker::scrape_time_last));
|
||||
ADD_CT_VALUE_UNI("scrape_complete", std::mem_fun(&torrent::Tracker::scrape_complete));
|
||||
ADD_CT_VALUE_UNI("scrape_incomplete", std::mem_fun(&torrent::Tracker::scrape_incomplete));
|
||||
ADD_CT_VALUE_UNI("scrape_downloaded", std::mem_fun(&torrent::Tracker::scrape_downloaded));
|
||||
ADD_CT_VOID_UNI("scrape_time_last", std::mem_fun(&torrent::Tracker::scrape_time_last));
|
||||
ADD_CT_VOID_UNI("scrape_complete", std::mem_fun(&torrent::Tracker::scrape_complete));
|
||||
ADD_CT_VOID_UNI("scrape_incomplete", std::mem_fun(&torrent::Tracker::scrape_incomplete));
|
||||
ADD_CT_VOID_UNI("scrape_downloaded", std::mem_fun(&torrent::Tracker::scrape_downloaded));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user