diff options
author | Sangeeth Saravanaraj <sangeeth@riptideio.com> | 2015-01-29 08:33:40 +0530 |
---|---|---|
committer | Sangeeth Saravanaraj <sangeeth@riptideio.com> | 2015-01-29 08:33:40 +0530 |
commit | a96f608469e74d39d3e7a2a86399dbb724ffadec (patch) | |
tree | adea9c5e34b3a504fdfaa84ff6ae2ba9ee550af2 /sleekxmpp/plugins/xep_0332/stanza/response.py | |
parent | e1f25604ecbf5d6c196080cd8394191c7ea459c9 (diff) | |
download | slixmpp-a96f608469e74d39d3e7a2a86399dbb724ffadec.tar.gz slixmpp-a96f608469e74d39d3e7a2a86399dbb724ffadec.tar.bz2 slixmpp-a96f608469e74d39d3e7a2a86399dbb724ffadec.tar.xz slixmpp-a96f608469e74d39d3e7a2a86399dbb724ffadec.zip |
Composing request and response.
Diffstat (limited to 'sleekxmpp/plugins/xep_0332/stanza/response.py')
-rw-r--r-- | sleekxmpp/plugins/xep_0332/stanza/response.py | 17 |
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) |