File Transfer Handler

Daniele E. Domenichelli daniele.domenichelli at gmail.com
Sat Apr 23 18:17:33 CEST 2011


Hi all,

Since I'll have some free time (not much but still better than no free
time at all), I would like to offer for the file transfer handler, since
I already worked on file transfers for last years GSoC.
The meeting minutes reports that it was supposed to be written by LuHe &
d_ed, but d_ed is not working on it yet and I couldn't get any reply
from LuHe on IRC. So LuHe, if you read this, let me know if you already
started and if you agree with me taking this task. :-)

Most of the work about the file transfer "daemon" is just to take some
parts from the library (the KJob performing the file transfer) and the
old example (still in the svn repository) and convert the old code to
use the channel factory.
In my opinion the file transfer handler should just be a small daemon
that starts a KJob (that gives you automatically a feedback in your
notification area about the status of the transfer, etc).

What requires more attention is the user interaction:
Assuming that the approver should just show the choice to accept/reject
the file:

 - /Where is the file saved?/
 - /What happens if a file with the same name already exists?/

Options:

1) The handler uses a configured folder, doesn't show anything to the
user and renames automatically the file if it already exists.

2) The handler uses a configured folder, and shows a dialog to choose
overwrite/rename like the one you get if you try copy a file that
already exists in kde. This is probably doable using kio::job, but I
didn't investigate yet (try "kioclient copy fish://localhost/test test")

3) The handler shows a popup for choosing the folder every time and
possibly also a popup for overwriting/renaming the file.

In my opinion the 2nd option is the best, because the user usually just
wants to click accept and receive the file.
Anyway he might want to specify the default download directory and
sometimes also specify it when a new file transfer is received.
So, there should be some option
 1) to set the default directory
 2) to change it when a new file transfer is received.

Where should these option be?

The first should probably be in some kcm module, I'm not completely sure
if it should be in the *kcm_telepathy_accounts* module, but I don't want
one new module just for one option and that's the only one we have at
the moment. The alternative is to let the user choose the download
directory _only_ when a new file is received.

About the second I vote to show an option in the *approver* popup,
because otherwise the user will have to click two different dialogs, the
first to accept the file transfer and the second to accept the download
directory.


What do you think?

Cheers,
 Daniele


More information about the KDE-Telepathy mailing list