display: Apply hal-api-device-display module HAL ABI versioning 09/308909/1
authorYunhee Seo <yuni.seo@samsung.com>
Tue, 2 Apr 2024 12:38:38 +0000 (21:38 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Tue, 2 Apr 2024 12:42:33 +0000 (21:42 +0900)
As HAL ABI versioning is applied to hal-api-device-display module,
enum structure is chaned to native API style from hal-api-device.

1. As hal module file name is changed, include path is changed.
2. Replace enum type and value definitions to avoid build and behavior issues.

Change-Id: Ie882b459ce574b804747d23fe6e2679e2dab7c8a
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
plugins/mobile/display/device-interface.c
plugins/tv/display/device-interface.c
plugins/wearable/display/device-interface.c
plugins/wearable/display/enhance.c
plugins/wearable/display/lbm.c
src/display/device-interface.h
src/display/display-backlight.c
src/display/display-dbus.c
src/display/display-panel.c
src/display/display-panel.h

index 50f2aac88d6c1a61c4061817049b7593259a804d..50c37acf9bd940ed70e21e8d1e6a665c24bdc1f5 100644 (file)
@@ -30,7 +30,7 @@
 #include <assert.h>
 #include <errno.h>
 #include <dlfcn.h>
-#include <hal/device/hal-display.h>
+#include <hal/device/hal-device-display.h>
 
 #include "ambient-mode.h"
 #include <libsyscommon/log.h>
index 682f9c74dd32e899ded743d0853f698f0011f53d..599518111376d426b12b1fe7cf693b8547591fe3 100644 (file)
@@ -30,7 +30,7 @@
 #include <assert.h>
 #include <errno.h>
 #include <dlfcn.h>
-#include <hal/device/hal-display.h>
+#include <hal/device/hal-device-display.h>
 
 #include "ambient-mode.h"
 #include <libsyscommon/log.h>
index 9ca5aeb3c53f902d59ccf6461c65ec5ebaf71bae..0aed6e6ece8045a8d62e8b96c78c3a801baf7afb 100644 (file)
@@ -30,7 +30,7 @@
 #include <assert.h>
 #include <errno.h>
 #include <dlfcn.h>
-#include <hal/device/hal-display.h>
+#include <hal/device/hal-device-display.h>
 #include <libsyscommon/resource-manager.h>
 #include <system/syscommon-plugin-deviced-display-interface.h>
 #include <system/syscommon-plugin-deviced-common-interface.h>
index 300db80bf44086673493ce099a35bdf4e603de25..34f1fdbfb173841407e87dd28191bff1a0dbfda7 100644 (file)
@@ -20,7 +20,7 @@
 #include <stdio.h>
 #include <stdbool.h>
 #include <vconf.h>
-#include <hal/device/hal-display.h>
+#include <hal/device/hal-device-display.h>
 #include <libsyscommon/libgdbus.h>
 
 #include "core.h"
@@ -48,13 +48,13 @@ static int enhance_update_state(void)
 
        if (greyscale_status) {
                if (negative_status)
-                       state = DISPLAY_IMAGE_EFFECT_GREY_NEGATIVE;
+                       state = HAL_DEVICE_DISPLAY_IMAGE_EFFECT_GREY_NEGATIVE;
                else
-                       state = DISPLAY_IMAGE_EFFECT_GREY;
+                       state = HAL_DEVICE_DISPLAY_IMAGE_EFFECT_GREY;
        } else if (negative_status)
-               state = DISPLAY_IMAGE_EFFECT_NEGATIVE;
+               state = HAL_DEVICE_DISPLAY_IMAGE_EFFECT_NEGATIVE;
        else
-               state = DISPLAY_IMAGE_EFFECT_STANDARD;
+               state = HAL_DEVICE_DISPLAY_IMAGE_EFFECT_STANDARD;
 
        display_panel_set_image_effect(state);
 
index 329aa0a07cc8a06b62acbaa90e4a16330843ee17..a32e82945e4b4b1fa533508e43f33a8e2e39648c 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <stdbool.h>
 #include <math.h>
-#include <hal/device/hal-display.h>
+#include <hal/device/hal-device-display.h>
 #include <libsyscommon/ini-parser.h>
 
 #include "auto-brightness-sensorhub.h"
index a49edf374cc6560b4bd8331df5406201851ca3d0..09d77e9c7dd3dd45270623fd0692c7c064896b17 100644 (file)
@@ -25,7 +25,7 @@
 #define __DEVICE_INTERFACE_H__
 
 #include <stdbool.h>
-#include <hal/device/hal-display.h>
+#include <hal/device/hal-device-display.h>
 #include "shared/devices.h"
 #include "display-backlight.h"
 #include "display-plugin.h"
index a74707fc6ba76c8d34b34a8a58f417d26b5370eb..687b137f48b67247ecc5d7cd8f97b759d5dc30c2 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <math.h>
 
-#include <hal/device/hal-display.h>
+#include <hal/device/hal-device-display.h>
 
 #include "shared/device-notifier.h"
 #include "shared/log.h"
index babe49a855f2424a9e4415dcfc76bfb890b6f976..bcda4f842efe51e17286455637ea22897d0aecd9 100644 (file)
@@ -1354,7 +1354,7 @@ static GVariant *dbus_getrotationangle(GDBusConnection *conn,
 {
        int ret;
        int display_index;
-       enum hal_device_display_rotation_angle angle;
+       hal_device_display_rotation_angle_e angle;
        enum syscommon_deviced_display_orientation init_direction;
 
        g_variant_get(param, "(i)", &display_index);
@@ -1373,8 +1373,8 @@ static GVariant *dbus_setrotationangle(GDBusConnection *conn,
 {
        int ret = 0;
        int display_index;
-       enum hal_device_display_rotation_angle angle;
-       enum hal_device_display_rotation_direction direction;
+       hal_device_display_rotation_angle_e angle;
+       hal_device_display_rotation_direction_e direction;
 
        g_variant_get(param, "(iii)", &display_index, &angle, &direction);
        ret = hal_device_display_set_rotation_angle(display_index, angle, direction);
index a75ea81049eb1ffb33c54950d8728a342542a970..03f81d42acf0688e29a4138e86f3a23c918de5a0 100644 (file)
@@ -76,7 +76,7 @@ int display_panel_set_dpms_state(int dpms_on, enum device_flags flags)
        return 0;
 }
 
-int display_panel_set_white_balance(enum hal_display_white_balance white_balance_type,
+int display_panel_set_white_balance(hal_device_display_white_balance_e white_balance_type,
                                        int value)
 {
        int ret = 0;
@@ -87,15 +87,15 @@ int display_panel_set_white_balance(enum hal_display_white_balance white_balance
        }
 
        switch (white_balance_type) {
-       case HAL_DISPLAY_WHITE_BALANCE_R_GAIN:
-       case HAL_DISPLAY_WHITE_BALANCE_G_GAIN:
-       case HAL_DISPLAY_WHITE_BALANCE_B_GAIN:
+       case HAL_DEVICE_DISPLAY_WHITE_BALANCE_R_GAIN:
+       case HAL_DEVICE_DISPLAY_WHITE_BALANCE_G_GAIN:
+       case HAL_DEVICE_DISPLAY_WHITE_BALANCE_B_GAIN:
                if (value > MAX_WHITE_BALANCE_GAIN)
                        value = DEFAULT_WHITE_BALANCE_GAIN;
                break;
-       case HAL_DISPLAY_WHITE_BALANCE_R_OFFSET:
-       case HAL_DISPLAY_WHITE_BALANCE_G_OFFSET:
-       case HAL_DISPLAY_WHITE_BALANCE_B_OFFSET:
+       case HAL_DEVICE_DISPLAY_WHITE_BALANCE_R_OFFSET:
+       case HAL_DEVICE_DISPLAY_WHITE_BALANCE_G_OFFSET:
+       case HAL_DEVICE_DISPLAY_WHITE_BALANCE_B_OFFSET:
                if (value > MAX_WHITE_BALANCE_OFFSET)
                        value = DEFAULT_WHITE_BALANCE_OFFSET;
                break;
@@ -107,13 +107,13 @@ int display_panel_set_white_balance(enum hal_display_white_balance white_balance
        ret = hal_device_display_set_white_balance(white_balance_type, value);
        if (ret == -ENODEV)
                _E("Set white balance is not supported.");
-       else if (ret < 0)
+else if (ret < 0)
                _E("Failed to set white balance value.");
 
        return ret;
 }
 
-int display_panel_get_white_balance(enum hal_display_white_balance white_balance_type,
+int display_panel_get_white_balance(hal_device_display_white_balance_e white_balance_type,
                                        int* value)
 {
        int ret = 0;
@@ -124,12 +124,12 @@ int display_panel_get_white_balance(enum hal_display_white_balance white_balance
        }
 
        switch (white_balance_type) {
-       case HAL_DISPLAY_WHITE_BALANCE_R_GAIN:
-       case HAL_DISPLAY_WHITE_BALANCE_G_GAIN:
-       case HAL_DISPLAY_WHITE_BALANCE_B_GAIN:
-       case HAL_DISPLAY_WHITE_BALANCE_R_OFFSET:
-       case HAL_DISPLAY_WHITE_BALANCE_G_OFFSET:
-       case HAL_DISPLAY_WHITE_BALANCE_B_OFFSET:
+       case HAL_DEVICE_DISPLAY_WHITE_BALANCE_R_GAIN:
+       case HAL_DEVICE_DISPLAY_WHITE_BALANCE_G_GAIN:
+       case HAL_DEVICE_DISPLAY_WHITE_BALANCE_B_GAIN:
+       case HAL_DEVICE_DISPLAY_WHITE_BALANCE_R_OFFSET:
+       case HAL_DEVICE_DISPLAY_WHITE_BALANCE_G_OFFSET:
+       case HAL_DEVICE_DISPLAY_WHITE_BALANCE_B_OFFSET:
                break;
        default:
                _E("Unknown white balance type");
@@ -530,7 +530,7 @@ int display_panel_calculate_diff_time_between_lcd_on_direct_and_state_action(int
 int display_panel_get_dpms_state(void)
 {
        int ret;
-       enum display_state val;
+       hal_device_display_state_e val;
 
        ret = hal_device_display_get_state(&val);
        if (ret < 0)
@@ -541,19 +541,19 @@ int display_panel_get_dpms_state(void)
         *        feature. Therefore exclude this condition statement from the display core logic.
         *        Please consider this condition statement when the ambient feature comes into the display core.
         */
-       //if (val == DISPLAY_ON && ambient_get_state())
+       //if (val == HAL_DEVICE_DISPLAY_ON && ambient_get_state())
        //      return SYSCOMMON_DEVICED_DPMS_OFF;
 
        switch (val) {
-               case DISPLAY_ON:
+               case HAL_DEVICE_DISPLAY_ON:
                        return SYSCOMMON_DEVICED_DPMS_ON;
-               case DISPLAY_STANDBY:
+               case HAL_DEVICE_DISPLAY_STANDBY:
                        return SYSCOMMON_DEVICED_DPMS_STANDBY;
-               case DISPLAY_SUSPEND:
+               case HAL_DEVICE_DISPLAY_SUSPEND:
                        return SYSCOMMON_DEVICED_DPMS_SUSPEND;
-               case DISPLAY_OFF:
+               case HAL_DEVICE_DISPLAY_OFF:
                        return SYSCOMMON_DEVICED_DPMS_OFF;
-               case DISPLAY_DETACH:
+               case HAL_DEVICE_DISPLAY_DETACH:
                        return SYSCOMMON_DEVICED_DPMS_DETACH;
                default:
                        return -EINVAL;
@@ -581,7 +581,7 @@ void __display_panel_register_dpms_checklist(int mode, void (*checker)(void), co
 }
 
 /* FIXME: This function is used for only wearable profile, should be fixed after plugin refactoring */
-int display_panel_set_image_effect(enum display_image_effect effect)
+int display_panel_set_image_effect(hal_device_display_image_effect_e effect)
 {
        int ret;
 
@@ -603,10 +603,10 @@ int display_panel_set_image_effect(enum display_image_effect effect)
 }
 
 /* FIXME: This function is deprecated, should be fixed after plugin refactoring */
-int display_panel_get_image_effect(enum display_image_effect *effect)
+int display_panel_get_image_effect(hal_device_display_image_effect_e *effect)
 {
        int ret;
-       enum display_image_effect val;
+       hal_device_display_image_effect_e val;
 
        if (!effect)
                return -EINVAL;
@@ -631,7 +631,7 @@ int display_panel_get_image_effect(enum display_image_effect *effect)
 }
 
 /* FIXME: This function is deprecated, should be fixed after plugin refactoring */
-int display_panel_set_panel_mode(enum display_panel_mode mode)
+int display_panel_set_panel_mode(hal_device_display_panel_mode_e mode)
 {
        int ret;
 
@@ -653,10 +653,10 @@ int display_panel_set_panel_mode(enum display_panel_mode mode)
 }
 
 /* FIXME: This function is deprecated, should be fixed after plugin refactoring */
-int display_panel_get_panel_mode(enum display_panel_mode *mode)
+int display_panel_get_panel_mode(hal_device_display_panel_mode_e *mode)
 {
        int ret;
-       enum display_panel_mode val;
+       hal_device_display_panel_mode_e val;
 
        if (!mode)
                return -EINVAL;
index 0e87988427739d928eb55e8422e153537ef7b3f1..ad7bc84428f394d2cc9bc32394d0793a2452dd14 100644 (file)
 #ifndef __DISPLAY_PANEL_H__
 #define __DISPLAY_PANEL_H__
 
-#include <hal/device/hal-display.h>
+#include <hal/device/hal-device-display.h>
 
 #include "display-dpms.h"
 #include "shared/devices.h"
 
 int display_panel_set_dpms_state(int dpms_on, enum device_flags flags);
-int display_panel_set_white_balance(enum hal_display_white_balance white_balance_type, int value);
-int display_panel_get_white_balance(enum hal_display_white_balance white_balance_type, int* out_val);
+int display_panel_set_white_balance(hal_device_display_white_balance_e white_balance_type, int value);
+int display_panel_get_white_balance(hal_device_display_white_balance_e white_balance_type, int* out_val);
 int display_panel_set_panel_state_by_on_state(enum device_flags flags);
 int display_panel_set_panel_state_by_off_state(enum device_flags flags);
 int display_panel_set_panel_state_by_standby_state(bool standby_on);
@@ -43,10 +43,10 @@ bool display_panel_is_lcd_on_state_broadcasted(void);
 void display_panel_update_lcd_on_timeval(void);
 int display_panel_calculate_diff_time_between_lcd_on_direct_and_state_action(int *diff_time);
 /* Deprecated functions */
-int display_panel_set_image_effect(enum display_image_effect effect);
-int display_panel_get_image_effect(enum display_image_effect *effect);
-int display_panel_set_panel_mode(enum display_panel_mode mode);
-int display_panel_get_panel_mode(enum display_panel_mode *mode);
+int display_panel_set_image_effect(hal_device_display_image_effect_e effect);
+int display_panel_get_image_effect(hal_device_display_image_effect_e *effect);
+int display_panel_set_panel_mode(hal_device_display_panel_mode_e mode);
+int display_panel_get_panel_mode(hal_device_display_panel_mode_e *mode);
 int display_panel_set_frame_rate(int frame_rate);
 int display_panel_get_frame_rate(int *frame_rate);
 int display_panel_get_dpms_state(void);