comparison src/plugins/plugin_xep_0163.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 0aa6ca6cdbdd
children ef9a4453959b
comparison
equal deleted inserted replaced
371:3ea41a199b36 372:f964dcec1611
48 info(_("PEP plugin initialization")) 48 info(_("PEP plugin initialization"))
49 self.host = host 49 self.host = host
50 self.pep_events=set() 50 self.pep_events=set()
51 self.pep_out_cb={} 51 self.pep_out_cb={}
52 host.trigger.add("PubSub Disco Info", self.disoInfoTrigger) 52 host.trigger.add("PubSub Disco Info", self.disoInfoTrigger)
53 host.bridge.addSignal("personalEvent", ".communication", signature='ssa{ss}s') #args: from (jid), type(MOOD, TUNE, etc), data, profile 53 host.bridge.addSignal("personalEvent", ".plugin", signature='ssa{ss}s') #args: from (jid), type(MOOD, TUNE, etc), data, profile
54 host.bridge.addMethod("sendPersonalEvent", ".communication", in_sign='sa{ss}s', out_sign='i', method=self.sendPersonalEvent) #args: type(MOOD, TUNE, etc), data, profile_key; return 0 or error_code 54 host.bridge.addMethod("sendPersonalEvent", ".plugin", in_sign='sa{ss}s', out_sign='i', method=self.sendPersonalEvent) #args: type(MOOD, TUNE, etc), data, profile_key; return 0 or error_code
55 self.addPEPEvent("MOOD", NS_USER_MOOD, self.userMoodCB, self.sendMood) 55 self.addPEPEvent("MOOD", NS_USER_MOOD, self.userMoodCB, self.sendMood)
56 56
57 def disoInfoTrigger(self, disco_info, profile): 57 def disoInfoTrigger(self, disco_info, profile):
58 """Add info from managed PEP 58 """Add info from managed PEP
59 @param disco_info: list of disco feature as returned by PubSub, 59 @param disco_info: list of disco feature as returned by PubSub,