- 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) {
+ 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 {
+ _INFO("Complete make application to native image");
+ }
+ }
+ return 0;
+}
+
+extern "C" int PKGMGR_MDPARSER_PLUGIN_UPGRADE(const char *pkgId, const char *appId, GList *list)
+{
+ 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;