Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/dload.h
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2011-03-21 16:54:00 -0400
committerDan McGee <dan@archlinux.org>2011-03-27 20:12:17 -0500
commit283bf7e87cab1fa187334830fe2d05dd28bc5b77 (patch)
tree27ff66e0a3a6db3e702088137b96618782b27013 /lib/libalpm/dload.h
parent86e7f6075671e08c456f389d8ecba47190c03f0f (diff)
lib/dload: pass a struct with filename and size to curl_progress
This lets us determine the real size of the file on disk so that we can properly bump the progress bar when we're resuming a download. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/dload.h')
-rw-r--r--lib/libalpm/dload.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libalpm/dload.h b/lib/libalpm/dload.h
index e8d99b23..5ce44b8a 100644
--- a/lib/libalpm/dload.h
+++ b/lib/libalpm/dload.h
@@ -25,6 +25,12 @@
#include <time.h>
+/* internal structure for communicating with curl progress callback */
+struct fileinfo {
+ char *filename;
+ double initial_size;
+};
+
int _alpm_download_single_file(const char *filename,
alpm_list_t *servers, const char *localpath,
int force);