summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/acquire.cc')
-rw-r--r--apt-pkg/acquire.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index 221276597..2e8a05e2c 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire.cc,v 1.30 1999/03/16 07:28:45 jgg Exp $
+// $Id: acquire.cc,v 1.31 1999/03/27 03:02:38 jgg Exp $
/* ######################################################################
Acquire - File Acquiration
@@ -420,6 +420,18 @@ unsigned long pkgAcquire::FetchNeeded()
return Total;
}
/*}}}*/
+// Acquire::PartialPresent - Number of partial bytes we already have /*{{{*/
+// ---------------------------------------------------------------------
+/* This is the number of bytes that is not local */
+unsigned long pkgAcquire::PartialPresent()
+{
+ unsigned long Total = 0;
+ for (pkgAcquire::Item **I = ItemsBegin(); I != ItemsEnd(); I++)
+ if ((*I)->Local == false)
+ Total += (*I)->PartialSize;
+ return Total;
+}
+ /*}}}*/
// pkgAcquire::UriBegin - Start iterator for the uri list /*{{{*/
// ---------------------------------------------------------------------
/* */