plugin XEP-0363: updated to namespace "urn:xmpp:http:upload:0", handle headers
This commit is contained in:
parent
430649f58f
commit
9335194f7b
1 changed files with 66 additions and 54 deletions
|
|
@ -37,6 +37,7 @@ class IStreamProducer(interface.Interface):
|
|||
|
||||
@return (D): deferred fired when stream is finished
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class SatFile(object):
|
||||
|
|
@ -44,17 +45,8 @@ class SatFile(object):
|
|||
|
||||
# TODO: manage "with" statement
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
host,
|
||||
client,
|
||||
path,
|
||||
mode="rb",
|
||||
uid=None,
|
||||
size=None,
|
||||
data_cb=None,
|
||||
auto_end_signals=True,
|
||||
):
|
||||
def __init__(self, host, client, path, mode="rb", uid=None, size=None, data_cb=None,
|
||||
auto_end_signals=True):
|
||||
"""
|
||||
@param host: %(doc_host)s
|
||||
@param path(str): path of the file to get
|
||||
|
|
@ -65,8 +57,10 @@ class SatFile(object):
|
|||
@param size(None, int): size of the file (when known in advance)
|
||||
@param data_cb(None, callable): method to call on each data read/write
|
||||
mainly useful to do things like calculating hash
|
||||
@param auto_end_signals(bool): if True, progressFinished and progressError signals are automatically sent
|
||||
if False, you'll have to call self.progressFinished and self.progressError yourself
|
||||
@param auto_end_signals(bool): if True, progressFinished and progressError signals
|
||||
are automatically sent.
|
||||
if False, you'll have to call self.progressFinished and self.progressError
|
||||
yourself.
|
||||
progressStarted signal is always sent automatically
|
||||
"""
|
||||
self.host = host
|
||||
|
|
|
|||
Loading…
Reference in a new issue