Skip to content
Snippets Groups Projects
Commit e1edf0ad authored by Xavier Jouslin de Noray's avatar Xavier Jouslin de Noray Committed by Aline Gondim Santos
Browse files

Id: add id to identify a plugin

Change-Id: I668a3719630b57eb567e5da781f611ddcb7ed987
parent 61239ae8
No related branches found
No related tags found
No related merge requests found
...@@ -84,7 +84,7 @@ JamiPluginManager::getPluginDetails(const std::string& rootPath) ...@@ -84,7 +84,7 @@ JamiPluginManager::getPluginDetails(const std::string& rootPath)
auto itImage = details.find("backgroundPath"); auto itImage = details.find("backgroundPath");
itImage->second.insert(0, rootPath + DIR_SEPARATOR_CH + "data" + DIR_SEPARATOR_CH); itImage->second.insert(0, rootPath + DIR_SEPARATOR_CH + "data" + DIR_SEPARATOR_CH);
details["soPath"] = rootPath + DIR_SEPARATOR_CH + LIB_PREFIX + details["name"] + LIB_TYPE; details["soPath"] = rootPath + DIR_SEPARATOR_CH + LIB_PREFIX + details["id"] + LIB_TYPE;
details["author"] = getPluginAuthor(rootPath, details["name"]); details["author"] = getPluginAuthor(rootPath, details["name"]);
detailsIt = pluginDetailsMap_.emplace(rootPath, std::move(details)).first; detailsIt = pluginDetailsMap_.emplace(rootPath, std::move(details)).first;
return detailsIt->second; return detailsIt->second;
......
...@@ -91,12 +91,15 @@ std::map<std::string, std::string> ...@@ -91,12 +91,15 @@ std::map<std::string, std::string>
checkManifestJsonContentValidity(const Json::Value& root) checkManifestJsonContentValidity(const Json::Value& root)
{ {
std::string name = root.get("name", "").asString(); std::string name = root.get("name", "").asString();
std::string id = root.get("id", name).asString();
std::string description = root.get("description", "").asString(); std::string description = root.get("description", "").asString();
std::string version = root.get("version", "").asString(); std::string version = root.get("version", "").asString();
std::string iconPath = root.get("iconPath", "icon.png").asString(); std::string iconPath = root.get("iconPath", "icon.png").asString();
std::string background = root.get("backgroundPath", "background.jpg").asString(); std::string background = root.get("backgroundPath", "background.jpg").asString();
if (!name.empty() || !version.empty()) { if (!name.empty() || !version.empty()) {
return {{"name", name}, return {
{"id", id},
{"name", name},
{"description", description}, {"description", description},
{"version", version}, {"version", version},
{"iconPath", iconPath}, {"iconPath", iconPath},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment