comparison src/plugins/plugin_xep_0077.py @ 630:0b914394e74f

core: added advanced list to XMLUI (need improvment, very basic so far) - the advanced list use headers which can be used as columns - in the future, should provide the ability to highly customize list disposition, in a way similar to Amarok 2's playlist.
author Goffi <goffi@goffi.org>
date Sun, 08 Sep 2013 18:05:19 +0200
parents 84a6e83157c2
children 2f8d72226bc0
comparison
equal deleted inserted replaced
629:204930b870e1 630:0b914394e74f
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20 from logging import debug, info, error 20 from logging import debug, info, error
21 from twisted.words.protocols.jabber import jid 21 from twisted.words.protocols.jabber import jid
22 from twisted.words.protocols.jabber.xmlstream import IQ 22 from twisted.words.protocols.jabber.xmlstream import IQ
23 from sat.tools.xml_tools import dataForm2xml 23 from sat.tools.xml_tools import dataForm2XML
24 24
25 from wokkel import data_form 25 from wokkel import data_form
26 26
27 NS_REG = 'jabber:iq:register' 27 NS_REG = 'jabber:iq:register'
28 28
61 answer_type = "ERROR" 61 answer_type = "ERROR"
62 self.host.bridge.actionResult(answer_type, answer['id'], answer_data, profile) 62 self.host.bridge.actionResult(answer_type, answer['id'], answer_data, profile)
63 return 63 return
64 64
65 form = data_form.Form.fromElement(x_elem) 65 form = data_form.Form.fromElement(x_elem)
66 xml_data = dataForm2xml(form) 66 xml_data = dataForm2XML(form)
67 self.host.bridge.actionResult("XMLUI", answer['id'], {"target": answer["from"], "type": "registration", "xml": xml_data}, profile) 67 self.host.bridge.actionResult("XMLUI", answer['id'], {"target": answer["from"], "type": "registration", "xml": xml_data}, profile)
68 68
69 def reg_err(self, failure, profile): 69 def reg_err(self, failure, profile):
70 """Called when something is wrong with registration""" 70 """Called when something is wrong with registration"""
71 info(_("Registration failure: %s") % str(failure.value)) 71 info(_("Registration failure: %s") % str(failure.value))