apt 3.0.3
commandline package manager
Classes | Public Member Functions | Static Public Member Functions | List of all members
pkgAcqChangelog Class Reference

Retrieve the changelog for the given version {{{. More...

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

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

Classes

class  Private
 

Public Member Functions

HashStringList GetExpectedHashes () const override
 
bool HashesRequired () const override
 
void Failed (std::string const &Message, pkgAcquire::MethodConfig const *Cnf) override
 
void Done (std::string const &Message, HashStringList const &CalcHashes, pkgAcquire::MethodConfig const *Cnf) override
 
std::string DescURI () const override
 
 pkgAcqChangelog (pkgAcquire *const Owner, pkgCache::VerIterator const &Ver, std::string const &DestDir="", std::string const &DestFilename="")
 Create a new pkgAcqChangelog object.
 
 pkgAcqChangelog (pkgAcquire *const Owner, pkgCache::RlsFileIterator const &Rls, char const *const Component, char const *const SrcName, char const *const SrcVersion, std::string const &DestDir="", std::string const &DestFilename="")
 Create a new pkgAcqChangelog object.
 
 pkgAcqChangelog (pkgAcquire *const Owner, std::string const &URI, char const *const SrcName, char const *const SrcVersion, std::string const &DestDir="", std::string const &DestFilename="")
 Create a new pkgAcqChangelog object.
 

Static Public Member Functions

static std::string URI (pkgCache::VerIterator const &Ver)
 
static std::string URI (pkgCache::RlsFileIterator const &Rls, char const *const Component, char const *const SrcName, char const *const SrcVersion)
 
static std::string URI (std::string const &Template, char const *const Component, char const *const SrcName, char const *const SrcVersion)
 
static std::string URITemplate (pkgCache::RlsFileIterator const &Rls)
 

Detailed Description

Retrieve the changelog for the given version {{{.

Downloads the changelog to a temporary file it will also remove again while it is deconstructed or downloads it to a named location.

Constructor & Destructor Documentation

◆ pkgAcqChangelog() [1/3]

pkgAcqChangelog ( pkgAcquire *const  Owner,
pkgCache::VerIterator const &  Ver,
std::string const &  DestDir = "",
std::string const &  DestFilename = "" 
)

Create a new pkgAcqChangelog object.

Parameters
OwnerThe pkgAcquire object with which this object is associated.
Veris the version to get the changelog for
DestDirThe directory the file should be downloaded into. Will be an autocreated (and cleaned up) temporary directory if not set.
DestFilenameThe filename the file should have in #DestDir Defaults to sourcepackagename.changelog if not set.

References pkgAcquire::URI.

◆ pkgAcqChangelog() [2/3]

pkgAcqChangelog ( pkgAcquire *const  Owner,
pkgCache::RlsFileIterator const &  Rls,
char const *const  Component,
char const *const  SrcName,
char const *const  SrcVersion,
std::string const &  DestDir = "",
std::string const &  DestFilename = "" 
)

Create a new pkgAcqChangelog object.

Parameters
OwnerThe pkgAcquire object with which this object is associated.
Rlsis the Release file the package comes from
Componentin which the package resides, can be empty
SrcNameis the source package name
SrcVersionis the source package version
DestDirThe directory the file should be downloaded into. Will be an autocreated (and cleaned up) temporary directory if not set.
DestFilenameThe filename the file should have in #DestDir Defaults to sourcepackagename.changelog if not set.

References pkgAcquire::URI.

◆ pkgAcqChangelog() [3/3]

pkgAcqChangelog ( pkgAcquire *const  Owner,
std::string const &  URI,
char const *const  SrcName,
char const *const  SrcVersion,
std::string const &  DestDir = "",
std::string const &  DestFilename = "" 
)

Create a new pkgAcqChangelog object.

Parameters
OwnerThe pkgAcquire object with which this object is associated.
URIis to be used to get the changelog
SrcNameis the source package name
SrcVersionis the source package version
DestDirThe directory the file should be downloaded into. Will be an autocreated (and cleaned up) temporary directory if not set.
DestFilenameThe filename the file should have in #DestDir Defaults to sourcepackagename.changelog if not set.

References pkgAcquire::URI.

Member Function Documentation

◆ URI() [1/3]

std::string URI ( pkgCache::RlsFileIterator const &  Rls,
char const *const  Component,
char const *const  SrcName,
char const *const  SrcVersion 
)
static

returns the URI to the changelog of this version

Parameters
Rlsis the Release file the package comes from
Componentin which the package resides, can be empty
SrcNameis the source package name
SrcVersionis the source package version
Returns
the URI which will be used to acquire the changelog

References URITemplate().

◆ URI() [2/3]

std::string URI ( pkgCache::VerIterator const &  Ver)
static

returns the URI to the changelog of this version

Parameters
Veris the version to get the changelog for
Returns
the URI which will be used to acquire the changelog

References pkgCache< Str, Itr >::Flag::NotSource, and FileFd::ReadLine().

◆ URI() [3/3]

std::string URI ( std::string const &  Template,
char const *const  Component,
char const *const  SrcName,
char const *const  SrcVersion 
)
static

returns the URI to the changelog of this version

Parameters
TemplateURI where @CHANGEPATH@ has to be filled in
Componentin which the package resides, can be empty
SrcNameis the source package name
SrcVersionis the source package version
Returns
the URI which will be used to acquire the changelog

◆ URITemplate()

std::string URITemplate ( pkgCache::RlsFileIterator const &  Rls)
static

returns the URI template for this release file

Parameters
Rlsis a Release file
Returns
the URI template to use for this release file

Referenced by URI().


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