Difference between revisions of "Development Team/Presence Service Removal"

From Sugar Labs
Jump to navigation Jump to search
Line 54: Line 54:
 
     pass
 
     pass
  
* Used by:  
+
* Used by: Shell to display an invitation from a non-Sugar XMPP client
  
 
* 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.
Line 60: Line 60:
 
* Future:  
 
* Future:  
  
  @dbus.service.method(PRESENCE_INTERFACE, in_signature="",
+
  @dbus.service.method(PRESENCE_INTERFACE, in_signature="", out_signature="ao")
                        out_signature="ao")
 
 
  def GetActivities(self):
 
  def GetActivities(self):
 
     pass
 
     pass
  
* Used by:  
+
* Used by: Shell to display shared activities
  
* Present:  
+
* Present: Returns a list of activities cached locally, this list is kept up to date by listening to ActivitiesChanged in org.laptop.Telepathy.BuddyInfo.
  
 
* Future:  
 
* Future:  
  
  @dbus.service.method(PRESENCE_INTERFACE, in_signature="s",
+
  @dbus.service.method(PRESENCE_INTERFACE, in_signature="s", out_signature="o")
                        out_signature="o")
 
 
  def GetActivityById(self, actid):
 
  def GetActivityById(self, actid):
 
     pass
 
     pass
  
* Used by:  
+
* Used by: at activity startup to know whether this is a shared instance.
  
* Present:  
+
* Present: Returns the activity identified by actid from the list mentioned in GetActivities.
  
 
* Future:  
 
* Future:  
Line 97: Line 95:
 
  def GetBuddyByPublicKey(self, key):
 
  def GetBuddyByPublicKey(self, key):
 
     pass
 
     pass
 +
 +
* Used by:
 +
 +
* Present:
 +
 +
* Future:
  
 
  @dbus.service.method(PRESENCE_INTERFACE, in_signature="sou",
 
  @dbus.service.method(PRESENCE_INTERFACE, in_signature="sou",
Line 102: Line 106:
 
  def GetBuddyByTelepathyHandle(self, tp_conn_name, tp_conn_path, handle):
 
  def GetBuddyByTelepathyHandle(self, tp_conn_name, tp_conn_path, handle):
 
     pass
 
     pass
 +
 +
* Used by:
 +
 +
* Present:
 +
 +
* Future:
  
 
  @dbus.service.method(PRESENCE_INTERFACE, in_signature="", out_signature="o")
 
  @dbus.service.method(PRESENCE_INTERFACE, in_signature="", out_signature="o")
 
  def GetOwner(self):
 
  def GetOwner(self):
 
     pass
 
     pass
 +
 +
* Used by:
 +
 +
* Present:
 +
 +
* Future:
  
 
  @dbus.service.method(PRESENCE_INTERFACE, in_signature="", out_signature="so")
 
  @dbus.service.method(PRESENCE_INTERFACE, in_signature="", out_signature="so")
 
  def GetPreferredConnection(self):
 
  def GetPreferredConnection(self):
 
     pass
 
     pass
 +
 +
* Used by:
 +
 +
* Present:
 +
 +
* Future:
  
 
  @dbus.service.method(PRESENCE_INTERFACE, in_signature="sssa{sv}",
 
  @dbus.service.method(PRESENCE_INTERFACE, in_signature="sssa{sv}",
Line 117: Line 139:
 
                     async_err_cb, sender):
 
                     async_err_cb, sender):
 
     pass
 
     pass
 +
 +
* Used by:
 +
 +
* Present:
 +
 +
* Future:
  
 
  @dbus.service.method(PRESENCE_INTERFACE, in_signature="as", out_signature="")
 
  @dbus.service.method(PRESENCE_INTERFACE, in_signature="as", out_signature="")
 
  def SyncFriends(self, keys):
 
  def SyncFriends(self, keys):
 
     pass
 
     pass
 +
 +
* Used by:
 +
 +
* Present:
 +
 +
* Future:
  
 
  @dbus.service.method(PRESENCE_INTERFACE, in_signature="", out_signature="")
 
  @dbus.service.method(PRESENCE_INTERFACE, in_signature="", out_signature="")
 
  def RestartServerConnection(self):
 
  def RestartServerConnection(self):
 
     pass
 
     pass
 +
 +
* Used by:
 +
 +
* Present:
 +
 +
* Future:

Revision as of 10:03, 6 March 2010

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.

@dbus.service.signal(PRESENCE_INTERFACE, signature="o")
def ActivityAppeared(self, activity):
    pass
  • Used by: Shell to display activities in the neighborhood and friends views
  • Present: Is fired when the properties contained in org.laptop.Telepathy.ActivityProperties become all non-None. We start tracking an ActivityProperties when a Buddy we track joins/shares an activity, and we know that via the ActivitiesChanged signal in the interface org.laptop.Telepathy.BuddyInfo.
  • Future:
@dbus.service.signal(PRESENCE_INTERFACE, signature="o")
def ActivityDisappeared(self, activity):
    pass
  • 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.
  • Future:
@dbus.service.signal(PRESENCE_INTERFACE, signature="o")
def BuddyAppeared(self, buddy):
    pass
  • Used by: Shell to display buddies in the neighborhood and friends views
  • 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 (which is deprecated).
  • Future:
@dbus.service.signal(PRESENCE_INTERFACE, signature="o")
def BuddyDisappeared(self, buddy):
  • Used by: Shell to display buddies in the neighborhood and friends views
  • Present: A buddy is known to have disappeared when PresenceUpdate notifies us it has gone offline.
  • Future:
@dbus.service.signal(PRESENCE_INTERFACE, signature="oos")
def ActivityInvitation(self, activity, buddy, message):
    pass
  • Used by: Shell to display a new invitation in the frame
  • Present: Gets fired when a new channel that communicates with a room becomes ready.
  • Future:
@dbus.service.signal(PRESENCE_INTERFACE, signature="soos")
def PrivateInvitation(self, bus_name, connection, channel, chan_type):
    pass
  • Used by: Shell to display an invitation from a non-Sugar XMPP client
  • Present: Gets fired when a new channel that communicates with a contact is created.
  • Future:
@dbus.service.method(PRESENCE_INTERFACE, in_signature="", out_signature="ao")
def GetActivities(self):
    pass
  • Used by: Shell to display shared activities
  • Present: Returns a list of activities cached locally, this list is kept up to date by listening to ActivitiesChanged in org.laptop.Telepathy.BuddyInfo.
  • Future:
@dbus.service.method(PRESENCE_INTERFACE, in_signature="s", out_signature="o")
def GetActivityById(self, actid):
    pass
  • Used by: at activity startup to know whether this is a shared instance.
  • Present: Returns the activity identified by actid from the list mentioned in GetActivities.
  • Future:
@dbus.service.method(PRESENCE_INTERFACE, in_signature="",
                        out_signature="ao")
def GetBuddies(self):
    pass
  • Used by:
  • Present:
  • Future:
@dbus.service.method(PRESENCE_INTERFACE, in_signature="ay", out_signature="o",
                        byte_arrays=True)
def GetBuddyByPublicKey(self, key):
    pass
  • Used by:
  • Present:
  • Future:
@dbus.service.method(PRESENCE_INTERFACE, in_signature="sou",
                        out_signature="o")
def GetBuddyByTelepathyHandle(self, tp_conn_name, tp_conn_path, handle):
    pass
  • Used by:
  • Present:
  • Future:
@dbus.service.method(PRESENCE_INTERFACE, in_signature="", out_signature="o")
def GetOwner(self):
    pass
  • Used by:
  • Present:
  • Future:
@dbus.service.method(PRESENCE_INTERFACE, in_signature="", out_signature="so")
def GetPreferredConnection(self):
    pass
  • Used by:
  • Present:
  • Future:
@dbus.service.method(PRESENCE_INTERFACE, in_signature="sssa{sv}",
        out_signature="o", async_callbacks=("async_cb", "async_err_cb"),
        sender_keyword="sender")
def ShareActivity(self, actid, atype, name, properties, async_cb,
                    async_err_cb, sender):
    pass
  • Used by:
  • Present:
  • Future:
@dbus.service.method(PRESENCE_INTERFACE, in_signature="as", out_signature="")
def SyncFriends(self, keys):
    pass
  • Used by:
  • Present:
  • Future:
@dbus.service.method(PRESENCE_INTERFACE, in_signature="", out_signature="")
def RestartServerConnection(self):
    pass
  • Used by:
  • Present:
  • Future: