comparison plugins/plugin_xep_0077.py @ 35:c45deebb40a5

Wix: Registration form management (not finished yet) - impoved xml conversion in xml_tools
author Goffi <goffi@goffi.org>
date Sun, 13 Dec 2009 20:24:48 +1100
parents b9bb5d8e0cc7
children 6491b7956c80
comparison
equal deleted inserted replaced
34:a544b376b6f0 35:c45deebb40a5
46 self.host = host 46 self.host = host
47 host.bridge.addMethod("in_band_register", ".communication", in_sign='s', out_sign='s', method=self.in_band_register) 47 host.bridge.addMethod("in_band_register", ".communication", in_sign='s', out_sign='s', method=self.in_band_register)
48 48
49 def reg_ok(self, answer): 49 def reg_ok(self, answer):
50 """Called after the first get IQ""" 50 """Called after the first get IQ"""
51 print "answer:",answer
52 form = data_form.Form.fromElement(answer.firstChildElement().firstChildElement()) 51 form = data_form.Form.fromElement(answer.firstChildElement().firstChildElement())
53 xml_data = XMLTools.dataForm2xml(form) 52 xml_data = XMLTools.dataForm2xml(form)
54 self.host.bridge.actionResult("FORM", answer['id'], {"type":"registration", "xml":xml_data}) 53 self.host.bridge.actionResult("FORM", answer['id'], {"type":"registration", "xml":xml_data})
55 54
56 def reg_err(self, failure): 55 def reg_err(self, failure):