Beside being another big API break with hopefully zero fallout in
reality it avoids having the same member and helper code in each and
every subclass.
/*}}}*/
// Acquire::Item::Item - Constructor /*{{{*/
/*}}}*/
// Acquire::Item::Item - Constructor /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-pkgAcquire::Item::Item(pkgAcquire *Owner) : Owner(Owner), FileSize(0),
- PartialSize(0), Mode(0), ID(0), Complete(false),
- Local(false), QueueCounter(0),
- ExpectedAdditionalItems(0)
+pkgAcquire::Item::Item(pkgAcquire *Owner, HashStringList const &ExpectedHashes) :
+ Owner(Owner), FileSize(0), PartialSize(0), Mode(0), ID(0), Complete(false),
+ Local(false), QueueCounter(0), ExpectedAdditionalItems(0),
+ ExpectedHashes(ExpectedHashes)
{
Owner->Add(this);
Status = StatIdle;
{
Owner->Add(this);
Status = StatIdle;
pkgAcqSubIndex::pkgAcqSubIndex(pkgAcquire *Owner, string const &URI,
string const &URIDesc, string const &ShortDesc,
HashStringList const &ExpectedHashes)
pkgAcqSubIndex::pkgAcqSubIndex(pkgAcquire *Owner, string const &URI,
string const &URIDesc, string const &ShortDesc,
HashStringList const &ExpectedHashes)
- : Item(Owner), ExpectedHashes(ExpectedHashes)
+ : Item(Owner, ExpectedHashes)
{
/* XXX: Beware: Currently this class does nothing (of value) anymore ! */
Debug = _config->FindB("Debug::pkgAcquire::SubIndex",false);
{
/* XXX: Beware: Currently this class does nothing (of value) anymore ! */
Debug = _config->FindB("Debug::pkgAcquire::SubIndex",false);
* the original packages file
*/
pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire *Owner,
* the original packages file
*/
pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire *Owner,
- struct IndexTarget const * const Target,
+ IndexTarget const * const Target,
HashStringList const &ExpectedHashes,
indexRecords *MetaIndexParser)
HashStringList const &ExpectedHashes,
indexRecords *MetaIndexParser)
- : Item(Owner), ExpectedHashes(ExpectedHashes), Target(Target),
+ : Item(Owner, ExpectedHashes), Target(Target),
MetaIndexParser(MetaIndexParser)
{
MetaIndexParser(MetaIndexParser)
{
HashStringList const &ExpectedHashes,
string ServerSha1,
vector<DiffInfo> diffs)
HashStringList const &ExpectedHashes,
string ServerSha1,
vector<DiffInfo> diffs)
- : Item(Owner), RealURI(URI), ExpectedHashes(ExpectedHashes),
+ : Item(Owner, ExpectedHashes), RealURI(URI),
available_patches(diffs), ServerSha1(ServerSha1)
{
available_patches(diffs), ServerSha1(ServerSha1)
{
if(Debug)
std::clog << "pkgAcqIndexDiffs failed: " << Desc.URI << " with " << Message << std::endl
<< "Falling back to normal index file acquire" << std::endl;
if(Debug)
std::clog << "pkgAcqIndexDiffs failed: " << Desc.URI << " with " << Message << std::endl
<< "Falling back to normal index file acquire" << std::endl;
- new pkgAcqIndex(Owner, RealURI, Description,Desc.ShortDesc,
- ExpectedHashes);
+ new pkgAcqIndex(Owner, RealURI, Description,Desc.ShortDesc, HashSums());
DestFile = _config->FindDir("Dir::State::lists");
DestFile += URItoFileName(RealURI);
DestFile = _config->FindDir("Dir::State::lists");
DestFile += URItoFileName(RealURI);
- if(ExpectedHashes.usable() && !ExpectedHashes.VerifyFile(DestFile))
+ if(HashSums().usable() && !HashSums().VerifyFile(DestFile))
{
RenameOnError(HashSumMismatch);
Dequeue();
{
RenameOnError(HashSumMismatch);
Dequeue();
// see if there is more to download
if(available_patches.empty() == false) {
new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc,
// see if there is more to download
if(available_patches.empty() == false) {
new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc,
- ExpectedHashes, ServerSha1, available_patches);
+ HashSums(), ServerSha1, available_patches);
return Finish();
} else
return Finish(true);
return Finish();
} else
return Finish(true);
string const &ShortDesc, HashStringList const &ExpectedHashes,
DiffInfo const &patch,
std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches)
string const &ShortDesc, HashStringList const &ExpectedHashes,
DiffInfo const &patch,
std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches)
- : Item(Owner), RealURI(URI), ExpectedHashes(ExpectedHashes),
+ : Item(Owner, ExpectedHashes), RealURI(URI),
patch(patch),allPatches(allPatches), State(StateFetchDiff)
{
patch(patch),allPatches(allPatches), State(StateFetchDiff)
{
pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner,
string URI,string URIDesc,string ShortDesc,
HashStringList const &ExpectedHashes, string comprExt)
pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner,
string URI,string URIDesc,string ShortDesc,
HashStringList const &ExpectedHashes, string comprExt)
- : Item(Owner), RealURI(URI), ExpectedHashes(ExpectedHashes), Target(0),
+ : Item(Owner, ExpectedHashes), RealURI(URI), Target(0),
MetaIndexParser(0)
{
if(comprExt.empty() == true)
MetaIndexParser(0)
{
if(comprExt.empty() == true)
Init(URI, URIDesc, ShortDesc);
}
Init(URI, URIDesc, ShortDesc);
}
-pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner, struct IndexTarget const * const Target,
+pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner, IndexTarget const * const Target,
HashStringList const &ExpectedHashes, indexRecords *MetaIndexParser)
HashStringList const &ExpectedHashes, indexRecords *MetaIndexParser)
- : Item(Owner), RealURI(Target->URI), ExpectedHashes(ExpectedHashes)
+ : Item(Owner, ExpectedHashes), RealURI(Target->URI)
{
// autoselect the compression method
std::vector<std::string> types = APT::Configuration::getCompressionTypes();
{
// autoselect the compression method
std::vector<std::string> types = APT::Configuration::getCompressionTypes();
: pkgAcqIndex(Owner, URI, URIDesc, ShortDesc, HashStringList(), "")
{
}
: pkgAcqIndex(Owner, URI, URIDesc, ShortDesc, HashStringList(), "")
{
}
-pkgAcqIndexTrans::pkgAcqIndexTrans(pkgAcquire *Owner, struct IndexTarget const * const Target,
+pkgAcqIndexTrans::pkgAcqIndexTrans(pkgAcquire *Owner, IndexTarget const * const Target,
HashStringList const &ExpectedHashes, indexRecords *MetaIndexParser)
: pkgAcqIndex(Owner, Target, ExpectedHashes, MetaIndexParser)
{
HashStringList const &ExpectedHashes, indexRecords *MetaIndexParser)
: pkgAcqIndex(Owner, Target, ExpectedHashes, MetaIndexParser)
{
string MetaIndexShortDesc,
const vector<IndexTarget*>* IndexTargets,
indexRecords* MetaIndexParser) :
string MetaIndexShortDesc,
const vector<IndexTarget*>* IndexTargets,
indexRecords* MetaIndexParser) :
- Item(Owner), RealURI(URI), MetaIndexURI(MetaIndexURI),
+ Item(Owner, HashStringList()), RealURI(URI), MetaIndexURI(MetaIndexURI),
MetaIndexURIDesc(MetaIndexURIDesc), MetaIndexShortDesc(MetaIndexShortDesc),
MetaIndexParser(MetaIndexParser), IndexTargets(IndexTargets)
{
MetaIndexURIDesc(MetaIndexURIDesc), MetaIndexShortDesc(MetaIndexShortDesc),
MetaIndexParser(MetaIndexParser), IndexTargets(IndexTargets)
{
pkgAcqMetaIndex::pkgAcqMetaIndex(pkgAcquire *Owner, /*{{{*/
string URI,string URIDesc,string ShortDesc,
string SigFile,
pkgAcqMetaIndex::pkgAcqMetaIndex(pkgAcquire *Owner, /*{{{*/
string URI,string URIDesc,string ShortDesc,
string SigFile,
- const vector<struct IndexTarget*>* IndexTargets,
+ const vector<IndexTarget*>* IndexTargets,
indexRecords* MetaIndexParser) :
indexRecords* MetaIndexParser) :
- Item(Owner), RealURI(URI), SigFile(SigFile), IndexTargets(IndexTargets),
+ Item(Owner, HashStringList()), RealURI(URI), SigFile(SigFile), IndexTargets(IndexTargets),
MetaIndexParser(MetaIndexParser), AuthPass(false), IMSHit(false)
{
DestFile = _config->FindDir("Dir::State::lists") + "partial/";
MetaIndexParser(MetaIndexParser), AuthPass(false), IMSHit(false)
{
DestFile = _config->FindDir("Dir::State::lists") + "partial/";
// at this point the real Items are loaded in the fetcher
ExpectedAdditionalItems = 0;
// at this point the real Items are loaded in the fetcher
ExpectedAdditionalItems = 0;
- for (vector <struct IndexTarget*>::const_iterator Target = IndexTargets->begin();
+ for (vector <IndexTarget*>::const_iterator Target = IndexTargets->begin();
Target != IndexTargets->end();
++Target)
{
Target != IndexTargets->end();
++Target)
{
string const &URI, string const &URIDesc, string const &ShortDesc,
string const &MetaIndexURI, string const &MetaIndexURIDesc, string const &MetaIndexShortDesc,
string const &MetaSigURI, string const &MetaSigURIDesc, string const &MetaSigShortDesc,
string const &URI, string const &URIDesc, string const &ShortDesc,
string const &MetaIndexURI, string const &MetaIndexURIDesc, string const &MetaIndexShortDesc,
string const &MetaSigURI, string const &MetaSigURIDesc, string const &MetaSigShortDesc,
- const vector<struct IndexTarget*>* IndexTargets,
+ const vector<IndexTarget*>* IndexTargets,
indexRecords* MetaIndexParser) :
pkgAcqMetaIndex(Owner, URI, URIDesc, ShortDesc, "", IndexTargets, MetaIndexParser),
MetaIndexURI(MetaIndexURI), MetaIndexURIDesc(MetaIndexURIDesc), MetaIndexShortDesc(MetaIndexShortDesc),
indexRecords* MetaIndexParser) :
pkgAcqMetaIndex(Owner, URI, URIDesc, ShortDesc, "", IndexTargets, MetaIndexParser),
MetaIndexURI(MetaIndexURI), MetaIndexURIDesc(MetaIndexURIDesc), MetaIndexShortDesc(MetaIndexShortDesc),
pkgAcqArchive::pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources,
pkgRecords *Recs,pkgCache::VerIterator const &Version,
string &StoreFilename) :
pkgAcqArchive::pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources,
pkgRecords *Recs,pkgCache::VerIterator const &Version,
string &StoreFilename) :
- Item(Owner), Version(Version), Sources(Sources), Recs(Recs),
+ Item(Owner, HashStringList()), Version(Version), Sources(Sources), Recs(Recs),
StoreFilename(StoreFilename), Vf(Version.FileList()),
Trusted(false)
{
StoreFilename(StoreFilename), Vf(Version.FileList()),
Trusted(false)
{
unsigned long long Size,string Dsc,string ShortDesc,
const string &DestDir, const string &DestFilename,
bool IsIndexFile) :
unsigned long long Size,string Dsc,string ShortDesc,
const string &DestDir, const string &DestFilename,
bool IsIndexFile) :
- Item(Owner), ExpectedHashes(Hashes), IsIndexFile(IsIndexFile)
+ Item(Owner, Hashes), IsIndexFile(IsIndexFile)
{
Retries = _config->FindI("Acquire::Retries",0);
{
Retries = _config->FindI("Acquire::Retries",0);
class indexRecords;
class pkgRecords;
class pkgSourceList;
class indexRecords;
class pkgRecords;
class pkgSourceList;
/** \brief Represents the process by which a pkgAcquire object should {{{
* retrieve a file or a collection of files.
/** \brief Represents the process by which a pkgAcquire object should {{{
* retrieve a file or a collection of files.
* \return the HashSums of this object, if applicable; otherwise, an
* empty list.
*/
* \return the HashSums of this object, if applicable; otherwise, an
* empty list.
*/
- virtual HashStringList HashSums() const {return HashStringList();};
+ HashStringList HashSums() const {return ExpectedHashes;};
std::string HashSum() const {HashStringList const hashes = HashSums(); HashString const * const hs = hashes.find(NULL); return hs != NULL ? hs->toStr() : ""; };
/** \return the acquire process with which this item is associated. */
std::string HashSum() const {HashStringList const hashes = HashSums(); HashString const * const hs = hashes.find(NULL); return hs != NULL ? hs->toStr() : ""; };
/** \return the acquire process with which this item is associated. */
* process, but does not place it into any fetch queues (you must
* manually invoke QueueURI() to do so).
*
* process, but does not place it into any fetch queues (you must
* manually invoke QueueURI() to do so).
*
- * Initializes all fields of the item other than Owner to 0,
- * false, or the empty string.
- *
* \param Owner The new owner of this item.
* \param Owner The new owner of this item.
+ * \param ExpectedHashes of the file represented by this item
- Item(pkgAcquire *Owner);
+ Item(pkgAcquire *Owner, HashStringList const &ExpectedHashes);
/** \brief Remove this item from its owner's queue by invoking
* pkgAcquire::Remove.
/** \brief Remove this item from its owner's queue by invoking
* pkgAcquire::Remove.
* \param state respresenting the error we encountered
*/
bool RenameOnError(RenameOnErrorState const state);
* \param state respresenting the error we encountered
*/
bool RenameOnError(RenameOnErrorState const state);
+
+ /** \brief The HashSums of the item is supposed to have than done */
+ HashStringList ExpectedHashes;
+
+ /** \brief The item that is currently being downloaded. */
+ pkgAcquire::ItemDesc Desc;
};
/*}}}*/
/** \brief Information about an index patch (aka diff). */ /*{{{*/
};
/*}}}*/
/** \brief Information about an index patch (aka diff). */ /*{{{*/
/** \brief If \b true, debugging information will be written to std::clog. */
bool Debug;
/** \brief If \b true, debugging information will be written to std::clog. */
bool Debug;
- /** \brief The item that is currently being downloaded. */
- pkgAcquire::ItemDesc Desc;
-
- /** \brief The Hashes that this file should have after download
- */
- HashStringList ExpectedHashes;
-
public:
// Specialized action members
virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
public:
// Specialized action members
virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
/** \brief If \b true, debugging information will be written to std::clog. */
bool Debug;
/** \brief If \b true, debugging information will be written to std::clog. */
bool Debug;
- /** \brief The item that is currently being downloaded. */
- pkgAcquire::ItemDesc Desc;
-
/** \brief The URI of the index file to recreate at our end (either
* by downloading it or by applying partial patches).
*/
std::string RealURI;
/** \brief The URI of the index file to recreate at our end (either
* by downloading it or by applying partial patches).
*/
std::string RealURI;
- /** \brief The Hashes that the real index file should have after
- * all patches have been applied.
- */
- HashStringList ExpectedHashes;
-
/** \brief The index file which will be patched to generate the new
* file.
*/
/** \brief The index file which will be patched to generate the new
* file.
*/
- /** \brief description of the item that is currently being
- * downloaded.
- */
- pkgAcquire::ItemDesc Desc;
-
/** \brief URI of the package index file that is being
* reconstructed.
*/
std::string RealURI;
/** \brief URI of the package index file that is being
* reconstructed.
*/
std::string RealURI;
- /** \brief The Hashes that the real index file should have after
- * all patches have been applied.
- */
- HashStringList ExpectedHashes;
-
/** \brief description of the file being downloaded. */
std::string Description;
/** \brief description of the file being downloaded. */
std::string Description;
- /** \brief A description of the item that is currently being
- * downloaded.
- */
- pkgAcquire::ItemDesc Desc;
-
/** \brief The URI of the package index file that is being
* reconstructed.
*/
std::string RealURI;
/** \brief The URI of the package index file that is being
* reconstructed.
*/
std::string RealURI;
- /** \brief The HashSums of the package index file that is being
- * reconstructed.
- */
- HashStringList ExpectedHashes;
-
/** A description of the file being downloaded. */
std::string Description;
/** A description of the file being downloaded. */
std::string Description;
// the downloaded file contains the expected tag
bool Verify;
// the downloaded file contains the expected tag
bool Verify;
- /** \brief The download request that is currently being
- * processed.
- */
- pkgAcquire::ItemDesc Desc;
-
/** \brief The object that is actually being fetched (minus any
* compression-related extensions).
*/
std::string RealURI;
/** \brief The object that is actually being fetched (minus any
* compression-related extensions).
*/
std::string RealURI;
- /** \brief The expected hashsum of the decompressed index file. */
- HashStringList ExpectedHashes;
-
/** \brief The compression-related file extensions that are being
* added to the downloaded file one by one if first fails (e.g., "gz bz2").
*/
/** \brief The compression-related file extensions that are being
* added to the downloaded file one by one if first fails (e.g., "gz bz2").
*/
pkgAcquire::MethodConfig *Cnf);
virtual std::string Custom600Headers() const;
virtual std::string DescURI() const {return Desc.URI;};
pkgAcquire::MethodConfig *Cnf);
virtual std::string Custom600Headers() const;
virtual std::string DescURI() const {return Desc.URI;};
- virtual HashStringList HashSums() const {return ExpectedHashes; };
/** \brief Create a pkgAcqIndex.
*
/** \brief Create a pkgAcqIndex.
*
pkgAcqIndex(pkgAcquire *Owner,std::string URI,std::string URIDesc,
std::string ShortDesc, HashStringList const &ExpectedHashes,
std::string compressExt="");
pkgAcqIndex(pkgAcquire *Owner,std::string URI,std::string URIDesc,
std::string ShortDesc, HashStringList const &ExpectedHashes,
std::string compressExt="");
- pkgAcqIndex(pkgAcquire *Owner, struct IndexTarget const * const Target,
+ pkgAcqIndex(pkgAcquire *Owner, IndexTarget const * const Target,
HashStringList const &ExpectedHashes, indexRecords *MetaIndexParser);
void Init(std::string const &URI, std::string const &URIDesc, std::string const &ShortDesc);
};
HashStringList const &ExpectedHashes, indexRecords *MetaIndexParser);
void Init(std::string const &URI, std::string const &URIDesc, std::string const &ShortDesc);
};
*/
pkgAcqIndexTrans(pkgAcquire *Owner,std::string URI,std::string URIDesc,
std::string ShortDesc);
*/
pkgAcqIndexTrans(pkgAcquire *Owner,std::string URI,std::string URIDesc,
std::string ShortDesc);
- pkgAcqIndexTrans(pkgAcquire *Owner, struct IndexTarget const * const Target,
+ pkgAcqIndexTrans(pkgAcquire *Owner, IndexTarget const * const Target,
HashStringList const &ExpectedHashes, indexRecords *MetaIndexParser);
};
/*}}}*/
HashStringList const &ExpectedHashes, indexRecords *MetaIndexParser);
};
/*}}}*/
/** \brief The last good signature file */
std::string LastGoodSig;
/** \brief The last good signature file */
std::string LastGoodSig;
- /** \brief The fetch request that is currently being processed. */
- pkgAcquire::ItemDesc Desc;
-
/** \brief The URI of the signature file. Unlike Desc.URI, this is
* never modified; it is used to determine the file that is being
* downloaded.
/** \brief The URI of the signature file. Unlike Desc.URI, this is
* never modified; it is used to determine the file that is being
* downloaded.
*
* \todo Why a list of pointers instead of a list of structs?
*/
*
* \todo Why a list of pointers instead of a list of structs?
*/
- const std::vector<struct IndexTarget*>* IndexTargets;
+ const std::vector<IndexTarget*>* IndexTargets;
/** \brief Create a new pkgAcqMetaSig. */
pkgAcqMetaSig(pkgAcquire *Owner,std::string URI,std::string URIDesc, std::string ShortDesc,
std::string MetaIndexURI, std::string MetaIndexURIDesc, std::string MetaIndexShortDesc,
/** \brief Create a new pkgAcqMetaSig. */
pkgAcqMetaSig(pkgAcquire *Owner,std::string URI,std::string URIDesc, std::string ShortDesc,
std::string MetaIndexURI, std::string MetaIndexURIDesc, std::string MetaIndexShortDesc,
- const std::vector<struct IndexTarget*>* IndexTargets,
+ const std::vector<IndexTarget*>* IndexTargets,
indexRecords* MetaIndexParser);
virtual ~pkgAcqMetaSig();
};
indexRecords* MetaIndexParser);
virtual ~pkgAcqMetaSig();
};
class pkgAcqMetaIndex : public pkgAcquire::Item
{
protected:
class pkgAcqMetaIndex : public pkgAcquire::Item
{
protected:
- /** \brief The fetch command that is currently being processed. */
- pkgAcquire::ItemDesc Desc;
-
/** \brief The URI that is actually being downloaded; never
* modified by pkgAcqMetaIndex.
*/
/** \brief The URI that is actually being downloaded; never
* modified by pkgAcqMetaIndex.
*/
std::string SigFile;
/** \brief The index files to download. */
std::string SigFile;
/** \brief The index files to download. */
- const std::vector<struct IndexTarget*>* IndexTargets;
+ const std::vector<IndexTarget*>* IndexTargets;
/** \brief The parser for the meta-index file. */
indexRecords* MetaIndexParser;
/** \brief The parser for the meta-index file. */
indexRecords* MetaIndexParser;
pkgAcqMetaIndex(pkgAcquire *Owner,
std::string URI,std::string URIDesc, std::string ShortDesc,
std::string SigFile,
pkgAcqMetaIndex(pkgAcquire *Owner,
std::string URI,std::string URIDesc, std::string ShortDesc,
std::string SigFile,
- const std::vector<struct IndexTarget*>* IndexTargets,
+ const std::vector<IndexTarget*>* IndexTargets,
indexRecords* MetaIndexParser);
};
/*}}}*/
indexRecords* MetaIndexParser);
};
/*}}}*/
std::string const &URI, std::string const &URIDesc, std::string const &ShortDesc,
std::string const &MetaIndexURI, std::string const &MetaIndexURIDesc, std::string const &MetaIndexShortDesc,
std::string const &MetaSigURI, std::string const &MetaSigURIDesc, std::string const &MetaSigShortDesc,
std::string const &URI, std::string const &URIDesc, std::string const &ShortDesc,
std::string const &MetaIndexURI, std::string const &MetaIndexURIDesc, std::string const &MetaIndexShortDesc,
std::string const &MetaSigURI, std::string const &MetaSigURIDesc, std::string const &MetaSigShortDesc,
- const std::vector<struct IndexTarget*>* IndexTargets,
+ const std::vector<IndexTarget*>* IndexTargets,
indexRecords* MetaIndexParser);
virtual ~pkgAcqMetaClearSig();
};
indexRecords* MetaIndexParser);
virtual ~pkgAcqMetaClearSig();
};
/** \brief The package version being fetched. */
pkgCache::VerIterator Version;
/** \brief The package version being fetched. */
pkgCache::VerIterator Version;
- /** \brief The fetch command that is currently being processed. */
- pkgAcquire::ItemDesc Desc;
-
/** \brief The list of sources from which to pick archives to
* download this package from.
*/
/** \brief The list of sources from which to pick archives to
* download this package from.
*/
- /** \brief The hashsum of this package. */
- HashStringList ExpectedHashes;
-
/** \brief A location in which the actual filename of the package
* should be stored.
*/
/** \brief A location in which the actual filename of the package
* should be stored.
*/
virtual std::string DescURI() const {return Desc.URI;};
virtual std::string ShortDesc() const {return Desc.ShortDesc;};
virtual void Finished();
virtual std::string DescURI() const {return Desc.URI;};
virtual std::string ShortDesc() const {return Desc.ShortDesc;};
virtual void Finished();
- virtual HashStringList HashSums() const {return ExpectedHashes; };
virtual bool IsTrusted() const;
/** \brief Create a new pkgAcqArchive.
virtual bool IsTrusted() const;
/** \brief Create a new pkgAcqArchive.
*/
class pkgAcqFile : public pkgAcquire::Item
{
*/
class pkgAcqFile : public pkgAcquire::Item
{
- /** \brief The currently active download process. */
- pkgAcquire::ItemDesc Desc;
-
- /** \brief The hashsum of the file to download, if it is known. */
- HashStringList ExpectedHashes;
-
/** \brief How many times to retry the download, set from
* Acquire::Retries.
*/
/** \brief How many times to retry the download, set from
* Acquire::Retries.
*/
virtual void Done(std::string Message,unsigned long long Size, HashStringList const &CalcHashes,
pkgAcquire::MethodConfig *Cnf);
virtual std::string DescURI() const {return Desc.URI;};
virtual void Done(std::string Message,unsigned long long Size, HashStringList const &CalcHashes,
pkgAcquire::MethodConfig *Cnf);
virtual std::string DescURI() const {return Desc.URI;};
- virtual HashStringList HashSums() const { return ExpectedHashes; };
virtual std::string Custom600Headers() const;
/** \brief Create a new pkgAcqFile object.
virtual std::string Custom600Headers() const;
/** \brief Create a new pkgAcqFile object.