*
* \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
*
{
void * const d;
protected:
- IndexTarget const Target;
HashStringList GetExpectedHashesFor(std::string const &MetaKey) const;
bool QueueURI(pkgAcquire::ItemDesc &Item) APT_OVERRIDE;
public:
+ IndexTarget const Target;
+
/** \brief storge name until a transaction is finished */
std::string PartialFile;
pkgAcqMetaClearSig * const TransactionManager;
enum TransactionStates {
+ TransactionStarted,
TransactionCommit,
TransactionAbort,
};
virtual bool HashesRequired() const APT_OVERRIDE;
- pkgAcqTransactionItem(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager, IndexTarget const &Target);
+ pkgAcqTransactionItem(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager, IndexTarget const &Target) APT_NONNULL(2, 3);
virtual ~pkgAcqTransactionItem();
friend class pkgAcqMetaBase;
protected:
std::vector<pkgAcqTransactionItem*> Transaction;
- /** \brief The index files which should be looked up in the meta-index
- * and then downloaded.
- */
- std::vector<IndexTarget> IndexTargets;
-
/** \brief If \b true, the index's signature is currently being verified.
*/
bool AuthPass;
- /** \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 const verify);
-
/** \brief Called when a file is finished being retrieved.
*
* If the file was not downloaded to DestFile, a copy process is
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;
virtual std::string GetFinalFilename() const APT_OVERRIDE;
pkgAcqMetaBase(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
- std::vector<IndexTarget> const &IndexTargets,
- IndexTarget const &DataTarget);
+ IndexTarget const &DataTarget) APT_NONNULL(2, 3);
virtual ~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,
- IndexTarget const &DataTarget, IndexTarget const &DetachedSigTarget,
- std::vector<IndexTarget> const &IndexTargets);
+ IndexTarget const &DataTarget, IndexTarget const &DetachedSigTarget) APT_NONNULL(2, 3);
virtual ~pkgAcqMetaIndex();
friend class pkgAcqMetaSig;
/** \brief Create a new pkgAcqMetaSig. */
pkgAcqMetaSig(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
- IndexTarget const &Target, pkgAcqMetaIndex * const MetaIndex);
+ IndexTarget const &Target, pkgAcqMetaIndex * const MetaIndex) APT_NONNULL(2, 3, 5);
virtual ~pkgAcqMetaSig();
};
/*}}}*/
class APT_HIDDEN pkgAcqMetaClearSig : public pkgAcqMetaIndex
{
void * const d;
-
- IndexTarget const ClearsignedTarget;
IndexTarget const DetachedDataTarget;
public:
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 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 const verify);
/** \brief Create a new pkgAcqMetaClearSig. */
pkgAcqMetaClearSig(pkgAcquire * const Owner,
IndexTarget const &ClearsignedTarget,
IndexTarget const &DetachedDataTarget,
IndexTarget const &DetachedSigTarget,
- std::vector<IndexTarget> const &IndexTargets,
metaIndex * const MetaIndexParser);
virtual ~pkgAcqMetaClearSig();
};
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);
+ IndexTarget const &Target) APT_NONNULL(2, 3);
virtual ~pkgAcqBaseIndex();
};
/*}}}*/
* \param ShortDesc A short description of the list file to download.
*/
pkgAcqDiffIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
- IndexTarget const &Target);
+ IndexTarget const &Target) APT_NONNULL(2, 3);
virtual ~pkgAcqDiffIndex();
private:
APT_HIDDEN void QueueOnIMSHit() const;
*/
pkgAcqIndexMergeDiffs(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
IndexTarget const &Target, DiffInfo const &patch,
- std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches);
+ std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches) APT_NONNULL(2, 3, 6);
virtual ~pkgAcqIndexMergeDiffs();
};
/*}}}*/
/** 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,
*/
pkgAcqIndexDiffs(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
IndexTarget const &Target,
- std::vector<DiffInfo> const &diffs=std::vector<DiffInfo>());
+ std::vector<DiffInfo> const &diffs=std::vector<DiffInfo>()) APT_NONNULL(2, 3);
virtual ~pkgAcqIndexDiffs();
};
/*}}}*/
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.
/** \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;
virtual std::string GetMetaKey() const APT_OVERRIDE;
pkgAcqIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
- IndexTarget const &Target);
+ IndexTarget const &Target) APT_NONNULL(2, 3);
virtual ~pkgAcqIndex();
private:
*/
class pkgAcqChangelog : public pkgAcquire::Item
{
- void * const d;
+ class Private;
+ Private * const d;
std::string TemporaryDirectory;
std::string const SrcName;
std::string const SrcVersion;