summaryrefslogtreecommitdiffstats
path: root/module/remote/thriftbackend
diff options
context:
space:
mode:
Diffstat (limited to 'module/remote/thriftbackend')
-rw-r--r--module/remote/thriftbackend/pyload.thrift77
-rwxr-xr-xmodule/remote/thriftbackend/thriftgen/pyload/Pyload-remote31
-rw-r--r--module/remote/thriftbackend/thriftgen/pyload/Pyload.py186
-rw-r--r--module/remote/thriftbackend/thriftgen/pyload/ttypes.py242
4 files changed, 324 insertions, 212 deletions
diff --git a/module/remote/thriftbackend/pyload.thrift b/module/remote/thriftbackend/pyload.thrift
index 1542e651a..a1b328958 100644
--- a/module/remote/thriftbackend/pyload.thrift
+++ b/module/remote/thriftbackend/pyload.thrift
@@ -2,7 +2,6 @@ namespace java org.pyload.thrift
typedef i32 FileID
typedef i32 PackageID
-typedef i32 TaskID
typedef i32 ResultID
typedef i32 InteractionID
typedef list<string> LinkList
@@ -34,11 +33,6 @@ enum Destination {
Queue
}
-enum ElementType {
- Package,
- File
-}
-
// types for user interaction
// some may only be place holder currently not supported
// also all input - output combination are not reasonable, see InteractionManager for further info
@@ -93,20 +87,6 @@ struct ServerStatus {
7: bool reconnect
}
-struct ConfigItem {
- 1: string name,
- 2: string description,
- 3: string value,
- 4: string type,
-}
-
-struct ConfigSection {
- 1: string name,
- 2: string description,
- 3: list<ConfigItem> items,
- 4: optional string outline
-}
-
struct FileData {
1: FileID fid,
2: string url,
@@ -149,6 +129,24 @@ struct InteractionTask {
9: string plugin,
}
+struct ConfigItem {
+ 1: string name,
+ 2: string long_name,
+ 3: string description,
+ 4: string type,
+ 5: string default_value,
+ 6: string value,
+}
+
+struct ConfigSection {
+ 1: string name,
+ 2: string long_name,
+ 3: string description,
+ 4: string long_description,
+ 5: optional list<ConfigItem> items,
+ 6: optional map<string, InteractionTask> handler,
+}
+
struct CaptchaTask {
1: i16 tid,
2: binary data,
@@ -158,9 +156,7 @@ struct CaptchaTask {
struct EventInfo {
1: string eventname,
- 2: optional i32 id,
- 3: optional ElementType type,
- 4: optional Destination destination
+ 2: list<string> event_args,
}
struct UserData {
@@ -172,21 +168,21 @@ struct UserData {
}
struct AccountInfo {
- 1: i64 validuntil,
- 2: string login,
- 3: map<string, list<string>> options,
- 4: bool valid,
+ 1: PluginName plugin,
+ 2: string loginname,
+ 3: bool valid,
+ 4: i64 validuntil,
5: i64 trafficleft,
6: i64 maxtraffic,
7: bool premium,
- 8: string type,
+ 8: bool activated,
+ 9: map<string, string> options,
}
struct ServiceCall {
1: PluginName plugin,
2: string func,
- 3: optional list<string> arguments,
- 4: optional bool parseArguments, //default False
+ 3: string arguments, // empty string or json encoded list
}
struct OnlineStatus {
@@ -213,6 +209,10 @@ exception FileDoesNotExists{
1: FileID fid
}
+exception UserDoesNotExists{
+ 1: string user
+}
+
exception ServiceDoesNotExists{
1: string plugin
2: string func
@@ -225,10 +225,11 @@ exception ServiceException{
service Pyload {
//config
- string getConfigValue(1: string category, 2: string option, 3: string section),
- void setConfigValue(1: string category, 2: string option, 3: string value, 4: string section),
+ string getConfigValue(1: string section, 2: string option),
+ void setConfigValue(1: string section, 2: string option, 3: string value),
map<string, ConfigSection> getConfig(),
- map<string, ConfigSection> getPluginConfig(),
+ map<PluginName, ConfigSection> getPluginConfig(),
+ ConfigSection configureSection(1: string section),
// server status
void pauseServer(),
@@ -272,9 +273,9 @@ service Pyload {
// downloads - adding/deleting
list<PackageID> generateAndAddPackages(1: LinkList links, 2: Destination dest),
- PackageID addPackage(1: string name, 2: LinkList links, 3: Destination dest),
+ PackageID addPackage(1: string name, 2: LinkList links, 3: Destination dest, 4: string password),
+ PackageID uploadContainer(1: string filename, 2: binary data),
void addFiles(1: PackageID pid, 2: LinkList links),
- void uploadContainer(1: string filename, 2: binary data),
void deleteFiles(1: list<FileID> fids),
void deletePackages(1: list<PackageID> pids),
@@ -306,7 +307,7 @@ service Pyload {
//auth
bool login(1: string username, 2: string password),
- UserData getUserData(1: string username, 2:string password),
+ UserData getUserData(1: string username, 2:string password) throws (1: UserDoesNotExists ex),
map<string, UserData> getAllUserData(),
//services
@@ -332,6 +333,6 @@ service Pyload {
//captcha
bool isCaptchaWaiting(),
CaptchaTask getCaptchaTask(1: bool exclusive),
- string getCaptchaTaskStatus(1: TaskID tid),
- void setCaptchaResult(1: TaskID tid, 2: string result),
+ string getCaptchaTaskStatus(1: InteractionID tid),
+ void setCaptchaResult(1: InteractionID tid, 2: string result),
}
diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote
index bfaf5b078..6ee40092d 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()'
@@ -56,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)'
@@ -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'
@@ -343,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 78a42f16a..3e0fe3bbc 100644
--- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
+++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
@@ -9,26 +9,24 @@
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):
- 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
@@ -181,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
@@ -434,22 +440,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 +472,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 +554,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()
@@ -1348,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()
@@ -2130,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, ):
@@ -2427,6 +2463,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 +2551,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 +2562,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 +2590,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)
@@ -2886,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()
@@ -3175,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()
@@ -3302,28 +3353,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 +3394,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 +3481,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__ = [
@@ -4349,12 +4429,14 @@ class addPackage_args(TBase):
- name
- links
- dest
+ - password
"""
__slots__ = [
'name',
'links',
'dest',
+ 'password',
]
thrift_spec = (
@@ -4362,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):
@@ -5182,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):
diff --git a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py
index 1299b515d..b2da9748d 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
@@ -270,68 +256,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 +433,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:
@@ -544,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):
@@ -609,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):
@@ -659,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):
@@ -786,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: