comparison src/plugins/plugin_xep_0100.py @ 372:f964dcec1611

core: plugins refactored according to bridge + updatedValue now use profile
author Goffi <goffi@goffi.org>
date Wed, 06 Jul 2011 01:06:18 +0200
parents 7c79d4a8c9e6
children cf005701624b
comparison
equal deleted inserted replaced
371:3ea41a199b36 372:f964dcec1611
42 42
43 def __init__(self, host): 43 def __init__(self, host):
44 info(_("Gateways plugin initialization")) 44 info(_("Gateways plugin initialization"))
45 self.host = host 45 self.host = host
46 self.__gateways = {} #dict used to construct the answer to findGateways. Key = target jid 46 self.__gateways = {} #dict used to construct the answer to findGateways. Key = target jid
47 host.bridge.addMethod("findGateways", ".communication", in_sign='ss', out_sign='s', method=self.findGateways) 47 host.bridge.addMethod("findGateways", ".plugin", in_sign='ss', out_sign='s', method=self.findGateways)
48 host.bridge.addMethod("gatewayRegister", ".request", in_sign='ssa(ss)s', out_sign='s', method=self.gatewayRegister) 48 host.bridge.addMethod("gatewayRegister", ".plugin", in_sign='ssa(ss)s', out_sign='s', method=self.gatewayRegister)
49 49
50 def __inc_handled_items(self, request_id): 50 def __inc_handled_items(self, request_id):
51 self.__gateways[request_id]['__handled_items']+=1 51 self.__gateways[request_id]['__handled_items']+=1
52 52
53 if self.__gateways[request_id]['__total_items'] == self.__gateways[request_id]['__handled_items']: 53 if self.__gateways[request_id]['__total_items'] == self.__gateways[request_id]['__handled_items']: