Re: Some suggestions

"Rodolfo Borges" <[email protected]> Tue, 15 Aug 2006 00:08:29 -0300
Newsgroups gmane.network.lftp.devel
Message-ID <[email protected]>
> On Fri, Dec 02, 2005 at 10:16:28AM -0500, Grenier,Michel [CMC] wrote:
> >                   errcod = lftp_sendcmd(cmd)
> >                   if( errcod != 0 )
> > fprintf(stderr,"%s",lftp_errstring(errcod));
> >                   }
> >
> >             errcod = lftp_cleanout()
> >             exit(errcod)
> >
> >           Your main would link lftplib.dll or lftplib.a or
> > lftplib.so... whatever ...
> >           Than with documented library modules and error codes....
> > Everything would be perfect.
>
> I think it is good enough already. There is CmdExec class which is fed with
> commands (compare with your lftp_sendcmd).
>
> You can load any custom module into lftp like this:
>
>         lftp -c module /lib/module_name.so args...
>
> The module will be loaded into lftp address space and module_init will be
> called with the arguments. Then you can do practically anything. E.g. create
> CmdExec and pass some commands to it.
>
> The only caveat is cooperative threading model used by lftp. It was recently
> discussed on lftp-devel, see mail archives.
>
> --
>    Alexander.


Does that mean one can easly make an interface for lftp to act as a
download manager?

It would be great to have a single lftp running on a screen(1),
controlling all my downloads, but it manually added from inside lftp
itself, or from a link from the web browser, or other external
application.

-- 
Rodolfo Borges