[Telepathy] Telepathy Streamtubes

Olli Salli ollisal at gmail.com
Fri Dec 30 10:29:44 PST 2011


Hi,

unfortunately, that's not very well supported by current tp-qt API.
There is a wrapper API for DBusTube channels awaiting to be merged at
https://bugs.freedesktop.org/show_bug.cgi?id=28366 but even that is
well below the convenience level offered by StreamTubeServer/Client
for Stream tubes. So I suggest you use stream tubes with tp-qt >=
0.8.0, or use tp-glib which has better support for dbus tubes at the
moment.

On Mon, Dec 26, 2011 at 10:48 AM,  <Sonal.Shirwant at tieto.com> wrote:
> Hi,
>
> I want to create and offer a D-bus tube in Qt. I am not getting any example code for same. Can you please help.
>
> Regards,
> Sonal
> ________________________________________
> From: Olli Salli [ollisal at gmail.com]
> Sent: Thursday, November 10, 2011 1:53 PM
> To: Shirwant Sonal
> Cc: telepathy at lists.freedesktop.org
> Subject: Re: [Telepathy] Telepathy Streamtubes
>
> On Thu, Nov 10, 2011 at 8:46 AM,  <Sonal.Shirwant at tieto.com> wrote:
>> Hi,
>>
>> I am creating telepathy client application. I am using jabber protocol (gmail) for accounts. On receiver side Channel dispatcher invokes handleChannels() function. Is there any way I can get the sender email id information from the incoming stream tube channel at receiver side before the connection is accepted by receiver.
>>
>> Regards,
>> Sonal
>> _______________________________________________
>> telepathy mailing list
>> telepathy at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/telepathy
>>
>
> The Handler shouldn't be the component approving or rejecting incoming
> stream tube requests. You should have an Approver
> (http://telepathy.freedesktop.org/spec/Client_Approver.html) which
> makes the decision, and calls HandleWith with the appropriate Handler
> (the Channel Dispatcher will give it suggestions, for stream tubes
> usually exactly the one Handler capable of handling tubes with that
> Service). The Approver usually is a separate process but can of course
> be a part of the same process as the Handler as well.
>
> As for digging "the email ID" out of a channel to approve in the
> Approver - for P2P tubes the remote contact's unique ID can be
> inspected using the targetId() accessor of the stream tube channel (in
> the channels() of the dispatch operation you receive in
> addDispatchOperation()). This is of course the unique ID in the IM
> network - probably a Jabber ID for you - not always an email address!
> If you need the email address (for sending email...) you must fetch
> that successively from the ContactInfo (essentially a VCard
> representation) of the corresponding Tp::Contact, or by digging up a
> metacontact by matching the Jabber ID from whatever your platform uses
> as the address book (out of scope for Telepathy).
>
> From saying "handleChannels()" with that capitalization I can infer
> you're using tp-qt4. Current tp-qt4 git master has the much higher
> level StreamTubeServer and StreamTubeClient APIs for implementing the
> Handler which you could use, if you did approval properly in the
> Approver component. For some reason this hasn't yet been in a public
> tp-qt4 release, although the API has been merged for a month now
> (?!?). I'll try to make one happen.
>
> --
>
> Br,
> Olli Salli


More information about the telepathy mailing list