44 class AptImplementation;
45 class RecordIteratorImpl;
127 class Iterator :
public std::iterator<std::input_iterator_tag, std::string, void, void, void>
155 class RecordIterator :
public std::iterator<std::input_iterator_tag, std::string, void, void, void>
157 RecordIteratorImpl* impl;
197 iterator
begin()
const;
198 iterator
end()
const;
211 bool isValid(
const std::string& pkg)
const;
219 return std::string();
251 std::string
rawRecord(
const std::string& pkg)
const;
PackageState(unsigned a)
Definition: apt.h:77
bool reinstall() const
Definition: apt.h:90
bool isValid() const
Definition: apt.h:84
Query
Definition: apt.h:48
Apt()
Create the Apt data provider.
Definition: apt.cc:444
Exception(const std::string &message)
Definition: apt.cc:66
bool hasNewVersion() const
Definition: apt.h:103
bool modify() const
Definition: apt.h:108
Iterator iterator
Definition: apt.h:187
bool willBreak() const
Definition: apt.h:95
bool newInstall() const
Definition: apt.h:99
void checkCacheUpdates()
Check if the cache has been changed by another process, and reopen it if that is the case...
Definition: apt.cc:640
record_iterator recordBegin() const
Definition: apt.cc:459
PackageState & operator|=(const PackageState &s)
Definition: apt.h:72
Iterator(void *cur)
Definition: apt.h:133
bool operator!=(const Iterator &) const
Definition: apt.cc:358
bool hold() const
Definition: apt.h:100
bool installed() const
Definition: apt.h:102
bool operator==(const RecordIterator &) const
Definition: apt.cc:434
String functions.
Definition: apt.cc:38
PackageState state(const std::string &pkg) const
Return state information on a package.
Definition: apt.cc:533
bool install() const
Definition: apt.h:88
bool isValid(const std::string &pkg) const
Validate a package name, returning trye if it exists in the APT database, or false if it does not...
Definition: apt.cc:479
std::string operator*()
Definition: apt.cc:331
RecordIterator()
Definition: apt.h:167
std::string validate(const std::string &pkg) const
Validate a package name, returning it if it exists in the APT database, or returning the empty string...
Definition: apt.h:215
PackageState()
Definition: apt.h:81
Version installedVersion(const std::string &pkg) const
Return the installed version for a package.
Definition: apt.cc:508
~RecordIterator()
Definition: apt.cc:386
High-level access to the Apt cache, as a data provider for the ept framework.
Definition: apt.h:120
time_t timestamp()
Timestamp of when the apt index was last modified.
Definition: apt.cc:474
RecordIterator & operator=(const RecordIterator &r)
Definition: apt.cc:422
iterator end() const
Definition: apt.cc:454
unsigned m_state
Definition: apt.h:111
~Exception() noexceptoverride
Definition: apt.cc:71
bool keep() const
Definition: apt.h:94
Version candidateVersion(const std::string &pkg) const
Return the candidate version for a package.
Definition: apt.cc:499
void invalidateTimestamp()
Invalidate the cache timestamp used to track cache updates.
Definition: apt.cc:650
iterator begin() const
Definition: apt.cc:447
record_iterator recordEnd() const
Definition: apt.cc:464
RecordIterator & operator++()
Definition: apt.cc:409
bool operator!=(const RecordIterator &) const
Definition: apt.cc:438
std::string rawRecord(const std::string &pkg) const
Perform a package search.
Definition: apt.cc:580
Iterator()
Definition: apt.h:136
Representation of a package with a version.
Iterator & operator=(const Iterator &)
Definition: apt.cc:311
AptImplementation * impl
Definition: apt.h:123
~Apt()
Definition: apt.cc:445
~Iterator()
Definition: apt.cc:327
bool upgrade() const
Definition: apt.h:97
bool operator==(const Iterator &) const
Definition: apt.cc:348
std::string operator*()
Definition: apt.cc:391
PackageState & operator=(unsigned i)
Definition: apt.h:67
Version anyVersion(const std::string &pkg) const
Return the candidate version for a package, if available, or the installed version otherwise...
Definition: apt.cc:518
RecordIterator record_iterator
Definition: apt.h:188
size_t size() const
Return the number of packages in the archive.
Definition: apt.cc:469
bool isInstalled() const
Definition: apt.h:86
unsigned state
Definition: apt.h:63
bool held() const
Definition: apt.h:105
const pkgCache * aptPkgCache() const
Returns the pointer to the internal libapt pkgCache object used.
Definition: apt.cc:634
Lightweight Version class that represent a package with a version, with very cheap value copy operati...
Definition: version.h:40
bool purge() const
Definition: apt.h:93
bool nowBroken() const
Definition: apt.h:106
std::string * operator->()
Definition: apt.cc:400
Iterator & operator++()
Definition: apt.cc:335
bool upgradable() const
Definition: apt.h:104