X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b0db36b1ac7a93c147888aa98f9431e8bcc7d36e..36f610f18a9a12c02ba89c6bb84726f7ed3ba7ad:/apt-pkg/acquire.cc?ds=sidebyside diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 80624f9d3..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.29 1999/03/16 00:43:55 jgg Exp $ +// $Id: acquire.cc,v 1.31 1999/03/27 03:02:38 jgg Exp $ /* ###################################################################### Acquire - File Acquiration @@ -25,6 +25,7 @@ #include #include +#include /*}}}*/ // Acquire::pkgAcquire - Constructor /*{{{*/ @@ -419,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 /*{{{*/ // --------------------------------------------------------------------- /* */