sugar4.presence.presenceservice

STABLE.

Attributes

ACCOUNT_MANAGER_SERVICE

ACCOUNT_MANAGER_PATH

ACCOUNT_MANAGER

ACCOUNT

HANDLE_TYPE_CONTACT

CONNECTION

CONN_INTERFACE_ACTIVITY_PROPERTIES

Classes

PresenceService

Provides simplified access to the Telepathy framework to activities

Functions

get_instance([allow_offline_iface])

Retrieve this process' view of the PresenceService

Module Contents

sugar4.presence.presenceservice.ACCOUNT_MANAGER_SERVICE[source]
sugar4.presence.presenceservice.ACCOUNT_MANAGER_PATH[source]
sugar4.presence.presenceservice.ACCOUNT_MANAGER[source]
sugar4.presence.presenceservice.ACCOUNT[source]
sugar4.presence.presenceservice.HANDLE_TYPE_CONTACT[source]
sugar4.presence.presenceservice.CONNECTION[source]
sugar4.presence.presenceservice.CONN_INTERFACE_ACTIVITY_PROPERTIES = 'org.laptop.Telepathy.ActivityProperties'[source]
class sugar4.presence.presenceservice.PresenceService[source]

Bases: gi.repository.GObject.GObject

Provides simplified access to the Telepathy framework to activities

Initialise the service and attempt to connect to events

__gsignals__[source]
get_activity(activity_id, warn_if_none=True)[source]

Retrieve single Activity object for the given unique id

activity_id – unique ID for the activity

returns single Activity object or None if the activity

is not found using GetActivityById on the service

get_activity_by_handle(connection_path, room_handle)[source]
get_buddy(account_path, contact_id)[source]
get_buddy_by_telepathy_handle(tp_conn_name, tp_conn_path, handle)[source]

Retrieve single Buddy object for the given public key

Parameters:
tp_conn_namestr

The well-known bus name of a Telepathy connection

tp_conn_pathdbus.ObjectPath

The object path of the Telepathy connection

handleint or long

The handle of a Telepathy contact on that connection, of type HANDLE_TYPE_CONTACT. This may not be a channel-specific handle.

Returns:

the Buddy object, or None if the buddy is not found

get_owner()[source]

Retrieves the laptop Buddy object.

share_activity(activity, properties=None, private=True)[source]
get_preferred_connection()[source]

Gets the preferred telepathy connection object that an activity should use when talking directly to telepathy

returns the bus name and the object path of the Telepathy connection

abstractmethod get(object_path)[source]
abstractmethod get_activities()[source]
abstractmethod get_activities_async(reply_handler=None, error_handler=None)[source]
abstractmethod get_buddies()[source]
abstractmethod get_buddies_async(reply_handler=None, error_handler=None)[source]
sugar4.presence.presenceservice.get_instance(allow_offline_iface=False)[source]

Retrieve this process’ view of the PresenceService