X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/7a7fa5f07e59bd17415cb0321d1f98527c2cfea4..c46824ce2ac7b52b644078f997ecc1ea6303b50c:/apt-pkg/acquire.h diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h index c85a7aef7..2f5da7b31 100644 --- a/apt-pkg/acquire.h +++ b/apt-pkg/acquire.h @@ -1,6 +1,6 @@ // -*- 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 @@ -79,7 +79,7 @@ class pkgAcquire 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); @@ -101,6 +101,10 @@ class pkgAcquire // 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(); @@ -145,6 +149,8 @@ class pkgAcquire::Queue QItem *Items; pkgAcquire::Worker *Workers; pkgAcquire *Owner; + signed long PipeDepth; + unsigned long MaxPipeDepth; public: @@ -175,10 +181,10 @@ struct pkgAcquire::MethodConfig string Version; bool SingleInstance; - bool PreScan; bool Pipeline; bool SendConfig; - + bool LocalOnly; + MethodConfig(); }; @@ -194,6 +200,8 @@ class pkgAcquireStatus unsigned long TotalBytes; unsigned long FetchedBytes; unsigned long ElapsedTime; + unsigned long TotalItems; + unsigned long CurrentItems; public: @@ -202,15 +210,18 @@ class pkgAcquireStatus // 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() {}; };