summaryrefslogtreecommitdiff
path: root/slixmpp/plugins/xep_0363/stanza.py
diff options
context:
space:
mode:
Diffstat (limited to 'slixmpp/plugins/xep_0363/stanza.py')
-rw-r--r--slixmpp/plugins/xep_0363/stanza.py38
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'}