Sync
[ntk/apt.git] / apt-pkg / acquire-worker.h
index 2807237..d128ec8 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: acquire-worker.h,v 1.2 1998/10/20 02:39:14 jgg Exp $
+// $Id: acquire-worker.h,v 1.3 1998/10/22 04:56:42 jgg Exp $
 /* ######################################################################
 
    Acquire Worker - Worker process manager
 // Interfacing to the method process
 class pkgAcquire::Worker
 {
+   friend pkgAcquire;
+   
    protected:
    friend Queue;
 
-   Worker *Next;
+   /* Linked list starting at a Queue and a linked list starting
+      at Acquire */
+   Worker *NextQueue;
+   Worker *NextAcquire;
    
    // The access association
    Queue *OwnerQ;
@@ -35,27 +40,40 @@ class pkgAcquire::Worker
    pid_t Process;
    int InFd;
    int OutFd;
+   bool InReady;
+   bool OutReady;
    
    // Various internal things
    bool Debug;
    vector<string> MessageQueue;
-
+   string OutQueue;
+   
    // Private constructor helper
    void Construct();
    
    // Message handling things
    bool ReadMessages();
    bool RunMessages();
+   bool InFdReady();
+   bool OutFdReady();
    
    // The message handlers
    bool Capabilities(string Message);
+   bool SendConfiguration();
+
+   bool MethodFailure();
    
    public:
    
+   pkgAcquire::Queue::QItem *CurrentItem;
+   
+   string Status;
+   
    // Load the method and do the startup 
+   bool QueueItem(pkgAcquire::Queue::QItem *Item);
    bool Start();   
    
-   Worker(Queue *OwnerQ,string Access);
+   Worker(Queue *OwnerQ,MethodConfig *Config);
    Worker(MethodConfig *Config);
    ~Worker();
 };