// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire.cc,v 1.29 1999/03/16 00:43:55 jgg Exp $
+// $Id: acquire.cc,v 1.32 1999/04/07 06:02:56 jgg Exp $
/* ######################################################################
Acquire - File Acquiration
#include <dirent.h>
#include <sys/time.h>
+#include <errno.h>
/*}}}*/
// Acquire::pkgAcquire - Constructor /*{{{*/
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 /*{{{*/
// ---------------------------------------------------------------------
/* */
TotalBytes = 1;
if (Unknown == Count)
TotalBytes = Unknown;
- else
- TotalBytes += TotalBytes/(Count - Unknown)*Unknown;
// Compute the CPS
struct timeval NewTime;