From c4b49c6cb41a965bf50e7f31f57b7cfd8627dd77 Mon Sep 17 00:00:00 2001 From: louis Date: Fri, 17 Jul 2015 17:37:16 +0200 Subject: added version check for skinrepositiries --- libcore/skinrepo.c | 6 ++++++ libcore/skinrepo.h | 3 +++ 2 files changed, 9 insertions(+) (limited to 'libcore') diff --git a/libcore/skinrepo.c b/libcore/skinrepo.c index 5979e57..e815421 100644 --- a/libcore/skinrepo.c +++ b/libcore/skinrepo.c @@ -13,6 +13,7 @@ cSkinRepo::cSkinRepo(void) { action = eaUndefined; url = ""; author = "unknown"; + minSDVersion = "0.0.1"; command = ""; command2 = ""; tempfile = ""; @@ -166,6 +167,7 @@ void cSkinRepo::Debug() { dsyslog("skindesigner: --- skinrepo %s, Type %s ---", name.c_str(), strRepoType.c_str()); dsyslog("skindesigner: url %s", url.c_str()); dsyslog("skindesigner: author %s", author.c_str()); + dsyslog("skindesigner: minimum Skindesigner Version required %s", minSDVersion.c_str()); if (specialFonts.size() > 0) { for (vector::iterator it = specialFonts.begin(); it != specialFonts.end(); it++) { dsyslog("skindesigner: special font %s", (*it).c_str()); @@ -287,6 +289,10 @@ bool cSkinRepos::ParseRepository(void) { if (GetNodeValue(value)) { repo->SetAuthor(value); } + } else if (CheckNodeName("minimumskindesignerversion")) { + if (GetNodeValue(value)) { + repo->SetMinSDVersion(value); + } } else if (CheckNodeName("specialfonts")) { if (!LevelDown()) continue; diff --git a/libcore/skinrepo.h b/libcore/skinrepo.h index d4cc88f..7452ad4 100644 --- a/libcore/skinrepo.h +++ b/libcore/skinrepo.h @@ -31,6 +31,7 @@ private: eAction action; string url; string author; + string minSDVersion; vector specialFonts; vector supportedPlugins; vector< pair < string, string > > screenshots; @@ -50,6 +51,7 @@ public: void SetRepoType(eRepoType type) { this->repoType = type; }; void SetUrl(string url) { this->url = url; }; void SetAuthor(string author) { this->author = author; }; + void SetMinSDVersion(string minSDVersion) { this->minSDVersion = minSDVersion; }; void SetSpecialFont(string font) { specialFonts.push_back(font); }; void SetSupportedPlugin(string plugin) { supportedPlugins.push_back(plugin); }; void SetScreenshot(string desc, string url) { screenshots.push_back(pair(desc, url)); }; @@ -57,6 +59,7 @@ public: eRepoType Type(void) { return repoType; }; string Name(void) { return name; }; string Author(void) { return author; }; + string MinSDVersion(void) { return minSDVersion; }; string Url(void) { return url; }; vector SpecialFonts(void) { return specialFonts; }; vector SupportedPlugins(void) { return supportedPlugins; }; -- cgit v1.2.3