#include <vconf.h>
#include <time.h>
#include <string.h>
-#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/libgdbus.h>
#include <libsyscommon/list.h>
#include <libsyscommon/ini-parser.h>
#include <hal/device/hal-haptic.h>
SYS_G_LIST_APPEND(haptic_handle_list, info);
- info->id_watch = dbus_handle_watch_name(sender, NULL, haptic_name_owner_changed, info, NULL);
+ info->id_watch = gdbus_watch_name(sender, NULL, haptic_name_owner_changed, info, NULL);
return info;
}
{
assert(info);
- dbus_handle_unwatch_name(info->id_watch);
+ gdbus_unwatch_name(info->id_watch);
SYS_G_LIST_REMOVE(haptic_handle_list, info);
SYS_G_LIST_FREE_LIST(info->handle_list);
}
/* init dbus interface */
- r = dbus_handle_register_dbus_object(NULL, VIBRATOR_PATH_HAPTIC, &dbus_interface);
+ r = gdbus_register_object(NULL, VIBRATOR_PATH_HAPTIC, &dbus_interface);
if (r < 0)
_E("Failed to init hdbus interface and method: %d", r);
- id_sig_pwr_off_state = subscribe_dbus_signal(NULL,
+ id_sig_pwr_off_state = gdbus_signal_subscribe(NULL,
DEVICED_PATH_POWEROFF,
DEVICED_INTERFACE_POWEROFF,
SIGNAL_POWEROFF_STATE,
return;
}
- dbus_handle_emit_dbus_signal(NULL,
+ gdbus_signal_emit(NULL,
VIBRATOR_PATH_HAPTIC,
VIBRATOR_INTERFACE_HAPTIC,
SIGNAL_VIBRATOR_INITIATED,
}
/* unregister notifier for below each event */
- unsubscribe_dbus_signal(NULL, id_sig_pwr_off_state);
+ gdbus_signal_unsubscribe(NULL, id_sig_pwr_off_state);
/* release haptic data memory */
safe_free(haptic_conf.level_arr);
#include <system_info.h>
#include <systemd/sd-daemon.h>
-#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/libgdbus.h>
#include "shared/log.h"
#include "shared/common.h"
mainloop = g_main_loop_new(NULL, FALSE);
- handle = dbus_handle_get_connection(G_BUS_TYPE_SYSTEM, FALSE);
+ handle = gdbus_get_connection(G_BUS_TYPE_SYSTEM, FALSE);
if (!handle)
_E("Failed to get dbus connection.");;
}
haptic_init();
- ret = dbus_handle_request_bus_name(handle, VIBRATOR_BUS_NAME, dbus_name_acquired, NULL);
+ ret = gdbus_request_name(handle, VIBRATOR_BUS_NAME, dbus_name_acquired, NULL);
if (ret <= 0) {
_E("Failed to request bus name.");
- dbus_handle_check_owner_name(NULL, VIBRATOR_BUS_NAME);
+ gdbus_check_name_owner(NULL, VIBRATOR_BUS_NAME);
}
signal(SIGTERM, sig_quit);