Add uid attribute of ThemeInfo
[platform/core/appfw/tizen-theme-manager.git] / src / theme_plugin / theme_parser.cc
index e48cb4f..12c2479 100644 (file)
@@ -5,6 +5,7 @@
 #include "theme_plugin/theme_parser.h"
 
 #include <json/json.h>
+#include <sys/types.h>
 
 #include <fstream>
 #include <streambuf>
@@ -18,7 +19,7 @@ namespace ttm {
 namespace plugin {
 
 loader::ThemeInfo ThemeParser::Inflate(const std::string id,
-    const std::string pkgid) {
+    const std::string pkgid, uid_t uid) {
   Json::CharReaderBuilder rbuilder;
   rbuilder["collectComments"] = false;
 
@@ -34,6 +35,7 @@ loader::ThemeInfo ThemeParser::Inflate(const std::string id,
   // FIXME: this parser should parse more theme information.
   ThemeInfoBuilder builder("testid");
   builder.PutString("pkgid", pkgid).
+      PutString("uid", std::to_string(uid)).
       PutString("version", root["version"].asString()).
       PutString("tool_version", root["tool_version"].asString()).
       PutString("title", root["header"]["title"].asString()).