Telepathy Recipes
Simple overviews of how to accomplish various tasks with the Telepathy API.
Register an account
- Protocols which have accounts that can be registered automatically have a boolean "register" parameter.
Call RequestConnection with register=True.
If Connect() succeeds, registration has succeeded.
- Don't rely on the connection being usable after registretion is finished.
Send a text message
- TODO
Make an audio call
RequestHandle
RequestChannel
(no longer necessary since spec 0.17.6: AddMember)
RequestStreams
handle MembersChanged
handle StreamError
See also: Streamed Media
Block a contact
- TODO
Look for installed connection managers
Call ListNames() and ListActivatableNames() on the D-Bus daemon
Search in the results for names beginning with org.freedesktop.Telepathy.ConnectionManager.
- The rest of the bus name is the connection manager name
tp_list_connection_managers() in telepathy-glib >= 0.7.1 implements this correctly
Reuse an existing connection
Search for names on the bus beginning with org.freedesktop.Telepathy.Connection.
tp_list_connection_names() in telepathy-glib >= 0.7.1 implements this correctly
If you want presence information, you can call GetPresence on the subscribe contact list to get cached presence information

