From c853a80970bcab463b6486dd1a189df92687fb03 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Fri, 2 Aug 2019 09:46:42 +0900 Subject: [PATCH] Define new functions for handling package recovery mode To handle recovering the package, the functions are added. While recoverying the package, the functions will be invoked by the installer. Adds: - PKGMGR_PARSER_PLUGIN_RECOVERINSTALL() - PKGMGR_PARSER_PLUGIN_RECOVERUNINSTALL() - PKGMGR_PARSER_PLUGIN_RECOVERUPGRADE() - PKGMGR_MDPARSER_PLUGIN_RECOVERINSTALL() - PKGMGR_MDPARSER_PLUGIN_RECOVERUNINSTALL() - PKGMGR_MDPARSER_PLUGIN_RECOVERUPGRADE() Change-Id: I80526ca8181c4c48bfe04029185b078d2fcdb351 Signed-off-by: Hwankyu Jhun --- .../src/component_plugin_parser_pkgmgr_interface.c | 19 +++++++++++++++++++ .../src/metadata_plugin_parser_pkgmgr_interface.c | 21 +++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/parser/component/src/component_plugin_parser_pkgmgr_interface.c b/parser/component/src/component_plugin_parser_pkgmgr_interface.c index f758272..997f2b5 100644 --- a/parser/component/src/component_plugin_parser_pkgmgr_interface.c +++ b/parser/component/src/component_plugin_parser_pkgmgr_interface.c @@ -35,3 +35,22 @@ EXPORT int PKGMGR_PARSER_PLUGIN_UPGRADE(xmlDocPtr doc, const char *package) { return component_plugin_parser_upgrade(doc, package); } + +EXPORT int PKGMGR_PARSER_PLUGIN_RECOVERINSTALL(xmlDocPtr doc, + const char *package) +{ + return component_plugin_parser_uninstall(doc, package); +} + +EXPORT int PKGMGR_PARSER_PLUGIN_RECOVERUNINSTALL(xmlDocPtr doc, + const char *package) +{ + return component_plugin_parser_uninstall(doc, package); +} + +EXPORT int PKGMGR_PARSER_PLUGIN_RECOVERUPGRADE(xmlDocPtr doc, + const char *package) +{ + return component_plugin_parser_upgrade(doc, package); +} + diff --git a/parser/metadata/src/metadata_plugin_parser_pkgmgr_interface.c b/parser/metadata/src/metadata_plugin_parser_pkgmgr_interface.c index 305c9f9..fc0500a 100644 --- a/parser/metadata/src/metadata_plugin_parser_pkgmgr_interface.c +++ b/parser/metadata/src/metadata_plugin_parser_pkgmgr_interface.c @@ -38,3 +38,24 @@ API int PKGMGR_MDPARSER_PLUGIN_UPGRADE(const char *pkgid, const char *appid, return metadata_plugin_parser(pkgid, appid, list, METADATA_EVENT_TYPE_UPGRADE); } + +API int PKGMGR_MDPARSER_PLUGIN_RECOVERINSTALL(const char *pkgid, + const char *appid, GList *list) +{ + return metadata_plugin_parser(pkgid, appid, list, + METADATA_EVENT_TYPE_UNINSTALL); +} + +API int PKGMGR_MDPARSER_PLUGIN_RECOVERUNINSTALL(const char *pkgid, + const char *appid, GList *list) +{ + return metadata_plugin_parser(pkgid, appid, list, + METADATA_EVENT_TYPE_UNINSTALL); +} + +API int PKGMGR_MDPARSER_PLUGIN_RECOVERUPGRADE(const char *pkgid, + const char *appid, GList *list) +{ + return metadata_plugin_parser(pkgid, appid, list, + METADATA_EVENT_TYPE_UPGRADE); +} -- 2.7.4