[Telepathy] D-tubes howto

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Tue Mar 10 09:57:54 PDT 2009


Le lundi 16 février 2009 à 05:08 +1100, Jiri Baum a écrit :
> Ah, that would be because I was concentrating on one-to-one tubes, which (as 
> far as I know) do not currently work over link-local XMPP. However, I omitted 
> to say that in the document... fixed. Also, I'm concentrating on D-tubes 
> (rather than stream tubes).

Indeed, 1-1 D-Bus tubes are not implemented in Salut atm.

> BTW, on line 54 of your code, should that be "self.bus" rather than "bus", or 
> is there a subtlety that I'm missing?
> 
> 54 	 for conn in Connection.get_connections(bus):

"bus" and "self.bus" are exactly the same are we are still in the
__init__.


> > - You should probably talk about the ContactCapabilities interface.
> > http://telepathy.freedesktop.org/spec.html#org.freedesktop.Telepathy.Connec
> >tion.Interface.ContactCapabilities.DRAFT
> 
> That's an experimental, not-yet-available interface; however, link added.
> 
> > UI should check if contacts support tubes before displaying them. This
> > is implemented only in recent versions of Gabble atm.
> 
> Yeah; I'm not sure how one would do this with the current interface, though.

The only way to do that is to use the ContactCapabilities.DRAFT
interface.

> > - You still use the old tube API. We are currently working on a new,
> > more coherent, API where each tube is a channel.
> 
> Ah. That will make more sense, but it's an experimental, not-yet-available 
> interface; still, links added.

Indeed the API is still a DRAFT but that's definitely the way to go. I
think you should use it in your example.


> Probably the most embarrassing weakness of the example right now is the error 
> message, "Alice offered you an invitation, but you don't have the needed 
> external application to handle it." How do I tell telepathy that I'm handling 
> the tube and that it shouldn't do that, please?

You need to implement a tube handler in your application.
See [1] for its current API.

Friends of mine are implementing a small board game and recently added
1-1 D-Bus tube support in this branch [2]. If's work in progress but
working. That would probably interest you.

Be sure to have a recent Gabble (implementing new tube API) and Empathy
if you want to test.

Regards,

	G.

[1]
http://git.collabora.co.uk/?p=empathy.git;a=blob;f=extensions/Tube_Handler.xml;h=30848d94fe8b6b18d62ba185952e7de14188dbc2;hb=HEAD
[2] https://code.launchpad.net/~pyhalebarde/pyhalebarde/tubes




More information about the telepathy mailing list