sugar4.presence.activity

UI interface to an activity in the presence service

STABLE.

Attributes

CHANNEL

CHANNEL_INTERFACE_GROUP

CONN_INTERFACE_ROOM_CONFIG

CHANNEL_TYPE_TUBES

CHANNEL_TYPE_TEXT

CONNECTION

PROPERTIES_INTERFACE

CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES

HANDLE_TYPE_CONTACT

HANDLE_TYPE_ROOM

PROPERTY_FLAG_WRITE

CONN_INTERFACE_ACTIVITY_PROPERTIES

CONN_INTERFACE_BUDDY_INFO

Classes

Activity

UI interface for an Activity in the presence service

Module Contents

sugar4.presence.activity.CHANNEL[source]
sugar4.presence.activity.CHANNEL_INTERFACE_GROUP[source]
sugar4.presence.activity.CONN_INTERFACE_ROOM_CONFIG[source]
sugar4.presence.activity.CHANNEL_TYPE_TUBES[source]
sugar4.presence.activity.CHANNEL_TYPE_TEXT[source]
sugar4.presence.activity.CONNECTION[source]
sugar4.presence.activity.PROPERTIES_INTERFACE[source]
sugar4.presence.activity.CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES[source]
sugar4.presence.activity.HANDLE_TYPE_CONTACT[source]
sugar4.presence.activity.HANDLE_TYPE_ROOM[source]
sugar4.presence.activity.PROPERTY_FLAG_WRITE[source]
sugar4.presence.activity.CONN_INTERFACE_ACTIVITY_PROPERTIES = 'org.laptop.Telepathy.ActivityProperties'[source]
sugar4.presence.activity.CONN_INTERFACE_BUDDY_INFO = 'org.laptop.Telepathy.BuddyInfo'[source]
class sugar4.presence.activity.Activity(account_path, connection, room_handle=None, properties=None)[source]

Bases: gi.repository.GObject.GObject

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

__gsignals__[source]
__gproperties__[source]
telepathy_conn[source]
telepathy_text_chan = None[source]
telepathy_tubes_chan = None[source]
room_handle = None[source]
object_path()[source]

Get our dbus object path

do_get_property(pspec)[source]

Retrieve a particular property from our property dictionary

do_set_property(pspec, val)[source]

Set a particular property in our property dictionary

set_private(val, reply_handler, error_handler)[source]
get_joined_buddies()[source]

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.

get_buddy_by_handle(handle)[source]

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.

invite(buddy, message, response_cb)[source]

Invite the given buddy to join this activity.

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

abstractmethod set_up_tubes(reply_handler, error_handler)[source]
join()[source]

Join this activity.

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

share(share_activity_cb, share_activity_error_cb)[source]
get_channels()[source]

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

leave()[source]

Leave this shared activity