Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/services/presence
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2007-05-17 16:41:42 (GMT)
committer Simon McVittie <simon.mcvittie@collabora.co.uk>2007-05-17 16:41:42 (GMT)
commitf3a2d532f5faba5a543f958c4512139b359e2bbf (patch)
tree552386165aecb1ed929d4aeae5f4653b1b42cace /services/presence
parentcd0a2b3ecd3b10cdb60daf5cf1dfc2eec08b9f4c (diff)
services/presence: buddy: add mapping to/from Telepathy handles
Diffstat (limited to 'services/presence')
-rw-r--r--services/presence/buddy.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/services/presence/buddy.py b/services/presence/buddy.py
index 429f824..d434221 100644
--- a/services/presence/buddy.py
+++ b/services/presence/buddy.py
@@ -236,6 +236,28 @@ class Buddy(ExportedGObject):
full set of properties, just the changes.
"""
+ @dbus.service.signal(_BUDDY_INTERFACE, signature='sou')
+ def TelepathyHandleAdded(self, tp_conn_name, tp_conn_path, handle):
+ """Another Telepathy handle has become associated with the buddy.
+
+ This must only be emitted for non-channel-specific handles.
+
+ tp_conn_name -- The bus name at which the Telepathy connection may be
+ found
+ tp_conn_path -- The object path at which the Telepathy connection may
+ be found
+ handle -- The handle of type CONTACT, which is not channel-specific,
+ newly associated with the buddy
+ """
+
+ @dbus.service.signal(_BUDDY_INTERFACE, signature='sou')
+ def TelepathyHandleRemoved(self, tp_conn_name, tp_conn_path, handle):
+ """A Telepathy handle has ceased to be associated with the buddy,
+ probably because that contact went offline.
+
+ The parameters are the same as for TelepathyHandleAdded.
+ """
+
# dbus methods
@dbus.service.method(_BUDDY_INTERFACE,
in_signature="", out_signature="ay")
@@ -294,6 +316,22 @@ class Buddy(ExportedGObject):
props[_PROP_CURACT] = ""
return props
+ @dbus.service.method(_BUDDY_INTERFACE,
+ in_signature='', out_signature='a(sou)')
+ def GetTelepathyHandles(self):
+ """Return a list of non-channel-specific Telepathy contact handles
+ associated with this Buddy.
+
+ :Returns:
+ An array of triples (connection well-known bus name, connection
+ object path, handle).
+ """
+ ret = []
+ for plugin in self.handles:
+ conn = plugin.get_connection()
+ ret.append((str(conn.service_name), conn.object_path,
+ self.handles[plugin]))
+
# methods
def object_path(self):
"""Retrieve our dbus.ObjectPath object"""