added version check for skinrepositiries

This commit is contained in:
louis
2015-07-17 17:37:16 +02:00
parent 10e37f6b8e
commit c4b49c6cb4
10 changed files with 115 additions and 12 deletions

View File

@@ -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<string>::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;

View File

@@ -31,6 +31,7 @@ private:
eAction action;
string url;
string author;
string minSDVersion;
vector<string> specialFonts;
vector<string> 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<string, string>(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<string> SpecialFonts(void) { return specialFonts; };
vector<string> SupportedPlugins(void) { return supportedPlugins; };