summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.h
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-09-29 10:43:00 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-09-29 10:43:04 +0200
commitc045cc0268d70eb3b7c41076ade7381f73e740f2 (patch)
tree5030193c776a0fa3f3d103e6593550e1ce4f3130 /apt-pkg/acquire-item.h
parentc36db2b56a08bb7542d0c1be900ee90808efa770 (diff)
refactor
Diffstat (limited to 'apt-pkg/acquire-item.h')
-rw-r--r--apt-pkg/acquire-item.h49
1 files changed, 22 insertions, 27 deletions
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index e6a22ce7b..3c81f77a9 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -356,6 +356,24 @@ class pkgAcqMetaBase : public pkgAcquire::Item
protected:
std::vector<Item*> Transaction;
+ /** \brief A package-system-specific parser for the meta-index file. */
+ indexRecords *MetaIndexParser;
+
+ /** \brief The index files which should be looked up in the meta-index
+ * and then downloaded.
+ */
+ const std::vector<IndexTarget*>* IndexTargets;
+
+ /** \brief Starts downloading the individual index files.
+ *
+ * \param verify If \b true, only indices whose expected hashsum
+ * can be determined from the meta-index will be downloaded, and
+ * the hashsums of indices will be checked (reporting
+ * #StatAuthError if there is a mismatch). If verify is \b false,
+ * no hashsum checking will be performed.
+ */
+ void QueueIndexes(bool verify);
+
public:
// transaction code
void Add(Item *I);
@@ -369,9 +387,12 @@ class pkgAcqMetaBase : public pkgAcquire::Item
pkgAcqMetaBase(pkgAcquire *Owner,
+ const std::vector<IndexTarget*>* IndexTargets,
+ indexRecords* MetaIndexParser,
HashStringList const &ExpectedHashes=HashStringList(),
pkgAcqMetaBase *TransactionManager=NULL)
- : Item(Owner, ExpectedHashes, TransactionManager) {};
+ : Item(Owner, ExpectedHashes, TransactionManager),
+ MetaIndexParser(MetaIndexParser), IndexTargets(IndexTargets) {};
};
/** \brief An acquire item that downloads the detached signature {{{
@@ -397,19 +418,9 @@ class pkgAcqMetaSig : public pkgAcqMetaBase
std::string URIDesc;
std::string ShortDesc;
- /** \brief A package-system-specific parser for the meta-index file. */
- indexRecords* MetaIndexParser;
-
/** \brief The file we need to verify */
std::string MetaIndexFile;
- /** \brief The index files which should be looked up in the meta-index
- * and then downloaded.
- *
- * \todo Why a list of pointers instead of a list of structs?
- */
- const std::vector<IndexTarget*>* IndexTargets;
-
/** \brief If we are in fetching or download state */
bool AuthPass;
@@ -463,12 +474,6 @@ class pkgAcqMetaIndex : public pkgAcqMetaBase
*/
std::string SigFile;
- /** \brief The index files to download. */
- const std::vector<IndexTarget*>* IndexTargets;
-
- /** \brief The parser for the meta-index file. */
- indexRecords* MetaIndexParser;
-
/** \brief If \b true, the index's signature is currently being verified.
*/
bool AuthPass;
@@ -521,16 +526,6 @@ class pkgAcqMetaIndex : public pkgAcqMetaBase
public:
- /** \brief Starts downloading the individual index files.
- *
- * \param verify If \b true, only indices whose expected hashsum
- * can be determined from the meta-index will be downloaded, and
- * the hashsums of indices will be checked (reporting
- * #StatAuthError if there is a mismatch). If verify is \b false,
- * no hashsum checking will be performed.
- */
- void QueueIndexes(bool verify);
-
// 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,