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
This commit is contained in:
Goffi 2017-11-19 16:46:07 +01:00
commit da077485d2

View file

@ -383,6 +383,12 @@ class DbusObject(dbus.service.Object):
def messageSend(self, to_jid, message, subject={}, mess_type="auto", extra={}, profile_key="@NONE@", callback=None, errback=None):
return self._callback("messageSend", unicode(to_jid), message, subject, unicode(mess_type), extra, unicode(profile_key), callback=callback, errback=errback)
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
in_signature='', out_signature='a{ss}',
async_callbacks=None)
def namespacesGet(self, ):
return self._callback("namespacesGet", )
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
in_signature='sis', out_signature='',
async_callbacks=None)