Change dbus function name 75/255575/1 accepted/tizen/6.5/unified/20211028.115020 accepted/tizen/unified/20210321.225728 submit/tizen/20210319.090004 submit/tizen_6.5/20211028.162501 tizen_6.5.m2_release
authortaemin.yeom <taemin.yeom@samsung.com>
Fri, 19 Mar 2021 08:35:15 +0000 (17:35 +0900)
committertaemin.yeom <taemin.yeom@samsung.com>
Fri, 19 Mar 2021 08:35:15 +0000 (17:35 +0900)
Change-Id: I359eb66d69148df08933758deb591fe549797164
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
src/feedback.c
src/vibrator.c

index 15c763e..d3b3972 100644 (file)
@@ -20,7 +20,7 @@
 #include <stdbool.h>
 #include <string.h>
 #include <limits.h>
-#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/libgdbus.h>
 
 #include "feedback.h"
 #include "feedback-internal.h"
@@ -75,7 +75,7 @@ API int feedback_initialize(void)
                return FEEDBACK_ERROR_NONE;
        }
 
-       ret_dbus = subscribe_dbus_signal(NULL, NULL,
+       ret_dbus = gdbus_signal_subscribe(NULL, NULL,
                                VIBRATOR_INTERFACE_HAPTIC,
                                SIGNAL_VIBRATOR_INITIATED,
                                restart_callback, NULL, NULL);
@@ -109,7 +109,7 @@ API int feedback_deinitialize(void)
        }
 
        if (signal_id > 0)
-               unsubscribe_dbus_signal(NULL, signal_id);
+               gdbus_signal_unsubscribe(NULL, signal_id);
 
        /* deinitialize device */
        devices_exit();
index 319c55d..7baf50d 100644 (file)
@@ -25,7 +25,7 @@
 #include <vconf.h>
 #include <sys/stat.h>
 #include <system_info.h>
-#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/libgdbus.h>
 
 #include "feedback.h"
 #include "profiles.h"
@@ -78,7 +78,7 @@ inline int is_vibration_mode(void)
 static int haptic_open(void)
 {
        int ret_dbus, reply;
-       ret_dbus = dbus_handle_method_sync_var(VIBRATOR_BUS_NAME, VIBRATOR_PATH_HAPTIC,
+       ret_dbus = gdbus_call_sync_with_reply_int(VIBRATOR_BUS_NAME, VIBRATOR_PATH_HAPTIC,
                        VIBRATOR_INTERFACE_HAPTIC, METHOD_OPEN,
                        g_variant_new("(i)", HAPTIC_DEVICE), &reply);
        if (ret_dbus < 0)
@@ -89,7 +89,7 @@ static int haptic_open(void)
 static int haptic_close(unsigned int handle)
 {
        int ret_dbus, reply;
-       ret_dbus = dbus_handle_method_sync_var(VIBRATOR_BUS_NAME, VIBRATOR_PATH_HAPTIC,
+       ret_dbus = gdbus_call_sync_with_reply_int(VIBRATOR_BUS_NAME, VIBRATOR_PATH_HAPTIC,
                        VIBRATOR_INTERFACE_HAPTIC, METHOD_CLOSE,
                        g_variant_new("(u)", handle), &reply);
        if (ret_dbus < 0)
@@ -100,7 +100,7 @@ static int haptic_close(unsigned int handle)
 static int haptic_is_supported(const char *pattern)
 {
        int ret_dbus, reply;
-       ret_dbus = dbus_handle_method_sync_var(VIBRATOR_BUS_NAME, VIBRATOR_PATH_HAPTIC,
+       ret_dbus = gdbus_call_sync_with_reply_int(VIBRATOR_BUS_NAME, VIBRATOR_PATH_HAPTIC,
                        VIBRATOR_INTERFACE_HAPTIC, METHOD_IS_SUPPORTED,
                        g_variant_new("(s)", pattern), &reply);
        if (ret_dbus < 0)
@@ -114,7 +114,7 @@ static int haptic_vibrate_effect(unsigned int handle,
                                                                int priority)
 {
        int ret_dbus, reply;
-       ret_dbus = dbus_handle_method_sync_var(VIBRATOR_BUS_NAME, VIBRATOR_PATH_HAPTIC,
+       ret_dbus = gdbus_call_sync_with_reply_int(VIBRATOR_BUS_NAME, VIBRATOR_PATH_HAPTIC,
                        VIBRATOR_INTERFACE_HAPTIC, METHOD_VIBRATE_PATTERN,
                        g_variant_new("(usii)", handle, pattern, feedback, priority), &reply);
        if (ret_dbus < 0)
@@ -125,7 +125,7 @@ static int haptic_vibrate_effect(unsigned int handle,
 static int haptic_vibrate_stop(unsigned int handle)
 {
        int ret_dbus, reply;
-       ret_dbus = dbus_handle_method_sync_var(VIBRATOR_BUS_NAME, VIBRATOR_PATH_HAPTIC,
+       ret_dbus = gdbus_call_sync_with_reply_int(VIBRATOR_BUS_NAME, VIBRATOR_PATH_HAPTIC,
                        VIBRATOR_INTERFACE_HAPTIC, METHOD_STOP,
                        g_variant_new("(u)", handle), &reply);
        if (ret_dbus < 0)