From: pr.jung Date: Mon, 22 Aug 2016 04:45:06 +0000 (+0900) Subject: Apply API Deprecation Policy X-Git-Tag: submit/tizen/20160822.092002^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=963cd1aa1d05299e0d98f79cd003781c06b09a5e;p=platform%2Fcore%2Fapi%2Fdevice.git Apply API Deprecation Policy Change-Id: Id191385cfc6ef616c0f68465815a133ffcbb3579 Signed-off-by: pr.jung --- diff --git a/include/device-error.h b/include/device-error.h index 4fdd358..b122f62 100755 --- a/include/device-error.h +++ b/include/device-error.h @@ -18,7 +18,7 @@ #ifndef __TIZEN_SYSTEM_DEVICE_ERROR_H__ #define __TIZEN_SYSTEM_DEVICE_ERROR_H__ -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/display.h b/include/display.h index d619a25..e592b7a 100755 --- a/include/display.h +++ b/include/display.h @@ -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; /** * @} diff --git a/include/power.h b/include/power.h index ab81bc8..18c2641 100755 --- a/include/power.h +++ b/include/power.h @@ -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 diff --git a/src/common.h b/src/common.h index 5eaeed2..3bf15f9 100644 --- a/src/common.h +++ b/src/common.h @@ -22,10 +22,12 @@ #include #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 diff --git a/src/display.c b/src/display.c index bdca5ae..e633d8c 100644 --- a/src/display.c +++ b/src/display.c @@ -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; diff --git a/src/power.c b/src/power.c index 9087fc3..b1088ae 100644 --- a/src/power.c +++ b/src/power.c @@ -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);