Salut-specific extensions to the Telepathy interfaces

Copyright (C) 2007 Collabora Limited

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Interfaces

org.laptop.Telepathy.BuddyInfo

Implementations of this interface must also implement:

An interface on connections to associate OLPC buddy information with contacts, providing methods for the user to set their own information and retrieve information of contacts. The user is automatically notified when information of contacts that are in his 'subscribe' contact list change.

The following types and names are used to request and set information (except for activities):

s:color
The color name of the buddy. Format used is #RRGGBB,#RRGGBB (stroke,fill).
ay:key
The public key of the buddy.
s:jid
For link-local connections, the JID of the buddy's server account.

Activities are represented by a struct containing:

Methods:

SetProperties ( a{sv}: properties ) → nothing

Set the information of the local user for this connection.

This method may be called before Connect(), in which case the given properties will be advertised as soon as possible after connection (possibly immediately).

Parameters

properties - a{sv}
A dictionary mapping information names to the desired values. This replaces any existing buddy properties completely: any keys which were previously present, but are not present in this dictionary, are deleted.

Possible errors

org.freedesktop.Telepathy.Error.InvalidArgument
(Undocumented.)

GetProperties ( u: contact ) → a{sv}

Get the properties of a particular contact.

Parameters

contact - u
An integer handle for the contact to request his properties for

Returns

properties - a{sv}
A dictionary mapping information names to their values

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
(Undocumented.)
org.freedesktop.Telepathy.Error.InvalidArgument
(Undocumented.)

SetActivities ( a(su): activities ) → nothing

Set the activities of the local user for this connection.

Parameters

activities - a(su)
An array of structs containing:

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
(Undocumented.)
org.freedesktop.Telepathy.Error.InvalidArgument
(Undocumented.)

AddActivity ( s: id, u: handle ) → nothing

Advertise an activity associated to a muc room
Once an activity shares itself, needs to be advertised if it's not private. SetActivities could be used for this but it would mean that the activity would need to call GetActivities then add itself.

Parameters

id - s
An activity id
handle - u
A room handle

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
(Undocumented.)
org.freedesktop.Telepathy.Error.InvalidArgument
(Undocumented.)

GetActivities ( u: contact ) → a(su)

Get the activities of a particular contact.

Parameters

contact - u
An integer handle for the contact whose activities are to be returned

Returns

activities - a(su)
An array of structs containing:

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
(Undocumented.)
org.freedesktop.Telepathy.Error.InvalidArgument
(Undocumented.)

SetCurrentActivity ( s: activity, u: channel ) → nothing

Set the current activity of the local user for this connection.

Parameters

activity - s
The identifier of the activity, or the empty string if there is no current activity
channel - u
The room handle of the activity channel, or 0 if there is no current activity

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
(Undocumented.)
org.freedesktop.Telepathy.Error.InvalidArgument
(Undocumented.)

GetCurrentActivity ( u: contact ) → s, u

Get the current activity of a particular contact.

Parameters

contact - u
An integer handle for the contact whose current activity is to be returned

Returns

activity - s
The identifier of the activity, or "" if there is no current activity
channel - u
The room handle of the activity, or 0 if there is no current activity

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
(Undocumented.)
org.freedesktop.Telepathy.Error.InvalidArgument
(Undocumented.)

Signals:

PropertiesChanged ( u: contact, a{sv}: properties )

Signal emitted when the properties of a contact from your 'subscribe' contact list are changed.

Parameters

contact - u
An integer handle representing the contact
properties - a{sv}
A dictionary mapping information names to their new values

ActivitiesChanged ( u: contact, a(su): activities )

Signal emitted when the activities of a contact from your 'subscribe' contact list are changed.

Parameters

contact - u
An integer handle representing the contact
activities - a(su)
An array of structs containing:

CurrentActivityChanged ( u: contact, s: activity, u: channel )

Signal emitted when the current activity of a contact from your 'subscribe' contact list is changed.

Parameters

contact - u
An integer handle representing the contact
activity - s
The identifier of the activity, or "" if there is no current activity
channel - u
The room handle of the activity channel, or 0 if there is no current activity

Interface has no Telepathy properties.

Interface has no D-Bus core properties.

org.laptop.Telepathy.ActivityProperties

Implementations of this interface must also implement:

An interface on connections to associate OLPC activity properties with rooms.

The following types and names are used to request and set properties:

s:color
The color of the activity. Format used is #RRGGBB,#RRGGBB (stroke,fill).
s:name
The name of the activity.
s:type
The type of the activity.

Methods:

SetProperties ( u: room, a{sv}: properties ) → nothing

Set the properties of the activity associated to the given room for this connection. You have to be the owner of this activity.

Parameters

room - u
An integer handle representing the room of the activity
properties - a{sv}
A dictionary mapping properties names to the desired values

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
(Undocumented.)
org.freedesktop.Telepathy.Error.InvalidArgument
(Undocumented.)
org.freedesktop.Telepathy.Error.PermissionDenied
(Undocumented.)

GetProperties ( u: room ) → a{sv}

Get the properties of a particular activity.

Parameters

room - u
An integer handle for the activity's room to request his properties for

Returns

properties - a{sv}
A dictionary mapping properties names to their values

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
(Undocumented.)
org.freedesktop.Telepathy.Error.InvalidArgument
(Undocumented.)

GetActivity ( s: activity_id ) → u

Returns the handle of the room associated with this activity
When an activity starts up, it knows its activity_id but doesn't know yet if it's shared or not, much less the room.

Parameters

activity_id - s
An activity id

Returns

room - u
A room handle

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
(Undocumented.)
org.freedesktop.Telepathy.Error.InvalidArgument
(Undocumented.)

Signals:

ActivityPropertiesChanged ( u: room, a{sv}: properties )

Signal emitted when the properties of an activity are changed.

Parameters

room - u
An integer handle representing the room of the activity
properties - a{sv}
A dictionary mapping properties names to their new values

Interface has no Telepathy properties.

Interface has no D-Bus core properties.

org.freedesktop.Telepathy.Connection.Interface.ContactCapabilities.DRAFT

Implementations of this interface must also implement:

Contact capabilities describe the channel classes which may be created with a given contact in advance of attempting to create a channel. Each capability represents a commitment by the connection manager that it will ordinarily be able to create a channel with a contact when given a request with the properties defined by the channel class.

Capabilities pertain to particular contact handles, and represent activities such as having a text chat, a voice call with the user or a stream tube of a defined type.

This interface also enables user interfaces to notify the connection manager what capabilities to advertise for the user to other contacts. This is done by using the SetSelfCapabilities method, and deals with channel property values pertaining to them which are implemented by available client processes.

Methods:

SetSelfCapabilities ( aa{sv}: caps ) → nothing

Used by user interfaces to indicate which channel classes they are able to handle on this connection. It replaces the previous advertised channel classes by the set given as parameter.

If a channel class is unknown by the connection manager, it is just ignored. No error are returned in this case, and other known channel class are added.

Upon a successful invocation of this method, the ContactCapabilitiesChanged signal will only be emitted for the user's own handle (as returned by GetSelfHandle) by the connection manager if, in the given protocol, the given capabilities are distinct from the previous state.

The connection manager will essentially intersect the provided capabilities and the channel classes it implements. Therefore, certain properties which are never fixed for a channel class (such as the target handle, or the Parameters property of a tube channel) will almost certainly not be advertised.

Parameters

caps - aa{sv} (String_Variant_Map[])
An array of channel classes to replace to the list of what the connection can handle. If you include optional properties, they may not get advertised. The given properties are matched to the mandatory properties.

Possible errors

org.freedesktop.Telepathy.Error.NetworkError
(Undocumented.)
org.freedesktop.Telepathy.Error.Disconnected
(Undocumented.)

GetContactCapabilities ( au: handles ) → a{ua(a{sv}as)}

Returns an array of enhanced capabilities for the given contact handles.

Parameters

handles - au (Contact_Handle[])

An array of contact handles for this connection.

The handle zero MUST NOT be included in the request.

Returns

a{ua(a{sv}as)} (Contact_Capabilities_Map)
An array of structures containing:
  • a dictionary mapping the channel properties to their values.
  • an array of additional allowed properties

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
(Undocumented.)
org.freedesktop.Telepathy.Error.InvalidHandle
The handle does not represent a contact. Zero is always invalid.

Signals:

ContactCapabilitiesChanged ( a{ua(a{sv}as)}: caps )

Announce that there has been a change of capabilities on the given handles. A single signal can be emitted for several contacts.

The underlying protocol can get several contacts' capabilities at the same time.

Parameters

caps - a{ua(a{sv}as)} (Contact_Capabilities_Map)
All the capabilities of the contacts

Interface has no Telepathy properties.

Interface has no D-Bus core properties.

Mapping types

Contact_Capabilities_Map - a{ u: Key → a(a{sv}as): Value }

A mapping from contact handle to their capabilities.

In bindings that need a separate name, arrays of Contact_Capabilities_Map should be called Contact_Capabilities_Map_List.

Members

Key - u (Contact_Handle)
A contact handle.
Value - a(a{sv}as) (Requestable_Channel_Class[])
The contact capabilities.

Generic types

Simple types

DBus_Unique_Name - s

Types defined elsewhere

Contact_Handle - u
Defined by: Telepathy specification
Socket_Address_Type - u
Defined by: Telepathy specification
DBus_Interface - s
Defined by: Telepathy specification
DBus_Error_Name - s
Defined by: Telepathy specification
Socket_Access_Control - u
Defined by: Telepathy specification
DBus_Qualified_Member - s
Defined by: Telepathy specification
Qualified_Property_Value_Map - a{sv}
Defined by: Telepathy specification
String_Variant_Map - a{sv}
Defined by: Telepathy specification
Unix_Timestamp64 - t
Defined by: Telepathy specification
Requestable_Channel_Class - a(a{sv}as)
Defined by: Telepathy specification
Channel_Class - a{sv}
Defined by: Telepathy specification
DBus_Tube_Member - (us)
Defined by: Telepathy specification
Supported_Socket_Map - a{uau}
Defined by: Telepathy specification
Unix_Timestamp64 - t
Defined by: Telepathy specification

Index

Index of interfaces

Index of types