core, frontends: add method asyncDeleteProfile, remove synchronous methods createProfile and deleteProfile
This commit is contained in:
parent
528ceb5f8b
commit
d158589881
2 changed files with 47 additions and 82 deletions
|
|
@ -203,6 +203,12 @@ class DbusObject(dbus.service.Object):
|
|||
def asyncCreateProfile(self, profile, callback=None, errback=None):
|
||||
return self._callback("asyncCreateProfile", unicode(profile), callback=callback, errback=errback)
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='s', out_signature='',
|
||||
async_callbacks=('callback', 'errback'))
|
||||
def asyncDeleteProfile(self, profile, callback=None, errback=None):
|
||||
return self._callback("asyncDeleteProfile", unicode(profile), callback=callback, errback=errback)
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='sssis', out_signature='s',
|
||||
async_callbacks=('callback', 'errback'))
|
||||
|
|
@ -221,24 +227,12 @@ class DbusObject(dbus.service.Object):
|
|||
def connect(self, profile_key="@DEFAULT@"):
|
||||
return self._callback("connect", unicode(profile_key))
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='s', out_signature='i',
|
||||
async_callbacks=None)
|
||||
def createProfile(self, profile):
|
||||
return self._callback("createProfile", unicode(profile))
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='ss', out_signature='',
|
||||
async_callbacks=None)
|
||||
def delContact(self, entity_jid, profile_key="@DEFAULT@"):
|
||||
return self._callback("delContact", unicode(entity_jid), unicode(profile_key))
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='s', out_signature='i',
|
||||
async_callbacks=None)
|
||||
def deleteProfile(self, profile):
|
||||
return self._callback("deleteProfile", unicode(profile))
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='s', out_signature='',
|
||||
async_callbacks=None)
|
||||
|
|
|
|||
|
|
@ -192,18 +192,6 @@ doc_param_2=%(doc_profile)s
|
|||
doc_return=dictionary of asked key,
|
||||
if key doesn't exist, the resulting dictionary will neither have the key
|
||||
|
||||
[createProfile]
|
||||
deprecated=
|
||||
type=method
|
||||
category=core
|
||||
sig_in=s
|
||||
sig_out=i
|
||||
doc=Create a new profile
|
||||
doc_param_0=%(doc_profile)s
|
||||
doc_return=status of the creation:
|
||||
- 0: Profile created
|
||||
- 1: The profile name already exists
|
||||
|
||||
[asyncCreateProfile]
|
||||
async=
|
||||
type=method
|
||||
|
|
@ -214,19 +202,22 @@ doc=Create a new profile
|
|||
doc_param_0=%(doc_profile)s
|
||||
doc_return=callback is called when profile actually exists in database and memory
|
||||
errback is called with error constant as parameter:
|
||||
- "CONFLICT": The profile name already exists
|
||||
- "CANCELED": profile creation canceled
|
||||
- ConflictError: the profile name already exists
|
||||
- CancelError: profile creation canceled
|
||||
|
||||
[deleteProfile]
|
||||
[asyncDeleteProfile]
|
||||
async=
|
||||
type=method
|
||||
category=core
|
||||
sig_in=s
|
||||
sig_out=i
|
||||
sig_out=
|
||||
doc=Delete a profile
|
||||
doc_param_0=%(doc_profile)s
|
||||
doc_return=status of the deletion:
|
||||
- 0: Profile deleted
|
||||
- 1: The profile doesn't exists
|
||||
doc_return=callback is called when profile has been deleted from database and memory
|
||||
errback is called with error constant as parameter:
|
||||
- ProfileUnknownError: the profile name is unknown
|
||||
- ConnectedProfileError: a connected profile would not be deleted
|
||||
|
||||
|
||||
[registerNewAccount]
|
||||
deprecated=
|
||||
|
|
|
|||
Loading…
Reference in a new issue