diff options
-rw-r--r-- | sleekxmpp/plugins/old_0004.py | 2 | ||||
-rw-r--r-- | sleekxmpp/plugins/xep_0004.py | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/old_0004.py b/sleekxmpp/plugins/old_0004.py index 353e7222..263f8b21 100644 --- a/sleekxmpp/plugins/old_0004.py +++ b/sleekxmpp/plugins/old_0004.py @@ -21,6 +21,7 @@ from . import base import logging from xml.etree import cElementTree as ET import copy +import logging #TODO support item groups and results class old_0004(base.base_plugin): @@ -33,6 +34,7 @@ class old_0004(base.base_plugin): def post_init(self): base.base_plugin.post_init(self) self.xmpp.plugin['xep_0030'].add_feature('jabber:x:data') + logging.warning("This implementation of XEP-0004 is deprecated.") def handler_message_xform(self, xml): object = self.handle_form(xml) diff --git a/sleekxmpp/plugins/xep_0004.py b/sleekxmpp/plugins/xep_0004.py index e3d2b55a..712e84ae 100644 --- a/sleekxmpp/plugins/xep_0004.py +++ b/sleekxmpp/plugins/xep_0004.py @@ -35,6 +35,15 @@ class Form(ElementBase): field['options'] = options return field + def getXML(self): + logging.warning("Form.getXML() is deprecated API compatibility with plugins/old_0004.py") + return self.xml + + def fromXML(self, xml): + logging.warning("Form.fromXML() is deprecated API compatibility with plugins/old_0004.py") + n = Form(xml=xml) + return n + def addItem(self, values): itemXML = ET.Element('{%s}item' % self.namespace) self.xml.append(itemXML) |