core: added getLastResource method
This commit is contained in:
parent
dc936be42b
commit
5380b684cd
2 changed files with 40 additions and 0 deletions
|
|
@ -196,6 +196,12 @@ class DbusObject(dbus.service.Object):
|
|||
def getHistory(self, from_jid, to_jid, size):
|
||||
return self.cb["getHistory"](unicode(from_jid), unicode(to_jid), size)
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='ss', out_signature='s',
|
||||
async_callbacks=None)
|
||||
def getLastResource(self, contact_jid, profile_key="@DEFAULT@"):
|
||||
return self.cb["getLastResource"](unicode(contact_jid), unicode(profile_key))
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='sss', out_signature='s',
|
||||
async_callbacks=None)
|
||||
|
|
|
|||
|
|
@ -257,6 +257,17 @@ doc_return=array of tuples with the following values:
|
|||
- list of attributes as in [newContact]
|
||||
- groups where the contact is
|
||||
|
||||
[getLastResource]
|
||||
type=method
|
||||
category=core
|
||||
sig_in=ss
|
||||
sig_out=s
|
||||
param_1_default="@DEFAULT@"
|
||||
doc=Return the last resource connected for a contact
|
||||
doc_param_0=contact_jid: jid of the contact
|
||||
doc_param_1=%(doc_profile_key)s
|
||||
doc_return=the last resource connected of the contact, or ""
|
||||
|
||||
[getPresenceStatus]
|
||||
type=method
|
||||
category=core
|
||||
|
|
|
|||
Loading…
Reference in a new issue