From: Hwankyu Jhun Date: Fri, 2 Aug 2019 00:46:42 +0000 (+0900) Subject: Define new functions for handling package recovery mode X-Git-Tag: accepted/tizen/unified/20190806.072150~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F56%2F211356%2F3;p=platform%2Fcore%2Fappfw%2Faul-1.git 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 --- 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); +}