Remove syspopup dependencies 21/28321/2
authorChristophe Moreau <christophe.moreau@open.eurogiciel.org>
Thu, 2 Oct 2014 12:53:25 +0000 (14:53 +0200)
committerChristophe Moreau <christophe.moreau@open.eurogiciel.org>
Fri, 3 Oct 2014 09:35:26 +0000 (11:35 +0200)
Tizen 3 should use a popup system that does not depend on a graphical toolkit

Bug-Tizen: TC-1476

Change-Id: I04701291bc840978ab6f8de08abe57e8648b2ae4
Signed-off-by: Christophe Moreau <christophe.moreau@open.eurogiciel.org>
CMakeLists.txt
packaging/system-server.spec
src/battery/lowbat-handler.c
src/core/device-change-handler.c
src/core/predefine.c
src/display/core.c
src/mmc/ext4.c
src/mmc/mmc-handler.c
src/power/power-handler.c
src/proc/lowmem-handler.c
sys_pci_noti/sys_pci_noti.c

index e271002..6086c6d 100755 (executable)
@@ -114,7 +114,6 @@ SET( local_pkgs
        heynoti
        tapi
        dlog
-       syspopup-caller
        device-node
        sensor
        notification
index a7fe1bc..fc9baec 100755 (executable)
@@ -24,7 +24,6 @@ BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(tapi)
 BuildRequires:  pkgconfig(edbus)
 BuildRequires:  pkgconfig(dlog)
-BuildRequires:  pkgconfig(syspopup-caller)
 %if %{with x}
 BuildRequires:  pkgconfig(x11)
 %endif
index 075e62a..35ba7fd 100644 (file)
@@ -415,33 +415,22 @@ static Eina_Bool lowbat_popup(void *data)
        int ret = -1, state = 0;
        ret = vconf_get_int(VCONFKEY_STARTER_SEQUENCE, &state);
        if (state == 1 || ret != 0) {
-               bundle *b = NULL;
-               b = bundle_create();
                if (lowbat_popup_option == LOWBAT_OPT_WARNING || lowbat_popup_option == LOWBAT_OPT_CHECK) {
-                       bundle_add(b, "_SYSPOPUP_CONTENT_", "warning");
+                       // TODO : display a popup "warning"
                } else if(lowbat_popup_option == LOWBAT_OPT_POWEROFF) {
-                       bundle_add(b, "_SYSPOPUP_CONTENT_", "poweroff");
+                       // TODO : display a popup "poweroff"
                } else if(lowbat_popup_option == LOWBAT_OPT_CHARGEERR) {
-                       bundle_add(b, "_SYSPOPUP_CONTENT_", "chargeerr");
+                       // TODO : display a popup "chargeerr"
                } else
                        goto out;
-
-               ret = syspopup_launch("lowbat-syspopup", b);
-               if (ret < 0) {
-                       _E("popup lauch failed");
-                       bundle_free(b);
-                       return EINA_TRUE;
-               }
 out:
                if (lowbat_popup_id != NULL) {
                        ecore_timer_del(lowbat_popup_id);
                        lowbat_popup_id = NULL;
                }
                lowbat_popup_option = 0;
-               bundle_free(b);
-               return EINA_FALSE;
        }
-       _D("boot-animation running yet");
+       
        return EINA_FALSE;
 }
 
index 39bb30c..aa35fa4 100644 (file)
@@ -26,8 +26,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/mount.h>
-#include <syspopup_caller.h>
-#include <aul.h>
 #include <bundle.h>
 #include <dirent.h>
 #include <libudev.h>
@@ -150,21 +148,18 @@ static int check_lowbat_charge_device(int bInserted)
                        if (val == 0 && bChargeDeviceInserted == 1) {
                                bChargeDeviceInserted = 0;
                                //low bat popup during charging device removing
+
                                if (vconf_get_int(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, &bat_state) == 0) {
-                                       if(bat_state < VCONFKEY_SYSMAN_BAT_NORMAL
-                                       || bat_state == VCONFKEY_SYSMAN_BAT_REAL_POWER_OFF) {
-                                               bundle *b = NULL;
-                                               b = bundle_create();
-                                               if(bat_state == VCONFKEY_SYSMAN_BAT_REAL_POWER_OFF)
-                                                       bundle_add(b,"_SYSPOPUP_CONTENT_", "poweroff");
-                                               else
-                                                       bundle_add(b, "_SYSPOPUP_CONTENT_", "warning");
-                                               ret = syspopup_launch("lowbat-syspopup", b);
-                                               if (ret < 0) {
-                                                       _I("popup launch failed");
+       
+                                       if(bat_state < VCONFKEY_SYSMAN_BAT_NORMAL || bat_state == VCONFKEY_SYSMAN_BAT_REAL_POWER_OFF) {
+                                               if(bat_state == VCONFKEY_SYSMAN_BAT_REAL_POWER_OFF) {
+                                                       // TODO : display a popup "poweroff"
+                                               }
+                                               else {
+                                                       // TODO : display a popup "warning"
                                                }
-                                               bundle_free(b);
                                        }
+
                                } else {
                                        _E("failed to get vconf key");
                                        return -1;
@@ -431,31 +426,9 @@ static void mmc_chgdet_cb(void *data)
                if (ret == -1) {
                        vconf_get_int(VCONFKEY_SYSMAN_MMC_MOUNT,&val);
                        if (val == VCONFKEY_SYSMAN_MMC_MOUNT_FAILED) {
-                               bundle *b = NULL;
-                               b = bundle_create();
-                               if (b == NULL) {
-                                       _E("error bundle_create()");
-                                       return;
-                               }
-                               bundle_add(b, "_SYSPOPUP_CONTENT_", "mounterr");
-                               ret = syspopup_launch("mmc-syspopup", b);
-                               if (ret < 0) {
-                                       _E("popup launch failed");
-                               }
-                               bundle_free(b);
+                               // TODO : display a popup mounterr
                        } else if (val == VCONFKEY_SYSMAN_MMC_MOUNT_COMPLETED) {
-                               bundle *b = NULL;
-                               b = bundle_create();
-                               if (b == NULL) {
-                                       _E("error bundle_create()");
-                                       return;
-                               }
-                               bundle_add(b, "_SYSPOPUP_CONTENT_", "mountrdonly");
-                               ret = syspopup_launch("mmc-syspopup", b);
-                               if (ret < 0) {
-                                       _E("popup launch failed");
-                               }
-                               bundle_free(b);
+                               // TODO : display a popup mountrdonly
                        }
                }
        }
@@ -825,29 +798,9 @@ int earjackcon_def_predefine_action(int argc, char **argv)
 
 static int battery_def_cf_opened_actioin(int argc, char **argv)
 {
-       int ret;
-       static int present_status = 1;
-       bundle *b;
-
-       b = bundle_create();
-       if (!b) {
-               _E("fail to create bundle");
-               return -EINVAL;
-       }
-
-       ret = bundle_add(b, "_SYSPOPUP_CONTENT_", "battdisconnect");
-       if (ret != 0) {
-               _E("fail to add bundle");
-               goto out;
-       }
-
-       ret = syspopup_launch("lowbat-syspopup", b);
-       if (ret < 0)
-               _E("popup launch failed");
-
+       // TODO : display a popup
 out:
-       bundle_free(b);
-       return ret;
+       return -EINVAL;
 }
 
 static void pci_keyboard_add_cb(struct ss_main_data *ad)
index 9e6a2d0..29c0638 100644 (file)
@@ -24,7 +24,6 @@
 #include <dirent.h>
 #include <vconf.h>
 
-#include <syspopup_caller.h>
 #include <sys/reboot.h>
 #include <sys/time.h>
 #include <mntent.h>
@@ -113,18 +112,15 @@ int predefine_control_launch(char *name, bundle *b, int option)
                        _E("pre launched %s destroy", LOWBAT_EXEC_PATH);
                        kill(pid, SIGTERM);
                }
-               if (syspopup_launch(name, b) < 0)
-                       return -1;
+               // TODO : display a popup
        }
        //poweroff-popup
        if (strncmp(name, POWEROFF_POPUP_NAME, strlen(POWEROFF_POPUP_NAME)) == 0) {
-               if (syspopup_launch(name, b) < 0)
-                       return -1;
+               // TODO : display a popup poweroff-popup
        }
        //hdmi-popup
        if (strncmp(name, HDMI_POPUP_NAME, strlen(HDMI_POPUP_NAME)) == 0) {
-               if (syspopup_launch(name, b) < 0)
-                       return -1;
+               // TODO : display a popup hdmi-popup
        }
        //hdmi-noti
        if (strncmp(name, HDMI_NOTI_EXEC_PATH, strlen(HDMI_NOTI_EXEC_PATH)) == 0) {
@@ -133,8 +129,7 @@ int predefine_control_launch(char *name, bundle *b, int option)
        }
        //user mem lowmem-popup
        if (strncmp(name, LOWMEM_POPUP_NAME, strlen(LOWMEM_POPUP_NAME)) == 0) {
-               if (syspopup_launch(name, b) < 0)
-                       return -1;
+               // TODO : display a popup lowmem-popup
        }
        return 0;
 }
index fac7e8a..b3ac603 100644 (file)
@@ -36,7 +36,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <heynoti.h>
-#include <aul.h>
 #include <vconf-keys.h>
 #include <Ecore.h>
 
index 4af256d..52235a9 100644 (file)
@@ -55,19 +55,8 @@ static int mmc_check_smack(void)
 
 static int check_smack_popup(void)
 {
-       bundle *b = NULL;
-       int ret = -1;
-       int val = -1;
-
-       b = bundle_create();
-       bundle_add(b, "_SYSPOPUP_CONTENT_", "checksmack");
-       ret = vconf_get_int(VCONFKEY_STARTER_SEQUENCE, &val);
-       if (val == 1 || ret != 0) {
-               if ((mmc_popup_pid = syspopup_launch("mmc-syspopup", b)) < 0) {
-                       _E("popup launch failed\n");
-               }
-       }
-       bundle_free(b);
+       mmc_popup_pid = -1;
+       // TODO : display a popup
 
        mmc_check_smack();
        return 0;
index 728dfc7..b9f221f 100644 (file)
@@ -351,18 +351,7 @@ static int kill_app_accessing_mmc(void)
 
 static void launch_syspopup(const char *str)
 {
-       bundle *b;
-       int ret;
-       b = bundle_create();
-       if (!b) {
-               _E("error bundle_create()");
-               return;
-       }
-       bundle_add(b, "_SYSPOPUP_CONTENT_", str);
-       ret = syspopup_launch("mmc-syspopup", b);
-       if (ret < 0)
-               _E("popup launch failed");
-       bundle_free(b);
+       // TODO : display a popup
 }
 
 static int mmc_check(char* path)
index 1721dfd..8c65970 100755 (executable)
@@ -31,7 +31,6 @@
 #include <TelPower.h>
 #include <tapi_event.h>
 #include <tapi_common.h>
-#include <syspopup_caller.h>
 #include <sys/reboot.h>
 #include <sys/time.h>
 #include <mntent.h>
index 4db9a12..8f6e3b4 100644 (file)
@@ -441,20 +441,7 @@ int lowmem_def_predefine_action(int argc, char **argv)
                                if (check_oomadj(oom_adj) == 0)
                                        return 0;
 
-                               bundle *b = NULL;
-
-                               b = bundle_create();
-                               bundle_add(b, "_APP_NAME_", appname);
-                               ret = syspopup_launch("lowmem-syspopup", b);
-                               bundle_free(b);
-                               if (ret < 0) {
-                                       _E("popup lauch failed");
-                                       return -1;
-                               }
-
-                               if (set_su_oomadj(ret) < 0) {
-                                       _E("Failed to set oom_adj");
-                               }
+                               // TODO : display a popup
                        }
                }
        }
index 71364ce..90b3a80 100755 (executable)
@@ -21,7 +21,6 @@
 #include <libintl.h>
 #include <locale.h>
 #include <vconf.h>
-#include <syspopup_caller.h>
 #include <notification.h>
 #include "core/log.h"
 #include "sys_pci_noti.h"