Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/presence
diff options
context:
space:
mode:
authorGuillaume Desmottes <cassidy@cass-wks.(none)>2007-04-16 14:41:00 (GMT)
committer Guillaume Desmottes <cassidy@cass-wks.(none)>2007-04-16 14:41:00 (GMT)
commita4e18cf9c5b3a27b52ee7d96530660d75056ae98 (patch)
tree87acb235ea948279b40311b3761cbd12446425b3 /sugar/presence
parentb2e0f257cec37b9de97ecf0ba279c5424722ce04 (diff)
add get_preferred_connection method to PresenceService
Diffstat (limited to 'sugar/presence')
-rw-r--r--sugar/presence/presenceservice.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/sugar/presence/presenceservice.py b/sugar/presence/presenceservice.py
index 78f51e6..e61c8d7 100644
--- a/sugar/presence/presenceservice.py
+++ b/sugar/presence/presenceservice.py
@@ -337,6 +337,19 @@ class PresenceService(gobject.GObject):
reply_handler=lambda *args: self._share_activity_cb(activity, *args),
error_handler=lambda *args: self._share_activity_error_cb(activity, *args))
+ def get_preferred_connection(self):
+ """Gets the preferred telepathy connection object that an activity
+ should use when talking directly to telepathy
+
+ returns the bus name and the object path of the Telepathy connection"""
+
+ try:
+ bus_name, object_path = self._ps.GetPreferredConnection()
+ except dbus.exceptions.DBusException:
+ return None
+
+ return bus_name, object_path
+
class _MockPresenceService(gobject.GObject):
"""Test fixture allowing testing of items that use PresenceService