Bug 22008

Summary: Connection class doesn't provide interface to list connection's channels
Product: Telepathy Reporter: Alexander Shalamov <alexander.shalamov>
Component: tp-qtAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Alexander Shalamov 2009-05-30 14:53:29 UTC
Tp::Connection class doesn't provide interface to list it's channels. Currently, only dbus properties and low-level telepathy-qt4 interfaces could be used to get connection's channels.

Why such interface is needed:

When channels are observed and process that was observing channel dies (or started after channel was created) and then restarts, only way to continue observing is to get account->connection->channel and then observe channel.

There should be an interface in Tp::Connection class that would provide list of channels associated with that connection.
Comment 1 Simon McVittie 2009-06-01 06:04:34 UTC
If an Observer wants to observe all channels, it should be service-activatable (have a .service file in a location recognised by dbus-daemon). If it is, then the channel dispatcher will launch it automatically whenever appropriate, and it will never have to "catch up".

Observers only observe channel creations; the observer is assumed to not exit until it wants to exit. If this is not the case (e.g. a crash), fix your observer :-)
Comment 2 Simon McVittie 2010-06-14 08:20:00 UTC
(In reply to comment #0)
> When channels are observed and process that was observing channel dies (or
> started after channel was created) and then restarts, only way to continue
> observing is to get account->connection->channel and then observe channel.

Since Bug #27677 was closed, best-effort crash recovery can be achieved by setting the Recover flag on your Observer.

Instead of listing the channels, the replacement Observer will be started and notified by Mission Control; this isn't exactly the same as the feature that was initially requested, but I think it solves your use-case better.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.