From 899e4deda1d0b2e9ad405f7f0b44c5b9be05fce7 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 1 Oct 2014 22:41:52 +0200 Subject: refactor and add pkgAcqIndex::ValidateFile() --- apt-pkg/acquire-item.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'apt-pkg/acquire-item.h') diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index e560da956..30a8850e4 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -283,7 +283,6 @@ class pkgAcquire::Item : public WeakPointable /** \return \b true if this object is being fetched from a trusted source. */ virtual bool IsTrusted() const {return false;}; - // report mirror problems /** \brief Report mirror problem * * This allows reporting mirror failures back to a centralized @@ -293,7 +292,6 @@ class pkgAcquire::Item : public WeakPointable */ void ReportMirrorFailure(std::string FailCode); - /** \brief Initialize an item. * * Adds the item to the list of items known to the acquire @@ -947,7 +945,6 @@ class pkgAcqIndex : public pkgAcqBaseIndex */ std::string CompressionExtension; - /** \brief Do the changes needed to fetch via AptByHash (if needed) */ void InitByHashIfNeeded(const std::string MetaKey); @@ -961,11 +958,15 @@ class pkgAcqIndex : public pkgAcqBaseIndex /** \brief Schedule file for verification after a IMS hit */ void ReverifyAfterIMS(); + /** \brief Validate the downloaded index file */ + bool ValidateFile(const std::string &FileName); + public: // Specialized action members virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf); - virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes, + 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() {return Desc.URI;}; -- cgit v1.2.3