summaryrefslogtreecommitdiffstats
path: root/src/pacman/callback.h
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-06-02 06:10:30 +0200
committerDan McGee <dan@archlinux.org>2008-06-04 22:38:53 +0200
commitfe781e4ce4ace4410bbc8bec441140cfc323d262 (patch)
treecdb570aeb1e475bf3c5543d6548fd4ea26e871db /src/pacman/callback.h
parent0669c9bfac7aead01f1400444e691d542f7645c2 (diff)
downloadpacman-fe781e4ce4ace4410bbc8bec441140cfc323d262.tar.gz
pacman-fe781e4ce4ace4410bbc8bec441140cfc323d262.tar.xz
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 <dan@archlinux.org>
Diffstat (limited to 'src/pacman/callback.h')
-rw-r--r--src/pacman/callback.h2
1 files changed, 2 insertions, 0 deletions
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);