comparison src/plugins/plugin_misc_tickets.py @ 2443:81a45e7886c9

core: added a mechanism to associate short names to namespaces: - new internal registerNamespace can be used by a plugin to associate a short name to a namespace - new NamespacesGet bridge method retrieve those associations
author Goffi <goffi@goffi.org>
date Sun, 19 Nov 2017 16:46:07 +0100
parents 7fa9456032e7
children 9e692f09f367
comparison
equal deleted inserted replaced
2442:b8ffb7f8056b 2443:81a45e7886c9
45 class Tickets(object): 45 class Tickets(object):
46 46
47 def __init__(self, host): 47 def __init__(self, host):
48 log.info(_(u"Tickets plugin initialization")) 48 log.info(_(u"Tickets plugin initialization"))
49 self.host = host 49 self.host = host
50 host.registerNamespace('tickets', NS_TICKETS)
50 self._p = self.host.plugins["XEP-0060"] 51 self._p = self.host.plugins["XEP-0060"]
51 self._s = self.host.plugins["PUBSUB_SCHEMA"] 52 self._s = self.host.plugins["PUBSUB_SCHEMA"]
52 self._m = self.host.plugins["XEP-0277"] 53 self._m = self.host.plugins["XEP-0277"]
53 self._i = self.host.plugins["IDENTITY"] 54 self._i = self.host.plugins["IDENTITY"]
54 host.bridge.addMethod("ticketsGet", ".plugin", 55 host.bridge.addMethod("ticketsGet", ".plugin",