summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0332/stanza/data.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/plugins/xep_0332/stanza/data.py')
-rw-r--r--sleekxmpp/plugins/xep_0332/stanza/data.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/xep_0332/stanza/data.py b/sleekxmpp/plugins/xep_0332/stanza/data.py
new file mode 100644
index 00000000..e77d2585
--- /dev/null
+++ b/sleekxmpp/plugins/xep_0332/stanza/data.py
@@ -0,0 +1,29 @@
+"""
+ SleekXMPP: The Sleek XMPP Library
+ Implementation of HTTP over XMPP transport
+ http://xmpp.org/extensions/xep-0332.html
+ Copyright (C) 2015 Riptide IO, sangeeth@riptideio.com
+ This file is part of SleekXMPP.
+
+ See the file LICENSE for copying permission.
+"""
+
+from sleekxmpp.xmlstream import ElementBase
+
+
+class Data(ElementBase):
+ """
+ The data element.
+ """
+ name = 'data'
+ namespace = ''
+ interfaces = set(['data'])
+ plugin_attrib = 'data'
+
+ def get_data(self):
+ print "Data:: get_data()"
+
+ def set_data(self, data, encoding='text'):
+ print "Data:: set_data()"
+ self._set_sub_text(encoding, text=data)
+