X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=NativeLauncher%2Finstaller-plugin%2Fprefer_dotnet_aot_plugin.cc;h=ffed93886cb67c7a9b56e746026df7a87aefd246;hb=50a533c58ea8516ecc49acdab8d989892e664505;hp=83a018e30fcf2f6c99ebc2678549308cfd62308a;hpb=ac9910576fe5fe1795b9ca98d431a8347ddb7c11;p=platform%2Fcore%2Fdotnet%2Flauncher.git diff --git a/NativeLauncher/installer-plugin/prefer_dotnet_aot_plugin.cc b/NativeLauncher/installer-plugin/prefer_dotnet_aot_plugin.cc index 83a018e..ffed938 100644 --- a/NativeLauncher/installer-plugin/prefer_dotnet_aot_plugin.cc +++ b/NativeLauncher/installer-plugin/prefer_dotnet_aot_plugin.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "common.h" +#include "ni_common.h" #include "log.h" #include "utils.h" @@ -33,8 +33,6 @@ typedef struct Metadata { const char *value; } Metadata; -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) { GList *tag = NULL; @@ -43,7 +41,7 @@ extern "C" int PKGMGR_MDPARSER_PLUGIN_INSTALL(const char *pkgId, const char *app tag = g_list_first(list); while (tag) { mdInfo = (Metadata*)tag->data; - if (mdInfo->key == mdKey && mdInfo->value == valueType) { + if (strcmp(mdInfo->key, AOT_METADATA_KEY) == 0 && strcmp(mdInfo->value, AOT_METADATA_VALUE) == 0) { _DBG("Prefer dotnet application AOT set TRUE"); mdValue = true; } @@ -51,11 +49,17 @@ extern "C" int PKGMGR_MDPARSER_PLUGIN_INSTALL(const char *pkgId, const char *app } if (mdValue) { - if (createNiUnderPkgRoot(pkgId) != 0) { + NiCommonOption option = {std::string(), std::string(), std::string()}; + if (initNICommon(&option) < 0) { + _ERR("Fail to initialize NI Common"); + return -1; + } + + if (createNiUnderPkgRoot(pkgId, false) != 0) { _ERR("Failed to get root path from [%s]", pkgId); return -1; } else { - _DBG("Complete make application to native image"); + _INFO("Complete make application to native image"); } } return 0; @@ -65,3 +69,23 @@ extern "C" int PKGMGR_MDPARSER_PLUGIN_UPGRADE(const char *pkgId, const char *app { return PKGMGR_MDPARSER_PLUGIN_INSTALL(pkgId, appId, list); } + +extern "C" int PKGMGR_MDPARSER_PLUGIN_UNINSTALL(const char *pkgId, const char *appId, GList *list) +{ + return 0; +} + +extern "C" int PKGMGR_MDPARSER_PLUGIN_REMOVED(const char *pkgId, const char *appId, GList *list) +{ + return PKGMGR_MDPARSER_PLUGIN_UPGRADE(pkgId, appId, list); +} + +extern "C" int PKGMGR_MDPARSER_PLUGIN_CLEAN(const char *pkgId, const char *appId, GList *list) +{ + return 0; +} + +extern "C" int PKGMGR_MDPARSER_PLUGIN_UNDO(const char *pkgId, const char *appId, GList *list) +{ + return 0; +}