diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-05-07 10:44:36 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-05-07 10:44:36 +0200 |
commit | b61e1467ee19ca96782248c0189424334d5980b7 (patch) | |
tree | cb7b7283f725efe9a525e81f535d22cb2a287e54 /module/remote/thriftbackend/thriftgen/pyload/Pyload-remote | |
parent | merged (diff) | |
download | pyload-b61e1467ee19ca96782248c0189424334d5980b7.tar.xz |
hooks methods callable via rpc, closed #299
Diffstat (limited to 'module/remote/thriftbackend/thriftgen/pyload/Pyload-remote')
-rwxr-xr-x | module/remote/thriftbackend/thriftgen/pyload/Pyload-remote | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote index 2e597604e..a9311d32b 100755 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote @@ -78,6 +78,9 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' void removeAccount(string plugin, string account)' print ' bool login(string username, string password)' print ' UserData getUserData()' + print ' getServices()' + print ' bool hasService(string plugin, string func)' + print ' string call(ServiceCall info)' print '' sys.exit(0) @@ -470,6 +473,24 @@ elif cmd == 'getUserData': sys.exit(1) pp.pprint(client.getUserData()) +elif cmd == 'getServices': + if len(args) != 0: + print 'getServices requires 0 args' + sys.exit(1) + pp.pprint(client.getServices()) + +elif cmd == 'hasService': + if len(args) != 2: + print 'hasService requires 2 args' + sys.exit(1) + pp.pprint(client.hasService(args[0],args[1],)) + +elif cmd == 'call': + if len(args) != 1: + print 'call requires 1 args' + sys.exit(1) + pp.pprint(client.call(eval(args[0]),)) + else: print 'Unrecognized method %s' % cmd sys.exit(1) |