]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-item.h
fix same-mirror redirection for Release{,.gpg} pair
[apt.git] / apt-pkg / acquire-item.h
index d77b5f9eff63e1982e7e3bc33ea3990d95d613f2..41420a7c113b1e84e2b917e2ef19e9abf5c045ae 100644 (file)
@@ -281,7 +281,7 @@ class pkgAcquire::Item : public WeakPointable                               /*{{{*/
     *
     *  \param FailCode A short failure string that is send
     */
-   void ReportMirrorFailure(std::string const &FailCode);
+   APT_DEPRECATED_MSG("Item::Failed does this for you") void ReportMirrorFailure(std::string const &FailCode);
 
    /** \brief Set the name of the current active subprocess
     *
@@ -381,6 +381,7 @@ class APT_HIDDEN pkgAcqTransactionItem: public pkgAcquire::Item             /*{{{*/
    pkgAcqMetaClearSig * const TransactionManager;
 
    enum TransactionStates {
+      TransactionStarted,
       TransactionCommit,
       TransactionAbort,
    };
@@ -467,6 +468,8 @@ class APT_HIDDEN pkgAcqMetaBase : public pkgAcqTransactionItem              /*{{{*/
  public:
    // This refers more to the Transaction-Manager than the actual file
    bool IMSHit;
+   TransactionStates State;
+   std::string BaseURI;
 
    virtual bool QueueURI(pkgAcquire::ItemDesc &Item) APT_OVERRIDE;
    virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
@@ -522,7 +525,6 @@ class APT_HIDDEN pkgAcqMetaIndex : public pkgAcqMetaBase
    virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
    virtual void Done(std::string const &Message, HashStringList const &Hashes,
                     pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
-   virtual void Finished() APT_OVERRIDE;
 
    /** \brief Create a new pkgAcqMetaIndex. */
    pkgAcqMetaIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
@@ -588,6 +590,7 @@ class APT_HIDDEN pkgAcqMetaClearSig : public pkgAcqMetaIndex
    virtual bool VerifyDone(std::string const &Message, pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
    virtual void Done(std::string const &Message, HashStringList const &Hashes,
                     pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
+   virtual void Finished() APT_OVERRIDE;
 
    /** \brief Create a new pkgAcqMetaClearSig. */
    pkgAcqMetaClearSig(pkgAcquire * const Owner,
@@ -607,6 +610,7 @@ class APT_HIDDEN pkgAcqBaseIndex : public pkgAcqTransactionItem
  public:
    /** \brief Get the full pathname of the final file for the current URI */
    virtual std::string GetFinalFilename() const APT_OVERRIDE;
+   virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
 
    pkgAcqBaseIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
                    IndexTarget const &Target);
@@ -841,10 +845,7 @@ class APT_HIDDEN pkgAcqIndexDiffs : public pkgAcqBaseIndex
 
    /** The current status of this patch. */
    enum DiffState
-     {
-       /** \brief The diff is in an unknown state. */
-        StateFetchUnkown,
-
+   {
         /** \brief The diff is currently being fetched. */
         StateFetchDiff,
 
@@ -917,16 +918,12 @@ class APT_HIDDEN pkgAcqIndex : public pkgAcqBaseIndex
    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);
+   void StageDownloadDone(std::string const &Message);
 
    /** \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);
+   void StageDecompressDone();
 
    /** \brief If \b set, this partially downloaded file will be
     *  removed when the download completes.
@@ -944,9 +941,6 @@ class APT_HIDDEN pkgAcqIndex : public pkgAcqBaseIndex
    /** \brief Do the changes needed to fetch via AptByHash (if needed) */
    void InitByHashIfNeeded();
 
-   /** \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 APT_OVERRIDE;
 
@@ -1065,7 +1059,8 @@ class pkgAcqArchive : public pkgAcquire::Item
  */
 class pkgAcqChangelog : public pkgAcquire::Item
 {
-   void * const d;
+   class Private;
+   Private * const d;
    std::string TemporaryDirectory;
    std::string const SrcName;
    std::string const SrcVersion;
@@ -1103,7 +1098,7 @@ class pkgAcqChangelog : public pkgAcquire::Item
 
    /** returns the URI to the changelog of this version
     *
-    *  \param Template URI where CHANGEPATH has to be filled in
+    *  \param Template URI where @CHANGEPATH@ has to be filled in
     *  \param Component in which the package resides, can be empty
     *  \param SrcName is the source package name
     *  \param SrcVersion is the source package version