summaryrefslogtreecommitdiff
path: root/slixmpp/plugins/xep_0066
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2020-12-10 19:20:23 +0100
committermathieui <mathieui@mathieui.net>2020-12-10 19:22:40 +0100
commit95d40a3ca336a4e1b66c7ed287ec3f2ef92b201c (patch)
treeef3086be7313a8e61e51b7a3efed302d0e154cb0 /slixmpp/plugins/xep_0066
parent010bf6dd70a44d9e9087336bc955a591ab9248b3 (diff)
downloadslixmpp-95d40a3ca336a4e1b66c7ed287ec3f2ef92b201c.tar.gz
slixmpp-95d40a3ca336a4e1b66c7ed287ec3f2ef92b201c.tar.bz2
slixmpp-95d40a3ca336a4e1b66c7ed287ec3f2ef92b201c.tar.xz
slixmpp-95d40a3ca336a4e1b66c7ed287ec3f2ef92b201c.zip
docs: update docstrings for sphinx conformity
Remove most references to timeout/callback/ifrom/timeout_callbacks args
Diffstat (limited to 'slixmpp/plugins/xep_0066')
-rw-r--r--slixmpp/plugins/xep_0066/oob.py36
1 files changed, 10 insertions, 26 deletions
diff --git a/slixmpp/plugins/xep_0066/oob.py b/slixmpp/plugins/xep_0066/oob.py
index 233263a2..7f32e39c 100644
--- a/slixmpp/plugins/xep_0066/oob.py
+++ b/slixmpp/plugins/xep_0066/oob.py
@@ -36,10 +36,6 @@ class XEP_0066(BasePlugin):
Events:
oob_transfer -- Raised when a request to download a resource
has been received.
-
- Methods:
- send_oob -- Send a request to another entity to download a file
- or other addressable resource.
"""
name = 'xep_0066'
@@ -76,11 +72,10 @@ class XEP_0066(BasePlugin):
Register a handler to process download requests, either for all
JIDs or a single JID.
- Arguments:
- jid -- If None, then set the handler as a global default.
- handler -- If None, then remove the existing handler for the
- given JID, or reset the global handler if the JID
- is None.
+ :param jid: If None, then set the handler as a global default.
+ :param handler: If None, then remove the existing handler for the
+ given JID, or reset the global handler if the JID
+ is None.
"""
if jid is None:
if handler is not None:
@@ -98,17 +93,9 @@ class XEP_0066(BasePlugin):
Initiate a basic file transfer by sending the URL of
a file or other resource.
- Arguments:
- url -- The URL of the resource to transfer.
- desc -- An optional human readable description of the item
- that is to be transferred.
- ifrom -- Specifiy the sender's JID.
- block -- If true, block and wait for the stanzas' reply.
- timeout -- The time in seconds to block while waiting for
- a reply. If None, then wait indefinitely.
- callback -- Optional callback to execute when a reply is
- received instead of blocking and waiting for
- the reply.
+ :param url: The URL of the resource to transfer.
+ :param desc: An optional human readable description of the item
+ that is to be transferred.
"""
iq = self.xmpp.Iq()
iq['type'] = 'set'
@@ -122,8 +109,7 @@ class XEP_0066(BasePlugin):
"""
Execute the appropriate handler for a transfer request.
- Arguments:
- iq -- The Iq stanza containing the OOB transfer request.
+ :param iq: The Iq stanza containing the OOB transfer request.
"""
if iq['to'] in self.url_handlers['jid']:
return self.url_handlers['jid'][iq['to']](iq)
@@ -140,8 +126,7 @@ class XEP_0066(BasePlugin):
Register a new handler using self.register_url_handler to
screen requests and download files.
- Arguments:
- iq -- The Iq stanza containing the OOB transfer request.
+ :param iq: The Iq stanza containing the OOB transfer request.
"""
raise XMPPError('service-unavailable')
@@ -149,8 +134,7 @@ class XEP_0066(BasePlugin):
"""
Handle receiving an out-of-band transfer request.
- Arguments:
- iq -- An Iq stanza containing an OOB transfer request.
+ :param iq: An Iq stanza containing an OOB transfer request.
"""
log.debug('Received out-of-band data request for %s from %s:' % (
iq['oob_transfer']['url'], iq['from']))