]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-worker.h
fix crash when P.Arch() was used but the cache got remapped
[apt.git] / apt-pkg / acquire-worker.h
index 1f6bcc05f6fed0904373ea67f6f66981853a59bd..ce19091e431ea8f12eb20812bb19fc582974228f 100644 (file)
 #define PKGLIB_ACQUIRE_WORKER_H
 
 #include <apt-pkg/acquire.h>
+#include <apt-pkg/weakptr.h>
 
-#ifdef __GNUG__
-#pragma interface "apt-pkg/acquire-worker.h"
-#endif 
 
 /** \brief A fetch subprocess.
  *
  *
  *  \sa pkgAcqMethod, pkgAcquire::Item, pkgAcquire
  */
-class pkgAcquire::Worker
+class pkgAcquire::Worker : public WeakPointable
 {
+   /** \brief dpointer placeholder (for later in case we need it) */
+   void *d;
+  
    friend class pkgAcquire;
    
    protected:
@@ -246,17 +247,17 @@ class pkgAcquire::Worker
    /** \brief How many bytes of the file have been downloaded.  Zero
     *  if the current progress of the file cannot be determined.
     */
-   unsigned long CurrentSize;
+   unsigned long long CurrentSize;
 
    /** \brief The total number of bytes to be downloaded.  Zero if the
     *  total size of the final is unknown.
     */
-   unsigned long TotalSize;
+   unsigned long long TotalSize;
 
    /** \brief How much of the file was already downloaded prior to
     *  starting this worker.
     */
-   unsigned long ResumePoint;
+   unsigned long long ResumePoint;
    
    /** \brief Tell the subprocess to download the given item.
     *
@@ -316,7 +317,7 @@ class pkgAcquire::Worker
     *  Closes the file descriptors; if MethodConfig::NeedsCleanup is
     *  \b false, also rudely interrupts the worker with a SIGINT.
     */
-   ~Worker();
+   virtual ~Worker();
 };
 
 /** @} */