From 4b7eaa9a21c3407164c5588b202adb0874b6861d Mon Sep 17 00:00:00 2001 From: Yunhee Seo Date: Fri, 6 Dec 2024 20:54:26 +0900 Subject: [PATCH] touchscreen: Remove dependency to libgdbus from libsyscommon The libsyscommon dependencies were not organized and the libgdbus headers were used without being hidden. It is not advisable to reference header files with unspecified dependencies and expose them in header file. libgdbus header caused unnecessary addition of libsyscommon dependencies. To use touchscreen header without libsyscommon dependency and remove dbus_pending_cb callback type usage, touchscreen_pending_cb is added. Also libgdbus inclusion is removed. Change-Id: I441e6a29b6d25b1018f8a12d81073897193ee47f Signed-off-by: Yunhee Seo --- include/touchscreen-internal.h | 19 +++++++++++++++---- packaging/capi-system-device.spec | 3 +++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/include/touchscreen-internal.h b/include/touchscreen-internal.h index 1cea068..3759827 100644 --- a/include/touchscreen-internal.h +++ b/include/touchscreen-internal.h @@ -17,8 +17,19 @@ #ifndef __TIZEN_SYSTEM_TOUCHSCREEN_INTERNAL_H__ #define __TIZEN_SYSTEM_TOUCHSCREEN_INTERNAL_H__ -#include -#include +#include + +/** + * @brief Called when a dbus callback is received. + * @details If async dbus call is successful, the callback will be invoked with a valid GVariant object to @a var. + * @since_tizen 7.0 + * @param[out] var If var is set to NULL, it means that the callback is invoked with an error. + * @param[out] user_data The user data passed to callback + * @param[out] GError Error information + * @see device_touchscreen_enable() + * @see device_touchscreen_disable() + */ +typedef void (*touchscreen_pending_cb)(GVariant *var, void *user_data, GError *err); /** * @brief Enables the current device's touchscreen device to start. @@ -65,7 +76,7 @@ * @endcode * @see device_touchscreen_disable() */ -int device_touchscreen_enable(dbus_pending_cb cb); +int device_touchscreen_enable(touchscreen_pending_cb cb); /** * @brief Disables the current device's touchscreen device to stop. @@ -115,6 +126,6 @@ int device_touchscreen_enable(dbus_pending_cb cb); * @endcode * @see device_touchscreen_enable() */ -int device_touchscreen_disable(dbus_pending_cb cb); +int device_touchscreen_disable(touchscreen_pending_cb cb); #endif diff --git a/packaging/capi-system-device.spec b/packaging/capi-system-device.spec index 3b98898..e92cd51 100644 --- a/packaging/capi-system-device.spec +++ b/packaging/capi-system-device.spec @@ -11,6 +11,7 @@ BuildRequires: pkgconfig(capi-base-common) BuildRequires: pkgconfig(capi-system-info) BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(vconf) +BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(tracker) BuildRequires: pkgconfig(libsyscommon) @@ -20,6 +21,8 @@ BuildRequires: pkgconfig(hal-api-device) BuildRequires: lcov %endif +Requires: pkgconfig(glib-2.0) + %description A Device library in TIZEN C API package. -- 2.34.1