Being able to observe connections
@gdesmott
Submitted by Guillaume Desmottes Assigned to Telepathy bugs list
Description
Here is a crazy idea I had while waiting for the tube this morning. :)
So, with the explosions of crazy Connection interfaces (Location, Gabble plugins implementing various PEP/pubsub related extensions such as bookmarks sharing, etc) we are going to have more and more external applications interested in observing all the connections without caring about channels.
That's the case for exemple of Azimuth. I wrote a simple ConnectionWatcher object to do just that and I think Alban reused it when adding Location support to map-buddy: https://garage.maemo.org/plugins/ggit/browse.php/?p=azimuth;a=blob;f=src/connection-watcher.c;h=04f4b875a46cf71d9f5b6508785fec165232bde7;hb=HEAD
Of course we could implement such helper in tp-glib and tp-qt4 but maybe we could do that directly in the spec.
What about allowing clients to observe connections? Azimuth could do something like defining
Observer.ObserverConnectionFilter = [ { 'Connection.Status' : CONNECTED } ] Observer.recover = True
we could maybe even define that { 'Connect.Interfaces' : [ Location ] } means that the connection has to support the Location interface.
Then each time a new connection is connected MC would call on the client something like ObserveConnection(o: Account, o: Connection, a{sv}: Observer_Info)
This would make writing clients using connection interfaces much easier to write.
So, crack or not?