Development Team/Presence Service Removal: Difference between revisions
No edit summary |
No edit summary |
||
| (16 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
Some notes follow about how we can replace the implementation of the signals and methods in the Presence Service by another that uses more fully the telepathy framework and is stateless. | Some notes follow about how we can replace the implementation of the signals and methods in the Presence Service by another that uses more fully the telepathy framework and is stateless. | ||
See here for some related information: | |||
* http://wiki.laptop.org/go/Activity_sharing | |||
* http://wiki.laptop.org/go/Presence_Service | |||
* [http://people.collabora.co.uk/~cassidy/talks/sugar-camp-collab-archi-and-state-of-implementation.pdf Collaboration state of the art] (Guillaume Desmottes) | |||
* [http://people.collabora.co.uk/~cassidy/talks/sugar-camp-futur-of-collab.pdf Future of collaboration] (Guillaume Desmottes) | |||
== Interface org.laptop.Sugar.Presence == | == Interface org.laptop.Sugar.Presence == | ||
| Line 19: | Line 26: | ||
* Used by: Shell to display activities in the neighborhood and friends views | * Used by: Shell to display activities in the neighborhood and friends views | ||
* Present: Is fired when the properties contained in org.laptop.Telepathy.ActivityProperties stop being all non-None, and when the last buddy leaves the activity. A buddy is known to have left an activity when disappears (see BuddyDisappeared) and when the MembersChanged signal in org.freedesktop.Telepathy.Channel.Interface.Group says so. | * Present: Is fired when the properties contained in org.laptop.Telepathy.ActivityProperties stop being all non-None, and also when the last buddy leaves the activity. A buddy is known to have left an activity when disappears (see BuddyDisappeared) and when the MembersChanged signal in org.freedesktop.Telepathy.Channel.Interface.Group says so. | ||
* Future: | * Future: | ||
| Line 31: | Line 38: | ||
* Present: Is fired when the properties contained in org.laptop.Telepathy.BuddyInfo become all non-None. We start tracking a BuddyInfo when it appears as online in the signal PresenceUpdate of org.freedesktop.Telepathy.Connection.Interface.Presence. | * Present: Is fired when the properties contained in org.laptop.Telepathy.BuddyInfo become all non-None. We start tracking a BuddyInfo when it appears as online in the signal PresenceUpdate of org.freedesktop.Telepathy.Connection.Interface.Presence. | ||
* Future: | * Future: Listen contact list channels (Roster in the future) for the contacts we are subscribed to, and track their presence through the SimplePresence interface. | ||
@dbus.service.signal(PRESENCE_INTERFACE, signature="o") | @dbus.service.signal(PRESENCE_INTERFACE, signature="o") | ||
| Line 40: | Line 47: | ||
* Present: A buddy is known to have disappeared when PresenceUpdate notifies us it has gone offline. | * Present: A buddy is known to have disappeared when PresenceUpdate notifies us it has gone offline. | ||
* Future: | * Future: Same as BuddyAppeared. | ||
@dbus.service.signal(PRESENCE_INTERFACE, signature="oos") | @dbus.service.signal(PRESENCE_INTERFACE, signature="oos") | ||
| Line 50: | Line 57: | ||
* Present: Gets fired when a new channel that communicates with a room becomes ready. | * Present: Gets fired when a new channel that communicates with a room becomes ready. | ||
* Future: | * Future: Should be fired on reception of an incoming channel (TODO: check the API in MC5 for this) | ||
@dbus.service.signal(PRESENCE_INTERFACE, signature="soos") | @dbus.service.signal(PRESENCE_INTERFACE, signature="soos") | ||
| Line 60: | Line 67: | ||
* Present: Gets fired when a new channel that communicates with a contact is created. | * Present: Gets fired when a new channel that communicates with a contact is created. | ||
* Future: | * Future: Should be fired on reception of an incoming channel (TODO: check the API in MC5 for this) | ||
@dbus.service.method(PRESENCE_INTERFACE, in_signature="", out_signature="ao") | @dbus.service.method(PRESENCE_INTERFACE, in_signature="", out_signature="ao") | ||
| Line 98: | Line 105: | ||
pass | pass | ||
* Used by: | * Used by: activities to send invites. | ||
* Present: | * Present: returns one of the tracked buddies, see BuddyAppeared. | ||
* Future: | * Future: | ||
| Line 109: | Line 116: | ||
pass | pass | ||
* Used by: | * Used by: shell to get the buddy that offers/receives a file transfer from its contact handle, activities using SugarTubeConnection | ||
* Present: | * Present: returns one of the tracked buddies, see BuddyAppeared | ||
* Future: | * Future: | ||
| Line 119: | Line 126: | ||
pass | pass | ||
* Used by: shell to represent the buddy icon for the owner | * Used by: shell to represent the buddy icon for the owner, activity to get owner colors for saving to DS | ||
* Present: color, tags and nick are retrieved from GConf, the public key from the owner.key.pub file | * Present: color, tags and nick are retrieved from GConf, the public key from the owner.key.pub file | ||
* Future: | * Future: move this to the shell and keep the personal information in all accounts synchronized through MC5 | ||
@dbus.service.method(PRESENCE_INTERFACE, in_signature="", out_signature="so") | @dbus.service.method(PRESENCE_INTERFACE, in_signature="", out_signature="so") | ||
| Line 129: | Line 136: | ||
pass | pass | ||
* Used by: activities to interact with a connection manager | * Used by: activities to interact with a connection manager, shell to transfer files | ||
* Present: returns the gabble CM if available or the salut one otherwise | * Present: returns the gabble CM if available or the salut one otherwise | ||
* Future: | * Future: shell and activities should know which is the relevant connection for the current context | ||
@dbus.service.method(PRESENCE_INTERFACE, in_signature="sssa{sv}", | @dbus.service.method(PRESENCE_INTERFACE, in_signature="sssa{sv}", | ||
| Line 146: | Line 153: | ||
* Present: requests a room from the CM, then requests a text channel and tubes channel on this room | * Present: requests a room from the CM, then requests a text channel and tubes channel on this room | ||
* Future: | * Future: create a muc tube and publish it to pubsub | ||
@dbus.service.method(PRESENCE_INTERFACE, in_signature="as", out_signature="") | @dbus.service.method(PRESENCE_INTERFACE, in_signature="as", out_signature="") | ||
| Line 156: | Line 163: | ||
* Present: add local friends to the contact list in the server | * Present: add local friends to the contact list in the server | ||
* Future: | * Future: should be the shell process to do what we currently do | ||
@dbus.service.method(PRESENCE_INTERFACE, in_signature="", out_signature="") | @dbus.service.method(PRESENCE_INTERFACE, in_signature="", out_signature="") | ||
| Line 166: | Line 173: | ||
* Present: disconnects the gabble CM and starts it again | * Present: disconnects the gabble CM and starts it again | ||
* Future: | * Future: use the account API in MC5 | ||
== Interface org.laptop.Sugar.Presence.Buddy == | == Interface org.laptop.Sugar.Presence.Buddy == | ||
| Line 175: | Line 181: | ||
pass | pass | ||
* Used by: | * Used by: avatars aren't used in Sugar as-of-yet | ||
* Present: | * Present: fired when the buddy avatars are changed and when the local buddy's avatar is changed | ||
* Future: | * Future: directly use the Avatar interfaces | ||
@dbus.service.signal(_BUDDY_INTERFACE, signature="o") | @dbus.service.signal(_BUDDY_INTERFACE, signature="o") | ||
| Line 185: | Line 191: | ||
pass | pass | ||
* Used by: | * Used by: shell to know when the owner has accepted an invitation | ||
* Present: | * Present: emitted when the buddy joins a valid activity, or an activity the user is in becomes valid | ||
* Future: | * Future: | ||
| Line 195: | Line 201: | ||
pass | pass | ||
* Used by: | * Used by: apparently not used | ||
* Present: | * Present: emitted when the buddy leaves an activity or the activity becomes non-valid | ||
* Future: | * Future: | ||
| Line 205: | Line 211: | ||
pass | pass | ||
* Used by: | * Used by: Shell to update the nick, colors and current activity of other buddies | ||
* Present: | * Present: fired on PropertiesChanged in org.laptop.Telepathy.BuddyInfo | ||
* Future: | * Future: | ||
| Line 215: | Line 221: | ||
pass | pass | ||
* Used by: | * Used by: apparently not used | ||
* Present: | * Present: fired when a contact has come online and for the owner when a CM gets connected | ||
* Future: | * Future: | ||
| Line 225: | Line 231: | ||
pass | pass | ||
* Used by: | * Used by: avatars aren't used as of yet | ||
* Present: | * Present: retrieved from org.freedesktop.Telepathy.Connection.Interface.Avatars with RequestAvatars | ||
* Future: | * Future: | ||
| Line 235: | Line 241: | ||
pass | pass | ||
* Used by: | * Used by: not really used | ||
* Present: | * Present: returns the activities a buddy is participating. This list is maintained via the MembersChanged signal in the org.freedesktop.Telepathy.Channel.Interface.Group interface of the channel associated to each activity. | ||
* Future: | * Future: | ||
| Line 245: | Line 251: | ||
pass | pass | ||
* Used by: | * Used by: shell and activities to represent buddies | ||
* Present: | * Present: returns the cached properties, which are maintained by listening to *Changed signals in org.laptop.Shell.Owner or via PropertiesChanged and GetProperties in BuddyInfo | ||
* Future: | * Future: | ||
| Line 255: | Line 261: | ||
pass | pass | ||
* Used by: | * Used by: shell for starting a file transfer with a buddy, and maybe by activities (couldn't verify) | ||
* Present: | * Present: a dict of contact handles is maintained for each buddy, indexed by CM | ||
* Future: | |||
== Interface org.laptop.Sugar.Presence.Activity == | == Interface org.laptop.Sugar.Presence.Activity == | ||
| Line 268: | Line 273: | ||
pass | pass | ||
* Used by: | * Used by: etoys | ||
* Present: | * Present: we know a buddy has joined either by ActivitiesChanged in BuddyInfo when we aren't in this activity, or by GetAllMembers and MembersChanged in org.freedesktop.Telepathy.Channel.Interface.Group if we are already in. We also emit this signal for each buddy in an activity that has become valid. | ||
* Future: | * Future: BuddyJoined is deprecated by BuddyHandleJoined | ||
@dbus.service.signal(_ACTIVITY_INTERFACE, signature="ou") | @dbus.service.signal(_ACTIVITY_INTERFACE, signature="ou") | ||
| Line 278: | Line 283: | ||
pass | pass | ||
* Used by: | * Used by: shell to keep updated the friends tray, and activities to notify that one more buddy has joined | ||
* Present: | * Present: see BuddyJoined for current implementation | ||
* Future: | * Future: | ||
| Line 288: | Line 293: | ||
pass | pass | ||
* Used by: | * Used by: shell to keep updated the friends tray, and activities to notify that one more buddy has joined | ||
* Present: | * Present: we know a buddy has left either by ActivitiesChanged in BuddyInfo when we aren't in this activity, or by GetAllMembers and MembersChanged in org.freedesktop.Telepathy.Channel.Interface.Group if we are already in. We also emit this signal for each buddy in an activity that has become valid. | ||
* Future: | * Future: | ||
| Line 298: | Line 303: | ||
pass | pass | ||
* Used by: | * Used by: shell to display shared activities | ||
* Present: | * Present: fired when ActivityPropertiesChanged in org.laptop.Telepathy.ActivityProperties is fired. | ||
* Future: | * Future: | ||
| Line 308: | Line 313: | ||
pass | pass | ||
* Used by: | * Used by: couldn't find any use of it | ||
* Present: | * Present: fired when the text and tubes channels get created | ||
* Future: | * Future: drop it? | ||
@dbus.service.method(_ACTIVITY_INTERFACE, in_signature="", out_signature="a{sv}") | @dbus.service.method(_ACTIVITY_INTERFACE, in_signature="", out_signature="a{sv}") | ||
| Line 318: | Line 323: | ||
pass | pass | ||
* Used by: | * Used by: shell to display shared activities | ||
* Present: | * Present: returns the cached properties, which are updated by SetProperties for local activities, or by ActivityPropertiesChanged and GetProperties from org.laptop.Telepathy.ActivityProperties | ||
* Future: | * Future: | ||
| Line 328: | Line 333: | ||
pass | pass | ||
* Used by: | * Used by: not used | ||
* Present: | * Present: returns cached property | ||
* Future: | * Future: drop? | ||
@dbus.service.method(_ACTIVITY_INTERFACE, in_signature="", out_signature="s") | @dbus.service.method(_ACTIVITY_INTERFACE, in_signature="", out_signature="s") | ||
| Line 338: | Line 343: | ||
pass | pass | ||
* Used by: | * Used by: not used | ||
* Present: | * Present: returns cached property | ||
* Future: | * Future: drop? | ||
@dbus.service.method(_ACTIVITY_INTERFACE, in_signature="", out_signature="s") | @dbus.service.method(_ACTIVITY_INTERFACE, in_signature="", out_signature="s") | ||
| Line 348: | Line 353: | ||
pass | pass | ||
* Used by: | * Used by: not used | ||
* Present: | * Present: returns cached property | ||
* Future: | * Future: drop? | ||
@dbus.service.method(_ACTIVITY_INTERFACE, | @dbus.service.method(_ACTIVITY_INTERFACE, | ||
| Line 360: | Line 365: | ||
pass | pass | ||
* Used by: | * Used by: activities when the shell calls the Invite method in org.laptop.Activity | ||
* Present: | * Present: calls AddMembers on the text channel for this buddy | ||
* Future: | * Future: | ||
| Line 373: | Line 378: | ||
pass | pass | ||
* Used by: | * Used by: activities on resume to join an existing instance | ||
* Present: | * Present: Create a room (if the activity is local), request a text and a tubes channels, then join the room with AddMembers | ||
* Future: | * Future: | ||
| Line 385: | Line 390: | ||
pass | pass | ||
* Used by: | * Used by: activities when stopping | ||
* Present: | * Present: closes the text channel, updates the buddies in the activity. | ||
* Future: | * Future: | ||
| Line 395: | Line 400: | ||
pass | pass | ||
* Used by: | * Used by: shell for the friends tray, activities t know who is in the activity when it is joined | ||
* Present: | * Present: returns cached list of buddies in the activity, see BuddyJoined for how this list is maintained | ||
* Future: | * Future: | ||
| Line 405: | Line 410: | ||
pass | pass | ||
* Used by: | * Used by: activities to get a handle to the text and tubes channels. | ||
* Present: | * Present: returns the text and tubes channels created when the activity was shared or joined. | ||
* Future: | * Future: | ||
| Line 415: | Line 420: | ||
pass | pass | ||
* Used by: | * Used by: python activities when joining an existing activity | ||
* Present: | * Present: same as GetChannels but with more useful info to reduce roundtrips | ||
* Future: | * Future: | ||
| Line 425: | Line 430: | ||
pass | pass | ||
* Used by: | * Used by: local activities to set name, color, tags, etc | ||
* Present: | * Present: calls SetProperties from org.laptop.Telepathy.ActivityProperties | ||
* Future: | * Future: | ||
| Line 435: | Line 440: | ||
pass | pass | ||
* Used by: | * Used by: not used | ||
* Present: | * Present: returns cached property | ||
* Future: | * Future: drop? | ||