Define new functions for handling package recovery mode 56/211356/3
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 2 Aug 2019 00:46:42 +0000 (09:46 +0900)
committerHwanKyu Jhun <h.jhun@samsung.com>
Fri, 2 Aug 2019 03:29:52 +0000 (03:29 +0000)
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 <h.jhun@samsung.com>
parser/component/src/component_plugin_parser_pkgmgr_interface.c
parser/metadata/src/metadata_plugin_parser_pkgmgr_interface.c

index f758272..997f2b5 100644 (file)
@@ -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);
+}
+
index 305c9f9..fc0500a 100644 (file)
@@ -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);
+}