XEP-0065,XEP-0096,XEP-0166,XEP-0235,XEP-0300: file transfer improvments:
huge patch sorry :) many things are improved by this patch, notably: - updated to last protocol changes (urn:xmpp:jingle:apps:file-transfer:5 and urn:xmpp:hashes:2) - XEP-0234: file request implementation - XEP-0234: methods to parse and generate <file> element (can be used by other plugins easily) - XEP-0234: range data is now in a namedtuple - path and namespace can be specified when sending/requesting a file (not standard, but needed for file sharing) - better error/termination handling - trigger points to handle file requests by other plugins - preparation to use file plugins with components
This commit is contained in:
parent
db45d45be5
commit
2e5991575f
1 changed files with 423 additions and 94 deletions
|
|
@ -244,7 +244,7 @@ class XEP_0096(object):
|
|||
client = self.host.getClient(profile)
|
||||
return self.sendFile(client, jid.JID(peer_jid_s), filepath, name or None, desc or None)
|
||||
|
||||
def sendFile(self, client, peer_jid, filepath, name=None, desc=None):
|
||||
def sendFile(self, client, peer_jid, filepath, name=None, desc=None, extra=None):
|
||||
"""Send a file using XEP-0096
|
||||
|
||||
@param peer_jid(jid.JID): recipient
|
||||
|
|
@ -252,7 +252,7 @@ class XEP_0096(object):
|
|||
@param name(unicode): name of the file to send
|
||||
name must not contain "/" characters
|
||||
@param desc: description of the file
|
||||
@param profile: %(doc_profile)s
|
||||
@param extra: not used here
|
||||
@return: an unique id to identify the transfer
|
||||
"""
|
||||
feature_elt = self.host.plugins["XEP-0020"].proposeFeatures({'stream-method': self.managed_stream_m}, namespace=None)
|
||||
|
|
|
|||
Loading…
Reference in a new issue