apt 3.0.3
commandline package manager
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
pkgAcqArchive Class Reference

An item that is responsible for fetching a package file. {{{. More...

#include <apt-pkg/acquire-item.h>

Inheritance diagram for pkgAcqArchive:
[legend]
Collaboration diagram for pkgAcqArchive:
[legend]

Public Member Functions

void Failed (std::string const &Message, pkgAcquire::MethodConfig const *Cnf) override
 
void Done (std::string const &Message, HashStringList const &Hashes, pkgAcquire::MethodConfig const *Cnf) override
 
std::string DescURI () const override
 
std::string ShortDesc () const override
 
void Finished () override
 
bool IsTrusted () const override
 
HashStringList GetExpectedHashes () const override
 
bool HashesRequired () const override
 
 pkgAcqArchive (pkgAcquire *const Owner, pkgSourceList *const Sources, pkgRecords *const Recs, pkgCache::VerIterator const &Version, std::string &StoreFilename)
 Create a new pkgAcqArchive.
 

Protected Member Functions

bool QueueNext ()
 Queue up the next available file for this version.
 
std::string GetFinalFilename () const override
 Get the full pathname of the final file for the current URI.
 

Protected Attributes

pkgCache::VerIterator Version
 The package version being fetched.
 
pkgSourceListSources
 The list of sources from which to pick archives to download this package from.
 
pkgRecordsRecs
 A package records object, used to look up the file corresponding to each version of the package.
 
std::string & StoreFilename
 A location in which the actual filename of the package should be stored.
 
bool Trusted
 true if this version file is being downloaded from a trusted source.
 

Detailed Description

An item that is responsible for fetching a package file. {{{.

If the package file already exists in the cache, nothing will be done.

Constructor & Destructor Documentation

◆ pkgAcqArchive()

pkgAcqArchive ( pkgAcquire *const  Owner,
pkgSourceList *const  Sources,
pkgRecords *const  Recs,
pkgCache::VerIterator const &  Version,
std::string &  StoreFilename 
)

Create a new pkgAcqArchive.

Parameters
OwnerThe pkgAcquire object with which this item is associated.
SourcesThe sources from which to download version files.
RecsA package records object, used to look up the file corresponding to each version of the package.
VersionThe package version to download.
[out]StoreFilenameA location in which the actual filename of the package should be stored. It will be set to a guessed basename in the constructor, and filled in with a fully qualified filename once the download finishes.

References HashStringList::empty(), pkgCache< Str, Itr >::Flag::LocalSource, pkgCache< Str, Itr >::Flag::NotSource, HashStringList::push_back(), Recs, Sources, StoreFilename, Trusted, and Version.


The documentation for this class was generated from the following files: