Cupt
|
the source of package and version information More...
#include <cupt/cache.hpp>
Classes | |
struct | ExtendedInfo |
extended package information More... | |
struct | IndexEntry |
describes smallest index source piece More... | |
class | PackageNameIterator |
struct | VersionWithPriority |
contains version and its corresponding priority More... | |
Public Member Functions | |
Cache (shared_ptr< const Config > config, bool useSource, bool useBinary, bool useInstalled) | |
constructor More... | |
virtual | ~Cache () |
destructor | |
vector< shared_ptr< const ReleaseInfo > > | getBinaryReleaseData () const |
gets release data list of indexed metadata for binary packages | |
vector< shared_ptr< const ReleaseInfo > > | getSourceReleaseData () const |
gets release data list of indexed metadata for source packages | |
Range< PackageNameIterator > | getBinaryPackageNames () const |
gets the list of names of available binary packages | |
const BinaryPackage * | getBinaryPackage (const string &packageName) const |
gets BinaryPackage by name More... | |
Range< PackageNameIterator > | getSourcePackageNames () const |
gets the list of names of available source packages | |
const SourcePackage * | getSourcePackage (const string &packageName) const |
gets SourcePackage by name More... | |
vector< const BinaryVersion * > | getInstalledVersions () const |
gets all installed versions | |
bool | isAutomaticallyInstalled (const string &packageName) const |
is binary package automatically installed? More... | |
vector< IndexEntry > | getIndexEntries () const |
gets list of available index entries | |
const system::State * | getSystemState () const |
gets system state | |
ssize_t | getPin (const Version *) const |
gets pin value for a version | |
vector< VersionWithPriority > | getSortedVersionsWithPriorities (const Package *) const |
gets list of versions with priorities of certain package | |
const Version * | getPreferredVersion (const Package *) const |
gets version of highest pin from the package | |
vector< const BinaryVersion * > | getSatisfyingVersions (const RelationExpression &) const |
gets list of binary versions which satisfy given relation expression | |
const ExtendedInfo & | getExtendedInfo () const |
gets extended info | |
string | getLocalizedDescription (const BinaryVersion *) const |
gets localized description for the binary version More... | |
Static Public Member Functions | |
static string | getPathOfCopyright (const BinaryVersion *) |
gets a supposed system path of package copyright file for certain binary version More... | |
static string | getPathOfChangelog (const BinaryVersion *) |
gets a supposed system path of package changelog file for certain binary version More... | |
Static Public Attributes | |
static bool | memoize |
controls internal caching More... | |
the source of package and version information
cupt::Cache::Cache | ( | shared_ptr< const Config > | config, |
bool | useSource, | ||
bool | useBinary, | ||
bool | useInstalled | ||
) |
constructor
Reads package metadata and builds index on it.
config | |
useSource | whether to read source package metadata |
useBinary | whether to read binary package metadata |
useInstalled | whether to read dpkg metadata (installed binary packages) |
const BinaryPackage* cupt::Cache::getBinaryPackage | ( | const string & | packageName | ) | const |
gets BinaryPackage by name
packageName | name of the binary package |
string cupt::Cache::getLocalizedDescription | ( | const BinaryVersion * | ) | const |
gets localized description for the binary version
|
static |
gets a supposed system path of package changelog file for certain binary version
You must not assume that the file actually exists even if installed version is passed as parameter.
|
static |
gets a supposed system path of package copyright file for certain binary version
You must not assume that the file actually exists even if installed version is passed as parameter.
const SourcePackage* cupt::Cache::getSourcePackage | ( | const string & | packageName | ) | const |
gets SourcePackage by name
packageName | name of the source package |
bool cupt::Cache::isAutomaticallyInstalled | ( | const string & | packageName | ) | const |
is binary package automatically installed?
packageName | name of the binary package |
true
if yes, false
if no
|
static |
controls internal caching
If set to true
, enables internal caching in methods getPin and getSatisfyingVersions. Defaults to false
.