// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire.h,v 1.11 1998/11/12 04:10:55 jgg Exp $
+// $Id: acquire.h,v 1.18 1998/12/11 07:20:33 jgg Exp $
/* ######################################################################
Acquire - File Acquiration
void Enqueue(ItemDesc &Item);
void Dequeue(Item *Item);
- string QueueName(string URI);
+ string QueueName(string URI,MethodConfig const *&Config);
// FDSET managers for derived classes
void SetFds(int &Fd,fd_set *RSet,fd_set *WSet);
// Cleans out the download dir
bool Clean(string Dir);
+
+ // Returns the size of the total download set
+ unsigned long TotalNeeded();
+ unsigned long FetchNeeded();
pkgAcquire(pkgAcquireStatus *Log = 0);
~pkgAcquire();
QItem *Items;
pkgAcquire::Worker *Workers;
pkgAcquire *Owner;
+ signed long PipeDepth;
+ unsigned long MaxPipeDepth;
public:
string Version;
bool SingleInstance;
- bool PreScan;
bool Pipeline;
bool SendConfig;
-
+ bool LocalOnly;
+
MethodConfig();
};
unsigned long TotalBytes;
unsigned long FetchedBytes;
unsigned long ElapsedTime;
+ unsigned long TotalItems;
+ unsigned long CurrentItems;
public:
// Called by items when they have finished a real download
virtual void Fetched(unsigned long Size,unsigned long ResumePoint);
+ // Called to change media
+ virtual bool MediaChange(string Media,string Drive) = 0;
+
// Each of these is called by the workers when an event occures
virtual void IMSHit(pkgAcquire::ItemDesc &Itm) {};
virtual void Fetch(pkgAcquire::ItemDesc &Itm) {};
virtual void Done(pkgAcquire::ItemDesc &Itm) {};
- virtual void Fail(pkgAcquire::ItemDesc &Itm) {};
+ virtual void Fail(pkgAcquire::ItemDesc &Itm) {};
virtual void Pulse(pkgAcquire *Owner);
virtual void Start();
virtual void Stop();
-
+
pkgAcquireStatus();
virtual ~pkgAcquireStatus() {};
};