]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-item.h
Only rename StatError files in AbortTransaction()
[apt.git] / apt-pkg / acquire-item.h
index a3388ca3e09f2098df3ced4bf2873a804b629abe..68d5a01ce6855a71fd65526b8fd27a84064c6549 100644 (file)
@@ -343,11 +343,17 @@ struct DiffInfo {
    /** The filename of the diff. */
    std::string file;
 
-   /** The sha1 hash of the diff. */
-   std::string sha1;
+   /** The hashes of the diff */
+   HashStringList result_hashes;
 
-   /** The size of the diff. */
-   unsigned long size;
+   /** The hashes of the file after the diff is applied */
+   HashStringList patch_hashes;
+
+   /** The size of the file after the diff is applied */
+   unsigned long long result_size;
+
+   /** The size of the diff itself */
+   unsigned long long patch_size;
 };
                                                                        /*}}}*/
                                                                        /*}}}*/
@@ -384,7 +390,6 @@ class pkgAcqMetaBase  : public pkgAcquire::Item
     */
    void QueueIndexes(bool verify);
 
-
    /** \brief Called when a file is finished being retrieved.
     *
     *  If the file was not downloaded to DestFile, a copy process is
@@ -401,6 +406,9 @@ class pkgAcqMetaBase  : public pkgAcquire::Item
    void QueueForSignatureVerify(const std::string &MetaIndexFile,
                                 const std::string &MetaIndexFileSignature);
 
+   /** \brief get the custom600 header for all pkgAcqMeta */
+   std::string GetCustom600Headers(const std::string &RealURI) const;
+
    /** \brief Called when authentication succeeded.
     *
     *  Sanity-checks the authenticated file, queues up the individual
@@ -817,7 +825,7 @@ class pkgAcqIndexDiffs : public pkgAcqBaseIndex
     *  \return \b true if an applicable diff was found, \b false
     *  otherwise.
     */
-   bool QueueNextDiff();
+   APT_HIDDEN bool QueueNextDiff();
 
    /** \brief Handle tasks that must be performed after the item
     *  finishes downloading.
@@ -830,7 +838,7 @@ class pkgAcqIndexDiffs : public pkgAcqBaseIndex
     *  \param allDone If \b true, the file was entirely reconstructed,
     *  and its md5sum is verified. 
     */
-   void Finish(bool allDone=false);
+   APT_HIDDEN void Finish(bool allDone=false);
 
    protected:
 
@@ -852,9 +860,6 @@ class pkgAcqIndexDiffs : public pkgAcqBaseIndex
     */
    std::vector<DiffInfo> available_patches;
 
-   /** Stop applying patches when reaching that sha1 */
-   std::string ServerSha1;
-
    /** The current status of this patch. */
    enum DiffState
      {
@@ -898,12 +903,10 @@ class pkgAcqIndexDiffs : public pkgAcqBaseIndex
     *
     *  \param ShortDesc A brief description of this item.
     *
-    *  \param ExpectedHashes The expected md5sum of the completely
+    *  \param ExpectedHashes The expected hashsums of the completely
     *  reconstructed package index file; the index file will be tested
     *  against this value when it is entirely reconstructed.
     *
-    *  \param ServerSha1 is the sha1sum of the current file on the server
-    *
     *  \param diffs The remaining diffs from the index of diffs.  They
     *  should be ordered so that each diff appears before any diff
     *  that depends on it.
@@ -913,7 +916,6 @@ class pkgAcqIndexDiffs : public pkgAcqBaseIndex
                     struct IndexTarget const * const Target,
                     HashStringList const &ExpectedHash,
                     indexRecords *MetaIndexParser,
-                   std::string ServerSha1,
                    std::vector<DiffInfo> diffs=std::vector<DiffInfo>());
 };
                                                                        /*}}}*/