Remove dbus-glib-1 dependency 62/67562/2 accepted/tizen/common/20160427.144421 accepted/tizen/ivi/20160428.002754 accepted/tizen/mobile/20160428.005021 accepted/tizen/tv/20160428.002551 accepted/tizen/wearable/20160428.002913 submit/tizen/20160427.085019
authorDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 27 Apr 2016 08:25:56 +0000 (17:25 +0900)
committerPyun DoHyun <dh79.pyun@samsung.com>
Wed, 27 Apr 2016 08:40:33 +0000 (01:40 -0700)
Change-Id: I3b315707197deffc86cd82fd0c78e12694db1c4e
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-share/CMakeLists.txt
bt-share/src/bt-share-ipc.c

index fc45835..39f8504 100644 (file)
@@ -18,7 +18,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib)
 
 INCLUDE(FindPkgConfig)
 pkg_check_modules(pkgs REQUIRED glib-2.0 bluetooth-api
-                               aul dbus-glib-1 appcore-common
+                               aul appcore-common
                                dlog vconf syspopup-caller deviced
                                notification sqlite3 ecore-file
                                appsvc appcore-efl storage
index 0afbea9..ec05b5f 100644 (file)
@@ -17,8 +17,6 @@
  *
  */
 
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib.h>
 #include <dbus/dbus.h>
 #include <glib.h>
 #include <time.h>
@@ -421,20 +419,22 @@ static DBusHandlerResult __event_filter(DBusConnection *sys_conn,
 gboolean _bt_init_dbus_signal(void)
 {
        DBG("+");
-       DBusGConnection *conn;
-       GError *err = NULL;
        DBusError dbus_error;
 
-       conn = dbus_g_bus_get(DBUS_BUS_SYSTEM, &err);
-       if (!conn) {
+       dbus_error_init(&dbus_error);
+
+       dbus_connection = dbus_bus_get(DBUS_BUS_SYSTEM, &dbus_error);
+
+       if (!dbus_connection) {
                ERR(" DBUS get failed");
-               g_error_free(err);
+               if (dbus_error_is_set(&dbus_error)) {
+                       ERR("D-Bus Error: %s\n", dbus_error.message);
+                       dbus_error_free(&dbus_error);
+               }
                return FALSE;
        }
-       dbus_connection = dbus_g_connection_get_connection(conn);
 
        /* Add the filter for network client functions */
-       dbus_error_init(&dbus_error);
        dbus_connection_add_filter(dbus_connection, __event_filter, NULL, NULL);
        dbus_bus_add_match(dbus_connection,
                        "type=signal,interface=" BT_BLUEZ_INTERFACE