Apply API Deprecation Policy 86/84686/2 accepted/tizen/3.0/common/20161114.105159 accepted/tizen/3.0/ivi/20161011.043833 accepted/tizen/3.0/mobile/20161015.032750 accepted/tizen/3.0/tv/20161016.004042 accepted/tizen/3.0/wearable/20161015.081936 accepted/tizen/common/20160822.132858 accepted/tizen/ivi/20160822.232647 accepted/tizen/mobile/20160822.232552 accepted/tizen/tv/20160822.232611 accepted/tizen/wearable/20160822.232627 submit/tizen/20160822.092002 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000001 submit/tizen_3.0_mobile/20161015.000001 submit/tizen_3.0_tv/20161015.000001 submit/tizen_3.0_wearable/20161015.000001
authorpr.jung <pr.jung@samsung.com>
Mon, 22 Aug 2016 04:45:06 +0000 (13:45 +0900)
committerpr.jung <pr.jung@samsung.com>
Mon, 22 Aug 2016 07:23:12 +0000 (16:23 +0900)
Change-Id: Id191385cfc6ef616c0f68465815a133ffcbb3579
Signed-off-by: pr.jung <pr.jung@samsung.com>
include/device-error.h
include/display.h
include/power.h
src/common.h
src/display.c
src/power.c

index 4fdd358..b122f62 100755 (executable)
@@ -18,7 +18,7 @@
 #ifndef __TIZEN_SYSTEM_DEVICE_ERROR_H__
 #define __TIZEN_SYSTEM_DEVICE_ERROR_H__
 
-#include <tizen_error.h>
+#include <tizen.h>
 
 #ifdef __cplusplus
 extern "C" {
index d619a25..e592b7a 100755 (executable)
@@ -204,7 +204,7 @@ int device_display_get_state(display_state_e *state);
  *  ...
  * @endcode
  */
-int device_display_change_state(display_state_e state);
+int device_display_change_state(display_state_e state) TIZEN_DEPRECATED_API;
 
 /**
  * @}
index ab81bc8..18c2641 100755 (executable)
@@ -130,7 +130,7 @@ int device_power_release_lock(power_lock_e type);
  *
  * @post The device will be in #DISPLAY_STATE_NORMAL state.
  */
-int device_power_wakeup(bool dim);
+int device_power_wakeup(bool dim) TIZEN_DEPRECATED_API;
 
 /**
  * @platform
index 5eaeed2..3bf15f9 100644 (file)
     #include <dlog.h>
     #define _D(fmt, args...)   SLOGD(fmt, ##args)
     #define _I(fmt, args...)   SLOGI(fmt, ##args)
+    #define _W(fmt, args...)   SLOGW(fmt, ##args)
     #define _E(fmt, args...)   SLOGE(fmt, ##args)
 #else
     #define _D(x, ...)
     #define _I(x, ...)
+    #define _W(x, ...)
     #define _E(x, ...)
 #endif
 
index bdca5ae..e633d8c 100644 (file)
@@ -212,6 +212,7 @@ int device_display_change_state(display_state_e state)
        char *str, *arr[1];
        int ret;
 
+       _W("DEPRECATION WARNING: device_display_change_state() is deprecated and will be removed from next release.");
        if (state < DISPLAY_STATE_NORMAL || state > DISPLAY_STATE_SCREEN_OFF)
                return DEVICE_ERROR_INVALID_PARAMETER;
 
index 9087fc3..b1088ae 100644 (file)
@@ -322,11 +322,13 @@ int device_power_request_lock(power_lock_e type, int timeout_ms)
                if (ret == 0 &&
                        (timeout_ms == 0 || timeout_ms > LOCK_CPU_TIMEOUT_MAX))
                        add_off_lock_timeout();
-       } else if (type == POWER_LOCK_DISPLAY)
+       } else if (type == POWER_LOCK_DISPLAY) {
+               _W("DEPRECATION WARNING: This power lock enum is deprecated and will be removed from next release. Use efl_util_set_window_screen_mode() instead.");
                ret = lock_state(DISPLAY_STATE_NORMAL, STAY_CUR_STATE, timeout_ms);
-       else if (type == POWER_LOCK_DISPLAY_DIM)
+       } else if (type == POWER_LOCK_DISPLAY_DIM) {
+               _W("DEPRECATION WARNING: This power lock enum is deprecated and will be removed from next release. Use efl_util_set_window_screen_mode() instead.");
                ret = lock_state(DISPLAY_STATE_SCREEN_DIM, STAY_CUR_STATE, timeout_ms);
-       else
+       else
                return DEVICE_ERROR_INVALID_PARAMETER;
 
        return errno_to_device_error(ret);
@@ -342,11 +344,13 @@ int device_power_release_lock(power_lock_e type)
                        remove_off_lock_timeout();
                        remove_padding_timeout();
                }
-       } else if (type == POWER_LOCK_DISPLAY)
+       } else if (type == POWER_LOCK_DISPLAY) {
+               _W("DEPRECATION WARNING: This power lock enum is deprecated and will be removed from next release. Use efl_util_set_window_screen_mode() instead.");
                ret = unlock_state(DISPLAY_STATE_NORMAL, PM_KEEP_TIMER);
-       else if (type == POWER_LOCK_DISPLAY_DIM)
+       } else if (type == POWER_LOCK_DISPLAY_DIM) {
+               _W("DEPRECATION WARNING: This power lock enum is deprecated and will be removed from next release. Use efl_util_set_window_screen_mode() instead.");
                ret = unlock_state(DISPLAY_STATE_SCREEN_DIM, PM_KEEP_TIMER);
-       else
+       else
                return DEVICE_ERROR_INVALID_PARAMETER;
 
        return errno_to_device_error(ret);
@@ -354,6 +358,7 @@ int device_power_release_lock(power_lock_e type)
 
 int device_power_wakeup(bool dim)
 {
+       _W("DEPRECATION WARNING: device_power_wakeup() is deprecated and will be removed from next release.");
        if (dim)
                return device_display_change_state(DISPLAY_STATE_SCREEN_DIM);