Reimplement TotalDownload functionality
commitfe781e4ce4ace4410bbc8bec441140cfc323d262
authorDan McGee <dan@archlinux.org>
Mon, 2 Jun 2008 04:10:30 +0000 (1 23:10 -0500)
committerDan McGee <dan@archlinux.org>
Wed, 4 Jun 2008 20:38:53 +0000 (4 15:38 -0500)
treecdb570aeb1e475bf3c5543d6548fd4ea26e871db
parent0669c9bfac7aead01f1400444e691d542f7645c2
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>
lib/libalpm/alpm.h
lib/libalpm/handle.c
lib/libalpm/handle.h
lib/libalpm/sync.c
src/pacman/callback.c
src/pacman/callback.h
src/pacman/pacman.c