From eaaaf8bc1cf76109540fe5f0a489280198971c95 Mon Sep 17 00:00:00 2001 From: "taemin.yeom" Date: Fri, 19 Mar 2021 16:37:47 +0900 Subject: [PATCH] Change dbus function name Change-Id: Icc25271e356bd4284b6162a4514740b17a54cefd Signed-off-by: taemin.yeom --- src/auto-test/haptic.c | 2 +- src/auto-test/test.h | 2 +- src/core/haptic.c | 14 +++++++------- src/core/main.c | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/auto-test/haptic.c b/src/auto-test/haptic.c index 944f622..101f8da 100644 --- a/src/auto-test/haptic.c +++ b/src/auto-test/haptic.c @@ -33,7 +33,7 @@ static bool request_haptic_method(const char *method, GVariant *param, int *out_ int reply_val, ret_dbus; bool ret = FALSE; - ret_dbus = dbus_handle_method_sync_with_reply_var(VIBRATOR_BUS_NAME, + ret_dbus = gdbus_call_sync_with_reply(VIBRATOR_BUS_NAME, VIBRATOR_PATH_HAPTIC, VIBRATOR_INTERFACE_HAPTIC, method, param, &reply); diff --git a/src/auto-test/test.h b/src/auto-test/test.h index e0b93ec..2bd0130 100644 --- a/src/auto-test/test.h +++ b/src/auto-test/test.h @@ -21,7 +21,7 @@ #define FEEDBACKD__TEST_H__ #include #include -#include +#include #include "shared/log.h" #include "shared/common.h" diff --git a/src/core/haptic.c b/src/core/haptic.c index 3f955ea..e644f1c 100644 --- a/src/core/haptic.c +++ b/src/core/haptic.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include @@ -609,7 +609,7 @@ static struct haptic_info *add_haptic_info(const char *sender) 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; } @@ -618,7 +618,7 @@ static int remove_haptic_info(struct haptic_info *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); @@ -1315,11 +1315,11 @@ void haptic_init(void) } /* 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, @@ -1331,7 +1331,7 @@ void haptic_init(void) return; } - dbus_handle_emit_dbus_signal(NULL, + gdbus_signal_emit(NULL, VIBRATOR_PATH_HAPTIC, VIBRATOR_INTERFACE_HAPTIC, SIGNAL_VIBRATOR_INITIATED, @@ -1361,7 +1361,7 @@ void haptic_exit(void) } /* 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); diff --git a/src/core/main.c b/src/core/main.c index a6760e9..c3efc39 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include "shared/log.h" #include "shared/common.h" @@ -70,7 +70,7 @@ int main(int argc, char **argv) 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.");; @@ -82,10 +82,10 @@ int main(int argc, char **argv) } 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); -- 2.7.4