From 6eae782f13953dd0ba2bbe1b582cf33fd4d7d90a Mon Sep 17 00:00:00 2001 From: RaNaN Date: Mon, 19 Dec 2011 23:10:49 +0100 Subject: configparser v2, warning CONFIG will be DELETED. --- .../thriftbackend/thriftgen/pyload/Pyload-remote | 23 ++-- .../thriftbackend/thriftgen/pyload/Pyload.py | 152 +++++++++++++++------ .../thriftbackend/thriftgen/pyload/ttypes.py | 140 ++++++++++--------- 3 files changed, 205 insertions(+), 110 deletions(-) (limited to 'module/remote/thriftbackend/thriftgen') diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote index bfaf5b078..f8bcc2863 100755 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote @@ -23,10 +23,11 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print 'Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] function [arg1 [arg2...]]' print '' print 'Functions:' - print ' string getConfigValue(string category, string option, string section)' - print ' void setConfigValue(string category, string option, string value, string section)' + print ' string getConfigValue(string section, string option)' + print ' void setConfigValue(string section, string option, string value)' print ' getConfig()' print ' getPluginConfig()' + print ' ConfigSection configureSection(string section)' print ' void pauseServer()' print ' void unpauseServer()' print ' bool togglePause()' @@ -145,16 +146,16 @@ client = Pyload.Client(protocol) transport.open() if cmd == 'getConfigValue': - if len(args) != 3: - print 'getConfigValue requires 3 args' + if len(args) != 2: + print 'getConfigValue requires 2 args' sys.exit(1) - pp.pprint(client.getConfigValue(args[0],args[1],args[2],)) + pp.pprint(client.getConfigValue(args[0],args[1],)) elif cmd == 'setConfigValue': - if len(args) != 4: - print 'setConfigValue requires 4 args' + if len(args) != 3: + print 'setConfigValue requires 3 args' sys.exit(1) - pp.pprint(client.setConfigValue(args[0],args[1],args[2],args[3],)) + pp.pprint(client.setConfigValue(args[0],args[1],args[2],)) elif cmd == 'getConfig': if len(args) != 0: @@ -168,6 +169,12 @@ elif cmd == 'getPluginConfig': sys.exit(1) pp.pprint(client.getPluginConfig()) +elif cmd == 'configureSection': + if len(args) != 1: + print 'configureSection requires 1 args' + sys.exit(1) + pp.pprint(client.configureSection(args[0],)) + elif cmd == 'pauseServer': if len(args) != 0: print 'pauseServer requires 0 args' diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py index 78a42f16a..1e2f78b66 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py @@ -13,22 +13,20 @@ from thrift.protocol.TBase import TBase, TExceptionBase class Iface(object): - def getConfigValue(self, category, option, section): + def getConfigValue(self, section, option): """ Parameters: - - category - - option - section + - option """ pass - def setConfigValue(self, category, option, value, section): + def setConfigValue(self, section, option, value): """ Parameters: - - category + - section - option - value - - section """ pass @@ -38,6 +36,13 @@ class Iface(object): def getPluginConfig(self, ): pass + def configureSection(self, section): + """ + Parameters: + - section + """ + pass + def pauseServer(self, ): pass @@ -434,22 +439,20 @@ class Client(Iface): self._oprot = oprot self._seqid = 0 - def getConfigValue(self, category, option, section): + def getConfigValue(self, section, option): """ Parameters: - - category - - option - section + - option """ - self.send_getConfigValue(category, option, section) + self.send_getConfigValue(section, option) return self.recv_getConfigValue() - def send_getConfigValue(self, category, option, section): + def send_getConfigValue(self, section, option): self._oprot.writeMessageBegin('getConfigValue', TMessageType.CALL, self._seqid) args = getConfigValue_args() - args.category = category - args.option = option args.section = section + args.option = option args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() @@ -468,24 +471,22 @@ class Client(Iface): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "getConfigValue failed: unknown result"); - def setConfigValue(self, category, option, value, section): + def setConfigValue(self, section, option, value): """ Parameters: - - category + - section - option - value - - section """ - self.send_setConfigValue(category, option, value, section) + self.send_setConfigValue(section, option, value) self.recv_setConfigValue() - def send_setConfigValue(self, category, option, value, section): + def send_setConfigValue(self, section, option, value): self._oprot.writeMessageBegin('setConfigValue', TMessageType.CALL, self._seqid) args = setConfigValue_args() - args.category = category + args.section = section args.option = option args.value = value - args.section = section args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() @@ -552,6 +553,36 @@ class Client(Iface): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "getPluginConfig failed: unknown result"); + def configureSection(self, section): + """ + Parameters: + - section + """ + self.send_configureSection(section) + return self.recv_configureSection() + + def send_configureSection(self, section): + self._oprot.writeMessageBegin('configureSection', TMessageType.CALL, self._seqid) + args = configureSection_args() + args.section = section + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_configureSection(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = configureSection_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "configureSection failed: unknown result"); + def pauseServer(self, ): self.send_pauseServer() self.recv_pauseServer() @@ -2427,6 +2458,7 @@ class Processor(Iface, TProcessor): self._processMap["setConfigValue"] = Processor.process_setConfigValue self._processMap["getConfig"] = Processor.process_getConfig self._processMap["getPluginConfig"] = Processor.process_getPluginConfig + self._processMap["configureSection"] = Processor.process_configureSection self._processMap["pauseServer"] = Processor.process_pauseServer self._processMap["unpauseServer"] = Processor.process_unpauseServer self._processMap["togglePause"] = Processor.process_togglePause @@ -2514,7 +2546,7 @@ class Processor(Iface, TProcessor): args.read(iprot) iprot.readMessageEnd() result = getConfigValue_result() - result.success = self._handler.getConfigValue(args.category, args.option, args.section) + result.success = self._handler.getConfigValue(args.section, args.option) oprot.writeMessageBegin("getConfigValue", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -2525,7 +2557,7 @@ class Processor(Iface, TProcessor): args.read(iprot) iprot.readMessageEnd() result = setConfigValue_result() - self._handler.setConfigValue(args.category, args.option, args.value, args.section) + self._handler.setConfigValue(args.section, args.option, args.value) oprot.writeMessageBegin("setConfigValue", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -2553,6 +2585,17 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() + def process_configureSection(self, seqid, iprot, oprot): + args = configureSection_args() + args.read(iprot) + iprot.readMessageEnd() + result = configureSection_result() + result.success = self._handler.configureSection(args.section) + oprot.writeMessageBegin("configureSection", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_pauseServer(self, seqid, iprot, oprot): args = pauseServer_args() args.read(iprot) @@ -3302,28 +3345,24 @@ class Processor(Iface, TProcessor): class getConfigValue_args(TBase): """ Attributes: - - category - - option - section + - option """ __slots__ = [ - 'category', - 'option', 'section', + 'option', ] thrift_spec = ( None, # 0 - (1, TType.STRING, 'category', None, None, ), # 1 + (1, TType.STRING, 'section', None, None, ), # 1 (2, TType.STRING, 'option', None, None, ), # 2 - (3, TType.STRING, 'section', None, None, ), # 3 ) - def __init__(self, category=None, option=None, section=None,): - self.category = category - self.option = option + def __init__(self, section=None, option=None,): self.section = section + self.option = option class getConfigValue_result(TBase): @@ -3347,32 +3386,28 @@ class getConfigValue_result(TBase): class setConfigValue_args(TBase): """ Attributes: - - category + - section - option - value - - section """ __slots__ = [ - 'category', + 'section', 'option', 'value', - 'section', ] thrift_spec = ( None, # 0 - (1, TType.STRING, 'category', None, None, ), # 1 + (1, TType.STRING, 'section', None, None, ), # 1 (2, TType.STRING, 'option', None, None, ), # 2 (3, TType.STRING, 'value', None, None, ), # 3 - (4, TType.STRING, 'section', None, None, ), # 4 ) - def __init__(self, category=None, option=None, value=None, section=None,): - self.category = category + def __init__(self, section=None, option=None, value=None,): + self.section = section self.option = option self.value = value - self.section = section class setConfigValue_result(TBase): @@ -3438,6 +3473,43 @@ class getPluginConfig_result(TBase): self.success = success +class configureSection_args(TBase): + """ + Attributes: + - section + """ + + __slots__ = [ + 'section', + ] + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'section', None, None, ), # 1 + ) + + def __init__(self, section=None,): + self.section = section + + +class configureSection_result(TBase): + """ + Attributes: + - success + """ + + __slots__ = [ + 'success', + ] + + thrift_spec = ( + (0, TType.STRUCT, 'success', (ConfigSection, ConfigSection.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + class pauseServer_args(TBase): __slots__ = [ diff --git a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py index 1299b515d..3ccca992b 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py +++ b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py @@ -270,68 +270,6 @@ class ServerStatus(TBase): self.reconnect = reconnect -class ConfigItem(TBase): - """ - Attributes: - - name - - description - - value - - type - """ - - __slots__ = [ - 'name', - 'description', - 'value', - 'type', - ] - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'description', None, None, ), # 2 - (3, TType.STRING, 'value', None, None, ), # 3 - (4, TType.STRING, 'type', None, None, ), # 4 - ) - - def __init__(self, name=None, description=None, value=None, type=None,): - self.name = name - self.description = description - self.value = value - self.type = type - - -class ConfigSection(TBase): - """ - Attributes: - - name - - description - - items - - outline - """ - - __slots__ = [ - 'name', - 'description', - 'items', - 'outline', - ] - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'description', None, None, ), # 2 - (3, TType.LIST, 'items', (TType.STRUCT,(ConfigItem, ConfigItem.thrift_spec)), None, ), # 3 - (4, TType.STRING, 'outline', None, None, ), # 4 - ) - - def __init__(self, name=None, description=None, items=None, outline=None,): - self.name = name - self.description = description - self.items = items - self.outline = outline - - class FileData(TBase): """ Attributes: @@ -509,6 +447,84 @@ class InteractionTask(TBase): self.plugin = plugin +class ConfigItem(TBase): + """ + Attributes: + - name + - long_name + - description + - type + - default_value + - value + """ + + __slots__ = [ + 'name', + 'long_name', + 'description', + 'type', + 'default_value', + 'value', + ] + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'long_name', None, None, ), # 2 + (3, TType.STRING, 'description', None, None, ), # 3 + (4, TType.STRING, 'type', None, None, ), # 4 + (5, TType.STRING, 'default_value', None, None, ), # 5 + (6, TType.STRING, 'value', None, None, ), # 6 + ) + + def __init__(self, name=None, long_name=None, description=None, type=None, default_value=None, value=None,): + self.name = name + self.long_name = long_name + self.description = description + self.type = type + self.default_value = default_value + self.value = value + + +class ConfigSection(TBase): + """ + Attributes: + - name + - long_name + - description + - long_description + - items + - handler + """ + + __slots__ = [ + 'name', + 'long_name', + 'description', + 'long_description', + 'items', + 'handler', + ] + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'long_name', None, None, ), # 2 + (3, TType.STRING, 'description', None, None, ), # 3 + (4, TType.STRING, 'long_description', None, None, ), # 4 + (5, TType.LIST, 'items', (TType.STRUCT,(ConfigItem, ConfigItem.thrift_spec)), None, ), # 5 + (6, TType.MAP, 'handler', (TType.STRING,None,TType.STRUCT,(InteractionTask, InteractionTask.thrift_spec)), None, ), # 6 + ) + + def __init__(self, name=None, long_name=None, description=None, long_description=None, items=None, handler=None,): + self.name = name + self.long_name = long_name + self.description = description + self.long_description = long_description + self.items = items + self.handler = handler + + class CaptchaTask(TBase): """ Attributes: -- cgit v1.2.3 From 958bf611f5d9d117f19f824990ec6fd6b537e967 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 22 Dec 2011 23:45:38 +0100 Subject: accountmanager v2, delete your accounts.conf and re-enter them in pyload, new nice debug functions, try core.shell() and core.breakpoint() --- .../thriftbackend/thriftgen/pyload/ttypes.py | 72 ++++++++-------------- 1 file changed, 27 insertions(+), 45 deletions(-) (limited to 'module/remote/thriftbackend/thriftgen') diff --git a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py index 3ccca992b..1925029ed 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py +++ b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py @@ -78,20 +78,6 @@ class Destination(TBase): "Queue": 1, } -class ElementType(TBase): - Package = 0 - File = 1 - - _VALUES_TO_NAMES = { - 0: "Package", - 1: "File", - } - - _NAMES_TO_VALUES = { - "Package": 0, - "File": 1, - } - class Input(TBase): NONE = 0 TEXT = 1 @@ -560,31 +546,23 @@ class EventInfo(TBase): """ Attributes: - eventname - - id - - type - - destination + - event_args """ __slots__ = [ 'eventname', - 'id', - 'type', - 'destination', + 'event_args', ] thrift_spec = ( None, # 0 (1, TType.STRING, 'eventname', None, None, ), # 1 - (2, TType.I32, 'id', None, None, ), # 2 - (3, TType.I32, 'type', None, None, ), # 3 - (4, TType.I32, 'destination', None, None, ), # 4 + (2, TType.LIST, 'event_args', (TType.STRING,None), None, ), # 2 ) - def __init__(self, eventname=None, id=None, type=None, destination=None,): + def __init__(self, eventname=None, event_args=None,): self.eventname = eventname - self.id = id - self.type = type - self.destination = destination + self.event_args = event_args class UserData(TBase): @@ -625,48 +603,52 @@ class UserData(TBase): class AccountInfo(TBase): """ Attributes: - - validuntil - - login - - options + - plugin + - loginname - valid + - validuntil - trafficleft - maxtraffic - premium - - type + - activated + - options """ __slots__ = [ - 'validuntil', - 'login', - 'options', + 'plugin', + 'loginname', 'valid', + 'validuntil', 'trafficleft', 'maxtraffic', 'premium', - 'type', + 'activated', + 'options', ] thrift_spec = ( None, # 0 - (1, TType.I64, 'validuntil', None, None, ), # 1 - (2, TType.STRING, 'login', None, None, ), # 2 - (3, TType.MAP, 'options', (TType.STRING,None,TType.LIST,(TType.STRING,None)), None, ), # 3 - (4, TType.BOOL, 'valid', None, None, ), # 4 + (1, TType.STRING, 'plugin', None, None, ), # 1 + (2, TType.STRING, 'loginname', None, None, ), # 2 + (3, TType.BOOL, 'valid', None, None, ), # 3 + (4, TType.I64, 'validuntil', None, None, ), # 4 (5, TType.I64, 'trafficleft', None, None, ), # 5 (6, TType.I64, 'maxtraffic', None, None, ), # 6 (7, TType.BOOL, 'premium', None, None, ), # 7 - (8, TType.STRING, 'type', None, None, ), # 8 + (8, TType.BOOL, 'activated', None, None, ), # 8 + (9, TType.MAP, 'options', (TType.STRING,None,TType.LIST,(TType.STRING,None)), None, ), # 9 ) - def __init__(self, validuntil=None, login=None, options=None, valid=None, trafficleft=None, maxtraffic=None, premium=None, type=None,): - self.validuntil = validuntil - self.login = login - self.options = options + def __init__(self, plugin=None, loginname=None, valid=None, validuntil=None, trafficleft=None, maxtraffic=None, premium=None, activated=None, options=None,): + self.plugin = plugin + self.loginname = loginname self.valid = valid + self.validuntil = validuntil self.trafficleft = trafficleft self.maxtraffic = maxtraffic self.premium = premium - self.type = type + self.activated = activated + self.options = options class ServiceCall(TBase): -- cgit v1.2.3 From d35c003cc53d4723d1dfe0d81eeb9bea78cee594 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 31 Dec 2011 16:01:24 +0100 Subject: new crypter plugin API, now decrypting possible for now. --- .../thriftbackend/thriftgen/pyload/Pyload-remote | 8 +++--- .../thriftbackend/thriftgen/pyload/Pyload.py | 32 ++++++++++++++++------ 2 files changed, 28 insertions(+), 12 deletions(-) (limited to 'module/remote/thriftbackend/thriftgen') diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote index f8bcc2863..6ee40092d 100755 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote @@ -57,7 +57,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' getPackageOrder(Destination destination)' print ' getFileOrder(PackageID pid)' print ' generateAndAddPackages(LinkList links, Destination dest)' - print ' PackageID addPackage(string name, LinkList links, Destination dest)' + print ' PackageID addPackage(string name, LinkList links, Destination dest, string password)' print ' void addFiles(PackageID pid, LinkList links)' print ' void uploadContainer(string filename, string data)' print ' void deleteFiles( fids)' @@ -350,10 +350,10 @@ elif cmd == 'generateAndAddPackages': pp.pprint(client.generateAndAddPackages(eval(args[0]),eval(args[1]),)) elif cmd == 'addPackage': - if len(args) != 3: - print 'addPackage requires 3 args' + if len(args) != 4: + print 'addPackage requires 4 args' sys.exit(1) - pp.pprint(client.addPackage(args[0],eval(args[1]),eval(args[2]),)) + pp.pprint(client.addPackage(args[0],eval(args[1]),eval(args[2]),args[3],)) elif cmd == 'addFiles': if len(args) != 2: diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py index 1e2f78b66..3328fb3fc 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py @@ -186,12 +186,13 @@ class Iface(object): """ pass - def addPackage(self, name, links, dest): + def addPackage(self, name, links, dest, password): """ Parameters: - name - links - dest + - password """ pass @@ -1379,22 +1380,24 @@ class Client(Iface): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "generateAndAddPackages failed: unknown result"); - def addPackage(self, name, links, dest): + def addPackage(self, name, links, dest, password): """ Parameters: - name - links - dest + - password """ - self.send_addPackage(name, links, dest) + self.send_addPackage(name, links, dest, password) return self.recv_addPackage() - def send_addPackage(self, name, links, dest): + def send_addPackage(self, name, links, dest, password): self._oprot.writeMessageBegin('addPackage', TMessageType.CALL, self._seqid) args = addPackage_args() args.name = name args.links = links args.dest = dest + args.password = password args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() @@ -2161,6 +2164,8 @@ class Client(Iface): self._iprot.readMessageEnd() if result.success is not None: return result.success + if result.ex is not None: + raise result.ex raise TApplicationException(TApplicationException.MISSING_RESULT, "getUserData failed: unknown result"); def getAllUserData(self, ): @@ -2929,7 +2934,7 @@ class Processor(Iface, TProcessor): args.read(iprot) iprot.readMessageEnd() result = addPackage_result() - result.success = self._handler.addPackage(args.name, args.links, args.dest) + result.success = self._handler.addPackage(args.name, args.links, args.dest, args.password) oprot.writeMessageBegin("addPackage", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3218,7 +3223,10 @@ class Processor(Iface, TProcessor): args.read(iprot) iprot.readMessageEnd() result = getUserData_result() - result.success = self._handler.getUserData(args.username, args.password) + try: + result.success = self._handler.getUserData(args.username, args.password) + except UserDoesNotExists, ex: + result.ex = ex oprot.writeMessageBegin("getUserData", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4421,12 +4429,14 @@ class addPackage_args(TBase): - name - links - dest + - password """ __slots__ = [ 'name', 'links', 'dest', + 'password', ] thrift_spec = ( @@ -4434,12 +4444,14 @@ class addPackage_args(TBase): (1, TType.STRING, 'name', None, None, ), # 1 (2, TType.LIST, 'links', (TType.STRING,None), None, ), # 2 (3, TType.I32, 'dest', None, None, ), # 3 + (4, TType.STRING, 'password', None, None, ), # 4 ) - def __init__(self, name=None, links=None, dest=None,): + def __init__(self, name=None, links=None, dest=None, password=None,): self.name = name self.links = links self.dest = dest + self.password = password class addPackage_result(TBase): @@ -5254,18 +5266,22 @@ class getUserData_result(TBase): """ Attributes: - success + - ex """ __slots__ = [ 'success', + 'ex', ] thrift_spec = ( (0, TType.STRUCT, 'success', (UserData, UserData.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'ex', (UserDoesNotExists, UserDoesNotExists.thrift_spec), None, ), # 1 ) - def __init__(self, success=None,): + def __init__(self, success=None, ex=None,): self.success = success + self.ex = ex class getAllUserData_args(TBase): -- cgit v1.2.3 From 2c85a16762dc2518d0b9736370844d657e8a790d Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 31 Dec 2011 16:03:10 +0100 Subject: missing file --- .../thriftbackend/thriftgen/pyload/ttypes.py | 30 +++++++++++++++++----- 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'module/remote/thriftbackend/thriftgen') diff --git a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py index 1925029ed..b2da9748d 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py +++ b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py @@ -657,29 +657,25 @@ class ServiceCall(TBase): - plugin - func - arguments - - parseArguments """ __slots__ = [ 'plugin', 'func', 'arguments', - 'parseArguments', ] thrift_spec = ( None, # 0 (1, TType.STRING, 'plugin', None, None, ), # 1 (2, TType.STRING, 'func', None, None, ), # 2 - (3, TType.LIST, 'arguments', (TType.STRING,None), None, ), # 3 - (4, TType.BOOL, 'parseArguments', None, None, ), # 4 + (3, TType.STRING, 'arguments', None, None, ), # 3 ) - def __init__(self, plugin=None, func=None, arguments=None, parseArguments=None,): + def __init__(self, plugin=None, func=None, arguments=None,): self.plugin = plugin self.func = func self.arguments = arguments - self.parseArguments = parseArguments class OnlineStatus(TBase): @@ -784,6 +780,28 @@ class FileDoesNotExists(TExceptionBase): return repr(self) +class UserDoesNotExists(TExceptionBase): + """ + Attributes: + - user + """ + + __slots__ = [ + 'user', + ] + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'user', None, None, ), # 1 + ) + + def __init__(self, user=None,): + self.user = user + + def __str__(self): + return repr(self) + + class ServiceDoesNotExists(TExceptionBase): """ Attributes: -- cgit v1.2.3 From 9f37b59862e4ee5fb593fa65c62ca70a328b5816 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 31 Dec 2011 16:04:14 +0100 Subject: missing import --- module/remote/thriftbackend/thriftgen/pyload/Pyload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/remote/thriftbackend/thriftgen') diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py index 3328fb3fc..3e0fe3bbc 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py @@ -9,7 +9,7 @@ from thrift.Thrift import TType, TMessageType, TException from ttypes import * from thrift.Thrift import TProcessor -from thrift.protocol.TBase import TBase, TExceptionBase +from thrift.protocol.TBase import TBase, TExceptionBase, TApplicationException class Iface(object): -- cgit v1.2.3 From 4df2b77fdf42046fe19bd371be7c7255986b5980 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 6 Mar 2012 13:36:39 +0100 Subject: renamed hooks to addons, new filemanager and database, many new api methods you will loose ALL your LINKS, webinterface will NOT work --- .../thriftbackend/thriftgen/pyload/Pyload-remote | 448 +- .../thriftbackend/thriftgen/pyload/Pyload.py | 5663 ++++++++++++-------- .../thriftbackend/thriftgen/pyload/ttypes.py | 667 ++- 3 files changed, 4138 insertions(+), 2640 deletions(-) (limited to 'module/remote/thriftbackend/thriftgen') diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote index 6ee40092d..6f0c09182 100755 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote @@ -23,60 +23,76 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print 'Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] function [arg1 [arg2...]]' print '' print 'Functions:' - print ' string getConfigValue(string section, string option)' - print ' void setConfigValue(string section, string option, string value)' - print ' getConfig()' - print ' getPluginConfig()' - print ' ConfigSection configureSection(string section)' + print ' string getServerVersion()' + print ' ServerStatus statusServer()' print ' void pauseServer()' print ' void unpauseServer()' print ' bool togglePause()' - print ' ServerStatus statusServer()' - print ' i64 freeSpace()' - print ' string getServerVersion()' + print ' ByteCount freeSpace()' print ' void kill()' print ' void restart()' print ' getLog(i32 offset)' print ' bool isTimeDownload()' print ' bool isTimeReconnect()' print ' bool toggleReconnect()' - print ' generatePackages(LinkList links)' + print ' void scanDownloadFolder()' + print ' getProgressInfo()' + print ' string getConfigValue(string section, string option)' + print ' void setConfigValue(string section, string option, string value)' + print ' getConfig()' + print ' getPluginConfig()' + print ' ConfigSection configureSection(string section)' + print ' void setConfigHandler(PluginName plugin, InteractionID iid, ValueString value)' print ' checkURLs(LinkList urls)' print ' parseURLs(string html, string url)' print ' OnlineCheck checkOnlineStatus(LinkList urls)' print ' OnlineCheck checkOnlineStatusContainer(LinkList urls, string filename, string data)' print ' OnlineCheck pollResults(ResultID rid)' - print ' statusDownloads()' - print ' PackageData getPackageData(PackageID pid)' - print ' PackageData getPackageInfo(PackageID pid)' - print ' FileData getFileData(FileID fid)' - print ' getQueue()' - print ' getCollector()' - print ' getQueueData()' - print ' getCollectorData()' - print ' getPackageOrder(Destination destination)' - print ' getFileOrder(PackageID pid)' - print ' generateAndAddPackages(LinkList links, Destination dest)' - print ' PackageID addPackage(string name, LinkList links, Destination dest, string password)' - print ' void addFiles(PackageID pid, LinkList links)' - print ' void uploadContainer(string filename, string data)' + print ' generatePackages(LinkList links)' + print ' generateAndAddPackages(LinkList links, bool paused)' + print ' autoAddLinks(LinkList links)' + print ' PackageID createPackage(string name, string folder, PackageID root, string password, string site, string comment, bool paused)' + print ' PackageID addPackage(string name, LinkList links, string password)' + print ' PackageID addPackageP(string name, LinkList links, string password, bool paused)' + print ' PackageID addPackageChild(string name, LinkList links, string password, PackageID root, bool paused)' + print ' PackageID uploadContainer(string filename, string data)' + print ' void addLinks(PackageID pid, LinkList links)' print ' void deleteFiles( fids)' print ' void deletePackages( pids)' - print ' void pushToQueue(PackageID pid)' - print ' void pullFromQueue(PackageID pid)' + print ' getCollector()' + print ' void addToCollector(LinkList links)' + print ' PackageID addFromCollector(string name, bool paused)' + print ' void renameCollPack(string name, string new_name)' + print ' void deleteCollPack(string name)' + print ' void deleteCollLink(string url)' + print ' PackageView getAllFiles()' + print ' PackageView getAllUnfinishedFiles()' + print ' PackageView getFileTree(PackageID pid, bool full)' + print ' PackageView getUnfinishedFileTree(PackageID pid, bool full)' + print ' PackageView getPackageContent(PackageID pid)' + print ' PackageInfo getPackageInfo(PackageID pid)' + print ' FileInfo getFileInfo(FileID fid)' + print ' findFiles(string pattern)' print ' void restartPackage(PackageID pid)' print ' void restartFile(FileID fid)' print ' void recheckPackage(PackageID pid)' - print ' void stopAllDownloads()' print ' void stopDownloads( fids)' - print ' void setPackageName(PackageID pid, string name)' - print ' void movePackage(Destination destination, PackageID pid)' - print ' void moveFiles( fids, PackageID pid)' - print ' void orderPackage(PackageID pid, i16 position)' - print ' void orderFile(FileID fid, i16 position)' - print ' void setPackageData(PackageID pid, data)' - print ' deleteFinished()' + print ' void stopAllDownloads()' print ' void restartFailed()' + print ' void setFilePaused(FileID fid, bool paused)' + print ' void setPackagePaused(PackageID pid, bool paused)' + print ' bool setPackageFolder(PackageID pid, string path)' + print ' void setPackageData(PackageID pid, data)' + print ' bool movePackage(PackageID pid, PackageID root)' + print ' bool moveFiles( fids, PackageID pid)' + print ' void orderPackage( pids, i16 position)' + print ' void orderFiles( fids, PackageID pid, i16 position)' + print ' bool isInteractionWaiting(i16 mode)' + print ' InteractionTask getInteractionTask(i16 mode)' + print ' void setInteractionResult(InteractionID iid, ValueString result)' + print ' string generateDownloadLink(FileID fid, i16 timeout)' + print ' getAddonHandler()' + print ' void callAddonHandler(PluginName plugin, string func, PackageID pid_or_fid)' print ' getEvents(string uuid)' print ' getAccounts(bool refresh)' print ' getAccountTypes()' @@ -87,13 +103,9 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' getAllUserData()' print ' getServices()' print ' bool hasService(PluginName plugin, string func)' - print ' string call(ServiceCall info)' + print ' string call(PluginName plugin, string func, string arguments)' print ' getAllInfo()' print ' getInfoByPlugin(PluginName plugin)' - print ' bool isCaptchaWaiting()' - print ' CaptchaTask getCaptchaTask(bool exclusive)' - print ' string getCaptchaTaskStatus(TaskID tid)' - print ' void setCaptchaResult(TaskID tid, string result)' print '' sys.exit(0) @@ -145,35 +157,17 @@ protocol = TBinaryProtocol.TBinaryProtocol(transport) client = Pyload.Client(protocol) transport.open() -if cmd == 'getConfigValue': - if len(args) != 2: - print 'getConfigValue requires 2 args' - sys.exit(1) - pp.pprint(client.getConfigValue(args[0],args[1],)) - -elif cmd == 'setConfigValue': - if len(args) != 3: - print 'setConfigValue requires 3 args' - sys.exit(1) - pp.pprint(client.setConfigValue(args[0],args[1],args[2],)) - -elif cmd == 'getConfig': +if cmd == 'getServerVersion': if len(args) != 0: - print 'getConfig requires 0 args' + print 'getServerVersion requires 0 args' sys.exit(1) - pp.pprint(client.getConfig()) + pp.pprint(client.getServerVersion()) -elif cmd == 'getPluginConfig': +elif cmd == 'statusServer': if len(args) != 0: - print 'getPluginConfig requires 0 args' - sys.exit(1) - pp.pprint(client.getPluginConfig()) - -elif cmd == 'configureSection': - if len(args) != 1: - print 'configureSection requires 1 args' + print 'statusServer requires 0 args' sys.exit(1) - pp.pprint(client.configureSection(args[0],)) + pp.pprint(client.statusServer()) elif cmd == 'pauseServer': if len(args) != 0: @@ -193,24 +187,12 @@ elif cmd == 'togglePause': sys.exit(1) pp.pprint(client.togglePause()) -elif cmd == 'statusServer': - if len(args) != 0: - print 'statusServer requires 0 args' - sys.exit(1) - pp.pprint(client.statusServer()) - elif cmd == 'freeSpace': if len(args) != 0: print 'freeSpace requires 0 args' sys.exit(1) pp.pprint(client.freeSpace()) -elif cmd == 'getServerVersion': - if len(args) != 0: - print 'getServerVersion requires 0 args' - sys.exit(1) - pp.pprint(client.getServerVersion()) - elif cmd == 'kill': if len(args) != 0: print 'kill requires 0 args' @@ -247,11 +229,53 @@ elif cmd == 'toggleReconnect': sys.exit(1) pp.pprint(client.toggleReconnect()) -elif cmd == 'generatePackages': +elif cmd == 'scanDownloadFolder': + if len(args) != 0: + print 'scanDownloadFolder requires 0 args' + sys.exit(1) + pp.pprint(client.scanDownloadFolder()) + +elif cmd == 'getProgressInfo': + if len(args) != 0: + print 'getProgressInfo requires 0 args' + sys.exit(1) + pp.pprint(client.getProgressInfo()) + +elif cmd == 'getConfigValue': + if len(args) != 2: + print 'getConfigValue requires 2 args' + sys.exit(1) + pp.pprint(client.getConfigValue(args[0],args[1],)) + +elif cmd == 'setConfigValue': + if len(args) != 3: + print 'setConfigValue requires 3 args' + sys.exit(1) + pp.pprint(client.setConfigValue(args[0],args[1],args[2],)) + +elif cmd == 'getConfig': + if len(args) != 0: + print 'getConfig requires 0 args' + sys.exit(1) + pp.pprint(client.getConfig()) + +elif cmd == 'getPluginConfig': + if len(args) != 0: + print 'getPluginConfig requires 0 args' + sys.exit(1) + pp.pprint(client.getPluginConfig()) + +elif cmd == 'configureSection': if len(args) != 1: - print 'generatePackages requires 1 args' + print 'configureSection requires 1 args' sys.exit(1) - pp.pprint(client.generatePackages(eval(args[0]),)) + pp.pprint(client.configureSection(args[0],)) + +elif cmd == 'setConfigHandler': + if len(args) != 3: + print 'setConfigHandler requires 3 args' + sys.exit(1) + pp.pprint(client.setConfigHandler(eval(args[0]),eval(args[1]),eval(args[2]),)) elif cmd == 'checkURLs': if len(args) != 1: @@ -283,35 +307,71 @@ elif cmd == 'pollResults': sys.exit(1) pp.pprint(client.pollResults(eval(args[0]),)) -elif cmd == 'statusDownloads': - if len(args) != 0: - print 'statusDownloads requires 0 args' +elif cmd == 'generatePackages': + if len(args) != 1: + print 'generatePackages requires 1 args' sys.exit(1) - pp.pprint(client.statusDownloads()) + pp.pprint(client.generatePackages(eval(args[0]),)) -elif cmd == 'getPackageData': - if len(args) != 1: - print 'getPackageData requires 1 args' +elif cmd == 'generateAndAddPackages': + if len(args) != 2: + print 'generateAndAddPackages requires 2 args' sys.exit(1) - pp.pprint(client.getPackageData(eval(args[0]),)) + pp.pprint(client.generateAndAddPackages(eval(args[0]),eval(args[1]),)) -elif cmd == 'getPackageInfo': +elif cmd == 'autoAddLinks': if len(args) != 1: - print 'getPackageInfo requires 1 args' + print 'autoAddLinks requires 1 args' sys.exit(1) - pp.pprint(client.getPackageInfo(eval(args[0]),)) + pp.pprint(client.autoAddLinks(eval(args[0]),)) -elif cmd == 'getFileData': +elif cmd == 'createPackage': + if len(args) != 7: + print 'createPackage requires 7 args' + sys.exit(1) + pp.pprint(client.createPackage(args[0],args[1],eval(args[2]),args[3],args[4],args[5],eval(args[6]),)) + +elif cmd == 'addPackage': + if len(args) != 3: + print 'addPackage requires 3 args' + sys.exit(1) + pp.pprint(client.addPackage(args[0],eval(args[1]),args[2],)) + +elif cmd == 'addPackageP': + if len(args) != 4: + print 'addPackageP requires 4 args' + sys.exit(1) + pp.pprint(client.addPackageP(args[0],eval(args[1]),args[2],eval(args[3]),)) + +elif cmd == 'addPackageChild': + if len(args) != 5: + print 'addPackageChild requires 5 args' + sys.exit(1) + pp.pprint(client.addPackageChild(args[0],eval(args[1]),args[2],eval(args[3]),eval(args[4]),)) + +elif cmd == 'uploadContainer': + if len(args) != 2: + print 'uploadContainer requires 2 args' + sys.exit(1) + pp.pprint(client.uploadContainer(args[0],args[1],)) + +elif cmd == 'addLinks': + if len(args) != 2: + print 'addLinks requires 2 args' + sys.exit(1) + pp.pprint(client.addLinks(eval(args[0]),eval(args[1]),)) + +elif cmd == 'deleteFiles': if len(args) != 1: - print 'getFileData requires 1 args' + print 'deleteFiles requires 1 args' sys.exit(1) - pp.pprint(client.getFileData(eval(args[0]),)) + pp.pprint(client.deleteFiles(eval(args[0]),)) -elif cmd == 'getQueue': - if len(args) != 0: - print 'getQueue requires 0 args' +elif cmd == 'deletePackages': + if len(args) != 1: + print 'deletePackages requires 1 args' sys.exit(1) - pp.pprint(client.getQueue()) + pp.pprint(client.deletePackages(eval(args[0]),)) elif cmd == 'getCollector': if len(args) != 0: @@ -319,77 +379,83 @@ elif cmd == 'getCollector': sys.exit(1) pp.pprint(client.getCollector()) -elif cmd == 'getQueueData': - if len(args) != 0: - print 'getQueueData requires 0 args' +elif cmd == 'addToCollector': + if len(args) != 1: + print 'addToCollector requires 1 args' sys.exit(1) - pp.pprint(client.getQueueData()) + pp.pprint(client.addToCollector(eval(args[0]),)) -elif cmd == 'getCollectorData': - if len(args) != 0: - print 'getCollectorData requires 0 args' +elif cmd == 'addFromCollector': + if len(args) != 2: + print 'addFromCollector requires 2 args' + sys.exit(1) + pp.pprint(client.addFromCollector(args[0],eval(args[1]),)) + +elif cmd == 'renameCollPack': + if len(args) != 2: + print 'renameCollPack requires 2 args' sys.exit(1) - pp.pprint(client.getCollectorData()) + pp.pprint(client.renameCollPack(args[0],args[1],)) -elif cmd == 'getPackageOrder': +elif cmd == 'deleteCollPack': if len(args) != 1: - print 'getPackageOrder requires 1 args' + print 'deleteCollPack requires 1 args' sys.exit(1) - pp.pprint(client.getPackageOrder(eval(args[0]),)) + pp.pprint(client.deleteCollPack(args[0],)) -elif cmd == 'getFileOrder': +elif cmd == 'deleteCollLink': if len(args) != 1: - print 'getFileOrder requires 1 args' + print 'deleteCollLink requires 1 args' sys.exit(1) - pp.pprint(client.getFileOrder(eval(args[0]),)) + pp.pprint(client.deleteCollLink(args[0],)) -elif cmd == 'generateAndAddPackages': - if len(args) != 2: - print 'generateAndAddPackages requires 2 args' +elif cmd == 'getAllFiles': + if len(args) != 0: + print 'getAllFiles requires 0 args' sys.exit(1) - pp.pprint(client.generateAndAddPackages(eval(args[0]),eval(args[1]),)) + pp.pprint(client.getAllFiles()) -elif cmd == 'addPackage': - if len(args) != 4: - print 'addPackage requires 4 args' +elif cmd == 'getAllUnfinishedFiles': + if len(args) != 0: + print 'getAllUnfinishedFiles requires 0 args' sys.exit(1) - pp.pprint(client.addPackage(args[0],eval(args[1]),eval(args[2]),args[3],)) + pp.pprint(client.getAllUnfinishedFiles()) -elif cmd == 'addFiles': +elif cmd == 'getFileTree': if len(args) != 2: - print 'addFiles requires 2 args' + print 'getFileTree requires 2 args' sys.exit(1) - pp.pprint(client.addFiles(eval(args[0]),eval(args[1]),)) + pp.pprint(client.getFileTree(eval(args[0]),eval(args[1]),)) -elif cmd == 'uploadContainer': +elif cmd == 'getUnfinishedFileTree': if len(args) != 2: - print 'uploadContainer requires 2 args' + print 'getUnfinishedFileTree requires 2 args' sys.exit(1) - pp.pprint(client.uploadContainer(args[0],args[1],)) + pp.pprint(client.getUnfinishedFileTree(eval(args[0]),eval(args[1]),)) -elif cmd == 'deleteFiles': +elif cmd == 'getPackageContent': if len(args) != 1: - print 'deleteFiles requires 1 args' + print 'getPackageContent requires 1 args' sys.exit(1) - pp.pprint(client.deleteFiles(eval(args[0]),)) + pp.pprint(client.getPackageContent(eval(args[0]),)) -elif cmd == 'deletePackages': +elif cmd == 'getPackageInfo': if len(args) != 1: - print 'deletePackages requires 1 args' + print 'getPackageInfo requires 1 args' sys.exit(1) - pp.pprint(client.deletePackages(eval(args[0]),)) + pp.pprint(client.getPackageInfo(eval(args[0]),)) -elif cmd == 'pushToQueue': +elif cmd == 'getFileInfo': if len(args) != 1: - print 'pushToQueue requires 1 args' + print 'getFileInfo requires 1 args' sys.exit(1) - pp.pprint(client.pushToQueue(eval(args[0]),)) + pp.pprint(client.getFileInfo(eval(args[0]),)) -elif cmd == 'pullFromQueue': +elif cmd == 'findFiles': if len(args) != 1: - print 'pullFromQueue requires 1 args' + print 'findFiles requires 1 args' sys.exit(1) - pp.pprint(client.pullFromQueue(eval(args[0]),)) + pp.pprint(client.findFiles(args[0],)) elif cmd == 'restartPackage': if len(args) != 1: @@ -409,23 +475,47 @@ elif cmd == 'recheckPackage': sys.exit(1) pp.pprint(client.recheckPackage(eval(args[0]),)) +elif cmd == 'stopDownloads': + if len(args) != 1: + print 'stopDownloads requires 1 args' + sys.exit(1) + pp.pprint(client.stopDownloads(eval(args[0]),)) + elif cmd == 'stopAllDownloads': if len(args) != 0: print 'stopAllDownloads requires 0 args' sys.exit(1) pp.pprint(client.stopAllDownloads()) -elif cmd == 'stopDownloads': - if len(args) != 1: - print 'stopDownloads requires 1 args' +elif cmd == 'restartFailed': + if len(args) != 0: + print 'restartFailed requires 0 args' sys.exit(1) - pp.pprint(client.stopDownloads(eval(args[0]),)) + pp.pprint(client.restartFailed()) + +elif cmd == 'setFilePaused': + if len(args) != 2: + print 'setFilePaused requires 2 args' + sys.exit(1) + pp.pprint(client.setFilePaused(eval(args[0]),eval(args[1]),)) + +elif cmd == 'setPackagePaused': + if len(args) != 2: + print 'setPackagePaused requires 2 args' + sys.exit(1) + pp.pprint(client.setPackagePaused(eval(args[0]),eval(args[1]),)) + +elif cmd == 'setPackageFolder': + if len(args) != 2: + print 'setPackageFolder requires 2 args' + sys.exit(1) + pp.pprint(client.setPackageFolder(eval(args[0]),args[1],)) -elif cmd == 'setPackageName': +elif cmd == 'setPackageData': if len(args) != 2: - print 'setPackageName requires 2 args' + print 'setPackageData requires 2 args' sys.exit(1) - pp.pprint(client.setPackageName(eval(args[0]),args[1],)) + pp.pprint(client.setPackageData(eval(args[0]),eval(args[1]),)) elif cmd == 'movePackage': if len(args) != 2: @@ -445,29 +535,47 @@ elif cmd == 'orderPackage': sys.exit(1) pp.pprint(client.orderPackage(eval(args[0]),eval(args[1]),)) -elif cmd == 'orderFile': +elif cmd == 'orderFiles': + if len(args) != 3: + print 'orderFiles requires 3 args' + sys.exit(1) + pp.pprint(client.orderFiles(eval(args[0]),eval(args[1]),eval(args[2]),)) + +elif cmd == 'isInteractionWaiting': + if len(args) != 1: + print 'isInteractionWaiting requires 1 args' + sys.exit(1) + pp.pprint(client.isInteractionWaiting(eval(args[0]),)) + +elif cmd == 'getInteractionTask': + if len(args) != 1: + print 'getInteractionTask requires 1 args' + sys.exit(1) + pp.pprint(client.getInteractionTask(eval(args[0]),)) + +elif cmd == 'setInteractionResult': if len(args) != 2: - print 'orderFile requires 2 args' + print 'setInteractionResult requires 2 args' sys.exit(1) - pp.pprint(client.orderFile(eval(args[0]),eval(args[1]),)) + pp.pprint(client.setInteractionResult(eval(args[0]),eval(args[1]),)) -elif cmd == 'setPackageData': +elif cmd == 'generateDownloadLink': if len(args) != 2: - print 'setPackageData requires 2 args' + print 'generateDownloadLink requires 2 args' sys.exit(1) - pp.pprint(client.setPackageData(eval(args[0]),eval(args[1]),)) + pp.pprint(client.generateDownloadLink(eval(args[0]),eval(args[1]),)) -elif cmd == 'deleteFinished': +elif cmd == 'getAddonHandler': if len(args) != 0: - print 'deleteFinished requires 0 args' + print 'getAddonHandler requires 0 args' sys.exit(1) - pp.pprint(client.deleteFinished()) + pp.pprint(client.getAddonHandler()) -elif cmd == 'restartFailed': - if len(args) != 0: - print 'restartFailed requires 0 args' +elif cmd == 'callAddonHandler': + if len(args) != 3: + print 'callAddonHandler requires 3 args' sys.exit(1) - pp.pprint(client.restartFailed()) + pp.pprint(client.callAddonHandler(eval(args[0]),args[1],eval(args[2]),)) elif cmd == 'getEvents': if len(args) != 1: @@ -530,10 +638,10 @@ elif cmd == 'hasService': pp.pprint(client.hasService(eval(args[0]),args[1],)) elif cmd == 'call': - if len(args) != 1: - print 'call requires 1 args' + if len(args) != 3: + print 'call requires 3 args' sys.exit(1) - pp.pprint(client.call(eval(args[0]),)) + pp.pprint(client.call(eval(args[0]),args[1],args[2],)) elif cmd == 'getAllInfo': if len(args) != 0: @@ -547,30 +655,6 @@ elif cmd == 'getInfoByPlugin': sys.exit(1) pp.pprint(client.getInfoByPlugin(eval(args[0]),)) -elif cmd == 'isCaptchaWaiting': - if len(args) != 0: - print 'isCaptchaWaiting requires 0 args' - sys.exit(1) - pp.pprint(client.isCaptchaWaiting()) - -elif cmd == 'getCaptchaTask': - if len(args) != 1: - print 'getCaptchaTask requires 1 args' - sys.exit(1) - pp.pprint(client.getCaptchaTask(eval(args[0]),)) - -elif cmd == 'getCaptchaTaskStatus': - if len(args) != 1: - print 'getCaptchaTaskStatus requires 1 args' - sys.exit(1) - pp.pprint(client.getCaptchaTaskStatus(eval(args[0]),)) - -elif cmd == 'setCaptchaResult': - if len(args) != 2: - print 'setCaptchaResult requires 2 args' - sys.exit(1) - pp.pprint(client.setCaptchaResult(eval(args[0]),args[1],)) - else: print 'Unrecognized method %s' % cmd sys.exit(1) diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py index 3e0fe3bbc..e58070a59 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py @@ -9,38 +9,14 @@ from thrift.Thrift import TType, TMessageType, TException from ttypes import * from thrift.Thrift import TProcessor -from thrift.protocol.TBase import TBase, TExceptionBase, TApplicationException +from thrift.protocol.TBase import TBase, TExceptionBase class Iface(object): - def getConfigValue(self, section, option): - """ - Parameters: - - section - - option - """ - pass - - def setConfigValue(self, section, option, value): - """ - Parameters: - - section - - option - - value - """ - pass - - def getConfig(self, ): - pass - - def getPluginConfig(self, ): + def getServerVersion(self, ): pass - def configureSection(self, section): - """ - Parameters: - - section - """ + def statusServer(self, ): pass def pauseServer(self, ): @@ -52,15 +28,9 @@ class Iface(object): def togglePause(self, ): pass - def statusServer(self, ): - pass - def freeSpace(self, ): pass - def getServerVersion(self, ): - pass - def kill(self, ): pass @@ -83,10 +53,48 @@ class Iface(object): def toggleReconnect(self, ): pass - def generatePackages(self, links): + def scanDownloadFolder(self, ): + pass + + def getProgressInfo(self, ): + pass + + def getConfigValue(self, section, option): """ Parameters: - - links + - section + - option + """ + pass + + def setConfigValue(self, section, option, value): + """ + Parameters: + - section + - option + - value + """ + pass + + def getConfig(self, ): + pass + + def getPluginConfig(self, ): + pass + + def configureSection(self, section): + """ + Parameters: + - section + """ + pass + + def setConfigHandler(self, plugin, iid, value): + """ + Parameters: + - plugin + - iid + - value """ pass @@ -128,118 +136,191 @@ class Iface(object): """ pass - def statusDownloads(self, ): + def generatePackages(self, links): + """ + Parameters: + - links + """ pass - def getPackageData(self, pid): + def generateAndAddPackages(self, links, paused): """ Parameters: - - pid + - links + - paused """ pass - def getPackageInfo(self, pid): + def autoAddLinks(self, links): """ Parameters: - - pid + - links """ pass - def getFileData(self, fid): + def createPackage(self, name, folder, root, password, site, comment, paused): """ Parameters: - - fid + - name + - folder + - root + - password + - site + - comment + - paused """ pass - def getQueue(self, ): + def addPackage(self, name, links, password): + """ + Parameters: + - name + - links + - password + """ pass - def getCollector(self, ): + def addPackageP(self, name, links, password, paused): + """ + Parameters: + - name + - links + - password + - paused + """ + pass + + def addPackageChild(self, name, links, password, root, paused): + """ + Parameters: + - name + - links + - password + - root + - paused + """ pass - def getQueueData(self, ): + def uploadContainer(self, filename, data): + """ + Parameters: + - filename + - data + """ pass - def getCollectorData(self, ): + def addLinks(self, pid, links): + """ + Parameters: + - pid + - links + """ pass - def getPackageOrder(self, destination): + def deleteFiles(self, fids): """ Parameters: - - destination + - fids """ pass - def getFileOrder(self, pid): + def deletePackages(self, pids): """ Parameters: - - pid + - pids """ pass - def generateAndAddPackages(self, links, dest): + def getCollector(self, ): + pass + + def addToCollector(self, links): """ Parameters: - links - - dest """ pass - def addPackage(self, name, links, dest, password): + def addFromCollector(self, name, paused): """ Parameters: - name - - links - - dest - - password + - paused """ pass - def addFiles(self, pid, links): + def renameCollPack(self, name, new_name): """ Parameters: - - pid - - links + - name + - new_name """ pass - def uploadContainer(self, filename, data): + def deleteCollPack(self, name): """ Parameters: - - filename - - data + - name """ pass - def deleteFiles(self, fids): + def deleteCollLink(self, url): """ Parameters: - - fids + - url """ pass - def deletePackages(self, pids): + def getAllFiles(self, ): + pass + + def getAllUnfinishedFiles(self, ): + pass + + def getFileTree(self, pid, full): """ Parameters: - - pids + - pid + - full """ pass - def pushToQueue(self, pid): + def getUnfinishedFileTree(self, pid, full): """ Parameters: - pid + - full """ pass - def pullFromQueue(self, pid): + def getPackageContent(self, pid): """ Parameters: - pid """ pass + def getPackageInfo(self, pid): + """ + Parameters: + - pid + """ + pass + + def getFileInfo(self, fid): + """ + Parameters: + - fid + """ + pass + + def findFiles(self, pattern): + """ + Parameters: + - pattern + """ + pass + def restartPackage(self, pid): """ Parameters: @@ -261,29 +342,56 @@ class Iface(object): """ pass + def stopDownloads(self, fids): + """ + Parameters: + - fids + """ + pass + def stopAllDownloads(self, ): pass - def stopDownloads(self, fids): + def restartFailed(self, ): + pass + + def setFilePaused(self, fid, paused): """ Parameters: - - fids + - fid + - paused """ pass - def setPackageName(self, pid, name): + def setPackagePaused(self, pid, paused): """ Parameters: - pid - - name + - paused """ pass - def movePackage(self, destination, pid): + def setPackageFolder(self, pid, path): """ Parameters: - - destination - pid + - path + """ + pass + + def setPackageData(self, pid, data): + """ + Parameters: + - pid + - data + """ + pass + + def movePackage(self, pid, root): + """ + Parameters: + - pid + - root """ pass @@ -295,34 +403,63 @@ class Iface(object): """ pass - def orderPackage(self, pid, position): + def orderPackage(self, pids, position): """ Parameters: - - pid + - pids - position """ pass - def orderFile(self, fid, position): + def orderFiles(self, fids, pid, position): """ Parameters: - - fid + - fids + - pid - position """ pass - def setPackageData(self, pid, data): + def isInteractionWaiting(self, mode): """ Parameters: - - pid - - data + - mode + """ + pass + + def getInteractionTask(self, mode): + """ + Parameters: + - mode """ pass - def deleteFinished(self, ): + def setInteractionResult(self, iid, result): + """ + Parameters: + - iid + - result + """ pass - def restartFailed(self, ): + def generateDownloadLink(self, fid, timeout): + """ + Parameters: + - fid + - timeout + """ + pass + + def getAddonHandler(self, ): + pass + + def callAddonHandler(self, plugin, func, pid_or_fid): + """ + Parameters: + - plugin + - func + - pid_or_fid + """ pass def getEvents(self, uuid): @@ -390,10 +527,12 @@ class Iface(object): """ pass - def call(self, info): + def call(self, plugin, func, arguments): """ Parameters: - - info + - plugin + - func + - arguments """ pass @@ -407,31 +546,6 @@ class Iface(object): """ pass - def isCaptchaWaiting(self, ): - pass - - def getCaptchaTask(self, exclusive): - """ - Parameters: - - exclusive - """ - pass - - def getCaptchaTaskStatus(self, tid): - """ - Parameters: - - tid - """ - pass - - def setCaptchaResult(self, tid, result): - """ - Parameters: - - tid - - result - """ - pass - class Client(Iface): def __init__(self, iprot, oprot=None): @@ -440,149 +554,55 @@ class Client(Iface): self._oprot = oprot self._seqid = 0 - def getConfigValue(self, section, option): - """ - Parameters: - - section - - option - """ - self.send_getConfigValue(section, option) - return self.recv_getConfigValue() + def getServerVersion(self, ): + self.send_getServerVersion() + return self.recv_getServerVersion() - def send_getConfigValue(self, section, option): - self._oprot.writeMessageBegin('getConfigValue', TMessageType.CALL, self._seqid) - args = getConfigValue_args() - args.section = section - args.option = option - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getConfigValue(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getConfigValue_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getConfigValue failed: unknown result"); - - def setConfigValue(self, section, option, value): - """ - Parameters: - - section - - option - - value - """ - self.send_setConfigValue(section, option, value) - self.recv_setConfigValue() - - def send_setConfigValue(self, section, option, value): - self._oprot.writeMessageBegin('setConfigValue', TMessageType.CALL, self._seqid) - args = setConfigValue_args() - args.section = section - args.option = option - args.value = value - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_setConfigValue(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = setConfigValue_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - return - - def getConfig(self, ): - self.send_getConfig() - return self.recv_getConfig() - - def send_getConfig(self, ): - self._oprot.writeMessageBegin('getConfig', TMessageType.CALL, self._seqid) - args = getConfig_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getConfig(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getConfig_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getConfig failed: unknown result"); - - def getPluginConfig(self, ): - self.send_getPluginConfig() - return self.recv_getPluginConfig() - - def send_getPluginConfig(self, ): - self._oprot.writeMessageBegin('getPluginConfig', TMessageType.CALL, self._seqid) - args = getPluginConfig_args() + def send_getServerVersion(self, ): + self._oprot.writeMessageBegin('getServerVersion', TMessageType.CALL, self._seqid) + args = getServerVersion_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getPluginConfig(self, ): + def recv_getServerVersion(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getPluginConfig_result() + result = getServerVersion_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getPluginConfig failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "getServerVersion failed: unknown result"); - def configureSection(self, section): - """ - Parameters: - - section - """ - self.send_configureSection(section) - return self.recv_configureSection() + def statusServer(self, ): + self.send_statusServer() + return self.recv_statusServer() - def send_configureSection(self, section): - self._oprot.writeMessageBegin('configureSection', TMessageType.CALL, self._seqid) - args = configureSection_args() - args.section = section + def send_statusServer(self, ): + self._oprot.writeMessageBegin('statusServer', TMessageType.CALL, self._seqid) + args = statusServer_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_configureSection(self, ): + def recv_statusServer(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = configureSection_result() + result = statusServer_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "configureSection failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "statusServer failed: unknown result"); def pauseServer(self, ): self.send_pauseServer() @@ -655,31 +675,6 @@ class Client(Iface): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "togglePause failed: unknown result"); - def statusServer(self, ): - self.send_statusServer() - return self.recv_statusServer() - - def send_statusServer(self, ): - self._oprot.writeMessageBegin('statusServer', TMessageType.CALL, self._seqid) - args = statusServer_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_statusServer(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = statusServer_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "statusServer failed: unknown result"); - def freeSpace(self, ): self.send_freeSpace() return self.recv_freeSpace() @@ -705,31 +700,6 @@ class Client(Iface): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "freeSpace failed: unknown result"); - def getServerVersion(self, ): - self.send_getServerVersion() - return self.recv_getServerVersion() - - def send_getServerVersion(self, ): - self._oprot.writeMessageBegin('getServerVersion', TMessageType.CALL, self._seqid) - args = getServerVersion_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getServerVersion(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getServerVersion_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getServerVersion failed: unknown result"); - def kill(self, ): self.send_kill() self.recv_kill() @@ -881,522 +851,535 @@ class Client(Iface): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "toggleReconnect failed: unknown result"); - def generatePackages(self, links): - """ - Parameters: - - links - """ - self.send_generatePackages(links) - return self.recv_generatePackages() + def scanDownloadFolder(self, ): + self.send_scanDownloadFolder() + self.recv_scanDownloadFolder() - def send_generatePackages(self, links): - self._oprot.writeMessageBegin('generatePackages', TMessageType.CALL, self._seqid) - args = generatePackages_args() - args.links = links + def send_scanDownloadFolder(self, ): + self._oprot.writeMessageBegin('scanDownloadFolder', TMessageType.CALL, self._seqid) + args = scanDownloadFolder_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_generatePackages(self, ): + def recv_scanDownloadFolder(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = generatePackages_result() + result = scanDownloadFolder_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "generatePackages failed: unknown result"); + return - def checkURLs(self, urls): - """ - Parameters: - - urls - """ - self.send_checkURLs(urls) - return self.recv_checkURLs() + def getProgressInfo(self, ): + self.send_getProgressInfo() + return self.recv_getProgressInfo() - def send_checkURLs(self, urls): - self._oprot.writeMessageBegin('checkURLs', TMessageType.CALL, self._seqid) - args = checkURLs_args() - args.urls = urls + def send_getProgressInfo(self, ): + self._oprot.writeMessageBegin('getProgressInfo', TMessageType.CALL, self._seqid) + args = getProgressInfo_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_checkURLs(self, ): + def recv_getProgressInfo(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = checkURLs_result() + result = getProgressInfo_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "checkURLs failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "getProgressInfo failed: unknown result"); - def parseURLs(self, html, url): + def getConfigValue(self, section, option): """ Parameters: - - html - - url + - section + - option """ - self.send_parseURLs(html, url) - return self.recv_parseURLs() + self.send_getConfigValue(section, option) + return self.recv_getConfigValue() - def send_parseURLs(self, html, url): - self._oprot.writeMessageBegin('parseURLs', TMessageType.CALL, self._seqid) - args = parseURLs_args() - args.html = html - args.url = url + def send_getConfigValue(self, section, option): + self._oprot.writeMessageBegin('getConfigValue', TMessageType.CALL, self._seqid) + args = getConfigValue_args() + args.section = section + args.option = option args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_parseURLs(self, ): + def recv_getConfigValue(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = parseURLs_result() + result = getConfigValue_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "parseURLs failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "getConfigValue failed: unknown result"); - def checkOnlineStatus(self, urls): + def setConfigValue(self, section, option, value): """ Parameters: - - urls + - section + - option + - value """ - self.send_checkOnlineStatus(urls) - return self.recv_checkOnlineStatus() + self.send_setConfigValue(section, option, value) + self.recv_setConfigValue() - def send_checkOnlineStatus(self, urls): - self._oprot.writeMessageBegin('checkOnlineStatus', TMessageType.CALL, self._seqid) - args = checkOnlineStatus_args() - args.urls = urls + def send_setConfigValue(self, section, option, value): + self._oprot.writeMessageBegin('setConfigValue', TMessageType.CALL, self._seqid) + args = setConfigValue_args() + args.section = section + args.option = option + args.value = value args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_checkOnlineStatus(self, ): + def recv_setConfigValue(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = checkOnlineStatus_result() + result = setConfigValue_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "checkOnlineStatus failed: unknown result"); + return - def checkOnlineStatusContainer(self, urls, filename, data): - """ - Parameters: - - urls - - filename - - data - """ - self.send_checkOnlineStatusContainer(urls, filename, data) - return self.recv_checkOnlineStatusContainer() + def getConfig(self, ): + self.send_getConfig() + return self.recv_getConfig() - def send_checkOnlineStatusContainer(self, urls, filename, data): - self._oprot.writeMessageBegin('checkOnlineStatusContainer', TMessageType.CALL, self._seqid) - args = checkOnlineStatusContainer_args() - args.urls = urls - args.filename = filename - args.data = data + def send_getConfig(self, ): + self._oprot.writeMessageBegin('getConfig', TMessageType.CALL, self._seqid) + args = getConfig_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_checkOnlineStatusContainer(self, ): + def recv_getConfig(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = checkOnlineStatusContainer_result() + result = getConfig_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "checkOnlineStatusContainer failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "getConfig failed: unknown result"); - def pollResults(self, rid): - """ - Parameters: - - rid - """ - self.send_pollResults(rid) - return self.recv_pollResults() + def getPluginConfig(self, ): + self.send_getPluginConfig() + return self.recv_getPluginConfig() - def send_pollResults(self, rid): - self._oprot.writeMessageBegin('pollResults', TMessageType.CALL, self._seqid) - args = pollResults_args() - args.rid = rid + def send_getPluginConfig(self, ): + self._oprot.writeMessageBegin('getPluginConfig', TMessageType.CALL, self._seqid) + args = getPluginConfig_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_pollResults(self, ): + def recv_getPluginConfig(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = pollResults_result() + result = getPluginConfig_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "pollResults failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "getPluginConfig failed: unknown result"); - def statusDownloads(self, ): - self.send_statusDownloads() - return self.recv_statusDownloads() + def configureSection(self, section): + """ + Parameters: + - section + """ + self.send_configureSection(section) + return self.recv_configureSection() - def send_statusDownloads(self, ): - self._oprot.writeMessageBegin('statusDownloads', TMessageType.CALL, self._seqid) - args = statusDownloads_args() + def send_configureSection(self, section): + self._oprot.writeMessageBegin('configureSection', TMessageType.CALL, self._seqid) + args = configureSection_args() + args.section = section args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_statusDownloads(self, ): + def recv_configureSection(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = statusDownloads_result() + result = configureSection_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "statusDownloads failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "configureSection failed: unknown result"); - def getPackageData(self, pid): + def setConfigHandler(self, plugin, iid, value): """ Parameters: - - pid + - plugin + - iid + - value """ - self.send_getPackageData(pid) - return self.recv_getPackageData() + self.send_setConfigHandler(plugin, iid, value) + self.recv_setConfigHandler() - def send_getPackageData(self, pid): - self._oprot.writeMessageBegin('getPackageData', TMessageType.CALL, self._seqid) - args = getPackageData_args() - args.pid = pid + def send_setConfigHandler(self, plugin, iid, value): + self._oprot.writeMessageBegin('setConfigHandler', TMessageType.CALL, self._seqid) + args = setConfigHandler_args() + args.plugin = plugin + args.iid = iid + args.value = value args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getPackageData(self, ): + def recv_setConfigHandler(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getPackageData_result() + result = setConfigHandler_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.e is not None: - raise result.e - raise TApplicationException(TApplicationException.MISSING_RESULT, "getPackageData failed: unknown result"); + return - def getPackageInfo(self, pid): + def checkURLs(self, urls): """ Parameters: - - pid + - urls """ - self.send_getPackageInfo(pid) - return self.recv_getPackageInfo() + self.send_checkURLs(urls) + return self.recv_checkURLs() - def send_getPackageInfo(self, pid): - self._oprot.writeMessageBegin('getPackageInfo', TMessageType.CALL, self._seqid) - args = getPackageInfo_args() - args.pid = pid + def send_checkURLs(self, urls): + self._oprot.writeMessageBegin('checkURLs', TMessageType.CALL, self._seqid) + args = checkURLs_args() + args.urls = urls args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getPackageInfo(self, ): + def recv_checkURLs(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getPackageInfo_result() + result = checkURLs_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - if result.e is not None: - raise result.e - raise TApplicationException(TApplicationException.MISSING_RESULT, "getPackageInfo failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "checkURLs failed: unknown result"); - def getFileData(self, fid): + def parseURLs(self, html, url): """ Parameters: - - fid + - html + - url """ - self.send_getFileData(fid) - return self.recv_getFileData() + self.send_parseURLs(html, url) + return self.recv_parseURLs() - def send_getFileData(self, fid): - self._oprot.writeMessageBegin('getFileData', TMessageType.CALL, self._seqid) - args = getFileData_args() - args.fid = fid + def send_parseURLs(self, html, url): + self._oprot.writeMessageBegin('parseURLs', TMessageType.CALL, self._seqid) + args = parseURLs_args() + args.html = html + args.url = url args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getFileData(self, ): + def recv_parseURLs(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getFileData_result() + result = parseURLs_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - if result.e is not None: - raise result.e - raise TApplicationException(TApplicationException.MISSING_RESULT, "getFileData failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "parseURLs failed: unknown result"); - def getQueue(self, ): - self.send_getQueue() - return self.recv_getQueue() + def checkOnlineStatus(self, urls): + """ + Parameters: + - urls + """ + self.send_checkOnlineStatus(urls) + return self.recv_checkOnlineStatus() - def send_getQueue(self, ): - self._oprot.writeMessageBegin('getQueue', TMessageType.CALL, self._seqid) - args = getQueue_args() + def send_checkOnlineStatus(self, urls): + self._oprot.writeMessageBegin('checkOnlineStatus', TMessageType.CALL, self._seqid) + args = checkOnlineStatus_args() + args.urls = urls args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getQueue(self, ): + def recv_checkOnlineStatus(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getQueue_result() + result = checkOnlineStatus_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getQueue failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "checkOnlineStatus failed: unknown result"); - def getCollector(self, ): - self.send_getCollector() - return self.recv_getCollector() + def checkOnlineStatusContainer(self, urls, filename, data): + """ + Parameters: + - urls + - filename + - data + """ + self.send_checkOnlineStatusContainer(urls, filename, data) + return self.recv_checkOnlineStatusContainer() - def send_getCollector(self, ): - self._oprot.writeMessageBegin('getCollector', TMessageType.CALL, self._seqid) - args = getCollector_args() + def send_checkOnlineStatusContainer(self, urls, filename, data): + self._oprot.writeMessageBegin('checkOnlineStatusContainer', TMessageType.CALL, self._seqid) + args = checkOnlineStatusContainer_args() + args.urls = urls + args.filename = filename + args.data = data args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getCollector(self, ): + def recv_checkOnlineStatusContainer(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getCollector_result() + result = checkOnlineStatusContainer_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getCollector failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "checkOnlineStatusContainer failed: unknown result"); - def getQueueData(self, ): - self.send_getQueueData() - return self.recv_getQueueData() + def pollResults(self, rid): + """ + Parameters: + - rid + """ + self.send_pollResults(rid) + return self.recv_pollResults() - def send_getQueueData(self, ): - self._oprot.writeMessageBegin('getQueueData', TMessageType.CALL, self._seqid) - args = getQueueData_args() + def send_pollResults(self, rid): + self._oprot.writeMessageBegin('pollResults', TMessageType.CALL, self._seqid) + args = pollResults_args() + args.rid = rid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getQueueData(self, ): + def recv_pollResults(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getQueueData_result() + result = pollResults_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getQueueData failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "pollResults failed: unknown result"); - def getCollectorData(self, ): - self.send_getCollectorData() - return self.recv_getCollectorData() + def generatePackages(self, links): + """ + Parameters: + - links + """ + self.send_generatePackages(links) + return self.recv_generatePackages() - def send_getCollectorData(self, ): - self._oprot.writeMessageBegin('getCollectorData', TMessageType.CALL, self._seqid) - args = getCollectorData_args() + def send_generatePackages(self, links): + self._oprot.writeMessageBegin('generatePackages', TMessageType.CALL, self._seqid) + args = generatePackages_args() + args.links = links args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getCollectorData(self, ): + def recv_generatePackages(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getCollectorData_result() + result = generatePackages_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getCollectorData failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "generatePackages failed: unknown result"); - def getPackageOrder(self, destination): + def generateAndAddPackages(self, links, paused): """ Parameters: - - destination + - links + - paused """ - self.send_getPackageOrder(destination) - return self.recv_getPackageOrder() + self.send_generateAndAddPackages(links, paused) + return self.recv_generateAndAddPackages() - def send_getPackageOrder(self, destination): - self._oprot.writeMessageBegin('getPackageOrder', TMessageType.CALL, self._seqid) - args = getPackageOrder_args() - args.destination = destination + def send_generateAndAddPackages(self, links, paused): + self._oprot.writeMessageBegin('generateAndAddPackages', TMessageType.CALL, self._seqid) + args = generateAndAddPackages_args() + args.links = links + args.paused = paused args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getPackageOrder(self, ): + def recv_generateAndAddPackages(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getPackageOrder_result() + result = generateAndAddPackages_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getPackageOrder failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "generateAndAddPackages failed: unknown result"); - def getFileOrder(self, pid): + def autoAddLinks(self, links): """ Parameters: - - pid + - links """ - self.send_getFileOrder(pid) - return self.recv_getFileOrder() + self.send_autoAddLinks(links) + return self.recv_autoAddLinks() - def send_getFileOrder(self, pid): - self._oprot.writeMessageBegin('getFileOrder', TMessageType.CALL, self._seqid) - args = getFileOrder_args() - args.pid = pid + def send_autoAddLinks(self, links): + self._oprot.writeMessageBegin('autoAddLinks', TMessageType.CALL, self._seqid) + args = autoAddLinks_args() + args.links = links args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getFileOrder(self, ): + def recv_autoAddLinks(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getFileOrder_result() + result = autoAddLinks_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getFileOrder failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "autoAddLinks failed: unknown result"); - def generateAndAddPackages(self, links, dest): + def createPackage(self, name, folder, root, password, site, comment, paused): """ Parameters: - - links - - dest + - name + - folder + - root + - password + - site + - comment + - paused """ - self.send_generateAndAddPackages(links, dest) - return self.recv_generateAndAddPackages() + self.send_createPackage(name, folder, root, password, site, comment, paused) + return self.recv_createPackage() - def send_generateAndAddPackages(self, links, dest): - self._oprot.writeMessageBegin('generateAndAddPackages', TMessageType.CALL, self._seqid) - args = generateAndAddPackages_args() - args.links = links - args.dest = dest + def send_createPackage(self, name, folder, root, password, site, comment, paused): + self._oprot.writeMessageBegin('createPackage', TMessageType.CALL, self._seqid) + args = createPackage_args() + args.name = name + args.folder = folder + args.root = root + args.password = password + args.site = site + args.comment = comment + args.paused = paused args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_generateAndAddPackages(self, ): + def recv_createPackage(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = generateAndAddPackages_result() + result = createPackage_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "generateAndAddPackages failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "createPackage failed: unknown result"); - def addPackage(self, name, links, dest, password): + def addPackage(self, name, links, password): """ Parameters: - name - links - - dest - password """ - self.send_addPackage(name, links, dest, password) + self.send_addPackage(name, links, password) return self.recv_addPackage() - def send_addPackage(self, name, links, dest, password): + def send_addPackage(self, name, links, password): self._oprot.writeMessageBegin('addPackage', TMessageType.CALL, self._seqid) args = addPackage_args() args.name = name args.links = links - args.dest = dest args.password = password args.write(self._oprot) self._oprot.writeMessageEnd() @@ -1416,35 +1399,79 @@ class Client(Iface): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "addPackage failed: unknown result"); - def addFiles(self, pid, links): + def addPackageP(self, name, links, password, paused): """ Parameters: - - pid + - name - links + - password + - paused """ - self.send_addFiles(pid, links) - self.recv_addFiles() + self.send_addPackageP(name, links, password, paused) + return self.recv_addPackageP() - def send_addFiles(self, pid, links): - self._oprot.writeMessageBegin('addFiles', TMessageType.CALL, self._seqid) - args = addFiles_args() - args.pid = pid + def send_addPackageP(self, name, links, password, paused): + self._oprot.writeMessageBegin('addPackageP', TMessageType.CALL, self._seqid) + args = addPackageP_args() + args.name = name args.links = links + args.password = password + args.paused = paused args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_addFiles(self, ): + def recv_addPackageP(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = addFiles_result() + result = addPackageP_result() result.read(self._iprot) self._iprot.readMessageEnd() - return + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "addPackageP failed: unknown result"); + + def addPackageChild(self, name, links, password, root, paused): + """ + Parameters: + - name + - links + - password + - root + - paused + """ + self.send_addPackageChild(name, links, password, root, paused) + return self.recv_addPackageChild() + + def send_addPackageChild(self, name, links, password, root, paused): + self._oprot.writeMessageBegin('addPackageChild', TMessageType.CALL, self._seqid) + args = addPackageChild_args() + args.name = name + args.links = links + args.password = password + args.root = root + args.paused = paused + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_addPackageChild(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = addPackageChild_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "addPackageChild failed: unknown result"); def uploadContainer(self, filename, data): """ @@ -1453,7 +1480,7 @@ class Client(Iface): - data """ self.send_uploadContainer(filename, data) - self.recv_uploadContainer() + return self.recv_uploadContainer() def send_uploadContainer(self, filename, data): self._oprot.writeMessageBegin('uploadContainer', TMessageType.CALL, self._seqid) @@ -1474,1881 +1501,2891 @@ class Client(Iface): result = uploadContainer_result() result.read(self._iprot) self._iprot.readMessageEnd() - return + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "uploadContainer failed: unknown result"); - def deleteFiles(self, fids): + def addLinks(self, pid, links): """ Parameters: - - fids + - pid + - links """ - self.send_deleteFiles(fids) - self.recv_deleteFiles() + self.send_addLinks(pid, links) + self.recv_addLinks() - def send_deleteFiles(self, fids): - self._oprot.writeMessageBegin('deleteFiles', TMessageType.CALL, self._seqid) - args = deleteFiles_args() - args.fids = fids + def send_addLinks(self, pid, links): + self._oprot.writeMessageBegin('addLinks', TMessageType.CALL, self._seqid) + args = addLinks_args() + args.pid = pid + args.links = links args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_deleteFiles(self, ): + def recv_addLinks(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = deleteFiles_result() + result = addLinks_result() result.read(self._iprot) self._iprot.readMessageEnd() + if result.e is not None: + raise result.e return - def deletePackages(self, pids): + def deleteFiles(self, fids): """ Parameters: - - pids + - fids """ - self.send_deletePackages(pids) - self.recv_deletePackages() + self.send_deleteFiles(fids) + self.recv_deleteFiles() - def send_deletePackages(self, pids): - self._oprot.writeMessageBegin('deletePackages', TMessageType.CALL, self._seqid) - args = deletePackages_args() - args.pids = pids + def send_deleteFiles(self, fids): + self._oprot.writeMessageBegin('deleteFiles', TMessageType.CALL, self._seqid) + args = deleteFiles_args() + args.fids = fids args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_deletePackages(self, ): + def recv_deleteFiles(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = deletePackages_result() + result = deleteFiles_result() result.read(self._iprot) self._iprot.readMessageEnd() return - def pushToQueue(self, pid): + def deletePackages(self, pids): """ Parameters: - - pid + - pids """ - self.send_pushToQueue(pid) - self.recv_pushToQueue() + self.send_deletePackages(pids) + self.recv_deletePackages() - def send_pushToQueue(self, pid): - self._oprot.writeMessageBegin('pushToQueue', TMessageType.CALL, self._seqid) - args = pushToQueue_args() - args.pid = pid + def send_deletePackages(self, pids): + self._oprot.writeMessageBegin('deletePackages', TMessageType.CALL, self._seqid) + args = deletePackages_args() + args.pids = pids args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_pushToQueue(self, ): + def recv_deletePackages(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = pushToQueue_result() + result = deletePackages_result() result.read(self._iprot) self._iprot.readMessageEnd() return - def pullFromQueue(self, pid): - """ - Parameters: - - pid - """ - self.send_pullFromQueue(pid) - self.recv_pullFromQueue() + def getCollector(self, ): + self.send_getCollector() + return self.recv_getCollector() - def send_pullFromQueue(self, pid): - self._oprot.writeMessageBegin('pullFromQueue', TMessageType.CALL, self._seqid) - args = pullFromQueue_args() - args.pid = pid + def send_getCollector(self, ): + self._oprot.writeMessageBegin('getCollector', TMessageType.CALL, self._seqid) + args = getCollector_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_pullFromQueue(self, ): + def recv_getCollector(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = pullFromQueue_result() + result = getCollector_result() result.read(self._iprot) self._iprot.readMessageEnd() - return + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getCollector failed: unknown result"); - def restartPackage(self, pid): + def addToCollector(self, links): """ Parameters: - - pid + - links """ - self.send_restartPackage(pid) - self.recv_restartPackage() + self.send_addToCollector(links) + self.recv_addToCollector() - def send_restartPackage(self, pid): - self._oprot.writeMessageBegin('restartPackage', TMessageType.CALL, self._seqid) - args = restartPackage_args() - args.pid = pid + def send_addToCollector(self, links): + self._oprot.writeMessageBegin('addToCollector', TMessageType.CALL, self._seqid) + args = addToCollector_args() + args.links = links args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_restartPackage(self, ): + def recv_addToCollector(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = restartPackage_result() + result = addToCollector_result() result.read(self._iprot) self._iprot.readMessageEnd() return - def restartFile(self, fid): + def addFromCollector(self, name, paused): """ Parameters: - - fid + - name + - paused """ - self.send_restartFile(fid) - self.recv_restartFile() + self.send_addFromCollector(name, paused) + return self.recv_addFromCollector() - def send_restartFile(self, fid): - self._oprot.writeMessageBegin('restartFile', TMessageType.CALL, self._seqid) - args = restartFile_args() - args.fid = fid + def send_addFromCollector(self, name, paused): + self._oprot.writeMessageBegin('addFromCollector', TMessageType.CALL, self._seqid) + args = addFromCollector_args() + args.name = name + args.paused = paused args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_restartFile(self, ): + def recv_addFromCollector(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = restartFile_result() + result = addFromCollector_result() result.read(self._iprot) self._iprot.readMessageEnd() - return + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "addFromCollector failed: unknown result"); - def recheckPackage(self, pid): + def renameCollPack(self, name, new_name): """ Parameters: - - pid + - name + - new_name """ - self.send_recheckPackage(pid) - self.recv_recheckPackage() + self.send_renameCollPack(name, new_name) + self.recv_renameCollPack() - def send_recheckPackage(self, pid): - self._oprot.writeMessageBegin('recheckPackage', TMessageType.CALL, self._seqid) - args = recheckPackage_args() - args.pid = pid + def send_renameCollPack(self, name, new_name): + self._oprot.writeMessageBegin('renameCollPack', TMessageType.CALL, self._seqid) + args = renameCollPack_args() + args.name = name + args.new_name = new_name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_recheckPackage(self, ): + def recv_renameCollPack(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = recheckPackage_result() + result = renameCollPack_result() result.read(self._iprot) self._iprot.readMessageEnd() return - def stopAllDownloads(self, ): - self.send_stopAllDownloads() - self.recv_stopAllDownloads() + def deleteCollPack(self, name): + """ + Parameters: + - name + """ + self.send_deleteCollPack(name) + self.recv_deleteCollPack() - def send_stopAllDownloads(self, ): - self._oprot.writeMessageBegin('stopAllDownloads', TMessageType.CALL, self._seqid) - args = stopAllDownloads_args() + def send_deleteCollPack(self, name): + self._oprot.writeMessageBegin('deleteCollPack', TMessageType.CALL, self._seqid) + args = deleteCollPack_args() + args.name = name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_stopAllDownloads(self, ): + def recv_deleteCollPack(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = stopAllDownloads_result() + result = deleteCollPack_result() result.read(self._iprot) self._iprot.readMessageEnd() return - def stopDownloads(self, fids): + def deleteCollLink(self, url): """ Parameters: - - fids + - url """ - self.send_stopDownloads(fids) - self.recv_stopDownloads() + self.send_deleteCollLink(url) + self.recv_deleteCollLink() - def send_stopDownloads(self, fids): - self._oprot.writeMessageBegin('stopDownloads', TMessageType.CALL, self._seqid) - args = stopDownloads_args() - args.fids = fids + def send_deleteCollLink(self, url): + self._oprot.writeMessageBegin('deleteCollLink', TMessageType.CALL, self._seqid) + args = deleteCollLink_args() + args.url = url args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_stopDownloads(self, ): + def recv_deleteCollLink(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = stopDownloads_result() + result = deleteCollLink_result() result.read(self._iprot) self._iprot.readMessageEnd() return - def setPackageName(self, pid, name): - """ - Parameters: - - pid - - name - """ - self.send_setPackageName(pid, name) - self.recv_setPackageName() + def getAllFiles(self, ): + self.send_getAllFiles() + return self.recv_getAllFiles() - def send_setPackageName(self, pid, name): - self._oprot.writeMessageBegin('setPackageName', TMessageType.CALL, self._seqid) - args = setPackageName_args() - args.pid = pid - args.name = name + def send_getAllFiles(self, ): + self._oprot.writeMessageBegin('getAllFiles', TMessageType.CALL, self._seqid) + args = getAllFiles_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_setPackageName(self, ): + def recv_getAllFiles(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = setPackageName_result() + result = getAllFiles_result() result.read(self._iprot) self._iprot.readMessageEnd() - return + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllFiles failed: unknown result"); - def movePackage(self, destination, pid): - """ - Parameters: - - destination - - pid - """ - self.send_movePackage(destination, pid) - self.recv_movePackage() + def getAllUnfinishedFiles(self, ): + self.send_getAllUnfinishedFiles() + return self.recv_getAllUnfinishedFiles() - def send_movePackage(self, destination, pid): - self._oprot.writeMessageBegin('movePackage', TMessageType.CALL, self._seqid) - args = movePackage_args() - args.destination = destination - args.pid = pid + def send_getAllUnfinishedFiles(self, ): + self._oprot.writeMessageBegin('getAllUnfinishedFiles', TMessageType.CALL, self._seqid) + args = getAllUnfinishedFiles_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_movePackage(self, ): + def recv_getAllUnfinishedFiles(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = movePackage_result() + result = getAllUnfinishedFiles_result() result.read(self._iprot) self._iprot.readMessageEnd() - return + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllUnfinishedFiles failed: unknown result"); - def moveFiles(self, fids, pid): + def getFileTree(self, pid, full): """ Parameters: - - fids - pid + - full """ - self.send_moveFiles(fids, pid) - self.recv_moveFiles() + self.send_getFileTree(pid, full) + return self.recv_getFileTree() - def send_moveFiles(self, fids, pid): - self._oprot.writeMessageBegin('moveFiles', TMessageType.CALL, self._seqid) - args = moveFiles_args() - args.fids = fids + def send_getFileTree(self, pid, full): + self._oprot.writeMessageBegin('getFileTree', TMessageType.CALL, self._seqid) + args = getFileTree_args() args.pid = pid + args.full = full args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_moveFiles(self, ): + def recv_getFileTree(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = moveFiles_result() + result = getFileTree_result() result.read(self._iprot) self._iprot.readMessageEnd() - return + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getFileTree failed: unknown result"); - def orderPackage(self, pid, position): + def getUnfinishedFileTree(self, pid, full): """ Parameters: - pid - - position + - full """ - self.send_orderPackage(pid, position) - self.recv_orderPackage() + self.send_getUnfinishedFileTree(pid, full) + return self.recv_getUnfinishedFileTree() - def send_orderPackage(self, pid, position): - self._oprot.writeMessageBegin('orderPackage', TMessageType.CALL, self._seqid) - args = orderPackage_args() + def send_getUnfinishedFileTree(self, pid, full): + self._oprot.writeMessageBegin('getUnfinishedFileTree', TMessageType.CALL, self._seqid) + args = getUnfinishedFileTree_args() args.pid = pid - args.position = position + args.full = full args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_orderPackage(self, ): + def recv_getUnfinishedFileTree(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = orderPackage_result() + result = getUnfinishedFileTree_result() result.read(self._iprot) self._iprot.readMessageEnd() - return + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getUnfinishedFileTree failed: unknown result"); - def orderFile(self, fid, position): + def getPackageContent(self, pid): """ Parameters: - - fid - - position + - pid """ - self.send_orderFile(fid, position) - self.recv_orderFile() + self.send_getPackageContent(pid) + return self.recv_getPackageContent() - def send_orderFile(self, fid, position): - self._oprot.writeMessageBegin('orderFile', TMessageType.CALL, self._seqid) - args = orderFile_args() - args.fid = fid - args.position = position + def send_getPackageContent(self, pid): + self._oprot.writeMessageBegin('getPackageContent', TMessageType.CALL, self._seqid) + args = getPackageContent_args() + args.pid = pid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_orderFile(self, ): + def recv_getPackageContent(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = orderFile_result() + result = getPackageContent_result() result.read(self._iprot) self._iprot.readMessageEnd() - return + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getPackageContent failed: unknown result"); - def setPackageData(self, pid, data): + def getPackageInfo(self, pid): """ Parameters: - pid - - data """ - self.send_setPackageData(pid, data) - self.recv_setPackageData() + self.send_getPackageInfo(pid) + return self.recv_getPackageInfo() - def send_setPackageData(self, pid, data): - self._oprot.writeMessageBegin('setPackageData', TMessageType.CALL, self._seqid) - args = setPackageData_args() + def send_getPackageInfo(self, pid): + self._oprot.writeMessageBegin('getPackageInfo', TMessageType.CALL, self._seqid) + args = getPackageInfo_args() args.pid = pid - args.data = data args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_setPackageData(self, ): + def recv_getPackageInfo(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = setPackageData_result() + result = getPackageInfo_result() result.read(self._iprot) self._iprot.readMessageEnd() + if result.success is not None: + return result.success if result.e is not None: raise result.e - return + raise TApplicationException(TApplicationException.MISSING_RESULT, "getPackageInfo failed: unknown result"); - def deleteFinished(self, ): - self.send_deleteFinished() - return self.recv_deleteFinished() + def getFileInfo(self, fid): + """ + Parameters: + - fid + """ + self.send_getFileInfo(fid) + return self.recv_getFileInfo() - def send_deleteFinished(self, ): - self._oprot.writeMessageBegin('deleteFinished', TMessageType.CALL, self._seqid) - args = deleteFinished_args() + def send_getFileInfo(self, fid): + self._oprot.writeMessageBegin('getFileInfo', TMessageType.CALL, self._seqid) + args = getFileInfo_args() + args.fid = fid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_deleteFinished(self, ): + def recv_getFileInfo(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = deleteFinished_result() + result = getFileInfo_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "deleteFinished failed: unknown result"); + if result.e is not None: + raise result.e + raise TApplicationException(TApplicationException.MISSING_RESULT, "getFileInfo failed: unknown result"); - def restartFailed(self, ): - self.send_restartFailed() - self.recv_restartFailed() + def findFiles(self, pattern): + """ + Parameters: + - pattern + """ + self.send_findFiles(pattern) + return self.recv_findFiles() - def send_restartFailed(self, ): - self._oprot.writeMessageBegin('restartFailed', TMessageType.CALL, self._seqid) - args = restartFailed_args() + def send_findFiles(self, pattern): + self._oprot.writeMessageBegin('findFiles', TMessageType.CALL, self._seqid) + args = findFiles_args() + args.pattern = pattern args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_restartFailed(self, ): + def recv_findFiles(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = restartFailed_result() + result = findFiles_result() result.read(self._iprot) self._iprot.readMessageEnd() - return + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "findFiles failed: unknown result"); - def getEvents(self, uuid): + def restartPackage(self, pid): """ Parameters: - - uuid + - pid """ - self.send_getEvents(uuid) - return self.recv_getEvents() + self.send_restartPackage(pid) + self.recv_restartPackage() - def send_getEvents(self, uuid): - self._oprot.writeMessageBegin('getEvents', TMessageType.CALL, self._seqid) - args = getEvents_args() - args.uuid = uuid + def send_restartPackage(self, pid): + self._oprot.writeMessageBegin('restartPackage', TMessageType.CALL, self._seqid) + args = restartPackage_args() + args.pid = pid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getEvents(self, ): + def recv_restartPackage(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getEvents_result() + result = restartPackage_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getEvents failed: unknown result"); + return - def getAccounts(self, refresh): + def restartFile(self, fid): """ Parameters: - - refresh + - fid """ - self.send_getAccounts(refresh) - return self.recv_getAccounts() + self.send_restartFile(fid) + self.recv_restartFile() - def send_getAccounts(self, refresh): - self._oprot.writeMessageBegin('getAccounts', TMessageType.CALL, self._seqid) - args = getAccounts_args() - args.refresh = refresh + def send_restartFile(self, fid): + self._oprot.writeMessageBegin('restartFile', TMessageType.CALL, self._seqid) + args = restartFile_args() + args.fid = fid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getAccounts(self, ): + def recv_restartFile(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getAccounts_result() + result = restartFile_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getAccounts failed: unknown result"); + return - def getAccountTypes(self, ): - self.send_getAccountTypes() - return self.recv_getAccountTypes() + def recheckPackage(self, pid): + """ + Parameters: + - pid + """ + self.send_recheckPackage(pid) + self.recv_recheckPackage() - def send_getAccountTypes(self, ): - self._oprot.writeMessageBegin('getAccountTypes', TMessageType.CALL, self._seqid) - args = getAccountTypes_args() + def send_recheckPackage(self, pid): + self._oprot.writeMessageBegin('recheckPackage', TMessageType.CALL, self._seqid) + args = recheckPackage_args() + args.pid = pid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getAccountTypes(self, ): + def recv_recheckPackage(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getAccountTypes_result() + result = recheckPackage_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getAccountTypes failed: unknown result"); + return - def updateAccount(self, plugin, account, password, options): + def stopDownloads(self, fids): """ Parameters: - - plugin - - account - - password - - options + - fids """ - self.send_updateAccount(plugin, account, password, options) - self.recv_updateAccount() + self.send_stopDownloads(fids) + self.recv_stopDownloads() - def send_updateAccount(self, plugin, account, password, options): - self._oprot.writeMessageBegin('updateAccount', TMessageType.CALL, self._seqid) - args = updateAccount_args() - args.plugin = plugin - args.account = account - args.password = password - args.options = options + def send_stopDownloads(self, fids): + self._oprot.writeMessageBegin('stopDownloads', TMessageType.CALL, self._seqid) + args = stopDownloads_args() + args.fids = fids args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_updateAccount(self, ): + def recv_stopDownloads(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = updateAccount_result() + result = stopDownloads_result() result.read(self._iprot) self._iprot.readMessageEnd() return - def removeAccount(self, plugin, account): - """ - Parameters: - - plugin - - account - """ - self.send_removeAccount(plugin, account) - self.recv_removeAccount() + def stopAllDownloads(self, ): + self.send_stopAllDownloads() + self.recv_stopAllDownloads() - def send_removeAccount(self, plugin, account): - self._oprot.writeMessageBegin('removeAccount', TMessageType.CALL, self._seqid) - args = removeAccount_args() - args.plugin = plugin - args.account = account + def send_stopAllDownloads(self, ): + self._oprot.writeMessageBegin('stopAllDownloads', TMessageType.CALL, self._seqid) + args = stopAllDownloads_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_removeAccount(self, ): + def recv_stopAllDownloads(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = removeAccount_result() + result = stopAllDownloads_result() result.read(self._iprot) self._iprot.readMessageEnd() return - def login(self, username, password): - """ - Parameters: - - username - - password - """ - self.send_login(username, password) - return self.recv_login() + def restartFailed(self, ): + self.send_restartFailed() + self.recv_restartFailed() - def send_login(self, username, password): - self._oprot.writeMessageBegin('login', TMessageType.CALL, self._seqid) - args = login_args() - args.username = username - args.password = password + def send_restartFailed(self, ): + self._oprot.writeMessageBegin('restartFailed', TMessageType.CALL, self._seqid) + args = restartFailed_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_login(self, ): + def recv_restartFailed(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = login_result() + result = restartFailed_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "login failed: unknown result"); + return - def getUserData(self, username, password): + def setFilePaused(self, fid, paused): """ Parameters: - - username - - password + - fid + - paused """ - self.send_getUserData(username, password) - return self.recv_getUserData() + self.send_setFilePaused(fid, paused) + self.recv_setFilePaused() - def send_getUserData(self, username, password): - self._oprot.writeMessageBegin('getUserData', TMessageType.CALL, self._seqid) - args = getUserData_args() - args.username = username - args.password = password + def send_setFilePaused(self, fid, paused): + self._oprot.writeMessageBegin('setFilePaused', TMessageType.CALL, self._seqid) + args = setFilePaused_args() + args.fid = fid + args.paused = paused args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getUserData(self, ): + def recv_setFilePaused(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getUserData_result() + result = setFilePaused_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.ex is not None: - raise result.ex - raise TApplicationException(TApplicationException.MISSING_RESULT, "getUserData failed: unknown result"); + if result.e is not None: + raise result.e + return - def getAllUserData(self, ): - self.send_getAllUserData() - return self.recv_getAllUserData() + def setPackagePaused(self, pid, paused): + """ + Parameters: + - pid + - paused + """ + self.send_setPackagePaused(pid, paused) + self.recv_setPackagePaused() - def send_getAllUserData(self, ): - self._oprot.writeMessageBegin('getAllUserData', TMessageType.CALL, self._seqid) - args = getAllUserData_args() + def send_setPackagePaused(self, pid, paused): + self._oprot.writeMessageBegin('setPackagePaused', TMessageType.CALL, self._seqid) + args = setPackagePaused_args() + args.pid = pid + args.paused = paused args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getAllUserData(self, ): + def recv_setPackagePaused(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getAllUserData_result() + result = setPackagePaused_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllUserData failed: unknown result"); + if result.e is not None: + raise result.e + return - def getServices(self, ): - self.send_getServices() - return self.recv_getServices() + def setPackageFolder(self, pid, path): + """ + Parameters: + - pid + - path + """ + self.send_setPackageFolder(pid, path) + return self.recv_setPackageFolder() - def send_getServices(self, ): - self._oprot.writeMessageBegin('getServices', TMessageType.CALL, self._seqid) - args = getServices_args() + def send_setPackageFolder(self, pid, path): + self._oprot.writeMessageBegin('setPackageFolder', TMessageType.CALL, self._seqid) + args = setPackageFolder_args() + args.pid = pid + args.path = path args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getServices(self, ): + def recv_setPackageFolder(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getServices_result() + result = setPackageFolder_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getServices failed: unknown result"); + if result.e is not None: + raise result.e + raise TApplicationException(TApplicationException.MISSING_RESULT, "setPackageFolder failed: unknown result"); - def hasService(self, plugin, func): + def setPackageData(self, pid, data): """ Parameters: - - plugin - - func + - pid + - data """ - self.send_hasService(plugin, func) - return self.recv_hasService() + self.send_setPackageData(pid, data) + self.recv_setPackageData() - def send_hasService(self, plugin, func): - self._oprot.writeMessageBegin('hasService', TMessageType.CALL, self._seqid) - args = hasService_args() - args.plugin = plugin - args.func = func + def send_setPackageData(self, pid, data): + self._oprot.writeMessageBegin('setPackageData', TMessageType.CALL, self._seqid) + args = setPackageData_args() + args.pid = pid + args.data = data args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_hasService(self, ): + def recv_setPackageData(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = hasService_result() + result = setPackageData_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "hasService failed: unknown result"); + if result.e is not None: + raise result.e + return - def call(self, info): + def movePackage(self, pid, root): """ Parameters: - - info + - pid + - root """ - self.send_call(info) - return self.recv_call() + self.send_movePackage(pid, root) + return self.recv_movePackage() - def send_call(self, info): - self._oprot.writeMessageBegin('call', TMessageType.CALL, self._seqid) - args = call_args() - args.info = info + def send_movePackage(self, pid, root): + self._oprot.writeMessageBegin('movePackage', TMessageType.CALL, self._seqid) + args = movePackage_args() + args.pid = pid + args.root = root args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_call(self, ): + def recv_movePackage(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = call_result() + result = movePackage_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - if result.ex is not None: - raise result.ex if result.e is not None: raise result.e - raise TApplicationException(TApplicationException.MISSING_RESULT, "call failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "movePackage failed: unknown result"); - def getAllInfo(self, ): - self.send_getAllInfo() - return self.recv_getAllInfo() + def moveFiles(self, fids, pid): + """ + Parameters: + - fids + - pid + """ + self.send_moveFiles(fids, pid) + return self.recv_moveFiles() - def send_getAllInfo(self, ): - self._oprot.writeMessageBegin('getAllInfo', TMessageType.CALL, self._seqid) - args = getAllInfo_args() + def send_moveFiles(self, fids, pid): + self._oprot.writeMessageBegin('moveFiles', TMessageType.CALL, self._seqid) + args = moveFiles_args() + args.fids = fids + args.pid = pid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getAllInfo(self, ): + def recv_moveFiles(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getAllInfo_result() + result = moveFiles_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllInfo failed: unknown result"); + if result.e is not None: + raise result.e + raise TApplicationException(TApplicationException.MISSING_RESULT, "moveFiles failed: unknown result"); - def getInfoByPlugin(self, plugin): + def orderPackage(self, pids, position): """ Parameters: - - plugin + - pids + - position """ - self.send_getInfoByPlugin(plugin) - return self.recv_getInfoByPlugin() + self.send_orderPackage(pids, position) + self.recv_orderPackage() - def send_getInfoByPlugin(self, plugin): - self._oprot.writeMessageBegin('getInfoByPlugin', TMessageType.CALL, self._seqid) - args = getInfoByPlugin_args() - args.plugin = plugin + def send_orderPackage(self, pids, position): + self._oprot.writeMessageBegin('orderPackage', TMessageType.CALL, self._seqid) + args = orderPackage_args() + args.pids = pids + args.position = position args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getInfoByPlugin(self, ): + def recv_orderPackage(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getInfoByPlugin_result() + result = orderPackage_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getInfoByPlugin failed: unknown result"); - - def isCaptchaWaiting(self, ): - self.send_isCaptchaWaiting() - return self.recv_isCaptchaWaiting() - - def send_isCaptchaWaiting(self, ): - self._oprot.writeMessageBegin('isCaptchaWaiting', TMessageType.CALL, self._seqid) - args = isCaptchaWaiting_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() + return - def recv_isCaptchaWaiting(self, ): + def orderFiles(self, fids, pid, position): + """ + Parameters: + - fids + - pid + - position + """ + self.send_orderFiles(fids, pid, position) + self.recv_orderFiles() + + def send_orderFiles(self, fids, pid, position): + self._oprot.writeMessageBegin('orderFiles', TMessageType.CALL, self._seqid) + args = orderFiles_args() + args.fids = fids + args.pid = pid + args.position = position + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_orderFiles(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = isCaptchaWaiting_result() + result = orderFiles_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "isCaptchaWaiting failed: unknown result"); + return - def getCaptchaTask(self, exclusive): + def isInteractionWaiting(self, mode): """ Parameters: - - exclusive + - mode """ - self.send_getCaptchaTask(exclusive) - return self.recv_getCaptchaTask() + self.send_isInteractionWaiting(mode) + return self.recv_isInteractionWaiting() - def send_getCaptchaTask(self, exclusive): - self._oprot.writeMessageBegin('getCaptchaTask', TMessageType.CALL, self._seqid) - args = getCaptchaTask_args() - args.exclusive = exclusive + def send_isInteractionWaiting(self, mode): + self._oprot.writeMessageBegin('isInteractionWaiting', TMessageType.CALL, self._seqid) + args = isInteractionWaiting_args() + args.mode = mode args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getCaptchaTask(self, ): + def recv_isInteractionWaiting(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getCaptchaTask_result() + result = isInteractionWaiting_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getCaptchaTask failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "isInteractionWaiting failed: unknown result"); - def getCaptchaTaskStatus(self, tid): + def getInteractionTask(self, mode): """ Parameters: - - tid + - mode """ - self.send_getCaptchaTaskStatus(tid) - return self.recv_getCaptchaTaskStatus() + self.send_getInteractionTask(mode) + return self.recv_getInteractionTask() - def send_getCaptchaTaskStatus(self, tid): - self._oprot.writeMessageBegin('getCaptchaTaskStatus', TMessageType.CALL, self._seqid) - args = getCaptchaTaskStatus_args() - args.tid = tid + def send_getInteractionTask(self, mode): + self._oprot.writeMessageBegin('getInteractionTask', TMessageType.CALL, self._seqid) + args = getInteractionTask_args() + args.mode = mode args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getCaptchaTaskStatus(self, ): + def recv_getInteractionTask(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getCaptchaTaskStatus_result() + result = getInteractionTask_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getCaptchaTaskStatus failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "getInteractionTask failed: unknown result"); - def setCaptchaResult(self, tid, result): + def setInteractionResult(self, iid, result): """ Parameters: - - tid + - iid - result """ - self.send_setCaptchaResult(tid, result) - self.recv_setCaptchaResult() + self.send_setInteractionResult(iid, result) + self.recv_setInteractionResult() - def send_setCaptchaResult(self, tid, result): - self._oprot.writeMessageBegin('setCaptchaResult', TMessageType.CALL, self._seqid) - args = setCaptchaResult_args() - args.tid = tid + def send_setInteractionResult(self, iid, result): + self._oprot.writeMessageBegin('setInteractionResult', TMessageType.CALL, self._seqid) + args = setInteractionResult_args() + args.iid = iid args.result = result args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_setCaptchaResult(self, ): + def recv_setInteractionResult(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = setCaptchaResult_result() + result = setInteractionResult_result() result.read(self._iprot) self._iprot.readMessageEnd() return + def generateDownloadLink(self, fid, timeout): + """ + Parameters: + - fid + - timeout + """ + self.send_generateDownloadLink(fid, timeout) + return self.recv_generateDownloadLink() -class Processor(Iface, TProcessor): - def __init__(self, handler): - self._handler = handler - self._processMap = {} - self._processMap["getConfigValue"] = Processor.process_getConfigValue - self._processMap["setConfigValue"] = Processor.process_setConfigValue - self._processMap["getConfig"] = Processor.process_getConfig - self._processMap["getPluginConfig"] = Processor.process_getPluginConfig - self._processMap["configureSection"] = Processor.process_configureSection - self._processMap["pauseServer"] = Processor.process_pauseServer - self._processMap["unpauseServer"] = Processor.process_unpauseServer - self._processMap["togglePause"] = Processor.process_togglePause - self._processMap["statusServer"] = Processor.process_statusServer - self._processMap["freeSpace"] = Processor.process_freeSpace - self._processMap["getServerVersion"] = Processor.process_getServerVersion - self._processMap["kill"] = Processor.process_kill - self._processMap["restart"] = Processor.process_restart - self._processMap["getLog"] = Processor.process_getLog - self._processMap["isTimeDownload"] = Processor.process_isTimeDownload - self._processMap["isTimeReconnect"] = Processor.process_isTimeReconnect - self._processMap["toggleReconnect"] = Processor.process_toggleReconnect - self._processMap["generatePackages"] = Processor.process_generatePackages - self._processMap["checkURLs"] = Processor.process_checkURLs - self._processMap["parseURLs"] = Processor.process_parseURLs - self._processMap["checkOnlineStatus"] = Processor.process_checkOnlineStatus - self._processMap["checkOnlineStatusContainer"] = Processor.process_checkOnlineStatusContainer - self._processMap["pollResults"] = Processor.process_pollResults - self._processMap["statusDownloads"] = Processor.process_statusDownloads - self._processMap["getPackageData"] = Processor.process_getPackageData - self._processMap["getPackageInfo"] = Processor.process_getPackageInfo - self._processMap["getFileData"] = Processor.process_getFileData - self._processMap["getQueue"] = Processor.process_getQueue - self._processMap["getCollector"] = Processor.process_getCollector - self._processMap["getQueueData"] = Processor.process_getQueueData - self._processMap["getCollectorData"] = Processor.process_getCollectorData - self._processMap["getPackageOrder"] = Processor.process_getPackageOrder - self._processMap["getFileOrder"] = Processor.process_getFileOrder - self._processMap["generateAndAddPackages"] = Processor.process_generateAndAddPackages - self._processMap["addPackage"] = Processor.process_addPackage - self._processMap["addFiles"] = Processor.process_addFiles - self._processMap["uploadContainer"] = Processor.process_uploadContainer - self._processMap["deleteFiles"] = Processor.process_deleteFiles - self._processMap["deletePackages"] = Processor.process_deletePackages - self._processMap["pushToQueue"] = Processor.process_pushToQueue - self._processMap["pullFromQueue"] = Processor.process_pullFromQueue - self._processMap["restartPackage"] = Processor.process_restartPackage - self._processMap["restartFile"] = Processor.process_restartFile - self._processMap["recheckPackage"] = Processor.process_recheckPackage - self._processMap["stopAllDownloads"] = Processor.process_stopAllDownloads - self._processMap["stopDownloads"] = Processor.process_stopDownloads - self._processMap["setPackageName"] = Processor.process_setPackageName - self._processMap["movePackage"] = Processor.process_movePackage - self._processMap["moveFiles"] = Processor.process_moveFiles - self._processMap["orderPackage"] = Processor.process_orderPackage - self._processMap["orderFile"] = Processor.process_orderFile - self._processMap["setPackageData"] = Processor.process_setPackageData - self._processMap["deleteFinished"] = Processor.process_deleteFinished - self._processMap["restartFailed"] = Processor.process_restartFailed - self._processMap["getEvents"] = Processor.process_getEvents - self._processMap["getAccounts"] = Processor.process_getAccounts - self._processMap["getAccountTypes"] = Processor.process_getAccountTypes - self._processMap["updateAccount"] = Processor.process_updateAccount - self._processMap["removeAccount"] = Processor.process_removeAccount - self._processMap["login"] = Processor.process_login - self._processMap["getUserData"] = Processor.process_getUserData - self._processMap["getAllUserData"] = Processor.process_getAllUserData - self._processMap["getServices"] = Processor.process_getServices - self._processMap["hasService"] = Processor.process_hasService - self._processMap["call"] = Processor.process_call - self._processMap["getAllInfo"] = Processor.process_getAllInfo - self._processMap["getInfoByPlugin"] = Processor.process_getInfoByPlugin - self._processMap["isCaptchaWaiting"] = Processor.process_isCaptchaWaiting - self._processMap["getCaptchaTask"] = Processor.process_getCaptchaTask - self._processMap["getCaptchaTaskStatus"] = Processor.process_getCaptchaTaskStatus - self._processMap["setCaptchaResult"] = Processor.process_setCaptchaResult + def send_generateDownloadLink(self, fid, timeout): + self._oprot.writeMessageBegin('generateDownloadLink', TMessageType.CALL, self._seqid) + args = generateDownloadLink_args() + args.fid = fid + args.timeout = timeout + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - def process(self, iprot, oprot): - (name, type, seqid) = iprot.readMessageBegin() - if name not in self._processMap: - iprot.skip(TType.STRUCT) - iprot.readMessageEnd() - x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) - oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) - x.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - return - else: - self._processMap[name](self, seqid, iprot, oprot) - return True + def recv_generateDownloadLink(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = generateDownloadLink_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "generateDownloadLink failed: unknown result"); - def process_getConfigValue(self, seqid, iprot, oprot): - args = getConfigValue_args() - args.read(iprot) - iprot.readMessageEnd() - result = getConfigValue_result() - result.success = self._handler.getConfigValue(args.section, args.option) - oprot.writeMessageBegin("getConfigValue", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def getAddonHandler(self, ): + self.send_getAddonHandler() + return self.recv_getAddonHandler() - def process_setConfigValue(self, seqid, iprot, oprot): - args = setConfigValue_args() - args.read(iprot) - iprot.readMessageEnd() - result = setConfigValue_result() - self._handler.setConfigValue(args.section, args.option, args.value) - oprot.writeMessageBegin("setConfigValue", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def send_getAddonHandler(self, ): + self._oprot.writeMessageBegin('getAddonHandler', TMessageType.CALL, self._seqid) + args = getAddonHandler_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - def process_getConfig(self, seqid, iprot, oprot): - args = getConfig_args() - args.read(iprot) - iprot.readMessageEnd() - result = getConfig_result() - result.success = self._handler.getConfig() - oprot.writeMessageBegin("getConfig", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def recv_getAddonHandler(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getAddonHandler_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getAddonHandler failed: unknown result"); - def process_getPluginConfig(self, seqid, iprot, oprot): - args = getPluginConfig_args() - args.read(iprot) - iprot.readMessageEnd() - result = getPluginConfig_result() - result.success = self._handler.getPluginConfig() - oprot.writeMessageBegin("getPluginConfig", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def callAddonHandler(self, plugin, func, pid_or_fid): + """ + Parameters: + - plugin + - func + - pid_or_fid + """ + self.send_callAddonHandler(plugin, func, pid_or_fid) + self.recv_callAddonHandler() - def process_configureSection(self, seqid, iprot, oprot): - args = configureSection_args() - args.read(iprot) - iprot.readMessageEnd() - result = configureSection_result() - result.success = self._handler.configureSection(args.section) - oprot.writeMessageBegin("configureSection", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def send_callAddonHandler(self, plugin, func, pid_or_fid): + self._oprot.writeMessageBegin('callAddonHandler', TMessageType.CALL, self._seqid) + args = callAddonHandler_args() + args.plugin = plugin + args.func = func + args.pid_or_fid = pid_or_fid + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - def process_pauseServer(self, seqid, iprot, oprot): - args = pauseServer_args() - args.read(iprot) - iprot.readMessageEnd() - result = pauseServer_result() - self._handler.pauseServer() - oprot.writeMessageBegin("pauseServer", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def recv_callAddonHandler(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = callAddonHandler_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + return - def process_unpauseServer(self, seqid, iprot, oprot): - args = unpauseServer_args() - args.read(iprot) - iprot.readMessageEnd() - result = unpauseServer_result() - self._handler.unpauseServer() - oprot.writeMessageBegin("unpauseServer", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def getEvents(self, uuid): + """ + Parameters: + - uuid + """ + self.send_getEvents(uuid) + return self.recv_getEvents() - def process_togglePause(self, seqid, iprot, oprot): - args = togglePause_args() - args.read(iprot) - iprot.readMessageEnd() - result = togglePause_result() - result.success = self._handler.togglePause() - oprot.writeMessageBegin("togglePause", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def send_getEvents(self, uuid): + self._oprot.writeMessageBegin('getEvents', TMessageType.CALL, self._seqid) + args = getEvents_args() + args.uuid = uuid + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - def process_statusServer(self, seqid, iprot, oprot): - args = statusServer_args() - args.read(iprot) - iprot.readMessageEnd() - result = statusServer_result() - result.success = self._handler.statusServer() - oprot.writeMessageBegin("statusServer", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def recv_getEvents(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getEvents_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getEvents failed: unknown result"); - def process_freeSpace(self, seqid, iprot, oprot): + def getAccounts(self, refresh): + """ + Parameters: + - refresh + """ + self.send_getAccounts(refresh) + return self.recv_getAccounts() + + def send_getAccounts(self, refresh): + self._oprot.writeMessageBegin('getAccounts', TMessageType.CALL, self._seqid) + args = getAccounts_args() + args.refresh = refresh + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getAccounts(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getAccounts_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getAccounts failed: unknown result"); + + def getAccountTypes(self, ): + self.send_getAccountTypes() + return self.recv_getAccountTypes() + + def send_getAccountTypes(self, ): + self._oprot.writeMessageBegin('getAccountTypes', TMessageType.CALL, self._seqid) + args = getAccountTypes_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getAccountTypes(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getAccountTypes_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getAccountTypes failed: unknown result"); + + def updateAccount(self, plugin, account, password, options): + """ + Parameters: + - plugin + - account + - password + - options + """ + self.send_updateAccount(plugin, account, password, options) + self.recv_updateAccount() + + def send_updateAccount(self, plugin, account, password, options): + self._oprot.writeMessageBegin('updateAccount', TMessageType.CALL, self._seqid) + args = updateAccount_args() + args.plugin = plugin + args.account = account + args.password = password + args.options = options + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_updateAccount(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = updateAccount_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + return + + def removeAccount(self, plugin, account): + """ + Parameters: + - plugin + - account + """ + self.send_removeAccount(plugin, account) + self.recv_removeAccount() + + def send_removeAccount(self, plugin, account): + self._oprot.writeMessageBegin('removeAccount', TMessageType.CALL, self._seqid) + args = removeAccount_args() + args.plugin = plugin + args.account = account + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_removeAccount(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = removeAccount_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + return + + def login(self, username, password): + """ + Parameters: + - username + - password + """ + self.send_login(username, password) + return self.recv_login() + + def send_login(self, username, password): + self._oprot.writeMessageBegin('login', TMessageType.CALL, self._seqid) + args = login_args() + args.username = username + args.password = password + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_login(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = login_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "login failed: unknown result"); + + def getUserData(self, username, password): + """ + Parameters: + - username + - password + """ + self.send_getUserData(username, password) + return self.recv_getUserData() + + def send_getUserData(self, username, password): + self._oprot.writeMessageBegin('getUserData', TMessageType.CALL, self._seqid) + args = getUserData_args() + args.username = username + args.password = password + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getUserData(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getUserData_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.ex is not None: + raise result.ex + raise TApplicationException(TApplicationException.MISSING_RESULT, "getUserData failed: unknown result"); + + def getAllUserData(self, ): + self.send_getAllUserData() + return self.recv_getAllUserData() + + def send_getAllUserData(self, ): + self._oprot.writeMessageBegin('getAllUserData', TMessageType.CALL, self._seqid) + args = getAllUserData_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getAllUserData(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getAllUserData_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllUserData failed: unknown result"); + + def getServices(self, ): + self.send_getServices() + return self.recv_getServices() + + def send_getServices(self, ): + self._oprot.writeMessageBegin('getServices', TMessageType.CALL, self._seqid) + args = getServices_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getServices(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getServices_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getServices failed: unknown result"); + + def hasService(self, plugin, func): + """ + Parameters: + - plugin + - func + """ + self.send_hasService(plugin, func) + return self.recv_hasService() + + def send_hasService(self, plugin, func): + self._oprot.writeMessageBegin('hasService', TMessageType.CALL, self._seqid) + args = hasService_args() + args.plugin = plugin + args.func = func + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_hasService(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = hasService_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "hasService failed: unknown result"); + + def call(self, plugin, func, arguments): + """ + Parameters: + - plugin + - func + - arguments + """ + self.send_call(plugin, func, arguments) + return self.recv_call() + + def send_call(self, plugin, func, arguments): + self._oprot.writeMessageBegin('call', TMessageType.CALL, self._seqid) + args = call_args() + args.plugin = plugin + args.func = func + args.arguments = arguments + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_call(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = call_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.ex is not None: + raise result.ex + if result.e is not None: + raise result.e + raise TApplicationException(TApplicationException.MISSING_RESULT, "call failed: unknown result"); + + def getAllInfo(self, ): + self.send_getAllInfo() + return self.recv_getAllInfo() + + def send_getAllInfo(self, ): + self._oprot.writeMessageBegin('getAllInfo', TMessageType.CALL, self._seqid) + args = getAllInfo_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getAllInfo(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getAllInfo_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllInfo failed: unknown result"); + + def getInfoByPlugin(self, plugin): + """ + Parameters: + - plugin + """ + self.send_getInfoByPlugin(plugin) + return self.recv_getInfoByPlugin() + + def send_getInfoByPlugin(self, plugin): + self._oprot.writeMessageBegin('getInfoByPlugin', TMessageType.CALL, self._seqid) + args = getInfoByPlugin_args() + args.plugin = plugin + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getInfoByPlugin(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getInfoByPlugin_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getInfoByPlugin failed: unknown result"); + + +class Processor(Iface, TProcessor): + def __init__(self, handler): + self._handler = handler + self._processMap = {} + self._processMap["getServerVersion"] = Processor.process_getServerVersion + self._processMap["statusServer"] = Processor.process_statusServer + self._processMap["pauseServer"] = Processor.process_pauseServer + self._processMap["unpauseServer"] = Processor.process_unpauseServer + self._processMap["togglePause"] = Processor.process_togglePause + self._processMap["freeSpace"] = Processor.process_freeSpace + self._processMap["kill"] = Processor.process_kill + self._processMap["restart"] = Processor.process_restart + self._processMap["getLog"] = Processor.process_getLog + self._processMap["isTimeDownload"] = Processor.process_isTimeDownload + self._processMap["isTimeReconnect"] = Processor.process_isTimeReconnect + self._processMap["toggleReconnect"] = Processor.process_toggleReconnect + self._processMap["scanDownloadFolder"] = Processor.process_scanDownloadFolder + self._processMap["getProgressInfo"] = Processor.process_getProgressInfo + self._processMap["getConfigValue"] = Processor.process_getConfigValue + self._processMap["setConfigValue"] = Processor.process_setConfigValue + self._processMap["getConfig"] = Processor.process_getConfig + self._processMap["getPluginConfig"] = Processor.process_getPluginConfig + self._processMap["configureSection"] = Processor.process_configureSection + self._processMap["setConfigHandler"] = Processor.process_setConfigHandler + self._processMap["checkURLs"] = Processor.process_checkURLs + self._processMap["parseURLs"] = Processor.process_parseURLs + self._processMap["checkOnlineStatus"] = Processor.process_checkOnlineStatus + self._processMap["checkOnlineStatusContainer"] = Processor.process_checkOnlineStatusContainer + self._processMap["pollResults"] = Processor.process_pollResults + self._processMap["generatePackages"] = Processor.process_generatePackages + self._processMap["generateAndAddPackages"] = Processor.process_generateAndAddPackages + self._processMap["autoAddLinks"] = Processor.process_autoAddLinks + self._processMap["createPackage"] = Processor.process_createPackage + self._processMap["addPackage"] = Processor.process_addPackage + self._processMap["addPackageP"] = Processor.process_addPackageP + self._processMap["addPackageChild"] = Processor.process_addPackageChild + self._processMap["uploadContainer"] = Processor.process_uploadContainer + self._processMap["addLinks"] = Processor.process_addLinks + self._processMap["deleteFiles"] = Processor.process_deleteFiles + self._processMap["deletePackages"] = Processor.process_deletePackages + self._processMap["getCollector"] = Processor.process_getCollector + self._processMap["addToCollector"] = Processor.process_addToCollector + self._processMap["addFromCollector"] = Processor.process_addFromCollector + self._processMap["renameCollPack"] = Processor.process_renameCollPack + self._processMap["deleteCollPack"] = Processor.process_deleteCollPack + self._processMap["deleteCollLink"] = Processor.process_deleteCollLink + self._processMap["getAllFiles"] = Processor.process_getAllFiles + self._processMap["getAllUnfinishedFiles"] = Processor.process_getAllUnfinishedFiles + self._processMap["getFileTree"] = Processor.process_getFileTree + self._processMap["getUnfinishedFileTree"] = Processor.process_getUnfinishedFileTree + self._processMap["getPackageContent"] = Processor.process_getPackageContent + self._processMap["getPackageInfo"] = Processor.process_getPackageInfo + self._processMap["getFileInfo"] = Processor.process_getFileInfo + self._processMap["findFiles"] = Processor.process_findFiles + self._processMap["restartPackage"] = Processor.process_restartPackage + self._processMap["restartFile"] = Processor.process_restartFile + self._processMap["recheckPackage"] = Processor.process_recheckPackage + self._processMap["stopDownloads"] = Processor.process_stopDownloads + self._processMap["stopAllDownloads"] = Processor.process_stopAllDownloads + self._processMap["restartFailed"] = Processor.process_restartFailed + self._processMap["setFilePaused"] = Processor.process_setFilePaused + self._processMap["setPackagePaused"] = Processor.process_setPackagePaused + self._processMap["setPackageFolder"] = Processor.process_setPackageFolder + self._processMap["setPackageData"] = Processor.process_setPackageData + self._processMap["movePackage"] = Processor.process_movePackage + self._processMap["moveFiles"] = Processor.process_moveFiles + self._processMap["orderPackage"] = Processor.process_orderPackage + self._processMap["orderFiles"] = Processor.process_orderFiles + self._processMap["isInteractionWaiting"] = Processor.process_isInteractionWaiting + self._processMap["getInteractionTask"] = Processor.process_getInteractionTask + self._processMap["setInteractionResult"] = Processor.process_setInteractionResult + self._processMap["generateDownloadLink"] = Processor.process_generateDownloadLink + self._processMap["getAddonHandler"] = Processor.process_getAddonHandler + self._processMap["callAddonHandler"] = Processor.process_callAddonHandler + self._processMap["getEvents"] = Processor.process_getEvents + self._processMap["getAccounts"] = Processor.process_getAccounts + self._processMap["getAccountTypes"] = Processor.process_getAccountTypes + self._processMap["updateAccount"] = Processor.process_updateAccount + self._processMap["removeAccount"] = Processor.process_removeAccount + self._processMap["login"] = Processor.process_login + self._processMap["getUserData"] = Processor.process_getUserData + self._processMap["getAllUserData"] = Processor.process_getAllUserData + self._processMap["getServices"] = Processor.process_getServices + self._processMap["hasService"] = Processor.process_hasService + self._processMap["call"] = Processor.process_call + self._processMap["getAllInfo"] = Processor.process_getAllInfo + self._processMap["getInfoByPlugin"] = Processor.process_getInfoByPlugin + + def process(self, iprot, oprot): + (name, type, seqid) = iprot.readMessageBegin() + if name not in self._processMap: + iprot.skip(TType.STRUCT) + iprot.readMessageEnd() + x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) + oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) + x.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + return + else: + self._processMap[name](self, seqid, iprot, oprot) + return True + + def process_getServerVersion(self, seqid, iprot, oprot): + args = getServerVersion_args() + args.read(iprot) + iprot.readMessageEnd() + result = getServerVersion_result() + result.success = self._handler.getServerVersion() + oprot.writeMessageBegin("getServerVersion", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_statusServer(self, seqid, iprot, oprot): + args = statusServer_args() + args.read(iprot) + iprot.readMessageEnd() + result = statusServer_result() + result.success = self._handler.statusServer() + oprot.writeMessageBegin("statusServer", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pauseServer(self, seqid, iprot, oprot): + args = pauseServer_args() + args.read(iprot) + iprot.readMessageEnd() + result = pauseServer_result() + self._handler.pauseServer() + oprot.writeMessageBegin("pauseServer", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_unpauseServer(self, seqid, iprot, oprot): + args = unpauseServer_args() + args.read(iprot) + iprot.readMessageEnd() + result = unpauseServer_result() + self._handler.unpauseServer() + oprot.writeMessageBegin("unpauseServer", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_togglePause(self, seqid, iprot, oprot): + args = togglePause_args() + args.read(iprot) + iprot.readMessageEnd() + result = togglePause_result() + result.success = self._handler.togglePause() + oprot.writeMessageBegin("togglePause", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_freeSpace(self, seqid, iprot, oprot): args = freeSpace_args() args.read(iprot) iprot.readMessageEnd() - result = freeSpace_result() - result.success = self._handler.freeSpace() - oprot.writeMessageBegin("freeSpace", TMessageType.REPLY, seqid) + result = freeSpace_result() + result.success = self._handler.freeSpace() + oprot.writeMessageBegin("freeSpace", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_kill(self, seqid, iprot, oprot): + args = kill_args() + args.read(iprot) + iprot.readMessageEnd() + result = kill_result() + self._handler.kill() + oprot.writeMessageBegin("kill", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_restart(self, seqid, iprot, oprot): + args = restart_args() + args.read(iprot) + iprot.readMessageEnd() + result = restart_result() + self._handler.restart() + oprot.writeMessageBegin("restart", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getLog(self, seqid, iprot, oprot): + args = getLog_args() + args.read(iprot) + iprot.readMessageEnd() + result = getLog_result() + result.success = self._handler.getLog(args.offset) + oprot.writeMessageBegin("getLog", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_isTimeDownload(self, seqid, iprot, oprot): + args = isTimeDownload_args() + args.read(iprot) + iprot.readMessageEnd() + result = isTimeDownload_result() + result.success = self._handler.isTimeDownload() + oprot.writeMessageBegin("isTimeDownload", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_isTimeReconnect(self, seqid, iprot, oprot): + args = isTimeReconnect_args() + args.read(iprot) + iprot.readMessageEnd() + result = isTimeReconnect_result() + result.success = self._handler.isTimeReconnect() + oprot.writeMessageBegin("isTimeReconnect", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_toggleReconnect(self, seqid, iprot, oprot): + args = toggleReconnect_args() + args.read(iprot) + iprot.readMessageEnd() + result = toggleReconnect_result() + result.success = self._handler.toggleReconnect() + oprot.writeMessageBegin("toggleReconnect", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_scanDownloadFolder(self, seqid, iprot, oprot): + args = scanDownloadFolder_args() + args.read(iprot) + iprot.readMessageEnd() + result = scanDownloadFolder_result() + self._handler.scanDownloadFolder() + oprot.writeMessageBegin("scanDownloadFolder", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getProgressInfo(self, seqid, iprot, oprot): + args = getProgressInfo_args() + args.read(iprot) + iprot.readMessageEnd() + result = getProgressInfo_result() + result.success = self._handler.getProgressInfo() + oprot.writeMessageBegin("getProgressInfo", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getConfigValue(self, seqid, iprot, oprot): + args = getConfigValue_args() + args.read(iprot) + iprot.readMessageEnd() + result = getConfigValue_result() + result.success = self._handler.getConfigValue(args.section, args.option) + oprot.writeMessageBegin("getConfigValue", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_setConfigValue(self, seqid, iprot, oprot): + args = setConfigValue_args() + args.read(iprot) + iprot.readMessageEnd() + result = setConfigValue_result() + self._handler.setConfigValue(args.section, args.option, args.value) + oprot.writeMessageBegin("setConfigValue", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getConfig(self, seqid, iprot, oprot): + args = getConfig_args() + args.read(iprot) + iprot.readMessageEnd() + result = getConfig_result() + result.success = self._handler.getConfig() + oprot.writeMessageBegin("getConfig", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getPluginConfig(self, seqid, iprot, oprot): + args = getPluginConfig_args() + args.read(iprot) + iprot.readMessageEnd() + result = getPluginConfig_result() + result.success = self._handler.getPluginConfig() + oprot.writeMessageBegin("getPluginConfig", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_configureSection(self, seqid, iprot, oprot): + args = configureSection_args() + args.read(iprot) + iprot.readMessageEnd() + result = configureSection_result() + result.success = self._handler.configureSection(args.section) + oprot.writeMessageBegin("configureSection", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_setConfigHandler(self, seqid, iprot, oprot): + args = setConfigHandler_args() + args.read(iprot) + iprot.readMessageEnd() + result = setConfigHandler_result() + self._handler.setConfigHandler(args.plugin, args.iid, args.value) + oprot.writeMessageBegin("setConfigHandler", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_checkURLs(self, seqid, iprot, oprot): + args = checkURLs_args() + args.read(iprot) + iprot.readMessageEnd() + result = checkURLs_result() + result.success = self._handler.checkURLs(args.urls) + oprot.writeMessageBegin("checkURLs", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_parseURLs(self, seqid, iprot, oprot): + args = parseURLs_args() + args.read(iprot) + iprot.readMessageEnd() + result = parseURLs_result() + result.success = self._handler.parseURLs(args.html, args.url) + oprot.writeMessageBegin("parseURLs", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_checkOnlineStatus(self, seqid, iprot, oprot): + args = checkOnlineStatus_args() + args.read(iprot) + iprot.readMessageEnd() + result = checkOnlineStatus_result() + result.success = self._handler.checkOnlineStatus(args.urls) + oprot.writeMessageBegin("checkOnlineStatus", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_checkOnlineStatusContainer(self, seqid, iprot, oprot): + args = checkOnlineStatusContainer_args() + args.read(iprot) + iprot.readMessageEnd() + result = checkOnlineStatusContainer_result() + result.success = self._handler.checkOnlineStatusContainer(args.urls, args.filename, args.data) + oprot.writeMessageBegin("checkOnlineStatusContainer", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_pollResults(self, seqid, iprot, oprot): + args = pollResults_args() + args.read(iprot) + iprot.readMessageEnd() + result = pollResults_result() + result.success = self._handler.pollResults(args.rid) + oprot.writeMessageBegin("pollResults", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_generatePackages(self, seqid, iprot, oprot): + args = generatePackages_args() + args.read(iprot) + iprot.readMessageEnd() + result = generatePackages_result() + result.success = self._handler.generatePackages(args.links) + oprot.writeMessageBegin("generatePackages", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_generateAndAddPackages(self, seqid, iprot, oprot): + args = generateAndAddPackages_args() + args.read(iprot) + iprot.readMessageEnd() + result = generateAndAddPackages_result() + result.success = self._handler.generateAndAddPackages(args.links, args.paused) + oprot.writeMessageBegin("generateAndAddPackages", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_autoAddLinks(self, seqid, iprot, oprot): + args = autoAddLinks_args() + args.read(iprot) + iprot.readMessageEnd() + result = autoAddLinks_result() + result.success = self._handler.autoAddLinks(args.links) + oprot.writeMessageBegin("autoAddLinks", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_createPackage(self, seqid, iprot, oprot): + args = createPackage_args() + args.read(iprot) + iprot.readMessageEnd() + result = createPackage_result() + result.success = self._handler.createPackage(args.name, args.folder, args.root, args.password, args.site, args.comment, args.paused) + oprot.writeMessageBegin("createPackage", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_addPackage(self, seqid, iprot, oprot): + args = addPackage_args() + args.read(iprot) + iprot.readMessageEnd() + result = addPackage_result() + result.success = self._handler.addPackage(args.name, args.links, args.password) + oprot.writeMessageBegin("addPackage", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_addPackageP(self, seqid, iprot, oprot): + args = addPackageP_args() + args.read(iprot) + iprot.readMessageEnd() + result = addPackageP_result() + result.success = self._handler.addPackageP(args.name, args.links, args.password, args.paused) + oprot.writeMessageBegin("addPackageP", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_addPackageChild(self, seqid, iprot, oprot): + args = addPackageChild_args() + args.read(iprot) + iprot.readMessageEnd() + result = addPackageChild_result() + result.success = self._handler.addPackageChild(args.name, args.links, args.password, args.root, args.paused) + oprot.writeMessageBegin("addPackageChild", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_uploadContainer(self, seqid, iprot, oprot): + args = uploadContainer_args() + args.read(iprot) + iprot.readMessageEnd() + result = uploadContainer_result() + result.success = self._handler.uploadContainer(args.filename, args.data) + oprot.writeMessageBegin("uploadContainer", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_addLinks(self, seqid, iprot, oprot): + args = addLinks_args() + args.read(iprot) + iprot.readMessageEnd() + result = addLinks_result() + try: + self._handler.addLinks(args.pid, args.links) + except PackageDoesNotExists, e: + result.e = e + oprot.writeMessageBegin("addLinks", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_deleteFiles(self, seqid, iprot, oprot): + args = deleteFiles_args() + args.read(iprot) + iprot.readMessageEnd() + result = deleteFiles_result() + self._handler.deleteFiles(args.fids) + oprot.writeMessageBegin("deleteFiles", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_deletePackages(self, seqid, iprot, oprot): + args = deletePackages_args() + args.read(iprot) + iprot.readMessageEnd() + result = deletePackages_result() + self._handler.deletePackages(args.pids) + oprot.writeMessageBegin("deletePackages", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getCollector(self, seqid, iprot, oprot): + args = getCollector_args() + args.read(iprot) + iprot.readMessageEnd() + result = getCollector_result() + result.success = self._handler.getCollector() + oprot.writeMessageBegin("getCollector", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_addToCollector(self, seqid, iprot, oprot): + args = addToCollector_args() + args.read(iprot) + iprot.readMessageEnd() + result = addToCollector_result() + self._handler.addToCollector(args.links) + oprot.writeMessageBegin("addToCollector", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_addFromCollector(self, seqid, iprot, oprot): + args = addFromCollector_args() + args.read(iprot) + iprot.readMessageEnd() + result = addFromCollector_result() + result.success = self._handler.addFromCollector(args.name, args.paused) + oprot.writeMessageBegin("addFromCollector", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_renameCollPack(self, seqid, iprot, oprot): + args = renameCollPack_args() + args.read(iprot) + iprot.readMessageEnd() + result = renameCollPack_result() + self._handler.renameCollPack(args.name, args.new_name) + oprot.writeMessageBegin("renameCollPack", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_deleteCollPack(self, seqid, iprot, oprot): + args = deleteCollPack_args() + args.read(iprot) + iprot.readMessageEnd() + result = deleteCollPack_result() + self._handler.deleteCollPack(args.name) + oprot.writeMessageBegin("deleteCollPack", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_deleteCollLink(self, seqid, iprot, oprot): + args = deleteCollLink_args() + args.read(iprot) + iprot.readMessageEnd() + result = deleteCollLink_result() + self._handler.deleteCollLink(args.url) + oprot.writeMessageBegin("deleteCollLink", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getAllFiles(self, seqid, iprot, oprot): + args = getAllFiles_args() + args.read(iprot) + iprot.readMessageEnd() + result = getAllFiles_result() + result.success = self._handler.getAllFiles() + oprot.writeMessageBegin("getAllFiles", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getAllUnfinishedFiles(self, seqid, iprot, oprot): + args = getAllUnfinishedFiles_args() + args.read(iprot) + iprot.readMessageEnd() + result = getAllUnfinishedFiles_result() + result.success = self._handler.getAllUnfinishedFiles() + oprot.writeMessageBegin("getAllUnfinishedFiles", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getFileTree(self, seqid, iprot, oprot): + args = getFileTree_args() + args.read(iprot) + iprot.readMessageEnd() + result = getFileTree_result() + result.success = self._handler.getFileTree(args.pid, args.full) + oprot.writeMessageBegin("getFileTree", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getUnfinishedFileTree(self, seqid, iprot, oprot): + args = getUnfinishedFileTree_args() + args.read(iprot) + iprot.readMessageEnd() + result = getUnfinishedFileTree_result() + result.success = self._handler.getUnfinishedFileTree(args.pid, args.full) + oprot.writeMessageBegin("getUnfinishedFileTree", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getPackageContent(self, seqid, iprot, oprot): + args = getPackageContent_args() + args.read(iprot) + iprot.readMessageEnd() + result = getPackageContent_result() + result.success = self._handler.getPackageContent(args.pid) + oprot.writeMessageBegin("getPackageContent", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getPackageInfo(self, seqid, iprot, oprot): + args = getPackageInfo_args() + args.read(iprot) + iprot.readMessageEnd() + result = getPackageInfo_result() + try: + result.success = self._handler.getPackageInfo(args.pid) + except PackageDoesNotExists, e: + result.e = e + oprot.writeMessageBegin("getPackageInfo", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getFileInfo(self, seqid, iprot, oprot): + args = getFileInfo_args() + args.read(iprot) + iprot.readMessageEnd() + result = getFileInfo_result() + try: + result.success = self._handler.getFileInfo(args.fid) + except FileDoesNotExists, e: + result.e = e + oprot.writeMessageBegin("getFileInfo", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_getServerVersion(self, seqid, iprot, oprot): - args = getServerVersion_args() + def process_findFiles(self, seqid, iprot, oprot): + args = findFiles_args() args.read(iprot) iprot.readMessageEnd() - result = getServerVersion_result() - result.success = self._handler.getServerVersion() - oprot.writeMessageBegin("getServerVersion", TMessageType.REPLY, seqid) + result = findFiles_result() + result.success = self._handler.findFiles(args.pattern) + oprot.writeMessageBegin("findFiles", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_kill(self, seqid, iprot, oprot): - args = kill_args() + def process_restartPackage(self, seqid, iprot, oprot): + args = restartPackage_args() args.read(iprot) iprot.readMessageEnd() - result = kill_result() - self._handler.kill() - oprot.writeMessageBegin("kill", TMessageType.REPLY, seqid) + result = restartPackage_result() + self._handler.restartPackage(args.pid) + oprot.writeMessageBegin("restartPackage", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_restart(self, seqid, iprot, oprot): - args = restart_args() + def process_restartFile(self, seqid, iprot, oprot): + args = restartFile_args() args.read(iprot) iprot.readMessageEnd() - result = restart_result() - self._handler.restart() - oprot.writeMessageBegin("restart", TMessageType.REPLY, seqid) + result = restartFile_result() + self._handler.restartFile(args.fid) + oprot.writeMessageBegin("restartFile", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_getLog(self, seqid, iprot, oprot): - args = getLog_args() + def process_recheckPackage(self, seqid, iprot, oprot): + args = recheckPackage_args() args.read(iprot) iprot.readMessageEnd() - result = getLog_result() - result.success = self._handler.getLog(args.offset) - oprot.writeMessageBegin("getLog", TMessageType.REPLY, seqid) + result = recheckPackage_result() + self._handler.recheckPackage(args.pid) + oprot.writeMessageBegin("recheckPackage", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_stopDownloads(self, seqid, iprot, oprot): + args = stopDownloads_args() + args.read(iprot) + iprot.readMessageEnd() + result = stopDownloads_result() + self._handler.stopDownloads(args.fids) + oprot.writeMessageBegin("stopDownloads", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_stopAllDownloads(self, seqid, iprot, oprot): + args = stopAllDownloads_args() + args.read(iprot) + iprot.readMessageEnd() + result = stopAllDownloads_result() + self._handler.stopAllDownloads() + oprot.writeMessageBegin("stopAllDownloads", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_restartFailed(self, seqid, iprot, oprot): + args = restartFailed_args() + args.read(iprot) + iprot.readMessageEnd() + result = restartFailed_result() + self._handler.restartFailed() + oprot.writeMessageBegin("restartFailed", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_setFilePaused(self, seqid, iprot, oprot): + args = setFilePaused_args() + args.read(iprot) + iprot.readMessageEnd() + result = setFilePaused_result() + try: + self._handler.setFilePaused(args.fid, args.paused) + except FileDoesNotExists, e: + result.e = e + oprot.writeMessageBegin("setFilePaused", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_setPackagePaused(self, seqid, iprot, oprot): + args = setPackagePaused_args() + args.read(iprot) + iprot.readMessageEnd() + result = setPackagePaused_result() + try: + self._handler.setPackagePaused(args.pid, args.paused) + except PackageDoesNotExists, e: + result.e = e + oprot.writeMessageBegin("setPackagePaused", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_setPackageFolder(self, seqid, iprot, oprot): + args = setPackageFolder_args() + args.read(iprot) + iprot.readMessageEnd() + result = setPackageFolder_result() + try: + result.success = self._handler.setPackageFolder(args.pid, args.path) + except PackageDoesNotExists, e: + result.e = e + oprot.writeMessageBegin("setPackageFolder", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_setPackageData(self, seqid, iprot, oprot): + args = setPackageData_args() + args.read(iprot) + iprot.readMessageEnd() + result = setPackageData_result() + try: + self._handler.setPackageData(args.pid, args.data) + except PackageDoesNotExists, e: + result.e = e + oprot.writeMessageBegin("setPackageData", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_movePackage(self, seqid, iprot, oprot): + args = movePackage_args() + args.read(iprot) + iprot.readMessageEnd() + result = movePackage_result() + try: + result.success = self._handler.movePackage(args.pid, args.root) + except PackageDoesNotExists, e: + result.e = e + oprot.writeMessageBegin("movePackage", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_moveFiles(self, seqid, iprot, oprot): + args = moveFiles_args() + args.read(iprot) + iprot.readMessageEnd() + result = moveFiles_result() + try: + result.success = self._handler.moveFiles(args.fids, args.pid) + except PackageDoesNotExists, e: + result.e = e + oprot.writeMessageBegin("moveFiles", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_orderPackage(self, seqid, iprot, oprot): + args = orderPackage_args() + args.read(iprot) + iprot.readMessageEnd() + result = orderPackage_result() + self._handler.orderPackage(args.pids, args.position) + oprot.writeMessageBegin("orderPackage", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_orderFiles(self, seqid, iprot, oprot): + args = orderFiles_args() + args.read(iprot) + iprot.readMessageEnd() + result = orderFiles_result() + self._handler.orderFiles(args.fids, args.pid, args.position) + oprot.writeMessageBegin("orderFiles", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_isInteractionWaiting(self, seqid, iprot, oprot): + args = isInteractionWaiting_args() + args.read(iprot) + iprot.readMessageEnd() + result = isInteractionWaiting_result() + result.success = self._handler.isInteractionWaiting(args.mode) + oprot.writeMessageBegin("isInteractionWaiting", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getInteractionTask(self, seqid, iprot, oprot): + args = getInteractionTask_args() + args.read(iprot) + iprot.readMessageEnd() + result = getInteractionTask_result() + result.success = self._handler.getInteractionTask(args.mode) + oprot.writeMessageBegin("getInteractionTask", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_setInteractionResult(self, seqid, iprot, oprot): + args = setInteractionResult_args() + args.read(iprot) + iprot.readMessageEnd() + result = setInteractionResult_result() + self._handler.setInteractionResult(args.iid, args.result) + oprot.writeMessageBegin("setInteractionResult", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_generateDownloadLink(self, seqid, iprot, oprot): + args = generateDownloadLink_args() + args.read(iprot) + iprot.readMessageEnd() + result = generateDownloadLink_result() + result.success = self._handler.generateDownloadLink(args.fid, args.timeout) + oprot.writeMessageBegin("generateDownloadLink", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getAddonHandler(self, seqid, iprot, oprot): + args = getAddonHandler_args() + args.read(iprot) + iprot.readMessageEnd() + result = getAddonHandler_result() + result.success = self._handler.getAddonHandler() + oprot.writeMessageBegin("getAddonHandler", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_callAddonHandler(self, seqid, iprot, oprot): + args = callAddonHandler_args() + args.read(iprot) + iprot.readMessageEnd() + result = callAddonHandler_result() + self._handler.callAddonHandler(args.plugin, args.func, args.pid_or_fid) + oprot.writeMessageBegin("callAddonHandler", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getEvents(self, seqid, iprot, oprot): + args = getEvents_args() + args.read(iprot) + iprot.readMessageEnd() + result = getEvents_result() + result.success = self._handler.getEvents(args.uuid) + oprot.writeMessageBegin("getEvents", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getAccounts(self, seqid, iprot, oprot): + args = getAccounts_args() + args.read(iprot) + iprot.readMessageEnd() + result = getAccounts_result() + result.success = self._handler.getAccounts(args.refresh) + oprot.writeMessageBegin("getAccounts", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getAccountTypes(self, seqid, iprot, oprot): + args = getAccountTypes_args() + args.read(iprot) + iprot.readMessageEnd() + result = getAccountTypes_result() + result.success = self._handler.getAccountTypes() + oprot.writeMessageBegin("getAccountTypes", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_updateAccount(self, seqid, iprot, oprot): + args = updateAccount_args() + args.read(iprot) + iprot.readMessageEnd() + result = updateAccount_result() + self._handler.updateAccount(args.plugin, args.account, args.password, args.options) + oprot.writeMessageBegin("updateAccount", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_removeAccount(self, seqid, iprot, oprot): + args = removeAccount_args() + args.read(iprot) + iprot.readMessageEnd() + result = removeAccount_result() + self._handler.removeAccount(args.plugin, args.account) + oprot.writeMessageBegin("removeAccount", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_login(self, seqid, iprot, oprot): + args = login_args() + args.read(iprot) + iprot.readMessageEnd() + result = login_result() + result.success = self._handler.login(args.username, args.password) + oprot.writeMessageBegin("login", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_isTimeDownload(self, seqid, iprot, oprot): - args = isTimeDownload_args() + def process_getUserData(self, seqid, iprot, oprot): + args = getUserData_args() args.read(iprot) iprot.readMessageEnd() - result = isTimeDownload_result() - result.success = self._handler.isTimeDownload() - oprot.writeMessageBegin("isTimeDownload", TMessageType.REPLY, seqid) + result = getUserData_result() + try: + result.success = self._handler.getUserData(args.username, args.password) + except UserDoesNotExists, ex: + result.ex = ex + oprot.writeMessageBegin("getUserData", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_isTimeReconnect(self, seqid, iprot, oprot): - args = isTimeReconnect_args() + def process_getAllUserData(self, seqid, iprot, oprot): + args = getAllUserData_args() args.read(iprot) iprot.readMessageEnd() - result = isTimeReconnect_result() - result.success = self._handler.isTimeReconnect() - oprot.writeMessageBegin("isTimeReconnect", TMessageType.REPLY, seqid) + result = getAllUserData_result() + result.success = self._handler.getAllUserData() + oprot.writeMessageBegin("getAllUserData", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_toggleReconnect(self, seqid, iprot, oprot): - args = toggleReconnect_args() + def process_getServices(self, seqid, iprot, oprot): + args = getServices_args() args.read(iprot) iprot.readMessageEnd() - result = toggleReconnect_result() - result.success = self._handler.toggleReconnect() - oprot.writeMessageBegin("toggleReconnect", TMessageType.REPLY, seqid) + result = getServices_result() + result.success = self._handler.getServices() + oprot.writeMessageBegin("getServices", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_generatePackages(self, seqid, iprot, oprot): - args = generatePackages_args() + def process_hasService(self, seqid, iprot, oprot): + args = hasService_args() args.read(iprot) iprot.readMessageEnd() - result = generatePackages_result() - result.success = self._handler.generatePackages(args.links) - oprot.writeMessageBegin("generatePackages", TMessageType.REPLY, seqid) + result = hasService_result() + result.success = self._handler.hasService(args.plugin, args.func) + oprot.writeMessageBegin("hasService", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_checkURLs(self, seqid, iprot, oprot): - args = checkURLs_args() + def process_call(self, seqid, iprot, oprot): + args = call_args() args.read(iprot) iprot.readMessageEnd() - result = checkURLs_result() - result.success = self._handler.checkURLs(args.urls) - oprot.writeMessageBegin("checkURLs", TMessageType.REPLY, seqid) + result = call_result() + try: + result.success = self._handler.call(args.plugin, args.func, args.arguments) + except ServiceDoesNotExists, ex: + result.ex = ex + except ServiceException, e: + result.e = e + oprot.writeMessageBegin("call", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_parseURLs(self, seqid, iprot, oprot): - args = parseURLs_args() + def process_getAllInfo(self, seqid, iprot, oprot): + args = getAllInfo_args() args.read(iprot) iprot.readMessageEnd() - result = parseURLs_result() - result.success = self._handler.parseURLs(args.html, args.url) - oprot.writeMessageBegin("parseURLs", TMessageType.REPLY, seqid) + result = getAllInfo_result() + result.success = self._handler.getAllInfo() + oprot.writeMessageBegin("getAllInfo", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_checkOnlineStatus(self, seqid, iprot, oprot): - args = checkOnlineStatus_args() + def process_getInfoByPlugin(self, seqid, iprot, oprot): + args = getInfoByPlugin_args() args.read(iprot) iprot.readMessageEnd() - result = checkOnlineStatus_result() - result.success = self._handler.checkOnlineStatus(args.urls) - oprot.writeMessageBegin("checkOnlineStatus", TMessageType.REPLY, seqid) + result = getInfoByPlugin_result() + result.success = self._handler.getInfoByPlugin(args.plugin) + oprot.writeMessageBegin("getInfoByPlugin", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_checkOnlineStatusContainer(self, seqid, iprot, oprot): - args = checkOnlineStatusContainer_args() - args.read(iprot) - iprot.readMessageEnd() - result = checkOnlineStatusContainer_result() - result.success = self._handler.checkOnlineStatusContainer(args.urls, args.filename, args.data) - oprot.writeMessageBegin("checkOnlineStatusContainer", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_pollResults(self, seqid, iprot, oprot): - args = pollResults_args() - args.read(iprot) - iprot.readMessageEnd() - result = pollResults_result() - result.success = self._handler.pollResults(args.rid) - oprot.writeMessageBegin("pollResults", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +# HELPER FUNCTIONS AND STRUCTURES + +class getServerVersion_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class getServerVersion_result(TBase): + """ + Attributes: + - success + """ + + __slots__ = [ + 'success', + ] + + thrift_spec = ( + (0, TType.STRING, 'success', None, None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + +class statusServer_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class statusServer_result(TBase): + """ + Attributes: + - success + """ + + __slots__ = [ + 'success', + ] + + thrift_spec = ( + (0, TType.STRUCT, 'success', (ServerStatus, ServerStatus.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + +class pauseServer_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class pauseServer_result(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class unpauseServer_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class unpauseServer_result(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class togglePause_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class togglePause_result(TBase): + """ + Attributes: + - success + """ + + __slots__ = [ + 'success', + ] + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + +class freeSpace_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class freeSpace_result(TBase): + """ + Attributes: + - success + """ + + __slots__ = [ + 'success', + ] + + thrift_spec = ( + (0, TType.I64, 'success', None, None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + +class kill_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class kill_result(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class restart_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class restart_result(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) - def process_statusDownloads(self, seqid, iprot, oprot): - args = statusDownloads_args() - args.read(iprot) - iprot.readMessageEnd() - result = statusDownloads_result() - result.success = self._handler.statusDownloads() - oprot.writeMessageBegin("statusDownloads", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_getPackageData(self, seqid, iprot, oprot): - args = getPackageData_args() - args.read(iprot) - iprot.readMessageEnd() - result = getPackageData_result() - try: - result.success = self._handler.getPackageData(args.pid) - except PackageDoesNotExists, e: - result.e = e - oprot.writeMessageBegin("getPackageData", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +class getLog_args(TBase): + """ + Attributes: + - offset + """ - def process_getPackageInfo(self, seqid, iprot, oprot): - args = getPackageInfo_args() - args.read(iprot) - iprot.readMessageEnd() - result = getPackageInfo_result() - try: - result.success = self._handler.getPackageInfo(args.pid) - except PackageDoesNotExists, e: - result.e = e - oprot.writeMessageBegin("getPackageInfo", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + __slots__ = [ + 'offset', + ] - def process_getFileData(self, seqid, iprot, oprot): - args = getFileData_args() - args.read(iprot) - iprot.readMessageEnd() - result = getFileData_result() - try: - result.success = self._handler.getFileData(args.fid) - except FileDoesNotExists, e: - result.e = e - oprot.writeMessageBegin("getFileData", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + thrift_spec = ( + None, # 0 + (1, TType.I32, 'offset', None, None, ), # 1 + ) - def process_getQueue(self, seqid, iprot, oprot): - args = getQueue_args() - args.read(iprot) - iprot.readMessageEnd() - result = getQueue_result() - result.success = self._handler.getQueue() - oprot.writeMessageBegin("getQueue", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __init__(self, offset=None,): + self.offset = offset - def process_getCollector(self, seqid, iprot, oprot): - args = getCollector_args() - args.read(iprot) - iprot.readMessageEnd() - result = getCollector_result() - result.success = self._handler.getCollector() - oprot.writeMessageBegin("getCollector", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_getQueueData(self, seqid, iprot, oprot): - args = getQueueData_args() - args.read(iprot) - iprot.readMessageEnd() - result = getQueueData_result() - result.success = self._handler.getQueueData() - oprot.writeMessageBegin("getQueueData", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +class getLog_result(TBase): + """ + Attributes: + - success + """ - def process_getCollectorData(self, seqid, iprot, oprot): - args = getCollectorData_args() - args.read(iprot) - iprot.readMessageEnd() - result = getCollectorData_result() - result.success = self._handler.getCollectorData() - oprot.writeMessageBegin("getCollectorData", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + __slots__ = [ + 'success', + ] - def process_getPackageOrder(self, seqid, iprot, oprot): - args = getPackageOrder_args() - args.read(iprot) - iprot.readMessageEnd() - result = getPackageOrder_result() - result.success = self._handler.getPackageOrder(args.destination) - oprot.writeMessageBegin("getPackageOrder", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + ) - def process_getFileOrder(self, seqid, iprot, oprot): - args = getFileOrder_args() - args.read(iprot) - iprot.readMessageEnd() - result = getFileOrder_result() - result.success = self._handler.getFileOrder(args.pid) - oprot.writeMessageBegin("getFileOrder", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __init__(self, success=None,): + self.success = success - def process_generateAndAddPackages(self, seqid, iprot, oprot): - args = generateAndAddPackages_args() - args.read(iprot) - iprot.readMessageEnd() - result = generateAndAddPackages_result() - result.success = self._handler.generateAndAddPackages(args.links, args.dest) - oprot.writeMessageBegin("generateAndAddPackages", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_addPackage(self, seqid, iprot, oprot): - args = addPackage_args() - args.read(iprot) - iprot.readMessageEnd() - result = addPackage_result() - result.success = self._handler.addPackage(args.name, args.links, args.dest, args.password) - oprot.writeMessageBegin("addPackage", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +class isTimeDownload_args(TBase): - def process_addFiles(self, seqid, iprot, oprot): - args = addFiles_args() - args.read(iprot) - iprot.readMessageEnd() - result = addFiles_result() - self._handler.addFiles(args.pid, args.links) - oprot.writeMessageBegin("addFiles", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + __slots__ = [ + ] - def process_uploadContainer(self, seqid, iprot, oprot): - args = uploadContainer_args() - args.read(iprot) - iprot.readMessageEnd() - result = uploadContainer_result() - self._handler.uploadContainer(args.filename, args.data) - oprot.writeMessageBegin("uploadContainer", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + thrift_spec = ( + ) - def process_deleteFiles(self, seqid, iprot, oprot): - args = deleteFiles_args() - args.read(iprot) - iprot.readMessageEnd() - result = deleteFiles_result() - self._handler.deleteFiles(args.fids) - oprot.writeMessageBegin("deleteFiles", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_deletePackages(self, seqid, iprot, oprot): - args = deletePackages_args() - args.read(iprot) - iprot.readMessageEnd() - result = deletePackages_result() - self._handler.deletePackages(args.pids) - oprot.writeMessageBegin("deletePackages", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +class isTimeDownload_result(TBase): + """ + Attributes: + - success + """ - def process_pushToQueue(self, seqid, iprot, oprot): - args = pushToQueue_args() - args.read(iprot) - iprot.readMessageEnd() - result = pushToQueue_result() - self._handler.pushToQueue(args.pid) - oprot.writeMessageBegin("pushToQueue", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + __slots__ = [ + 'success', + ] - def process_pullFromQueue(self, seqid, iprot, oprot): - args = pullFromQueue_args() - args.read(iprot) - iprot.readMessageEnd() - result = pullFromQueue_result() - self._handler.pullFromQueue(args.pid) - oprot.writeMessageBegin("pullFromQueue", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + ) - def process_restartPackage(self, seqid, iprot, oprot): - args = restartPackage_args() - args.read(iprot) - iprot.readMessageEnd() - result = restartPackage_result() - self._handler.restartPackage(args.pid) - oprot.writeMessageBegin("restartPackage", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __init__(self, success=None,): + self.success = success - def process_restartFile(self, seqid, iprot, oprot): - args = restartFile_args() - args.read(iprot) - iprot.readMessageEnd() - result = restartFile_result() - self._handler.restartFile(args.fid) - oprot.writeMessageBegin("restartFile", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_recheckPackage(self, seqid, iprot, oprot): - args = recheckPackage_args() - args.read(iprot) - iprot.readMessageEnd() - result = recheckPackage_result() - self._handler.recheckPackage(args.pid) - oprot.writeMessageBegin("recheckPackage", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +class isTimeReconnect_args(TBase): - def process_stopAllDownloads(self, seqid, iprot, oprot): - args = stopAllDownloads_args() - args.read(iprot) - iprot.readMessageEnd() - result = stopAllDownloads_result() - self._handler.stopAllDownloads() - oprot.writeMessageBegin("stopAllDownloads", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + __slots__ = [ + ] + + thrift_spec = ( + ) - def process_stopDownloads(self, seqid, iprot, oprot): - args = stopDownloads_args() - args.read(iprot) - iprot.readMessageEnd() - result = stopDownloads_result() - self._handler.stopDownloads(args.fids) - oprot.writeMessageBegin("stopDownloads", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_setPackageName(self, seqid, iprot, oprot): - args = setPackageName_args() - args.read(iprot) - iprot.readMessageEnd() - result = setPackageName_result() - self._handler.setPackageName(args.pid, args.name) - oprot.writeMessageBegin("setPackageName", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +class isTimeReconnect_result(TBase): + """ + Attributes: + - success + """ - def process_movePackage(self, seqid, iprot, oprot): - args = movePackage_args() - args.read(iprot) - iprot.readMessageEnd() - result = movePackage_result() - self._handler.movePackage(args.destination, args.pid) - oprot.writeMessageBegin("movePackage", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + __slots__ = [ + 'success', + ] - def process_moveFiles(self, seqid, iprot, oprot): - args = moveFiles_args() - args.read(iprot) - iprot.readMessageEnd() - result = moveFiles_result() - self._handler.moveFiles(args.fids, args.pid) - oprot.writeMessageBegin("moveFiles", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + ) - def process_orderPackage(self, seqid, iprot, oprot): - args = orderPackage_args() - args.read(iprot) - iprot.readMessageEnd() - result = orderPackage_result() - self._handler.orderPackage(args.pid, args.position) - oprot.writeMessageBegin("orderPackage", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __init__(self, success=None,): + self.success = success - def process_orderFile(self, seqid, iprot, oprot): - args = orderFile_args() - args.read(iprot) - iprot.readMessageEnd() - result = orderFile_result() - self._handler.orderFile(args.fid, args.position) - oprot.writeMessageBegin("orderFile", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_setPackageData(self, seqid, iprot, oprot): - args = setPackageData_args() - args.read(iprot) - iprot.readMessageEnd() - result = setPackageData_result() - try: - self._handler.setPackageData(args.pid, args.data) - except PackageDoesNotExists, e: - result.e = e - oprot.writeMessageBegin("setPackageData", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +class toggleReconnect_args(TBase): - def process_deleteFinished(self, seqid, iprot, oprot): - args = deleteFinished_args() - args.read(iprot) - iprot.readMessageEnd() - result = deleteFinished_result() - result.success = self._handler.deleteFinished() - oprot.writeMessageBegin("deleteFinished", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + __slots__ = [ + ] - def process_restartFailed(self, seqid, iprot, oprot): - args = restartFailed_args() - args.read(iprot) - iprot.readMessageEnd() - result = restartFailed_result() - self._handler.restartFailed() - oprot.writeMessageBegin("restartFailed", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + thrift_spec = ( + ) - def process_getEvents(self, seqid, iprot, oprot): - args = getEvents_args() - args.read(iprot) - iprot.readMessageEnd() - result = getEvents_result() - result.success = self._handler.getEvents(args.uuid) - oprot.writeMessageBegin("getEvents", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_getAccounts(self, seqid, iprot, oprot): - args = getAccounts_args() - args.read(iprot) - iprot.readMessageEnd() - result = getAccounts_result() - result.success = self._handler.getAccounts(args.refresh) - oprot.writeMessageBegin("getAccounts", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +class toggleReconnect_result(TBase): + """ + Attributes: + - success + """ - def process_getAccountTypes(self, seqid, iprot, oprot): - args = getAccountTypes_args() - args.read(iprot) - iprot.readMessageEnd() - result = getAccountTypes_result() - result.success = self._handler.getAccountTypes() - oprot.writeMessageBegin("getAccountTypes", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + __slots__ = [ + 'success', + ] - def process_updateAccount(self, seqid, iprot, oprot): - args = updateAccount_args() - args.read(iprot) - iprot.readMessageEnd() - result = updateAccount_result() - self._handler.updateAccount(args.plugin, args.account, args.password, args.options) - oprot.writeMessageBegin("updateAccount", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + ) - def process_removeAccount(self, seqid, iprot, oprot): - args = removeAccount_args() - args.read(iprot) - iprot.readMessageEnd() - result = removeAccount_result() - self._handler.removeAccount(args.plugin, args.account) - oprot.writeMessageBegin("removeAccount", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __init__(self, success=None,): + self.success = success - def process_login(self, seqid, iprot, oprot): - args = login_args() - args.read(iprot) - iprot.readMessageEnd() - result = login_result() - result.success = self._handler.login(args.username, args.password) - oprot.writeMessageBegin("login", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_getUserData(self, seqid, iprot, oprot): - args = getUserData_args() - args.read(iprot) - iprot.readMessageEnd() - result = getUserData_result() - try: - result.success = self._handler.getUserData(args.username, args.password) - except UserDoesNotExists, ex: - result.ex = ex - oprot.writeMessageBegin("getUserData", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +class scanDownloadFolder_args(TBase): - def process_getAllUserData(self, seqid, iprot, oprot): - args = getAllUserData_args() - args.read(iprot) - iprot.readMessageEnd() - result = getAllUserData_result() - result.success = self._handler.getAllUserData() - oprot.writeMessageBegin("getAllUserData", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + __slots__ = [ + ] - def process_getServices(self, seqid, iprot, oprot): - args = getServices_args() - args.read(iprot) - iprot.readMessageEnd() - result = getServices_result() - result.success = self._handler.getServices() - oprot.writeMessageBegin("getServices", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + thrift_spec = ( + ) - def process_hasService(self, seqid, iprot, oprot): - args = hasService_args() - args.read(iprot) - iprot.readMessageEnd() - result = hasService_result() - result.success = self._handler.hasService(args.plugin, args.func) - oprot.writeMessageBegin("hasService", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_call(self, seqid, iprot, oprot): - args = call_args() - args.read(iprot) - iprot.readMessageEnd() - result = call_result() - try: - result.success = self._handler.call(args.info) - except ServiceDoesNotExists, ex: - result.ex = ex - except ServiceException, e: - result.e = e - oprot.writeMessageBegin("call", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +class scanDownloadFolder_result(TBase): - def process_getAllInfo(self, seqid, iprot, oprot): - args = getAllInfo_args() - args.read(iprot) - iprot.readMessageEnd() - result = getAllInfo_result() - result.success = self._handler.getAllInfo() - oprot.writeMessageBegin("getAllInfo", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + __slots__ = [ + ] - def process_getInfoByPlugin(self, seqid, iprot, oprot): - args = getInfoByPlugin_args() - args.read(iprot) - iprot.readMessageEnd() - result = getInfoByPlugin_result() - result.success = self._handler.getInfoByPlugin(args.plugin) - oprot.writeMessageBegin("getInfoByPlugin", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + thrift_spec = ( + ) - def process_isCaptchaWaiting(self, seqid, iprot, oprot): - args = isCaptchaWaiting_args() - args.read(iprot) - iprot.readMessageEnd() - result = isCaptchaWaiting_result() - result.success = self._handler.isCaptchaWaiting() - oprot.writeMessageBegin("isCaptchaWaiting", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_getCaptchaTask(self, seqid, iprot, oprot): - args = getCaptchaTask_args() - args.read(iprot) - iprot.readMessageEnd() - result = getCaptchaTask_result() - result.success = self._handler.getCaptchaTask(args.exclusive) - oprot.writeMessageBegin("getCaptchaTask", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +class getProgressInfo_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) - def process_getCaptchaTaskStatus(self, seqid, iprot, oprot): - args = getCaptchaTaskStatus_args() - args.read(iprot) - iprot.readMessageEnd() - result = getCaptchaTaskStatus_result() - result.success = self._handler.getCaptchaTaskStatus(args.tid) - oprot.writeMessageBegin("getCaptchaTaskStatus", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_setCaptchaResult(self, seqid, iprot, oprot): - args = setCaptchaResult_args() - args.read(iprot) - iprot.readMessageEnd() - result = setCaptchaResult_result() - self._handler.setCaptchaResult(args.tid, args.result) - oprot.writeMessageBegin("setCaptchaResult", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() +class getProgressInfo_result(TBase): + """ + Attributes: + - success + """ + + __slots__ = [ + 'success', + ] + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(ProgressInfo, ProgressInfo.thrift_spec)), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success -# HELPER FUNCTIONS AND STRUCTURES class getConfigValue_args(TBase): """ @@ -3518,16 +4555,34 @@ class configureSection_result(TBase): self.success = success -class pauseServer_args(TBase): +class setConfigHandler_args(TBase): + """ + Attributes: + - plugin + - iid + - value + """ __slots__ = [ + 'plugin', + 'iid', + 'value', ] thrift_spec = ( + None, # 0 + (1, TType.STRING, 'plugin', None, None, ), # 1 + (2, TType.I32, 'iid', None, None, ), # 2 + (3, TType.STRING, 'value', None, None, ), # 3 ) + def __init__(self, plugin=None, iid=None, value=None,): + self.plugin = plugin + self.iid = iid + self.value = value -class pauseServer_result(TBase): + +class setConfigHandler_result(TBase): __slots__ = [ ] @@ -3536,34 +4591,67 @@ class pauseServer_result(TBase): ) -class unpauseServer_args(TBase): +class checkURLs_args(TBase): + """ + Attributes: + - urls + """ __slots__ = [ + 'urls', ] thrift_spec = ( + None, # 0 + (1, TType.LIST, 'urls', (TType.STRING,None), None, ), # 1 ) + def __init__(self, urls=None,): + self.urls = urls -class unpauseServer_result(TBase): + +class checkURLs_result(TBase): + """ + Attributes: + - success + """ __slots__ = [ + 'success', ] thrift_spec = ( + (0, TType.MAP, 'success', (TType.STRING,None,TType.LIST,(TType.STRING,None)), None, ), # 0 ) + def __init__(self, success=None,): + self.success = success -class togglePause_args(TBase): + +class parseURLs_args(TBase): + """ + Attributes: + - html + - url + """ __slots__ = [ + 'html', + 'url', ] thrift_spec = ( + None, # 0 + (1, TType.STRING, 'html', None, None, ), # 1 + (2, TType.STRING, 'url', None, None, ), # 2 ) + def __init__(self, html=None, url=None,): + self.html = html + self.url = url + -class togglePause_result(TBase): +class parseURLs_result(TBase): """ Attributes: - success @@ -3574,23 +4662,33 @@ class togglePause_result(TBase): ] thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + (0, TType.MAP, 'success', (TType.STRING,None,TType.LIST,(TType.STRING,None)), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class statusServer_args(TBase): +class checkOnlineStatus_args(TBase): + """ + Attributes: + - urls + """ __slots__ = [ + 'urls', ] thrift_spec = ( + None, # 0 + (1, TType.LIST, 'urls', (TType.STRING,None), None, ), # 1 ) + def __init__(self, urls=None,): + self.urls = urls -class statusServer_result(TBase): + +class checkOnlineStatus_result(TBase): """ Attributes: - success @@ -3601,23 +4699,41 @@ class statusServer_result(TBase): ] thrift_spec = ( - (0, TType.STRUCT, 'success', (ServerStatus, ServerStatus.thrift_spec), None, ), # 0 + (0, TType.STRUCT, 'success', (OnlineCheck, OnlineCheck.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class freeSpace_args(TBase): +class checkOnlineStatusContainer_args(TBase): + """ + Attributes: + - urls + - filename + - data + """ __slots__ = [ + 'urls', + 'filename', + 'data', ] thrift_spec = ( + None, # 0 + (1, TType.LIST, 'urls', (TType.STRING,None), None, ), # 1 + (2, TType.STRING, 'filename', None, None, ), # 2 + (3, TType.STRING, 'data', None, None, ), # 3 ) + def __init__(self, urls=None, filename=None, data=None,): + self.urls = urls + self.filename = filename + self.data = data + -class freeSpace_result(TBase): +class checkOnlineStatusContainer_result(TBase): """ Attributes: - success @@ -3628,23 +4744,33 @@ class freeSpace_result(TBase): ] thrift_spec = ( - (0, TType.I64, 'success', None, None, ), # 0 + (0, TType.STRUCT, 'success', (OnlineCheck, OnlineCheck.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class getServerVersion_args(TBase): +class pollResults_args(TBase): + """ + Attributes: + - rid + """ __slots__ = [ + 'rid', ] thrift_spec = ( + None, # 0 + (1, TType.I32, 'rid', None, None, ), # 1 ) + def __init__(self, rid=None,): + self.rid = rid -class getServerVersion_result(TBase): + +class pollResults_result(TBase): """ Attributes: - success @@ -3655,69 +4781,111 @@ class getServerVersion_result(TBase): ] thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 + (0, TType.STRUCT, 'success', (OnlineCheck, OnlineCheck.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class kill_args(TBase): +class generatePackages_args(TBase): + """ + Attributes: + - links + """ __slots__ = [ + 'links', ] thrift_spec = ( + None, # 0 + (1, TType.LIST, 'links', (TType.STRING,None), None, ), # 1 ) + def __init__(self, links=None,): + self.links = links -class kill_result(TBase): + +class generatePackages_result(TBase): + """ + Attributes: + - success + """ __slots__ = [ + 'success', ] thrift_spec = ( + (0, TType.MAP, 'success', (TType.STRING,None,TType.LIST,(TType.STRING,None)), None, ), # 0 ) + def __init__(self, success=None,): + self.success = success + -class restart_args(TBase): +class generateAndAddPackages_args(TBase): + """ + Attributes: + - links + - paused + """ __slots__ = [ + 'links', + 'paused', ] thrift_spec = ( + None, # 0 + (1, TType.LIST, 'links', (TType.STRING,None), None, ), # 1 + (2, TType.BOOL, 'paused', None, None, ), # 2 ) + def __init__(self, links=None, paused=None,): + self.links = links + self.paused = paused + -class restart_result(TBase): +class generateAndAddPackages_result(TBase): + """ + Attributes: + - success + """ __slots__ = [ + 'success', ] thrift_spec = ( + (0, TType.LIST, 'success', (TType.I32,None), None, ), # 0 ) + def __init__(self, success=None,): + self.success = success -class getLog_args(TBase): + +class autoAddLinks_args(TBase): """ Attributes: - - offset + - links """ __slots__ = [ - 'offset', + 'links', ] thrift_spec = ( None, # 0 - (1, TType.I32, 'offset', None, None, ), # 1 + (1, TType.LIST, 'links', (TType.STRING,None), None, ), # 1 ) - def __init__(self, offset=None,): - self.offset = offset + def __init__(self, links=None,): + self.links = links -class getLog_result(TBase): +class autoAddLinks_result(TBase): """ Attributes: - success @@ -3728,23 +4896,102 @@ class getLog_result(TBase): ] thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (0, TType.LIST, 'success', (TType.I32,None), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class isTimeDownload_args(TBase): +class createPackage_args(TBase): + """ + Attributes: + - name + - folder + - root + - password + - site + - comment + - paused + """ __slots__ = [ + 'name', + 'folder', + 'root', + 'password', + 'site', + 'comment', + 'paused', ] thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'folder', None, None, ), # 2 + (3, TType.I32, 'root', None, None, ), # 3 + (4, TType.STRING, 'password', None, None, ), # 4 + (5, TType.STRING, 'site', None, None, ), # 5 + (6, TType.STRING, 'comment', None, None, ), # 6 + (7, TType.BOOL, 'paused', None, None, ), # 7 ) + def __init__(self, name=None, folder=None, root=None, password=None, site=None, comment=None, paused=None,): + self.name = name + self.folder = folder + self.root = root + self.password = password + self.site = site + self.comment = comment + self.paused = paused -class isTimeDownload_result(TBase): + +class createPackage_result(TBase): + """ + Attributes: + - success + """ + + __slots__ = [ + 'success', + ] + + thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + +class addPackage_args(TBase): + """ + Attributes: + - name + - links + - password + """ + + __slots__ = [ + 'name', + 'links', + 'password', + ] + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.LIST, 'links', (TType.STRING,None), None, ), # 2 + (3, TType.STRING, 'password', None, None, ), # 3 + ) + + def __init__(self, name=None, links=None, password=None,): + self.name = name + self.links = links + self.password = password + + +class addPackage_result(TBase): """ Attributes: - success @@ -3755,23 +5002,45 @@ class isTimeDownload_result(TBase): ] thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + (0, TType.I32, 'success', None, None, ), # 0 ) def __init__(self, success=None,): self.success = success -class isTimeReconnect_args(TBase): +class addPackageP_args(TBase): + """ + Attributes: + - name + - links + - password + - paused + """ __slots__ = [ + 'name', + 'links', + 'password', + 'paused', ] thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.LIST, 'links', (TType.STRING,None), None, ), # 2 + (3, TType.STRING, 'password', None, None, ), # 3 + (4, TType.BOOL, 'paused', None, None, ), # 4 ) + def __init__(self, name=None, links=None, password=None, paused=None,): + self.name = name + self.links = links + self.password = password + self.paused = paused + -class isTimeReconnect_result(TBase): +class addPackageP_result(TBase): """ Attributes: - success @@ -3782,23 +5051,49 @@ class isTimeReconnect_result(TBase): ] thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + (0, TType.I32, 'success', None, None, ), # 0 ) def __init__(self, success=None,): self.success = success -class toggleReconnect_args(TBase): +class addPackageChild_args(TBase): + """ + Attributes: + - name + - links + - password + - root + - paused + """ __slots__ = [ + 'name', + 'links', + 'password', + 'root', + 'paused', ] thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.LIST, 'links', (TType.STRING,None), None, ), # 2 + (3, TType.STRING, 'password', None, None, ), # 3 + (4, TType.I32, 'root', None, None, ), # 4 + (5, TType.BOOL, 'paused', None, None, ), # 5 ) + def __init__(self, name=None, links=None, password=None, root=None, paused=None,): + self.name = name + self.links = links + self.password = password + self.root = root + self.paused = paused + -class toggleReconnect_result(TBase): +class addPackageChild_result(TBase): """ Attributes: - success @@ -3809,33 +5104,37 @@ class toggleReconnect_result(TBase): ] thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + (0, TType.I32, 'success', None, None, ), # 0 ) def __init__(self, success=None,): self.success = success -class generatePackages_args(TBase): +class uploadContainer_args(TBase): """ Attributes: - - links + - filename + - data """ __slots__ = [ - 'links', + 'filename', + 'data', ] thrift_spec = ( None, # 0 - (1, TType.LIST, 'links', (TType.STRING,None), None, ), # 1 + (1, TType.STRING, 'filename', None, None, ), # 1 + (2, TType.STRING, 'data', None, None, ), # 2 ) - def __init__(self, links=None,): - self.links = links + def __init__(self, filename=None, data=None,): + self.filename = filename + self.data = data -class generatePackages_result(TBase): +class uploadContainer_result(TBase): """ Attributes: - success @@ -3846,156 +5145,121 @@ class generatePackages_result(TBase): ] thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.LIST,(TType.STRING,None)), None, ), # 0 + (0, TType.I32, 'success', None, None, ), # 0 ) def __init__(self, success=None,): self.success = success -class checkURLs_args(TBase): +class addLinks_args(TBase): """ Attributes: - - urls + - pid + - links """ __slots__ = [ - 'urls', + 'pid', + 'links', ] thrift_spec = ( None, # 0 - (1, TType.LIST, 'urls', (TType.STRING,None), None, ), # 1 + (1, TType.I32, 'pid', None, None, ), # 1 + (2, TType.LIST, 'links', (TType.STRING,None), None, ), # 2 ) - def __init__(self, urls=None,): - self.urls = urls + def __init__(self, pid=None, links=None,): + self.pid = pid + self.links = links -class checkURLs_result(TBase): +class addLinks_result(TBase): """ Attributes: - - success + - e """ __slots__ = [ - 'success', + 'e', ] thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.LIST,(TType.STRING,None)), None, ), # 0 + None, # 0 + (1, TType.STRUCT, 'e', (PackageDoesNotExists, PackageDoesNotExists.thrift_spec), None, ), # 1 ) - def __init__(self, success=None,): - self.success = success + def __init__(self, e=None,): + self.e = e -class parseURLs_args(TBase): +class deleteFiles_args(TBase): """ Attributes: - - html - - url + - fids """ __slots__ = [ - 'html', - 'url', + 'fids', ] thrift_spec = ( None, # 0 - (1, TType.STRING, 'html', None, None, ), # 1 - (2, TType.STRING, 'url', None, None, ), # 2 + (1, TType.LIST, 'fids', (TType.I32,None), None, ), # 1 ) - def __init__(self, html=None, url=None,): - self.html = html - self.url = url + def __init__(self, fids=None,): + self.fids = fids -class parseURLs_result(TBase): - """ - Attributes: - - success - """ +class deleteFiles_result(TBase): __slots__ = [ - 'success', ] thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.LIST,(TType.STRING,None)), None, ), # 0 ) - def __init__(self, success=None,): - self.success = success - -class checkOnlineStatus_args(TBase): +class deletePackages_args(TBase): """ Attributes: - - urls + - pids """ __slots__ = [ - 'urls', + 'pids', ] thrift_spec = ( None, # 0 - (1, TType.LIST, 'urls', (TType.STRING,None), None, ), # 1 + (1, TType.LIST, 'pids', (TType.I32,None), None, ), # 1 ) - def __init__(self, urls=None,): - self.urls = urls + def __init__(self, pids=None,): + self.pids = pids -class checkOnlineStatus_result(TBase): - """ - Attributes: - - success - """ +class deletePackages_result(TBase): __slots__ = [ - 'success', ] thrift_spec = ( - (0, TType.STRUCT, 'success', (OnlineCheck, OnlineCheck.thrift_spec), None, ), # 0 ) - def __init__(self, success=None,): - self.success = success - -class checkOnlineStatusContainer_args(TBase): - """ - Attributes: - - urls - - filename - - data - """ +class getCollector_args(TBase): __slots__ = [ - 'urls', - 'filename', - 'data', ] thrift_spec = ( - None, # 0 - (1, TType.LIST, 'urls', (TType.STRING,None), None, ), # 1 - (2, TType.STRING, 'filename', None, None, ), # 2 - (3, TType.STRING, 'data', None, None, ), # 3 ) - def __init__(self, urls=None, filename=None, data=None,): - self.urls = urls - self.filename = filename - self.data = data - -class checkOnlineStatusContainer_result(TBase): +class getCollector_result(TBase): """ Attributes: - success @@ -4006,60 +5270,65 @@ class checkOnlineStatusContainer_result(TBase): ] thrift_spec = ( - (0, TType.STRUCT, 'success', (OnlineCheck, OnlineCheck.thrift_spec), None, ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT,(LinkStatus, LinkStatus.thrift_spec)), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class pollResults_args(TBase): +class addToCollector_args(TBase): """ Attributes: - - rid + - links """ __slots__ = [ - 'rid', + 'links', ] thrift_spec = ( None, # 0 - (1, TType.I32, 'rid', None, None, ), # 1 + (1, TType.LIST, 'links', (TType.STRING,None), None, ), # 1 ) - def __init__(self, rid=None,): - self.rid = rid + def __init__(self, links=None,): + self.links = links -class pollResults_result(TBase): - """ - Attributes: - - success - """ +class addToCollector_result(TBase): __slots__ = [ - 'success', ] thrift_spec = ( - (0, TType.STRUCT, 'success', (OnlineCheck, OnlineCheck.thrift_spec), None, ), # 0 ) - def __init__(self, success=None,): - self.success = success - -class statusDownloads_args(TBase): +class addFromCollector_args(TBase): + """ + Attributes: + - name + - paused + """ __slots__ = [ + 'name', + 'paused', ] thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.BOOL, 'paused', None, None, ), # 2 ) + def __init__(self, name=None, paused=None,): + self.name = name + self.paused = paused + -class statusDownloads_result(TBase): +class addFromCollector_result(TBase): """ Attributes: - success @@ -4070,137 +5339,102 @@ class statusDownloads_result(TBase): ] thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(DownloadInfo, DownloadInfo.thrift_spec)), None, ), # 0 + (0, TType.I32, 'success', None, None, ), # 0 ) def __init__(self, success=None,): self.success = success -class getPackageData_args(TBase): +class renameCollPack_args(TBase): """ Attributes: - - pid + - name + - new_name """ __slots__ = [ - 'pid', + 'name', + 'new_name', ] thrift_spec = ( None, # 0 - (1, TType.I32, 'pid', None, None, ), # 1 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'new_name', None, None, ), # 2 ) - def __init__(self, pid=None,): - self.pid = pid + def __init__(self, name=None, new_name=None,): + self.name = name + self.new_name = new_name -class getPackageData_result(TBase): - """ - Attributes: - - success - - e - """ +class renameCollPack_result(TBase): __slots__ = [ - 'success', - 'e', ] thrift_spec = ( - (0, TType.STRUCT, 'success', (PackageData, PackageData.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'e', (PackageDoesNotExists, PackageDoesNotExists.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, e=None,): - self.success = success - self.e = e - -class getPackageInfo_args(TBase): +class deleteCollPack_args(TBase): """ Attributes: - - pid + - name """ __slots__ = [ - 'pid', + 'name', ] thrift_spec = ( None, # 0 - (1, TType.I32, 'pid', None, None, ), # 1 + (1, TType.STRING, 'name', None, None, ), # 1 ) - def __init__(self, pid=None,): - self.pid = pid + def __init__(self, name=None,): + self.name = name -class getPackageInfo_result(TBase): - """ - Attributes: - - success - - e - """ +class deleteCollPack_result(TBase): __slots__ = [ - 'success', - 'e', ] thrift_spec = ( - (0, TType.STRUCT, 'success', (PackageData, PackageData.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'e', (PackageDoesNotExists, PackageDoesNotExists.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, e=None,): - self.success = success - self.e = e - -class getFileData_args(TBase): +class deleteCollLink_args(TBase): """ Attributes: - - fid + - url """ __slots__ = [ - 'fid', + 'url', ] thrift_spec = ( None, # 0 - (1, TType.I32, 'fid', None, None, ), # 1 + (1, TType.STRING, 'url', None, None, ), # 1 ) - def __init__(self, fid=None,): - self.fid = fid + def __init__(self, url=None,): + self.url = url -class getFileData_result(TBase): - """ - Attributes: - - success - - e - """ +class deleteCollLink_result(TBase): __slots__ = [ - 'success', - 'e', ] thrift_spec = ( - (0, TType.STRUCT, 'success', (FileData, FileData.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'e', (FileDoesNotExists, FileDoesNotExists.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, e=None,): - self.success = success - self.e = e - -class getQueue_args(TBase): +class getAllFiles_args(TBase): __slots__ = [ ] @@ -4209,7 +5443,7 @@ class getQueue_args(TBase): ) -class getQueue_result(TBase): +class getAllFiles_result(TBase): """ Attributes: - success @@ -4220,14 +5454,14 @@ class getQueue_result(TBase): ] thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(PackageData, PackageData.thrift_spec)), None, ), # 0 + (0, TType.STRUCT, 'success', (PackageView, PackageView.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class getCollector_args(TBase): +class getAllUnfinishedFiles_args(TBase): __slots__ = [ ] @@ -4236,7 +5470,7 @@ class getCollector_args(TBase): ) -class getCollector_result(TBase): +class getAllUnfinishedFiles_result(TBase): """ Attributes: - success @@ -4247,23 +5481,37 @@ class getCollector_result(TBase): ] thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(PackageData, PackageData.thrift_spec)), None, ), # 0 + (0, TType.STRUCT, 'success', (PackageView, PackageView.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class getQueueData_args(TBase): +class getFileTree_args(TBase): + """ + Attributes: + - pid + - full + """ __slots__ = [ + 'pid', + 'full', ] thrift_spec = ( + None, # 0 + (1, TType.I32, 'pid', None, None, ), # 1 + (2, TType.BOOL, 'full', None, None, ), # 2 ) + def __init__(self, pid=None, full=None,): + self.pid = pid + self.full = full + -class getQueueData_result(TBase): +class getFileTree_result(TBase): """ Attributes: - success @@ -4274,23 +5522,37 @@ class getQueueData_result(TBase): ] thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(PackageData, PackageData.thrift_spec)), None, ), # 0 + (0, TType.STRUCT, 'success', (PackageView, PackageView.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class getCollectorData_args(TBase): +class getUnfinishedFileTree_args(TBase): + """ + Attributes: + - pid + - full + """ __slots__ = [ + 'pid', + 'full', ] thrift_spec = ( + None, # 0 + (1, TType.I32, 'pid', None, None, ), # 1 + (2, TType.BOOL, 'full', None, None, ), # 2 ) + def __init__(self, pid=None, full=None,): + self.pid = pid + self.full = full + -class getCollectorData_result(TBase): +class getUnfinishedFileTree_result(TBase): """ Attributes: - success @@ -4301,33 +5563,33 @@ class getCollectorData_result(TBase): ] thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(PackageData, PackageData.thrift_spec)), None, ), # 0 + (0, TType.STRUCT, 'success', (PackageView, PackageView.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class getPackageOrder_args(TBase): +class getPackageContent_args(TBase): """ Attributes: - - destination + - pid """ __slots__ = [ - 'destination', + 'pid', ] thrift_spec = ( None, # 0 - (1, TType.I32, 'destination', None, None, ), # 1 + (1, TType.I32, 'pid', None, None, ), # 1 ) - def __init__(self, destination=None,): - self.destination = destination + def __init__(self, pid=None,): + self.pid = pid -class getPackageOrder_result(TBase): +class getPackageContent_result(TBase): """ Attributes: - success @@ -4338,14 +5600,14 @@ class getPackageOrder_result(TBase): ] thrift_spec = ( - (0, TType.MAP, 'success', (TType.I16,None,TType.I32,None), None, ), # 0 + (0, TType.STRUCT, 'success', (PackageView, PackageView.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class getFileOrder_args(TBase): +class getPackageInfo_args(TBase): """ Attributes: - pid @@ -4364,97 +5626,89 @@ class getFileOrder_args(TBase): self.pid = pid -class getFileOrder_result(TBase): +class getPackageInfo_result(TBase): """ Attributes: - success + - e """ __slots__ = [ 'success', + 'e', ] thrift_spec = ( - (0, TType.MAP, 'success', (TType.I16,None,TType.I32,None), None, ), # 0 + (0, TType.STRUCT, 'success', (PackageInfo, PackageInfo.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'e', (PackageDoesNotExists, PackageDoesNotExists.thrift_spec), None, ), # 1 ) - def __init__(self, success=None,): + def __init__(self, success=None, e=None,): self.success = success + self.e = e -class generateAndAddPackages_args(TBase): +class getFileInfo_args(TBase): """ Attributes: - - links - - dest + - fid """ __slots__ = [ - 'links', - 'dest', + 'fid', ] thrift_spec = ( None, # 0 - (1, TType.LIST, 'links', (TType.STRING,None), None, ), # 1 - (2, TType.I32, 'dest', None, None, ), # 2 + (1, TType.I32, 'fid', None, None, ), # 1 ) - def __init__(self, links=None, dest=None,): - self.links = links - self.dest = dest + def __init__(self, fid=None,): + self.fid = fid -class generateAndAddPackages_result(TBase): +class getFileInfo_result(TBase): """ Attributes: - success + - e """ __slots__ = [ 'success', + 'e', ] thrift_spec = ( - (0, TType.LIST, 'success', (TType.I32,None), None, ), # 0 + (0, TType.STRUCT, 'success', (FileInfo, FileInfo.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'e', (FileDoesNotExists, FileDoesNotExists.thrift_spec), None, ), # 1 ) - def __init__(self, success=None,): + def __init__(self, success=None, e=None,): self.success = success + self.e = e -class addPackage_args(TBase): +class findFiles_args(TBase): """ Attributes: - - name - - links - - dest - - password + - pattern """ __slots__ = [ - 'name', - 'links', - 'dest', - 'password', + 'pattern', ] thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.LIST, 'links', (TType.STRING,None), None, ), # 2 - (3, TType.I32, 'dest', None, None, ), # 3 - (4, TType.STRING, 'password', None, None, ), # 4 + (1, TType.STRING, 'pattern', None, None, ), # 1 ) - def __init__(self, name=None, links=None, dest=None, password=None,): - self.name = name - self.links = links - self.dest = dest - self.password = password + def __init__(self, pattern=None,): + self.pattern = pattern -class addPackage_result(TBase): +class findFiles_result(TBase): """ Attributes: - success @@ -4465,37 +5719,33 @@ class addPackage_result(TBase): ] thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 + (0, TType.MAP, 'success', (TType.I32,None,TType.STRUCT,(FileInfo, FileInfo.thrift_spec)), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class addFiles_args(TBase): +class restartPackage_args(TBase): """ Attributes: - pid - - links """ __slots__ = [ 'pid', - 'links', ] thrift_spec = ( None, # 0 (1, TType.I32, 'pid', None, None, ), # 1 - (2, TType.LIST, 'links', (TType.STRING,None), None, ), # 2 ) - def __init__(self, pid=None, links=None,): + def __init__(self, pid=None,): self.pid = pid - self.links = links -class addFiles_result(TBase): +class restartPackage_result(TBase): __slots__ = [ ] @@ -4504,30 +5754,26 @@ class addFiles_result(TBase): ) -class uploadContainer_args(TBase): +class restartFile_args(TBase): """ Attributes: - - filename - - data + - fid """ __slots__ = [ - 'filename', - 'data', + 'fid', ] thrift_spec = ( None, # 0 - (1, TType.STRING, 'filename', None, None, ), # 1 - (2, TType.STRING, 'data', None, None, ), # 2 + (1, TType.I32, 'fid', None, None, ), # 1 ) - def __init__(self, filename=None, data=None,): - self.filename = filename - self.data = data + def __init__(self, fid=None,): + self.fid = fid -class uploadContainer_result(TBase): +class restartFile_result(TBase): __slots__ = [ ] @@ -4536,26 +5782,26 @@ class uploadContainer_result(TBase): ) -class deleteFiles_args(TBase): +class recheckPackage_args(TBase): """ Attributes: - - fids + - pid """ __slots__ = [ - 'fids', + 'pid', ] thrift_spec = ( None, # 0 - (1, TType.LIST, 'fids', (TType.I32,None), None, ), # 1 + (1, TType.I32, 'pid', None, None, ), # 1 ) - def __init__(self, fids=None,): - self.fids = fids + def __init__(self, pid=None,): + self.pid = pid -class deleteFiles_result(TBase): +class recheckPackage_result(TBase): __slots__ = [ ] @@ -4564,26 +5810,26 @@ class deleteFiles_result(TBase): ) -class deletePackages_args(TBase): +class stopDownloads_args(TBase): """ Attributes: - - pids + - fids """ __slots__ = [ - 'pids', + 'fids', ] thrift_spec = ( None, # 0 - (1, TType.LIST, 'pids', (TType.I32,None), None, ), # 1 + (1, TType.LIST, 'fids', (TType.I32,None), None, ), # 1 ) - def __init__(self, pids=None,): - self.pids = pids + def __init__(self, fids=None,): + self.fids = fids -class deletePackages_result(TBase): +class stopDownloads_result(TBase): __slots__ = [ ] @@ -4592,26 +5838,34 @@ class deletePackages_result(TBase): ) -class pushToQueue_args(TBase): - """ - Attributes: - - pid - """ +class stopAllDownloads_args(TBase): __slots__ = [ - 'pid', ] thrift_spec = ( - None, # 0 - (1, TType.I32, 'pid', None, None, ), # 1 ) - def __init__(self, pid=None,): - self.pid = pid +class stopAllDownloads_result(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class restartFailed_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) -class pushToQueue_result(TBase): + +class restartFailed_result(TBase): __slots__ = [ ] @@ -4620,188 +5874,291 @@ class pushToQueue_result(TBase): ) -class pullFromQueue_args(TBase): +class setFilePaused_args(TBase): """ Attributes: - - pid + - fid + - paused """ __slots__ = [ - 'pid', + 'fid', + 'paused', ] thrift_spec = ( None, # 0 - (1, TType.I32, 'pid', None, None, ), # 1 + (1, TType.I32, 'fid', None, None, ), # 1 + (2, TType.BOOL, 'paused', None, None, ), # 2 ) - def __init__(self, pid=None,): - self.pid = pid + def __init__(self, fid=None, paused=None,): + self.fid = fid + self.paused = paused -class pullFromQueue_result(TBase): +class setFilePaused_result(TBase): + """ + Attributes: + - e + """ __slots__ = [ + 'e', ] thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'e', (FileDoesNotExists, FileDoesNotExists.thrift_spec), None, ), # 1 ) + def __init__(self, e=None,): + self.e = e -class restartPackage_args(TBase): + +class setPackagePaused_args(TBase): """ Attributes: - pid + - paused """ __slots__ = [ 'pid', + 'paused', ] thrift_spec = ( None, # 0 (1, TType.I32, 'pid', None, None, ), # 1 + (2, TType.BOOL, 'paused', None, None, ), # 2 ) - def __init__(self, pid=None,): + def __init__(self, pid=None, paused=None,): self.pid = pid + self.paused = paused -class restartPackage_result(TBase): +class setPackagePaused_result(TBase): + """ + Attributes: + - e + """ __slots__ = [ + 'e', ] thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'e', (PackageDoesNotExists, PackageDoesNotExists.thrift_spec), None, ), # 1 ) + def __init__(self, e=None,): + self.e = e -class restartFile_args(TBase): + +class setPackageFolder_args(TBase): """ Attributes: - - fid + - pid + - path """ __slots__ = [ - 'fid', + 'pid', + 'path', ] thrift_spec = ( None, # 0 - (1, TType.I32, 'fid', None, None, ), # 1 + (1, TType.I32, 'pid', None, None, ), # 1 + (2, TType.STRING, 'path', None, None, ), # 2 ) - def __init__(self, fid=None,): - self.fid = fid + def __init__(self, pid=None, path=None,): + self.pid = pid + self.path = path -class restartFile_result(TBase): +class setPackageFolder_result(TBase): + """ + Attributes: + - success + - e + """ __slots__ = [ + 'success', + 'e', ] thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'e', (PackageDoesNotExists, PackageDoesNotExists.thrift_spec), None, ), # 1 ) + def __init__(self, success=None, e=None,): + self.success = success + self.e = e -class recheckPackage_args(TBase): + +class setPackageData_args(TBase): """ Attributes: - pid + - data """ __slots__ = [ 'pid', + 'data', ] thrift_spec = ( None, # 0 (1, TType.I32, 'pid', None, None, ), # 1 + (2, TType.MAP, 'data', (TType.STRING,None,TType.STRING,None), None, ), # 2 ) - def __init__(self, pid=None,): + def __init__(self, pid=None, data=None,): self.pid = pid + self.data = data -class recheckPackage_result(TBase): +class setPackageData_result(TBase): + """ + Attributes: + - e + """ __slots__ = [ + 'e', ] thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'e', (PackageDoesNotExists, PackageDoesNotExists.thrift_spec), None, ), # 1 ) + def __init__(self, e=None,): + self.e = e -class stopAllDownloads_args(TBase): + +class movePackage_args(TBase): + """ + Attributes: + - pid + - root + """ __slots__ = [ + 'pid', + 'root', ] thrift_spec = ( + None, # 0 + (1, TType.I32, 'pid', None, None, ), # 1 + (2, TType.I32, 'root', None, None, ), # 2 ) + def __init__(self, pid=None, root=None,): + self.pid = pid + self.root = root + -class stopAllDownloads_result(TBase): +class movePackage_result(TBase): + """ + Attributes: + - success + - e + """ __slots__ = [ + 'success', + 'e', ] thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'e', (PackageDoesNotExists, PackageDoesNotExists.thrift_spec), None, ), # 1 ) + def __init__(self, success=None, e=None,): + self.success = success + self.e = e + -class stopDownloads_args(TBase): +class moveFiles_args(TBase): """ Attributes: - fids + - pid """ __slots__ = [ 'fids', + 'pid', ] thrift_spec = ( None, # 0 (1, TType.LIST, 'fids', (TType.I32,None), None, ), # 1 + (2, TType.I32, 'pid', None, None, ), # 2 ) - def __init__(self, fids=None,): + def __init__(self, fids=None, pid=None,): self.fids = fids + self.pid = pid -class stopDownloads_result(TBase): +class moveFiles_result(TBase): + """ + Attributes: + - success + - e + """ __slots__ = [ + 'success', + 'e', ] thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'e', (PackageDoesNotExists, PackageDoesNotExists.thrift_spec), None, ), # 1 ) + def __init__(self, success=None, e=None,): + self.success = success + self.e = e + -class setPackageName_args(TBase): +class orderPackage_args(TBase): """ Attributes: - - pid - - name + - pids + - position """ __slots__ = [ - 'pid', - 'name', + 'pids', + 'position', ] thrift_spec = ( None, # 0 - (1, TType.I32, 'pid', None, None, ), # 1 - (2, TType.STRING, 'name', None, None, ), # 2 + (1, TType.LIST, 'pids', (TType.I32,None), None, ), # 1 + (2, TType.I16, 'position', None, None, ), # 2 ) - def __init__(self, pid=None, name=None,): - self.pid = pid - self.name = name + def __init__(self, pids=None, position=None,): + self.pids = pids + self.position = position -class setPackageName_result(TBase): +class orderPackage_result(TBase): __slots__ = [ ] @@ -4810,30 +6167,34 @@ class setPackageName_result(TBase): ) -class movePackage_args(TBase): +class orderFiles_args(TBase): """ Attributes: - - destination + - fids - pid + - position """ __slots__ = [ - 'destination', + 'fids', 'pid', + 'position', ] thrift_spec = ( None, # 0 - (1, TType.I32, 'destination', None, None, ), # 1 + (1, TType.LIST, 'fids', (TType.I32,None), None, ), # 1 (2, TType.I32, 'pid', None, None, ), # 2 + (3, TType.I16, 'position', None, None, ), # 3 ) - def __init__(self, destination=None, pid=None,): - self.destination = destination + def __init__(self, fids=None, pid=None, position=None,): + self.fids = fids self.pid = pid + self.position = position -class movePackage_result(TBase): +class orderFiles_result(TBase): __slots__ = [ ] @@ -4842,94 +6203,104 @@ class movePackage_result(TBase): ) -class moveFiles_args(TBase): +class isInteractionWaiting_args(TBase): """ Attributes: - - fids - - pid + - mode """ __slots__ = [ - 'fids', - 'pid', + 'mode', ] thrift_spec = ( None, # 0 - (1, TType.LIST, 'fids', (TType.I32,None), None, ), # 1 - (2, TType.I32, 'pid', None, None, ), # 2 + (1, TType.I16, 'mode', None, None, ), # 1 ) - def __init__(self, fids=None, pid=None,): - self.fids = fids - self.pid = pid + def __init__(self, mode=None,): + self.mode = mode -class moveFiles_result(TBase): +class isInteractionWaiting_result(TBase): + """ + Attributes: + - success + """ __slots__ = [ + 'success', ] thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 ) + def __init__(self, success=None,): + self.success = success -class orderPackage_args(TBase): + +class getInteractionTask_args(TBase): """ Attributes: - - pid - - position + - mode """ __slots__ = [ - 'pid', - 'position', + 'mode', ] thrift_spec = ( None, # 0 - (1, TType.I32, 'pid', None, None, ), # 1 - (2, TType.I16, 'position', None, None, ), # 2 + (1, TType.I16, 'mode', None, None, ), # 1 ) - def __init__(self, pid=None, position=None,): - self.pid = pid - self.position = position + def __init__(self, mode=None,): + self.mode = mode -class orderPackage_result(TBase): +class getInteractionTask_result(TBase): + """ + Attributes: + - success + """ __slots__ = [ + 'success', ] thrift_spec = ( + (0, TType.STRUCT, 'success', (InteractionTask, InteractionTask.thrift_spec), None, ), # 0 ) + def __init__(self, success=None,): + self.success = success + -class orderFile_args(TBase): +class setInteractionResult_args(TBase): """ Attributes: - - fid - - position + - iid + - result """ __slots__ = [ - 'fid', - 'position', + 'iid', + 'result', ] thrift_spec = ( None, # 0 - (1, TType.I32, 'fid', None, None, ), # 1 - (2, TType.I16, 'position', None, None, ), # 2 + (1, TType.I32, 'iid', None, None, ), # 1 + (2, TType.STRING, 'result', None, None, ), # 2 ) - def __init__(self, fid=None, position=None,): - self.fid = fid - self.position = position + def __init__(self, iid=None, result=None,): + self.iid = iid + self.result = result -class orderFile_result(TBase): +class setInteractionResult_result(TBase): __slots__ = [ ] @@ -4938,49 +6309,48 @@ class orderFile_result(TBase): ) -class setPackageData_args(TBase): +class generateDownloadLink_args(TBase): """ Attributes: - - pid - - data + - fid + - timeout """ __slots__ = [ - 'pid', - 'data', + 'fid', + 'timeout', ] thrift_spec = ( None, # 0 - (1, TType.I32, 'pid', None, None, ), # 1 - (2, TType.MAP, 'data', (TType.STRING,None,TType.STRING,None), None, ), # 2 + (1, TType.I32, 'fid', None, None, ), # 1 + (2, TType.I16, 'timeout', None, None, ), # 2 ) - def __init__(self, pid=None, data=None,): - self.pid = pid - self.data = data + def __init__(self, fid=None, timeout=None,): + self.fid = fid + self.timeout = timeout -class setPackageData_result(TBase): +class generateDownloadLink_result(TBase): """ Attributes: - - e + - success """ __slots__ = [ - 'e', + 'success', ] thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'e', (PackageDoesNotExists, PackageDoesNotExists.thrift_spec), None, ), # 1 + (0, TType.STRING, 'success', None, None, ), # 0 ) - def __init__(self, e=None,): - self.e = e + def __init__(self, success=None,): + self.success = success -class deleteFinished_args(TBase): +class getAddonHandler_args(TBase): __slots__ = [ ] @@ -4989,7 +6359,7 @@ class deleteFinished_args(TBase): ) -class deleteFinished_result(TBase): +class getAddonHandler_result(TBase): """ Attributes: - success @@ -5000,23 +6370,41 @@ class deleteFinished_result(TBase): ] thrift_spec = ( - (0, TType.LIST, 'success', (TType.I32,None), None, ), # 0 + (0, TType.MAP, 'success', (TType.STRING,None,TType.LIST,(TType.STRUCT,(AddonService, AddonService.thrift_spec))), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class restartFailed_args(TBase): +class callAddonHandler_args(TBase): + """ + Attributes: + - plugin + - func + - pid_or_fid + """ __slots__ = [ + 'plugin', + 'func', + 'pid_or_fid', ] thrift_spec = ( + None, # 0 + (1, TType.STRING, 'plugin', None, None, ), # 1 + (2, TType.STRING, 'func', None, None, ), # 2 + (3, TType.I32, 'pid_or_fid', None, None, ), # 3 ) + def __init__(self, plugin=None, func=None, pid_or_fid=None,): + self.plugin = plugin + self.func = func + self.pid_or_fid = pid_or_fid + -class restartFailed_result(TBase): +class callAddonHandler_result(TBase): __slots__ = [ ] @@ -5331,7 +6719,7 @@ class getServices_result(TBase): ] thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.MAP,(TType.STRING,None,TType.STRING,None)), None, ), # 0 + (0, TType.MAP, 'success', (TType.STRING,None,TType.LIST,(TType.STRUCT,(AddonService, AddonService.thrift_spec))), None, ), # 0 ) def __init__(self, success=None,): @@ -5382,20 +6770,28 @@ class hasService_result(TBase): class call_args(TBase): """ Attributes: - - info + - plugin + - func + - arguments """ __slots__ = [ - 'info', + 'plugin', + 'func', + 'arguments', ] thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'info', (ServiceCall, ServiceCall.thrift_spec), None, ), # 1 + (1, TType.STRING, 'plugin', None, None, ), # 1 + (2, TType.STRING, 'func', None, None, ), # 2 + (3, TType.STRING, 'arguments', None, None, ), # 3 ) - def __init__(self, info=None,): - self.info = info + def __init__(self, plugin=None, func=None, arguments=None,): + self.plugin = plugin + self.func = func + self.arguments = arguments class call_result(TBase): @@ -5444,7 +6840,7 @@ class getAllInfo_result(TBase): ] thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.MAP,(TType.STRING,None,TType.STRING,None)), None, ), # 0 + (0, TType.MAP, 'success', (TType.STRING,None,TType.LIST,(TType.STRUCT,(AddonInfo, AddonInfo.thrift_spec))), None, ), # 0 ) def __init__(self, success=None,): @@ -5481,142 +6877,9 @@ class getInfoByPlugin_result(TBase): ] thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - -class isCaptchaWaiting_args(TBase): - - __slots__ = [ - ] - - thrift_spec = ( - ) - - -class isCaptchaWaiting_result(TBase): - """ - Attributes: - - success - """ - - __slots__ = [ - 'success', - ] - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - -class getCaptchaTask_args(TBase): - """ - Attributes: - - exclusive - """ - - __slots__ = [ - 'exclusive', - ] - - thrift_spec = ( - None, # 0 - (1, TType.BOOL, 'exclusive', None, None, ), # 1 - ) - - def __init__(self, exclusive=None,): - self.exclusive = exclusive - - -class getCaptchaTask_result(TBase): - """ - Attributes: - - success - """ - - __slots__ = [ - 'success', - ] - - thrift_spec = ( - (0, TType.STRUCT, 'success', (CaptchaTask, CaptchaTask.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - -class getCaptchaTaskStatus_args(TBase): - """ - Attributes: - - tid - """ - - __slots__ = [ - 'tid', - ] - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'tid', None, None, ), # 1 - ) - - def __init__(self, tid=None,): - self.tid = tid - - -class getCaptchaTaskStatus_result(TBase): - """ - Attributes: - - success - """ - - __slots__ = [ - 'success', - ] - - thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT,(AddonInfo, AddonInfo.thrift_spec)), None, ), # 0 ) def __init__(self, success=None,): self.success = success - -class setCaptchaResult_args(TBase): - """ - Attributes: - - tid - - result - """ - - __slots__ = [ - 'tid', - 'result', - ] - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'tid', None, None, ), # 1 - (2, TType.STRING, 'result', None, None, ), # 2 - ) - - def __init__(self, tid=None, result=None,): - self.tid = tid - self.result = result - - -class setCaptchaResult_result(TBase): - - __slots__ = [ - ] - - thrift_spec = ( - ) - diff --git a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py index b2da9748d..fbbc599a8 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py +++ b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py @@ -12,129 +12,187 @@ from thrift.protocol.TBase import TBase, TExceptionBase class DownloadStatus(TBase): - Finished = 0 + NA = 0 Offline = 1 Online = 2 Queued = 3 - Skipped = 4 - Waiting = 5 - TempOffline = 6 - Starting = 7 - Failed = 8 - Aborted = 9 - Decrypting = 10 - Custom = 11 - Downloading = 12 - Processing = 13 - Unknown = 14 + Paused = 4 + Finished = 5 + Skipped = 6 + Failed = 7 + Starting = 8 + Waiting = 9 + Downloading = 10 + TempOffline = 11 + Aborted = 12 + Decrypting = 13 + Processing = 14 + Custom = 15 + Unknown = 16 _VALUES_TO_NAMES = { - 0: "Finished", + 0: "NA", 1: "Offline", 2: "Online", 3: "Queued", - 4: "Skipped", - 5: "Waiting", - 6: "TempOffline", - 7: "Starting", - 8: "Failed", - 9: "Aborted", - 10: "Decrypting", - 11: "Custom", - 12: "Downloading", - 13: "Processing", - 14: "Unknown", + 4: "Paused", + 5: "Finished", + 6: "Skipped", + 7: "Failed", + 8: "Starting", + 9: "Waiting", + 10: "Downloading", + 11: "TempOffline", + 12: "Aborted", + 13: "Decrypting", + 14: "Processing", + 15: "Custom", + 16: "Unknown", } _NAMES_TO_VALUES = { - "Finished": 0, + "NA": 0, "Offline": 1, "Online": 2, "Queued": 3, - "Skipped": 4, - "Waiting": 5, - "TempOffline": 6, - "Starting": 7, - "Failed": 8, - "Aborted": 9, - "Decrypting": 10, - "Custom": 11, - "Downloading": 12, - "Processing": 13, - "Unknown": 14, + "Paused": 4, + "Finished": 5, + "Skipped": 6, + "Failed": 7, + "Starting": 8, + "Waiting": 9, + "Downloading": 10, + "TempOffline": 11, + "Aborted": 12, + "Decrypting": 13, + "Processing": 14, + "Custom": 15, + "Unknown": 16, } -class Destination(TBase): - Collector = 0 - Queue = 1 +class MediaType(TBase): + All = 0 + Other = 1 + Audio = 2 + Image = 4 + Video = 8 + Document = 16 + Archive = 32 _VALUES_TO_NAMES = { - 0: "Collector", - 1: "Queue", + 0: "All", + 1: "Other", + 2: "Audio", + 4: "Image", + 8: "Video", + 16: "Document", + 32: "Archive", } _NAMES_TO_VALUES = { - "Collector": 0, - "Queue": 1, + "All": 0, + "Other": 1, + "Audio": 2, + "Image": 4, + "Video": 8, + "Document": 16, + "Archive": 32, + } + +class FileStatus(TBase): + Ok = 0 + Missing = 1 + Remote = 2 + + _VALUES_TO_NAMES = { + 0: "Ok", + 1: "Missing", + 2: "Remote", + } + + _NAMES_TO_VALUES = { + "Ok": 0, + "Missing": 1, + "Remote": 2, + } + +class PackageStatus(TBase): + Ok = 0 + Paused = 1 + Remote = 2 + + _VALUES_TO_NAMES = { + 0: "Ok", + 1: "Paused", + 2: "Remote", + } + + _NAMES_TO_VALUES = { + "Ok": 0, + "Paused": 1, + "Remote": 2, } class Input(TBase): - NONE = 0 - TEXT = 1 - TEXTBOX = 2 - PASSWORD = 3 - BOOL = 4 - CLICK = 5 - CHOICE = 6 - MULTIPLE = 7 - LIST = 8 - TABLE = 9 + NA = 0 + Text = 1 + TextBox = 2 + Password = 3 + Bool = 4 + Click = 5 + Choice = 6 + Multiple = 7 + List = 8 + Table = 9 _VALUES_TO_NAMES = { - 0: "NONE", - 1: "TEXT", - 2: "TEXTBOX", - 3: "PASSWORD", - 4: "BOOL", - 5: "CLICK", - 6: "CHOICE", - 7: "MULTIPLE", - 8: "LIST", - 9: "TABLE", + 0: "NA", + 1: "Text", + 2: "TextBox", + 3: "Password", + 4: "Bool", + 5: "Click", + 6: "Choice", + 7: "Multiple", + 8: "List", + 9: "Table", } _NAMES_TO_VALUES = { - "NONE": 0, - "TEXT": 1, - "TEXTBOX": 2, - "PASSWORD": 3, - "BOOL": 4, - "CLICK": 5, - "CHOICE": 6, - "MULTIPLE": 7, - "LIST": 8, - "TABLE": 9, + "NA": 0, + "Text": 1, + "TextBox": 2, + "Password": 3, + "Bool": 4, + "Click": 5, + "Choice": 6, + "Multiple": 7, + "List": 8, + "Table": 9, } class Output(TBase): - CAPTCHA = 1 - QUESTION = 2 - NOTIFICATION = 4 + All = 0 + Notification = 1 + Captcha = 2 + Query = 4 _VALUES_TO_NAMES = { - 1: "CAPTCHA", - 2: "QUESTION", - 4: "NOTIFICATION", + 0: "All", + 1: "Notification", + 2: "Captcha", + 4: "Query", } _NAMES_TO_VALUES = { - "CAPTCHA": 1, - "QUESTION": 2, - "NOTIFICATION": 4, + "All": 0, + "Notification": 1, + "Captcha": 2, + "Query": 4, } -class DownloadInfo(TBase): +class ProgressInfo(TBase): """ Attributes: - fid @@ -184,7 +242,7 @@ class DownloadInfo(TBase): (6, TType.I64, 'bleft', None, None, ), # 6 (7, TType.I64, 'size', None, None, ), # 7 (8, TType.STRING, 'format_size', None, None, ), # 8 - (9, TType.BYTE, 'percent', None, None, ), # 9 + (9, TType.I16, 'percent', None, None, ), # 9 (10, TType.I32, 'status', None, None, ), # 10 (11, TType.STRING, 'statusmsg', None, None, ), # 11 (12, TType.STRING, 'format_wait', None, None, ), # 12 @@ -256,97 +314,159 @@ class ServerStatus(TBase): self.reconnect = reconnect -class FileData(TBase): +class DownloadInfo(TBase): """ Attributes: - - fid - url - - name - plugin - - size - - format_size + - hash - status - statusmsg - - packageID - error - - order """ __slots__ = [ - 'fid', 'url', - 'name', 'plugin', - 'size', - 'format_size', + 'hash', 'status', 'statusmsg', - 'packageID', 'error', - 'order', ] thrift_spec = ( None, # 0 - (1, TType.I32, 'fid', None, None, ), # 1 - (2, TType.STRING, 'url', None, None, ), # 2 - (3, TType.STRING, 'name', None, None, ), # 3 - (4, TType.STRING, 'plugin', None, None, ), # 4 - (5, TType.I64, 'size', None, None, ), # 5 - (6, TType.STRING, 'format_size', None, None, ), # 6 - (7, TType.I32, 'status', None, None, ), # 7 - (8, TType.STRING, 'statusmsg', None, None, ), # 8 - (9, TType.I32, 'packageID', None, None, ), # 9 - (10, TType.STRING, 'error', None, None, ), # 10 - (11, TType.I16, 'order', None, None, ), # 11 + (1, TType.STRING, 'url', None, None, ), # 1 + (2, TType.STRING, 'plugin', None, None, ), # 2 + (3, TType.STRING, 'hash', None, None, ), # 3 + (4, TType.I32, 'status', None, None, ), # 4 + (5, TType.STRING, 'statusmsg', None, None, ), # 5 + (6, TType.STRING, 'error', None, None, ), # 6 ) - def __init__(self, fid=None, url=None, name=None, plugin=None, size=None, format_size=None, status=None, statusmsg=None, packageID=None, error=None, order=None,): - self.fid = fid + def __init__(self, url=None, plugin=None, hash=None, status=None, statusmsg=None, error=None,): self.url = url - self.name = name self.plugin = plugin - self.size = size - self.format_size = format_size + self.hash = hash self.status = status self.statusmsg = statusmsg - self.packageID = packageID self.error = error - self.order = order -class PackageData(TBase): +class FileInfo(TBase): + """ + Attributes: + - fid + - name + - package + - size + - status + - media + - added + - fileorder + - download + """ + + __slots__ = [ + 'fid', + 'name', + 'package', + 'size', + 'status', + 'media', + 'added', + 'fileorder', + 'download', + ] + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'fid', None, None, ), # 1 + (2, TType.STRING, 'name', None, None, ), # 2 + (3, TType.I32, 'package', None, None, ), # 3 + (4, TType.I64, 'size', None, None, ), # 4 + (5, TType.I32, 'status', None, None, ), # 5 + (6, TType.I32, 'media', None, None, ), # 6 + (7, TType.I64, 'added', None, None, ), # 7 + (8, TType.I16, 'fileorder', None, None, ), # 8 + (9, TType.STRUCT, 'download', (DownloadInfo, DownloadInfo.thrift_spec), None, ), # 9 + ) + + def __init__(self, fid=None, name=None, package=None, size=None, status=None, media=None, added=None, fileorder=None, download=None,): + self.fid = fid + self.name = name + self.package = package + self.size = size + self.status = status + self.media = media + self.added = added + self.fileorder = fileorder + self.download = download + + +class PackageStats(TBase): + """ + Attributes: + - linkstotal + - linksdone + - sizetotal + - sizedone + """ + + __slots__ = [ + 'linkstotal', + 'linksdone', + 'sizetotal', + 'sizedone', + ] + + thrift_spec = ( + None, # 0 + (1, TType.I16, 'linkstotal', None, None, ), # 1 + (2, TType.I16, 'linksdone', None, None, ), # 2 + (3, TType.I64, 'sizetotal', None, None, ), # 3 + (4, TType.I64, 'sizedone', None, None, ), # 4 + ) + + def __init__(self, linkstotal=None, linksdone=None, sizetotal=None, sizedone=None,): + self.linkstotal = linkstotal + self.linksdone = linksdone + self.sizetotal = sizetotal + self.sizedone = sizedone + + +class PackageInfo(TBase): """ Attributes: - pid - name - folder + - root - site + - comment - password - - dest - - order - - linksdone - - sizedone - - sizetotal - - linkstotal - - links + - added + - status + - packageorder + - stats - fids + - pids """ __slots__ = [ 'pid', 'name', 'folder', + 'root', 'site', + 'comment', 'password', - 'dest', - 'order', - 'linksdone', - 'sizedone', - 'sizetotal', - 'linkstotal', - 'links', + 'added', + 'status', + 'packageorder', + 'stats', 'fids', + 'pids', ] thrift_spec = ( @@ -354,32 +474,98 @@ class PackageData(TBase): (1, TType.I32, 'pid', None, None, ), # 1 (2, TType.STRING, 'name', None, None, ), # 2 (3, TType.STRING, 'folder', None, None, ), # 3 - (4, TType.STRING, 'site', None, None, ), # 4 - (5, TType.STRING, 'password', None, None, ), # 5 - (6, TType.I32, 'dest', None, None, ), # 6 - (7, TType.I16, 'order', None, None, ), # 7 - (8, TType.I16, 'linksdone', None, None, ), # 8 - (9, TType.I64, 'sizedone', None, None, ), # 9 - (10, TType.I64, 'sizetotal', None, None, ), # 10 - (11, TType.I16, 'linkstotal', None, None, ), # 11 - (12, TType.LIST, 'links', (TType.STRUCT,(FileData, FileData.thrift_spec)), None, ), # 12 - (13, TType.LIST, 'fids', (TType.I32,None), None, ), # 13 + (4, TType.I32, 'root', None, None, ), # 4 + (5, TType.STRING, 'site', None, None, ), # 5 + (6, TType.STRING, 'comment', None, None, ), # 6 + (7, TType.STRING, 'password', None, None, ), # 7 + (8, TType.I64, 'added', None, None, ), # 8 + (9, TType.I32, 'status', None, None, ), # 9 + (10, TType.I16, 'packageorder', None, None, ), # 10 + (11, TType.STRUCT, 'stats', (PackageStats, PackageStats.thrift_spec), None, ), # 11 + (12, TType.LIST, 'fids', (TType.I32,None), None, ), # 12 + (13, TType.LIST, 'pids', (TType.I32,None), None, ), # 13 ) - def __init__(self, pid=None, name=None, folder=None, site=None, password=None, dest=None, order=None, linksdone=None, sizedone=None, sizetotal=None, linkstotal=None, links=None, fids=None,): + def __init__(self, pid=None, name=None, folder=None, root=None, site=None, comment=None, password=None, added=None, status=None, packageorder=None, stats=None, fids=None, pids=None,): self.pid = pid self.name = name self.folder = folder + self.root = root self.site = site + self.comment = comment self.password = password - self.dest = dest - self.order = order - self.linksdone = linksdone - self.sizedone = sizedone - self.sizetotal = sizetotal - self.linkstotal = linkstotal - self.links = links + self.added = added + self.status = status + self.packageorder = packageorder + self.stats = stats self.fids = fids + self.pids = pids + + +class PackageView(TBase): + """ + Attributes: + - root + - files + - packages + """ + + __slots__ = [ + 'root', + 'files', + 'packages', + ] + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'root', (PackageInfo, PackageInfo.thrift_spec), None, ), # 1 + (2, TType.MAP, 'files', (TType.I32,None,TType.STRUCT,(FileInfo, FileInfo.thrift_spec)), None, ), # 2 + (3, TType.MAP, 'packages', (TType.I32,None,TType.STRUCT,(PackageInfo, PackageInfo.thrift_spec)), None, ), # 3 + ) + + def __init__(self, root=None, files=None, packages=None,): + self.root = root + self.files = files + self.packages = packages + + +class LinkStatus(TBase): + """ + Attributes: + - url + - name + - plugin + - size + - status + - packagename + """ + + __slots__ = [ + 'url', + 'name', + 'plugin', + 'size', + 'status', + 'packagename', + ] + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'url', None, None, ), # 1 + (2, TType.STRING, 'name', None, None, ), # 2 + (3, TType.STRING, 'plugin', None, None, ), # 3 + (4, TType.I64, 'size', None, None, ), # 4 + (5, TType.I32, 'status', None, None, ), # 5 + (6, TType.STRING, 'packagename', None, None, ), # 6 + ) + + def __init__(self, url=None, name=None, plugin=None, size=None, status=None, packagename=None,): + self.url = url + self.name = name + self.plugin = plugin + self.size = size + self.status = status + self.packagename = packagename class InteractionTask(TBase): @@ -387,10 +573,9 @@ class InteractionTask(TBase): Attributes: - iid - input - - structure - - preset - - output - data + - output + - default_value - title - description - plugin @@ -399,10 +584,9 @@ class InteractionTask(TBase): __slots__ = [ 'iid', 'input', - 'structure', - 'preset', - 'output', 'data', + 'output', + 'default_value', 'title', 'description', 'plugin', @@ -412,32 +596,57 @@ class InteractionTask(TBase): None, # 0 (1, TType.I32, 'iid', None, None, ), # 1 (2, TType.I32, 'input', None, None, ), # 2 - (3, TType.LIST, 'structure', (TType.STRING,None), None, ), # 3 - (4, TType.LIST, 'preset', (TType.STRING,None), None, ), # 4 - (5, TType.I32, 'output', None, None, ), # 5 - (6, TType.LIST, 'data', (TType.STRING,None), None, ), # 6 - (7, TType.STRING, 'title', None, None, ), # 7 - (8, TType.STRING, 'description', None, None, ), # 8 - (9, TType.STRING, 'plugin', None, None, ), # 9 + (3, TType.LIST, 'data', (TType.STRING,None), None, ), # 3 + (4, TType.I32, 'output', None, None, ), # 4 + (5, TType.STRING, 'default_value', None, None, ), # 5 + (6, TType.STRING, 'title', None, None, ), # 6 + (7, TType.STRING, 'description', None, None, ), # 7 + (8, TType.STRING, 'plugin', None, None, ), # 8 ) - def __init__(self, iid=None, input=None, structure=None, preset=None, output=None, data=None, title=None, description=None, plugin=None,): + def __init__(self, iid=None, input=None, data=None, output=None, default_value=None, title=None, description=None, plugin=None,): self.iid = iid self.input = input - self.structure = structure - self.preset = preset - self.output = output self.data = data + self.output = output + self.default_value = default_value self.title = title self.description = description self.plugin = plugin +class AddonInfo(TBase): + """ + Attributes: + - func_name + - description + - value + """ + + __slots__ = [ + 'func_name', + 'description', + 'value', + ] + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'func_name', None, None, ), # 1 + (2, TType.STRING, 'description', None, None, ), # 2 + (3, TType.STRING, 'value', None, None, ), # 3 + ) + + def __init__(self, func_name=None, description=None, value=None,): + self.func_name = func_name + self.description = description + self.value = value + + class ConfigItem(TBase): """ Attributes: - name - - long_name + - display_name - description - type - default_value @@ -446,7 +655,7 @@ class ConfigItem(TBase): __slots__ = [ 'name', - 'long_name', + 'display_name', 'description', 'type', 'default_value', @@ -456,16 +665,16 @@ class ConfigItem(TBase): thrift_spec = ( None, # 0 (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'long_name', None, None, ), # 2 + (2, TType.STRING, 'display_name', None, None, ), # 2 (3, TType.STRING, 'description', None, None, ), # 3 (4, TType.STRING, 'type', None, None, ), # 4 (5, TType.STRING, 'default_value', None, None, ), # 5 (6, TType.STRING, 'value', None, None, ), # 6 ) - def __init__(self, name=None, long_name=None, description=None, type=None, default_value=None, value=None,): + def __init__(self, name=None, display_name=None, description=None, type=None, default_value=None, value=None,): self.name = name - self.long_name = long_name + self.display_name = display_name self.description = description self.type = type self.default_value = default_value @@ -476,72 +685,45 @@ class ConfigSection(TBase): """ Attributes: - name - - long_name + - display_name - description - long_description - items + - info - handler """ __slots__ = [ 'name', - 'long_name', + 'display_name', 'description', 'long_description', 'items', + 'info', 'handler', ] thrift_spec = ( None, # 0 (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'long_name', None, None, ), # 2 + (2, TType.STRING, 'display_name', None, None, ), # 2 (3, TType.STRING, 'description', None, None, ), # 3 (4, TType.STRING, 'long_description', None, None, ), # 4 (5, TType.LIST, 'items', (TType.STRUCT,(ConfigItem, ConfigItem.thrift_spec)), None, ), # 5 - (6, TType.MAP, 'handler', (TType.STRING,None,TType.STRUCT,(InteractionTask, InteractionTask.thrift_spec)), None, ), # 6 + (6, TType.LIST, 'info', (TType.STRUCT,(AddonInfo, AddonInfo.thrift_spec)), None, ), # 6 + (7, TType.LIST, 'handler', (TType.STRUCT,(InteractionTask, InteractionTask.thrift_spec)), None, ), # 7 ) - def __init__(self, name=None, long_name=None, description=None, long_description=None, items=None, handler=None,): + def __init__(self, name=None, display_name=None, description=None, long_description=None, items=None, info=None, handler=None,): self.name = name - self.long_name = long_name + self.display_name = display_name self.description = description self.long_description = long_description self.items = items + self.info = info self.handler = handler -class CaptchaTask(TBase): - """ - Attributes: - - tid - - data - - type - - resultType - """ - - __slots__ = [ - 'tid', - 'data', - 'type', - 'resultType', - ] - - thrift_spec = ( - None, # 0 - (1, TType.I16, 'tid', None, None, ), # 1 - (2, TType.STRING, 'data', None, None, ), # 2 - (3, TType.STRING, 'type', None, None, ), # 3 - (4, TType.STRING, 'resultType', None, None, ), # 4 - ) - - def __init__(self, tid=None, data=None, type=None, resultType=None,): - self.tid = tid - self.data = data - self.type = type - self.resultType = resultType - - class EventInfo(TBase): """ Attributes: @@ -636,7 +818,7 @@ class AccountInfo(TBase): (6, TType.I64, 'maxtraffic', None, None, ), # 6 (7, TType.BOOL, 'premium', None, None, ), # 7 (8, TType.BOOL, 'activated', None, None, ), # 8 - (9, TType.MAP, 'options', (TType.STRING,None,TType.LIST,(TType.STRING,None)), None, ), # 9 + (9, TType.MAP, 'options', (TType.STRING,None,TType.STRING,None), None, ), # 9 ) def __init__(self, plugin=None, loginname=None, valid=None, validuntil=None, trafficleft=None, maxtraffic=None, premium=None, activated=None, options=None,): @@ -651,66 +833,35 @@ class AccountInfo(TBase): self.options = options -class ServiceCall(TBase): +class AddonService(TBase): """ Attributes: - - plugin - - func - - arguments - """ - - __slots__ = [ - 'plugin', - 'func', - 'arguments', - ] - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'plugin', None, None, ), # 1 - (2, TType.STRING, 'func', None, None, ), # 2 - (3, TType.STRING, 'arguments', None, None, ), # 3 - ) - - def __init__(self, plugin=None, func=None, arguments=None,): - self.plugin = plugin - self.func = func - self.arguments = arguments - - -class OnlineStatus(TBase): - """ - Attributes: - - name - - plugin - - packagename - - status - - size + - func_name + - description + - media + - package """ __slots__ = [ - 'name', - 'plugin', - 'packagename', - 'status', - 'size', + 'func_name', + 'description', + 'media', + 'package', ] thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'plugin', None, None, ), # 2 - (3, TType.STRING, 'packagename', None, None, ), # 3 - (4, TType.I32, 'status', None, None, ), # 4 - (5, TType.I64, 'size', None, None, ), # 5 + (1, TType.STRING, 'func_name', None, None, ), # 1 + (2, TType.STRING, 'description', None, None, ), # 2 + (3, TType.I16, 'media', None, None, ), # 3 + (4, TType.BOOL, 'package', None, None, ), # 4 ) - def __init__(self, name=None, plugin=None, packagename=None, status=None, size=None,): - self.name = name - self.plugin = plugin - self.packagename = packagename - self.status = status - self.size = size + def __init__(self, func_name=None, description=None, media=None, package=None,): + self.func_name = func_name + self.description = description + self.media = media + self.package = package class OnlineCheck(TBase): @@ -728,7 +879,7 @@ class OnlineCheck(TBase): thrift_spec = ( None, # 0 (1, TType.I32, 'rid', None, None, ), # 1 - (2, TType.MAP, 'data', (TType.STRING,None,TType.STRUCT,(OnlineStatus, OnlineStatus.thrift_spec)), None, ), # 2 + (2, TType.MAP, 'data', (TType.STRING,None,TType.STRUCT,(LinkStatus, LinkStatus.thrift_spec)), None, ), # 2 ) def __init__(self, rid=None, data=None,): -- cgit v1.2.3 From 50d4df8b4d48b855bd18e9922355b7f3f2b4da4e Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 20 Mar 2012 14:57:45 +0100 Subject: captcha decrypting for all plugin types, new interaction manager --- .../thriftbackend/thriftgen/pyload/Pyload-remote | 7 +++ .../thriftbackend/thriftgen/pyload/Pyload.py | 67 ++++++++++++++++++++++ 2 files changed, 74 insertions(+) (limited to 'module/remote/thriftbackend/thriftgen') diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote index 6f0c09182..55f9a1823 100755 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote @@ -91,6 +91,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' InteractionTask getInteractionTask(i16 mode)' print ' void setInteractionResult(InteractionID iid, ValueString result)' print ' string generateDownloadLink(FileID fid, i16 timeout)' + print ' getNotifications()' print ' getAddonHandler()' print ' void callAddonHandler(PluginName plugin, string func, PackageID pid_or_fid)' print ' getEvents(string uuid)' @@ -565,6 +566,12 @@ elif cmd == 'generateDownloadLink': sys.exit(1) pp.pprint(client.generateDownloadLink(eval(args[0]),eval(args[1]),)) +elif cmd == 'getNotifications': + if len(args) != 0: + print 'getNotifications requires 0 args' + sys.exit(1) + pp.pprint(client.getNotifications()) + elif cmd == 'getAddonHandler': if len(args) != 0: print 'getAddonHandler requires 0 args' diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py index e58070a59..51c8621ba 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py @@ -450,6 +450,9 @@ class Iface(object): """ pass + def getNotifications(self, ): + pass + def getAddonHandler(self, ): pass @@ -2542,6 +2545,31 @@ class Client(Iface): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "generateDownloadLink failed: unknown result"); + def getNotifications(self, ): + self.send_getNotifications() + return self.recv_getNotifications() + + def send_getNotifications(self, ): + self._oprot.writeMessageBegin('getNotifications', TMessageType.CALL, self._seqid) + args = getNotifications_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getNotifications(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getNotifications_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getNotifications failed: unknown result"); + def getAddonHandler(self, ): self.send_getAddonHandler() return self.recv_getAddonHandler() @@ -3062,6 +3090,7 @@ class Processor(Iface, TProcessor): self._processMap["getInteractionTask"] = Processor.process_getInteractionTask self._processMap["setInteractionResult"] = Processor.process_setInteractionResult self._processMap["generateDownloadLink"] = Processor.process_generateDownloadLink + self._processMap["getNotifications"] = Processor.process_getNotifications self._processMap["getAddonHandler"] = Processor.process_getAddonHandler self._processMap["callAddonHandler"] = Processor.process_callAddonHandler self._processMap["getEvents"] = Processor.process_getEvents @@ -3868,6 +3897,17 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() + def process_getNotifications(self, seqid, iprot, oprot): + args = getNotifications_args() + args.read(iprot) + iprot.readMessageEnd() + result = getNotifications_result() + result.success = self._handler.getNotifications() + oprot.writeMessageBegin("getNotifications", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_getAddonHandler(self, seqid, iprot, oprot): args = getAddonHandler_args() args.read(iprot) @@ -6350,6 +6390,33 @@ class generateDownloadLink_result(TBase): self.success = success +class getNotifications_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class getNotifications_result(TBase): + """ + Attributes: + - success + """ + + __slots__ = [ + 'success', + ] + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(InteractionTask, InteractionTask.thrift_spec)), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + class getAddonHandler_args(TBase): __slots__ = [ -- cgit v1.2.3 From 84efa9d5ccd46a0adddc256a5eba4f8e33c76afd Mon Sep 17 00:00:00 2001 From: RaNaN Date: Mon, 7 May 2012 18:42:29 +0200 Subject: new multiuser api methods --- .../thriftbackend/thriftgen/pyload/Pyload-remote | 44 ++- .../thriftbackend/thriftgen/pyload/Pyload.py | 364 +++++++++++++++++++-- .../thriftbackend/thriftgen/pyload/ttypes.py | 108 +++++- 3 files changed, 466 insertions(+), 50 deletions(-) (limited to 'module/remote/thriftbackend/thriftgen') diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote index 55f9a1823..c2c13d8ed 100755 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote @@ -42,7 +42,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' getConfig()' print ' getPluginConfig()' print ' ConfigSection configureSection(string section)' - print ' void setConfigHandler(PluginName plugin, InteractionID iid, ValueString value)' + print ' void setConfigHandler(PluginName plugin, InteractionID iid, JSONString value)' print ' checkURLs(LinkList urls)' print ' parseURLs(string html, string url)' print ' OnlineCheck checkOnlineStatus(LinkList urls)' @@ -89,7 +89,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' void orderFiles( fids, PackageID pid, i16 position)' print ' bool isInteractionWaiting(i16 mode)' print ' InteractionTask getInteractionTask(i16 mode)' - print ' void setInteractionResult(InteractionID iid, ValueString result)' + print ' void setInteractionResult(InteractionID iid, JSONString result)' print ' string generateDownloadLink(FileID fid, i16 timeout)' print ' getNotifications()' print ' getAddonHandler()' @@ -100,11 +100,15 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' void updateAccount(PluginName plugin, string account, string password, options)' print ' void removeAccount(PluginName plugin, string account)' print ' bool login(string username, string password)' - print ' UserData getUserData(string username, string password)' + print ' UserData getUserData()' print ' getAllUserData()' + print ' UserData addUser(string username, string password)' + print ' void updateUserData(UserData data)' + print ' void removeUser(UserID uid)' + print ' bool setPassword(string username, string old_password, string new_password)' print ' getServices()' print ' bool hasService(PluginName plugin, string func)' - print ' string call(PluginName plugin, string func, string arguments)' + print ' string call(PluginName plugin, string func, JSONString arguments)' print ' getAllInfo()' print ' getInfoByPlugin(PluginName plugin)' print '' @@ -621,10 +625,10 @@ elif cmd == 'login': pp.pprint(client.login(args[0],args[1],)) elif cmd == 'getUserData': - if len(args) != 2: - print 'getUserData requires 2 args' + if len(args) != 0: + print 'getUserData requires 0 args' sys.exit(1) - pp.pprint(client.getUserData(args[0],args[1],)) + pp.pprint(client.getUserData()) elif cmd == 'getAllUserData': if len(args) != 0: @@ -632,6 +636,30 @@ elif cmd == 'getAllUserData': sys.exit(1) pp.pprint(client.getAllUserData()) +elif cmd == 'addUser': + if len(args) != 2: + print 'addUser requires 2 args' + sys.exit(1) + pp.pprint(client.addUser(args[0],args[1],)) + +elif cmd == 'updateUserData': + if len(args) != 1: + print 'updateUserData requires 1 args' + sys.exit(1) + pp.pprint(client.updateUserData(eval(args[0]),)) + +elif cmd == 'removeUser': + if len(args) != 1: + print 'removeUser requires 1 args' + sys.exit(1) + pp.pprint(client.removeUser(eval(args[0]),)) + +elif cmd == 'setPassword': + if len(args) != 3: + print 'setPassword requires 3 args' + sys.exit(1) + pp.pprint(client.setPassword(args[0],args[1],args[2],)) + elif cmd == 'getServices': if len(args) != 0: print 'getServices requires 0 args' @@ -648,7 +676,7 @@ elif cmd == 'call': if len(args) != 3: print 'call requires 3 args' sys.exit(1) - pp.pprint(client.call(eval(args[0]),args[1],args[2],)) + pp.pprint(client.call(eval(args[0]),args[1],eval(args[2]),)) elif cmd == 'getAllInfo': if len(args) != 0: diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py index 51c8621ba..c45663d25 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py @@ -9,7 +9,7 @@ from thrift.Thrift import TType, TMessageType, TException from ttypes import * from thrift.Thrift import TProcessor -from thrift.protocol.TBase import TBase, TExceptionBase +from thrift.protocol.TBase import TBase, TExceptionBase, TApplicationException class Iface(object): @@ -508,7 +508,13 @@ class Iface(object): """ pass - def getUserData(self, username, password): + def getUserData(self, ): + pass + + def getAllUserData(self, ): + pass + + def addUser(self, username, password): """ Parameters: - username @@ -516,7 +522,27 @@ class Iface(object): """ pass - def getAllUserData(self, ): + def updateUserData(self, data): + """ + Parameters: + - data + """ + pass + + def removeUser(self, uid): + """ + Parameters: + - uid + """ + pass + + def setPassword(self, username, old_password, new_password): + """ + Parameters: + - username + - old_password + - new_password + """ pass def getServices(self, ): @@ -2808,20 +2834,13 @@ class Client(Iface): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "login failed: unknown result"); - def getUserData(self, username, password): - """ - Parameters: - - username - - password - """ - self.send_getUserData(username, password) + def getUserData(self, ): + self.send_getUserData() return self.recv_getUserData() - def send_getUserData(self, username, password): + def send_getUserData(self, ): self._oprot.writeMessageBegin('getUserData', TMessageType.CALL, self._seqid) args = getUserData_args() - args.username = username - args.password = password args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() @@ -2838,8 +2857,6 @@ class Client(Iface): self._iprot.readMessageEnd() if result.success is not None: return result.success - if result.ex is not None: - raise result.ex raise TApplicationException(TApplicationException.MISSING_RESULT, "getUserData failed: unknown result"); def getAllUserData(self, ): @@ -2867,6 +2884,128 @@ class Client(Iface): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllUserData failed: unknown result"); + def addUser(self, username, password): + """ + Parameters: + - username + - password + """ + self.send_addUser(username, password) + return self.recv_addUser() + + def send_addUser(self, username, password): + self._oprot.writeMessageBegin('addUser', TMessageType.CALL, self._seqid) + args = addUser_args() + args.username = username + args.password = password + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_addUser(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = addUser_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "addUser failed: unknown result"); + + def updateUserData(self, data): + """ + Parameters: + - data + """ + self.send_updateUserData(data) + self.recv_updateUserData() + + def send_updateUserData(self, data): + self._oprot.writeMessageBegin('updateUserData', TMessageType.CALL, self._seqid) + args = updateUserData_args() + args.data = data + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_updateUserData(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = updateUserData_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + return + + def removeUser(self, uid): + """ + Parameters: + - uid + """ + self.send_removeUser(uid) + self.recv_removeUser() + + def send_removeUser(self, uid): + self._oprot.writeMessageBegin('removeUser', TMessageType.CALL, self._seqid) + args = removeUser_args() + args.uid = uid + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_removeUser(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = removeUser_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + return + + def setPassword(self, username, old_password, new_password): + """ + Parameters: + - username + - old_password + - new_password + """ + self.send_setPassword(username, old_password, new_password) + return self.recv_setPassword() + + def send_setPassword(self, username, old_password, new_password): + self._oprot.writeMessageBegin('setPassword', TMessageType.CALL, self._seqid) + args = setPassword_args() + args.username = username + args.old_password = old_password + args.new_password = new_password + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_setPassword(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = setPassword_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "setPassword failed: unknown result"); + def getServices(self, ): self.send_getServices() return self.recv_getServices() @@ -3101,6 +3240,10 @@ class Processor(Iface, TProcessor): self._processMap["login"] = Processor.process_login self._processMap["getUserData"] = Processor.process_getUserData self._processMap["getAllUserData"] = Processor.process_getAllUserData + self._processMap["addUser"] = Processor.process_addUser + self._processMap["updateUserData"] = Processor.process_updateUserData + self._processMap["removeUser"] = Processor.process_removeUser + self._processMap["setPassword"] = Processor.process_setPassword self._processMap["getServices"] = Processor.process_getServices self._processMap["hasService"] = Processor.process_hasService self._processMap["call"] = Processor.process_call @@ -4001,10 +4144,7 @@ class Processor(Iface, TProcessor): args.read(iprot) iprot.readMessageEnd() result = getUserData_result() - try: - result.success = self._handler.getUserData(args.username, args.password) - except UserDoesNotExists, ex: - result.ex = ex + result.success = self._handler.getUserData() oprot.writeMessageBegin("getUserData", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -4021,6 +4161,50 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() + def process_addUser(self, seqid, iprot, oprot): + args = addUser_args() + args.read(iprot) + iprot.readMessageEnd() + result = addUser_result() + result.success = self._handler.addUser(args.username, args.password) + oprot.writeMessageBegin("addUser", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_updateUserData(self, seqid, iprot, oprot): + args = updateUserData_args() + args.read(iprot) + iprot.readMessageEnd() + result = updateUserData_result() + self._handler.updateUserData(args.data) + oprot.writeMessageBegin("updateUserData", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_removeUser(self, seqid, iprot, oprot): + args = removeUser_args() + args.read(iprot) + iprot.readMessageEnd() + result = removeUser_result() + self._handler.removeUser(args.uid) + oprot.writeMessageBegin("removeUser", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_setPassword(self, seqid, iprot, oprot): + args = setPassword_args() + args.read(iprot) + iprot.readMessageEnd() + result = setPassword_result() + result.success = self._handler.setPassword(args.username, args.old_password, args.new_password) + oprot.writeMessageBegin("setPassword", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_getServices(self, seqid, iprot, oprot): args = getServices_args() args.read(iprot) @@ -6695,6 +6879,60 @@ class login_result(TBase): class getUserData_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class getUserData_result(TBase): + """ + Attributes: + - success + """ + + __slots__ = [ + 'success', + ] + + thrift_spec = ( + (0, TType.STRUCT, 'success', (UserData, UserData.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + +class getAllUserData_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class getAllUserData_result(TBase): + """ + Attributes: + - success + """ + + __slots__ = [ + 'success', + ] + + thrift_spec = ( + (0, TType.MAP, 'success', (TType.I32,None,TType.STRUCT,(UserData, UserData.thrift_spec)), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + +class addUser_args(TBase): """ Attributes: - username @@ -6717,38 +6955,108 @@ class getUserData_args(TBase): self.password = password -class getUserData_result(TBase): +class addUser_result(TBase): """ Attributes: - success - - ex """ __slots__ = [ 'success', - 'ex', ] thrift_spec = ( (0, TType.STRUCT, 'success', (UserData, UserData.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'ex', (UserDoesNotExists, UserDoesNotExists.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, ex=None,): + def __init__(self, success=None,): self.success = success - self.ex = ex -class getAllUserData_args(TBase): +class updateUserData_args(TBase): + """ + Attributes: + - data + """ __slots__ = [ + 'data', ] thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'data', (UserData, UserData.thrift_spec), None, ), # 1 ) + def __init__(self, data=None,): + self.data = data + -class getAllUserData_result(TBase): +class updateUserData_result(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class removeUser_args(TBase): + """ + Attributes: + - uid + """ + + __slots__ = [ + 'uid', + ] + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'uid', None, None, ), # 1 + ) + + def __init__(self, uid=None,): + self.uid = uid + + +class removeUser_result(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class setPassword_args(TBase): + """ + Attributes: + - username + - old_password + - new_password + """ + + __slots__ = [ + 'username', + 'old_password', + 'new_password', + ] + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'username', None, None, ), # 1 + (2, TType.STRING, 'old_password', None, None, ), # 2 + (3, TType.STRING, 'new_password', None, None, ), # 3 + ) + + def __init__(self, username=None, old_password=None, new_password=None,): + self.username = username + self.old_password = old_password + self.new_password = new_password + + +class setPassword_result(TBase): """ Attributes: - success @@ -6759,7 +7067,7 @@ class getAllUserData_result(TBase): ] thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(UserData, UserData.thrift_spec)), None, ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 ) def __init__(self, success=None,): diff --git a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py index fbbc599a8..c177a9dd2 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py +++ b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py @@ -191,6 +191,58 @@ class Output(TBase): "Query": 4, } +class Permission(TBase): + All = 0 + Add = 1 + Delete = 2 + Status = 4 + List = 16 + Modify = 32 + Download = 64 + Accounts = 128 + Interaction = 256 + Addons = 512 + + _VALUES_TO_NAMES = { + 0: "All", + 1: "Add", + 2: "Delete", + 4: "Status", + 16: "List", + 32: "Modify", + 64: "Download", + 128: "Accounts", + 256: "Interaction", + 512: "Addons", + } + + _NAMES_TO_VALUES = { + "All": 0, + "Add": 1, + "Delete": 2, + "Status": 4, + "List": 16, + "Modify": 32, + "Download": 64, + "Accounts": 128, + "Interaction": 256, + "Addons": 512, + } + +class Role(TBase): + Admin = 0 + User = 1 + + _VALUES_TO_NAMES = { + 0: "Admin", + 1: "User", + } + + _NAMES_TO_VALUES = { + "Admin": 0, + "User": 1, + } + class ProgressInfo(TBase): """ @@ -750,35 +802,55 @@ class EventInfo(TBase): class UserData(TBase): """ Attributes: + - uid - name - email - role - permission + - folder + - traffic + - limit + - user - templateName """ __slots__ = [ + 'uid', 'name', 'email', 'role', 'permission', + 'folder', + 'traffic', + 'limit', + 'user', 'templateName', ] thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'email', None, None, ), # 2 - (3, TType.I32, 'role', None, None, ), # 3 - (4, TType.I32, 'permission', None, None, ), # 4 - (5, TType.STRING, 'templateName', None, None, ), # 5 + (1, TType.I32, 'uid', None, None, ), # 1 + (2, TType.STRING, 'name', None, None, ), # 2 + (3, TType.STRING, 'email', None, None, ), # 3 + (4, TType.I16, 'role', None, None, ), # 4 + (5, TType.I16, 'permission', None, None, ), # 5 + (6, TType.STRING, 'folder', None, None, ), # 6 + (7, TType.I64, 'traffic', None, None, ), # 7 + (8, TType.I16, 'limit', None, None, ), # 8 + (9, TType.I32, 'user', None, None, ), # 9 + (10, TType.STRING, 'templateName', None, None, ), # 10 ) - def __init__(self, name=None, email=None, role=None, permission=None, templateName=None,): + def __init__(self, uid=None, name=None, email=None, role=None, permission=None, folder=None, traffic=None, limit=None, user=None, templateName=None,): + self.uid = uid self.name = name self.email = email self.role = role self.permission = permission + self.folder = folder + self.traffic = traffic + self.limit = limit + self.user = user self.templateName = templateName @@ -787,24 +859,28 @@ class AccountInfo(TBase): Attributes: - plugin - loginname + - owner - valid - validuntil - trafficleft - maxtraffic - premium - activated + - shared - options """ __slots__ = [ 'plugin', 'loginname', + 'owner', 'valid', 'validuntil', 'trafficleft', 'maxtraffic', 'premium', 'activated', + 'shared', 'options', ] @@ -812,24 +888,28 @@ class AccountInfo(TBase): None, # 0 (1, TType.STRING, 'plugin', None, None, ), # 1 (2, TType.STRING, 'loginname', None, None, ), # 2 - (3, TType.BOOL, 'valid', None, None, ), # 3 - (4, TType.I64, 'validuntil', None, None, ), # 4 - (5, TType.I64, 'trafficleft', None, None, ), # 5 - (6, TType.I64, 'maxtraffic', None, None, ), # 6 - (7, TType.BOOL, 'premium', None, None, ), # 7 - (8, TType.BOOL, 'activated', None, None, ), # 8 - (9, TType.MAP, 'options', (TType.STRING,None,TType.STRING,None), None, ), # 9 + (3, TType.I32, 'owner', None, None, ), # 3 + (4, TType.BOOL, 'valid', None, None, ), # 4 + (5, TType.I64, 'validuntil', None, None, ), # 5 + (6, TType.I64, 'trafficleft', None, None, ), # 6 + (7, TType.I64, 'maxtraffic', None, None, ), # 7 + (8, TType.BOOL, 'premium', None, None, ), # 8 + (9, TType.BOOL, 'activated', None, None, ), # 9 + (10, TType.BOOL, 'shared', None, None, ), # 10 + (11, TType.MAP, 'options', (TType.STRING,None,TType.STRING,None), None, ), # 11 ) - def __init__(self, plugin=None, loginname=None, valid=None, validuntil=None, trafficleft=None, maxtraffic=None, premium=None, activated=None, options=None,): + def __init__(self, plugin=None, loginname=None, owner=None, valid=None, validuntil=None, trafficleft=None, maxtraffic=None, premium=None, activated=None, shared=None, options=None,): self.plugin = plugin self.loginname = loginname + self.owner = owner self.valid = valid self.validuntil = validuntil self.trafficleft = trafficleft self.maxtraffic = maxtraffic self.premium = premium self.activated = activated + self.shared = shared self.options = options -- cgit v1.2.3 From 829244a6140763712d50ed046c33f415f2b04301 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 15 May 2012 19:22:34 +0200 Subject: some multiuser db changes --- .../thriftbackend/thriftgen/pyload/Pyload.py | 2 +- .../thriftbackend/thriftgen/pyload/ttypes.py | 52 +++++++++++++--------- 2 files changed, 31 insertions(+), 23 deletions(-) (limited to 'module/remote/thriftbackend/thriftgen') diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py index c45663d25..dd446cfc3 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py @@ -9,7 +9,7 @@ from thrift.Thrift import TType, TMessageType, TException from ttypes import * from thrift.Thrift import TProcessor -from thrift.protocol.TBase import TBase, TExceptionBase, TApplicationException +from thrift.protocol.TBase import TBase, TExceptionBase class Iface(object): diff --git a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py index c177a9dd2..d170f4688 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py +++ b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py @@ -411,6 +411,7 @@ class FileInfo(TBase): - fid - name - package + - owner - size - status - media @@ -423,6 +424,7 @@ class FileInfo(TBase): 'fid', 'name', 'package', + 'owner', 'size', 'status', 'media', @@ -436,18 +438,20 @@ class FileInfo(TBase): (1, TType.I32, 'fid', None, None, ), # 1 (2, TType.STRING, 'name', None, None, ), # 2 (3, TType.I32, 'package', None, None, ), # 3 - (4, TType.I64, 'size', None, None, ), # 4 - (5, TType.I32, 'status', None, None, ), # 5 - (6, TType.I32, 'media', None, None, ), # 6 - (7, TType.I64, 'added', None, None, ), # 7 - (8, TType.I16, 'fileorder', None, None, ), # 8 - (9, TType.STRUCT, 'download', (DownloadInfo, DownloadInfo.thrift_spec), None, ), # 9 + (4, TType.I32, 'owner', None, None, ), # 4 + (5, TType.I64, 'size', None, None, ), # 5 + (6, TType.I32, 'status', None, None, ), # 6 + (7, TType.I32, 'media', None, None, ), # 7 + (8, TType.I64, 'added', None, None, ), # 8 + (9, TType.I16, 'fileorder', None, None, ), # 9 + (10, TType.STRUCT, 'download', (DownloadInfo, DownloadInfo.thrift_spec), None, ), # 10 ) - def __init__(self, fid=None, name=None, package=None, size=None, status=None, media=None, added=None, fileorder=None, download=None,): + def __init__(self, fid=None, name=None, package=None, owner=None, size=None, status=None, media=None, added=None, fileorder=None, download=None,): self.fid = fid self.name = name self.package = package + self.owner = owner self.size = size self.status = status self.media = media @@ -494,6 +498,7 @@ class PackageInfo(TBase): - name - folder - root + - owner - site - comment - password @@ -510,6 +515,7 @@ class PackageInfo(TBase): 'name', 'folder', 'root', + 'owner', 'site', 'comment', 'password', @@ -527,22 +533,24 @@ class PackageInfo(TBase): (2, TType.STRING, 'name', None, None, ), # 2 (3, TType.STRING, 'folder', None, None, ), # 3 (4, TType.I32, 'root', None, None, ), # 4 - (5, TType.STRING, 'site', None, None, ), # 5 - (6, TType.STRING, 'comment', None, None, ), # 6 - (7, TType.STRING, 'password', None, None, ), # 7 - (8, TType.I64, 'added', None, None, ), # 8 - (9, TType.I32, 'status', None, None, ), # 9 - (10, TType.I16, 'packageorder', None, None, ), # 10 - (11, TType.STRUCT, 'stats', (PackageStats, PackageStats.thrift_spec), None, ), # 11 - (12, TType.LIST, 'fids', (TType.I32,None), None, ), # 12 - (13, TType.LIST, 'pids', (TType.I32,None), None, ), # 13 + (5, TType.I32, 'owner', None, None, ), # 5 + (6, TType.STRING, 'site', None, None, ), # 6 + (7, TType.STRING, 'comment', None, None, ), # 7 + (8, TType.STRING, 'password', None, None, ), # 8 + (9, TType.I64, 'added', None, None, ), # 9 + (10, TType.I32, 'status', None, None, ), # 10 + (11, TType.I16, 'packageorder', None, None, ), # 11 + (12, TType.STRUCT, 'stats', (PackageStats, PackageStats.thrift_spec), None, ), # 12 + (13, TType.LIST, 'fids', (TType.I32,None), None, ), # 13 + (14, TType.LIST, 'pids', (TType.I32,None), None, ), # 14 ) - def __init__(self, pid=None, name=None, folder=None, root=None, site=None, comment=None, password=None, added=None, status=None, packageorder=None, stats=None, fids=None, pids=None,): + def __init__(self, pid=None, name=None, folder=None, root=None, owner=None, site=None, comment=None, password=None, added=None, status=None, packageorder=None, stats=None, fids=None, pids=None,): self.pid = pid self.name = name self.folder = folder self.root = root + self.owner = owner self.site = site self.comment = comment self.password = password @@ -809,7 +817,7 @@ class UserData(TBase): - permission - folder - traffic - - limit + - dllimit - user - templateName """ @@ -822,7 +830,7 @@ class UserData(TBase): 'permission', 'folder', 'traffic', - 'limit', + 'dllimit', 'user', 'templateName', ] @@ -836,12 +844,12 @@ class UserData(TBase): (5, TType.I16, 'permission', None, None, ), # 5 (6, TType.STRING, 'folder', None, None, ), # 6 (7, TType.I64, 'traffic', None, None, ), # 7 - (8, TType.I16, 'limit', None, None, ), # 8 + (8, TType.I16, 'dllimit', None, None, ), # 8 (9, TType.I32, 'user', None, None, ), # 9 (10, TType.STRING, 'templateName', None, None, ), # 10 ) - def __init__(self, uid=None, name=None, email=None, role=None, permission=None, folder=None, traffic=None, limit=None, user=None, templateName=None,): + def __init__(self, uid=None, name=None, email=None, role=None, permission=None, folder=None, traffic=None, dllimit=None, user=None, templateName=None,): self.uid = uid self.name = name self.email = email @@ -849,7 +857,7 @@ class UserData(TBase): self.permission = permission self.folder = folder self.traffic = traffic - self.limit = limit + self.dllimit = dllimit self.user = user self.templateName = templateName -- cgit v1.2.3 From 0d2d6daef850ac6bcc7fafccd230e52d2a862c2c Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 3 Jun 2012 17:45:10 +0200 Subject: updates for database + api --- .../thriftbackend/thriftgen/pyload/Pyload-remote | 119 +- .../thriftbackend/thriftgen/pyload/Pyload.py | 1215 ++++++++++---------- .../thriftbackend/thriftgen/pyload/ttypes.py | 115 +- 3 files changed, 708 insertions(+), 741 deletions(-) (limited to 'module/remote/thriftbackend/thriftgen') diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote index c2c13d8ed..5b4a6fc75 100755 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote @@ -36,7 +36,6 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' bool isTimeReconnect()' print ' bool toggleReconnect()' print ' void scanDownloadFolder()' - print ' getProgressInfo()' print ' string getConfigValue(string section, string option)' print ' void setConfigValue(string section, string option, string value)' print ' getConfig()' @@ -50,13 +49,13 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' OnlineCheck pollResults(ResultID rid)' print ' generatePackages(LinkList links)' print ' generateAndAddPackages(LinkList links, bool paused)' - print ' autoAddLinks(LinkList links)' print ' PackageID createPackage(string name, string folder, PackageID root, string password, string site, string comment, bool paused)' print ' PackageID addPackage(string name, LinkList links, string password)' print ' PackageID addPackageP(string name, LinkList links, string password, bool paused)' print ' PackageID addPackageChild(string name, LinkList links, string password, PackageID root, bool paused)' print ' PackageID uploadContainer(string filename, string data)' print ' void addLinks(PackageID pid, LinkList links)' + print ' void addLocalFile(PackageID pid, string name, string path)' print ' void deleteFiles( fids)' print ' void deletePackages( pids)' print ' getCollector()' @@ -76,8 +75,6 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' void restartPackage(PackageID pid)' print ' void restartFile(FileID fid)' print ' void recheckPackage(PackageID pid)' - print ' void stopDownloads( fids)' - print ' void stopAllDownloads()' print ' void restartFailed()' print ' void setFilePaused(FileID fid, bool paused)' print ' void setPackagePaused(PackageID pid, bool paused)' @@ -87,13 +84,14 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' bool moveFiles( fids, PackageID pid)' print ' void orderPackage( pids, i16 position)' print ' void orderFiles( fids, PackageID pid, i16 position)' + print ' getProgressInfo()' + print ' void stopDownloads( fids)' + print ' void stopAllDownloads()' print ' bool isInteractionWaiting(i16 mode)' print ' InteractionTask getInteractionTask(i16 mode)' print ' void setInteractionResult(InteractionID iid, JSONString result)' print ' string generateDownloadLink(FileID fid, i16 timeout)' print ' getNotifications()' - print ' getAddonHandler()' - print ' void callAddonHandler(PluginName plugin, string func, PackageID pid_or_fid)' print ' getEvents(string uuid)' print ' getAccounts(bool refresh)' print ' getAccountTypes()' @@ -106,11 +104,12 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' void updateUserData(UserData data)' print ' void removeUser(UserID uid)' print ' bool setPassword(string username, string old_password, string new_password)' - print ' getServices()' - print ' bool hasService(PluginName plugin, string func)' - print ' string call(PluginName plugin, string func, JSONString arguments)' print ' getAllInfo()' print ' getInfoByPlugin(PluginName plugin)' + print ' getAddonHandler()' + print ' bool hasAddonHandler(PluginName plugin, string func)' + print ' void callAddon(PluginName plugin, string func, arguments)' + print ' void callAddonHandler(PluginName plugin, string func, PackageID pid_or_fid)' print '' sys.exit(0) @@ -240,12 +239,6 @@ elif cmd == 'scanDownloadFolder': sys.exit(1) pp.pprint(client.scanDownloadFolder()) -elif cmd == 'getProgressInfo': - if len(args) != 0: - print 'getProgressInfo requires 0 args' - sys.exit(1) - pp.pprint(client.getProgressInfo()) - elif cmd == 'getConfigValue': if len(args) != 2: print 'getConfigValue requires 2 args' @@ -324,12 +317,6 @@ elif cmd == 'generateAndAddPackages': sys.exit(1) pp.pprint(client.generateAndAddPackages(eval(args[0]),eval(args[1]),)) -elif cmd == 'autoAddLinks': - if len(args) != 1: - print 'autoAddLinks requires 1 args' - sys.exit(1) - pp.pprint(client.autoAddLinks(eval(args[0]),)) - elif cmd == 'createPackage': if len(args) != 7: print 'createPackage requires 7 args' @@ -366,6 +353,12 @@ elif cmd == 'addLinks': sys.exit(1) pp.pprint(client.addLinks(eval(args[0]),eval(args[1]),)) +elif cmd == 'addLocalFile': + if len(args) != 3: + print 'addLocalFile requires 3 args' + sys.exit(1) + pp.pprint(client.addLocalFile(eval(args[0]),args[1],args[2],)) + elif cmd == 'deleteFiles': if len(args) != 1: print 'deleteFiles requires 1 args' @@ -480,18 +473,6 @@ elif cmd == 'recheckPackage': sys.exit(1) pp.pprint(client.recheckPackage(eval(args[0]),)) -elif cmd == 'stopDownloads': - if len(args) != 1: - print 'stopDownloads requires 1 args' - sys.exit(1) - pp.pprint(client.stopDownloads(eval(args[0]),)) - -elif cmd == 'stopAllDownloads': - if len(args) != 0: - print 'stopAllDownloads requires 0 args' - sys.exit(1) - pp.pprint(client.stopAllDownloads()) - elif cmd == 'restartFailed': if len(args) != 0: print 'restartFailed requires 0 args' @@ -546,6 +527,24 @@ elif cmd == 'orderFiles': sys.exit(1) pp.pprint(client.orderFiles(eval(args[0]),eval(args[1]),eval(args[2]),)) +elif cmd == 'getProgressInfo': + if len(args) != 0: + print 'getProgressInfo requires 0 args' + sys.exit(1) + pp.pprint(client.getProgressInfo()) + +elif cmd == 'stopDownloads': + if len(args) != 1: + print 'stopDownloads requires 1 args' + sys.exit(1) + pp.pprint(client.stopDownloads(eval(args[0]),)) + +elif cmd == 'stopAllDownloads': + if len(args) != 0: + print 'stopAllDownloads requires 0 args' + sys.exit(1) + pp.pprint(client.stopAllDownloads()) + elif cmd == 'isInteractionWaiting': if len(args) != 1: print 'isInteractionWaiting requires 1 args' @@ -576,18 +575,6 @@ elif cmd == 'getNotifications': sys.exit(1) pp.pprint(client.getNotifications()) -elif cmd == 'getAddonHandler': - if len(args) != 0: - print 'getAddonHandler requires 0 args' - sys.exit(1) - pp.pprint(client.getAddonHandler()) - -elif cmd == 'callAddonHandler': - if len(args) != 3: - print 'callAddonHandler requires 3 args' - sys.exit(1) - pp.pprint(client.callAddonHandler(eval(args[0]),args[1],eval(args[2]),)) - elif cmd == 'getEvents': if len(args) != 1: print 'getEvents requires 1 args' @@ -660,24 +647,6 @@ elif cmd == 'setPassword': sys.exit(1) pp.pprint(client.setPassword(args[0],args[1],args[2],)) -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(eval(args[0]),args[1],)) - -elif cmd == 'call': - if len(args) != 3: - print 'call requires 3 args' - sys.exit(1) - pp.pprint(client.call(eval(args[0]),args[1],eval(args[2]),)) - elif cmd == 'getAllInfo': if len(args) != 0: print 'getAllInfo requires 0 args' @@ -690,6 +659,30 @@ elif cmd == 'getInfoByPlugin': sys.exit(1) pp.pprint(client.getInfoByPlugin(eval(args[0]),)) +elif cmd == 'getAddonHandler': + if len(args) != 0: + print 'getAddonHandler requires 0 args' + sys.exit(1) + pp.pprint(client.getAddonHandler()) + +elif cmd == 'hasAddonHandler': + if len(args) != 2: + print 'hasAddonHandler requires 2 args' + sys.exit(1) + pp.pprint(client.hasAddonHandler(eval(args[0]),args[1],)) + +elif cmd == 'callAddon': + if len(args) != 3: + print 'callAddon requires 3 args' + sys.exit(1) + pp.pprint(client.callAddon(eval(args[0]),args[1],eval(args[2]),)) + +elif cmd == 'callAddonHandler': + if len(args) != 3: + print 'callAddonHandler requires 3 args' + sys.exit(1) + pp.pprint(client.callAddonHandler(eval(args[0]),args[1],eval(args[2]),)) + else: print 'Unrecognized method %s' % cmd sys.exit(1) diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py index dd446cfc3..ba5d8cadc 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py @@ -56,9 +56,6 @@ class Iface(object): def scanDownloadFolder(self, ): pass - def getProgressInfo(self, ): - pass - def getConfigValue(self, section, option): """ Parameters: @@ -151,13 +148,6 @@ class Iface(object): """ pass - def autoAddLinks(self, links): - """ - Parameters: - - links - """ - pass - def createPackage(self, name, folder, root, password, site, comment, paused): """ Parameters: @@ -217,6 +207,15 @@ class Iface(object): """ pass + def addLocalFile(self, pid, name, path): + """ + Parameters: + - pid + - name + - path + """ + pass + def deleteFiles(self, fids): """ Parameters: @@ -342,16 +341,6 @@ class Iface(object): """ pass - def stopDownloads(self, fids): - """ - Parameters: - - fids - """ - pass - - def stopAllDownloads(self, ): - pass - def restartFailed(self, ): pass @@ -420,6 +409,19 @@ class Iface(object): """ pass + def getProgressInfo(self, ): + pass + + def stopDownloads(self, fids): + """ + Parameters: + - fids + """ + pass + + def stopAllDownloads(self, ): + pass + def isInteractionWaiting(self, mode): """ Parameters: @@ -453,18 +455,6 @@ class Iface(object): def getNotifications(self, ): pass - def getAddonHandler(self, ): - pass - - def callAddonHandler(self, plugin, func, pid_or_fid): - """ - Parameters: - - plugin - - func - - pid_or_fid - """ - pass - def getEvents(self, uuid): """ Parameters: @@ -545,33 +535,42 @@ class Iface(object): """ pass - def getServices(self, ): + def getAllInfo(self, ): pass - def hasService(self, plugin, func): + def getInfoByPlugin(self, plugin): """ Parameters: - plugin - - func """ pass - def call(self, plugin, func, arguments): + def getAddonHandler(self, ): + pass + + def hasAddonHandler(self, plugin, func): """ Parameters: - plugin - func - - arguments """ pass - def getAllInfo(self, ): + def callAddon(self, plugin, func, arguments): + """ + Parameters: + - plugin + - func + - arguments + """ pass - def getInfoByPlugin(self, plugin): + def callAddonHandler(self, plugin, func, pid_or_fid): """ Parameters: - plugin + - func + - pid_or_fid """ pass @@ -903,31 +902,6 @@ class Client(Iface): self._iprot.readMessageEnd() return - def getProgressInfo(self, ): - self.send_getProgressInfo() - return self.recv_getProgressInfo() - - def send_getProgressInfo(self, ): - self._oprot.writeMessageBegin('getProgressInfo', TMessageType.CALL, self._seqid) - args = getProgressInfo_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getProgressInfo(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getProgressInfo_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getProgressInfo failed: unknown result"); - def getConfigValue(self, section, option): """ Parameters: @@ -1322,36 +1296,6 @@ class Client(Iface): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "generateAndAddPackages failed: unknown result"); - def autoAddLinks(self, links): - """ - Parameters: - - links - """ - self.send_autoAddLinks(links) - return self.recv_autoAddLinks() - - def send_autoAddLinks(self, links): - self._oprot.writeMessageBegin('autoAddLinks', TMessageType.CALL, self._seqid) - args = autoAddLinks_args() - args.links = links - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_autoAddLinks(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = autoAddLinks_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "autoAddLinks failed: unknown result"); - def createPackage(self, name, folder, root, password, site, comment, paused): """ Parameters: @@ -1566,6 +1510,40 @@ class Client(Iface): raise result.e return + def addLocalFile(self, pid, name, path): + """ + Parameters: + - pid + - name + - path + """ + self.send_addLocalFile(pid, name, path) + self.recv_addLocalFile() + + def send_addLocalFile(self, pid, name, path): + self._oprot.writeMessageBegin('addLocalFile', TMessageType.CALL, self._seqid) + args = addLocalFile_args() + args.pid = pid + args.name = name + args.path = path + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_addLocalFile(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = addLocalFile_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.e is not None: + raise result.e + return + def deleteFiles(self, fids): """ Parameters: @@ -2115,57 +2093,6 @@ class Client(Iface): self._iprot.readMessageEnd() return - def stopDownloads(self, fids): - """ - Parameters: - - fids - """ - self.send_stopDownloads(fids) - self.recv_stopDownloads() - - def send_stopDownloads(self, fids): - self._oprot.writeMessageBegin('stopDownloads', TMessageType.CALL, self._seqid) - args = stopDownloads_args() - args.fids = fids - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_stopDownloads(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = stopDownloads_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - return - - def stopAllDownloads(self, ): - self.send_stopAllDownloads() - self.recv_stopAllDownloads() - - def send_stopAllDownloads(self, ): - self._oprot.writeMessageBegin('stopAllDownloads', TMessageType.CALL, self._seqid) - args = stopAllDownloads_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_stopAllDownloads(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = stopAllDownloads_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - return - def restartFailed(self, ): self.send_restartFailed() self.recv_restartFailed() @@ -2449,209 +2376,228 @@ class Client(Iface): self._iprot.readMessageEnd() return - def isInteractionWaiting(self, mode): - """ - Parameters: - - mode - """ - self.send_isInteractionWaiting(mode) - return self.recv_isInteractionWaiting() + def getProgressInfo(self, ): + self.send_getProgressInfo() + return self.recv_getProgressInfo() - def send_isInteractionWaiting(self, mode): - self._oprot.writeMessageBegin('isInteractionWaiting', TMessageType.CALL, self._seqid) - args = isInteractionWaiting_args() - args.mode = mode + def send_getProgressInfo(self, ): + self._oprot.writeMessageBegin('getProgressInfo', TMessageType.CALL, self._seqid) + args = getProgressInfo_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_isInteractionWaiting(self, ): + def recv_getProgressInfo(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = isInteractionWaiting_result() + result = getProgressInfo_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "isInteractionWaiting failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "getProgressInfo failed: unknown result"); - def getInteractionTask(self, mode): + def stopDownloads(self, fids): """ Parameters: - - mode + - fids """ - self.send_getInteractionTask(mode) - return self.recv_getInteractionTask() + self.send_stopDownloads(fids) + self.recv_stopDownloads() - def send_getInteractionTask(self, mode): - self._oprot.writeMessageBegin('getInteractionTask', TMessageType.CALL, self._seqid) - args = getInteractionTask_args() - args.mode = mode + def send_stopDownloads(self, fids): + self._oprot.writeMessageBegin('stopDownloads', TMessageType.CALL, self._seqid) + args = stopDownloads_args() + args.fids = fids args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getInteractionTask(self, ): + def recv_stopDownloads(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getInteractionTask_result() + result = stopDownloads_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getInteractionTask failed: unknown result"); + return - def setInteractionResult(self, iid, result): - """ - Parameters: - - iid - - result - """ - self.send_setInteractionResult(iid, result) - self.recv_setInteractionResult() + def stopAllDownloads(self, ): + self.send_stopAllDownloads() + self.recv_stopAllDownloads() - def send_setInteractionResult(self, iid, result): - self._oprot.writeMessageBegin('setInteractionResult', TMessageType.CALL, self._seqid) - args = setInteractionResult_args() - args.iid = iid - args.result = result + def send_stopAllDownloads(self, ): + self._oprot.writeMessageBegin('stopAllDownloads', TMessageType.CALL, self._seqid) + args = stopAllDownloads_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_setInteractionResult(self, ): + def recv_stopAllDownloads(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = setInteractionResult_result() + result = stopAllDownloads_result() result.read(self._iprot) self._iprot.readMessageEnd() return - def generateDownloadLink(self, fid, timeout): + def isInteractionWaiting(self, mode): """ Parameters: - - fid - - timeout + - mode """ - self.send_generateDownloadLink(fid, timeout) - return self.recv_generateDownloadLink() + self.send_isInteractionWaiting(mode) + return self.recv_isInteractionWaiting() - def send_generateDownloadLink(self, fid, timeout): - self._oprot.writeMessageBegin('generateDownloadLink', TMessageType.CALL, self._seqid) - args = generateDownloadLink_args() - args.fid = fid - args.timeout = timeout + def send_isInteractionWaiting(self, mode): + self._oprot.writeMessageBegin('isInteractionWaiting', TMessageType.CALL, self._seqid) + args = isInteractionWaiting_args() + args.mode = mode args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_generateDownloadLink(self, ): + def recv_isInteractionWaiting(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = generateDownloadLink_result() + result = isInteractionWaiting_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "generateDownloadLink failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "isInteractionWaiting failed: unknown result"); - def getNotifications(self, ): - self.send_getNotifications() - return self.recv_getNotifications() + def getInteractionTask(self, mode): + """ + Parameters: + - mode + """ + self.send_getInteractionTask(mode) + return self.recv_getInteractionTask() - def send_getNotifications(self, ): - self._oprot.writeMessageBegin('getNotifications', TMessageType.CALL, self._seqid) - args = getNotifications_args() + def send_getInteractionTask(self, mode): + self._oprot.writeMessageBegin('getInteractionTask', TMessageType.CALL, self._seqid) + args = getInteractionTask_args() + args.mode = mode args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getNotifications(self, ): + def recv_getInteractionTask(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getNotifications_result() + result = getInteractionTask_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getNotifications failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "getInteractionTask failed: unknown result"); - def getAddonHandler(self, ): - self.send_getAddonHandler() - return self.recv_getAddonHandler() + def setInteractionResult(self, iid, result): + """ + Parameters: + - iid + - result + """ + self.send_setInteractionResult(iid, result) + self.recv_setInteractionResult() - def send_getAddonHandler(self, ): - self._oprot.writeMessageBegin('getAddonHandler', TMessageType.CALL, self._seqid) - args = getAddonHandler_args() + def send_setInteractionResult(self, iid, result): + self._oprot.writeMessageBegin('setInteractionResult', TMessageType.CALL, self._seqid) + args = setInteractionResult_args() + args.iid = iid + args.result = result args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getAddonHandler(self, ): + def recv_setInteractionResult(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getAddonHandler_result() + result = setInteractionResult_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getAddonHandler failed: unknown result"); + return - def callAddonHandler(self, plugin, func, pid_or_fid): + def generateDownloadLink(self, fid, timeout): """ Parameters: - - plugin - - func - - pid_or_fid + - fid + - timeout """ - self.send_callAddonHandler(plugin, func, pid_or_fid) - self.recv_callAddonHandler() + self.send_generateDownloadLink(fid, timeout) + return self.recv_generateDownloadLink() - def send_callAddonHandler(self, plugin, func, pid_or_fid): - self._oprot.writeMessageBegin('callAddonHandler', TMessageType.CALL, self._seqid) - args = callAddonHandler_args() - args.plugin = plugin - args.func = func - args.pid_or_fid = pid_or_fid + def send_generateDownloadLink(self, fid, timeout): + self._oprot.writeMessageBegin('generateDownloadLink', TMessageType.CALL, self._seqid) + args = generateDownloadLink_args() + args.fid = fid + args.timeout = timeout args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_callAddonHandler(self, ): + def recv_generateDownloadLink(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = callAddonHandler_result() + result = generateDownloadLink_result() result.read(self._iprot) self._iprot.readMessageEnd() - return + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "generateDownloadLink failed: unknown result"); + + def getNotifications(self, ): + self.send_getNotifications() + return self.recv_getNotifications() + + def send_getNotifications(self, ): + self._oprot.writeMessageBegin('getNotifications', TMessageType.CALL, self._seqid) + args = getNotifications_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getNotifications(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getNotifications_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getNotifications failed: unknown result"); def getEvents(self, uuid): """ @@ -3006,155 +2952,189 @@ class Client(Iface): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "setPassword failed: unknown result"); - def getServices(self, ): - self.send_getServices() - return self.recv_getServices() + def getAllInfo(self, ): + self.send_getAllInfo() + return self.recv_getAllInfo() - def send_getServices(self, ): - self._oprot.writeMessageBegin('getServices', TMessageType.CALL, self._seqid) - args = getServices_args() + def send_getAllInfo(self, ): + self._oprot.writeMessageBegin('getAllInfo', TMessageType.CALL, self._seqid) + args = getAllInfo_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getServices(self, ): + def recv_getAllInfo(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getServices_result() + result = getAllInfo_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getServices failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllInfo failed: unknown result"); - def hasService(self, plugin, func): + def getInfoByPlugin(self, plugin): """ Parameters: - plugin - - func """ - self.send_hasService(plugin, func) - return self.recv_hasService() + self.send_getInfoByPlugin(plugin) + return self.recv_getInfoByPlugin() - def send_hasService(self, plugin, func): - self._oprot.writeMessageBegin('hasService', TMessageType.CALL, self._seqid) - args = hasService_args() + def send_getInfoByPlugin(self, plugin): + self._oprot.writeMessageBegin('getInfoByPlugin', TMessageType.CALL, self._seqid) + args = getInfoByPlugin_args() args.plugin = plugin - args.func = func args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_hasService(self, ): + def recv_getInfoByPlugin(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getInfoByPlugin_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getInfoByPlugin failed: unknown result"); + + def getAddonHandler(self, ): + self.send_getAddonHandler() + return self.recv_getAddonHandler() + + def send_getAddonHandler(self, ): + self._oprot.writeMessageBegin('getAddonHandler', TMessageType.CALL, self._seqid) + args = getAddonHandler_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getAddonHandler(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = hasService_result() + result = getAddonHandler_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "hasService failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "getAddonHandler failed: unknown result"); - def call(self, plugin, func, arguments): + def hasAddonHandler(self, plugin, func): """ Parameters: - plugin - func - - arguments """ - self.send_call(plugin, func, arguments) - return self.recv_call() + self.send_hasAddonHandler(plugin, func) + return self.recv_hasAddonHandler() - def send_call(self, plugin, func, arguments): - self._oprot.writeMessageBegin('call', TMessageType.CALL, self._seqid) - args = call_args() + def send_hasAddonHandler(self, plugin, func): + self._oprot.writeMessageBegin('hasAddonHandler', TMessageType.CALL, self._seqid) + args = hasAddonHandler_args() args.plugin = plugin args.func = func - args.arguments = arguments args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_call(self, ): + def recv_hasAddonHandler(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = call_result() + result = hasAddonHandler_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - if result.ex is not None: - raise result.ex - if result.e is not None: - raise result.e - raise TApplicationException(TApplicationException.MISSING_RESULT, "call failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "hasAddonHandler failed: unknown result"); - def getAllInfo(self, ): - self.send_getAllInfo() - return self.recv_getAllInfo() + def callAddon(self, plugin, func, arguments): + """ + Parameters: + - plugin + - func + - arguments + """ + self.send_callAddon(plugin, func, arguments) + self.recv_callAddon() - def send_getAllInfo(self, ): - self._oprot.writeMessageBegin('getAllInfo', TMessageType.CALL, self._seqid) - args = getAllInfo_args() + def send_callAddon(self, plugin, func, arguments): + self._oprot.writeMessageBegin('callAddon', TMessageType.CALL, self._seqid) + args = callAddon_args() + args.plugin = plugin + args.func = func + args.arguments = arguments args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getAllInfo(self, ): + def recv_callAddon(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getAllInfo_result() + result = callAddon_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllInfo failed: unknown result"); + if result.e is not None: + raise result.e + if result.ex is not None: + raise result.ex + return - def getInfoByPlugin(self, plugin): + def callAddonHandler(self, plugin, func, pid_or_fid): """ Parameters: - plugin + - func + - pid_or_fid """ - self.send_getInfoByPlugin(plugin) - return self.recv_getInfoByPlugin() + self.send_callAddonHandler(plugin, func, pid_or_fid) + self.recv_callAddonHandler() - def send_getInfoByPlugin(self, plugin): - self._oprot.writeMessageBegin('getInfoByPlugin', TMessageType.CALL, self._seqid) - args = getInfoByPlugin_args() + def send_callAddonHandler(self, plugin, func, pid_or_fid): + self._oprot.writeMessageBegin('callAddonHandler', TMessageType.CALL, self._seqid) + args = callAddonHandler_args() args.plugin = plugin + args.func = func + args.pid_or_fid = pid_or_fid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getInfoByPlugin(self, ): + def recv_callAddonHandler(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getInfoByPlugin_result() + result = callAddonHandler_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getInfoByPlugin failed: unknown result"); + if result.e is not None: + raise result.e + if result.ex is not None: + raise result.ex + return class Processor(Iface, TProcessor): @@ -3174,7 +3154,6 @@ class Processor(Iface, TProcessor): self._processMap["isTimeReconnect"] = Processor.process_isTimeReconnect self._processMap["toggleReconnect"] = Processor.process_toggleReconnect self._processMap["scanDownloadFolder"] = Processor.process_scanDownloadFolder - self._processMap["getProgressInfo"] = Processor.process_getProgressInfo self._processMap["getConfigValue"] = Processor.process_getConfigValue self._processMap["setConfigValue"] = Processor.process_setConfigValue self._processMap["getConfig"] = Processor.process_getConfig @@ -3188,13 +3167,13 @@ class Processor(Iface, TProcessor): self._processMap["pollResults"] = Processor.process_pollResults self._processMap["generatePackages"] = Processor.process_generatePackages self._processMap["generateAndAddPackages"] = Processor.process_generateAndAddPackages - self._processMap["autoAddLinks"] = Processor.process_autoAddLinks self._processMap["createPackage"] = Processor.process_createPackage self._processMap["addPackage"] = Processor.process_addPackage self._processMap["addPackageP"] = Processor.process_addPackageP self._processMap["addPackageChild"] = Processor.process_addPackageChild self._processMap["uploadContainer"] = Processor.process_uploadContainer self._processMap["addLinks"] = Processor.process_addLinks + self._processMap["addLocalFile"] = Processor.process_addLocalFile self._processMap["deleteFiles"] = Processor.process_deleteFiles self._processMap["deletePackages"] = Processor.process_deletePackages self._processMap["getCollector"] = Processor.process_getCollector @@ -3214,8 +3193,6 @@ class Processor(Iface, TProcessor): self._processMap["restartPackage"] = Processor.process_restartPackage self._processMap["restartFile"] = Processor.process_restartFile self._processMap["recheckPackage"] = Processor.process_recheckPackage - self._processMap["stopDownloads"] = Processor.process_stopDownloads - self._processMap["stopAllDownloads"] = Processor.process_stopAllDownloads self._processMap["restartFailed"] = Processor.process_restartFailed self._processMap["setFilePaused"] = Processor.process_setFilePaused self._processMap["setPackagePaused"] = Processor.process_setPackagePaused @@ -3225,13 +3202,14 @@ class Processor(Iface, TProcessor): self._processMap["moveFiles"] = Processor.process_moveFiles self._processMap["orderPackage"] = Processor.process_orderPackage self._processMap["orderFiles"] = Processor.process_orderFiles + self._processMap["getProgressInfo"] = Processor.process_getProgressInfo + self._processMap["stopDownloads"] = Processor.process_stopDownloads + self._processMap["stopAllDownloads"] = Processor.process_stopAllDownloads self._processMap["isInteractionWaiting"] = Processor.process_isInteractionWaiting self._processMap["getInteractionTask"] = Processor.process_getInteractionTask self._processMap["setInteractionResult"] = Processor.process_setInteractionResult self._processMap["generateDownloadLink"] = Processor.process_generateDownloadLink self._processMap["getNotifications"] = Processor.process_getNotifications - self._processMap["getAddonHandler"] = Processor.process_getAddonHandler - self._processMap["callAddonHandler"] = Processor.process_callAddonHandler self._processMap["getEvents"] = Processor.process_getEvents self._processMap["getAccounts"] = Processor.process_getAccounts self._processMap["getAccountTypes"] = Processor.process_getAccountTypes @@ -3244,11 +3222,12 @@ class Processor(Iface, TProcessor): self._processMap["updateUserData"] = Processor.process_updateUserData self._processMap["removeUser"] = Processor.process_removeUser self._processMap["setPassword"] = Processor.process_setPassword - self._processMap["getServices"] = Processor.process_getServices - self._processMap["hasService"] = Processor.process_hasService - self._processMap["call"] = Processor.process_call self._processMap["getAllInfo"] = Processor.process_getAllInfo self._processMap["getInfoByPlugin"] = Processor.process_getInfoByPlugin + self._processMap["getAddonHandler"] = Processor.process_getAddonHandler + self._processMap["hasAddonHandler"] = Processor.process_hasAddonHandler + self._processMap["callAddon"] = Processor.process_callAddon + self._processMap["callAddonHandler"] = Processor.process_callAddonHandler def process(self, iprot, oprot): (name, type, seqid) = iprot.readMessageBegin() @@ -3408,17 +3387,6 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() - def process_getProgressInfo(self, seqid, iprot, oprot): - args = getProgressInfo_args() - args.read(iprot) - iprot.readMessageEnd() - result = getProgressInfo_result() - result.success = self._handler.getProgressInfo() - oprot.writeMessageBegin("getProgressInfo", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_getConfigValue(self, seqid, iprot, oprot): args = getConfigValue_args() args.read(iprot) @@ -3562,17 +3530,6 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() - def process_autoAddLinks(self, seqid, iprot, oprot): - args = autoAddLinks_args() - args.read(iprot) - iprot.readMessageEnd() - result = autoAddLinks_result() - result.success = self._handler.autoAddLinks(args.links) - oprot.writeMessageBegin("autoAddLinks", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_createPackage(self, seqid, iprot, oprot): args = createPackage_args() args.read(iprot) @@ -3642,6 +3599,20 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() + def process_addLocalFile(self, seqid, iprot, oprot): + args = addLocalFile_args() + args.read(iprot) + iprot.readMessageEnd() + result = addLocalFile_result() + try: + self._handler.addLocalFile(args.pid, args.name, args.path) + except PackageDoesNotExists, e: + result.e = e + oprot.writeMessageBegin("addLocalFile", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_deleteFiles(self, seqid, iprot, oprot): args = deleteFiles_args() args.read(iprot) @@ -3850,31 +3821,9 @@ class Processor(Iface, TProcessor): args = recheckPackage_args() args.read(iprot) iprot.readMessageEnd() - result = recheckPackage_result() - self._handler.recheckPackage(args.pid) - oprot.writeMessageBegin("recheckPackage", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_stopDownloads(self, seqid, iprot, oprot): - args = stopDownloads_args() - args.read(iprot) - iprot.readMessageEnd() - result = stopDownloads_result() - self._handler.stopDownloads(args.fids) - oprot.writeMessageBegin("stopDownloads", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_stopAllDownloads(self, seqid, iprot, oprot): - args = stopAllDownloads_args() - args.read(iprot) - iprot.readMessageEnd() - result = stopAllDownloads_result() - self._handler.stopAllDownloads() - oprot.writeMessageBegin("stopAllDownloads", TMessageType.REPLY, seqid) + result = recheckPackage_result() + self._handler.recheckPackage(args.pid) + oprot.writeMessageBegin("recheckPackage", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -3996,6 +3945,39 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() + def process_getProgressInfo(self, seqid, iprot, oprot): + args = getProgressInfo_args() + args.read(iprot) + iprot.readMessageEnd() + result = getProgressInfo_result() + result.success = self._handler.getProgressInfo() + oprot.writeMessageBegin("getProgressInfo", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_stopDownloads(self, seqid, iprot, oprot): + args = stopDownloads_args() + args.read(iprot) + iprot.readMessageEnd() + result = stopDownloads_result() + self._handler.stopDownloads(args.fids) + oprot.writeMessageBegin("stopDownloads", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_stopAllDownloads(self, seqid, iprot, oprot): + args = stopAllDownloads_args() + args.read(iprot) + iprot.readMessageEnd() + result = stopAllDownloads_result() + self._handler.stopAllDownloads() + oprot.writeMessageBegin("stopAllDownloads", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_isInteractionWaiting(self, seqid, iprot, oprot): args = isInteractionWaiting_args() args.read(iprot) @@ -4051,28 +4033,6 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() - def process_getAddonHandler(self, seqid, iprot, oprot): - args = getAddonHandler_args() - args.read(iprot) - iprot.readMessageEnd() - result = getAddonHandler_result() - result.success = self._handler.getAddonHandler() - oprot.writeMessageBegin("getAddonHandler", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_callAddonHandler(self, seqid, iprot, oprot): - args = callAddonHandler_args() - args.read(iprot) - iprot.readMessageEnd() - result = callAddonHandler_result() - self._handler.callAddonHandler(args.plugin, args.func, args.pid_or_fid) - oprot.writeMessageBegin("callAddonHandler", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_getEvents(self, seqid, iprot, oprot): args = getEvents_args() args.read(iprot) @@ -4205,62 +4165,78 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() - def process_getServices(self, seqid, iprot, oprot): - args = getServices_args() + def process_getAllInfo(self, seqid, iprot, oprot): + args = getAllInfo_args() + args.read(iprot) + iprot.readMessageEnd() + result = getAllInfo_result() + result.success = self._handler.getAllInfo() + oprot.writeMessageBegin("getAllInfo", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getInfoByPlugin(self, seqid, iprot, oprot): + args = getInfoByPlugin_args() args.read(iprot) iprot.readMessageEnd() - result = getServices_result() - result.success = self._handler.getServices() - oprot.writeMessageBegin("getServices", TMessageType.REPLY, seqid) + result = getInfoByPlugin_result() + result.success = self._handler.getInfoByPlugin(args.plugin) + oprot.writeMessageBegin("getInfoByPlugin", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_hasService(self, seqid, iprot, oprot): - args = hasService_args() + def process_getAddonHandler(self, seqid, iprot, oprot): + args = getAddonHandler_args() args.read(iprot) iprot.readMessageEnd() - result = hasService_result() - result.success = self._handler.hasService(args.plugin, args.func) - oprot.writeMessageBegin("hasService", TMessageType.REPLY, seqid) + result = getAddonHandler_result() + result.success = self._handler.getAddonHandler() + oprot.writeMessageBegin("getAddonHandler", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_call(self, seqid, iprot, oprot): - args = call_args() + def process_hasAddonHandler(self, seqid, iprot, oprot): + args = hasAddonHandler_args() args.read(iprot) iprot.readMessageEnd() - result = call_result() - try: - result.success = self._handler.call(args.plugin, args.func, args.arguments) - except ServiceDoesNotExists, ex: - result.ex = ex - except ServiceException, e: - result.e = e - oprot.writeMessageBegin("call", TMessageType.REPLY, seqid) + result = hasAddonHandler_result() + result.success = self._handler.hasAddonHandler(args.plugin, args.func) + oprot.writeMessageBegin("hasAddonHandler", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_getAllInfo(self, seqid, iprot, oprot): - args = getAllInfo_args() + def process_callAddon(self, seqid, iprot, oprot): + args = callAddon_args() args.read(iprot) iprot.readMessageEnd() - result = getAllInfo_result() - result.success = self._handler.getAllInfo() - oprot.writeMessageBegin("getAllInfo", TMessageType.REPLY, seqid) + result = callAddon_result() + try: + self._handler.callAddon(args.plugin, args.func, args.arguments) + except ServiceDoesNotExists, e: + result.e = e + except ServiceException, ex: + result.ex = ex + oprot.writeMessageBegin("callAddon", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_getInfoByPlugin(self, seqid, iprot, oprot): - args = getInfoByPlugin_args() + def process_callAddonHandler(self, seqid, iprot, oprot): + args = callAddonHandler_args() args.read(iprot) iprot.readMessageEnd() - result = getInfoByPlugin_result() - result.success = self._handler.getInfoByPlugin(args.plugin) - oprot.writeMessageBegin("getInfoByPlugin", TMessageType.REPLY, seqid) + result = callAddonHandler_result() + try: + self._handler.callAddonHandler(args.plugin, args.func, args.pid_or_fid) + except ServiceDoesNotExists, e: + result.e = e + except ServiceException, ex: + result.ex = ex + oprot.writeMessageBegin("callAddonHandler", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -4584,33 +4560,6 @@ class scanDownloadFolder_result(TBase): ) -class getProgressInfo_args(TBase): - - __slots__ = [ - ] - - thrift_spec = ( - ) - - -class getProgressInfo_result(TBase): - """ - Attributes: - - success - """ - - __slots__ = [ - 'success', - ] - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(ProgressInfo, ProgressInfo.thrift_spec)), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - class getConfigValue_args(TBase): """ Attributes: @@ -5090,43 +5039,6 @@ class generateAndAddPackages_result(TBase): self.success = success -class autoAddLinks_args(TBase): - """ - Attributes: - - links - """ - - __slots__ = [ - 'links', - ] - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'links', (TType.STRING,None), None, ), # 1 - ) - - def __init__(self, links=None,): - self.links = links - - -class autoAddLinks_result(TBase): - """ - Attributes: - - success - """ - - __slots__ = [ - 'success', - ] - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.I32,None), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - class createPackage_args(TBase): """ Attributes: @@ -5418,6 +5330,52 @@ class addLinks_result(TBase): self.e = e +class addLocalFile_args(TBase): + """ + Attributes: + - pid + - name + - path + """ + + __slots__ = [ + 'pid', + 'name', + 'path', + ] + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'pid', None, None, ), # 1 + (2, TType.STRING, 'name', None, None, ), # 2 + (3, TType.STRING, 'path', None, None, ), # 3 + ) + + def __init__(self, pid=None, name=None, path=None,): + self.pid = pid + self.name = name + self.path = path + + +class addLocalFile_result(TBase): + """ + Attributes: + - e + """ + + __slots__ = [ + 'e', + ] + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'e', (PackageDoesNotExists, PackageDoesNotExists.thrift_spec), None, ), # 1 + ) + + def __init__(self, e=None,): + self.e = e + + class deleteFiles_args(TBase): """ Attributes: @@ -6013,65 +5971,19 @@ class recheckPackage_args(TBase): """ __slots__ = [ - 'pid', - ] - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'pid', None, None, ), # 1 - ) - - def __init__(self, pid=None,): - self.pid = pid - - -class recheckPackage_result(TBase): - - __slots__ = [ - ] - - thrift_spec = ( - ) - - -class stopDownloads_args(TBase): - """ - Attributes: - - fids - """ - - __slots__ = [ - 'fids', - ] - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'fids', (TType.I32,None), None, ), # 1 - ) - - def __init__(self, fids=None,): - self.fids = fids - - -class stopDownloads_result(TBase): - - __slots__ = [ - ] - - thrift_spec = ( - ) - - -class stopAllDownloads_args(TBase): - - __slots__ = [ + 'pid', ] thrift_spec = ( + None, # 0 + (1, TType.I32, 'pid', None, None, ), # 1 ) + def __init__(self, pid=None,): + self.pid = pid + -class stopAllDownloads_result(TBase): +class recheckPackage_result(TBase): __slots__ = [ ] @@ -6427,6 +6339,79 @@ class orderFiles_result(TBase): ) +class getProgressInfo_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class getProgressInfo_result(TBase): + """ + Attributes: + - success + """ + + __slots__ = [ + 'success', + ] + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(ProgressInfo, ProgressInfo.thrift_spec)), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + +class stopDownloads_args(TBase): + """ + Attributes: + - fids + """ + + __slots__ = [ + 'fids', + ] + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'fids', (TType.I32,None), None, ), # 1 + ) + + def __init__(self, fids=None,): + self.fids = fids + + +class stopDownloads_result(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class stopAllDownloads_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class stopAllDownloads_result(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + class isInteractionWaiting_args(TBase): """ Attributes: @@ -6601,69 +6586,6 @@ class getNotifications_result(TBase): self.success = success -class getAddonHandler_args(TBase): - - __slots__ = [ - ] - - thrift_spec = ( - ) - - -class getAddonHandler_result(TBase): - """ - Attributes: - - success - """ - - __slots__ = [ - 'success', - ] - - thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.LIST,(TType.STRUCT,(AddonService, AddonService.thrift_spec))), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - -class callAddonHandler_args(TBase): - """ - Attributes: - - plugin - - func - - pid_or_fid - """ - - __slots__ = [ - 'plugin', - 'func', - 'pid_or_fid', - ] - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'plugin', None, None, ), # 1 - (2, TType.STRING, 'func', None, None, ), # 2 - (3, TType.I32, 'pid_or_fid', None, None, ), # 3 - ) - - def __init__(self, plugin=None, func=None, pid_or_fid=None,): - self.plugin = plugin - self.func = func - self.pid_or_fid = pid_or_fid - - -class callAddonHandler_result(TBase): - - __slots__ = [ - ] - - thrift_spec = ( - ) - - class getEvents_args(TBase): """ Attributes: @@ -7074,7 +6996,7 @@ class setPassword_result(TBase): self.success = success -class getServices_args(TBase): +class getAllInfo_args(TBase): __slots__ = [ ] @@ -7083,7 +7005,7 @@ class getServices_args(TBase): ) -class getServices_result(TBase): +class getAllInfo_result(TBase): """ Attributes: - success @@ -7094,37 +7016,33 @@ class getServices_result(TBase): ] thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.LIST,(TType.STRUCT,(AddonService, AddonService.thrift_spec))), None, ), # 0 + (0, TType.MAP, 'success', (TType.STRING,None,TType.LIST,(TType.STRUCT,(AddonInfo, AddonInfo.thrift_spec))), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class hasService_args(TBase): +class getInfoByPlugin_args(TBase): """ Attributes: - plugin - - func """ __slots__ = [ 'plugin', - 'func', ] thrift_spec = ( None, # 0 (1, TType.STRING, 'plugin', None, None, ), # 1 - (2, TType.STRING, 'func', None, None, ), # 2 ) - def __init__(self, plugin=None, func=None,): + def __init__(self, plugin=None,): self.plugin = plugin - self.func = func -class hasService_result(TBase): +class getInfoByPlugin_result(TBase): """ Attributes: - success @@ -7135,126 +7053,177 @@ class hasService_result(TBase): ] thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT,(AddonInfo, AddonInfo.thrift_spec)), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + +class getAddonHandler_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class getAddonHandler_result(TBase): + """ + Attributes: + - success + """ + + __slots__ = [ + 'success', + ] + + thrift_spec = ( + (0, TType.MAP, 'success', (TType.STRING,None,TType.LIST,(TType.STRUCT,(AddonService, AddonService.thrift_spec))), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class call_args(TBase): +class hasAddonHandler_args(TBase): """ Attributes: - plugin - func - - arguments """ __slots__ = [ 'plugin', 'func', - 'arguments', ] thrift_spec = ( None, # 0 (1, TType.STRING, 'plugin', None, None, ), # 1 (2, TType.STRING, 'func', None, None, ), # 2 - (3, TType.STRING, 'arguments', None, None, ), # 3 ) - def __init__(self, plugin=None, func=None, arguments=None,): + def __init__(self, plugin=None, func=None,): self.plugin = plugin self.func = func - self.arguments = arguments -class call_result(TBase): +class hasAddonHandler_result(TBase): """ Attributes: - success - - ex - - e """ __slots__ = [ 'success', - 'ex', - 'e', ] thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'ex', (ServiceDoesNotExists, ServiceDoesNotExists.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'e', (ServiceException, ServiceException.thrift_spec), None, ), # 2 + (0, TType.BOOL, 'success', None, None, ), # 0 ) - def __init__(self, success=None, ex=None, e=None,): + def __init__(self, success=None,): self.success = success - self.ex = ex - self.e = e -class getAllInfo_args(TBase): +class callAddon_args(TBase): + """ + Attributes: + - plugin + - func + - arguments + """ __slots__ = [ + 'plugin', + 'func', + 'arguments', ] thrift_spec = ( + None, # 0 + (1, TType.STRING, 'plugin', None, None, ), # 1 + (2, TType.STRING, 'func', None, None, ), # 2 + (3, TType.LIST, 'arguments', (TType.STRING,None), None, ), # 3 ) + def __init__(self, plugin=None, func=None, arguments=None,): + self.plugin = plugin + self.func = func + self.arguments = arguments + -class getAllInfo_result(TBase): +class callAddon_result(TBase): """ Attributes: - - success + - e + - ex """ __slots__ = [ - 'success', + 'e', + 'ex', ] thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.LIST,(TType.STRUCT,(AddonInfo, AddonInfo.thrift_spec))), None, ), # 0 + None, # 0 + (1, TType.STRUCT, 'e', (ServiceDoesNotExists, ServiceDoesNotExists.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'ex', (ServiceException, ServiceException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None,): - self.success = success + def __init__(self, e=None, ex=None,): + self.e = e + self.ex = ex -class getInfoByPlugin_args(TBase): +class callAddonHandler_args(TBase): """ Attributes: - plugin + - func + - pid_or_fid """ __slots__ = [ 'plugin', + 'func', + 'pid_or_fid', ] thrift_spec = ( None, # 0 (1, TType.STRING, 'plugin', None, None, ), # 1 + (2, TType.STRING, 'func', None, None, ), # 2 + (3, TType.I32, 'pid_or_fid', None, None, ), # 3 ) - def __init__(self, plugin=None,): + def __init__(self, plugin=None, func=None, pid_or_fid=None,): self.plugin = plugin + self.func = func + self.pid_or_fid = pid_or_fid -class getInfoByPlugin_result(TBase): +class callAddonHandler_result(TBase): """ Attributes: - - success + - e + - ex """ __slots__ = [ - 'success', + 'e', + 'ex', ] thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(AddonInfo, AddonInfo.thrift_spec)), None, ), # 0 + None, # 0 + (1, TType.STRUCT, 'e', (ServiceDoesNotExists, ServiceDoesNotExists.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'ex', (ServiceException, ServiceException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None,): - self.success = success + def __init__(self, e=None, ex=None,): + self.e = e + self.ex = ex diff --git a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py index d170f4688..3e4cce276 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py +++ b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py @@ -195,38 +195,35 @@ class Permission(TBase): All = 0 Add = 1 Delete = 2 - Status = 4 - List = 16 - Modify = 32 - Download = 64 - Accounts = 128 - Interaction = 256 - Addons = 512 + Modify = 4 + Status = 8 + Download = 16 + Accounts = 32 + Interaction = 64 + Addons = 128 _VALUES_TO_NAMES = { 0: "All", 1: "Add", 2: "Delete", - 4: "Status", - 16: "List", - 32: "Modify", - 64: "Download", - 128: "Accounts", - 256: "Interaction", - 512: "Addons", + 4: "Modify", + 8: "Status", + 16: "Download", + 32: "Accounts", + 64: "Interaction", + 128: "Addons", } _NAMES_TO_VALUES = { "All": 0, "Add": 1, "Delete": 2, - "Status": 4, - "List": 16, - "Modify": 32, - "Download": 64, - "Accounts": 128, - "Interaction": 256, - "Addons": 512, + "Modify": 4, + "Status": 8, + "Download": 16, + "Accounts": 32, + "Interaction": 64, + "Addons": 128, } class Role(TBase): @@ -675,6 +672,37 @@ class InteractionTask(TBase): self.plugin = plugin +class AddonService(TBase): + """ + Attributes: + - func_name + - description + - arguments + - media + """ + + __slots__ = [ + 'func_name', + 'description', + 'arguments', + 'media', + ] + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'func_name', None, None, ), # 1 + (2, TType.STRING, 'description', None, None, ), # 2 + (3, TType.LIST, 'arguments', (TType.STRING,None), None, ), # 3 + (4, TType.I16, 'media', None, None, ), # 4 + ) + + def __init__(self, func_name=None, description=None, arguments=None, media=None,): + self.func_name = func_name + self.description = description + self.arguments = arguments + self.media = media + + class AddonInfo(TBase): """ Attributes: @@ -818,6 +846,8 @@ class UserData(TBase): - folder - traffic - dllimit + - dlquota + - hddquota - user - templateName """ @@ -831,6 +861,8 @@ class UserData(TBase): 'folder', 'traffic', 'dllimit', + 'dlquota', + 'hddquota', 'user', 'templateName', ] @@ -845,11 +877,13 @@ class UserData(TBase): (6, TType.STRING, 'folder', None, None, ), # 6 (7, TType.I64, 'traffic', None, None, ), # 7 (8, TType.I16, 'dllimit', None, None, ), # 8 - (9, TType.I32, 'user', None, None, ), # 9 - (10, TType.STRING, 'templateName', None, None, ), # 10 + (9, TType.STRING, 'dlquota', None, None, ), # 9 + (10, TType.I64, 'hddquota', None, None, ), # 10 + (11, TType.I32, 'user', None, None, ), # 11 + (12, TType.STRING, 'templateName', None, None, ), # 12 ) - def __init__(self, uid=None, name=None, email=None, role=None, permission=None, folder=None, traffic=None, dllimit=None, user=None, templateName=None,): + def __init__(self, uid=None, name=None, email=None, role=None, permission=None, folder=None, traffic=None, dllimit=None, dlquota=None, hddquota=None, user=None, templateName=None,): self.uid = uid self.name = name self.email = email @@ -858,6 +892,8 @@ class UserData(TBase): self.folder = folder self.traffic = traffic self.dllimit = dllimit + self.dlquota = dlquota + self.hddquota = hddquota self.user = user self.templateName = templateName @@ -921,37 +957,6 @@ class AccountInfo(TBase): self.options = options -class AddonService(TBase): - """ - Attributes: - - func_name - - description - - media - - package - """ - - __slots__ = [ - 'func_name', - 'description', - 'media', - 'package', - ] - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'func_name', None, None, ), # 1 - (2, TType.STRING, 'description', None, None, ), # 2 - (3, TType.I16, 'media', None, None, ), # 3 - (4, TType.BOOL, 'package', None, None, ), # 4 - ) - - def __init__(self, func_name=None, description=None, media=None, package=None,): - self.func_name = func_name - self.description = description - self.media = media - self.package = package - - class OnlineCheck(TBase): """ Attributes: -- cgit v1.2.3 From cbd4f4b5375f89362733e10a9b98e5a74c2a5734 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Fri, 31 Aug 2012 23:25:26 +0200 Subject: first js models/views --- .../thriftbackend/thriftgen/pyload/Pyload-remote | 14 +++--- .../thriftbackend/thriftgen/pyload/Pyload.py | 16 +++---- .../thriftbackend/thriftgen/pyload/constants.py | 2 +- .../thriftbackend/thriftgen/pyload/ttypes.py | 52 +++++++++++----------- 4 files changed, 42 insertions(+), 42 deletions(-) (limited to 'module/remote/thriftbackend/thriftgen') diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote index 5b4a6fc75..a84de7978 100755 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Autogenerated by Thrift Compiler (0.9.0-dev) +# Autogenerated by Thrift Compiler (0.8.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -64,14 +64,14 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' void renameCollPack(string name, string new_name)' print ' void deleteCollPack(string name)' print ' void deleteCollLink(string url)' - print ' PackageView getAllFiles()' - print ' PackageView getAllUnfinishedFiles()' - print ' PackageView getFileTree(PackageID pid, bool full)' - print ' PackageView getUnfinishedFileTree(PackageID pid, bool full)' - print ' PackageView getPackageContent(PackageID pid)' + print ' TreeCollection getAllFiles()' + print ' TreeCollection getAllUnfinishedFiles()' + print ' TreeCollection getFileTree(PackageID pid, bool full)' + print ' TreeCollection getUnfinishedFileTree(PackageID pid, bool full)' + print ' TreeCollection getPackageContent(PackageID pid)' print ' PackageInfo getPackageInfo(PackageID pid)' print ' FileInfo getFileInfo(FileID fid)' - print ' findFiles(string pattern)' + print ' TreeCollection findFiles(string pattern)' print ' void restartPackage(PackageID pid)' print ' void restartFile(FileID fid)' print ' void recheckPackage(PackageID pid)' diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py index ba5d8cadc..c807d3d9e 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py @@ -1,5 +1,5 @@ # -# Autogenerated by Thrift Compiler (0.9.0-dev) +# Autogenerated by Thrift Compiler (0.8.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -8,7 +8,7 @@ from thrift.Thrift import TType, TMessageType, TException from ttypes import * -from thrift.Thrift import TProcessor +from thrift.Thrift import TProcessor, TApplicationException from thrift.protocol.TBase import TBase, TExceptionBase @@ -5636,7 +5636,7 @@ class getAllFiles_result(TBase): ] thrift_spec = ( - (0, TType.STRUCT, 'success', (PackageView, PackageView.thrift_spec), None, ), # 0 + (0, TType.STRUCT, 'success', (TreeCollection, TreeCollection.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): @@ -5663,7 +5663,7 @@ class getAllUnfinishedFiles_result(TBase): ] thrift_spec = ( - (0, TType.STRUCT, 'success', (PackageView, PackageView.thrift_spec), None, ), # 0 + (0, TType.STRUCT, 'success', (TreeCollection, TreeCollection.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): @@ -5704,7 +5704,7 @@ class getFileTree_result(TBase): ] thrift_spec = ( - (0, TType.STRUCT, 'success', (PackageView, PackageView.thrift_spec), None, ), # 0 + (0, TType.STRUCT, 'success', (TreeCollection, TreeCollection.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): @@ -5745,7 +5745,7 @@ class getUnfinishedFileTree_result(TBase): ] thrift_spec = ( - (0, TType.STRUCT, 'success', (PackageView, PackageView.thrift_spec), None, ), # 0 + (0, TType.STRUCT, 'success', (TreeCollection, TreeCollection.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): @@ -5782,7 +5782,7 @@ class getPackageContent_result(TBase): ] thrift_spec = ( - (0, TType.STRUCT, 'success', (PackageView, PackageView.thrift_spec), None, ), # 0 + (0, TType.STRUCT, 'success', (TreeCollection, TreeCollection.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): @@ -5901,7 +5901,7 @@ class findFiles_result(TBase): ] thrift_spec = ( - (0, TType.MAP, 'success', (TType.I32,None,TType.STRUCT,(FileInfo, FileInfo.thrift_spec)), None, ), # 0 + (0, TType.STRUCT, 'success', (TreeCollection, TreeCollection.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): diff --git a/module/remote/thriftbackend/thriftgen/pyload/constants.py b/module/remote/thriftbackend/thriftgen/pyload/constants.py index f8960dc63..7842b3177 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/constants.py +++ b/module/remote/thriftbackend/thriftgen/pyload/constants.py @@ -1,5 +1,5 @@ # -# Autogenerated by Thrift Compiler (0.9.0-dev) +# Autogenerated by Thrift Compiler (0.8.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # diff --git a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py index 3e4cce276..b61d4c479 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py +++ b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py @@ -1,5 +1,5 @@ # -# Autogenerated by Thrift Compiler (0.9.0-dev) +# Autogenerated by Thrift Compiler (0.8.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -119,28 +119,31 @@ class FileStatus(TBase): class PackageStatus(TBase): Ok = 0 Paused = 1 - Remote = 2 + Folder = 2 + Remote = 3 _VALUES_TO_NAMES = { 0: "Ok", 1: "Paused", - 2: "Remote", + 2: "Folder", + 3: "Remote", } _NAMES_TO_VALUES = { "Ok": 0, "Paused": 1, - "Remote": 2, + "Folder": 2, + "Remote": 3, } class Input(TBase): NA = 0 Text = 1 - TextBox = 2 + Textbox = 2 Password = 3 Bool = 4 Click = 5 - Choice = 6 + Select = 6 Multiple = 7 List = 8 Table = 9 @@ -148,11 +151,11 @@ class Input(TBase): _VALUES_TO_NAMES = { 0: "NA", 1: "Text", - 2: "TextBox", + 2: "Textbox", 3: "Password", 4: "Bool", 5: "Click", - 6: "Choice", + 6: "Select", 7: "Multiple", 8: "List", 9: "Table", @@ -161,11 +164,11 @@ class Input(TBase): _NAMES_TO_VALUES = { "NA": 0, "Text": 1, - "TextBox": 2, + "Textbox": 2, "Password": 3, "Bool": 4, "Click": 5, - "Choice": 6, + "Select": 6, "Multiple": 7, "List": 8, "Table": 9, @@ -196,22 +199,20 @@ class Permission(TBase): Add = 1 Delete = 2 Modify = 4 - Status = 8 - Download = 16 - Accounts = 32 - Interaction = 64 - Addons = 128 + Download = 8 + Accounts = 16 + Interaction = 32 + Addons = 64 _VALUES_TO_NAMES = { 0: "All", 1: "Add", 2: "Delete", 4: "Modify", - 8: "Status", - 16: "Download", - 32: "Accounts", - 64: "Interaction", - 128: "Addons", + 8: "Download", + 16: "Accounts", + 32: "Interaction", + 64: "Addons", } _NAMES_TO_VALUES = { @@ -219,11 +220,10 @@ class Permission(TBase): "Add": 1, "Delete": 2, "Modify": 4, - "Status": 8, - "Download": 16, - "Accounts": 32, - "Interaction": 64, - "Addons": 128, + "Download": 8, + "Accounts": 16, + "Interaction": 32, + "Addons": 64, } class Role(TBase): @@ -559,7 +559,7 @@ class PackageInfo(TBase): self.pids = pids -class PackageView(TBase): +class TreeCollection(TBase): """ Attributes: - root -- cgit v1.2.3 From 560958b70043ea5b7e0e32d41cb51bd44696d775 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 9 Sep 2012 15:39:50 +0200 Subject: new config api --- .../thriftbackend/thriftgen/pyload/Pyload-remote | 69 +-- .../thriftbackend/thriftgen/pyload/Pyload.py | 465 ++++++++++++--------- .../thriftbackend/thriftgen/pyload/ttypes.py | 63 ++- 3 files changed, 343 insertions(+), 254 deletions(-) (limited to 'module/remote/thriftbackend/thriftgen') diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote index a84de7978..78d251501 100755 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote @@ -35,12 +35,12 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' bool isTimeDownload()' print ' bool isTimeReconnect()' print ' bool toggleReconnect()' - print ' void scanDownloadFolder()' - print ' string getConfigValue(string section, string option)' - print ' void setConfigValue(string section, string option, string value)' print ' getConfig()' - print ' getPluginConfig()' - print ' ConfigSection configureSection(string section)' + print ' getGlobalPlugins()' + print ' getUserPlugins()' + print ' ConfigHolder configurePlugin(PluginName plugin)' + print ' void saveConfig(ConfigHolder config)' + print ' void deleteConfig(ConfigHolder config)' print ' void setConfigHandler(PluginName plugin, InteractionID iid, JSONString value)' print ' checkURLs(LinkList urls)' print ' parseURLs(string html, string url)' @@ -95,7 +95,8 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' getEvents(string uuid)' print ' getAccounts(bool refresh)' print ' getAccountTypes()' - print ' void updateAccount(PluginName plugin, string account, string password, options)' + print ' void updateAccount(PluginName plugin, string account, string password)' + print ' void updateAccountInfo(AccountInfo account)' print ' void removeAccount(PluginName plugin, string account)' print ' bool login(string username, string password)' print ' UserData getUserData()' @@ -233,41 +234,41 @@ elif cmd == 'toggleReconnect': sys.exit(1) pp.pprint(client.toggleReconnect()) -elif cmd == 'scanDownloadFolder': +elif cmd == 'getConfig': if len(args) != 0: - print 'scanDownloadFolder requires 0 args' + print 'getConfig requires 0 args' sys.exit(1) - pp.pprint(client.scanDownloadFolder()) + pp.pprint(client.getConfig()) -elif cmd == 'getConfigValue': - if len(args) != 2: - print 'getConfigValue requires 2 args' +elif cmd == 'getGlobalPlugins': + if len(args) != 0: + print 'getGlobalPlugins requires 0 args' sys.exit(1) - pp.pprint(client.getConfigValue(args[0],args[1],)) + pp.pprint(client.getGlobalPlugins()) -elif cmd == 'setConfigValue': - if len(args) != 3: - print 'setConfigValue requires 3 args' +elif cmd == 'getUserPlugins': + if len(args) != 0: + print 'getUserPlugins requires 0 args' sys.exit(1) - pp.pprint(client.setConfigValue(args[0],args[1],args[2],)) + pp.pprint(client.getUserPlugins()) -elif cmd == 'getConfig': - if len(args) != 0: - print 'getConfig requires 0 args' +elif cmd == 'configurePlugin': + if len(args) != 1: + print 'configurePlugin requires 1 args' sys.exit(1) - pp.pprint(client.getConfig()) + pp.pprint(client.configurePlugin(eval(args[0]),)) -elif cmd == 'getPluginConfig': - if len(args) != 0: - print 'getPluginConfig requires 0 args' +elif cmd == 'saveConfig': + if len(args) != 1: + print 'saveConfig requires 1 args' sys.exit(1) - pp.pprint(client.getPluginConfig()) + pp.pprint(client.saveConfig(eval(args[0]),)) -elif cmd == 'configureSection': +elif cmd == 'deleteConfig': if len(args) != 1: - print 'configureSection requires 1 args' + print 'deleteConfig requires 1 args' sys.exit(1) - pp.pprint(client.configureSection(args[0],)) + pp.pprint(client.deleteConfig(eval(args[0]),)) elif cmd == 'setConfigHandler': if len(args) != 3: @@ -594,10 +595,16 @@ elif cmd == 'getAccountTypes': pp.pprint(client.getAccountTypes()) elif cmd == 'updateAccount': - if len(args) != 4: - print 'updateAccount requires 4 args' + if len(args) != 3: + print 'updateAccount requires 3 args' + sys.exit(1) + pp.pprint(client.updateAccount(eval(args[0]),args[1],args[2],)) + +elif cmd == 'updateAccountInfo': + if len(args) != 1: + print 'updateAccountInfo requires 1 args' sys.exit(1) - pp.pprint(client.updateAccount(eval(args[0]),args[1],args[2],eval(args[3]),)) + pp.pprint(client.updateAccountInfo(eval(args[0]),)) elif cmd == 'removeAccount': if len(args) != 2: diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py index c807d3d9e..4134a4d3e 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py @@ -53,36 +53,33 @@ class Iface(object): def toggleReconnect(self, ): pass - def scanDownloadFolder(self, ): + def getConfig(self, ): + pass + + def getGlobalPlugins(self, ): pass - def getConfigValue(self, section, option): + def getUserPlugins(self, ): + pass + + def configurePlugin(self, plugin): """ Parameters: - - section - - option + - plugin """ pass - def setConfigValue(self, section, option, value): + def saveConfig(self, config): """ Parameters: - - section - - option - - value + - config """ pass - def getConfig(self, ): - pass - - def getPluginConfig(self, ): - pass - - def configureSection(self, section): + def deleteConfig(self, config): """ Parameters: - - section + - config """ pass @@ -472,13 +469,19 @@ class Iface(object): def getAccountTypes(self, ): pass - def updateAccount(self, plugin, account, password, options): + def updateAccount(self, plugin, account, password): """ Parameters: - plugin - account - password - - options + """ + pass + + def updateAccountInfo(self, account): + """ + Parameters: + - account """ pass @@ -879,172 +882,166 @@ class Client(Iface): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "toggleReconnect failed: unknown result"); - def scanDownloadFolder(self, ): - self.send_scanDownloadFolder() - self.recv_scanDownloadFolder() + def getConfig(self, ): + self.send_getConfig() + return self.recv_getConfig() - def send_scanDownloadFolder(self, ): - self._oprot.writeMessageBegin('scanDownloadFolder', TMessageType.CALL, self._seqid) - args = scanDownloadFolder_args() + def send_getConfig(self, ): + self._oprot.writeMessageBegin('getConfig', TMessageType.CALL, self._seqid) + args = getConfig_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_scanDownloadFolder(self, ): + def recv_getConfig(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = scanDownloadFolder_result() + result = getConfig_result() result.read(self._iprot) self._iprot.readMessageEnd() - return + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getConfig failed: unknown result"); - def getConfigValue(self, section, option): - """ - Parameters: - - section - - option - """ - self.send_getConfigValue(section, option) - return self.recv_getConfigValue() + def getGlobalPlugins(self, ): + self.send_getGlobalPlugins() + return self.recv_getGlobalPlugins() - def send_getConfigValue(self, section, option): - self._oprot.writeMessageBegin('getConfigValue', TMessageType.CALL, self._seqid) - args = getConfigValue_args() - args.section = section - args.option = option + def send_getGlobalPlugins(self, ): + self._oprot.writeMessageBegin('getGlobalPlugins', TMessageType.CALL, self._seqid) + args = getGlobalPlugins_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getConfigValue(self, ): + def recv_getGlobalPlugins(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getConfigValue_result() + result = getGlobalPlugins_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getConfigValue failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "getGlobalPlugins failed: unknown result"); - def setConfigValue(self, section, option, value): - """ - Parameters: - - section - - option - - value - """ - self.send_setConfigValue(section, option, value) - self.recv_setConfigValue() + def getUserPlugins(self, ): + self.send_getUserPlugins() + return self.recv_getUserPlugins() - def send_setConfigValue(self, section, option, value): - self._oprot.writeMessageBegin('setConfigValue', TMessageType.CALL, self._seqid) - args = setConfigValue_args() - args.section = section - args.option = option - args.value = value + def send_getUserPlugins(self, ): + self._oprot.writeMessageBegin('getUserPlugins', TMessageType.CALL, self._seqid) + args = getUserPlugins_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_setConfigValue(self, ): + def recv_getUserPlugins(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = setConfigValue_result() + result = getUserPlugins_result() result.read(self._iprot) self._iprot.readMessageEnd() - return + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getUserPlugins failed: unknown result"); - def getConfig(self, ): - self.send_getConfig() - return self.recv_getConfig() + def configurePlugin(self, plugin): + """ + Parameters: + - plugin + """ + self.send_configurePlugin(plugin) + return self.recv_configurePlugin() - def send_getConfig(self, ): - self._oprot.writeMessageBegin('getConfig', TMessageType.CALL, self._seqid) - args = getConfig_args() + def send_configurePlugin(self, plugin): + self._oprot.writeMessageBegin('configurePlugin', TMessageType.CALL, self._seqid) + args = configurePlugin_args() + args.plugin = plugin args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getConfig(self, ): + def recv_configurePlugin(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getConfig_result() + result = configurePlugin_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success is not None: return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getConfig failed: unknown result"); + raise TApplicationException(TApplicationException.MISSING_RESULT, "configurePlugin failed: unknown result"); - def getPluginConfig(self, ): - self.send_getPluginConfig() - return self.recv_getPluginConfig() + def saveConfig(self, config): + """ + Parameters: + - config + """ + self.send_saveConfig(config) + self.recv_saveConfig() - def send_getPluginConfig(self, ): - self._oprot.writeMessageBegin('getPluginConfig', TMessageType.CALL, self._seqid) - args = getPluginConfig_args() + def send_saveConfig(self, config): + self._oprot.writeMessageBegin('saveConfig', TMessageType.CALL, self._seqid) + args = saveConfig_args() + args.config = config args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_getPluginConfig(self, ): + def recv_saveConfig(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = getPluginConfig_result() + result = saveConfig_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getPluginConfig failed: unknown result"); + return - def configureSection(self, section): + def deleteConfig(self, config): """ Parameters: - - section + - config """ - self.send_configureSection(section) - return self.recv_configureSection() + self.send_deleteConfig(config) + self.recv_deleteConfig() - def send_configureSection(self, section): - self._oprot.writeMessageBegin('configureSection', TMessageType.CALL, self._seqid) - args = configureSection_args() - args.section = section + def send_deleteConfig(self, config): + self._oprot.writeMessageBegin('deleteConfig', TMessageType.CALL, self._seqid) + args = deleteConfig_args() + args.config = config args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_configureSection(self, ): + def recv_deleteConfig(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = configureSection_result() + result = deleteConfig_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "configureSection failed: unknown result"); + return def setConfigHandler(self, plugin, iid, value): """ @@ -2684,24 +2681,22 @@ class Client(Iface): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "getAccountTypes failed: unknown result"); - def updateAccount(self, plugin, account, password, options): + def updateAccount(self, plugin, account, password): """ Parameters: - plugin - account - password - - options """ - self.send_updateAccount(plugin, account, password, options) + self.send_updateAccount(plugin, account, password) self.recv_updateAccount() - def send_updateAccount(self, plugin, account, password, options): + def send_updateAccount(self, plugin, account, password): self._oprot.writeMessageBegin('updateAccount', TMessageType.CALL, self._seqid) args = updateAccount_args() args.plugin = plugin args.account = account args.password = password - args.options = options args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() @@ -2718,6 +2713,34 @@ class Client(Iface): self._iprot.readMessageEnd() return + def updateAccountInfo(self, account): + """ + Parameters: + - account + """ + self.send_updateAccountInfo(account) + self.recv_updateAccountInfo() + + def send_updateAccountInfo(self, account): + self._oprot.writeMessageBegin('updateAccountInfo', TMessageType.CALL, self._seqid) + args = updateAccountInfo_args() + args.account = account + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_updateAccountInfo(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = updateAccountInfo_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + return + def removeAccount(self, plugin, account): """ Parameters: @@ -3153,12 +3176,12 @@ class Processor(Iface, TProcessor): self._processMap["isTimeDownload"] = Processor.process_isTimeDownload self._processMap["isTimeReconnect"] = Processor.process_isTimeReconnect self._processMap["toggleReconnect"] = Processor.process_toggleReconnect - self._processMap["scanDownloadFolder"] = Processor.process_scanDownloadFolder - self._processMap["getConfigValue"] = Processor.process_getConfigValue - self._processMap["setConfigValue"] = Processor.process_setConfigValue self._processMap["getConfig"] = Processor.process_getConfig - self._processMap["getPluginConfig"] = Processor.process_getPluginConfig - self._processMap["configureSection"] = Processor.process_configureSection + self._processMap["getGlobalPlugins"] = Processor.process_getGlobalPlugins + self._processMap["getUserPlugins"] = Processor.process_getUserPlugins + self._processMap["configurePlugin"] = Processor.process_configurePlugin + self._processMap["saveConfig"] = Processor.process_saveConfig + self._processMap["deleteConfig"] = Processor.process_deleteConfig self._processMap["setConfigHandler"] = Processor.process_setConfigHandler self._processMap["checkURLs"] = Processor.process_checkURLs self._processMap["parseURLs"] = Processor.process_parseURLs @@ -3214,6 +3237,7 @@ class Processor(Iface, TProcessor): self._processMap["getAccounts"] = Processor.process_getAccounts self._processMap["getAccountTypes"] = Processor.process_getAccountTypes self._processMap["updateAccount"] = Processor.process_updateAccount + self._processMap["updateAccountInfo"] = Processor.process_updateAccountInfo self._processMap["removeAccount"] = Processor.process_removeAccount self._processMap["login"] = Processor.process_login self._processMap["getUserData"] = Processor.process_getUserData @@ -3376,68 +3400,68 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() - def process_scanDownloadFolder(self, seqid, iprot, oprot): - args = scanDownloadFolder_args() + def process_getConfig(self, seqid, iprot, oprot): + args = getConfig_args() args.read(iprot) iprot.readMessageEnd() - result = scanDownloadFolder_result() - self._handler.scanDownloadFolder() - oprot.writeMessageBegin("scanDownloadFolder", TMessageType.REPLY, seqid) + result = getConfig_result() + result.success = self._handler.getConfig() + oprot.writeMessageBegin("getConfig", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_getConfigValue(self, seqid, iprot, oprot): - args = getConfigValue_args() + def process_getGlobalPlugins(self, seqid, iprot, oprot): + args = getGlobalPlugins_args() args.read(iprot) iprot.readMessageEnd() - result = getConfigValue_result() - result.success = self._handler.getConfigValue(args.section, args.option) - oprot.writeMessageBegin("getConfigValue", TMessageType.REPLY, seqid) + result = getGlobalPlugins_result() + result.success = self._handler.getGlobalPlugins() + oprot.writeMessageBegin("getGlobalPlugins", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_setConfigValue(self, seqid, iprot, oprot): - args = setConfigValue_args() + def process_getUserPlugins(self, seqid, iprot, oprot): + args = getUserPlugins_args() args.read(iprot) iprot.readMessageEnd() - result = setConfigValue_result() - self._handler.setConfigValue(args.section, args.option, args.value) - oprot.writeMessageBegin("setConfigValue", TMessageType.REPLY, seqid) + result = getUserPlugins_result() + result.success = self._handler.getUserPlugins() + oprot.writeMessageBegin("getUserPlugins", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_getConfig(self, seqid, iprot, oprot): - args = getConfig_args() + def process_configurePlugin(self, seqid, iprot, oprot): + args = configurePlugin_args() args.read(iprot) iprot.readMessageEnd() - result = getConfig_result() - result.success = self._handler.getConfig() - oprot.writeMessageBegin("getConfig", TMessageType.REPLY, seqid) + result = configurePlugin_result() + result.success = self._handler.configurePlugin(args.plugin) + oprot.writeMessageBegin("configurePlugin", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_getPluginConfig(self, seqid, iprot, oprot): - args = getPluginConfig_args() + def process_saveConfig(self, seqid, iprot, oprot): + args = saveConfig_args() args.read(iprot) iprot.readMessageEnd() - result = getPluginConfig_result() - result.success = self._handler.getPluginConfig() - oprot.writeMessageBegin("getPluginConfig", TMessageType.REPLY, seqid) + result = saveConfig_result() + self._handler.saveConfig(args.config) + oprot.writeMessageBegin("saveConfig", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_configureSection(self, seqid, iprot, oprot): - args = configureSection_args() + def process_deleteConfig(self, seqid, iprot, oprot): + args = deleteConfig_args() args.read(iprot) iprot.readMessageEnd() - result = configureSection_result() - result.success = self._handler.configureSection(args.section) - oprot.writeMessageBegin("configureSection", TMessageType.REPLY, seqid) + result = deleteConfig_result() + self._handler.deleteConfig(args.config) + oprot.writeMessageBegin("deleteConfig", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -4071,12 +4095,23 @@ class Processor(Iface, TProcessor): args.read(iprot) iprot.readMessageEnd() result = updateAccount_result() - self._handler.updateAccount(args.plugin, args.account, args.password, args.options) + self._handler.updateAccount(args.plugin, args.account, args.password) oprot.writeMessageBegin("updateAccount", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() + def process_updateAccountInfo(self, seqid, iprot, oprot): + args = updateAccountInfo_args() + args.read(iprot) + iprot.readMessageEnd() + result = updateAccountInfo_result() + self._handler.updateAccountInfo(args.account) + oprot.writeMessageBegin("updateAccountInfo", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_removeAccount(self, seqid, iprot, oprot): args = removeAccount_args() args.read(iprot) @@ -4542,7 +4577,7 @@ class toggleReconnect_result(TBase): self.success = success -class scanDownloadFolder_args(TBase): +class getConfig_args(TBase): __slots__ = [ ] @@ -4551,39 +4586,34 @@ class scanDownloadFolder_args(TBase): ) -class scanDownloadFolder_result(TBase): +class getConfig_result(TBase): + """ + Attributes: + - success + """ __slots__ = [ + 'success', ] thrift_spec = ( + (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(ConfigHolder, ConfigHolder.thrift_spec)), None, ), # 0 ) + def __init__(self, success=None,): + self.success = success -class getConfigValue_args(TBase): - """ - Attributes: - - section - - option - """ + +class getGlobalPlugins_args(TBase): __slots__ = [ - 'section', - 'option', ] thrift_spec = ( - None, # 0 - (1, TType.STRING, 'section', None, None, ), # 1 - (2, TType.STRING, 'option', None, None, ), # 2 ) - def __init__(self, section=None, option=None,): - self.section = section - self.option = option - -class getConfigValue_result(TBase): +class getGlobalPlugins_result(TBase): """ Attributes: - success @@ -4594,59 +4624,60 @@ class getConfigValue_result(TBase): ] thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT,(ConfigInfo, ConfigInfo.thrift_spec)), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class setConfigValue_args(TBase): - """ - Attributes: - - section - - option - - value - """ +class getUserPlugins_args(TBase): __slots__ = [ - 'section', - 'option', - 'value', ] thrift_spec = ( - None, # 0 - (1, TType.STRING, 'section', None, None, ), # 1 - (2, TType.STRING, 'option', None, None, ), # 2 - (3, TType.STRING, 'value', None, None, ), # 3 ) - def __init__(self, section=None, option=None, value=None,): - self.section = section - self.option = option - self.value = value - -class setConfigValue_result(TBase): +class getUserPlugins_result(TBase): + """ + Attributes: + - success + """ __slots__ = [ + 'success', ] thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(ConfigInfo, ConfigInfo.thrift_spec)), None, ), # 0 ) + def __init__(self, success=None,): + self.success = success + -class getConfig_args(TBase): +class configurePlugin_args(TBase): + """ + Attributes: + - plugin + """ __slots__ = [ + 'plugin', ] thrift_spec = ( + None, # 0 + (1, TType.STRING, 'plugin', None, None, ), # 1 ) + def __init__(self, plugin=None,): + self.plugin = plugin -class getConfig_result(TBase): + +class configurePlugin_result(TBase): """ Attributes: - success @@ -4657,76 +4688,68 @@ class getConfig_result(TBase): ] thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(ConfigSection, ConfigSection.thrift_spec)), None, ), # 0 + (0, TType.STRUCT, 'success', (ConfigHolder, ConfigHolder.thrift_spec), None, ), # 0 ) def __init__(self, success=None,): self.success = success -class getPluginConfig_args(TBase): +class saveConfig_args(TBase): + """ + Attributes: + - config + """ __slots__ = [ + 'config', ] thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'config', (ConfigHolder, ConfigHolder.thrift_spec), None, ), # 1 ) + def __init__(self, config=None,): + self.config = config -class getPluginConfig_result(TBase): - """ - Attributes: - - success - """ + +class saveConfig_result(TBase): __slots__ = [ - 'success', ] thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(ConfigSection, ConfigSection.thrift_spec)), None, ), # 0 ) - def __init__(self, success=None,): - self.success = success - -class configureSection_args(TBase): +class deleteConfig_args(TBase): """ Attributes: - - section + - config """ __slots__ = [ - 'section', + 'config', ] thrift_spec = ( None, # 0 - (1, TType.STRING, 'section', None, None, ), # 1 + (1, TType.STRUCT, 'config', (ConfigHolder, ConfigHolder.thrift_spec), None, ), # 1 ) - def __init__(self, section=None,): - self.section = section + def __init__(self, config=None,): + self.config = config -class configureSection_result(TBase): - """ - Attributes: - - success - """ +class deleteConfig_result(TBase): __slots__ = [ - 'success', ] thrift_spec = ( - (0, TType.STRUCT, 'success', (ConfigSection, ConfigSection.thrift_spec), None, ), # 0 ) - def __init__(self, success=None,): - self.success = success - class setConfigHandler_args(TBase): """ @@ -6693,14 +6716,12 @@ class updateAccount_args(TBase): - plugin - account - password - - options """ __slots__ = [ 'plugin', 'account', 'password', - 'options', ] thrift_spec = ( @@ -6708,14 +6729,12 @@ class updateAccount_args(TBase): (1, TType.STRING, 'plugin', None, None, ), # 1 (2, TType.STRING, 'account', None, None, ), # 2 (3, TType.STRING, 'password', None, None, ), # 3 - (4, TType.MAP, 'options', (TType.STRING,None,TType.STRING,None), None, ), # 4 ) - def __init__(self, plugin=None, account=None, password=None, options=None,): + def __init__(self, plugin=None, account=None, password=None,): self.plugin = plugin self.account = account self.password = password - self.options = options class updateAccount_result(TBase): @@ -6727,6 +6746,34 @@ class updateAccount_result(TBase): ) +class updateAccountInfo_args(TBase): + """ + Attributes: + - account + """ + + __slots__ = [ + 'account', + ] + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'account', (AccountInfo, AccountInfo.thrift_spec), None, ), # 1 + ) + + def __init__(self, account=None,): + self.account = account + + +class updateAccountInfo_result(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + class removeAccount_args(TBase): """ Attributes: diff --git a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py index b61d4c479..815c80819 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py +++ b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py @@ -202,7 +202,7 @@ class Permission(TBase): Download = 8 Accounts = 16 Interaction = 32 - Addons = 64 + Plugins = 64 _VALUES_TO_NAMES = { 0: "All", @@ -212,7 +212,7 @@ class Permission(TBase): 8: "Download", 16: "Accounts", 32: "Interaction", - 64: "Addons", + 64: "Plugins", } _NAMES_TO_VALUES = { @@ -223,7 +223,7 @@ class Permission(TBase): "Download": 8, "Accounts": 16, "Interaction": 32, - "Addons": 64, + "Plugins": 64, } class Role(TBase): @@ -734,7 +734,7 @@ class ConfigItem(TBase): """ Attributes: - name - - display_name + - label - description - type - default_value @@ -743,7 +743,7 @@ class ConfigItem(TBase): __slots__ = [ 'name', - 'display_name', + 'label', 'description', 'type', 'default_value', @@ -753,27 +753,27 @@ class ConfigItem(TBase): thrift_spec = ( None, # 0 (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'display_name', None, None, ), # 2 + (2, TType.STRING, 'label', None, None, ), # 2 (3, TType.STRING, 'description', None, None, ), # 3 (4, TType.STRING, 'type', None, None, ), # 4 (5, TType.STRING, 'default_value', None, None, ), # 5 (6, TType.STRING, 'value', None, None, ), # 6 ) - def __init__(self, name=None, display_name=None, description=None, type=None, default_value=None, value=None,): + def __init__(self, name=None, label=None, description=None, type=None, default_value=None, value=None,): self.name = name - self.display_name = display_name + self.label = label self.description = description self.type = type self.default_value = default_value self.value = value -class ConfigSection(TBase): +class ConfigHolder(TBase): """ Attributes: - name - - display_name + - label - description - long_description - items @@ -783,7 +783,7 @@ class ConfigSection(TBase): __slots__ = [ 'name', - 'display_name', + 'label', 'description', 'long_description', 'items', @@ -794,7 +794,7 @@ class ConfigSection(TBase): thrift_spec = ( None, # 0 (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'display_name', None, None, ), # 2 + (2, TType.STRING, 'label', None, None, ), # 2 (3, TType.STRING, 'description', None, None, ), # 3 (4, TType.STRING, 'long_description', None, None, ), # 4 (5, TType.LIST, 'items', (TType.STRUCT,(ConfigItem, ConfigItem.thrift_spec)), None, ), # 5 @@ -802,9 +802,9 @@ class ConfigSection(TBase): (7, TType.LIST, 'handler', (TType.STRUCT,(InteractionTask, InteractionTask.thrift_spec)), None, ), # 7 ) - def __init__(self, name=None, display_name=None, description=None, long_description=None, items=None, info=None, handler=None,): + def __init__(self, name=None, label=None, description=None, long_description=None, items=None, info=None, handler=None,): self.name = name - self.display_name = display_name + self.label = label self.description = description self.long_description = long_description self.items = items @@ -812,6 +812,41 @@ class ConfigSection(TBase): self.handler = handler +class ConfigInfo(TBase): + """ + Attributes: + - name + - label + - description + - saved + - activated + """ + + __slots__ = [ + 'name', + 'label', + 'description', + 'saved', + 'activated', + ] + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'label', None, None, ), # 2 + (3, TType.STRING, 'description', None, None, ), # 3 + (4, TType.BOOL, 'saved', None, None, ), # 4 + (5, TType.BOOL, 'activated', None, None, ), # 5 + ) + + def __init__(self, name=None, label=None, description=None, saved=None, activated=None,): + self.name = name + self.label = label + self.description = description + self.saved = saved + self.activated = activated + + class EventInfo(TBase): """ Attributes: -- cgit v1.2.3 From 54bc92b4c5e0b3543a313f497cbc2276403c5980 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Mon, 10 Sep 2012 11:49:35 +0200 Subject: changed config + progress api --- .../thriftbackend/thriftgen/pyload/Pyload-remote | 47 +-- .../thriftbackend/thriftgen/pyload/Pyload.py | 417 ++++++++------------- .../thriftbackend/thriftgen/pyload/ttypes.py | 105 +++--- 3 files changed, 232 insertions(+), 337 deletions(-) (limited to 'module/remote/thriftbackend/thriftgen') diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote index 78d251501..20015ba43 100755 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote @@ -35,12 +35,13 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' bool isTimeDownload()' print ' bool isTimeReconnect()' print ' bool toggleReconnect()' + print ' getProgressInfo()' print ' getConfig()' print ' getGlobalPlugins()' print ' getUserPlugins()' print ' ConfigHolder configurePlugin(PluginName plugin)' print ' void saveConfig(ConfigHolder config)' - print ' void deleteConfig(ConfigHolder config)' + print ' void deleteConfig(PluginName plugin)' print ' void setConfigHandler(PluginName plugin, InteractionID iid, JSONString value)' print ' checkURLs(LinkList urls)' print ' parseURLs(string html, string url)' @@ -76,7 +77,8 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' void restartFile(FileID fid)' print ' void recheckPackage(PackageID pid)' print ' void restartFailed()' - print ' void setFilePaused(FileID fid, bool paused)' + print ' void stopDownloads( fids)' + print ' void stopAllDownloads()' print ' void setPackagePaused(PackageID pid, bool paused)' print ' bool setPackageFolder(PackageID pid, string path)' print ' void setPackageData(PackageID pid, data)' @@ -84,9 +86,6 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print ' bool moveFiles( fids, PackageID pid)' print ' void orderPackage( pids, i16 position)' print ' void orderFiles( fids, PackageID pid, i16 position)' - print ' getProgressInfo()' - print ' void stopDownloads( fids)' - print ' void stopAllDownloads()' print ' bool isInteractionWaiting(i16 mode)' print ' InteractionTask getInteractionTask(i16 mode)' print ' void setInteractionResult(InteractionID iid, JSONString result)' @@ -234,6 +233,12 @@ elif cmd == 'toggleReconnect': sys.exit(1) pp.pprint(client.toggleReconnect()) +elif cmd == 'getProgressInfo': + if len(args) != 0: + print 'getProgressInfo requires 0 args' + sys.exit(1) + pp.pprint(client.getProgressInfo()) + elif cmd == 'getConfig': if len(args) != 0: print 'getConfig requires 0 args' @@ -480,11 +485,17 @@ elif cmd == 'restartFailed': sys.exit(1) pp.pprint(client.restartFailed()) -elif cmd == 'setFilePaused': - if len(args) != 2: - print 'setFilePaused requires 2 args' +elif cmd == 'stopDownloads': + if len(args) != 1: + print 'stopDownloads requires 1 args' sys.exit(1) - pp.pprint(client.setFilePaused(eval(args[0]),eval(args[1]),)) + pp.pprint(client.stopDownloads(eval(args[0]),)) + +elif cmd == 'stopAllDownloads': + if len(args) != 0: + print 'stopAllDownloads requires 0 args' + sys.exit(1) + pp.pprint(client.stopAllDownloads()) elif cmd == 'setPackagePaused': if len(args) != 2: @@ -528,24 +539,6 @@ elif cmd == 'orderFiles': sys.exit(1) pp.pprint(client.orderFiles(eval(args[0]),eval(args[1]),eval(args[2]),)) -elif cmd == 'getProgressInfo': - if len(args) != 0: - print 'getProgressInfo requires 0 args' - sys.exit(1) - pp.pprint(client.getProgressInfo()) - -elif cmd == 'stopDownloads': - if len(args) != 1: - print 'stopDownloads requires 1 args' - sys.exit(1) - pp.pprint(client.stopDownloads(eval(args[0]),)) - -elif cmd == 'stopAllDownloads': - if len(args) != 0: - print 'stopAllDownloads requires 0 args' - sys.exit(1) - pp.pprint(client.stopAllDownloads()) - elif cmd == 'isInteractionWaiting': if len(args) != 1: print 'isInteractionWaiting requires 1 args' diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py index 4134a4d3e..157d5b87b 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py @@ -53,6 +53,9 @@ class Iface(object): def toggleReconnect(self, ): pass + def getProgressInfo(self, ): + pass + def getConfig(self, ): pass @@ -76,10 +79,10 @@ class Iface(object): """ pass - def deleteConfig(self, config): + def deleteConfig(self, plugin): """ Parameters: - - config + - plugin """ pass @@ -341,14 +344,16 @@ class Iface(object): def restartFailed(self, ): pass - def setFilePaused(self, fid, paused): + def stopDownloads(self, fids): """ Parameters: - - fid - - paused + - fids """ pass + def stopAllDownloads(self, ): + pass + def setPackagePaused(self, pid, paused): """ Parameters: @@ -406,19 +411,6 @@ class Iface(object): """ pass - def getProgressInfo(self, ): - pass - - def stopDownloads(self, fids): - """ - Parameters: - - fids - """ - pass - - def stopAllDownloads(self, ): - pass - def isInteractionWaiting(self, mode): """ Parameters: @@ -882,6 +874,31 @@ class Client(Iface): return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "toggleReconnect failed: unknown result"); + def getProgressInfo(self, ): + self.send_getProgressInfo() + return self.recv_getProgressInfo() + + def send_getProgressInfo(self, ): + self._oprot.writeMessageBegin('getProgressInfo', TMessageType.CALL, self._seqid) + args = getProgressInfo_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getProgressInfo(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getProgressInfo_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getProgressInfo failed: unknown result"); + def getConfig(self, ): self.send_getConfig() return self.recv_getConfig() @@ -1015,18 +1032,18 @@ class Client(Iface): self._iprot.readMessageEnd() return - def deleteConfig(self, config): + def deleteConfig(self, plugin): """ Parameters: - - config + - plugin """ - self.send_deleteConfig(config) + self.send_deleteConfig(plugin) self.recv_deleteConfig() - def send_deleteConfig(self, config): + def send_deleteConfig(self, plugin): self._oprot.writeMessageBegin('deleteConfig', TMessageType.CALL, self._seqid) args = deleteConfig_args() - args.config = config + args.plugin = plugin args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() @@ -2113,36 +2130,55 @@ class Client(Iface): self._iprot.readMessageEnd() return - def setFilePaused(self, fid, paused): + def stopDownloads(self, fids): """ Parameters: - - fid - - paused + - fids """ - self.send_setFilePaused(fid, paused) - self.recv_setFilePaused() + self.send_stopDownloads(fids) + self.recv_stopDownloads() - def send_setFilePaused(self, fid, paused): - self._oprot.writeMessageBegin('setFilePaused', TMessageType.CALL, self._seqid) - args = setFilePaused_args() - args.fid = fid - args.paused = paused + def send_stopDownloads(self, fids): + self._oprot.writeMessageBegin('stopDownloads', TMessageType.CALL, self._seqid) + args = stopDownloads_args() + args.fids = fids args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() - def recv_setFilePaused(self, ): + def recv_stopDownloads(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x - result = setFilePaused_result() + result = stopDownloads_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + return + + def stopAllDownloads(self, ): + self.send_stopAllDownloads() + self.recv_stopAllDownloads() + + def send_stopAllDownloads(self, ): + self._oprot.writeMessageBegin('stopAllDownloads', TMessageType.CALL, self._seqid) + args = stopAllDownloads_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_stopAllDownloads(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = stopAllDownloads_result() result.read(self._iprot) self._iprot.readMessageEnd() - if result.e is not None: - raise result.e return def setPackagePaused(self, pid, paused): @@ -2373,82 +2409,6 @@ class Client(Iface): self._iprot.readMessageEnd() return - def getProgressInfo(self, ): - self.send_getProgressInfo() - return self.recv_getProgressInfo() - - def send_getProgressInfo(self, ): - self._oprot.writeMessageBegin('getProgressInfo', TMessageType.CALL, self._seqid) - args = getProgressInfo_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getProgressInfo(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getProgressInfo_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "getProgressInfo failed: unknown result"); - - def stopDownloads(self, fids): - """ - Parameters: - - fids - """ - self.send_stopDownloads(fids) - self.recv_stopDownloads() - - def send_stopDownloads(self, fids): - self._oprot.writeMessageBegin('stopDownloads', TMessageType.CALL, self._seqid) - args = stopDownloads_args() - args.fids = fids - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_stopDownloads(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = stopDownloads_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - return - - def stopAllDownloads(self, ): - self.send_stopAllDownloads() - self.recv_stopAllDownloads() - - def send_stopAllDownloads(self, ): - self._oprot.writeMessageBegin('stopAllDownloads', TMessageType.CALL, self._seqid) - args = stopAllDownloads_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_stopAllDownloads(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = stopAllDownloads_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - return - def isInteractionWaiting(self, mode): """ Parameters: @@ -3176,6 +3136,7 @@ class Processor(Iface, TProcessor): self._processMap["isTimeDownload"] = Processor.process_isTimeDownload self._processMap["isTimeReconnect"] = Processor.process_isTimeReconnect self._processMap["toggleReconnect"] = Processor.process_toggleReconnect + self._processMap["getProgressInfo"] = Processor.process_getProgressInfo self._processMap["getConfig"] = Processor.process_getConfig self._processMap["getGlobalPlugins"] = Processor.process_getGlobalPlugins self._processMap["getUserPlugins"] = Processor.process_getUserPlugins @@ -3217,7 +3178,8 @@ class Processor(Iface, TProcessor): self._processMap["restartFile"] = Processor.process_restartFile self._processMap["recheckPackage"] = Processor.process_recheckPackage self._processMap["restartFailed"] = Processor.process_restartFailed - self._processMap["setFilePaused"] = Processor.process_setFilePaused + self._processMap["stopDownloads"] = Processor.process_stopDownloads + self._processMap["stopAllDownloads"] = Processor.process_stopAllDownloads self._processMap["setPackagePaused"] = Processor.process_setPackagePaused self._processMap["setPackageFolder"] = Processor.process_setPackageFolder self._processMap["setPackageData"] = Processor.process_setPackageData @@ -3225,9 +3187,6 @@ class Processor(Iface, TProcessor): self._processMap["moveFiles"] = Processor.process_moveFiles self._processMap["orderPackage"] = Processor.process_orderPackage self._processMap["orderFiles"] = Processor.process_orderFiles - self._processMap["getProgressInfo"] = Processor.process_getProgressInfo - self._processMap["stopDownloads"] = Processor.process_stopDownloads - self._processMap["stopAllDownloads"] = Processor.process_stopAllDownloads self._processMap["isInteractionWaiting"] = Processor.process_isInteractionWaiting self._processMap["getInteractionTask"] = Processor.process_getInteractionTask self._processMap["setInteractionResult"] = Processor.process_setInteractionResult @@ -3400,6 +3359,17 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() + def process_getProgressInfo(self, seqid, iprot, oprot): + args = getProgressInfo_args() + args.read(iprot) + iprot.readMessageEnd() + result = getProgressInfo_result() + result.success = self._handler.getProgressInfo() + oprot.writeMessageBegin("getProgressInfo", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_getConfig(self, seqid, iprot, oprot): args = getConfig_args() args.read(iprot) @@ -3460,7 +3430,7 @@ class Processor(Iface, TProcessor): args.read(iprot) iprot.readMessageEnd() result = deleteConfig_result() - self._handler.deleteConfig(args.config) + self._handler.deleteConfig(args.plugin) oprot.writeMessageBegin("deleteConfig", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() @@ -3863,16 +3833,24 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() - def process_setFilePaused(self, seqid, iprot, oprot): - args = setFilePaused_args() + def process_stopDownloads(self, seqid, iprot, oprot): + args = stopDownloads_args() args.read(iprot) iprot.readMessageEnd() - result = setFilePaused_result() - try: - self._handler.setFilePaused(args.fid, args.paused) - except FileDoesNotExists, e: - result.e = e - oprot.writeMessageBegin("setFilePaused", TMessageType.REPLY, seqid) + result = stopDownloads_result() + self._handler.stopDownloads(args.fids) + oprot.writeMessageBegin("stopDownloads", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_stopAllDownloads(self, seqid, iprot, oprot): + args = stopAllDownloads_args() + args.read(iprot) + iprot.readMessageEnd() + result = stopAllDownloads_result() + self._handler.stopAllDownloads() + oprot.writeMessageBegin("stopAllDownloads", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() @@ -3969,39 +3947,6 @@ class Processor(Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() - def process_getProgressInfo(self, seqid, iprot, oprot): - args = getProgressInfo_args() - args.read(iprot) - iprot.readMessageEnd() - result = getProgressInfo_result() - result.success = self._handler.getProgressInfo() - oprot.writeMessageBegin("getProgressInfo", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_stopDownloads(self, seqid, iprot, oprot): - args = stopDownloads_args() - args.read(iprot) - iprot.readMessageEnd() - result = stopDownloads_result() - self._handler.stopDownloads(args.fids) - oprot.writeMessageBegin("stopDownloads", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_stopAllDownloads(self, seqid, iprot, oprot): - args = stopAllDownloads_args() - args.read(iprot) - iprot.readMessageEnd() - result = stopAllDownloads_result() - self._handler.stopAllDownloads() - oprot.writeMessageBegin("stopAllDownloads", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_isInteractionWaiting(self, seqid, iprot, oprot): args = isInteractionWaiting_args() args.read(iprot) @@ -4577,6 +4522,33 @@ class toggleReconnect_result(TBase): self.success = success +class getProgressInfo_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class getProgressInfo_result(TBase): + """ + Attributes: + - success + """ + + __slots__ = [ + 'success', + ] + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(ProgressInfo, ProgressInfo.thrift_spec)), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + class getConfig_args(TBase): __slots__ = [ @@ -4726,20 +4698,20 @@ class saveConfig_result(TBase): class deleteConfig_args(TBase): """ Attributes: - - config + - plugin """ __slots__ = [ - 'config', + 'plugin', ] thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'config', (ConfigHolder, ConfigHolder.thrift_spec), None, ), # 1 + (1, TType.STRING, 'plugin', None, None, ), # 1 ) - def __init__(self, config=None,): - self.config = config + def __init__(self, plugin=None,): + self.plugin = plugin class deleteConfig_result(TBase): @@ -6033,46 +6005,50 @@ class restartFailed_result(TBase): ) -class setFilePaused_args(TBase): +class stopDownloads_args(TBase): """ Attributes: - - fid - - paused + - fids """ __slots__ = [ - 'fid', - 'paused', + 'fids', ] thrift_spec = ( None, # 0 - (1, TType.I32, 'fid', None, None, ), # 1 - (2, TType.BOOL, 'paused', None, None, ), # 2 + (1, TType.LIST, 'fids', (TType.I32,None), None, ), # 1 ) - def __init__(self, fid=None, paused=None,): - self.fid = fid - self.paused = paused + def __init__(self, fids=None,): + self.fids = fids -class setFilePaused_result(TBase): - """ - Attributes: - - e - """ +class stopDownloads_result(TBase): __slots__ = [ - 'e', ] thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'e', (FileDoesNotExists, FileDoesNotExists.thrift_spec), None, ), # 1 ) - def __init__(self, e=None,): - self.e = e + +class stopAllDownloads_args(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) + + +class stopAllDownloads_result(TBase): + + __slots__ = [ + ] + + thrift_spec = ( + ) class setPackagePaused_args(TBase): @@ -6362,79 +6338,6 @@ class orderFiles_result(TBase): ) -class getProgressInfo_args(TBase): - - __slots__ = [ - ] - - thrift_spec = ( - ) - - -class getProgressInfo_result(TBase): - """ - Attributes: - - success - """ - - __slots__ = [ - 'success', - ] - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(ProgressInfo, ProgressInfo.thrift_spec)), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - -class stopDownloads_args(TBase): - """ - Attributes: - - fids - """ - - __slots__ = [ - 'fids', - ] - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'fids', (TType.I32,None), None, ), # 1 - ) - - def __init__(self, fids=None,): - self.fids = fids - - -class stopDownloads_result(TBase): - - __slots__ = [ - ] - - thrift_spec = ( - ) - - -class stopAllDownloads_args(TBase): - - __slots__ = [ - ] - - thrift_spec = ( - ) - - -class stopAllDownloads_result(TBase): - - __slots__ = [ - ] - - thrift_spec = ( - ) - - class isInteractionWaiting_args(TBase): """ Attributes: diff --git a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py index 815c80819..4b2f6497c 100644 --- a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py +++ b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py @@ -241,83 +241,82 @@ class Role(TBase): } -class ProgressInfo(TBase): +class DownloadProgress(TBase): """ Attributes: - fid - - name + - pid - speed - - eta - - format_eta - - bleft - - size - - format_size - - percent - status - - statusmsg - - format_wait - - wait_until - - packageID - - packageName - - plugin """ __slots__ = [ 'fid', - 'name', + 'pid', 'speed', - 'eta', - 'format_eta', - 'bleft', - 'size', - 'format_size', - 'percent', 'status', - 'statusmsg', - 'format_wait', - 'wait_until', - 'packageID', - 'packageName', - 'plugin', ] thrift_spec = ( None, # 0 (1, TType.I32, 'fid', None, None, ), # 1 - (2, TType.STRING, 'name', None, None, ), # 2 + (2, TType.I32, 'pid', None, None, ), # 2 (3, TType.I64, 'speed', None, None, ), # 3 + (4, TType.I32, 'status', None, None, ), # 4 + ) + + def __init__(self, fid=None, pid=None, speed=None, status=None,): + self.fid = fid + self.pid = pid + self.speed = speed + self.status = status + + +class ProgressInfo(TBase): + """ + Attributes: + - plugin + - name + - statusmsg + - eta + - format_eta + - done + - total + - download + """ + + __slots__ = [ + 'plugin', + 'name', + 'statusmsg', + 'eta', + 'format_eta', + 'done', + 'total', + 'download', + ] + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'plugin', None, None, ), # 1 + (2, TType.STRING, 'name', None, None, ), # 2 + (3, TType.STRING, 'statusmsg', None, None, ), # 3 (4, TType.I32, 'eta', None, None, ), # 4 (5, TType.STRING, 'format_eta', None, None, ), # 5 - (6, TType.I64, 'bleft', None, None, ), # 6 - (7, TType.I64, 'size', None, None, ), # 7 - (8, TType.STRING, 'format_size', None, None, ), # 8 - (9, TType.I16, 'percent', None, None, ), # 9 - (10, TType.I32, 'status', None, None, ), # 10 - (11, TType.STRING, 'statusmsg', None, None, ), # 11 - (12, TType.STRING, 'format_wait', None, None, ), # 12 - (13, TType.I64, 'wait_until', None, None, ), # 13 - (14, TType.I32, 'packageID', None, None, ), # 14 - (15, TType.STRING, 'packageName', None, None, ), # 15 - (16, TType.STRING, 'plugin', None, None, ), # 16 + (6, TType.I64, 'done', None, None, ), # 6 + (7, TType.I64, 'total', None, None, ), # 7 + (8, TType.STRUCT, 'download', (DownloadProgress, DownloadProgress.thrift_spec), None, ), # 8 ) - def __init__(self, fid=None, name=None, speed=None, eta=None, format_eta=None, bleft=None, size=None, format_size=None, percent=None, status=None, statusmsg=None, format_wait=None, wait_until=None, packageID=None, packageName=None, plugin=None,): - self.fid = fid + def __init__(self, plugin=None, name=None, statusmsg=None, eta=None, format_eta=None, done=None, total=None, download=None,): + self.plugin = plugin self.name = name - self.speed = speed + self.statusmsg = statusmsg self.eta = eta self.format_eta = format_eta - self.bleft = bleft - self.size = size - self.format_size = format_size - self.percent = percent - self.status = status - self.statusmsg = statusmsg - self.format_wait = format_wait - self.wait_until = wait_until - self.packageID = packageID - self.packageName = packageName - self.plugin = plugin + self.done = done + self.total = total + self.download = download class ServerStatus(TBase): -- cgit v1.2.3