sugar3.presence.activity module

UI interface to an activity in the presence service


class sugar3.presence.activity.Activity(account_path, connection, room_handle=None, properties=None)

Bases: gi.overrides.GObject.Object

UI interface for an Activity in the presence service

Activities in the presence service represent your and other user’s shared activities.


id color name type joined


Retrieve a particular property from our property dictionary

do_set_property(pspec, val)

Set a particular property in our property dictionary


Retrieve the Buddy object given a telepathy handle.

buddy object paths are cached in self._handle_to_buddy_path, so we can get the buddy without calling PS.


Retrieve communications channel descriptions for the activity

Returns a tuple containing:
  • the D-Bus well-known service name of the connection (FIXME: this is redundant; in Telepathy it can be derived from that of the connection)

  • the D-Bus object path of the connection

  • a list of D-Bus object paths representing the channels associated with this activity


Retrieve the set of Buddy objects attached to this activity

returns list of presence Buddy objects that we can successfully create from the buddy object paths that PS has for this activity.

invite(buddy, message, response_cb)

Invite the given buddy to join this activity.

The callback will be called with one parameter: None on success, or an exception on failure.


Join this activity.

Emits ‘joined’ and otherwise does nothing if we’re already joined.


Leave this shared activity


Get our dbus object path

set_private(val, reply_handler, error_handler)
set_up_tubes(reply_handler, error_handler)
share(share_activity_cb, share_activity_error_cb)