From fe781e4ce4ace4410bbc8bec441140cfc323d262 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 1 Jun 2008 23:10:30 -0500 Subject: Reimplement TotalDownload functionality Add a new totaldlcb callback function to libalpm and make pacman utilize it when the TotalDownload option is enabled. This callback function is pretty simple- it is meant to be called once at the beginning of a "list download" action, and once at the end (with value 0 to indicate the list has been finished). The frontend is responsible for keeping track of adding individual file download amounts to the total xfered amount in order to display some sort of overall progress. Signed-off-by: Dan McGee --- src/pacman/callback.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/pacman/callback.h') diff --git a/src/pacman/callback.h b/src/pacman/callback.h index 28d396e8..2961be84 100644 --- a/src/pacman/callback.h +++ b/src/pacman/callback.h @@ -34,6 +34,8 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2, void cb_trans_progress(pmtransprog_t event, const char *pkgname, int percent, int howmany, int remain); +/* callback to handle receipt of total download value */ +void cb_dl_total(off_t total); /* callback to handle display of download progress */ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total); -- cgit v1.2.3-24-g4f1b