Syllable Forum Index Syllable
Syllable Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FTP Client: progress update
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Syllable Forum Index -> Community Project
View previous topic :: View next topic  
Author Message
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Sun Oct 26, 2008 5:47 pm    Post subject: Reply with quote

I've posted a new version to the wiki, with improved address validation, command line parameters and very thorough doxygen documentation, all thanks to Animeaholic! [url=http://forum.syllable.org/pmwiki/pmwiki.php?n=Projects.FTPClient]Grab the source from the wiki page[/url] and check out the documentation in Transferrer/html.

If you're looking for something to work on, check out the todo list in Transferrer/html/todo.html or the bugs list in bugs.html (in the source zip). The core developers are busy at the moment trying to get Syllable 0.6.6 finished and ready to release, so now is a great chance to contribute - there's lots of things, big and small, on the todo list!
Back to top
View user's profile Send private message Visit poster's website
animeaholic



Joined: 27 Sep 2008
Posts: 5

PostPosted: Thu Oct 30, 2008 10:46 pm    Post subject: Progress Window Reply with quote

So I was considering how to do the progress window, and I was thinking that since we have the information of the current upload/download amount and the order of items in the queue it would be good for the window to show both aggregate information about the files and individual information.

Currently I've been thinking of setting it so that MainWindow creates the ProgressWindow and then periodically, ProgressWindow sends an update message which MainWindow responds to by calling the ProgressWindow's "update" procedure. Using the messaging, it would also be possible to send messages for other changes to the queue such as suspending downloads and re-ordering the queue.

The update could be performed by the MainWindow by passing a struct containing all of the information we want (queue number, source location, destination location, upload completion, download completion, etc.)
Back to top
View user's profile Send private message
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Fri Oct 31, 2008 8:07 am    Post subject: Reply with quote

[quote]since we have the information of the current upload/download amount and the order of items in the queue it would be good for the window to show both aggregate information about the files and individual information.[/quote]
Great! Yeah, that sounds good.

[quote]Currently I've been thinking of setting it so that MainWindow creates the ProgressWindow[/quote]
That makes sense.

[quote]periodically, ProgressWindow sends an update message which MainWindow responds to by calling the ProgressWindow's "update" procedure.[/quote]
Since the GUI and the backend are event-driven, it shouldn't be necessary to do periodic updating - instead, we could have the backend send a notification to the progress window whenever a transfer's status changes. See for instance QueueNode::ProgressBar().
Practically, I think libcurl simply calls ProgressBar periodically, so we'd effectively have periodic updating anyway. But if we can let libcurl take care of that, it saves us some effort!!

[quote]Using the messaging, it would also be possible to send messages for other changes to the queue such as suspending downloads and re-ordering the queue.[/quote]
Yep.

[quote]The update could be performed by the MainWindow by passing a struct containing all of the information we want (queue number, source location, destination location, upload completion, download completion, etc.)[/quote]
This information is already stored by the Server class in the QueueNode objects. So all that really needs to be provided to the ProgressWindow is the QueueNode's id number - knowing that, the ProgressWindow should be able to get the necessary information from the Server object. I think we'll need to add a Server::GetNodeInfo( int nID ) method, or something like that, though.

The reason for using an id number to access the QueueNodes is to simplify concurrency issues - if the GUI classes have pointers to the QueueNodes then we have to be careful about deleting QueueNodes when their transfer finishes. However if the gui can't access the QueueNodes directly, but only via the Server class using the id number, then the concurrency concerns are limited to the Server class.

I'm going to check the code in to Sourceforge cvs under the "syllable-net" project (that's a spare Sourceforge project we've had lying around and haven't had need for, until now Smile ) I'll post back with instructions for how to get the code, when it's checked in.
Back to top
View user's profile Send private message Visit poster's website
EdG



Joined: 20 Dec 2007
Posts: 116

PostPosted: Fri Oct 31, 2008 4:46 pm    Post subject: Reply with quote

Why are you not using ncftp or gftp? Both awesome ftp programs... hell you could probably write a syllable frontend to ncftpget ncftpput and ncftpls in very little time or send jobs through batch mode. I'm pleased to see your efforts but there is good software out there already that does this, everything from smartftp to cute, ws, leech, leap, ftpziller or whatever it was called. It must be easier to port an ftp client than other software there are thousands of the damn things not to mention people get to hear about syllable's gui on a popular project's website.
Back to top
View user's profile Send private message
Vanders
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 849

PostPosted: Fri Oct 31, 2008 5:15 pm    Post subject: Reply with quote

[quote="EdG"]Why are you not using ncftp or gftp? Both awesome ftp programs... hell you could probably write a syllable frontend to ncftpget ncftpput and ncftpls in very little time...[/quote]

You could use libcurl even. That's a great library for this sort of thing and very powerful. All you have to do is write a front end for it!

Oh wait, that's exactly what Transferrer is...
Back to top
View user's profile Send private message Send e-mail
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Sat Nov 01, 2008 6:02 am    Post subject: Reply with quote

[quote]I'm going to check the code in to Sourceforge cvs[/quote]
There are a couple of bugs in Syllable 0.6.5 which mean that Transferrer won't work (reliably) on Syllable 0.6.5 or older (*). Rather than check in code containing workarounds, etc, I think it's best to wait until 0.6.6 is released; then we can use the proper makefile, etc from the start. So I might leave this for now.
If anyone wants to work on Transferrer, just grab the code from [url=http://forum.syllable.org/pmwiki/pmwiki.php?n=Projects.FTPClient]the wiki page[/url] and get cracking! Send me (anthony at syllable.org) any updates and I'll merge them and upload it to the wiki for now.


(*): The bugs are:
1. libcurl uses the clock_gettime() function which is only implemented in Syllable 0.6.6. It results in dropped connections on Syllable 0.6.5. To get Transferrer working on 0.6.5 you need to statically link it with a fixed libcurl.
2. A bug in os::Spinner, not sending the new value in its status changed messages. This means that the maximum simultaneous connections menu item doesn't work in 0.6.5.
Back to top
View user's profile Send private message Visit poster's website
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Tue Dec 30, 2008 6:36 pm    Post subject: Reply with quote

[b]Update:[/b] there's a new development build of Transferrer [url=http://forum.syllable.org/pmwiki/pmwiki.php?n=Projects.FTPClient]on the wiki page[/url].

Some additions include:
* progress window (still very buggy)
* pausing, resuming & cancelling transfers
* saving settings
* can use passive or active ftp mode

Thanks to animeaholic for the progress window and other improvements!

If you find any problems with it (apart from the progress window which is still very buggy mostly because of [url=http://development.syllable.org/documentation/API/LibSyllable/classos_1_1ListView.html]ListView[/url]), run it from the terminal, enable debugging mode from the settings menu, and post the relevant output here along with a bugreport.

Happy new year!!
Back to top
View user's profile Send private message Visit poster's website
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Fri Jan 02, 2009 4:57 pm    Post subject: Reply with quote

I posted another update on [url=http://forum.syllable.org/pmwiki/pmwiki.php?n=Projects.FTPClient]the wiki page[/url]: you can now create directories and delete & rename files, by rightclicking in the remote icon pane.
Back to top
View user's profile Send private message Visit poster's website
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Sun Jan 18, 2009 5:33 am    Post subject: Reply with quote

The Transferrer code has been (finally!) uploaded into cvs. You can browse the source [url=http://syllable-net.cvs.sourceforge.net/viewvc/syllable-net/Transferrer/]here[/url] ('syllable-net' is just a spare sourceforge project we had lying around). If you want to get the latest source, here's the command:
[code:1]cvs -d :pserver:[email protected]:/cvsroot/syllable-net checkout Transferrer[/code:1]
This will create a directory Transferrer and download the latest source files into it. To build Transferrer, open the Transferrer.side file in [url=http://web.syllable.org/Syllable/applications.html#list]sIDE[/url] and choose 'Make' from the Build menu. Alternately, just run 'make' from the terminal in the Transferrer dir. To build the doxygen documentation, run 'doxygen' from the Transferrer dir.

Unfortunately the current code won't work on Syllable 0.6.5; you'll need a [url=http://development.syllable.org/pages/development-builds.html#Desktop]recent 0.6.6 dev build[/url] (because of libcurl and libsyllable bugs in older versions).
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Syllable Forum Index -> Community Project All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group