touchscreen: Remove dependency to libgdbus from libsyscommon 79/315979/1 accepted/tizen/9.0/unified/20241210.020004
authorYunhee Seo <yuni.seo@samsung.com>
Fri, 6 Dec 2024 11:54:26 +0000 (20:54 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Mon, 9 Dec 2024 02:01:53 +0000 (11:01 +0900)
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 <yuni.seo@samsung.com>
include/touchscreen-internal.h
packaging/capi-system-device.spec

index 1cea068ef81418242dbb7ad0d4ac3379f8c82cda..37598273cbc3a0646bcb0aba4d77b41a56676f93 100644 (file)
 #ifndef __TIZEN_SYSTEM_TOUCHSCREEN_INTERNAL_H__
 #define __TIZEN_SYSTEM_TOUCHSCREEN_INTERNAL_H__
 
-#include <gio/gio.h>
-#include <libsyscommon/libgdbus.h>
+#include <glib.h>
+
+/**
+ * @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
index 3b98898f1db588193359e831081defba40848186..e92cd518b385d493a1fc59f1abfbb77639733778 100644 (file)
@@ -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.