Add new event type for uninstall/upgrade packages. 05/11805/1
authorSung-jae Park <nicesj.park@samsung.com>
Tue, 5 Nov 2013 09:46:29 +0000 (18:46 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Tue, 5 Nov 2013 09:46:29 +0000 (18:46 +0900)
Change-Id: I38cc3d7b210d7c7e7aebeb498e7142a8a6ddbde2

include/instance.h
src/package.c

index 789960b..9c6b8a9 100644 (file)
@@ -95,11 +95,12 @@ enum instance_event {
 };
 
 enum instance_destroy_type {
-       INSTANCE_DESTROY_DEFAULT,
-       INSTANCE_DESTROY_PKGMGR,
-       INSTANCE_DESTROY_TERMINATE,
-       INSTANCE_DESTROY_FAULT,
-       INSTANCE_DESTROY_UNKNOWN,
+       INSTANCE_DESTROY_DEFAULT = 0x00,
+       INSTANCE_DESTROY_UPGRADE = 0x01,
+       INSTANCE_DESTROY_UNINSTALL = 0x02,
+       INSTANCE_DESTROY_TERMINATE = 0x03,
+       INSTANCE_DESTROY_FAULT = 0x04,
+       INSTANCE_DESTROY_UNKNOWN = 0x05,
 };
 
 enum instance_state {
index 9ea5ea2..16a39f3 100644 (file)
@@ -1278,7 +1278,7 @@ static int io_uninstall_cb(const char *pkgid, const char *lbid, int prime, void
         */
        if (info->inst_list) {
                EINA_LIST_FOREACH_SAFE(info->inst_list, l, n, inst) {
-                       instance_destroy(inst, INSTANCE_DESTROY_PKGMGR);
+                       instance_destroy(inst, INSTANCE_DESTROY_UNINSTALL);
                }
        } else {
                package_destroy(info);
@@ -1316,9 +1316,9 @@ static inline void reload_package_info(struct pkg_info *info)
                height = instance_lb_height(inst);
                size_type = livebox_service_size_type(width, height);
                if (info->lb.size_list & size_type) {
-                       instance_reload(inst, INSTANCE_DESTROY_PKGMGR);
+                       instance_reload(inst, INSTANCE_DESTROY_UPGRADE);
                } else {
-                       instance_destroy(inst, INSTANCE_DESTROY_PKGMGR);
+                       instance_destroy(inst, INSTANCE_DESTROY_UNINSTALL);
                }
        }
 }