comparison src/plugins/plugin_xep_0077.py @ 468:c97640c90a94

D-Bus Bridge: use inspection to name attribute + fix asynchronous calls for dynamically added method, it now use deferred return value instead of callback/errback attributes
author Goffi <goffi@goffi.org>
date Fri, 30 Mar 2012 09:23:23 +0200
parents cf005701624b
children 2a072735e459
comparison
equal deleted inserted replaced
467:47af60767013 468:c97640c90a94
46 def __init__(self, host): 46 def __init__(self, host):
47 info(_("Plugin XEP_0077 initialization")) 47 info(_("Plugin XEP_0077 initialization"))
48 self.host = host 48 self.host = host
49 self.triggers = {} #used by other protocol (e.g. XEP-0100) to finish registration. key = target_jid 49 self.triggers = {} #used by other protocol (e.g. XEP-0100) to finish registration. key = target_jid
50 host.bridge.addMethod("in_band_register", ".plugin", in_sign='ss', out_sign='s', method=self.in_band_register) 50 host.bridge.addMethod("in_band_register", ".plugin", in_sign='ss', out_sign='s', method=self.in_band_register)
51 host.bridge.addMethod("in_band_submit", ".plugin", in_sign='sa(ss)', out_sign='s', method=self.in_band_submit) 51 host.bridge.addMethod("in_band_submit", ".plugin", in_sign='ssa(ss)s', out_sign='s', method=self.in_band_submit)
52 52
53 def addTrigger(self, target, cb, profile): 53 def addTrigger(self, target, cb, profile):
54 """Add a callback which is called when registration to target is successful""" 54 """Add a callback which is called when registration to target is successful"""
55 self.triggers[target] = (cb, profile) 55 self.triggers[target] = (cb, profile)
56 56