X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/6b1ff003a4acd2914dd395b651c485fb352e3d1a..8e5fc8f5bea54e3c016a14fe4025dcb94864e874:/apt-pkg/acquire.h diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h index 156fc7aae..e05ab3adc 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.20 1999/03/27 03:02:39 jgg Exp $ +// $Id: acquire.h,v 1.25 1999/10/18 00:37:35 jgg Exp $ /* ###################################################################### Acquire - File Acquiration @@ -82,8 +82,8 @@ class pkgAcquire string QueueName(string URI,MethodConfig const *&Config); // FDSET managers for derived classes - void SetFds(int &Fd,fd_set *RSet,fd_set *WSet); - void RunFds(fd_set *RSet,fd_set *WSet); + virtual void SetFds(int &Fd,fd_set *RSet,fd_set *WSet); + virtual void RunFds(fd_set *RSet,fd_set *WSet); // A queue calls this when it dequeues an item void Bump(); @@ -91,8 +91,12 @@ class pkgAcquire public: MethodConfig *GetConfig(string Access); - bool Run(); + enum RunResult {Continue,Failed,Cancelled}; + + RunResult Run(); + void Shutdown(); + // Simple iteration mechanism inline Worker *WorkersBegin() {return Workers;}; Worker *WorkerStep(Worker *I); @@ -113,7 +117,7 @@ class pkgAcquire unsigned long PartialPresent(); pkgAcquire(pkgAcquireStatus *Log = 0); - ~pkgAcquire(); + virtual ~pkgAcquire(); }; // Description of an Item+URI @@ -171,7 +175,7 @@ class pkgAcquire::Queue bool ItemDone(QItem *Itm); bool Startup(); - bool Shutdown(); + bool Shutdown(bool Final); bool Cycle(); void Bump(); @@ -225,7 +229,8 @@ struct pkgAcquire::MethodConfig bool Pipeline; bool SendConfig; bool LocalOnly; - + bool NeedsCleanup; + MethodConfig(); }; @@ -255,11 +260,11 @@ class pkgAcquireStatus 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 Pulse(pkgAcquire *Owner); + 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 bool Pulse(pkgAcquire *Owner); // returns false on user cancel virtual void Start(); virtual void Stop();