summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0332/stanza/response.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/plugins/xep_0332/stanza/response.py')
-rw-r--r--sleekxmpp/plugins/xep_0332/stanza/response.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/sleekxmpp/plugins/xep_0332/stanza/response.py b/sleekxmpp/plugins/xep_0332/stanza/response.py
index 4dc14344..d863efa3 100644
--- a/sleekxmpp/plugins/xep_0332/stanza/response.py
+++ b/sleekxmpp/plugins/xep_0332/stanza/response.py
@@ -9,7 +9,6 @@
"""
from sleekxmpp.xmlstream import ElementBase
-from sleekxmpp.plugins.xep_0332.stanza import NAMESPACE
class Response(ElementBase):
@@ -41,6 +40,18 @@ class Response(ElementBase):
"""
name = 'response'
- namespace = NAMESPACE
- interfaces = set(('statusCode', 'statusMessage', 'version'))
+ namespace = 'urn:xmpp:http'
+ interfaces = set(['code', 'version'])
plugin_attrib = 'resp'
+
+ def get_code(self):
+ print "Response:: get_code()"
+
+ def set_code(self, code):
+ print "Response:: set_code()"
+ self._set_attr('statusCode', str(code))
+ self._set_attr('statusMessage', str(code))
+
+ def set_version(self, version='1.1'):
+ print "Response:: set_version()"
+ self._set_attr('version', version)