Remove syspopup and aul dependencies 39/27839/1 accepted/tizen/common/20140925.172004 submit/tizen/20140925.101000
authorChristophe Moreau <christophe.moreau@open.eurogiciel.org>
Fri, 19 Sep 2014 14:50:05 +0000 (16:50 +0200)
committerChristophe Moreau <christophe.moreau@open.eurogiciel.org>
Fri, 19 Sep 2014 15:02:29 +0000 (17:02 +0200)
Tizen 3 should use a popup system that does not depend on a graphical toolkit

Bug-Tizen: TC-1476

Change-Id: I50109f0523585ad2ae6fafe87c15b05a6869c2c4
Signed-off-by: Christophe Moreau <christophe.moreau@open.eurogiciel.org>
bt-share/CMakeLists.txt
bt-share/src/bt-share-ipc.c
bt-share/src/bt-share-syspopup.c
debian/control
packaging/bluetooth-share.spec

index 9b8aa0a..0b3efbe 100644 (file)
@@ -17,8 +17,8 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib)
 
 INCLUDE(FindPkgConfig)
 pkg_check_modules(pkgs REQUIRED glib-2.0 bluetooth-api
-                               aul dbus-glib-1 appcore-common
-                               dlog vconf syspopup-caller pmapi sysman
+                               dbus-glib-1 appcore-common
+                               dlog vconf pmapi sysman
                                notification calendar-service2 contacts-service2
                                appsvc appcore-efl libprivilege-control
                                capi-content-media-content
index 2165776..7e9ba26 100644 (file)
@@ -26,7 +26,6 @@
 #include <string.h>
 #include <notification.h>
 #include <sysman.h>
-#include <aul.h>
 #include <vconf.h>
 
 #include "applog.h"
@@ -398,7 +397,6 @@ void _bt_create_warning_popup(int error_type)
        /* Otherwise create the process and terminate it after popup shown */
        if (sysman_get_pid(UI_PKG_PATH) == -1) {
                char str[BT_TEXT_LEN_MAX] = {0,};
-               bundle *b;
 
                switch(error_type) {
                case BLUETOOTH_ERROR_SERVICE_NOT_FOUND:
@@ -412,15 +410,9 @@ void _bt_create_warning_popup(int error_type)
                        return;
                }
 
-               b = bundle_create();
-               ret_if(b == NULL);
+               INFO("bt create warning popup notification");
+               // TODO : display a popup
 
-               bundle_add(b, "launch-type", "warning_popup");
-               bundle_add(b, "message", str);
-
-               aul_launch_app(UI_PACKAGE, b);
-
-               bundle_free(b);
        }else {
                DBusMessage *msg = NULL;
                ret_if(dbus_connection == NULL);
index b38cdf0..bdd56d4 100644 (file)
@@ -20,7 +20,6 @@
 #include <glib.h>
 #include <stdlib.h>
 #include <string.h>
-#include <syspopup_caller.h>
 #include "applog.h"
 #include "bluetooth-api.h"
 #include "bt-share-syspopup.h"
@@ -35,28 +34,15 @@ extern struct bt_appdata *app_state;
 
 static gboolean __bt_system_popup_timer_cb(gpointer user_data)
 {
-       int ret = 0;
-       struct bt_appdata *ad = app_state;
-       bundle *b = (bundle *) user_data;
-
-       if (NULL == b) {
+       if (NULL == (void *)user_data) {
                ERR("There is some problem with the user data..popup can not be created\n");
                return FALSE;
        }
 
-       ad->syspopup_call++;
-
-       ret = syspopup_launch("bt-syspopup", b);
-       if (0 > ret) {
-               ERR("launching sys-popup failed\n");
-               if (ad->syspopup_call < BT_SYSPOPUP_MAX_CALL) {
-                       return TRUE;
-               }
-       }
+       INFO("bt system popup timer cb notification");
 
-       ad->syspopup_call = 0;
+       // TODO : display a popup
 
-       bundle_free(b);
        return FALSE;
 }
 
@@ -65,8 +51,6 @@ int _bt_launch_system_popup(bt_app_event_type_t event_type,
                            void *cb,
                            void *data)
 {
-       int ret = 0;
-       bundle *b = NULL;
        char event_str[BT_SYSPOPUP_EVENT_LEN_MAX] = { 0 };
        struct bt_appdata *ad = app_state;
 
@@ -74,15 +58,6 @@ int _bt_launch_system_popup(bt_app_event_type_t event_type,
        if(cb == NULL)
                return -1;
 
-       b = bundle_create();
-       if(b == NULL)
-               return -1;
-
-       bundle_add(b, "title", popup_params->title);
-       bundle_add(b, "type", popup_params->type);
-       bundle_add(b, "file", popup_params->file);
-       bundle_add(b, "device_name", popup_params->device_name);
-
        switch (event_type) {
        case BT_APP_EVENT_CONFIRM_MODE_REQUEST:
                strncpy(event_str, "app-confirm-request", sizeof(event_str));
@@ -100,25 +75,11 @@ int _bt_launch_system_popup(bt_app_event_type_t event_type,
                break;
        }
 
-       bundle_add(b, "event-type", event_str);
-
-       /*The system popup launch function is not able to launch second popup
-         * if first popup is being processed still, this due to the check
-         * in AUL module to restrict multiple launching of syspopup,
-         * to solve this problem after discussion it is decided that  if
-         * the popup launch fails then it will be retried
-         * after small timeout. */
-
        ad->syspopup_call = 0;
 
-       ret = syspopup_launch("bt-syspopup", b);
-       if (0 > ret) {
-               ERR("Popup launch failed...retry = %d\n", ret);
-               g_timeout_add(BT_POPUP_SYSPOPUP_TIMEOUT_FOR_MULTIPLE_POPUPS,
-                             (GSourceFunc) __bt_system_popup_timer_cb, b);
-       } else {
-               bundle_free(b);
-       }
+       INFO("bt_launch_system_popup");
+
+       // TODO : display a popup
 
        ad->popups.popup_cb = (bt_app_cb) cb;
        ad->popups.popup_cb_data = data;
index 57a9999..a44a820 100644 (file)
@@ -3,14 +3,14 @@ Section: net
 Priority: extra
 Maintainer:  Hocheol Seo <hocheol.seo@samsung.com>, DoHyun Pyun <dh79.pyun@samsung.com>, ChanYeol Park <chanyeol.park@samsung.com>, InJun Yang <injun.yang@samsung.com>, Seungyoun Ju <sy39.ju@samsung.com>
 Uploaders: Sunil Behera <sunil.behera@samsung.com>, Syam Sidhardhan <s.syam@samsung.com>
-Build-Depends: debhelper (>= 5), libbluetooth-frwk-dev, libglib2.0-dev, libdbus-1-dev, libdbus-glib-1-dev, libappcore-common-dev, libaul-1-dev, dlog-dev, syspopup-caller-dev, libappsvc-dev, libbundle-dev, libnotification-dev, libslp-calendar-dev, libcontacts-service-dev, libslp-pm-dev, libslp-sysman-dev, libx11-dev, libappcore-efl-dev, libslp-db-util-dev, libprivilege-control-dev
+Build-Depends: debhelper (>= 5), libbluetooth-frwk-dev, libglib2.0-dev, libdbus-1-dev, libdbus-glib-1-dev, libappcore-common-dev, dlog-dev, libappsvc-dev, libbundle-dev, libnotification-dev, libslp-calendar-dev, libcontacts-service-dev, libslp-pm-dev, libslp-sysman-dev, libx11-dev, libappcore-efl-dev, libslp-db-util-dev, libprivilege-control-dev
 Standards-Version: 3.7.2
 
 Package: bluetooth-share
 Section: application
 Provides:bluetooth-app-headers
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends},libbluetooth-frwk-0, libaul-1, libdlog-0
+Depends: ${shlibs:Depends}, ${misc:Depends},libbluetooth-frwk-0, libdlog-0
 Description: Bluetooth File Share Agent
 
 Package: bluetooth-share-dbg
index 95dded7..b0022d2 100644 (file)
@@ -18,12 +18,10 @@ BuildRequires:  gettext-tools
 BuildRequires:  pkgconfig(appcore-efl)
 BuildRequires:  pkgconfig(bluetooth-api)
 BuildRequires:  pkgconfig(glib-2.0)
-BuildRequires:  pkgconfig(aul)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(calendar-service2)
 BuildRequires:  pkgconfig(contacts-service2)
 BuildRequires:  pkgconfig(vconf)
-BuildRequires:  pkgconfig(syspopup-caller)
 BuildRequires:  pkgconfig(pmapi)
 BuildRequires:  pkgconfig(sysman)
 BuildRequires:  pkgconfig(notification)