- pkgAcqIndexDiffs(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
- IndexTarget const Target,
- std::vector<DiffInfo> const &diffs=std::vector<DiffInfo>());
-};
- /*}}}*/
-/** \brief An acquire item that is responsible for fetching an index {{{
- * file (e.g., Packages or Sources).
- *
- * \sa pkgAcqDiffIndex, pkgAcqIndexDiffs, pkgAcqIndexTrans
- *
- * \todo Why does pkgAcqIndex have protected members?
- */
-class APT_HIDDEN pkgAcqIndex : public pkgAcqBaseIndex
-{
- void *d;
-
- protected:
-
- /** \brief The stages the method goes through
- *
- * The method first downloads the indexfile, then its decompressed (or
- * copied) and verified
- */
- enum AllStages {
- STAGE_DOWNLOAD,
- STAGE_DECOMPRESS_AND_VERIFY,
- };
- AllStages Stage;
-
- /** \brief Handle what needs to be done when the download is done */
- void StageDownloadDone(std::string const &Message,
- HashStringList const &Hashes,
- pkgAcquire::MethodConfig const * const Cfg);
-
- /** \brief Handle what needs to be done when the decompression/copy is
- * done
- */
- void StageDecompressDone(std::string const &Message,
- HashStringList const &Hashes,
- pkgAcquire::MethodConfig const * const Cfg);
-
- /** \brief If \b set, this partially downloaded file will be
- * removed when the download completes.
- */
- std::string EraseFileName;
-
- /** \brief The compression-related file extensions that are being
- * added to the downloaded file one by one if first fails (e.g., "gz bz2").
- */
- std::string CompressionExtensions;
-
- /** \brief The actual compression extension currently used */
- std::string CurrentCompressionExtension;
-
- /** \brief Do the changes needed to fetch via AptByHash (if needed) */
- void InitByHashIfNeeded();
-
- /** \brief Auto select the right compression to use */
- void AutoSelectCompression();
-
- /** \brief Schedule file for verification after a IMS hit */
- void ReverifyAfterIMS();
-
- /** \brief Get the full pathname of the final file for the current URI */
- virtual std::string GetFinalFilename() const;
-
- virtual bool TransactionState(TransactionStates const state);
-
- public:
- // Specialized action members
- virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
- virtual void Done(std::string const &Message, HashStringList const &Hashes,
- pkgAcquire::MethodConfig const * const Cnf);
- virtual std::string Custom600Headers() const;
- virtual std::string DescURI() const {return Desc.URI;};
- virtual std::string GetMetaKey() const;
-
- pkgAcqIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
- IndexTarget const Target);
-
- void Init(std::string const &URI, std::string const &URIDesc,
- std::string const &ShortDesc);