* Removed old Command classes.

* Redirects can now be made efficiently using rpc::CommandMap::create_redirect or "methods.redirect=new_key,dest_key".


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1155 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2010-03-28 18:09:09 +00:00
parent 10f665e9c6
commit 4e4540e60f
15 changed files with 293 additions and 908 deletions
+4
View File
@@ -104,6 +104,8 @@ public:
static const int flag_public_xmlrpc = 0x4;
static const int flag_no_target = 0x8;
static const int flag_modifiable = 0x10;
static const int flag_is_redirect = 0x20;
static const int flag_has_redirects = 0x40;
CommandMap() {}
~CommandMap();
@@ -127,6 +129,8 @@ public:
void insert(key_type key, const command_map_data_type src);
void erase(iterator itr);
void create_redirect(key_type key_new, key_type key_dest, int flags);
const mapped_type call(key_type key, const mapped_type& args = mapped_type());
const mapped_type call(key_type key, target_type target, const mapped_type& args = mapped_type()) { return call_command(key, args, target); }
const mapped_type call_catch(key_type key, target_type target, const mapped_type& args = mapped_type(), const char* err = "Command failed: ");