Developer Reference

Review: D-Bus

Programs communicating via D-Bus connect to a shared bus. Telepathy generally uses the session bus. Each program is given a unique name when it connects to the bus. Programs may additionally try to claim a name that other programs can identify it by. These are often referred to as service names or well-known names. The automatically allocated names are analogous to IP addresses; service names are analogous to domain names.

http://people.collabora.co.uk/~daf/ref/bus.png

Each program on the bus can export objects. Each object has a number of interfaces. Each interface has a collection of methods and signals. Each object is identified by its object path. Service names, objects paths and interface names are typically prefixed with domain names to avoid naming conflicts.

Examples:

http://people.collabora.co.uk/~daf/ref/bus-concepts.png

Concepts

The Telepathy interface has three main kinds of object: connection managers, connections, and channels. Connections are obtained from connection managers (using the RequestConnection method), and channels are obtained from connections (using the RequestChannel method).

Connection managers have to provide one interface: org.freedesktop.telepathy.ConnectionManager. Similarly, connections have to provide one interface: org.freedesktop.telepathy.Connection. Channels always provide at least two interfaces: org.freedesktop.telepathy.Channel, and another interface according to which type of channel it is. For instance, a text channel provides the org.freedesktop.telepathy.ChannelType.Text interface.

Connections and channels often support multiple optional interfaces. The org.freedesktop.telepathy.Connection and org.freedesktop.telepathy.Channel interfaces both provide a GetInterfaces method, which returns a list of interfaces that the object supports.

To do

Things to document: