X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/05d82b584c7e29b14325feca1003f76106e27683..591c8c170e82e9d44d7ac405a478ba52250f8bbc:/apt-pkg/acquire-item.h diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 34fcc2a76..3649d7a03 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -9,8 +9,8 @@ the Owner Acquire class. Derived classes will then call QueueURI to register all the URI's they wish to fetch at the initial moment. - Three item classes are provided to provide functionality for - downloading of Index, Translation and Packages files. + Two item classes are provided to provide functionality for downloading + of Index files and downloading of Packages. A Archive class is provided for downloading .deb files. It does Md5 checking and source location as well as a retry algorithm. @@ -171,16 +171,6 @@ class pkgAcqIndex : public pkgAcquire::Item string ShortDesct, string ExpectedMD5, string compressExt=""); }; -// Item class for translated package index files -class pkgAcqIndexTrans : public pkgAcqIndex -{ - public: - - virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); - pkgAcqIndexTrans(pkgAcquire *Owner,string URI,string URIDesc, - string ShortDesct); -}; - struct IndexTarget { string URI; @@ -225,8 +215,10 @@ class pkgAcqMetaIndex : public pkgAcquire::Item const vector* 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); @@ -298,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/ if + // DestDir is non-empty, $CWD/ 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