]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire.h
Working acquire code
[apt.git] / apt-pkg / acquire.h
index cea7c88910c8f9264627922c1ee3deed3ae3de87..a4ea45bff3e6c6c45706c6c5df5a611fc12213d1 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: acquire.h,v 1.3 1998/10/22 04:56:44 jgg Exp $
+// $Id: acquire.h,v 1.8 1998/11/05 07:21:41 jgg Exp $
 /* ######################################################################
 
    Acquire - File Acquiration
@@ -66,6 +66,7 @@ class pkgAcquire
    // Configurable parameters for the schedular
    enum {QueueHost,QueueAccess} QueueMode;
    bool Debug;
+   bool Running;
    
    void Add(Item *Item);
    void Remove(Item *Item);
@@ -79,6 +80,9 @@ class pkgAcquire
    // FDSET managers for derived classes
    void SetFds(int &Fd,fd_set *RSet,fd_set *WSet);
    void RunFds(fd_set *RSet,fd_set *WSet);   
+
+   // A queue calls this when it dequeues an item
+   void Bump();
    
    public:
 
@@ -105,6 +109,7 @@ class pkgAcquire::Queue
       string URI;
       string Description;
       Item *Owner;
+      pkgAcquire::Worker *Worker;
    };   
    
    // Name of the queue
@@ -119,10 +124,16 @@ class pkgAcquire::Queue
    
    // Put an item into this queue
    void Enqueue(Item *Owner,string URI,string Description);
-   void Dequeue(Item *Owner);
+   bool Dequeue(Item *Owner);
 
+   // Find a Queued item
+   QItem *FindItem(string URI,pkgAcquire::Worker *Owner);
+   bool ItemDone(QItem *Itm);
+   
    bool Startup();
    bool Shutdown();
+   bool Cycle();
+   void Bump();
    
    Queue(string Name,pkgAcquire *Owner);
    ~Queue();