index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Anatol Pomozov <anatol.pomozov@gmail.com> | 2020-05-05 19:50:51 -0700 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2020-05-09 11:58:21 +1000 |
commit | c78eb48d915dc22146073162dda08ddf73c4a508 (patch) | |
tree | 9daffa23a059dc690cb2d43a0d234f79932b0dab /src/pacman/callback.c | |
parent | 64c4669f579dc5ad8d05329abffbd752ad0ed8f2 (diff) |
-rw-r--r-- | src/pacman/callback.c | 10 |
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index a129758b..613d59d4 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -648,7 +648,7 @@ 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) +static void dload_progress_event(const char *filename, off_t file_xfered, off_t file_total) { static double rate_last; static off_t xfered_last; @@ -858,6 +858,14 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total) return; } +void cb_download(const char *filename, alpm_download_event_type_t event, void *data) +{ + if(event == ALPM_DOWNLOAD_PROGRESS) { + alpm_download_event_progress_t *progress = data; + dload_progress_event(filename, progress->downloaded, progress->total); + } +} + /* Callback to handle notifications from the library */ void cb_log(alpm_loglevel_t level, const char *fmt, va_list args) { |