diff options
Diffstat (limited to 'pyload/remote/thriftbackend')
-rw-r--r-- | pyload/remote/thriftbackend/Socket.py | 2 | ||||
-rw-r--r-- | pyload/remote/thriftbackend/ThriftClient.py | 4 | ||||
-rw-r--r-- | pyload/remote/thriftbackend/Transport.py | 4 | ||||
-rw-r--r-- | pyload/remote/thriftbackend/thriftgen/pyload/Pyload.py | 1 | ||||
-rw-r--r-- | pyload/remote/thriftbackend/thriftgen/pyload/ttypes.py | 4 |
5 files changed, 15 insertions, 0 deletions
diff --git a/pyload/remote/thriftbackend/Socket.py b/pyload/remote/thriftbackend/Socket.py index 4dd66e368..3d2435a92 100644 --- a/pyload/remote/thriftbackend/Socket.py +++ b/pyload/remote/thriftbackend/Socket.py @@ -10,6 +10,7 @@ from thrift.transport.TSocket import TSocket, TServerSocket, TTransportException WantReadError = Exception #: overwritten when ssl is used + class SecureSocketConnection(object): def __init__(self, connection): @@ -48,6 +49,7 @@ class SecureSocketConnection(object): sleep(0.1) return self.recv(buff) + class Socket(TSocket): def __init__(self, host='localhost', port=7228, ssl=False): diff --git a/pyload/remote/thriftbackend/ThriftClient.py b/pyload/remote/thriftbackend/ThriftClient.py index 60a4e9ca9..4f1c8dcc2 100644 --- a/pyload/remote/thriftbackend/ThriftClient.py +++ b/pyload/remote/thriftbackend/ThriftClient.py @@ -18,15 +18,19 @@ from pyload.remote.thriftbackend.thriftgen.pyload.ttypes import * ConnectionClosed = TTransport.TTransportException + class WrongLogin(Exception): pass + class NoConnection(Exception): pass + class NoSSL(Exception): pass + class ThriftClient(object): def __init__(self, host="localhost", port=7227, user="", password=""): diff --git a/pyload/remote/thriftbackend/Transport.py b/pyload/remote/thriftbackend/Transport.py index 7ecb16746..1d3d81718 100644 --- a/pyload/remote/thriftbackend/Transport.py +++ b/pyload/remote/thriftbackend/Transport.py @@ -3,6 +3,7 @@ from thrift.transport.TTransport import TBufferedTransport from thrift.transport.TZlibTransport import TZlibTransport + class Transport(TBufferedTransport): DEFAULT_BUFFER = 4096 @@ -12,6 +13,7 @@ class Transport(TBufferedTransport): self.handle = trans.handle self.remoteaddr = trans.handle.getpeername() + class TransportCompressed(TZlibTransport): DEFAULT_BUFFER = 4096 @@ -21,12 +23,14 @@ class TransportCompressed(TZlibTransport): self.handle = trans.handle self.remoteaddr = trans.handle.getpeername() + class TransportFactory(object): def getTransport(self, trans): buffered = Transport(trans) return buffered + class TransportFactoryCompressed(object): _last_trans = None _last_z = None diff --git a/pyload/remote/thriftbackend/thriftgen/pyload/Pyload.py b/pyload/remote/thriftbackend/thriftgen/pyload/Pyload.py index 350fe4bc7..1ba11dbb6 100644 --- a/pyload/remote/thriftbackend/thriftgen/pyload/Pyload.py +++ b/pyload/remote/thriftbackend/thriftgen/pyload/Pyload.py @@ -3652,6 +3652,7 @@ class Processor(Iface, TProcessor): # HELPER FUNCTIONS AND STRUCTURES + class getConfigValue_args(TBase): """ Attributes: diff --git a/pyload/remote/thriftbackend/thriftgen/pyload/ttypes.py b/pyload/remote/thriftbackend/thriftgen/pyload/ttypes.py index 1c18f6421..8abd775a9 100644 --- a/pyload/remote/thriftbackend/thriftgen/pyload/ttypes.py +++ b/pyload/remote/thriftbackend/thriftgen/pyload/ttypes.py @@ -64,6 +64,7 @@ class DownloadStatus(TBase): "Unknown": 14, } + class Destination(TBase): Collector = 0 Queue = 1 @@ -78,6 +79,7 @@ class Destination(TBase): "Queue": 1, } + class ElementType(TBase): Package = 0 File = 1 @@ -92,6 +94,7 @@ class ElementType(TBase): "File": 1, } + class Input(TBase): NONE = 0 TEXT = 1 @@ -130,6 +133,7 @@ class Input(TBase): "TABLE": 9, } + class Output(TBase): CAPTCHA = 1 QUESTION = 2 |