#include <gio/gio.h>
-#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/libgdbus.h>
#include "device-error.h"
#include "display-enum.h"
#define __TIZEN_SYSTEM_TOUCHSCREEN_INTERNAL_H__
#include <gio/gio.h>
-#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/libgdbus.h>
int device_touchscreen_enable(dbus_pending_cb cb);
int device_touchscreen_disable(dbus_pending_cb cb);
#include <errno.h>
#include <vconf.h>
#include <hal/device/hal-battery.h>
-#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/libgdbus.h>
#include <system_info.h>
#include "battery.h"
#include <errno.h>
#include <vconf.h>
#include <gio/gio.h>
-#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/libgdbus.h>
#include <libsyscommon/list.h>
#include "callback.h"
#include <stdio.h>
#include <errno.h>
#include <vconf.h>
-#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/libgdbus.h>
#include <system_info.h>
#include "display.h"
/* if it is a first request */
if (display_cnt < 0) {
- ret_val = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_val = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_DISPLAY, DEVICED_INTERFACE_DISPLAY,
METHOD_GET_DISPLAY_COUNT, NULL, &reply);
if (ret_val < 0)
return DEVICE_ERROR_OPERATION_FAILED;
if (display_arr[display_index].normal_max < 0) {
- ret_val = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_val = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_DISPLAY, DEVICED_INTERFACE_DISPLAY,
METHOD_GET_MAX_BRIGHTNESS, g_variant_new("(i)", (int)DISPLAY_STATE_NORMAL),
&reply);
if (display_index < 0 || display_index >= display_cnt)
return DEVICE_ERROR_INVALID_PARAMETER;
- ret_val = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_val = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_DISPLAY, DEVICED_INTERFACE_DISPLAY,
METHOD_GET_BRIGHTNESS, g_variant_new("(i)", (int)DISPLAY_STATE_NORMAL),
&reply);
if (brightness < 0 || brightness > display_arr[display_index].normal_max)
return DEVICE_ERROR_INVALID_PARAMETER;
- ret_val = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_val = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_DISPLAY, DEVICED_INTERFACE_DISPLAY,
METHOD_SET_BRIGHTNESS, g_variant_new("(ii)", (int)DISPLAY_STATE_NORMAL, brightness),
NULL);
return DEVICE_ERROR_INVALID_PARAMETER;
if (privilege < 0) {
- ret = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_DISPLAY, DEVICED_INTERFACE_DISPLAY,
METHOD_CHANGE_STATE, g_variant_new("(s)", "privilege check"),
NULL);
if (!str)
return DEVICE_ERROR_INVALID_PARAMETER;
- ret = dbus_handle_method_async_with_reply_var(DEVICED_BUS_NAME,
+ ret = gdbus_call_async_with_reply(DEVICED_BUS_NAME,
DEVICED_PATH_DISPLAY, DEVICED_INTERFACE_DISPLAY,
METHOD_CHANGE_STATE, g_variant_new("(s)", str), change_cb, -1, NULL);
if (!display_arr && alloc_display() < 0)
return DEVICE_ERROR_OPERATION_FAILED;
- ret_val = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_val = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_DISPLAY, DEVICED_INTERFACE_DISPLAY,
METHOD_GET_MAX_BRIGHTNESS, g_variant_new("(i)", (int)state),
&reply);
if (display_index < 0 || display_index >= display_cnt)
return DEVICE_ERROR_INVALID_PARAMETER;
- ret_val = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_val = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_DISPLAY, DEVICED_INTERFACE_DISPLAY,
METHOD_GET_BRIGHTNESS, g_variant_new("(i)", (int)state),
&reply);
break;
}
- ret_val = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_val = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_DISPLAY, DEVICED_INTERFACE_DISPLAY,
METHOD_SET_BRIGHTNESS, g_variant_new("(ii)", (int)state, brightness),
NULL);
{
int ret;
- ret = dbus_handle_method_async_with_reply_var(DEVICED_BUS_NAME,
+ ret = gdbus_call_async_with_reply(DEVICED_BUS_NAME,
DEVICED_PATH_DISPLAY, DEVICED_INTERFACE_DISPLAY,
METHOD_CHANGE_STATE_BY_REASON, g_variant_new("(isi)", (int)type, reason, timeout), cb, -1, NULL);
#include <errno.h>
#include <stdlib.h>
#include <system_info.h>
-#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/libgdbus.h>
#include <libsyscommon/list.h>
#include "haptic.h"
return DEVICE_ERROR_NOT_SUPPORTED;
/* request to deviced to get haptic count */
- ret_val = dbus_handle_method_sync_var(VIBRATOR_BUS_NAME,
+ ret_val = gdbus_call_sync_with_reply_int(VIBRATOR_BUS_NAME,
VIBRATOR_PATH_HAPTIC, VIBRATOR_INTERFACE_HAPTIC,
METHOD_GET_COUNT, NULL, &val);
/**
int ret_dbus, val;
SYS_G_LIST_FOREACH_SAFE(handle_list, elem, elem_next, temp) {
- ret_dbus = dbus_handle_method_sync_var(VIBRATOR_BUS_NAME,
+ ret_dbus = gdbus_call_sync_with_reply_int(VIBRATOR_BUS_NAME,
VIBRATOR_PATH_HAPTIC, VIBRATOR_INTERFACE_HAPTIC,
METHOD_OPEN_DEVICE, g_variant_new("(i)", temp->index), &val);
if (ret_dbus < 0) {
return DEVICE_ERROR_NOT_SUPPORTED;
/* request to deviced to open haptic device */
- ret_val = dbus_handle_method_sync_var(VIBRATOR_BUS_NAME,
+ ret_val = gdbus_call_sync_with_reply_int(VIBRATOR_BUS_NAME,
VIBRATOR_PATH_HAPTIC, VIBRATOR_INTERFACE_HAPTIC,
METHOD_OPEN_DEVICE, g_variant_new("(i)", device_index), &val);
if (ret_val < 0)
*device_handle = (haptic_device_h)handle;
}
if (SYS_G_LIST_LENGTH(handle_list) == 1) {
- haptic_id = subscribe_dbus_signal(NULL,
+ haptic_id = gdbus_signal_subscribe(NULL,
VIBRATOR_PATH_HAPTIC,
VIBRATOR_INTERFACE_HAPTIC,
NULL,
SYS_G_LIST_REMOVE(handle_list, handle);
/* request to deviced to open haptic device */
- ret_val = dbus_handle_method_sync_var(VIBRATOR_BUS_NAME,
+ ret_val = gdbus_call_sync_with_reply_int(VIBRATOR_BUS_NAME,
VIBRATOR_PATH_HAPTIC, VIBRATOR_INTERFACE_HAPTIC,
METHOD_CLOSE_DEVICE, g_variant_new("(u)", (unsigned int)handle->handle),
NULL);
return errno_to_device_error(ret_val); //LCOV_EXCL_LINE System Error
if (SYS_G_LIST_LENGTH(handle_list) == 0)
- unsubscribe_dbus_signal(NULL, haptic_id);
+ gdbus_signal_unsubscribe(NULL, haptic_id);
return DEVICE_ERROR_NONE;
}
return DEVICE_ERROR_INVALID_PARAMETER;
/* request to deviced to vibrate haptic device */
- ret_val = dbus_handle_method_sync_var(VIBRATOR_BUS_NAME,
+ ret_val = gdbus_call_sync_with_reply_int(VIBRATOR_BUS_NAME,
VIBRATOR_PATH_HAPTIC, VIBRATOR_INTERFACE_HAPTIC,
METHOD_VIBRATE_MONOTONE,
g_variant_new("(uiii)", (unsigned int)handle->handle, duration, feedback, priority),
/* TODO : support to stop haptic effect */
/* request to deviced to open haptic device */
- ret_val = dbus_handle_method_sync_var(VIBRATOR_BUS_NAME,
+ ret_val = gdbus_call_sync_with_reply_int(VIBRATOR_BUS_NAME,
VIBRATOR_PATH_HAPTIC, VIBRATOR_INTERFACE_HAPTIC,
METHOD_STOP_DEVICE, g_variant_new("(u)", (unsigned int)handle->handle),
NULL);
#include <stdio.h>
#include <system_info.h>
-#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/libgdbus.h>
#include "ir.h"
#include "common.h"
return DEVICE_ERROR_NOT_SUPPORTED;
}
- ret_val = dbus_handle_method_sync_var(DEVICED_BUS_NAME, DEVICED_PATH_IR,
+ ret_val = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME, DEVICED_PATH_IR,
DEVICED_INTERFACE_IR, METHOD_IS_AVAILABLE,
NULL, NULL);
for (i = 0; i < size; ++i)
g_variant_builder_add(builder, "i", pattern[i]);
- ret_val = dbus_handle_method_sync_var(DEVICED_BUS_NAME, DEVICED_PATH_IR,
+ ret_val = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME, DEVICED_PATH_IR,
DEVICED_INTERFACE_IR, METHOD_TRANSMIT,
g_variant_new("(ai)", builder), NULL);
#include <stdbool.h>
#include <errno.h>
#include <system_info.h>
-#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/libgdbus.h>
#include "led.h"
#include "led-internal.h"
if (!max_brightness)
return DEVICE_ERROR_INVALID_PARAMETER;
- ret_dbus = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_dbus = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_LED, DEVICED_INTERFACE_LED,
METHOD_GET_MAX_BRIGHTNESS, NULL, &val);
if (ret_dbus < 0)
if (!brightness)
return DEVICE_ERROR_INVALID_PARAMETER;
- ret_dbus = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_dbus = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_LED, DEVICED_INTERFACE_LED,
METHOD_GET_BRIGHTNESS, NULL, &val);
if (ret_dbus < 0)
return DEVICE_ERROR_INVALID_PARAMETER;
/* if camera API preempt a flash device, it will return -EBUSY error. */
- ret_dbus = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_dbus = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_LED, DEVICED_INTERFACE_LED,
METHOD_SET_BRIGHTNESS, g_variant_new("(ii)", brightness, 0), NULL);
if (ret_dbus < 0)
if (on < 0 || off < 0)
return DEVICE_ERROR_INVALID_PARAMETER;
- ret_dbus = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_dbus = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_LED, DEVICED_INTERFACE_LED,
METHOD_PLAY_CUSTOM, g_variant_new("(iiuu)", on, off, (unsigned int)color, (unsigned int)flags), NULL);
//LCOV_EXCL_START System Error
if (!support_front_led)
return DEVICE_ERROR_NOT_SUPPORTED;
- ret_dbus = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_dbus = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_LED, DEVICED_INTERFACE_LED,
METHOD_STOP_CUSTOM, NULL, NULL);
//LCOV_EXCL_START System Error
return DEVICE_ERROR_INVALID_PARAMETER;
if (number_of_devices < 0) {
- ret_dbus = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_dbus = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_LED, DEVICED_INTERFACE_LED,
METHOD_GET_LED_NUMBER, NULL, &val);
if (ret_dbus < 0)
var = g_variant_new("(au)", builder);
g_variant_builder_unref(builder);
- ret_val = dbus_handle_method_sync_var(DEVICED_BUS_NAME, DEVICED_PATH_LED,
+ ret_val = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME, DEVICED_PATH_LED,
DEVICED_INTERFACE_LED, METHOD_MULTI_LED_CONTROL, var, NULL);
if (ret_val < 0)
return errno_to_device_error(ret_val); //LCOV_EXCL_LINE System Error
* limitations under the License.
*/
-#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/libgdbus.h>
#include "pmqos-internal.h"
#include "common.h"
if (timeout < 0)
return DEVICE_ERROR_INVALID_PARAMETER;
- ret_dbus = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_dbus = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_PMQOS,
DEVICED_INTERFACE_PMQOS,
METHOD_APP_LAUNCH_HOME,
if (timeout < 0)
return DEVICE_ERROR_INVALID_PARAMETER;
- ret_dbus = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_dbus = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_PMQOS,
DEVICED_INTERFACE_PMQOS,
METHOD_HOMESCREEN,
#include <limits.h>
#include <tracker.h>
#include <sys/time.h>
-#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/libgdbus.h>
#include <libsyscommon/ini-parser.h>
#include "power.h"
return -ENOMEM;
}
- ret_dbus = dbus_handle_method_async_with_reply_var(
+ ret_dbus = gdbus_call_async_with_reply(
DEVICED_BUS_NAME,
DEVICED_PATH_DISPLAY,
DEVICED_INTERFACE_DISPLAY,
if (privilege < 0) {
arr[0] = "privilege check";
- ret_dbus = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_dbus = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_DISPLAY, DEVICED_INTERFACE_DISPLAY,
METHOD_LOCK_STATE, g_variant_new("(sssi)", arr[0], arr[1], arr[2], timeout_ms),
NULL);
if (!arr[0])
return -EINVAL;
- return dbus_handle_method_async_with_reply_var(DEVICED_BUS_NAME,
+ return gdbus_call_async_with_reply(DEVICED_BUS_NAME,
DEVICED_PATH_DISPLAY, DEVICED_INTERFACE_DISPLAY,
METHOD_LOCK_STATE, g_variant_new("(sssi)", arr[0], arr[1], arr[2], timeout_ms), lock_cb, -1, NULL);
}
if (privilege < 0) {
arr[0] = "privilege check";
- ret_dbus = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_dbus = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_DISPLAY, DEVICED_INTERFACE_DISPLAY,
METHOD_UNLOCK_STATE, g_variant_new("(ss)", arr[0], arr[1]),
NULL);
if (!arr[0])
return -EINVAL;
- return dbus_handle_method_async_with_reply_var(DEVICED_BUS_NAME,
+ return gdbus_call_async_with_reply(DEVICED_BUS_NAME,
DEVICED_PATH_DISPLAY, DEVICED_INTERFACE_DISPLAY,
METHOD_UNLOCK_STATE, g_variant_new("(ss)", arr[0], arr[1]), unlock_cb, -1, NULL);
}
param = g_variant_new("(s)", TYPE_REBOOT);
}
- ret_dbus = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_dbus = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_POWEROFF,
DEVICED_INTERFACE_POWEROFF,
method, param, NULL);
{
int ret_dbus;
- ret_dbus = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_dbus = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_POWEROFF, DEVICED_INTERFACE_POWEROFF,
METHOD_POWEROFF, g_variant_new("(s)", TYPE_POWEROFF),
NULL);
#include <errno.h>
#include <glib.h>
#include <system_info.h>
-#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/libgdbus.h>
#include "common.h"
#include "temperature.h"
if (!ret_val)
return DEVICE_ERROR_NOT_SUPPORTED;
- ret_val = dbus_handle_method_sync_var(DEVICED_BUS_NAME,
+ ret_val = gdbus_call_sync_with_reply_int(DEVICED_BUS_NAME,
DEVICED_PATH_TEMPERATURE,
DEVICED_INTERFACE_TEMPERATURE,
METHOD_GET_TEMPERATURE, g_variant_new("(i)", type),
* limitations under the License.
*/
-#include <libsyscommon/dbus-system.h>
+#include <libsyscommon/libgdbus.h>
#include "common.h"
#include "touchscreen-internal.h"
{
int ret_dbus;
- ret_dbus = dbus_handle_method_async_with_reply_var(DEVICED_BUS_NAME,
+ ret_dbus = gdbus_call_async_with_reply(DEVICED_BUS_NAME,
DEVICED_PATH_TOUCH, DEVICED_INTERFACE_TOUCH,
METHOD_TOUCHSCREEN_ENABLE, NULL, cb, -1, NULL);
{
int ret_dbus;
- ret_dbus = dbus_handle_method_async_with_reply_var(DEVICED_BUS_NAME,
+ ret_dbus = gdbus_call_async_with_reply(DEVICED_BUS_NAME,
DEVICED_PATH_TOUCH, DEVICED_INTERFACE_TOUCH,
METHOD_TOUCHSCREEN_DISABLE, NULL, cb, -1, NULL);