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 --- lib/libalpm/handle.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/libalpm/handle.h') diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h index 9c537b14..bec0a6f1 100644 --- a/lib/libalpm/handle.h +++ b/lib/libalpm/handle.h @@ -39,6 +39,7 @@ typedef struct _pmhandle_t { /* callback functions */ alpm_cb_log logcb; /* Log callback function */ alpm_cb_download dlcb; /* Download callback function */ + alpm_cb_totaldl totaldlcb; /* Total download callback function */ /* filesystem paths */ char *root; /* Root path, default '/' */ -- cgit v1.2.3-24-g4f1b