Telepathy D-Bus Interface Specification

Version 0.17.7

Copyright (C) 2005-2008 Collabora Limited
Copyright (C) 2005-2008 Nokia Corporation
Copyright (C) 2006 INdT

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 Street, Fifth Floor, Boston, MA 02110-1301, USA.

Interfaces

org.freedesktop.Telepathy.ConnectionManager

A D-Bus service which allows connections to be created. The manager processes are intended to be started by D-Bus service activation.

For service discovery, each Telepathy connection manager must have a connection manager name (see Connection_Manager_Name for syntax).

The connection manager must then provide a well-known bus name of org.freedesktop.Telepathy.ConnectionManager.cmname where cmname is its connection manager name. If it makes sense to start the connection manager using D-Bus service activation, it must register that well-known name for service activation by installing a .service file.

Clients can list the running connection managers by calling the ListNames method on the D-Bus daemon's org.freedesktop.DBus interface and looking for names matching the above pattern; they can list the activatable connection managers by calling ListActivatableNames, and they should usually combine the two lists to get a complete list of running or activatable connection managers.

When the connection manager is running, it must have an object implementing the ConnectionManager interface at the object path /org/freedesktop/Telepathy/ConnectionManager/cmname.

Connection managers' capabilities can be determined dynamically by calling their ListProtocols method, then for each protocol of interest, calling GetParameters to discover the required and optional parameters. However, since it is inefficient to activate all possible connection managers on the system just to find out what they can do, there is a standard mechanism to store static information about CMs in ".manager files".

To look up a connection manager's supported protocols, clients should search the data directories specified by the freedesktop.org XDG Base Directory Specification ($XDG_DATA_HOME, defaulting to $HOME/.local/share if unset, followed by colon-separated paths from $XDG_DATA_DIRS, defaulting to /usr/local/share:/usr/share if unset) for the first file named telepathy/managers/cmname.manager that can be read without error. This file has the same syntax as a freedesktop.org Desktop Entry file.

Clients must still support connection managers for which no .manager file can be found, which they can do by activating the connection manager and calling its methods; the .manager file is merely an optimization. Connection managers whose list of protocols can change at any time (for instance, via a plugin architecture) should not install a .manager file.

For each protocol name proto that would be returned by ListProtocols, the .manager file contains a group headed [Protocol proto]. For each parameter p that would be returned by GetParameters(proto), the .manager file contains a key param-p with a value consisting of a D-Bus signature (a single complete type), optionally followed by a space and a space-separated list of flags. The supported flags are:

The group may also contain a key default-p whose value is a string form of the default value for the parameter. If this key exists, it sets the default, and also sets the flag Conn_Mgr_Param_Flag_Has_Default. The default value is formatted according to the D-Bus signature as follows:

s (string)
The UTF-8 string
o (object path)
The object path as an ASCII string
b (boolean)
"true" (case-insensitively) or "1" means True, "false" (case-insensitively) or "0" means False
q, u, t (16-, 32-, 64-bit unsigned integer)
ASCII decimal integer
n, i, x (16-, 32-, 64-bit signed integer)
ASCII decimal integer, optionally prefixed with "-"
d (double-precision floating point)
ASCII decimal number

Currently, no other D-Bus signatures are allowed to have default values, but clients parsing the .manager file MUST ignore defaults that they cannot parse, and treat them as if the default-p key was not present at all.

It is not required that a connection manager be able to support multiple protocols, or even multiple connections. When a connection is made, a service name where the connection object can be found is returned. A manager which can only make one connection may then remove itself from its well-known bus name, causing a new connection manager to be activated when somebody attempts to make a new connection.

Changed in version 0.17.2: Prior to version 0.17.2, support for CMs with no .manager file was not explicitly required.

Methods:

GetParameters ( s: proto ) → a(susv)

Get a list of the parameters which must or may be provided to the RequestConnection method when connecting to the given protocol, or registering (the boolean "register" parameter is available, and set to true).

Parameters

proto - s(Protocol)
The required protocol name

Returns

a(susv)(Param_Spec[])
An array of structs representing possible parameters.

Possible errors

org.freedesktop.Telepathy.Error.NotImplemented
Raised when the requested method, channel, etc is not available on this connection. (generic description)

ListProtocols ( ) → as

Get a list of protocol identifiers that are implemented by this connection manager.

Returns

as(Protocol[])
A array of string protocol identifiers supported by this manager

RequestConnection ( s: proto, a{sv}: parameters ) → s, o

Request a Connection object representing a given account on a given protocol with the given parameters. The method returns the bus name and the object path where the new Connection object can be found, which should have the status of Connection_Status_Disconnected, to allow signal handlers to be attached before connecting is started with the Connect method.

In order to allow Connection objects to be discovered by new clients, the object path and well-known bus name must be of the form /org/freedesktop/Telepathy/Connection/cmname/proto/account and org.freedesktop.Telepathy.Connection.cmname.proto.account where:

Clients MUST NOT attempt to parse the account part of the bus name. Connection managers MAY use any unique string for this part.

The parameters which must and may be provided in the parameters dictionary can be discovered with the GetParameters method. These parameters, their types, and their default values may be cached in files so that all available connection managers do not need to be started to discover which protocols are available.

To request values for these parameters from the user, a client must have prior knowledge of the meaning of the parameter names, so the following well-known names and types should be used where appropriate:

s:account
The identifier for the user's account on the server
s:server
A fully qualified domain name or numeric IPv4 or IPv6 address. Using the fully-qualified domain name form is recommended whenever possible. If this parameter is specified and the account for that protocol also specifies a server, this parameter should override that in the user id.
q:port
A TCP or UDP port number. If this parameter is specified and the account for that protocol also specifies a port, this parameter should override that in the account.
s:password
A password associated with the account.
b:require-encryption
Require encryption for this connection. A connection should fail to connect if require-encryption is set and an encrypted connection is not possible.
b:register
This account should be created on the server if it does not already exist.
s:ident
The local username to report to the server if necessary, such as in IRC.
s:fullname
The user's full name if the service requires this when authenticating or registering.
s:stun-server
The IP address or FQDN of a STUN server to use for NAT traversal, without any ":port" suffix.
q:stun-port
The UDP port number on the stun-server to use for STUN. Only significant if the stun-server is also supplied.

Every successful RequestConnection call will cause the emission of a NewConnection signal for the same newly created connection. The requester can use the returned object path and service name independently of the emission of that signal. In that case this signal emission is most useful for, e.g. other processes that are monitoring the creation of new connections.

Parameters

proto - s(Protocol)
The protocol identifier
parameters - a{sv}(String_Variant_Map)
A dictionary mapping parameter name to the variant boxed value

Returns

s(DBus_Bus_Name)
A D-Bus service name where the new Connection object can be found
o
The D-Bus object path to the Connection on this service

Possible errors

org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.NotImplemented
Raised when the requested method, channel, etc is not available on this connection. (generic description)
org.freedesktop.Telepathy.Error.NotAvailable
Raised when the requested functionality is temporarily unavailable. (generic description)
org.freedesktop.Telepathy.Error.InvalidArgument
Raised when one of the provided arguments is invalid. (generic description)

Signals:

NewConnection ( s: bus_name, o: object_path, s: proto )

Emitted when a new Connection object is created.

Parameters

bus_name - s(DBus_Bus_Name)
The D-Bus service where the connection object can be found
object_path - o
The object path of the Connection object on this service
proto - s(Protocol)
The identifier for the protocol this connection uses

Interface has no Telepathy properties.

Interface has no D-Bus core properties.

Simple types

Connection_Manager_Name - s

The name of a connection manager, found in its well-known bus name and object path. This must be a non-empty string of ASCII letters, digits and underscores, starting with a letter. This is typically the name of the executable with any "telepathy-" prefix removed, and any hyphen/minus signs replaced by underscores.

Changed in version 0.17.1: Prior to version 0.17.1, the allowed characters were not specified

Protocol - s

An instant messaging protocol. It must consist only of ASCII letters, digits and hyphen/minus signs (U+002D "-"), and must start with a letter. Where possible, this SHOULD be chosen from the following well-known values:

Changed in version 0.17.1: Prior to version 0.17.1, the allowed characters were not specified

Sets of flags:

Conn_Mgr_Param_Flags

Conn_Mgr_Param_Flag_Required = 1
This parameter is required for connecting to the server.
Conn_Mgr_Param_Flag_Register = 2
This parameter is required for registering an account on the server.
Conn_Mgr_Param_Flag_Has_Default = 4
This parameter has a default value, which is returned in GetParameters; not providing this parameter is equivalent to providing the default.
Conn_Mgr_Param_Flag_Secret = 8

This parameter should be considered private or secret; for instance, clients should store it in a "password safe" like gnome-keyring or kwallet, omit it from debug logs, and use a text input widget that hides the value of the parameter.

(Clients that support older connection managers may also treat any parameter whose name contains "password" as though it had this flag.)

Added in version 0.17.2.

Structure types

Param_Spec - ( s: Name, u: Flags, s: Signature, v: Default_Value )

A struct representing an allowed parameter, as returned by GetParameters on the ConnectionManager interface.

In bindings that need a separate name, arrays of Param_Spec should be called Param_Spec_List.

Members

Name - s
A string parameter name
Flags - u(Conn_Mgr_Param_Flags)
A bitwise OR of the parameter flags
Signature - s(DBus_Signature)
A string containing the D-Bus type signature for this parameter
Default_Value - v
The default value (if the Has_Default flag is not present, there is no default and this takes some dummy value, which SHOULD be of the appropriate D-Bus type)

org.freedesktop.Telepathy.Connection

This models a connection to a single user account on a communication service. Its basic capability is to provide the facility to request and receive channels of differing types (such as text channels or streaming media channels) which are used to carry out further communication.

As well as the methods and signatures below, arbitrary interfaces may be provided by the Connection object to represent extra connection-wide functionality, such as the Connection.Interface.Presence for receiving and reporting presence information, and Connection.Interface.Aliasing for connections where contacts may set and change an alias for themselves. These interfaces can be discovered using GetInterfaces after the connection, has been established and must not change subsequently at runtime.

Contacts, rooms, and server-stored lists (such as subscribed contacts, block lists, or allow lists) on a service are all represented by immutable handles, which are unsigned non-zero integers which are valid only for the lifetime of the connection object, and are used throughout the protocol where these entities are represented, allowing simple testing of equality within clients.

Zero as a handle value is sometimes used as a "null" value to mean the absence of a contact, room, etc.

Handles have per-type uniqueness, meaning that every (handle type, handle number) tuple is guaranteed to be unique within a connection and that a handle alone (without its type) is meaningless or ambiguous. Connection manager implementations should reference count these handles to determine if they are in use either by any active clients or any open channels, and may deallocate them when this ceases to be true. Clients may request handles of a given type and name with the RequestHandles method, inspect the entity name of handles with the InspectHandles method, keep handles from being released with HoldHandles, and notify that they are no longer storing handles with ReleaseHandles.

Methods:

Connect ( ) → nothing

Request that the connection be established. This will be done asynchronously and errors will be returned by emitting StatusChanged signals.

Possible errors

org.freedesktop.Telepathy.Error.NotAvailable
Raised when the requested functionality is temporarily unavailable. (generic description)

Disconnect ( ) → nothing

Request that the connection be closed. This closes the connection if it's not already in DISCONNECTED state, and destroys the connection object.

GetInterfaces ( ) → as

Get the optional interfaces supported by this connection.

Returns

as(DBus_Interface[])
An array of D-Bus interface names

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)

GetProtocol ( ) → s

Get the protocol this connection is using.

Returns

s(Protocol)
A string identifier for the protocol

GetSelfHandle ( ) → u

Get the handle which represents the user on this connection, which will remain valid for the lifetime of this connection, or until a change in the user's identifier is signalled by the Renamed signal on the Renaming interface (if present).

Returns

u(Contact_Handle)
An integer handle representing the user

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)

GetStatus ( ) → u

Get the current status as defined in the StatusChanged signal.

Returns

u(Connection_Status)
An integer representing the current status

HoldHandles ( u: handle_type, au: handles ) → nothing

Notify the connection manger that your client is holding a copy of handles which may not be in use in any existing channel or list, and were not obtained by using the RequestHandles method. For example, a handle observed in an emitted signal, or displayed somewhere in the UI that is not associated with a channel. The connection manager must not deallocate a handle where any clients have used this method to indicate it is in use until the ReleaseHandle method is called, or the clients disappear from the bus.

Note that HoldHandles is idempotent - calling it multiple times is equivalent to calling it once. If a handle is "referenced" by several components which share a D-Bus unique name, the client should perform reference counting internally, and only call ReleaseHandles when none of the cooperating components need the handle any longer.

Parameters

handle_type - u(Handle_Type)
The type of handle to be held
handles - au(Handle[])
A array of integer handles to hold

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.InvalidArgument
Raised when one of the provided arguments is invalid. (generic description)
org.freedesktop.Telepathy.Error.InvalidHandle
The contact name specified is unknown on this channel or connection. (generic description)

InspectHandles ( u: handle_type, au: handles ) → as

Return a string representation for a number of handles of a given type.

Parameters

handle_type - u(Handle_Type)
The type of handle to be inspected
handles - au(Handle[])
An array of integer handles of this type

Returns

as
An array of handle names in the same order as the given numbers

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.InvalidArgument
Raised when one of the provided arguments is invalid. (generic description)
org.freedesktop.Telepathy.Error.InvalidHandle
The contact name specified is unknown on this channel or connection. (generic description)

ListChannels ( ) → a(osuu)

List all the channels which currently exist on this connection.

Returns

a(osuu)(Channel_Info[])
An array of structs representing channels.

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)

ReleaseHandles ( u: handle_type, au: handles ) → nothing

Explicitly notify the connection manager that your client is no longer holding any references to the given handles, and that they may be deallocated if they are not held by any other clients or referenced by any existing channels. See HoldHandles for notes.

Parameters

handle_type - u(Handle_Type)
An integer handle type (as defined in RequestHandle)
handles - au(Handle[])
An array of integer handles being held by the client

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.InvalidArgument
Raised when one of the provided arguments is invalid. (generic description)
org.freedesktop.Telepathy.Error.InvalidHandle
The contact name specified is unknown on this channel or connection. (generic description)
org.freedesktop.Telepathy.Error.NotAvailable
Raised when the requested functionality is temporarily unavailable. (generic description)

RequestChannel ( s: type, u: handle_type, u: handle, b: suppress_handler ) → o

Request a channel satisfying the specified type and communicating with the contact, room, list etc. indicated by the given handle_type and handle. The handle_type and handle may both be zero to request the creation of a new, empty channel, which may or may not be possible, depending on the protocol and channel type.

On success, the returned channel will always be of the requested type (i.e. implement the requested channel-type interface).

If a new, empty channel is requested, on success the returned channel will always be an "anonymous" channel for which the type and handle are both zero.

If a channel to a contact, room etc. is requested, on success, the returned channel may either be a new or existing channel to the requested entity (i.e. its GetHandle() returns the requested handle type and handle), or a newly created "anonymous" channel associated with the requested handle in some implementation-specific way.

For example, for a contact handle, the returned channel might be "anonymous", but implement the groups interface and have the requested contact already present among the members.

If the request cannot be satisfied, an error is raised and no channel is created.

Parameters

type - s(DBus_Interface)
A D-Bus interface name representing base channel type
handle_type - u(Handle_Type)
An integer representing the handle type, or Handle_Type_None if no handle is specified
handle - u(Handle)
A nonzero integer handle representing a contact, room, list etc. according to handle_type, or zero if the handle_type is Handle_Type_None
suppress_handler - b
If true, the requesting client intends to take responsibility for displaying the channel to the user, so no other handler needs to be launched

Returns

o
The D-Bus object path for the channel created or retrieved

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.NotImplemented
Unknown channel type
org.freedesktop.Telepathy.Error.InvalidHandle
The given handle does not exist or cannot be created
org.freedesktop.Telepathy.Error.NotAvailable
The requested channel type cannot be created with the given handle
org.freedesktop.Telepathy.Error.Channel.Banned
You are banned from the channel. (generic description)
org.freedesktop.Telepathy.Error.Channel.Full
The channel is full. (generic description)
org.freedesktop.Telepathy.Error.Channel.InviteOnly
The requested channel is invite-only. (generic description)

RequestHandles ( u: handle_type, as: names ) → au

Request several handles from the connection manager which represent a number of contacts, rooms or server-stored lists on the service. The connection manager should record that these handles are in use by the client who invokes this method, and must not deallocate the handles until the client disconnects from the bus or calls the ReleaseHandle method. Where the name refers to an entity that already has a handle in this connection manager, this handle should be returned instead. The handle number 0 must not be returned by the connection manager.

Parameters

handle_type - u(Handle_Type)
The type of handle required
names - as
An array of names of entities to request handles for

Returns

au(Handle[])
An array of integer handle numbers in the same order as the given strings

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.InvalidArgument
Raised when one of the provided arguments is invalid. (generic description)
org.freedesktop.Telepathy.Error.NotAvailable
Raised when the requested functionality is temporarily unavailable. (generic description)

Signals:

NewChannel ( o: object_path, s: channel_type, u: handle_type, u: handle, b: suppress_handler )

Emitted when a new Channel object is created, either through user request or incoming information from the service.

Parameters

object_path - o
A D-Bus object path for the channel object on this service
channel_type - s(DBus_Interface)
A D-Bus interface name representing the channel type
handle_type - u(Handle_Type)
An integer representing the type of handle this channel communicates with, or Handle_Type_None if no handle is specified
handle - u(Handle)
A handle indicating the specific contact, room or list this channel communicates with, or zero if no handle is specified
suppress_handler - b

If true, the channel was requested by a client that intends to present it to the user itself (i.e. it passed suppress_handler=TRUE to the RequestChannel method), so no other handler should be launched.

If false, either the channel was created due to incoming information from the service, or the channel was requested by a local client that does not intend to handle the channel itself (a typical use-case is an address-book viewer that does not itself implement chat or VoIP functionality, starting a channel that will be handled by the same user interface that would handle incoming channels).

Clients MUST NOT assume that only incoming channels will have this flag set to false.

StatusChanged ( u: status, u: reason )

Emitted when the status of the connection changes. All states and reasons have numerical values, as defined in ConnectionStatus and ConnectionStatusReason.

Parameters

status - u(Connection_Status)
An integer indicating the new status, as defined by ConnectionStatus
reason - u(Connection_Status_Reason)
An integer indicating the reason for the status change, as defined by ConnectionStatusReason

Interface has no Telepathy properties.

Interface has no D-Bus core properties.

Simple types

Handle - u

An unsigned 32-bit integer representing a handle

Contact_Handle - u

An unsigned 32-bit integer representing a handle of type Handle_Type_Contact

Room_Handle - u

An unsigned 32-bit integer representing a handle of type Handle_Type_Room

List_Handle - u

An unsigned 32-bit integer representing a handle of type Handle_Type_List

Group_Handle - u

An unsigned 32-bit integer representing a handle of type Handle_Type_Group

Enumerated types:

Handle_Type

Handle_Type_None = 0
A "null" handle type used to indicate the absence of a handle. When a handle type and a handle appear as a pair, if the handle type is zero, the handle must also be zero.
Handle_Type_Contact = 1
A contact
Handle_Type_Room = 2
A chat room
Handle_Type_List = 3
A server-generated contact list (see Channel.Interface.Group)
Handle_Type_Group = 4
A user-defined contact list (see Channel.Interface.Group)

Connection_Status

Connection_Status_Connected = 0
The connection is alive and all methods are available.
Connection_Status_Connecting = 1
The connection has not yet been established, or has been severed and reconnection is being attempted. Some methods may fail until the connection has been established.
Connection_Status_Disconnected = 2
The connection has been severed and no method calls are valid. The object may be removed from the bus at any time.

Connection_Status_Reason

Connection_Status_Reason_None_Specified = 0
There is no reason set for this state change.
Connection_Status_Reason_Requested = 1
The change is in response to a user request.
Connection_Status_Reason_Network_Error = 2
There was an error sending or receiving on the network socket.
Connection_Status_Reason_Authentication_Failed = 3
The username or password was invalid.
Connection_Status_Reason_Encryption_Error = 4
There was an error negotiating SSL on this connection, or encryption was unavailable and require-encryption was set when the connection was created.
Connection_Status_Reason_Name_In_Use = 5
Someone is already connected to the server using the name you are trying to connect with.
Connection_Status_Reason_Cert_Not_Provided = 6
The server did not provide a SSL certificate.
Connection_Status_Reason_Cert_Untrusted = 7
The server's SSL certificate could not be trusted.
Connection_Status_Reason_Cert_Expired = 8
The server's SSL certificate has expired.
Connection_Status_Reason_Cert_Not_Activated = 9
The server's SSL certificate is not yet valid.
Connection_Status_Reason_Cert_Hostname_Mismatch = 10
The server's SSL certificate did not match its hostname.
Connection_Status_Reason_Cert_Fingerprint_Mismatch = 11
The server's SSL certificate does not have the expected fingerprint.
Connection_Status_Reason_Cert_Self_Signed = 12
The server's SSL certificate is self-signed.
Connection_Status_Reason_Cert_Other_Error = 13
There was some other error validating the server's SSL certificate.

Structure types

Channel_Info - ( o: Channel, s: Channel_Type, u: Handle_Type, u: Handle )

A struct representing a channel, as returned by ListChannels on the Connection interface.

In bindings that need a separate name, arrays of Channel_Info should be called Channel_Info_List.

Members

Channel - o
The object path of the channel, which is on the same bus name as the connection
Channel_Type - s(DBus_Interface)
The channel's type
Handle_Type - u(Handle_Type)
The type of the handle that the channel communicates with, or Handle_Type_None if there is no associated handle
Handle - u(Handle)
The handle that the channel communicates with, or 0 if there is no associated handle

org.freedesktop.Telepathy.Connection.Interface.Aliasing

Implementations of this interface must also implement:

An interface on connections to support protocols where contacts have an alias which they can change at will. Provides a method for the user to set their own alias, and a signal which should be emitted when a contact's alias is changed or first discovered.

On connections where the user is allowed to set aliases for contacts and store them on the server, the GetAliasFlags method will have the CONNECTION_ALIAS_FLAG_USER_SET flag set, and the SetAliases method may be called on contact handles other than the user themselves.

Aliases are intended to be used as the main displayed name for the contact, where available.

Methods:

GetAliasFlags ( ) → u

Return a bitwise OR of flags detailing the behaviour of aliases on this connection.

Returns

u(Connection_Alias_Flags)
An integer with a bitwise OR of flags from ConnectionAliasFlags

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)

RequestAliases ( au: contacts ) → as

Request the value of several contacts' aliases at once.

Parameters

contacts - au(Contact_Handle[])
An array of handles representing contacts

Returns

as
A list of aliases in the same order as the contact handles

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.NotAvailable
Raised when the requested functionality is temporarily unavailable. (generic description)
org.freedesktop.Telepathy.Error.InvalidHandle
The contact name specified is unknown on this channel or connection. (generic description)

SetAliases ( a{us}: aliases ) → nothing

Request that the alias of the given contact be changed. Success will be indicated by emitting an AliasesChanged signal. On connections where the CONNECTION_ALIAS_FLAG_USER_SET flag is not set, this method will only ever succeed if the contact is the user's own handle (as returned by GetSelfHandle on the Connection interface).

Parameters

aliases - a{us}(Alias_Map)
A dictionary mapping integer handles of contacts to strings of the new alias to set.

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.NotAvailable
Raised when the requested functionality is temporarily unavailable. (generic description)
org.freedesktop.Telepathy.Error.InvalidArgument
Raised when one of the provided arguments is invalid. (generic description)
org.freedesktop.Telepathy.Error.PermissionDenied
The user is not permitted to perform the requested operation. (generic description)

Signals:

AliasesChanged ( a(us): aliases )

Signal emitted when a contact's alias (or that of the user) is changed.

Parameters

aliases - a(us)(Alias_Pair[])
An array containing structs of:
  • the handle representing the contact
  • the new alias

Interface has no Telepathy properties.

Interface has no D-Bus core properties.

Sets of flags:

Connection_Alias_Flags

Connection_Alias_Flag_User_Set = 1

The aliases of contacts on this connection may be changed by the user of the service, not just by the contacts themselves. This is the case on Jabber, for instance.

It is possible that aliases can be changed by the contacts too - which alias takes precedence is not defined by this specification, and depends on the server and/or connection manager implementation.

This flag only applies to the aliases of "globally valid" contact handles. At this time, clients should not expect to be able to change the aliases corresponding to any channel-specific handles. If this becomes possible in future, a new flag will be defined.

Structure types

Alias_Pair - ( u: Handle, s: Alias )

A pair (contact handle, alias) as seen in the AliasesChanged signal.

In bindings that need a separate name, arrays of Alias_Pair should be called Alias_Pair_List.

Members

Handle - u(Contact_Handle)
(undocumented)
Alias - s
(undocumented)

Mapping types

Alias_Map - a{ u: Handle → s: Alias }

A dictionary whose keys are contact handles and whose values are aliases.

Members

Handle - u(Contact_Handle)
(undocumented)
Alias - s
(undocumented)

org.freedesktop.Telepathy.Connection.Interface.Avatars

Implementations of this interface must also implement:

An interface for requesting avatars for contacts on a given connection, receiving notification when avatars are changed, and publishing your own avatar.

Avatars are identified by a unique (per contact) token which represents a hash or timestamp (depending on the protocol) of the contacts' avatar data. An empty token means that an avatar has not been set for this contact, and a changed token implies the contact's avatar has changed, but the strings should otherwise be considered opaque by clients.

A client should use GetKnownAvatarTokens to request the tokens for the avatars of all the contacts it is interested in when it connects. The avatars can then be requested using RequestAvatars for the contacts. Clients should bind to the AvatarChanged signal and request a new copy of the avatar when a contacts' avatar token changes. Clients should cache the token and data of each contact's avatar between connections, to avoid repeatedly retrieving the same avatar.

To publish an avatar, a client should use SetAvatar to provide an image which meets the requirements returned by the GetAvatarRequirements function. On some protocols the avatar is stored on the server, so setting the avatar is persistent, but on others it is transferred via a peer to peer mechanism, so needs to be set every connection. Hence, on every connection, clients should inspect the avatar token of the connection's self handle, and set the avatar if it is an empty string (and may optionally replace it if the token corresponds to a different avatar).

To remove the published avatar on protocols which have persistent avatars, a client should use the ClearAvatar method. This method can safely be used even if there is no avatar for this connection.

Methods:

GetAvatarRequirements ( ) → as, q, q, q, q, u

Get the required format of avatars on this connection.

Returns

as
An array of supported MIME types (eg image/jpeg)
q
The minimum image width in pixels
q
The minimum image height in pixels
q
The maximum image width in pixels, or 0 if there is no limit
q
The maximum image height in pixels, or 0 if there is no limit
u
The maximum image size in bytes, or 0 if there is no limit

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.PermissionDenied
The user is not permitted to perform the requested operation. (generic description)
org.freedesktop.Telepathy.Error.NotAvailable
Raised when the requested functionality is temporarily unavailable. (generic description)

GetAvatarTokens ( au: contacts ) → as

Get the unique tokens for all of the given contacts' avatars. Using this method in new Telepathy clients is deprecated; use GetKnownAvatarTokens instead.

Parameters

contacts - au(Contact_Handle[])
An array of handles representing contacts

Returns

as
An array of avatar tokens or empty strings (if no avatar is set) in the same order as the given array of contact handles

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.InvalidArgument
Raised when one of the provided arguments is invalid. (generic description)
org.freedesktop.Telepathy.Error.PermissionDenied
The user is not permitted to perform the requested operation. (generic description)
org.freedesktop.Telepathy.Error.NotAvailable
Raised when the requested functionality is temporarily unavailable. (generic description)

GetKnownAvatarTokens ( au: contacts ) → a{us}

Get the unique tokens for the given contacts' avatars. These tokens can be persisted across connections, and should be used by the client to check whether the avatars have been updated. A CM must always have the tokens for the self handle if one is set (even if it is set to no avatar). Otherwise, only tokens that are already known are returned. An empty token means the given contact has no avatar.

Parameters

contacts - au(Contact_Handle[])
An array of handles representing contacts

Returns

a{us}(Avatar_Token_Map)
A dictionary of handles mapped to avatar tokens, containing only the known avatar tokens.

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.InvalidArgument
Raised when one of the provided arguments is invalid. (generic description)
org.freedesktop.Telepathy.Error.PermissionDenied
The user is not permitted to perform the requested operation. (generic description)
org.freedesktop.Telepathy.Error.NotAvailable
Raised when the requested functionality is temporarily unavailable. (generic description)

RequestAvatar ( u: contact ) → ay, s

Request the avatar for a given contact. Using this method in new Telepathy clients is deprecated; use RequestAvatars instead.

Parameters

contact - u(Contact_Handle)
An integer handle for the contact to request the avatar for

Returns

ay
An array of bytes containing the image data
s
A string containing the image MIME type (eg image/jpeg), or empty if unknown

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.InvalidHandle
The contact name specified is unknown on this channel or connection. (generic description)
org.freedesktop.Telepathy.Error.PermissionDenied
The user is not permitted to perform the requested operation. (generic description)
org.freedesktop.Telepathy.Error.NotAvailable
The contact does not currently have an avatar.

RequestAvatars ( au: contacts ) → nothing

Request avatars for a number of contacts. The AvatarRetrieved signal is emitted for each avatar retrieved. If the handles are valid but retrieving an avatar fails (for any reason, including the contact not having an avatar) the AvatarRetrieved signal is not emitted for that contact.

Parameters

contacts - au(Contact_Handle[])
The contacts to retrieve avatars for

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.InvalidHandle
The contact name specified is unknown on this channel or connection. (generic description)

SetAvatar ( ay: avatar, s: mime_type ) → s

Set a new avatar image for this connection. The avatar image must respect the requirements obtained by GetAvatarRequirements.

Parameters

avatar - ay
An array of bytes representing the avatar image data
mime_type - s
A string representing the image MIME type

Returns

s
The string token of the new avatar

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.InvalidArgument
Raised when one of the provided arguments is invalid. (generic description)
org.freedesktop.Telepathy.Error.PermissionDenied
The user is not permitted to perform the requested operation. (generic description)
org.freedesktop.Telepathy.Error.NotAvailable
Raised when the requested functionality is temporarily unavailable. (generic description)

ClearAvatar ( ) → nothing

Remove the avatar image for this connection.

Added in version 0.15.0.

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)

Signals:

AvatarUpdated ( u: contact, s: new_avatar_token )

Emitted when the avatar for a contact has been updated, or first discovered on this connection. If the token differs from the token associated with the client's cached avatar for this contact, the new avatar should be requested with RequestAvatars.

Parameters

contact - u(Contact_Handle)
An integer handle for the contact whose avatar has changed
new_avatar_token - s
Unique token for their new avatar

AvatarRetrieved ( u: contact, s: token, ay: avatar, s: type )

Emitted when the avatar for a contact has been retrieved.

Parameters

contact - u(Contact_Handle)
The contact whose avatar has been retrieved
token - s
The token corresponding to the avatar
avatar - ay
An array of bytes containing the image data
type - s
A string containing the image MIME type (eg image/jpeg), or empty if unknown

Interface has no Telepathy properties.

Interface has no D-Bus core properties.

Mapping types

Avatar_Token_Map - a{ u: Handle → s: Token }

A dictionary whose keys are contact handles and whose values are avatar tokens.

Members

Handle - u(Contact_Handle)
(undocumented)
Token - s
(undocumented)

org.freedesktop.Telepathy.Connection.Interface.Capabilities

Implementations of this interface must also implement:

An interface for connections where it is possible to know what channel types may be requested before the request is made to the connection object. Each capability represents a commitment by the connection manager that it will ordinarily be able to create a channel when given a request with the given type and handle.

Capabilities can pertain to a certain contact handle, representing activities such as having a text chat or a voice call with the user, or can be on the connection itself (where the handle will be zero), where they represent the ability to create channels for chat rooms or activities such as searching and room listing. The activities are represented by the D-Bus interface name of the channel type for that activity.

The generic capability flags are defined by Connection_Capability_Flags.

In addition, channel types may have type specific capability flags of their own, which are described in the documentation for each channel type.

This interface also provides for user interfaces notifying the connection manager of what capabilities to advertise for the user. This is done by using the AdvertiseCapabilities method, and deals with the interface names of channel types and the type specific flags pertaining to them which are implemented by available client processes.

Methods:

AdvertiseCapabilities ( a(su): add, as: remove ) → a(su)

Used by user interfaces to indicate which channel types they are able to handle on this connection. Because these may be provided by different client processes, this method accepts channel types to add and remove from the set already advertised on this connection. The type of advertised capabilities (create versus invite) is protocol-dependent and hence cannot be set by the this method. In the case of a client adding an already advertised channel type but with new channel type specific flags, the connection manager should simply add the new flags to the set of advertised capabilities.

Upon a successful invocation of this method, the CapabilitiesChanged signal will be emitted for the user's own handle (as returned by GetSelfHandle) the by the connection manager to indicate the changes that have been made. This signal should also be monitored to ensure that the set is kept accurate - for example, a client may remove capabilities or type specific capability flags when it exits which are still provided by another client.

Parameters

add - a(su)(Capability_Pair[])
An array of structures containing:
  • a string channel type
  • a bitwise OR of type specific capability flags
remove - as(DBus_Interface[])
An array of D-Bus interface names of channel types to remove

Returns

a(su)(Capability_Pair[])
An array of structures describing the current capabilities containing:

Possible errors

org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)

GetCapabilities ( au: handles ) → a(usuu)

Returns an array of capabilities for the given contact handles, or the connection itself (where handle is zero).

Parameters

handles - au(Contact_Handle[])
An array of contact handles for this connection, or zero to query capabilities available on the connection itself

Returns

a(usuu)(Contact_Capability[])
An array of structures containing:

Possible errors

org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.InvalidHandle
The handle does not represent a contact
org.freedesktop.Telepathy.Error.PermissionDenied
The user is not permitted to perform the requested operation. (generic description)

Signals:

CapabilitiesChanged ( a(usuuuu): caps )

Announce that there has been a change of capabilities on the given handle, or on the connection itself if the handle is zero.

Parameters

caps - a(usuuuu)(Capability_Change[])
An array of structures containing:
  • an integer handle representing the contact
  • a string channel type
  • a bitwise OR of the contact's old generic capability flags
  • a bitwise OR of the contact's new generic capability flags
  • a bitwise OR of the contact's old type specific capability flags
  • a bitwise OR of the contact's new type specific capability flags

Interface has no Telepathy properties.

Interface has no D-Bus core properties.

Sets of flags:

Connection_Capability_Flags

Connection_Capability_Flag_Create = 1
The given channel type and handle can be given to RequestChannel to create a new channel of this type.
Connection_Capability_Flag_Invite = 2
The given contact can be invited to an existing channel of this type.

Structure types

Capability_Pair - ( s: Channel_Type, u: Type_Specific_Flags )

A pair (channel type, type-specific flags) as passed to AdvertiseCapabilities on the Capabilities interface.

In bindings that need a separate name, arrays of Capability_Pair should be called Capability_Pair_List.

Members

Channel_Type - s(DBus_Interface)
(undocumented)
Type_Specific_Flags - u
(undocumented)

Contact_Capability - ( u: Handle, s: Channel_Type, u: Generic_Flags, u: Type_Specific_Flags )

A struct (contact handle, channel type, generic flags, type-specific flags) representing a capability posessed by a contact, as returned by GetCapabilities on the Capabilities interface.

In bindings that need a separate name, arrays of Contact_Capability should be called Contact_Capability_List.

Members

Handle - u(Contact_Handle)
(undocumented)
Channel_Type - s(DBus_Interface)
(undocumented)
Generic_Flags - u(Connection_Capability_Flags)
(undocumented)
Type_Specific_Flags - u
(undocumented)

Capability_Change - ( u: Handle, s: Channel_Type, u: Old_Generic_Flags, u: New_Generic_Flags, u: Old_Type_Specific_Flags, u: New_Type_Specific_Flags )

A struct (contact handle, channel type, old generic flags, new generic flags, old type-specific flags, new type-specific flags) representing a change to one of a contact's capabilities, as seen in the CapabilitiesChanged signal on the Capabilities interface.

In bindings that need a separate name, arrays of Capability_Change should be called Capability_Change_List.

Members

Handle - u(Contact_Handle)
(undocumented)
Channel_Type - s(DBus_Interface)
(undocumented)
Old_Generic_Flags - u(Connection_Capability_Flags)
(undocumented)
New_Generic_Flags - u(Connection_Capability_Flags)
(undocumented)
Old_Type_Specific_Flags - u
(undocumented)
New_Type_Specific_Flags - u
(undocumented)

org.freedesktop.Telepathy.Connection.Interface.Presence

Implementations of this interface must also implement:

This interface is for services which have a concept of presence which can be published for yourself and monitored on your contacts. Telepathy's definition of presence is based on that used by the Galago project (see http://www.galago-project.org/).

Presence on an individual (yourself or one of your contacts) is modelled as a last activity time along with a set of zero or more statuses, each of which may have arbitrary key/value parameters. Valid statuses are defined per connection, and a list of them can be obtained with the GetStatuses method.

Each status has an arbitrary string identifier which should have an agreed meaning between the connection manager and any client which is expected to make use of it. The following well-known values (in common with those in Galago) should be used where possible to allow clients to identify common choices:

As well as these well-known status identifiers, every status also has a numerical type value chosen from ConnectionPresenceType which can be used by the client to classify even unknown statuses into different fundamental types.

These numerical types exist so that even if a client does not understand the string identifier being used, and hence cannot present the presence to the user to set on themselves, it may display an approximation of the presence if it is set on a contact.

The dictionary of variant types allows the connection manager to exchange further protocol-specific information with the client. It is recommended that the string (s) argument 'message' be interpreted as an optional message which can be associated with a presence status.

If the connection has a 'subscribe' contact list, PresenceUpdate signals should be emitted to indicate changes of contacts on this list, and should also be emitted for changes in your own presence. Depending on the protocol, the signal may also be emitted for others such as people with whom you are communicating, and any user interface should be updated accordingly.

On some protocols, RequestPresence may only succeed on contacts on your 'subscribe' list, and other contacts will cause a PermissionDenied error. On protocols where there is no 'subscribe' list, and RequestPresence succeeds, a client may poll the server intermittently to update any display of presence information.

Methods:

AddStatus ( s: status, a{sv}: parms ) → nothing

Request that a single presence status is published for the user, along with any desired parameters. Changes will be indicated by PresenceUpdate signals being emitted.

Parameters

status - s
The string identifier of the desired status
parms - a{sv}(String_Variant_Map)
A dictionary of optional parameter names mapped to their variant-boxed values

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.InvalidArgument
Raised when one of the provided arguments is invalid. (generic description)
org.freedesktop.Telepathy.Error.NotAvailable
Raised when the requested functionality is temporarily unavailable. (generic description)
org.freedesktop.Telepathy.Error.PermissionDenied
The user is not permitted to perform the requested operation. (generic description)

ClearStatus ( ) → nothing

Request that all of a user's presence statuses be removed. Be aware that this request may simply result in the statuses being replaced by a default available status. Changes will be indicated by PresenceUpdate signals being emitted.

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.PermissionDenied
The user is not permitted to perform the requested operation. (generic description)

GetPresence ( au: contacts ) → a{u(ua{sa{sv}})}

Get presence previously emitted by PresenceUpdate for the given contacts. Data is returned in the same structure as the PresenceUpdate signal. Using this method in favour of RequestPresence has the advantage that it will not wake up each client connected to the PresenceUpdate signal.

Parameters

contacts - au(Contact_Handle[])
An array of the contacts whose presence should be obtained

Returns

presence - a{u(ua{sa{sv}})}(Contact_Presences)
Presence information in the same format as for the PresenceUpdate signal

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.InvalidHandle
The contact name specified is unknown on this channel or connection. (generic description)
org.freedesktop.Telepathy.Error.NotAvailable
Raised when the requested functionality is temporarily unavailable. (generic description)

GetStatuses ( ) → a{s(ubba{ss})}

Get a dictionary of the valid presence statuses for this connection. This is only available when online because only some statuses will be available on some servers.

Returns

a{s(ubba{ss})}(Status_Spec_Map)
A dictionary of string identifiers mapped to a struct for each status, containing:

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)

RemoveStatus ( s: status ) → nothing

Request that the given presence status is no longer published for the user. Changes will be indicated by PresenceUpdate signals being emitted. As with ClearStatus, removing a status may actually result in it being replaced by a default available status.

Parameters

status - s
The string identifier of the status not to publish anymore for the user

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.PermissionDenied
The user is not permitted to perform the requested operation. (generic description)
org.freedesktop.Telepathy.Error.InvalidArgument
The status requested is not currently set

RequestPresence ( au: contacts ) → nothing

Request the presence for contacts on this connection. A PresenceUpdate signal will be emitted when they are received. This is not the same as subscribing to the presence of a contact, which must be done using the 'subscription' Channel.Type.ContactList, and on some protocols presence information may not be available unless a subscription exists.

Parameters

contacts - au(Contact_Handle[])
An array of the contacts whose presence should be obtained

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.InvalidHandle
The contact name specified is unknown on this channel or connection. (generic description)
org.freedesktop.Telepathy.Error.PermissionDenied
The user is not permitted to perform the requested operation. (generic description)
org.freedesktop.Telepathy.Error.NotAvailable
The presence of the requested contacts is not reported to this connection

SetLastActivityTime ( u: time ) → nothing

Request that the recorded last activity time for the user be updated on the server.

Parameters

time - u(Unix_Timestamp)
A UNIX timestamp of the user's last activity time (in UTC)

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.NotImplemented
This protocol has no concept of idle time

SetStatus ( a{sa{sv}}: statuses ) → nothing

Request that the user's presence be changed to the given statuses and desired parameters. Changes will be reflected by PresenceUpdate signals being emitted. On certain protocols, this method may be called on a newly-created connection which is still in the DISCONNECTED state, and will sign on with the requested status. If the requested status is not available after signing on, NotAvailable will be returned and the connection will remain offline, or if the protocol does not support signing on with a certain status, Disconnected will be returned.

Parameters

statuses - a{sa{sv}}(Multiple_Status_Map)
A dictionary mapping status identifiers to dictionaries, which map optional parameter names to their variant-boxed values

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.NotAvailable
Raised when the requested functionality is temporarily unavailable. (generic description)
org.freedesktop.Telepathy.Error.InvalidArgument
Raised when one of the provided arguments is invalid. (generic description)
org.freedesktop.Telepathy.Error.PermissionDenied
The user is not permitted to perform the requested operation. (generic description)

Signals:

PresenceUpdate ( a{u(ua{sa{sv}})}: presence )

This signal should be emitted when your own presence has been changed, or the presence of the member of any of the connection's channels has been changed, or when the presence requested by RequestPresence is available.

Parameters

presence - a{u(ua{sa{sv}})}(Contact_Presences)
A dictionary of contact handles mapped to a struct containing a UNIX timestamp of the last activity time (in UTC), and a dictionary mapping the contact's current status identifiers to a dictionary of optional parameter names mapped to their variant-boxed values

Interface has no Telepathy properties.

Interface has no D-Bus core properties.

Enumerated types:

Connection_Presence_Type

Connection_Presence_Type_Unset = 0
An invalid presence type used as a null value
Connection_Presence_Type_Offline = 1
Offline
Connection_Presence_Type_Available = 2
Available
Connection_Presence_Type_Away = 3
Away
Connection_Presence_Type_Extended_Away = 4
Away for an extended time
Connection_Presence_Type_Hidden = 5
Hidden (invisible)
Connection_Presence_Type_Busy = 6
Busy, Do Not Disturb.

Added in version 0.17.0.

Structure types

Last_Activity_And_Statuses - ( u: Last_Activity, a{sa{sv}}: Statuses )

Structure representing a contact's presence, containing a last-activity time (deprecated) and a Multiple_Status_Map.

Arrays of Last_Activity_And_Statuses don't generally make sense.

Members

Last_Activity - u(Unix_Timestamp)
(undocumented)
Statuses - a{sa{sv}}(Multiple_Status_Map)
(undocumented)

Status_Spec - ( u: Type, b: May_Set_On_Self, b: Exclusive, a{ss}: Parameter_Types )

Arrays of Status_Spec don't generally make sense.

Members

Type - u(Connection_Presence_Type)
(undocumented)
May_Set_On_Self - b
(undocumented)
Exclusive - b
(undocumented)
Parameter_Types - a{ss}(String_String_Map)
(undocumented)

Mapping types

Multiple_Status_Map - a{ s: Status → a{sv}: Parameters }

Mapping used in Last_Activity_And_Statuses and passed to SetStatus, representing a collection of statuses. Use of this mapping with more than one member is deprecated.

Members

Status - s
(undocumented)
Parameters - a{sv}(String_Variant_Map)
(undocumented)

Contact_Presences - a{ u: Contact → (ua{sa{sv}}): Presence }

Mapping returned by GetPresence and signalled by PresenceUpdate, where the keys are contacts and the values represent their presences.

Members

Contact - u(Contact_Handle)
(undocumented)
Presence - (ua{sa{sv}})(Last_Activity_And_Statuses)
(undocumented)

Status_Spec_Map - a{ s: Identifier → (ubba{ss}): Spec }

Members

Identifier - s
(undocumented)
Spec - (ubba{ss})(Status_Spec)
(undocumented)

org.freedesktop.Telepathy.Connection.Interface.Renaming

This interface is not well-tested and is likely to cause havoc to your API/ABI if bindings are generated. Don't include it in libraries that care about compatibility.

Implementations of this interface must also implement:

An interface on connections to support protocols where the unique identifiers of contacts can change. Because handles are immutable, this is represented by a pair of handles, that representing the old name, and that representing the new one.

Methods:

RequestRename ( s: name ) → nothing

Request that the user's own identifier is changed on the server. If successful, a Renamed signal will be emitted for the current "self handle" as returned by GetSelfHandle.

It is protocol-dependent how the identifier that's actually used will be derived from the supplied identifier; some sort of normalization might take place.

Parameters

name - s
The desired identifier

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.NotAvailable
Raised when the requested functionality is temporarily unavailable. (generic description)
org.freedesktop.Telepathy.Error.InvalidArgument
Raised when one of the provided arguments is invalid. (generic description)
org.freedesktop.Telepathy.Error.PermissionDenied
The user is not permitted to perform the requested operation. (generic description)

Signals:

Renamed ( u: original, u: new )

Emitted when the unique identifier of a contact on the server changes.

Any channels associated with the contact's original handle will continue to be to that handle, and so are no longer useful (unless the contact renames back, or another contact connects with that unique ID). Clients may open a similar channel associated with the new handle to continue communicating with the contact.

For example, if a GUI client associates text channels with chat windows, it should detach the old channel from the chat window, closing it, and associate a channel to the new handle with the same window.

If the contact's old handle is in any of the member lists of a channel which has the groups interface, it will be removed from the channel and the new handle will be added. The resulting MembersChanged signal must be emitted after the Renamed signal; the reason should be RENAMED.

The handles may be either general-purpose or channel-specific. If the original handle is general-purpose, the new handle must be general-purpose; if the original handle is channel-specific, the new handle must be channel-specific in the same channel.

Parameters

original - u(Contact_Handle)
The handle of the original identifier
new - u(Contact_Handle)
The handle of the new identifier

Interface has no Telepathy properties.

Interface has no D-Bus core properties.

org.freedesktop.Telepathy.Channel

All communication in the Telepathy framework is carried out via channel objects which are created and managed by connections. This interface must be implemented by all channel objects, along with one single channel type, such as Channel.Type.ContactList which represents a list of people (such as a buddy list) or a Channel.Type.Text which represents a channel over which textual messages are sent and received.

Each channel may have an immutable handle associated with it, which may be any handle type, such as a contact, room or list handle, indicating that the channel is for communicating with that handle.

If a channel does not have a handle (an "anonymous channel" with Target_Handle = 0 and Target_Handle_Type = Handle_Type_None), it means that the channel is defined by some other terms, such as it may be a transient group defined only by its members as visible through the Channel.Interface.Group interface.

Other optional interfaces can be implemented to indicate other available functionality, such as Channel.Interface.Group if the channel contains a number of contacts, Channel.Interface.Password to indicate that a channel may have a password set to require entry, and Properties for extra data about channels which represent chat rooms or voice calls. The interfaces implemented may not vary after the channel's creation has been signalled to the bus (with the connection's NewChannel signal).

Specific connection manager implementations may implement channel types and interfaces which are not contained within this specification in order to support further functionality. To aid interoperability between client and connection manager implementations, the interfaces specified here should be used wherever applicable, and new interfaces made protocol-independent wherever possible. Because of the potential for 3rd party interfaces adding methods or signals with conflicting names, the D-Bus interface names should always be used to invoke methods and bind signals.

Changed in version 0.17.7: Previously we guaranteed that, for any handle type other than Handle_Type_None, and for any channel type and any handle, there would be no more than one channel with that combination of channel type, handle type and handle. This guarantee has now been removed in order to accommodate features like message threads.

Methods:

Close ( ) → nothing

Request that the channel be closed. This is not the case until the Closed signal has been emitted, and depending on the connection manager this may simply remove you from the channel on the server, rather than causing it to stop existing entirely. Some channels such as contact list channels may not be closed.

Possible errors

org.freedesktop.Telepathy.Error.Disconnected
The connection is not currently connected and cannot be used. (generic description)
org.freedesktop.Telepathy.Error.NetworkError
Raised when there is an error reading from or writing to the network. (generic description)
org.freedesktop.Telepathy.Error.NotImplemented
This channel may never be closed, e.g. a contact list
org.freedesktop.Telepathy.Error.NotAvailable
This channel is not currently in a state where it can be closed, e.g. a non-empty user-defined contact group

GetChannelType ( ) → s

Returns the interface name for the type of this channel. Clients SHOULD use the ChannelType property instead, falling back to this method only if necessary.
The GetAll method lets clients retrieve all properties in one round-trip.

Deprecated since version 0.17.7. Use the ChannelType property if possible.

Returns

s(DBus_Interface)
The interface name

GetHandle ( ) → u, u

Returns the handle type and number if this channel represents a communication with a particular contact, room or server-stored list, or zero if it is transient and defined only by its contents. Clients SHOULD use the TargetHandle and TargetHandleType properties instead, falling back to this method only if necessary.
The GetAll method lets clients retrieve all properties in one round-trip.

Deprecated since version 0.17.7. Use the TargetHandleType and TargetHandle properties if possible.

Returns

u(Handle_Type)
The same as TargetHandleType.
u(Handle)
The same as TargetHandle.

GetInterfaces ( ) → as

Get the optional interfaces implemented by the channel. Clients SHOULD use the Interfaces property instead, falling back to this method only if necessary.
The GetAll method lets clients retrieve all properties in one round-trip.

Deprecated since version 0.17.7. Use the Interfaces property if possible.

Returns

as(DBus_Interface[])
An array of the D-Bus interface names

Signals:

Closed ( )

Emitted when the channel has been closed. Method calls on the channel are no longer valid after this signal has been emitted, and the connection manager may then remove the object from the bus at any point.

Interface has no Telepathy properties.

D-Bus core Properties:

Accessed using the org.freedesktop.DBus.Properties interface.

ChannelType - s(DBus_Interface), read-only

The channel's type. This cannot change once the channel has been created.

For compatibility between older connection managers and newer clients, if this is unavailable or is an empty string, clients MUST use the result of calling GetChannelType.

The GetAll method lets clients retrieve all properties in one round-trip, which is desirable.

Added in version 0.17.7.

Interfaces - as(DBus_Interface[]), read-only

Extra interfaces provided by this channel. This SHOULD NOT include the channel type and the Channel interface itself, and cannot change once the channel has been created.

For compatibility between older connection managers and newer clients, if this is unavailable, or if this is an empty list and ChannelType is an empty string, clients MUST use the result of calling GetInterfaces instead. If this is an empty list but ChannelType is non-empty, clients SHOULD NOT call GetInterfaces; this implies that connection managers that implement the ChannelType property MUST also implement the Interfaces property correctly.

The GetAll method lets clients retrieve all properties in one round-trip, which is desirable.

Added in version 0.17.7.

TargetHandle - u(Handle), read-only

The handle (a representation for the identifier) of the contact, chatroom, etc. with which this handle communicates. Its type is given by the TargetHandleType property.

This is fixed for the lifetime of the channel, so channels which could potentially be used to communicate with multiple contacts (such as streamed media calls defined by their members, or ad-hoc chatrooms like MSN switchboards) must have TargetHandleType set to Handle_Type_None and TargetHandle set to 0.

Unlike in the telepathy-spec 0.16 API, there is no particular uniqueness guarantee - there can be many channels with the same (channel type, handle type, handle) tuple. This is necessary to support conversation threads in XMPP and SIP, for example.

Added in version 0.17.7.

TargetHandleType - u(Handle_Type), read-only
The type of TargetHandle.

Added in version 0.17.7.

org.freedesktop.Telepathy.Channel.FUTURE

This interface is a staging area for future Channel functionality and is likely to cause havoc to your API/ABI if bindings are generated. Don't include it in libraries that care about compatibility.

This interface contains functionality which we intend to incorporate into the Channel interface in future. It should be considered to be conceptually part of the core Channel interface, but without API or ABI guarantees.

If we add new functionality to the Channel interface, libraries that use generated code (notably telepathy-glib) will have it as part of their ABI forever, meaning we can't make incompatible changes. By using this interface as a staging area for future Channel functionality, we can try out new properties, signals and methods as application-specific extensions, then merge them into the core Channel interface when we have enough implementation experience to declare them