Add installedPackages() to Catalog.
This commit is contained in:
@@ -198,6 +198,17 @@ Catalog::packagesNeedingUpdate() const
|
||||
return r;
|
||||
}
|
||||
|
||||
PackageList
|
||||
Catalog::installedPackages() const
|
||||
{
|
||||
PackageList r;
|
||||
BOOST_FOREACH(PackageRef p, m_packages) {
|
||||
if (p->isInstalled()) {
|
||||
r.push_back(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Catalog::refresh()
|
||||
{
|
||||
Downloader* dl = new Downloader(this, url());
|
||||
|
||||
@@ -72,7 +72,12 @@ public:
|
||||
* filter consists of required / minimum values, AND-ed together.
|
||||
*/
|
||||
PackageList packagesMatching(const SGPropertyNode* aFilter) const;
|
||||
|
||||
|
||||
/**
|
||||
* packages which are locally installed
|
||||
*/
|
||||
PackageList installedPackages() const;
|
||||
|
||||
/**
|
||||
* retrieve all the packages in the catalog which are installed
|
||||
* and have a pendig update
|
||||
|
||||
Reference in New Issue
Block a user