Modify tizen coding style
[platform/core/dotnet/launcher.git] / NativeLauncher / installer-plugin / prefer_dotnet_aot_plugin.cc
old mode 100755 (executable)
new mode 100644 (file)
index a9c940b..83a018e
 #include <glib.h>
 
 typedef struct Metadata {
-    const char *key;
-    const char *value;
+       const char *key;
+       const char *value;
 } Metadata;
 
-const std::string VALUE_TRUE = "true";
+const std::string valueType = "true";
 const std::string mdKey = "http://tizen.org/metadata/prefer_dotnet_aot";
-extern "C" int PKGMGR_MDPARSER_PLUGIN_INSTALL (const char *pkgid, const char *appid, GList *list)
+extern "C" int PKGMGR_MDPARSER_PLUGIN_INSTALL(const char *pkgId, const char *appId, GList *list)
 {
-  GList *tag = NULL;
-  bool mdValue = false;
-  Metadata *mdInfo = NULL;
-  tag = g_list_first(list);
-  while (tag)
-  {
-    mdInfo = (Metadata*)tag->data;
-    if(mdInfo->key == mdKey && mdInfo->value == VALUE_TRUE)
-    {
-      _DBG("Prefer dotnet application AOT set TRUE");
-      mdValue = true;
-    }
-    tag = g_list_next(tag);
-  }
+       GList *tag = NULL;
+       bool mdValue = false;
+       Metadata *mdInfo = NULL;
+       tag = g_list_first(list);
+       while (tag) {
+               mdInfo = (Metadata*)tag->data;
+               if (mdInfo->key == mdKey && mdInfo->value == valueType) {
+                       _DBG("Prefer dotnet application AOT set TRUE");
+                       mdValue = true;
+               }
+               tag = g_list_next(tag);
+       }
 
-  if (mdValue)
-  {
-    if (create_ni_under_pkg_root(pkgid) != 0)
-    {
-      _ERR("Failed to get root path from [%s]", pkgid);
-      return -1;
-    }
-    else
-    {
-      _DBG("Complete make application to native image");
-    }
-  }
-  return 0;
+       if (mdValue) {
+               if (createNiUnderPkgRoot(pkgId) != 0) {
+                       _ERR("Failed to get root path from [%s]", pkgId);
+                       return -1;
+               } else {
+                       _DBG("Complete make application to native image");
+               }
+       }
+       return 0;
 }
 
-extern "C" int PKGMGR_MDPARSER_PLUGIN_UPGRADE (const char *pkgid, const char *appid, GList *list)
+extern "C" int PKGMGR_MDPARSER_PLUGIN_UPGRADE(const char *pkgId, const char *appId, GList *list)
 {
-    return PKGMGR_MDPARSER_PLUGIN_INSTALL(pkgid, appid, list);
+       return PKGMGR_MDPARSER_PLUGIN_INSTALL(pkgId, appId, list);
 }