[Telepathy] API Draft for high level tubes in tp-qt4

Andre Moreira Magalhaes andre.magalhaes at collabora.co.uk
Mon Apr 19 10:57:40 PDT 2010


On 18/04/10 10:09, Dario Freddi wrote:
> Hello all,
>
> as discussed with Andre on IRC, I drafted a small API for managing Tubes in
> tp-qt4 (see attachment). There's really nothing fancy here: it's a quite
> straightforward mapping of the spec to a Qt-like API, and it's mostly what tp-
> glib does as well.
>
> Still, I'd find it cool to provide a function returning a QAbstractSocket for
> StreamTubes and a QDBusConnection (or a DBusProxy) for DBusTubes to make it
> extremely easy to use the opened tube. I'd like some feedback on that though,
> since I don't know how much it would be feasible.
>
>    

I like the overall idea, but I would change some things as:
- ST and DT should be implemented similarly to FileTransfer channels 
where we have Incoming/Outgoing channels depending on the requested 
property of the channel.
- For ST you probably want to return a QIODevice on accept, or a 
PendingIODevice (you name it) of some sort, so you can instantiate a Qt 
Socket object (QLocal/Tcp/UdpSocket) depending on the type of the socket.

You may want to check how FT is implemented in tp-qt4 and get some ideas 
from there.

BR
Andre


More information about the telepathy mailing list