]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-method.h
remove debianism file-content verification
[apt.git] / apt-pkg / acquire-method.h
index 8a680335e1bb20b8e38b4e26dc8bb68db6cd5e2f..6480eb4b57f4ea3dad497bba344019a7a84fc9fa 100644 (file)
@@ -44,11 +44,15 @@ class pkgAcqMethod
 
       std::string Uri;
       std::string DestFile;
+      int DestFileFd;
       time_t LastModified;
       bool IndexFile;
       bool FailIgnore;
       HashStringList ExpectedHashes;
-      unsigned long long ExpectedSize;
+      // a maximum size we will download, this can be the exact filesize
+      // for when we know it or a arbitrary limit when we don't know the
+      // filesize (like a InRelease file)
+      unsigned long long MaximumSize;
    };
    
    struct FetchResult
@@ -72,11 +76,12 @@ class pkgAcqMethod
    std::string FailReason;
    std::string UsedMirror;
    std::string IP;
-   
+
    // Handlers for messages
    virtual bool Configuration(std::string Message);
    virtual bool Fetch(FetchItem * /*Item*/) {return true;};
-   
+   virtual bool URIAcquire(std::string const &/*Message*/, FetchItem *Itm) { return Fetch(Itm); };
+
    // Outgoing messages
    void Fail(bool Transient = false);
    inline void Fail(const char *Why, bool Transient = false) {Fail(std::string(Why),Transient);};
@@ -105,8 +110,8 @@ class pkgAcqMethod
    inline void SetIP(std::string aIP) {IP = aIP;};
    
    pkgAcqMethod(const char *Ver,unsigned long Flags = 0);
-   virtual ~pkgAcqMethod() {};
-
+   virtual ~pkgAcqMethod();
+   void DropPrivsOrDie();
    private:
    APT_HIDDEN void Dequeue();
 };