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)
#ifndef __TIZEN_NETWORK_SERIAL_PRIVATE_H__
#define __TIZEN_NETWORK_SERIAL_PRIVATE_H__
-#include <dbus/dbus-glib.h>
-
#include "serial.h"
#ifdef __cplusplus
* @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;
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
#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>
{
DBG("%s\n", __FUNCTION__);
- GError *error = NULL;
DBusError dbus_error;
serial_s *pHandle = NULL;
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);
return SERIAL_ERROR_OPERATION_FAILED;
}
+ pHandle->client_bus = dbus_connection;
+
*serial = (serial_h) pHandle;
return SERIAL_ERROR_NONE;
}
if (pHandle->client_bus != NULL) {
- dbus_g_connection_unref(pHandle->client_bus);
+ dbus_connection_unref(pHandle->client_bus);
pHandle->client_bus = NULL;
}