comparison frontends/src/bridge/DBus.py @ 755:e3ad48a2aab2

core, frontends: callMenu is now async and don't use callback_id anymore
author Goffi <goffi@goffi.org>
date Tue, 24 Dec 2013 15:18:31 +0100
parents f49945d728de
children 93bd868b8fb6
comparison
equal deleted inserted replaced
754:f021bf27a557 755:e3ad48a2aab2
95 95
96 return getPluginMethod 96 return getPluginMethod
97 def addContact(self, entity_jid, profile_key="@DEFAULT@"): 97 def addContact(self, entity_jid, profile_key="@DEFAULT@"):
98 return self.db_core_iface.addContact(entity_jid, profile_key) 98 return self.db_core_iface.addContact(entity_jid, profile_key)
99 99
100 def asyncCallMenu(self, category, name, menu_type, profile_key, callback=None, errback=None):
101 return unicode(self.db_core_iface.asyncCallMenu(category, name, menu_type, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])))
102
100 def asyncConnect(self, profile_key="@DEFAULT@", callback=None, errback=None): 103 def asyncConnect(self, profile_key="@DEFAULT@", callback=None, errback=None):
101 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:])) 104 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:]))
102 105
103 def asyncCreateProfile(self, profile, callback=None, errback=None): 106 def asyncCreateProfile(self, profile, callback=None, errback=None):
104 return self.db_core_iface.asyncCreateProfile(profile, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])) 107 return self.db_core_iface.asyncCreateProfile(profile, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:]))
105 108
106 def asyncGetParamA(self, name, category, attribute="value", security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None): 109 def asyncGetParamA(self, name, category, attribute="value", security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
107 return unicode(self.db_core_iface.asyncGetParamA(name, category, attribute, security_limit, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:]))) 110 return unicode(self.db_core_iface.asyncGetParamA(name, category, attribute, security_limit, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])))
108 111
109 def callMenu(self, category, name, menu_type, profile_key):
110 return unicode(self.db_core_iface.callMenu(category, name, menu_type, profile_key))
111
112 def confirmationAnswer(self, id, accepted, data, profile): 112 def confirmationAnswer(self, id, accepted, data, profile):
113 return self.db_core_iface.confirmationAnswer(id, accepted, data, profile) 113 return self.db_core_iface.confirmationAnswer(id, accepted, data, profile)
114 114
115 def connect(self, profile_key="@DEFAULT@"): 115 def connect(self, profile_key="@DEFAULT@"):
116 return self.db_core_iface.connect(profile_key) 116 return self.db_core_iface.connect(profile_key)