Remove dbus-glib-1 dependency 83/174483/1 accepted/tizen_5.0_unified accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix accepted/tizen_6.5_unified accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix accepted/tizen_8.0_unified accepted/tizen_unified tizen tizen_5.0 tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix tizen_6.0 tizen_6.0_hotfix tizen_6.5 tizen_7.0 tizen_7.0_hotfix tizen_8.0 accepted/tizen/5.0/unified/20181102.013852 accepted/tizen/5.5/unified/20191031.030440 accepted/tizen/5.5/unified/mobile/hotfix/20201027.065132 accepted/tizen/5.5/unified/wearable/hotfix/20201027.120648 accepted/tizen/6.0/unified/20201030.121916 accepted/tizen/6.0/unified/hotfix/20201103.004158 accepted/tizen/6.0/unified/hotfix/20201103.050717 accepted/tizen/6.5/unified/20211028.100156 accepted/tizen/7.0/unified/20221110.060148 accepted/tizen/7.0/unified/hotfix/20221116.104826 accepted/tizen/8.0/unified/20231005.092841 accepted/tizen/unified/20180502.071112 submit/tizen/20180502.042150 submit/tizen_5.0/20181101.000002 submit/tizen_5.5/20191031.000002 submit/tizen_5.5_mobile_hotfix/20201026.185102 submit/tizen_5.5_wearable_hotfix/20201026.184302 submit/tizen_6.0/20201029.205102 submit/tizen_6.0_hotfix/20201102.192502 submit/tizen_6.0_hotfix/20201103.114802 submit/tizen_6.5/20211028.161801 tizen_5.5.m2_release tizen_6.0.m2_release tizen_6.5.m2_release tizen_7.0_m2_release tizen_8.0_m2_release
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 2 Apr 2018 09:57:53 +0000 (18:57 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 2 Apr 2018 09:57:53 +0000 (18:57 +0900)
Change-Id: I5bbbe316ca6bdf004f6402dbd62e761f0c295b71
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
CMakeLists.txt
include/serial_private.h
packaging/capi-network-serial.spec
src/serial.c

index 68aff7a..2e30fc2 100644 (file)
@@ -9,7 +9,7 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(INC_DIR include)
 INCLUDE_DIRECTORIES(${INC_DIR})
 
-SET(dependents "dlog glib-2.0 capi-base-common dbus-glib-1")
+SET(dependents "dlog glib-2.0 capi-base-common dbus-1")
 SET(pc_dependents "capi-base-common")
 
 INCLUDE(FindPkgConfig)
index 2e5c88f..7c0ddf3 100644 (file)
@@ -17,8 +17,6 @@
 #ifndef __TIZEN_NETWORK_SERIAL_PRIVATE_H__
 #define __TIZEN_NETWORK_SERIAL_PRIVATE_H__
 
-#include <dbus/dbus-glib.h>
-
 #include "serial.h"
 
 #ifdef __cplusplus
@@ -39,7 +37,7 @@ extern "C" {
   * @brief Serial handle
   */
        typedef struct _serial_s {
-               DBusGConnection *client_bus;
+               DBusConnection *client_bus;
                int client_socket;
                int g_watch_id;
                serial_event_s state_handler;
index 9d5d3d3..9afb92a 100644 (file)
@@ -7,10 +7,10 @@ License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
 Source1001:    capi-network-serial.manifest
 
-BuildRequires:  pkgconfig(dbus-glib-1)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(dbus-1)
 
 BuildRequires:  cmake
 
index 1772bcc..7c5d783 100644 (file)
@@ -21,8 +21,6 @@
 #include <stdio.h>
 #include <stdbool.h>
 #include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
 #include <unistd.h>
 #include <sys/un.h>
 #include <sys/socket.h>
@@ -231,7 +229,6 @@ int serial_create(serial_h * serial)
 {
        DBG("%s\n", __FUNCTION__);
 
-       GError *error = NULL;
        DBusError dbus_error;
        serial_s *pHandle = NULL;
 
@@ -245,14 +242,12 @@ int serial_create(serial_h * serial)
        g_type_init();
 #endif
 
-       pHandle->client_bus = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error);
-       if (error) {
-               ERR("Couldn't connect to the System bus[%s]", error->message);
-               g_error_free(error);
+       dbus_connection = dbus_bus_get(DBUS_BUS_SYSTEM, NULL);
+       if (!dbus_connection) {
+               ERR("Couldn't connect to the System bus");
                g_free(pHandle);
                return SERIAL_ERROR_OPERATION_FAILED;
        }
-       dbus_connection = dbus_g_connection_get_connection(pHandle->client_bus);
 
        /* Add the filter for network client functions */
        dbus_error_init(&dbus_error);
@@ -265,6 +260,8 @@ int serial_create(serial_h * serial)
                return SERIAL_ERROR_OPERATION_FAILED;
        }
 
+       pHandle->client_bus = dbus_connection;
+
        *serial = (serial_h) pHandle;
 
        return SERIAL_ERROR_NONE;
@@ -322,7 +319,7 @@ int serial_destroy(serial_h serial)
        }
 
        if (pHandle->client_bus != NULL) {
-               dbus_g_connection_unref(pHandle->client_bus);
+               dbus_connection_unref(pHandle->client_bus);
                pHandle->client_bus = NULL;
        }