]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-item.h
* debian/changelog:
[apt.git] / apt-pkg / acquire-item.h
index b55ac526b51b882508b118596adbafe251704d46..3649d7a039bd2e92575ca6fa83954712cab1b88a 100644 (file)
@@ -156,6 +156,7 @@ class pkgAcqIndex : public pkgAcquire::Item
    pkgAcquire::ItemDesc Desc;
    string RealURI;
    string ExpectedMD5;
+   string CompressionExtension;
 
    public:
    
@@ -164,7 +165,7 @@ class pkgAcqIndex : public pkgAcquire::Item
    virtual void Done(string Message,unsigned long Size,string Md5Hash,
                     pkgAcquire::MethodConfig *Cnf);
    virtual string Custom600Headers();
-   virtual string DescURI() {return RealURI + ".gz";};
+   virtual string DescURI() {return RealURI + CompressionExtension;};
 
    pkgAcqIndex(pkgAcquire *Owner,string URI,string URIDesc,
               string ShortDesct, string ExpectedMD5, string compressExt="");
@@ -214,8 +215,10 @@ class pkgAcqMetaIndex : public pkgAcquire::Item
    const vector<struct IndexTarget*>* IndexTargets;
    indexRecords* MetaIndexParser;
    bool AuthPass;
+   // required to deal gracefully with problems caused by incorrect ims hits
+   bool IMSHit; 
 
-   bool VerifyVendor();
+   bool VerifyVendor(string Message);
    void RetrievalDone(string Message);
    void AuthDone(string Message);
    void QueueIndexes(bool verify);
@@ -287,9 +290,14 @@ class pkgAcqFile : public pkgAcquire::Item
                     pkgAcquire::MethodConfig *Cnf);
    virtual string MD5Sum() {return Md5Hash;};
    virtual string DescURI() {return Desc.URI;};
-   
-   pkgAcqFile(pkgAcquire *Owner,string URI,string MD5,unsigned long Size,
-                 string Desc,string ShortDesc);
+
+   // If DestFilename is empty, download to DestDir/<basename> if
+   // DestDir is non-empty, $CWD/<basename> otherwise.  If
+   // DestFilename is NOT empty, DestDir is ignored and DestFilename
+   // is the absolute name to which the file should be downloaded.
+   pkgAcqFile(pkgAcquire *Owner, string URI, string MD5, unsigned long Size,
+             string Desc, string ShortDesc,
+             const string &DestDir="", const string &DestFilename="");
 };
 
 #endif