From 083b364afd8bc078276793128ed0ddba5eda8b53 Mon Sep 17 00:00:00 2001 From: James Turner Date: Thu, 12 Jun 2014 08:50:09 +0100 Subject: [PATCH] Pkg: qualified ID accessor. --- simgear/package/Package.cxx | 5 +++++ simgear/package/Package.hxx | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/simgear/package/Package.cxx b/simgear/package/Package.cxx index cb654984..8e697c73 100644 --- a/simgear/package/Package.cxx +++ b/simgear/package/Package.cxx @@ -135,6 +135,11 @@ std::string Package::id() const return m_props->getStringValue("id"); } +std::string Package::qualifiedId() const +{ + return m_catalog->id() + "." + id(); +} + std::string Package::md5() const { return m_props->getStringValue("md5"); diff --git a/simgear/package/Package.hxx b/simgear/package/Package.hxx index 43934ddf..034d7dd0 100644 --- a/simgear/package/Package.hxx +++ b/simgear/package/Package.hxx @@ -59,6 +59,11 @@ public: bool isInstalled() const; std::string id() const; + + /** + * Fully-qualified ID, including our catalog'd ID + */ + std::string qualifiedId() const; /** * human-readable name - note this is probably not localised, -- 2.39.5