diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-06-07 15:14:43 (GMT) |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-06-07 15:14:43 (GMT) |
commit | e03146eaa6677b2ad7d951502844439a9242586c (patch) | |
tree | 318649d3e6e3632cb75797cfee9de062cf0e06a2 | |
parent | 5fed12edbc6c7f058a990241d12fd0b02da38d80 (diff) |
server_plugin: when an activity ID is emitted in a signal, include the handle too
-rw-r--r-- | src/activity.py | 6 | ||||
-rw-r--r-- | src/presenceservice.py | 4 | ||||
-rw-r--r-- | src/server_plugin.py | 27 |
3 files changed, 25 insertions, 12 deletions
diff --git a/src/activity.py b/src/activity.py index 0c05c03..91efbba 100644 --- a/src/activity.py +++ b/src/activity.py @@ -492,7 +492,8 @@ class Activity(ExportedGObject): return True - def _shared_cb(self, tp, activity_id, text_channel, exc, userdata): + def _shared_cb(self, tp, activity_id, room_handle, text_channel, exc, + userdata): """XXX - not documented yet """ if activity_id != self.props.id: @@ -528,7 +529,8 @@ class Activity(ExportedGObject): async_err_cb)) _logger.debug("done with share attempt %s" % self._id) - def _joined_cb(self, tp, activity_id, text_channel, exc, userdata): + def _joined_cb(self, tp, activity_id, room_handle, text_channel, exc, + userdata): """XXX - not documented yet """ if activity_id != self.props.id: diff --git a/src/presenceservice.py b/src/presenceservice.py index f238098..6d8b881 100644 --- a/src/presenceservice.py +++ b/src/presenceservice.py @@ -282,7 +282,7 @@ class PresenceService(ExportedGObject): activity.buddy_apparently_left(buddy) - def _activity_invitation(self, tp, act_id): + def _activity_invitation(self, tp, act_id, act_handle): activity = self._activities.get(act_id) if activity: self.ActivityInvitation(activity.object_path()) @@ -496,7 +496,7 @@ class PresenceService(ExportedGObject): _logger.debug("Activity disappeared: %s (%s)", activity.props.name, activity.props.id) - def _activity_properties_changed(self, tp, act_id, props): + def _activity_properties_changed(self, tp, act_id, act_handle, props): activity = self._activities.get(act_id) if activity: activity.set_properties(props) diff --git a/src/server_plugin.py b/src/server_plugin.py index afe3410..acaceb7 100644 --- a/src/server_plugin.py +++ b/src/server_plugin.py @@ -120,7 +120,9 @@ class ServerPlugin(gobject.GObject): (gobject.SIGNAL_RUN_FIRST, None, [int, int]), 'avatar-updated': # Contact's avatar has changed - # args: contact handle: int; icon data: str + # args: + # contact handle: int + # icon data: str (gobject.SIGNAL_RUN_FIRST, None, [object, object]), 'buddy-properties-changed': # OLPC buddy properties changed; as for PropertiesChanged @@ -137,30 +139,39 @@ class ServerPlugin(gobject.GObject): (gobject.SIGNAL_RUN_FIRST, None, [object, object]), 'activity-invitation': # We were invited to join an activity - # args: activity ID: str - (gobject.SIGNAL_RUN_FIRST, None, [object]), + # args: + # activity ID: str + # activity room handle: int or long + (gobject.SIGNAL_RUN_FIRST, None, [object, object]), 'private-invitation': # We were invited to join a chat or a media call - # args: channel object path + # args: + # channel object path (gobject.SIGNAL_RUN_FIRST, None, [object]), 'activity-properties-changed': # An activity's properties changed; as for # ActivityPropertiesChanged - # args: activity ID: str; properties: dict { str => object } + # args: + # activity ID: str + # activity room handle: int or long + # properties: dict { str => object } # FIXME: are these all the properties or just those that changed? - (gobject.SIGNAL_RUN_FIRST, None, [object, object]), + (gobject.SIGNAL_RUN_FIRST, None, [object, object, object]), 'activity-shared': # share_activity() succeeded # args: # activity ID: str + # activity room handle: int or long # channel: telepathy.client.Channel, or None on failure # error: None, or Exception on failure # userdata as passed to share_activity - (gobject.SIGNAL_RUN_FIRST, None, [object, object, object, object]), + (gobject.SIGNAL_RUN_FIRST, None, [object, object, object, object, + object]), 'activity-joined': # join_activity() succeeded # args: as for activity-shared - (gobject.SIGNAL_RUN_FIRST, None, [object, object, object, object]), + (gobject.SIGNAL_RUN_FIRST, None, [object, object, object, object, + object]), } def __init__(self, registry, owner, icon_cache): |