diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2007-03-07 18:46:48 (GMT) |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2007-03-07 18:46:48 (GMT) |
commit | cb2489bff65695a876e39277eb562c1a8d83e8b3 (patch) | |
tree | 87bff1757a7dfc0b1ac24a79b1705b2c5d6be693 /services/presence2/presenceservice.py | |
parent | c07596a1eaa5f8de4962a034c1e5e8845ac619d6 (diff) |
implement ActivityInvitation and PrivateInvitation signals
Diffstat (limited to 'services/presence2/presenceservice.py')
-rw-r--r-- | services/presence2/presenceservice.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/services/presence2/presenceservice.py b/services/presence2/presenceservice.py index 86126ca..afccbbd 100644 --- a/services/presence2/presenceservice.py +++ b/services/presence2/presenceservice.py @@ -67,7 +67,8 @@ class PresenceService(dbus.service.Object): self._server_plugin.connect('avatar-updated', self._avatar_updated) self._server_plugin.connect('properties-changed', self._properties_changed) self._server_plugin.connect('contact-activities-changed', self._contact_activities_changed) - self._server_plugin.connect('activity-invited', self._activity_invited) + self._server_plugin.connect('activity-invitation', self._activity_invitation) + self._server_plugin.connect('private-invitation', self._private_invitation) self._server_plugin.start() # Set up the link local connection @@ -199,11 +200,14 @@ class PresenceService(dbus.service.Object): if len(activities) > 0: buddy.set_properties({'current-activity':activities[0]}) - def _activity_invited(self, tp, act_id): + def _activity_invitation(self, tp, act_id): activity = self._activities.get(act_id) if activity: - pass - # FIXME do something + self.ActivityInvitation(activity.object_path()) + + def _private_invitation(self, tp, chan_path): + conn = tp.get_connection() + self.PrivateInvitation(str(conn.service_name), conn.object_path, chan_path) @dbus.service.signal(_PRESENCE_INTERFACE, signature="o") def ActivityAppeared(self, activity): @@ -221,6 +225,14 @@ class PresenceService(dbus.service.Object): def BuddyDisappeared(self, buddy): pass + @dbus.service.signal(_PRESENCE_INTERFACE, signature="o") + def ActivityInvitation(self, activity): + pass + + @dbus.service.signal(_PRESENCE_INTERFACE, signature="soo") + def PrivateInvitation(self, bus_name, connection, channel): + pass + @dbus.service.method(_PRESENCE_INTERFACE, out_signature="ao") def GetActivities(self): ret = [] |