18 #ifndef CUPT_CACHE_CACHE_SEEN
19 #define CUPT_CACHE_CACHE_SEEN
23 #include <boost/xpressive/xpressive_fwd.hpp>
28 #include <cupt/fwd.hpp>
41 using namespace cache;
55 enum Type { Source, Binary } category;
80 internal::CacheImpl* __impl;
94 Cache(shared_ptr< const Config > config,
bool useSource,
bool useBinary,
bool useInstalled,
95 const vector< string >& packageNameGlobsToReinstall = vector< string >());
100 vector< shared_ptr< const ReleaseInfo > > getBinaryReleaseData()
const;
102 vector< shared_ptr< const ReleaseInfo > > getSourceReleaseData()
const;
105 vector< string > getBinaryPackageNames()
const;
111 shared_ptr< const BinaryPackage > getBinaryPackage(
const string& packageName)
const;
113 vector< string > getSourcePackageNames()
const;
119 shared_ptr< const SourcePackage > getSourcePackage(
const string& packageName)
const;
122 vector< shared_ptr< const BinaryVersion > > getInstalledVersions()
const;
129 bool isAutomaticallyInstalled(
const string& packageName)
const;
132 vector< IndexEntry > getIndexEntries()
const;
135 string getPathOfReleaseList(
const IndexEntry& entry)
const;
137 string getPathOfIndexList(
const IndexEntry& entry)
const;
139 string getPathOfExtendedStates()
const;
142 string getDownloadUriOfReleaseList(
const IndexEntry&)
const;
144 vector< IndexDownloadRecord > getDownloadInfoOfIndexList(
const IndexEntry&)
const;
146 vector< LocalizationDownloadRecord > getDownloadInfoOfLocalizedDescriptions(
const IndexEntry&)
const;
149 shared_ptr< const system::State > getSystemState()
const;
152 ssize_t getPin(
const shared_ptr< const Version >&)
const;
162 : version(_version), pin(_pin) {}
165 vector< PinnedVersion > getSortedPinnedVersions(
const shared_ptr< const Package >&)
const;
167 shared_ptr< const Version > getPolicyVersion(
const shared_ptr< const Package >&)
const;
170 vector< shared_ptr< const BinaryVersion > > getSatisfyingVersions(
const RelationExpression&)
const;
173 const ExtendedInfo& getExtendedInfo()
const;
180 pair< string, string > getLocalizedDescriptions(
const shared_ptr< const BinaryVersion >&)
const;
183 static bool verifySignature(
const shared_ptr< const Config >&,
const string& path);
189 static string getPathOfCopyright(
const shared_ptr< const BinaryVersion >&);
195 static string getPathOfChangelog(
const shared_ptr< const BinaryVersion >&);