mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-12 21:22:31 +00:00
* Cleaned up commands.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1068 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#define RTORRENT_UTILS_COMMAND_HELPERS_H
|
||||
|
||||
#include "rpc/command_slot.h"
|
||||
#include "rpc/command_function.h"
|
||||
#include "rpc/parse_commands.h"
|
||||
|
||||
namespace rpc {
|
||||
@@ -78,11 +79,9 @@ void initialize_commands();
|
||||
|
||||
void
|
||||
add_variable(const char* getKey, const char* setKey, const char* defaultSetKey,
|
||||
rpc::Command::generic_slot getSlot, rpc::Command::generic_slot setSlot,
|
||||
rpc::Command::cleaned_slot getSlot, rpc::Command::cleaned_slot setSlot,
|
||||
const torrent::Object& defaultObject);
|
||||
|
||||
extern torrent::Object cmd_call(const char* cmd, rpc::target_type target, const torrent::Object& rawArgs);
|
||||
|
||||
#define ADD_VARIABLE_BOOL(key, defaultValue) \
|
||||
add_variable("get_" key, "set_" key, key, &rpc::CommandVariable::get_bool, &rpc::CommandVariable::set_bool, (int64_t)defaultValue);
|
||||
|
||||
@@ -207,4 +206,7 @@ add_variable(key, NULL, NULL, &rpc::CommandVariable::get_string, NULL, std::stri
|
||||
#define CMD_D_VOID(key, slot) \
|
||||
CMD_D_SLOT(key, call_unknown, rpc::object_fn(slot), "i:", "")
|
||||
|
||||
#define CMD_FUNC_SINGLE(key, command) \
|
||||
rpc::commands.insert_type(key, new rpc::CommandFunction(command), &rpc::CommandFunction::call, rpc::CommandMap::flag_public_xmlrpc, NULL, NULL);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user