On Thu, Feb 19, 2009 at 12:55 AM, Sebastian Nowicki <[email protected]> wrote:
> This allows a frontend to define its own download algorithm so that the
> libfetch dependency can be omitted without using an external process.
> The callback will be used when if it is defined, otherwise the old
> behavior applies.
I like this, but my first thought is: why not extrapolate our current
downloading as a "fetch callback" too? That way the check just needs a
"!= NULL" before calling it, and it can be done on config parsing:
//in initialization
#ifdef INTERNAL_DOWNLOAD
fetchcb = internal_fetch;
#else
fetchcb = NULL;
#endif
...
...
// in config parsing
if(strcmp(blah, "XferCommand") == 0) {
fetchcb = use_xfercommand;
}
_______________________________________________
pacman-dev mailing list
[email protected]
http://www.archlinux.org/mailman/listinfo/pacman-dev