summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaemin.yeom <taemin.yeom@samsung.com>2021-03-19 17:35:15 +0900
committertaemin.yeom <taemin.yeom@samsung.com>2021-03-19 17:35:15 +0900
commit7b4c01fb1638a0f5fef63e18e528214b609c37e9 (patch)
tree80ceda1de69880c267ae3c7bac3915ebd2ed11a0
parent22152267e88f46a40b1116fed1e11a16e32845f3 (diff)
downloadlibsvi-7b4c01fb1638a0f5fef63e18e528214b609c37e9.tar.gz
libsvi-7b4c01fb1638a0f5fef63e18e528214b609c37e9.tar.bz2
libsvi-7b4c01fb1638a0f5fef63e18e528214b609c37e9.zip
Change-Id: I359eb66d69148df08933758deb591fe549797164 Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
-rw-r--r--src/feedback.c6
-rw-r--r--src/vibrator.c12
2 files changed, 9 insertions, 9 deletions
diff --git a/src/feedback.c b/src/feedback.c
index 15c763e..d3b3972 100644
--- a/src/feedback.c
+++ b/src/feedback.c
@@ -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();
diff --git a/src/vibrator.c b/src/vibrator.c
index 319c55d..7baf50d 100644
--- a/src/vibrator.c
+++ b/src/vibrator.c
@@ -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)