[Telepathy] Spec advice needed: ChannelDispatcher.DelegateChannels() and PresentChannel()

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Wed Apr 13 01:35:22 PDT 2011


Hi everyone,


Improving gnome-shell's Telepathy integration is one of the thing on top
of my TODO list for 3.2. In order to do that, Shell's message tray will
become a Telepathy Handler (easy) and has to be able to re-dispatch
handled channels to Empathy (when user clicks in the inside of the box).

That's currently not supported by Telepathy so I started drafting a new
ChannelDispatcher API to do that: DelegateChannels(). While I was on it,
I also introduced PresentChannel() which is equivalent of re-ensuring a
channel in order to force HandleChannels() being re-called on its
handler.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=25293
branch:
http://git.collabora.co.uk/?p=user/cassidy/telepathy-spec;a=shortlog;h=refs/heads/re-handle-25293
html:
http://people.freedesktop.org/~gdesmott/telepathy-spec-re_handle_25293/spec/Channel_Dispatcher.html#Method:DelegateChannels


I'm currently facing 2 issues with these new API:


Should we allow to pass Hints? And if we do, how the user would get
them? One option would to create a ChannelRequest (as we do when
requesting new channels) but that sounds like a CR abuse to me.

See the bug for the full discussion; a small summary:
"""
Don't use CR
============

- Current approach in my branch/html file.
- Make things easier to use.
- The main (only) problem is how to pass the Hints to the Handler. Using
Handler_Info is handy but means we have 2 code paths to find Hints
(sadface).

Use CR
======
- DelegateChannels() and PresentChannel() returns a CR.
- We have to change the description of ChannelRequel.
- Should user call CR.Proceed()?
- What would contain CR.Requests? The properties of the channel(s)?
"""

The other issue is about updating the Handler.HandledChannels property:
"""
Humm I thought about a potential issue with DelegateChannels(). Handlers
are supposed to announce the channels they are handling in
Handler.HandledChannels
[1].

In practice clients don't have to care as TpBaseClient (or the tp-qt4
equivalent) transparently does it for them. We'll have to make sure that
TpBaseClient is informed when a channel is delegated as it'll have to
remove the channel from the HandledChannels list.
Maybe we should announce that on D-Bus? Another option would be to hook
the tp-glib DelegateChannels API with TpBaseClient but that sounds
pretty fragile a bit hacky to me.

[1]
http://telepathy.freedesktop.org/spec/Client_Handler.html#Property:HandledChannels
"""


I'd really like to move forward on this spec, so any advice or
suggestion is really welcome.

Thanks!


	G.



More information about the telepathy mailing list