Telepathy D-Bus Interface Specification

Version 0.16.0

Copyright (C) 2005, 2006, 2007 Collabora Limited
Copyright (C) 2005, 2006, 2007 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 Library 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. The names of these services, the protocols they support, and the parameters understood by that protocol are intended to be discovered by reading files on disk which are provided along with the connection manager. These are documented elsewhere.

Once a connection manager service has been activated, the object path of the manager object implementing this interface is always /org/freedesktop/Telepathy/ConnectionManager/name Where name is the identifier for the connection manager.

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.

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
The required protocol name

Returns

a(susv)
An array of structs containing:
  • a string parameter name
  • a bitwise OR of the parameter flags (as defined above)
  • a string D-Bus type signature
  • a variant boxed default value (if the HAS_DEFAULT flag is not present, there is no default and this takes some dummy value)

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. The following well-known values should be used when applicable:

Returns

as
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 bus name must be of the form:

/org/freedesktop/Telepathy/Connection/manager/proto/account

And:

org.freedesktop.Telepathy.Connection.manager.proto.account

Where manager and proto are the identifiers for this manager and this protocol, and account is a series of elements formed such that any valid distinct connection instance on this protocol has a distinct name. This might be formed by including the server name followed by the user name, or on protocols where connecting multiple times is permissable, a per-connection identifier is also necessary to ensure uniqueness.

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
The protocol identifier
parameters - a{sv}
A dictionary mapping parameter name to the variant boxed value

Returns

s
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
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
The identifier for the protocol this connection uses

Interface has no properties.

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.

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
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
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). This is always a CONTACT type handle.

Returns

u
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
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
An integer handle type (as defined in HandleType)
handles - au
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
An integer handle type (as defined in HandleType)
handles - au
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)

An array of structs containing:

  • a D-Bus object path for the channel object on this service
  • a D-Bus interface name representing the channel type
  • an integer representing the handle type this channel communicates with, or zero
  • an integer handle representing the contact, room or list this channel communicates with, or zero

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
An integer handle type (as defined in RequestHandle)
handles - au
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
A D-Bus interface name representing base channel type
handle_type - u
An integer representing the handle type, or zero if no handle is being specified
handle - u
A nonzero integer handle representing a contact, room, list etc. according to handle_type, or zero if the handle_type is zero
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
An integer handle type (as defined in HandleType)
names - as
An array of names of entities to request handles for

Returns

au
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. The suppress_handler boolean indicates if the channel was requested by an existing client, or is an incoming communication and needs to have a handler launched.

Parameters

object_path - o
A D-Bus object path for the channel object on this service
channel_type - s
A D-Bus interface name representing the channel type
handle_type - u
An integer representing the type of handle this channel communicates with, which is zero if no handle is specified
handle - u
A handle indicating the specific contact, room or list this channel communicates with, or zero if it is an anonymous channel
suppress_handler - b
A boolean indicating that the channel was requested by a client that intends to display it to the user, so no handler needs to be launched

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
An integer indicating the new status, as defined by ConnectionStatus
reason - u
An integer indicating the reason for the status change, as defined by ConnectionStatusReason

Interface has no properties.

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.

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
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
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 AliasUpdate 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}
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.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)

Signals:

AliasesChanged ( a(us): aliases )

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

Parameters

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

Interface has no 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.

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 GetAvatarTokens to request the tokens for the avatars of all the contacts it is interested in when it connects. The avatars can then be retreived using RequestAvatar for the corresponding contact. 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
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 empty token means that no avatar is set for the given contact.

Parameters

contacts - au
An array of handles representing contacts

Returns

a{us}
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
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
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.

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 RequestAvatar.

Parameters

contact - u
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
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 properties.

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 ConnectionCapabilityFlag.

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)
An array of structures containing:
  • a string channel type
  • a bitwise OR of type specific capability flags
remove - as
An array of D-Bus interface names of channel types to remove

Returns

a(su)
An array of structures describing the current capabilities containing:
  • a string channel type
  • a bitwise OR of type specific capability flags

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
An array of contact handles for this connection, or zero to query capabilities available on the connection itself

Returns

a(usuu)
An array of structures containing:
  • an integer handle representing the contact
  • a string channel type
  • a bitwise OR of generic capability flags for the type
  • a bitwise OR of type specific capability flags for the type

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)
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 properties.

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.

org.freedesktop.Telepathy.Connection.Interface.ContactInfo

Implementations of this interface must also implement:

THIS INTERFACE IS DEPRECATED AND SHOULD NOT BE USED. A new version will be proposed in the 0.13 specification branch.

An interface for requesting information about a contact on a given connection. Information is returned as a vCard represented as an XML string, in the format defined by JEP-0054: vcard-temp specifiation from the Jabber Software Foundation (this is derived from the aborted IETF draft draft-dawson-vcard-xml-dtd-01).

Implementations using PHOTO or SOUND elements should use the URI encoding where possible, and not provide base64 encoded data to avoid unnecessary bus traffic. Clients should not implement support for these encoded forms. A separate interface will be provided for transferring user avatars.

The following extended element names are also added to represent information from other systems which are not based around vCards:

USERNAME
the username of the contact on their local system (used on IRC for example)
HOSTNAME
the fully qualified hostname, or IPv4 or IPv6 address of the contact in dotted quad or colon-separated form

Methods:

RequestContactInfo ( u: contact ) → nothing

Request information for a given contact. The function will return after a GotContactInfo signal has been emitted for the contact, or an error returned.

Parameters

contact - u
An integer handle for the contact to request info for

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
Raised when the requested functionality is temporarily unavailable. (generic description)

Signals:

GotContactInfo ( u: contact, s: vcard )

Emitted when information has been received from the server with the details of a particular contact.

Parameters

contact - u
An integer handle of the contact ID on the server
vcard - s
The XML string containing their vcard information

Interface has no properties.

org.freedesktop.Telepathy.Connection.Interface.Forwarding

Implementations of this interface must also implement:

A connection interface for services which can signal to contacts that they should instead contact a different user ID, effectively forwarding all incoming communication channels to another contact on the service.

Methods:

GetForwardingHandle ( ) → u

Returns the current forwarding contact handle, or zero if none is set.

Returns

u
An integer contact handle to whom incoming communication is forwarded

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)

SetForwardingHandle ( u: forward_to ) → nothing

Set a contact handle to forward incoming communications to. A zero handle disables forwarding.

Parameters

forward_to - u
An integer contact handle to forward incoming communications to

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.PermissionDenied
The user is not permitted to perform the requested operation. (generic description)
org.freedesktop.Telepathy.Error.InvalidHandle
The contact name specified is unknown on this channel or connection. (generic description)

Signals:

ForwardingChanged ( u: forward_to )

Emitted when the forwarding contact handle for this connection has been changed. An zero handle indicates forwarding is disabled.

Parameters

forward_to - u
An integer contact handle to forward communication to

Interface has no properties.

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}
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
An array of the contacts whose presence should be obtained

Returns

presence - a{u(ua{sa{sv}})}
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})}
A dictionary of string identifiers mapped to a struct for each status, containing:
  • a type value from one of the values above
  • a boolean to indicate if this status may be set on yourself
  • a boolean to indicate if this is an exclusive status which you may not set alongside any other
  • a dictionary of valid optional string argument names mapped to their types

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

org.freedesktop.Telepathy.Connection.Interface.Privacy

Implementations of this interface must also implement:

An interface to support getting and setting privacy modes to configure situations such as not being contactable by people who are not on your subscribe list. If this interface is not implemented, the default can be presumed to be allow-all (as defined in GetPrivacyModes).

Methods:

GetPrivacyMode ( ) → s

Return the current privacy mode, which must be one of the values returned by GetPrivacyModes.

Returns

s
A string representing the current privacy mode

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)

GetPrivacyModes ( ) → as

Returns the privacy modes available on this connection. The following well-known names should be used where appropriate:
allow-all
any contact may initiate communication
allow-specified
only contacts on your 'allow' list may initiate communication
allow-subscribed
only contacts on your subscription list may initiate communication

Returns

as
An array of valid privacy modes for this connection

SetPrivacyMode ( s: mode ) → nothing

Request that the privacy mode be changed to the given value, which must be one of the values returned by GetPrivacyModes. Success is indicated by the method returning and the PrivacyModeChanged signal being emitted.

Parameters

mode - s
The desired privacy mode

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
Raised when one of the provided arguments is invalid. (generic description)

Signals:

PrivacyModeChanged ( s: mode )

Emitted when the privacy mode is changed or the value has been initially received from the server.

Parameters

mode - s
The current privacy mode

Interface has no properties.

org.freedesktop.Telepathy.Connection.Interface.Renaming

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
The handle of the original identifier
new - u
The handle of the new identifier

Interface has no 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. There can be at most one channel for each combination of (channel type, handle type, handle) with nonzero handle type.

If a channel does not have a handle (an "anonymous channel"), 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. There can be any number of anonymous channels of the same channel type.

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.

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.

Returns

s
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.

Returns

u
The handle type, or zero if this channel does not correspond to any particular handle
u
The handle, or zero if this channel does not correspond to any particular handle

GetInterfaces ( ) → as

Get the optional interfaces implemented by the channel.

Returns

as
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 properties.

org.freedesktop.Telepathy.Channel.Type.ContactList

Implementations of this interface must also implement:

A channel type for representing a list of people on the server which is not used for communication. This is intended for use with the interface Channel.Interface.Group for managing buddy lists and privacy lists on the server. This channel type has no methods because all of the functionality it represents is available via the group interface.

There are currently two types of contact list: HANDLE_TYPE_LIST is a "magic" server-defined list, and HANDLE_TYPE_GROUP is a user-defined contact group.

For server-defined lists like the subscribe list, singleton instances of this channel type should be created by the connection manager at connection time if the list exists on the server, or may be requested by using the appropriate handle. These handles can be obtained using RequestHandle with a handle type of HANDLE_TYPE_LIST and one of the following identifiers:

These contact list channels may not be closed.

For user-defined contact groups, instances of this channel type should be created by the connection manager at connection time for each group that exists on the server. New, empty groups can be created by calling RequestHandle with a handle type of HANDLE_TYPE_GROUP and with the name set to the human-readable UTF-8 name of the group.

User-defined groups may be deleted by closing the channel, but only if the group is already empty. Closing a channel to a non-empty group is not allowed; its members must be set to the empty set first.

On some protocols (e.g. XMPP) empty groups are not represented on the server, so disconnecting from the server and reconnecting might cause empty groups to vanish.

Interface has no methods.

Interface has no signals.

Interface has no properties.

org.freedesktop.Telepathy.Channel.Type.ContactSearch

Implementations of this interface must also implement:

A channel type for searching server-stored user directories. A new channel should be requested by a client for each search attempt, and it should be closed when the search is completed or the required result has been found in order to free unused handles. The search can be cancelled at any time by calling the channel Close method, although depending upon the protocol the connection manager may not be able to prevent the server from sending further results.

Before searching, the GetSearchKeys method should be used to discover any instructions sent by the server, and the valid search keys which can be provided to the Search method. A search request is then started by providing some of these terms to the Search method, and the search status will be set to CHANNEL_CONTACT_SEARCH_STATE_DURING. When results are returned by the server, the SearchResultReceived signal is emitted for each contact found, and when the search is complete, the search status will be set to CHANNEL_SEARCH_STATE_AFTER.

Methods:

GetSearchKeys ( ) → s, a{s(bg)}

Returns any instructions from the server along with a dictionary of search key names to their types, and a boolean indicating if the key is mandatory. The following well-known search key names should be used where appropriate:

s:first
The desired contact's given name
s:last
The desired contact's family name
s:nick
The desired contact's nickname
s:email
The e-mail address of the desired contact

Returns

s
A string with any instructions from the server
a{s(bg)}
A dictionary mapping string search key names to an array of:
  • booleans indicating if the search key is mandatory
  • type signature of the value for this search key

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)

GetSearchState ( ) → u

Returns the current state of this search channel object.

Returns

u
The search state represented as one of the values of ChannelContactSearchState

Search ( a{sv}: terms ) → nothing

Send a request to start a search for contacts on this connection. A valid search request will cause the SearchStateChanged signal to be emitted with the status CHANNEL_CONTACT_SEARCH_STATE_DURING.

Parameters

terms - a{sv}
A dictionary mapping search key names to the desired 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)

Signals:

SearchResultReceived ( u: contact, a{sv}: values )

Emitted when a search result is received from the server.

Parameters

contact - u
An integer handle for the contact
values - a{sv}
A dictionary mapping search key names to values for this contact

SearchStateChanged ( u: state )

Emitted when the search state (as returned by the GetSearchState method) changes.

Parameters

state - u
An integer representing the new search state

Interface has no properties.

Enumerated types:

Channel_Contact_Search_State

Channel_Contact_Search_State_Before = 0
The search has not started
Channel_Contact_Search_State_During = 1
The search is in progress
Channel_Contact_Search_State_After = 2
The search has been completed

org.freedesktop.Telepathy.Channel.Type.StreamedMedia

Implementations of this interface must also implement:

A channel that can send and receive streamed media such as audio or video. Provides a number of methods for listing and requesting new streams, and signals to indicate when streams have been added, removed and changed status.

Channels of this type are expected to provide the Group interface and be "anonymous" (have no associated handle). To make a media call to a contact, clients should request a new, empty streamed media channel, then call AddMembers to add the contact to the channel. The local user should be in the group's members, while the contact should be in "remote pending" until the call is accepted, then move to the group's members.

Similarly, incoming calls should be signalled as having handle type 0 and handle 0. The remote contact should be in the group's members, with the local user in the "local pending" members; to accept the call, AddMembers can be used to move the local user to the group's members.

In general this should be used in conjunction with the MediaSignalling interface to exchange connection candidates and codec choices with whichever component is responsible for the streams. However, in certain applications where no candidate exchange is necessary (eg the streams are handled by specialised hardware which is controlled directly by the connection manager), the signalling interface can be omitted and this channel type used simply to control the streams.

Methods:

ListStreams ( ) → a(uuuuuu)

Returns an array of structs representing the streams currently active within this channel. Each stream is identified by an unsigned integer which is unique for each stream within the channel.

Returns

a(uuuuuu)
An array of structs containing:
  • the stream identifier
  • the contact handle who the stream is with (or 0 if the stream represents more than a single member)
  • the type of the stream
  • the current stream state
  • the current direction of the stream
  • the current pending send flags

RemoveStreams ( au: streams ) → nothing

Request that the given streams are removed.

Parameters

streams - au
An array of stream identifiers (as defined in ListStreams)

Possible errors

org.freedesktop.Telepathy.Error.InvalidArgument
Raised when one of the provided arguments is invalid. (generic description)

RequestStreamDirection ( u: stream_id, u: stream_direction ) → nothing

Request a change in the direction of an existing stream. In particular, this might be useful to stop sending media of a particular type, or inform the peer that you are no longer using media that is being sent to you.

Depending on the protocol, streams which are no longer sending in either direction should be removed and a StreamRemoved signal emitted. Some direction changes can be enforced locally (for example, BIDIRECTIONAL -> RECEIVE can be achieved by merely stopping sending), others may not be possible on some protocols, and some need agreement from the remote end. In this case, the MEDIA_STREAM_PENDING_REMOTE_SEND flag will be set in the StreamDirectionChanged signal, and the signal emitted again without the flag to indicate the resulting direction when the remote end has accepted or rejected the change.

Parameters

stream_id - u
The stream identifier (as defined in ListStreams)
stream_direction - u
The desired stream direction (a value of MediaStreamDirection)

Possible errors

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)

RequestStreams ( u: contact_handle, au: types ) → a(uuuuuu)

Request that streams be established to exchange the given types of media with the given member. In general this will try and establish a bidirectional stream, but on some protocols it may not be possible to indicate to the peer that you would like to receive media, so a send-only stream will be created initially. In the cases where the stream requires remote agreement (eg you wish to receive media from them), the StreamDirectionChanged signal will be emitted with the MEDIA_STREAM_PENDING_REMOTE_SEND flag set, and the signal emitted again with the flag cleared when the remote end has replied.

Parameters

contact_handle - u
A contact handle with whom to establish the streams
types - au
An array of stream types (values of MediaStreamType)

Returns

a(uuuuuu)
An array of structs (in the same order as the given stream types) containing:
  • the stream identifier
  • the contact handle who the stream is with (or 0 if the stream represents more than a single member)
  • the type of the stream
  • the current stream state
  • the current direction of the stream
  • the current pending send flags
</