touchscreen: Apply hal-api-device-touchscreen module HAL ABI versioning 18/310018/1
authorYunhee Seo <yuni.seo@samsung.com>
Fri, 19 Apr 2024 07:30:24 +0000 (16:30 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Fri, 19 Apr 2024 07:30:24 +0000 (16:30 +0900)
As HAL ABI versioning is applied to hal-api-device-touchscreen module,
inclusion path and data definition is changed.

Change-Id: Ic106b8874728d4c2964707d5f5b7e00ec8bc3f4d
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
src/touchscreen/sensitivity.c
src/touchscreen/touchscreen.c

index e00f40338e1a7cb54fb73172de1261bd5c28f294..8978bc93556706b6285fc02862d1ef2f254a8151 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <stdbool.h>
 #include <vconf.h>
-#include <hal/hal-touchscreen.h>
+#include <hal/hal-device-touchscreen.h>
 #include <libsyscommon/libgdbus.h>
 
 #include "shared/devices.h"
index 4d2dbffa99fce066f3f0972c833ce5c6b891a216..585b76f01e32ce4f051942dcb5e5a2ceb088b9c9 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <assert.h>
 #include <stdbool.h>
-#include <hal/hal-touchscreen.h>
+#include <hal/hal-device-touchscreen.h>
 #include <libsyscommon/libgdbus.h>
 #include <vconf.h>
 #include <dlfcn.h>
@@ -130,7 +130,7 @@ static void touchscreen_exit(void *data)
        hal_device_touchscreen_put_backend();
 }
 
-static int touchscreen_set_state(enum touchscreen_state state)
+static int touchscreen_set_state(hal_device_touchscreen_state_e state)
 {
        int ret;
        char *act;
@@ -140,12 +140,12 @@ static int touchscreen_set_state(enum touchscreen_state state)
                return -ENOENT;
        }
 
-       if (state != TOUCHSCREEN_ON && state != TOUCHSCREEN_OFF) {
+       if (state != HAL_DEVICE_TOUCHSCREEN_ON && state != HAL_DEVICE_TOUCHSCREEN_OFF) {
                _E("Invalid parameter.");
                return -EINVAL;
        }
 
-       act = (state == TOUCHSCREEN_ON) ? "enable" : "disable";
+       act = (state == HAL_DEVICE_TOUCHSCREEN_ON) ? "enable" : "disable";
 
        ret = hal_device_touchscreen_set_state(state);
        if (ret == 0)
@@ -181,7 +181,7 @@ static int touchscreen_start(enum device_flags flags)
        /*
         * It is safe to turn touchscreen on before powersaving on/off.
         */
-       ret = touchscreen_set_state(TOUCHSCREEN_ON);
+       ret = touchscreen_set_state(HAL_DEVICE_TOUCHSCREEN_ON);
 
        state = display_panel_get_dpms_cached_state();
 
@@ -212,7 +212,7 @@ static int touchscreen_stop(enum device_flags flags)
 
        if (flags & TOUCH_SCREEN_OFF_MODE) {
                touchscreen_powersaving(POWERSAVING_OFF);
-               return touchscreen_set_state(TOUCHSCREEN_OFF);
+               return touchscreen_set_state(HAL_DEVICE_TOUCHSCREEN_OFF);
        }
 
        if (battery && battery->charger_connected == 1) {
@@ -227,12 +227,12 @@ static int touchscreen_stop(enum device_flags flags)
 
 exit:
        touchscreen_powersaving(POWERSAVING_OFF);
-       return touchscreen_set_state(TOUCHSCREEN_OFF);
+       return touchscreen_set_state(HAL_DEVICE_TOUCHSCREEN_OFF);
 }
 
 static int touchscreen_dump(FILE *fp, int mode, void *dump_data)
 {
-       enum touchscreen_state state;
+       hal_device_touchscreen_state_e state;
        int ret;
 
        ret = hal_device_touchscreen_get_state(&state);
@@ -244,7 +244,7 @@ static int touchscreen_dump(FILE *fp, int mode, void *dump_data)
                return ret;
        }
 
-       if (state == TOUCHSCREEN_ON)
+       if (state == HAL_DEVICE_TOUCHSCREEN_ON)
                LOG_DUMP(fp, "Touchscreen is enabled\n");
        else
                LOG_DUMP(fp, "Touchscreen is disabled\n");