summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.h
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-10-06 11:45:42 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-10-06 12:25:54 +0200
commitf30976478e684fc19e48d71881805454ceb6ecae (patch)
treeb7e9a55f90c2fbbd1585ab361cb853b30eac0e36 /apt-pkg/acquire-item.h
parent61a360be789ed81a939f09e89b939da7a103d81a (diff)
Rework pkgAcqMeta{Index,Sig,ClearSig}::Done() for readability
Move common code out but do not use subclassing for ::Done to make it easier to understand what each class is doing when its done
Diffstat (limited to 'apt-pkg/acquire-item.h')
-rw-r--r--apt-pkg/acquire-item.h64
1 files changed, 35 insertions, 29 deletions
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index bab2cc0d7..f12f57262 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -385,6 +385,41 @@ 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
+ * set up to copy it to DestFile; otherwise, Complete is set to \b
+ * true and the file is moved to its final location.
+ *
+ * \param Message The message block received from the fetch
+ * subprocess.
+ */
+ bool CheckDownloadDone(const std::string &Message,
+ const std::string &RealURI);
+
+ /** \brief Queue the downloaded Signature for verification */
+ void QueueForSignatureVerify(const std::string &MetaIndexFile,
+ const std::string &MetaIndexFileSignature);
+
+ /** \brief Called when authentication succeeded.
+ *
+ * Sanity-checks the authenticated file, queues up the individual
+ * index files for download, and saves the signature in the lists
+ * directory next to the authenticated list file.
+ *
+ * \param Message The message block received from the fetch
+ * subprocess.
+ */
+ bool AuthDone(std::string Message, const std::string &RealURI);
+
+ /** \brief Check that the release file is a release file for the
+ * correct distribution.
+ *
+ * \return \b true if no fatal errors were encountered.
+ */
+ bool VerifyVendor(std::string Message, const std::string &RealURI);
+
public:
// transaction code
void Add(Item *I);
@@ -496,35 +531,6 @@ class pkgAcqMetaIndex : public pkgAcqMetaBase
*/
std::string SigFile;
- /** \brief Check that the release file is a release file for the
- * correct distribution.
- *
- * \return \b true if no fatal errors were encountered.
- */
- bool VerifyVendor(std::string Message);
-
- /** \brief Called when a file is finished being retrieved.
- *
- * If the file was not downloaded to DestFile, a copy process is
- * set up to copy it to DestFile; otherwise, Complete is set to \b
- * true and the file is moved to its final location.
- *
- * \param Message The message block received from the fetch
- * subprocess.
- */
- void RetrievalDone(std::string Message);
-
- /** \brief Called when authentication succeeded.
- *
- * Sanity-checks the authenticated file, queues up the individual
- * index files for download, and saves the signature in the lists
- * directory next to the authenticated list file.
- *
- * \param Message The message block received from the fetch
- * subprocess.
- */
- void AuthDone(std::string Message);
-
std::string URIDesc;
std::string ShortDesc;