]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-item.h
methods/mirror.{cc,h}:
[apt.git] / apt-pkg / acquire-item.h
index 90f80368b9c6f29d5db712972df23af639bae4a5..9949d004426fa1783ae3cc8f22be2072c75b7c19 100644 (file)
@@ -56,6 +56,7 @@ class pkgAcquire::Item
    unsigned long ID;
    bool Complete;
    bool Local;
+   string UsedMirror;
 
    // Number of queues we are inserted into
    unsigned int QueueCounter;
@@ -78,6 +79,9 @@ class pkgAcquire::Item
    pkgAcquire *GetOwner() {return Owner;};
    virtual bool IsTrusted() {return false;};
    
+   // report mirror problems
+   void ReportMirrorFailure(string FailCode);
+
    Item(pkgAcquire *Owner);
    virtual ~Item();
 };
@@ -151,8 +155,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);
@@ -224,9 +230,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