sugar3.presence.activity module

UI interface to an activity in the presence service

STABLE.

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.

Properties:
id color name type joined
do_get_property(pspec)

Retrieve a particular property from our property dictionary

do_set_property(pspec, val)

Set a particular property in our property dictionary

get_buddy_by_handle(handle)

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.

get_channels()

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
get_joined_buddies()

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()

Join this activity.

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

leave()

Leave this shared activity

object_path()

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)

Previous topic

sugar3.presence package

Next topic

sugar3.presence.buddy module

This Page