core, frontends: add method asyncDeleteProfile, remove synchronous methods createProfile and deleteProfile
This commit is contained in:
parent
528ceb5f8b
commit
d158589881
1 changed files with 47 additions and 82 deletions
|
|
@ -104,6 +104,9 @@ class DBusBridgeFrontend(BridgeFrontend):
|
|||
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 asyncDeleteProfile(self, profile, callback=None, errback=None):
|
||||
return self.db_core_iface.asyncDeleteProfile(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", security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
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:])))
|
||||
|
||||
|
|
@ -113,15 +116,9 @@ class DBusBridgeFrontend(BridgeFrontend):
|
|||
def connect(self, profile_key="@DEFAULT@"):
|
||||
return self.db_core_iface.connect(profile_key)
|
||||
|
||||
def createProfile(self, profile):
|
||||
return self.db_core_iface.createProfile(profile)
|
||||
|
||||
def delContact(self, entity_jid, profile_key="@DEFAULT@"):
|
||||
return self.db_core_iface.delContact(entity_jid, profile_key)
|
||||
|
||||
def deleteProfile(self, profile):
|
||||
return self.db_core_iface.deleteProfile(profile)
|
||||
|
||||
def disconnect(self, profile_key="@DEFAULT@"):
|
||||
return self.db_core_iface.disconnect(profile_key)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue