From 9579879b1bb1a033e846b750769215b7b4066073 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 21 Apr 2011 18:31:19 -0500 Subject: libalpm/dload: major refactor of signature downloading There's a lot of related moving parts here: * Iteration through mirrors is moved back to the calling functions. This allows removal of _alpm_download_single_file and _alpm_download_files. * The download function gets a few more arguments to influence behavior. This allows several different scenarios to customize behavior: - database - database signature (req'd and optional) - package - package via direct URL - package signature via direct URL (req'd and optional) * For databases, we need signatures from the same mirror, so structure the code accordingly. Some-inspiration-from: Dave Reisner Signed-off-by: Dan McGee --- lib/libalpm/dload.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/libalpm/dload.h') diff --git a/lib/libalpm/dload.h b/lib/libalpm/dload.h index 324bd118..f4fd14cd 100644 --- a/lib/libalpm/dload.h +++ b/lib/libalpm/dload.h @@ -31,12 +31,8 @@ struct fileinfo { double initial_size; }; -int _alpm_download_single_file(const char *filename, - alpm_list_t *servers, const char *localpath, - int force); - -int _alpm_download_files(alpm_list_t *files, - alpm_list_t *servers, const char *localpath); +int _alpm_download(const char *url, const char *localpath, + int force, int allow_resume, int errors_ok); #endif /* _ALPM_DLOAD_H */ -- cgit v1.2.3-24-g4f1b