return v->getStringValue("url");
}
}
-
+
return std::string();
}
{
bool ok;
bool atLeastOneFailure = false;
-
+
BOOST_FOREACH(PackageRef p, installedPackages()) {
ok = p->existingInstall()->uninstall();
if (!ok) {
if (!ok) {
atLeastOneFailure = true;
}
-
+
changeStatus(atLeastOneFailure ? Delegate::FAIL_FILESYSTEM
: Delegate::STATUS_SUCCESS);
return ok;
struct FindById
{
FindById(const std::string &id) : m_id(id) {}
-
+
bool operator()(const PackageRef& ref) const
{
return ref->id() == m_id;
}
-
+
std::string m_id;
};
-
+
void Catalog::parseProps(const SGPropertyNode* aProps)
{
// copy everything except package children?
if (strcmp(pkgProps->getName(), "package") == 0) {
// can't use getPackageById here becuase the variant dict isn't
// built yet. Instead we need to look at m_packages directly.
-
+
PackageList::iterator pit = std::find_if(m_packages.begin(), m_packages.end(),
FindById(pkgProps->getStringValue("id")));
PackageRef p;
return m_url;
}
+std::string Catalog::name() const
+{
+ return getLocalisedString(m_props, "name");
+}
+
std::string Catalog::description() const
{
return getLocalisedString(m_props, "description");
if (!aRoot) {
return std::string();
}
-
+
if (aRoot->hasChild(m_root->getLocale())) {
const SGPropertyNode* localeRoot = aRoot->getChild(m_root->getLocale().c_str());
if (localeRoot->hasChild(aName)) {
if (m_status == newStatus) {
return;
}
-
+
m_status = newStatus;
m_root->catalogRefreshStatus(this, newStatus);
m_statusCallbacks(this);