diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-03-08 03:38:59 +0100 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-03-08 03:38:59 +0100 |
commit | 66500ef5fb6793aabae57d9738dde28a475a7518 (patch) | |
tree | 0ac26293e7a2f2f90e93e7ffd072e95d48ca0136 /slixmpp/plugins/xep_0363/stanza.py | |
parent | 979396bb1e2b9f076459e9e086b1656296fd7ae2 (diff) | |
download | slixmpp-66500ef5fb6793aabae57d9738dde28a475a7518.tar.gz slixmpp-66500ef5fb6793aabae57d9738dde28a475a7518.tar.bz2 slixmpp-66500ef5fb6793aabae57d9738dde28a475a7518.tar.xz slixmpp-66500ef5fb6793aabae57d9738dde28a475a7518.zip |
Add an HTTP File Upload plugin.
Diffstat (limited to 'slixmpp/plugins/xep_0363/stanza.py')
-rw-r--r-- | slixmpp/plugins/xep_0363/stanza.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/slixmpp/plugins/xep_0363/stanza.py b/slixmpp/plugins/xep_0363/stanza.py new file mode 100644 index 00000000..4795f96d --- /dev/null +++ b/slixmpp/plugins/xep_0363/stanza.py @@ -0,0 +1,38 @@ +""" + slixmpp: The Slick XMPP Library + Copyright (C) 2018 Emmanuel Gil Peyrot + This file is part of slixmpp. + + See the file LICENSE for copying permission. +""" + +from slixmpp.xmlstream import ElementBase + +class Request(ElementBase): + plugin_attrib = 'http_upload_request' + name = 'request' + namespace = 'urn:xmpp:http:upload:0' + interfaces = {'filename', 'size', 'content-type'} + +class Slot(ElementBase): + plugin_attrib = 'http_upload_slot' + name = 'slot' + namespace = 'urn:xmpp:http:upload:0' + +class Put(ElementBase): + plugin_attrib = 'put' + name = 'put' + namespace = 'urn:xmpp:http:upload:0' + interfaces = {'url'} + +class Get(ElementBase): + plugin_attrib = 'get' + name = 'get' + namespace = 'urn:xmpp:http:upload:0' + interfaces = {'url'} + +class Header(ElementBase): + plugin_attrib = 'header' + name = 'header' + namespace = 'urn:xmpp:http:upload:0' + interfaces = {'name', 'value'} |