primitivus: profile manager updated to use new asynchronous profile creation
This commit is contained in:
parent
f8f051be5e
commit
f5f32a0c9f
1 changed files with 23 additions and 4 deletions
|
|
@ -24,6 +24,7 @@ import dbus, dbus.glib
|
|||
from logging import debug, error
|
||||
|
||||
const_INT_PREFIX = "org.goffi.SAT" #Interface prefix
|
||||
const_ERROR_PREFIX = const_INT_PREFIX+".error"
|
||||
const_OBJ_PATH = '/org/goffi/SAT/bridge'
|
||||
const_CORE_SUFFIX = ".core"
|
||||
const_PLUGIN_SUFFIX = ".plugin"
|
||||
|
|
@ -60,10 +61,13 @@ class DBusBridgeFrontend(BridgeFrontend):
|
|||
return self.db_core_iface.addContact(entity_jid, profile_key)
|
||||
|
||||
def asyncConnect(self, profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return self.db_core_iface.asyncConnect(profile_key, reply_handler=callback, error_handler=errback)
|
||||
return self.db_core_iface.asyncConnect(profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:]))
|
||||
|
||||
def asyncCreateProfile(self, profile, callback=None, errback=None):
|
||||
return self.db_core_iface.asyncCreateProfile(profile, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:]))
|
||||
|
||||
def asyncGetParamA(self, name, category, attribute="value", profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return unicode(self.db_core_iface.asyncGetParamA(name, category, attribute, profile_key, reply_handler=callback, error_handler=errback))
|
||||
return unicode(self.db_core_iface.asyncGetParamA(name, category, attribute, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])))
|
||||
|
||||
def callMenu(self, category, name, menu_type, profile_key):
|
||||
return unicode(self.db_core_iface.callMenu(category, name, menu_type, profile_key))
|
||||
|
|
|
|||
Loading…
Reference in a new issue