This is the webpage for Transferrer, a GUI-based FTP app for Syllable OS.
Update (22 July 2011): A new build is available! This build includes overwrite and error notifications, and saving of the previous server address & login details. Get it here. (Requires Syllable 0.6.6).
Enabling the 'Debug mode' option in the settings menu will print out extra debug messages to the terminal.
The source code is available in CVS. Browse it here.
Here is the todo list - the main thing remaining is proper error handling.
Here is a screenshot (as of 18th September 2008).
To contribute, you'll need the Syllable development packages.
Some useful links:
A short description of the backend:
- Server class represents the current server. It owns a TransferThread which does all the work for this server. It has a list of Jobs which are the queued transfers to and from this server. It doesn't store things like connection status (currently) since libcurl manages all that internally. One task of Server is to parse the text of a directory listing and send the parsed data to the RemoteView. We do that here because different protocols may have different listing formats.
- Job and subclasses DownloadJob, UploadJob, DirListJob etc - this represents a single (queued or active) task between us and the server. It contains the local and remote filenames and some status info. It also performs the reading & writing to disk for libcurl by Read(), Write() etc, via the callback functions ReadCallback() etc. The DirListJob class is because of how libcurl handles directory listings. If you want a dir listing from libcurl, you ask it for ftp://server.com/dir/ just like any other url, and it gives you the text of a dir listing like you would get from 'ls -l'. DirListJob represents this transfer, and passes the data it receives to Server::ParseDirList() which does the parsing and sends it to the remoteview. Several other classes inherit from DirListJob, such as RecursiveDownloadJob. There is also a CommandJob (and classes inheriting from it) whose task is to execute a sequence of FTP commands on the remote server, eg to delete a file.
- TransferThread - this is the only thread that does any work for the server, including all the transferring via libcurl curl_multi_perform() etc. Since libcurl uses c-style functions like select() rather than libsyllable-style, we can't communicate with the transfer thread using normal Syllable messages (unless someone can think of a trick!). Thus we have to write our own communication for sending messages (like 'add transfer', 'pause transfer' etc) to the transfer thread. This is done in SendMessage() etc via _Notify() and _ProcessMessages(). Note that only the TransferThread can modify any of the data in the Server object or the Jobs. This way we won't have problems with a GUI thread modifying something while the transfer thread is using it.
Some things that need to be done with the GUI:
Some other ideas (for later):
- include a small progress bar at the bottom of a file's icon in the iconviews
- save a history of server addresses
Thanks to the following people for contributions:
- Rui Cariade (NecroRomancer)
- Rick Caudill
- Jonas Jarvoll (for the original AddressField code)
- Matthew Knowles (animeaholic)