X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/495e5cb25443e6606c0d02891e1f6610983e88cd..dde60c5696f6779ea48febdac315083fb50e3075:/apt-pkg/acquire-item.h diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 08b75c6d2..802d8d1ff 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -142,6 +142,7 @@ class pkgAcquire::Item * download progress indicator's overall statistics. */ bool Local; + string UsedMirror; /** \brief The number of fetch queues into which this item has been * inserted. @@ -242,6 +243,17 @@ class pkgAcquire::Item /** \return \b true if this object is being fetched from a trusted source. */ virtual bool IsTrusted() {return false;}; + + // report mirror problems + /** \brief Report mirror problem + * + * This allows reporting mirror failures back to a centralized + * server. The apt-report-mirror-failure script is called for this + * + * \param FailCode A short failure string that is send + */ + void ReportMirrorFailure(string FailCode); + /** \brief Initialize an item. * @@ -523,6 +535,7 @@ class pkgAcqIndex : public pkgAcquire::Item pkgAcquire::MethodConfig *Cnf); virtual string Custom600Headers(); virtual string DescURI() {return RealURI + CompressionExtension;}; + virtual string HashSum() {return ExpectedHash.toStr(); }; /** \brief Create a pkgAcqIndex. * @@ -542,7 +555,8 @@ class pkgAcqIndex : public pkgAcquire::Item * (".bz2" is used if bzip2 is installed, ".gz" otherwise). */ pkgAcqIndex(pkgAcquire *Owner,string URI,string URIDesc, - string ShortDesc, HashString ExpectedHash, string compressExt=""); + string ShortDesc, HashString ExpectedHash, + string compressExt=""); }; /** \brief An acquire item that is responsible for fetching a @@ -777,7 +791,7 @@ class pkgAcqArchive : public pkgAcquire::Item pkgRecords *Recs; /** \brief The hashsum of this package. */ - HashString hash; + HashString ExpectedHash; /** \brief A location in which the actual filename of the package * should be stored. @@ -810,7 +824,7 @@ class pkgAcqArchive : public pkgAcquire::Item virtual string DescURI() {return Desc.URI;}; virtual string ShortDesc() {return Desc.ShortDesc;}; virtual void Finished(); - virtual string HashSum() {return hash.toStr(); }; + virtual string HashSum() {return ExpectedHash.toStr(); }; virtual bool IsTrusted(); /** \brief Create a new pkgAcqArchive. @@ -848,7 +862,7 @@ class pkgAcqFile : public pkgAcquire::Item pkgAcquire::ItemDesc Desc; /** \brief The hashsum of the file to download, if it is known. */ - HashString hash; + HashString ExpectedHash; /** \brief How many times to retry the download, set from * Acquire::Retries. @@ -861,8 +875,8 @@ class pkgAcqFile : public pkgAcquire::Item virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); virtual void Done(string Message,unsigned long Size,string CalcHash, pkgAcquire::MethodConfig *Cnf); - virtual string HashSum() {return hash.toStr(); }; virtual string DescURI() {return Desc.URI;}; + virtual string HashSum() {return ExpectedHash.toStr(); }; /** \brief Create a new pkgAcqFile object. *