comparison src/plugins/plugin_xep_0100.py @ 291:7c79d4a8c9e6

plugins: fixed bad import names
author Goffi <goffi@goffi.org>
date Sun, 06 Feb 2011 23:49:27 +0100
parents b1794cbb88e5
children f964dcec1611
comparison
equal deleted inserted replaced
290:59a82af700e2 291:7c79d4a8c9e6
28 28
29 from wokkel import disco, iwokkel 29 from wokkel import disco, iwokkel
30 30
31 PLUGIN_INFO = { 31 PLUGIN_INFO = {
32 "name": "Gateways Plugin", 32 "name": "Gateways Plugin",
33 "import_name": "XEP_0100", 33 "import_name": "XEP-0100",
34 "type": "XEP", 34 "type": "XEP",
35 "protocols": ["XEP-0100"], 35 "protocols": ["XEP-0100"],
36 "dependencies": ["XEP_0077"], 36 "dependencies": ["XEP-0077"],
37 "main": "XEP_0100", 37 "main": "XEP_0100",
38 "description": _("""Implementation of Gateways protocol""") 38 "description": _("""Implementation of Gateways protocol""")
39 } 39 }
40 40
41 class XEP_0100(): 41 class XEP_0100():
108 def gatewayRegister(self, action, target, fields, profile_key='@DEFAULT@'): 108 def gatewayRegister(self, action, target, fields, profile_key='@DEFAULT@'):
109 """Register gateway using in-band registration, then log-in to gateway""" 109 """Register gateway using in-band registration, then log-in to gateway"""
110 profile = self.host.memory.getProfileName(profile_key) 110 profile = self.host.memory.getProfileName(profile_key)
111 assert(profile) #FIXME: return an error here 111 assert(profile) #FIXME: return an error here
112 if action == 'SUBMIT': 112 if action == 'SUBMIT':
113 self.host.plugins["XEP_0077"].addTrigger(target, self.registrationSuccessful, profile) 113 self.host.plugins["XEP-0077"].addTrigger(target, self.registrationSuccessful, profile)
114 return self.host.plugins["XEP_0077"].in_band_submit(action, target, fields, profile) 114 return self.host.plugins["XEP-0077"].in_band_submit(action, target, fields, profile)
115 115
116 def findGateways(self, target, profile_key='@DEFAULT@'): 116 def findGateways(self, target, profile_key='@DEFAULT@'):
117 """Find gateways in the target JID, using discovery protocol 117 """Find gateways in the target JID, using discovery protocol
118 Return an id used for retrieving the list of gateways 118 Return an id used for retrieving the list of gateways
119 """ 119 """