File Sharing

From PsiWiki

This is a page about file sharing in Psi.

Instead of select a file and a contact to send this file to, I would like to select a set of file I agree to share and let my contacts view the list of my shared files and then let them download them when I'm online.

I requested this feature in the Psi forum

This feature requires AdHoc Commands (JEP-0050). Another feature (Remote_Controlling JEP-0146) also requires AdHoc Commands.

Contents

Protocol

I'm not sure of all the protocol but:

Image:psi_file_sharing_protocole.png

(source OOo2)

Screenshots

Alice

First, Alice chooses the files to share
Enlarge
First, Alice chooses the files to share

In this sccnario, Alice wants to share some files, and Bernard will download them.

First, Alice chooses the files to share.

And then, Alice drags and drops Bernard's name in the Jabber ID field.
Enlarge
And then, Alice drags and drops Bernard's name in the Jabber ID field.

And then, Alice drags and drops Bernard's name in the Jabber ID field.

Bernard

Bernard is browsing Alice's list of shared files.
Enlarge
Bernard is browsing Alice's list of shared files.

Bernard is browsing Alice's list of shared files.

And it works ;-)

Patches

I'm a newbie with Darcs...

What do you think about this feature?

Patch v1 - 2006-01-08

I started to write something based on the last Darcs code and the patches Norman posted on Remote_Controlling. My patch psi_file_sharing.patch is far to be ready...

  • First draft

Patch v2 - 2006-01-11

This patch replace the previous patch. Do not try to apply both patch version1 and patch version2!

psi_file_sharing-v2.patch

  • Remove some useless printf
  • In "File Sharing Manager", the buttons "Modify" and "Remove" work

Patch v3 - 2006-01-14

This patch replace the previous patch. Do not try to apply both patch version3 and a previous patch!

psi_file_sharing-v3.patch

  • Show a "file selection" window for choosing the file.
  • Window for modifying the ACL. The user can choose a set of contacts that can download each file.

Still to be done

  • Store the list of shared files somewhere in ~/.psi/profiles/default/config.xml to avoid to set at each startup the list of shared files.
  • When the user want to download a bad file, show a window saying "you can't download that" instead of silently ignore the user request.
  • ACL: borbide the download if the checkbutton is not checked. And make sure the user understand what is this check button. (?)
  • Get icons somewhere for the buttons
  • Check that this feature is secure: I remove a big security warning comment in the code. I don't want that any contact can download any file ;-)

How to build this feature?

JEP

JEP-0004 Data Forms

JEP-0050 Ad-Hoc Commands

JEP-0096 File Transfer

JEP-0146 Remote Controlling Clients