X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/8b89e57fa2ae7d34b055b8f804cee0c2c194043b..e75f306ea9596c82e3b0c188e9b5203fc9d619da:/apt-pkg/acquire-worker.h diff --git a/apt-pkg/acquire-worker.h b/apt-pkg/acquire-worker.h index b0acde3e3..6e1952202 100644 --- a/apt-pkg/acquire-worker.h +++ b/apt-pkg/acquire-worker.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire-worker.h,v 1.5 1998/10/26 07:11:46 jgg Exp $ +// $Id: acquire-worker.h,v 1.12 2001/02/20 07:03:17 jgg Exp $ /* ###################################################################### Acquire Worker - Worker process manager @@ -13,7 +13,6 @@ #define PKGLIB_ACQUIRE_WORKER_H #include -#include #ifdef __GNUG__ #pragma interface "apt-pkg/acquire-worker.h" @@ -22,10 +21,10 @@ // Interfacing to the method process class pkgAcquire::Worker { - friend pkgAcquire; + friend class pkgAcquire; protected: - friend Queue; + friend class Queue; /* Linked list starting at a Queue and a linked list starting at Acquire */ @@ -34,9 +33,10 @@ class pkgAcquire::Worker // The access association Queue *OwnerQ; + pkgAcquireStatus *Log; MethodConfig *Config; string Access; - + // This is the subprocess IPC setup pid_t Process; int InFd; @@ -61,8 +61,10 @@ class pkgAcquire::Worker // The message handlers bool Capabilities(string Message); bool SendConfiguration(); - + bool MediaChange(string Message); + bool MethodFailure(); + void ItemDone(); public: @@ -71,16 +73,17 @@ class pkgAcquire::Worker string Status; unsigned long CurrentSize; unsigned long TotalSize; - + unsigned long ResumePoint; + // Load the method and do the startup bool QueueItem(pkgAcquire::Queue::QItem *Item); - bool Start(); + bool Start(); + void Pulse(); + inline const MethodConfig *GetConf() const {return Config;}; - Worker(Queue *OwnerQ,MethodConfig *Config); + Worker(Queue *OwnerQ,MethodConfig *Config,pkgAcquireStatus *Log); Worker(MethodConfig *Config); ~Worker(); }; -bool pkgInjectConfiguration(string &Message,Configuration &Cnf); - #endif