X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/343325f4cc460b709fc929f85bc2a3d4691d63fe..ca15786a9ae637048e329c159831dd486c54dea7:/apt-pkg/acquire-item.h diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 0500a3627..d0a61f5ec 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -245,12 +245,12 @@ class pkgAcquire::Item : public WeakPointable * * \return a URI that should be used to describe what is being fetched. */ - virtual std::string DescURI() const = 0; + virtual std::string DescURI() = 0; /** \brief Short item description. * * \return a brief description of the object being fetched. */ - virtual std::string ShortDesc() const {return DescURI();} + virtual std::string ShortDesc() {return DescURI();} /** \brief Invoked by the worker when the download is completely done. */ virtual void Finished() {}; @@ -347,7 +347,7 @@ class pkgAcqSubIndex : public pkgAcquire::Item virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes, pkgAcquire::MethodConfig *Cnf); - virtual std::string DescURI() const {return Desc.URI;}; + virtual std::string DescURI() {return Desc.URI;}; virtual std::string Custom600Headers() const; virtual bool ParseIndex(std::string const &IndexFile); @@ -423,7 +423,7 @@ class pkgAcqDiffIndex : public pkgAcqBaseIndex virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes, pkgAcquire::MethodConfig *Cnf); - virtual std::string DescURI() const {return RealURI + "Index";}; + virtual std::string DescURI() {return RealURI + "Index";}; virtual std::string Custom600Headers() const; /** \brief Parse the Index file for a set of Packages diffs. @@ -516,7 +516,7 @@ class pkgAcqIndexMergeDiffs : public pkgAcqBaseIndex virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes, pkgAcquire::MethodConfig *Cnf); - virtual std::string DescURI() const {return RealURI + "Index";}; + virtual std::string DescURI() {return RealURI + "Index";}; /** \brief Create an index merge-diff item. * @@ -641,7 +641,7 @@ class pkgAcqIndexDiffs : public pkgAcqBaseIndex virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes, pkgAcquire::MethodConfig *Cnf); - virtual std::string DescURI() const {return RealURI + "Index";}; + virtual std::string DescURI() {return RealURI + "Index";}; /** \brief Create an index diff item. * @@ -707,9 +707,18 @@ class pkgAcqIndex : public pkgAcqBaseIndex */ std::string CompressionExtension; + /** \brief Do the changes needed to fetch via AptByHash (if needed) */ void InitByHashIfNeeded(const std::string MetaKey); + /** \brief Get the full pathname of the final file for the given URI + */ + std::string GetFinalFilename(std::string const &URI, + std::string const &compExt); + + /** \brief Schedule file for verification after a IMS hit */ + void ReverifyAfterIMS(std::string const &FileName); + public: // Specialized action members @@ -717,7 +726,7 @@ class pkgAcqIndex : public pkgAcqBaseIndex virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes, pkgAcquire::MethodConfig *Cnf); virtual std::string Custom600Headers() const; - virtual std::string DescURI() const {return Desc.URI;}; + virtual std::string DescURI() {return Desc.URI;}; /** \brief Create a pkgAcqIndex. * @@ -881,7 +890,7 @@ class pkgAcqMetaSig : public pkgAcquire::Item virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes, pkgAcquire::MethodConfig *Cnf); virtual std::string Custom600Headers() const; - virtual std::string DescURI() const {return RealURI; }; + virtual std::string DescURI() {return RealURI; }; /** \brief Create a new pkgAcqMetaSig. */ pkgAcqMetaSig(pkgAcquire *Owner,std::string URI,std::string URIDesc, std::string ShortDesc, @@ -974,7 +983,7 @@ class pkgAcqMetaIndex : public pkgAcquire::Item virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes, pkgAcquire::MethodConfig *Cnf); virtual std::string Custom600Headers() const; - virtual std::string DescURI() const {return RealURI; }; + virtual std::string DescURI() {return RealURI; }; /** \brief Create a new pkgAcqMetaIndex. */ pkgAcqMetaIndex(pkgAcquire *Owner, @@ -1068,8 +1077,8 @@ class pkgAcqArchive : public pkgAcquire::Item virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes, pkgAcquire::MethodConfig *Cnf); - virtual std::string DescURI() const {return Desc.URI;}; - virtual std::string ShortDesc() const {return Desc.ShortDesc;}; + virtual std::string DescURI() {return Desc.URI;}; + virtual std::string ShortDesc() {return Desc.ShortDesc;}; virtual void Finished(); virtual bool IsTrusted() const; @@ -1118,7 +1127,7 @@ class pkgAcqFile : public pkgAcquire::Item virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); virtual void Done(std::string Message,unsigned long long Size, HashStringList const &CalcHashes, pkgAcquire::MethodConfig *Cnf); - virtual std::string DescURI() const {return Desc.URI;}; + virtual std::string DescURI() {return Desc.URI;}; virtual std::string Custom600Headers() const; /** \brief Create a new pkgAcqFile object.