core: improved roster management + misc:
- updated methods to no use anymore methods deprecated in Wokkel
- use of full jid when it make sense instead of bare jid
- getContacts, updateContact and delContact are now asynchronous
This commit is contained in:
parent
eaa0f83237
commit
6e144c6458
1 changed files with 102 additions and 98 deletions
|
|
@ -230,9 +230,9 @@ class DbusObject(dbus.service.Object):
|
|||
|
||||
@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))
|
||||
async_callbacks=('callback', 'errback'))
|
||||
def delContact(self, entity_jid, profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return self._callback("delContact", unicode(entity_jid), unicode(profile_key), callback=callback, errback=errback)
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='ss', out_signature='(asa(sss))',
|
||||
|
|
@ -260,9 +260,9 @@ class DbusObject(dbus.service.Object):
|
|||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='s', out_signature='a(sa{ss}as)',
|
||||
async_callbacks=None)
|
||||
def getContacts(self, profile_key="@DEFAULT@"):
|
||||
return self._callback("getContacts", unicode(profile_key))
|
||||
async_callbacks=('callback', 'errback'))
|
||||
def getContacts(self, profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return self._callback("getContacts", unicode(profile_key), callback=callback, errback=errback)
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='ss', out_signature='as',
|
||||
|
|
@ -434,9 +434,9 @@ class DbusObject(dbus.service.Object):
|
|||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='ssass', out_signature='',
|
||||
async_callbacks=None)
|
||||
def updateContact(self, entity_jid, name, groups, profile_key="@DEFAULT@"):
|
||||
return self._callback("updateContact", unicode(entity_jid), unicode(name), groups, unicode(profile_key))
|
||||
async_callbacks=('callback', 'errback'))
|
||||
def updateContact(self, entity_jid, name, groups, profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return self._callback("updateContact", unicode(entity_jid), unicode(name), groups, unicode(profile_key), callback=callback, errback=errback)
|
||||
|
||||
def __attributes(self, in_sign):
|
||||
"""Return arguments to user given a in_sign
|
||||
|
|
|
|||
Loading…
Reference in a new issue