]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire.h
debian/control: Remove XS- from Testsuite and bump Standards-Version
[apt.git] / apt-pkg / acquire.h
index 02031dafddc3908ae767d017d3160fcc1bc3cb11..0d2b21233b1bd7584186743f4dede8cde9b02f4d 100644 (file)
@@ -1,6 +1,5 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: acquire.h,v 1.29.2.1 2003/12/24 23:09:17 mdz Exp $
 /* ######################################################################
 
    Acquire - File Acquiration
@@ -102,7 +101,7 @@ class pkgAcquire
    /** \brief FD of the Lock file we acquire in Setup (if any) */
    int LockFD;
    /** \brief dpointer placeholder (for later in case we need it) */
-   void *d;
+   void * const d;
 
    public:
    
@@ -370,7 +369,7 @@ class pkgAcquire
    bool GetLock(std::string const &Lock);
 
    /** \brief Construct a new pkgAcquire. */
-   pkgAcquire(pkgAcquireStatus *Log);
+   explicit pkgAcquire(pkgAcquireStatus *Log);
    pkgAcquire();
 
    /** \brief Destroy this pkgAcquire object.
@@ -412,7 +411,7 @@ class pkgAcquire::Queue
    friend class pkgAcquire::Worker;
 
    /** \brief dpointer placeholder (for later in case we need it) */
-   void *d;
+   void * const d;
 
    /** \brief The next queue in the pkgAcquire object's list of queues. */
    Queue *Next;
@@ -420,23 +419,15 @@ class pkgAcquire::Queue
    protected:
 
    /** \brief A single item placed in this queue. */
-   struct QItem : public WeakPointable
+   struct QItem : public ItemDesc
    {
       /** \brief The next item in the queue. */
       QItem *Next;
       /** \brief The worker associated with this item, if any. */
       pkgAcquire::Worker *Worker;
 
-      /** \brief The URI from which to download this item. */
-      std::string URI;
-      /** \brief A description of this item. */
-      std::string Description;
-      /** \brief A shorter description of this item. */
-      std::string ShortDesc;
       /** \brief The underlying items interested in the download */
       std::vector<Item*> Owners;
-      // both, backward compatibility and easy access as syncing is interal
-      Item * Owner;
 
       typedef std::vector<Item*>::const_iterator owner_iterator;
 
@@ -585,7 +576,7 @@ class pkgAcquire::Queue
     *  \param Name The name of the new queue.
     *  \param Owner The download process that owns the new queue.
     */
-   Queue(std::string Name,pkgAcquire *Owner);
+   Queue(std::string const &Name,pkgAcquire * const Owner);
 
    /** Shut down all the worker processes associated with this queue
     *  and empty the queue.
@@ -597,7 +588,7 @@ class pkgAcquire::Queue
 class pkgAcquire::UriIterator
 {
    /** \brief dpointer placeholder (for later in case we need it) */
-   void *d;
+   void * const d;
 
    /** The next queue to iterate over. */
    pkgAcquire::Queue *CurQ;
@@ -626,14 +617,7 @@ class pkgAcquire::UriIterator
     *
     *  \param Q The queue over which this UriIterator should iterate.
     */
-   UriIterator(pkgAcquire::Queue *Q) : d(NULL), CurQ(Q), CurItem(0)
-   {
-      while (CurItem == 0 && CurQ != 0)
-      {
-        CurItem = CurQ->Items;
-        CurQ = CurQ->Next;
-      }
-   }   
+   explicit UriIterator(pkgAcquire::Queue *Q);
    virtual ~UriIterator();
 };
                                                                        /*}}}*/
@@ -641,7 +625,7 @@ class pkgAcquire::UriIterator
 struct pkgAcquire::MethodConfig
 {
    /** \brief dpointer placeholder (for later in case we need it) */
-   void *d;
+   void * const d;
    
    /** \brief The next link on the acquire method list.
     *
@@ -702,7 +686,7 @@ struct pkgAcquire::MethodConfig
 class pkgAcquireStatus
 {
    /** \brief dpointer placeholder (for later in case we need it) */
-   void *d;
+   void * const d;
 
    protected: