File Transfers in Preview Release

Olli Salli olli.salli at collabora.co.uk
Tue Apr 5 09:28:29 CEST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05.04.2011 10:23, Olli Salli wrote:
> On 05.04.2011 03:25, Daniele E. Domenichelli wrote:
>> On 04/05/2011 02:09 AM, Daniele E. Domenichelli wrote:
>>> The idea was to replace it with a HandleFileTransferJob that implements
>>> a Tp handler both for incoming and outgoing file transers (see the
>>> implementation of HandleP2PDBusTubeJob vs. Accept/OfferDBusTubeJob).
> 
> 
>> It should have been HandleFileTransferJob that implements a Tp handler
>> both for incoming and outgoing file transfers and a
>> RequestFileTransferJob to initiate a file transfer (see
>> Handle/RequestP2PDBusTubeJob vs. Accept/OfferDBusTubeJob).
> 
> 
> Btw, implementing things like RequestFileTransferJob is much easier now
> that we have the Request & Handle API in tp-qt4. The request & handle
> variants of the Account channel request methods, such as
> createAndHandleFileTransfer(), handle the complexity of dealing with the
> channel dispatcher, being a suitable Handler etc internally. You just
> fire the channel request, and when it comes back successfully, you have
> a channel which you're guaranteed to (secretly) be the handler of i.e.
> nobody else is handling it. This essentially matches the apparent
> convenience of the naive approach of requesting channels directly from
> the Connection bypassing the CD.
> 
> Br,
> Olli

Well, now that I think of it (based on the other mail) you might indeed
want to perform both receiving and sending files in the same
background-ish Handler, but invoke that handler for sending files from
multiple applications (at least the contact list, but possibly some
contact context menu actions from multiple places where contacts are
shown too) . In that case, you should indeed still just have a "request
a file transfer, but forget it, and let its usual Handler do its thing"
job, which'd use the older request-but-not-handle API.

Br,
Olli
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNmsSdAAoJEAQQkupGanj4Zn0H/2FPYF+Oxzmtb+GJxbDyJizm
ALG2SVTj+yUvfVbXRFNAxfUOmbBPhuPXBHGv5yERAspZGXSnrYIkl4xSGK5Otl3U
243iYWkJUiIKJfQw/JFlaYTZ8eCSvs7Gx6uyf8tDZnTMYfRBZn322lWbpK7oXIDD
DZ1B9nZpuMXhHzhnwZ6nAn2L5GillplplgRl5qtQ3/mYCxkgdHvItigSrYkhaewW
3rdc6pn3/6AzOJLFYLpojGW3Lpyaiw85mrs6RBBASoa/krSpT5Zvd/0vR/q4uzvr
i81UGENlO7sUrsKerWCoB3UPZxXHg4ivD8X7/aqKwZDqKlP4rCKuW0WOeXlrl+I=
=eAUZ
-----END PGP SIGNATURE-----


More information about the KDE-Telepathy mailing list