Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2007-03-06 17:22:43 (GMT)
committer Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>2007-03-06 17:22:43 (GMT)
commit1480ff8440de5a12db16733190885e72aaa7aad1 (patch)
tree276f19de28b5269897640df8c9bac95de4157898 /services
parent2eedfd3d90eae4cc84d22a32d15b61c2be5c93c9 (diff)
add a leave method
Diffstat (limited to 'services')
-rw-r--r--services/presence2/activity.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/services/presence2/activity.py b/services/presence2/activity.py
index 5fe9217..2ad484d 100644
--- a/services/presence2/activity.py
+++ b/services/presence2/activity.py
@@ -17,6 +17,8 @@
import dbus, dbus.service
+from telepathy.interfaces import (CHANNEL_INTERFACE)
+
_ACTIVITY_PATH = "/org/laptop/Sugar/Presence/Activities/"
_ACTIVITY_INTERFACE = "org.laptop.Sugar.Presence.Activity"
@@ -119,3 +121,8 @@ class Activity(dbus.service.Object):
conn = self._tp.get_connection()
# FIXME add tubes and others channels
return str(conn.service_name), conn.object_path, [self._activity_text_channel.object_path]
+
+ def leave(self):
+ if self._joined:
+ self._activity_text_channel[CHANNEL_INTERFACE].Close()
+ self._joined = False