Sugar presence refactor

From OLPC
Revision as of 11:23, 6 June 2006 by DanWilliams (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Capabilities

Sugar's presence service should provide the following information to Activities:

  • A list of Buddies Sugar knows about
  • Which network-aware Activities each buddy makes available (ie, ZeroConf "services"):
    • chat
    • VOIP
    • wiki

The presence service should handle all details of gathering buddy presence information, and allow individual Activities to access that information through a fairly simple, straightforward API layered on top of Avahi and dbus.

It should also provide the means by which Activities advertise their presence to other laptops.

Structure

For the moment, the presence service will be a python module that is private to each Activity. In the future it will likely be a dbus service merged into the shell. Only one presence service object will be initialized in any given Activity through use of singletons.

The presence service will provide a few objects:

  • PresenceService: singleton object providing an interface to the presence service. Responds to Activity request for buddies and groups based on specified criteria. For example, an Activity could request a list of every Buddy available to chat with, or a group called "HistoryClass".
  • Buddy: each buddy object represents a distinct child using a laptop. In reality, it encapsulates information about a specific Sugar instance running on a laptop. The Buddy object will provide access to a list of Activities the Buddy makes available to others.
  • Group: a group encapsulates one or more Buddies that are interested in the same resource. For example, a Group might have the title "History Class", reference a shared document called "HistoryClassHomepage", and include all children in the history class. Groups are not concretely or centrally defined, they are merely the aggregation of everyone who expresses interest in the group.