diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> | 2010-07-15 08:50:05 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> | 2010-08-20 13:33:53 (GMT) |
commit | 363f82820557e3b15e6c36334bceeae1f863ed31 (patch) | |
tree | e1a4433cf5a5197a443d3f92359007bee6b96f34 /src/sugar/presence/util.py | |
parent | af6e3aa5ef284ed9184f149b119707496747f3a5 (diff) |
Handle invitations using Mission Control 5.
src/sugar/activity/activity.py: If the activity is being invoked to
handle an invite, create a Client.Handler instance and share the
activity when HandleChannels is invoked.
src/sugar/activity/activityfactory.py,
src/sugar/activity/activityhandle.py,
src/sugar/activity/main.py: Add a -i switch that indicates to the
activity that it should handle the channel from an invitation.
src/sugar/presence/activity.py: Expose Activity.room_handle.
src/sugar/presence/presenceservice.py: Add get_activity_by_handle().
src/sugar/presence/util.py: Add get_account_for_connection().
Diffstat (limited to 'src/sugar/presence/util.py')
-rw-r--r-- | src/sugar/presence/util.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sugar/presence/util.py b/src/sugar/presence/util.py index 30346c1..361ee16 100644 --- a/src/sugar/presence/util.py +++ b/src/sugar/presence/util.py @@ -50,6 +50,12 @@ class ConnectionManager(object): def get_connections_per_account(self): return self._connections_per_account + def get_account_for_connection(self, connection_path): + for account_path, connection in self._connections_per_account.items(): + if connection.object_path == connection_path: + return account_path + return None + _connection_manager = None def get_connection_manager(): |