comparison plugins/plugin_xep_0096.py @ 7:c14a3a7018a5

added dynamic exportation of Dbus bridge method (usefull for plugins)
author Goffi <goffi@goffi.org>
date Sat, 24 Oct 2009 01:05:17 +0200
parents a06a151fc31f
children 4b05308d45f9
comparison
equal deleted inserted replaced
6:5799493fa548 7:c14a3a7018a5
40 def __init__(self, host): 40 def __init__(self, host):
41 info("Plugin XEP_0096 initialization") 41 info("Plugin XEP_0096 initialization")
42 self.host = host 42 self.host = host
43 self._waiting_for_approval = {} 43 self._waiting_for_approval = {}
44 host.add_IQ_cb("http://jabber.org/protocol/si", self.xep_96) 44 host.add_IQ_cb("http://jabber.org/protocol/si", self.xep_96)
45 host.bridge.register("sendFile", self.sendFile) 45 host.bridge.addMethod("sendFile", ".communication", in_sign='ss', out_sign='s', method=self.sendFile)
46
47 46
48 def xep_96(self, IQ): 47 def xep_96(self, IQ):
49 info ("XEP-0096 management") 48 info ("XEP-0096 management")
50 SI_elem = IQ.firstChildElement() 49 SI_elem = IQ.firstChildElement()
51 debug(SI_elem.toXml()) 50 debug(SI_elem.toXml())